wok rev 7297

Add aufs. Aufs is now compile by itself like ndiswrapper-driver is. This is so the aufs source tar.gz file is not purge with tazdev everytime we need to purge it. Removed linux-aufs receipt. Updated linux, linux-source, and aufs-utils with the new changes.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Nov 17 00:59:02 2010 +0000 (2010-11-17)
parents 552f2703e5ff
children 5a6a835eb63f
files aufs-utils/receipt aufs/receipt aufs/stuff/aufs2-module-2.6.36.patch linux-aufs/receipt linux-source/receipt linux/receipt
line diff
     1.1 --- a/aufs-utils/receipt	Wed Nov 17 00:27:36 2010 +0000
     1.2 +++ b/aufs-utils/receipt	Wed Nov 17 00:59:02 2010 +0000
     1.3 @@ -5,7 +5,7 @@
     1.4  CATEGORY="system-tools"
     1.5  SHORT_DESC="The aufs utils."
     1.6  MAINTAINER="pankso@slitaz.org"
     1.7 -DEPENDS="linux-aufs"
     1.8 +DEPENDS="aufs"
     1.9  BUILD_DEPENDS="git linux-module-headers"
    1.10  WEB_SITE="http://aufs.sourceforge.net/"
    1.11  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/aufs/receipt	Wed Nov 17 00:59:02 2010 +0000
     2.3 @@ -0,0 +1,75 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="aufs"
     2.7 +VERSION="20101116"
     2.8 +CATEGORY="base-system"
     2.9 +SHORT_DESC="aufs2 kernel module"
    2.10 +MAINTAINER="slaxemulator@gmail.com"
    2.11 +DEPENDS="linux"
    2.12 +BUILD_DEPENDS="linux-module-headers git"
    2.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.14 +WEB_SITE="http://aufs.sf.net/"
    2.15 +PROVIDE="linux-aufs"
    2.16 +
    2.17 +# Rules to configure and make the package.
    2.18 +compile_rules()
    2.19 +{
    2.20 +	local AUFSDIR="$PACKAGE-$VERSION"
    2.21 +	TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz
    2.22 +	if [ -f $TARBALL ]; then
    2.23 +		tar xzf $TARBALL
    2.24 +		cd $AUFSDIR && git checkout origin/aufs2
    2.25 +	else
    2.26 +		# Aufs2 from git repository
    2.27 +		git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR
    2.28 +		tar czf $TARBALL $AUFSDIR
    2.29 +		cd $AUFSDIR && git checkout origin/aufs2	
    2.30 +	fi
    2.31 +	cd $src
    2.32 +
    2.33 +	sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
    2.34 +		config.mk || return 1
    2.35 +	sed -i 's|CONFIG_AUFS_BRANCH_MAX_1023 =.*|CONFIG_AUFS_BRANCH_MAX_1023 = y|' \
    2.36 +		config.mk || return 1
    2.37 +	sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \
    2.38 +		config.mk || return 1
    2.39 +	sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \
    2.40 +		config.mk || return 1
    2.41 +	sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
    2.42 +		config.mk || return 1
    2.43 +	sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
    2.44 +		config.mk || return 1
    2.45 +	sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
    2.46 +		config.mk || return 1
    2.47 +	sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
    2.48 +		config.mk || return 1
    2.49 +	sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
    2.50 +		config.mk || return 1
    2.51 +
    2.52 +	patch -Np1 -i ../stuff/aufs2-module-2.6.36.patch
    2.53 +	#make KDIR=/usr/src/linux clean
    2.54 +	make KDIR=/usr/src/linux
    2.55 +}
    2.56 +
    2.57 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.58 +genpkg_rules()
    2.59 +{
    2.60 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    2.61 +	EXTRAVERSION=_$KERNEL_VERSION
    2.62 +	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs
    2.63 +	lzma e $src/fs/aufs/aufs.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
    2.64 +	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
    2.65 +	chown 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz
    2.66 +}
    2.67 +
    2.68 +post_install()
    2.69 +{
    2.70 +	echo "Processing post-install commands..."
    2.71 +	chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
    2.72 +}
    2.73 +
    2.74 +post_remove()
    2.75 +{
    2.76 +	echo "Processing post-remove commands..."
    2.77 +	depmod -a
    2.78 +}
    2.79 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/aufs/stuff/aufs2-module-2.6.36.patch	Wed Nov 17 00:59:02 2010 +0000
     3.3 @@ -0,0 +1,47 @@
     3.4 +diff --git a/ubuntu/aufs/branch.c b/ubuntu/aufs/branch.c
     3.5 +index cd4463c..ff6b158 100644
     3.6 +--- a/fs/aufs/branch.c
     3.7 ++++ b/fs/aufs/branch.c
     3.8 +@@ -22,6 +22,8 @@
     3.9 + 
    3.10 + #include <linux/file.h>
    3.11 + #include <linux/statfs.h>
    3.12 ++#include <linux/lglock.h>
    3.13 ++#include <linux/percpu.h>
    3.14 + #include "aufs.h"
    3.15 + 
    3.16 + /*
    3.17 +@@ -851,7 +853,8 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
    3.18 + 		goto out;
    3.19 + 
    3.20 + 	/* no need file_list_lock() since sbinfo is locked? defered? */
    3.21 +-	list_for_each_entry(file, &sb->s_files, f_u.fu_list) {
    3.22 ++        lg_global_lock(files_lglock);
    3.23 ++	do_file_list_for_each_entry(sb, file) {
    3.24 + 		if (special_file(file->f_dentry->d_inode->i_mode))
    3.25 + 			continue;
    3.26 + 
    3.27 +@@ -861,6 +864,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
    3.28 + 			err = -EBUSY;
    3.29 + 			FiMustNoWaiters(file);
    3.30 + 			fi_read_unlock(file);
    3.31 ++			lg_global_unlock(files_lglock);
    3.32 + 			goto out_free;
    3.33 + 		}
    3.34 + 
    3.35 +@@ -889,10 +893,13 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex)
    3.36 + 			if (p) {
    3.37 + 				a = p;
    3.38 + 				a[n++] = hf;
    3.39 +-			} else
    3.40 ++			} else {
    3.41 ++				lg_global_unlock(files_lglock);
    3.42 + 				goto out_free;
    3.43 ++			}
    3.44 + 		}
    3.45 +-	}
    3.46 ++	} while_file_list_for_each_entry;
    3.47 ++	lg_global_unlock(files_lglock);
    3.48 + 
    3.49 + 	err = 0;
    3.50 + 	if (n)
     4.1 --- a/linux-aufs/receipt	Wed Nov 17 00:27:36 2010 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,36 +0,0 @@
     4.4 -# SliTaz package receipt.
     4.5 -
     4.6 -PACKAGE="linux-aufs"
     4.7 -VERSION="2.6.36"
     4.8 -CATEGORY="base-system"
     4.9 -SHORT_DESC="The Linux kernel aufs2 module."
    4.10 -MAINTAINER="devel@slitaz.org"
    4.11 -DEPENDS="linux"
    4.12 -WANTED="linux"
    4.13 -WEB_SITE="http://www.kernel.org/"
    4.14 -
    4.15 -# Rules to gen a SliTaz package suitable for Tazpkg.
    4.16 -genpkg_rules()
    4.17 -{
    4.18 -    local path
    4.19 -    path=lib/modules/$VERSION-slitaz/kernel
    4.20 -    mkdir -p $fs/$path
    4.21 -    export src
    4.22 -    export _pkg
    4.23 -    $src/slitaz/list_modules.sh fs/aufs | while read module; do
    4.24 -    	dir=$path/$(dirname $module)
    4.25 -    	[ -d $fs/$dir ] || mkdir -p $fs/$dir
    4.26 -        cp -a $_pkg/$path/$module $fs/$dir
    4.27 -    done
    4.28 -}
    4.29 -
    4.30 -# Post install/remove commands for Tazpkg.
    4.31 -post_install()
    4.32 -{
    4.33 -	chroot "$1/" depmod -a $VERSION-slitaz
    4.34 -}
    4.35 -
    4.36 -post_remove()
    4.37 -{
    4.38 -	depmod -a $VERSION-slitaz
    4.39 -}
     5.1 --- a/linux-source/receipt	Wed Nov 17 00:27:36 2010 +0000
     5.2 +++ b/linux-source/receipt	Wed Nov 17 00:59:02 2010 +0000
     5.3 @@ -12,8 +12,8 @@
     5.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     5.5  genpkg_rules()
     5.6  {
     5.7 -	local _AUFSVER="20101105"
     5.8 -	local AUFSDIR="aufs2-${_AUFSVER}-${VERSION}"
     5.9 +	local _AUFSVER=`grep  ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    5.10 +	local AUFSDIR="aufs-${_AUFSVER}"
    5.11  	mkdir -p $fs/usr/src/kernel-patches \
    5.12  			$fs/lib/modules/$VERSION-slitaz \
    5.13  			$fs/usr/bin
     6.1 --- a/linux/receipt	Wed Nov 17 00:27:36 2010 +0000
     6.2 +++ b/linux/receipt	Wed Nov 17 00:59:02 2010 +0000
     6.3 @@ -21,29 +21,30 @@
     6.4  	#do
     6.5  	#	sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i
     6.6  	#done
     6.7 -	local _AUFSVER="20101105"
     6.8 -	local AUFSDIR="aufs2-${_AUFSVER}-${VERSION}"
     6.9 -	[ -d "AUFSDIR" ] && rm -rf $AUFSDIR
    6.10 +	local _AUFSVER=`grep  ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    6.11 +	local AUFSDIR="aufs-${_AUFSVER}"
    6.12  	TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz
    6.13 -	if [ -f $TARBALL ]; then
    6.14 +	if [ -d $WOK/aufs/$AUFSDIR ]; then
    6.15 +		local AUFSDIR=$WOK/aufs/$AUFSDIR
    6.16 +		ln -sf $AUFSDIR aufs-${_AUFSVER}
    6.17 +	elif [ -f $TARBALL ]; then
    6.18  		tar xzf $TARBALL
    6.19  		cd $AUFSDIR && git checkout origin/aufs2
    6.20 +		cd $WOK/$PACKAGE
    6.21  	else
    6.22  		# Aufs2 from git repository
    6.23  		git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR
    6.24  		tar czf $TARBALL $AUFSDIR
    6.25 -		cd $AUFSDIR && git checkout origin/aufs2	
    6.26 +		cd $AUFSDIR && git checkout origin/aufs2
    6.27 +		cd $WOK/$PACKAGE
    6.28  	fi
    6.29 -	# this is to make linux-source added aufs2
    6.30 -	cp -a $AUFSDIR $WOK/$PACKAGE/aufs2
    6.31 -	cd $AUFSDIR
    6.32 -	cp -a Documentation fs include $src
    6.33 -	cp -a *.patch ../stuff
    6.34 +	cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src
    6.35 +	cp -a $AUFSDIR/*.patch $WOK/$PACKAGE/stuff
    6.36  	# We need the real GNU patch
    6.37  	[ -L /usr/bin/patch ] && tazpkg get-install patch --forced
    6.38  	cd $src
    6.39  	# SliTaz db
    6.40 -	rm -rf slitaz 2> /dev/null
    6.41 +	[ -d slitaz ] && rm -rf slitaz 2> /dev/null
    6.42  	mkdir slitaz
    6.43  	echo "$WGET_URL" > slitaz/url
    6.44  	cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
    6.45 @@ -66,7 +67,6 @@
    6.46  $PACKAGE-freeinitrd-$VERSION.u
    6.47  aufs2-base.patch
    6.48  aufs2-standalone.patch
    6.49 -aufs2-kbuild.patch
    6.50  aufs2-module-2.6.36.patch
    6.51  aufs2-2.6.36-fix.patch
    6.52  EOT
    6.53 @@ -158,6 +158,6 @@
    6.54  	#rm -rf aufs2
    6.55  	rm stuff/aufs2-base*
    6.56  	rm stuff/aufs2-standalone*
    6.57 -	rm stuff/aufs2-kbuild*
    6.58 +	#rm stuff/aufs2-kbuild*
    6.59  	rm -rf stuff/tmp
    6.60  }