# HG changeset patch # User Christopher Rogers # Date 1289955542 0 # Node ID 35a10ca4f67bf2a2b3fc1f79043b2e129865dc64 # Parent 552f2703e5ffd2abed3e233384d8ba0e179a52ad 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. diff -r 552f2703e5ff -r 35a10ca4f67b aufs-utils/receipt --- a/aufs-utils/receipt Wed Nov 17 00:27:36 2010 +0000 +++ b/aufs-utils/receipt Wed Nov 17 00:59:02 2010 +0000 @@ -5,7 +5,7 @@ CATEGORY="system-tools" SHORT_DESC="The aufs utils." MAINTAINER="pankso@slitaz.org" -DEPENDS="linux-aufs" +DEPENDS="aufs" BUILD_DEPENDS="git linux-module-headers" WEB_SITE="http://aufs.sourceforge.net/" diff -r 552f2703e5ff -r 35a10ca4f67b aufs/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aufs/receipt Wed Nov 17 00:59:02 2010 +0000 @@ -0,0 +1,75 @@ +# SliTaz package receipt. + +PACKAGE="aufs" +VERSION="20101116" +CATEGORY="base-system" +SHORT_DESC="aufs2 kernel module" +MAINTAINER="slaxemulator@gmail.com" +DEPENDS="linux" +BUILD_DEPENDS="linux-module-headers git" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://aufs.sf.net/" +PROVIDE="linux-aufs" + +# Rules to configure and make the package. +compile_rules() +{ + local AUFSDIR="$PACKAGE-$VERSION" + TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz + if [ -f $TARBALL ]; then + tar xzf $TARBALL + cd $AUFSDIR && git checkout origin/aufs2 + else + # Aufs2 from git repository + git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR + tar czf $TARBALL $AUFSDIR + cd $AUFSDIR && git checkout origin/aufs2 + fi + cd $src + + sed -i 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_BRANCH_MAX_1023 =.*|CONFIG_AUFS_BRANCH_MAX_1023 = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_HNOTIFY =.*|CONFIG_AUFS_HNOTIFY = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_HFSNOTIFY =.*|CONFIG_AUFS_HFSNOTIFY = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \ + config.mk || return 1 + sed -i 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \ + config.mk || return 1 + + patch -Np1 -i ../stuff/aufs2-module-2.6.36.patch + #make KDIR=/usr/src/linux clean + make KDIR=/usr/src/linux +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + EXTRAVERSION=_$KERNEL_VERSION + mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs + lzma e $src/fs/aufs/aufs.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz + chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz + chown 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/fs/aufs/aufs.ko.gz +} + +post_install() +{ + echo "Processing post-install commands..." + chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz +} + +post_remove() +{ + echo "Processing post-remove commands..." + depmod -a +} \ No newline at end of file diff -r 552f2703e5ff -r 35a10ca4f67b aufs/stuff/aufs2-module-2.6.36.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aufs/stuff/aufs2-module-2.6.36.patch Wed Nov 17 00:59:02 2010 +0000 @@ -0,0 +1,47 @@ +diff --git a/ubuntu/aufs/branch.c b/ubuntu/aufs/branch.c +index cd4463c..ff6b158 100644 +--- a/fs/aufs/branch.c ++++ b/fs/aufs/branch.c +@@ -22,6 +22,8 @@ + + #include + #include ++#include ++#include + #include "aufs.h" + + /* +@@ -851,7 +853,8 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) + goto out; + + /* no need file_list_lock() since sbinfo is locked? defered? */ +- list_for_each_entry(file, &sb->s_files, f_u.fu_list) { ++ lg_global_lock(files_lglock); ++ do_file_list_for_each_entry(sb, file) { + if (special_file(file->f_dentry->d_inode->i_mode)) + continue; + +@@ -861,6 +864,7 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) + err = -EBUSY; + FiMustNoWaiters(file); + fi_read_unlock(file); ++ lg_global_unlock(files_lglock); + goto out_free; + } + +@@ -889,10 +893,13 @@ static int au_br_mod_files_ro(struct super_block *sb, aufs_bindex_t bindex) + if (p) { + a = p; + a[n++] = hf; +- } else ++ } else { ++ lg_global_unlock(files_lglock); + goto out_free; ++ } + } +- } ++ } while_file_list_for_each_entry; ++ lg_global_unlock(files_lglock); + + err = 0; + if (n) diff -r 552f2703e5ff -r 35a10ca4f67b linux-aufs/receipt --- a/linux-aufs/receipt Wed Nov 17 00:27:36 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="linux-aufs" -VERSION="2.6.36" -CATEGORY="base-system" -SHORT_DESC="The Linux kernel aufs2 module." -MAINTAINER="devel@slitaz.org" -DEPENDS="linux" -WANTED="linux" -WEB_SITE="http://www.kernel.org/" - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - local path - path=lib/modules/$VERSION-slitaz/kernel - mkdir -p $fs/$path - export src - export _pkg - $src/slitaz/list_modules.sh fs/aufs | while read module; do - dir=$path/$(dirname $module) - [ -d $fs/$dir ] || mkdir -p $fs/$dir - cp -a $_pkg/$path/$module $fs/$dir - done -} - -# Post install/remove commands for Tazpkg. -post_install() -{ - chroot "$1/" depmod -a $VERSION-slitaz -} - -post_remove() -{ - depmod -a $VERSION-slitaz -} diff -r 552f2703e5ff -r 35a10ca4f67b linux-source/receipt --- a/linux-source/receipt Wed Nov 17 00:27:36 2010 +0000 +++ b/linux-source/receipt Wed Nov 17 00:59:02 2010 +0000 @@ -12,8 +12,8 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - local _AUFSVER="20101105" - local AUFSDIR="aufs2-${_AUFSVER}-${VERSION}" + local _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + local AUFSDIR="aufs-${_AUFSVER}" mkdir -p $fs/usr/src/kernel-patches \ $fs/lib/modules/$VERSION-slitaz \ $fs/usr/bin diff -r 552f2703e5ff -r 35a10ca4f67b linux/receipt --- a/linux/receipt Wed Nov 17 00:27:36 2010 +0000 +++ b/linux/receipt Wed Nov 17 00:59:02 2010 +0000 @@ -21,29 +21,30 @@ #do # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i #done - local _AUFSVER="20101105" - local AUFSDIR="aufs2-${_AUFSVER}-${VERSION}" - [ -d "AUFSDIR" ] && rm -rf $AUFSDIR + local _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + local AUFSDIR="aufs-${_AUFSVER}" TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz - if [ -f $TARBALL ]; then + if [ -d $WOK/aufs/$AUFSDIR ]; then + local AUFSDIR=$WOK/aufs/$AUFSDIR + ln -sf $AUFSDIR aufs-${_AUFSVER} + elif [ -f $TARBALL ]; then tar xzf $TARBALL cd $AUFSDIR && git checkout origin/aufs2 + cd $WOK/$PACKAGE else # Aufs2 from git repository git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR tar czf $TARBALL $AUFSDIR - cd $AUFSDIR && git checkout origin/aufs2 + cd $AUFSDIR && git checkout origin/aufs2 + cd $WOK/$PACKAGE fi - # this is to make linux-source added aufs2 - cp -a $AUFSDIR $WOK/$PACKAGE/aufs2 - cd $AUFSDIR - cp -a Documentation fs include $src - cp -a *.patch ../stuff + cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src + cp -a $AUFSDIR/*.patch $WOK/$PACKAGE/stuff # We need the real GNU patch [ -L /usr/bin/patch ] && tazpkg get-install patch --forced cd $src # SliTaz db - rm -rf slitaz 2> /dev/null + [ -d slitaz ] && rm -rf slitaz 2> /dev/null mkdir slitaz echo "$WGET_URL" > slitaz/url cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz @@ -66,7 +67,6 @@ $PACKAGE-freeinitrd-$VERSION.u aufs2-base.patch aufs2-standalone.patch -aufs2-kbuild.patch aufs2-module-2.6.36.patch aufs2-2.6.36-fix.patch EOT @@ -158,6 +158,6 @@ #rm -rf aufs2 rm stuff/aufs2-base* rm stuff/aufs2-standalone* - rm stuff/aufs2-kbuild* + #rm stuff/aufs2-kbuild* rm -rf stuff/tmp }