# HG changeset patch # User Pascal Bellard # Date 1389521795 0 # Node ID f1460f6086ccadb41126334fb92aa12162880c98 # Parent 30aba2976e24bf9d17ed6dba9259feae053db97f Add aufs diff -r 30aba2976e24 -r f1460f6086cc aufs-utils/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aufs-utils/receipt Sun Jan 12 10:16:35 2014 +0000 @@ -0,0 +1,35 @@ +# SliTaz package receipt. + +PACKAGE="aufs-utils" +VERSION="20130311" +CATEGORY="system-tools" +SHORT_DESC="The aufs utils." +MAINTAINER="pankso@slitaz.org" +LICENSE="GPL2" +TARBALL="$PACKAGE-$VERSION.tar.bz2" +WEB_SITE="http://aufs.sourceforge.net/" +WGET_URL="git|git://aufs.git.sourceforge.net/gitroot/aufs/aufs-util.git" +BRANCH="origin/aufs3.0" + +DEPENDS="aufs" +BUILD_DEPENDS="git linux-module-headers aufs" + +# Rules to configure and make the package. +compile_rules() +{ + KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + cd $src + sed -i 's|.*AUFS_XINO_TRUNC_|// &|' c2tmac.c + sed -i 's/-m 644 -T/-m 644/' Makefile + make && + make DESTDIR=$DESTDIR install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $install/sbin $fs + cp -a $install/usr/bin $fs/usr +} + diff -r 30aba2976e24 -r f1460f6086cc aufs-utils/stuff/fix-kdir.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aufs-utils/stuff/fix-kdir.patch Sun Jan 12 10:16:35 2014 +0000 @@ -0,0 +1,64 @@ +diff --git a/Makefile b/Makefile +index dc1ba7a..239a21b 100644 +--- a/Makefile ++++ b/Makefile +@@ -15,21 +15,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +-ifndef KDIR +-KDIR = /lib/modules/$(shell uname -r)/build +-endif +-ifneq "t" "$(shell test -e ${KDIR}/include/linux/stddef.h && echo t)" +-$(error incorrect KDIR) +-endif +- +-ifndef ARCH +-ARCH := $(shell uname -m) +-endif +-ARCH := $(shell echo ${ARCH} | sed -e 's/_64$$//') +-ArchDir = ${KDIR}/arch/${ARCH}/include +- +-CFLAGS += -I${KDIR}/include -I./libau +-CFLAGS += $(shell test -d ${ArchDir} && echo -I${ArchDir}) ++CFLAGS += -I./libau + CFLAGS += -O -Wall + + Cmd = umount.aufs auchk aubrsync +diff --git a/README b/README +index f1240e5..a95196d 100644 +--- a/README ++++ b/README +@@ -9,17 +9,21 @@ And these are not for aufs1 essentially, except aubrsync. See below in + detail. + + Makefile in this tree has some customizable make-variables. +-- KDIR +- specify your kernel source path if necessary. +- Note: this path should point kernel _source_ path, instead of kernel +- _build_ path. Don't confuse with the path in "make O=" when you +- build a kernel in a different dir. +-- CPPFLAGS or ARCH +- specify the include path to your aufs2-standalone tree, if necessary. +- the makefile finds the correct ${KDIR}/arch/${ARCH}/include dir and +- sets the include path to CPPFLAGS="-I...". if the logic in Makefile is +- poor and doesn't support your build environment, then set the +- variables directly. ++- CPPFLAGS ++ specify the include path if necessary. ++ Some of linux kernel header files are necessary including ++ linux/aufs_type.h. If you have installed kernel header files to ++ /usr/include, then you may not need to specify CPPFLAGS. ++ Otherwise you need to do something like this sample. ++ + run "make headers_install" in your kernel source tree, and ++ $LinuxSrc/usr/include is created and header files are installed ++ there. ++ + if you build aufs2 as module from aufs2-standalone.git, then ++ $Aufs2Stdalone/usr/include is created and header files are ++ installed there. ++ + and specify ++ CPPFLAGS="-I $LinuxSrc/usr/include -I $Aufs2Stdalone/usr/include" ++ + - DESTDIR + specify your install path if necessary. + some commands have to be installed under /sbin. diff -r 30aba2976e24 -r f1460f6086cc aufs/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aufs/receipt Sun Jan 12 10:16:35 2014 +0000 @@ -0,0 +1,74 @@ +# SliTaz package receipt. + +PACKAGE="aufs" +VERSION="20130311" +CATEGORY="base-system" +SHORT_DESC="aufs3 kernel module" +MAINTAINER="slaxemulator@gmail.com" +LICENSE="GPL2" +WEB_SITE="http://aufs.sf.net/" +PROVIDE="linux-aufs" +TARBALL="$PACKAGE-$VERSION.tar.bz2" +WGET_URL="git|git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git" +BRANCH="origin/${PACKAGE}3.2" +COOK_OPT="!remove_src" + +DEPENDS="linux" +BUILD_DEPENDS="linux-module-headers git xz" + +# Rules to configure and make the package. +compile_rules() +{ + 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_32767 =.*|CONFIG_AUFS_BRANCH_MAX_32767 = 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 + + # The sed fixes are from gentoo portage build. + sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile + sed -i "s:__user::g" include/linux/aufs_type.h + make -j 1 KDIR=/usr/src/linux + xz -f fs/aufs/aufs.ko +} + +# 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'` + BASEVER=${KERNEL_VERSION:0:3} + EXTRAVERSION=_$BASEVER + mkdir -p $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs + cp $src/fs/aufs/aufs.ko.xz $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs/ + chown root $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs/aufs.ko.xz + chmod 0644 $fs/lib/modules/$BASEVER-slitaz/kernel/fs/aufs/aufs.ko.xz + install -D -m 644 $src/include/linux/aufs_type.h \ + $fs/usr/include/linux/aufs_type.h +} + +post_install() +{ + echo "Processing post-install commands..." + chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz +} + +post_remove() +{ + echo "Processing post-remove commands..." + chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz +} diff -r 30aba2976e24 -r f1460f6086cc 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 Sun Jan 12 10:16:35 2014 +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 30aba2976e24 -r f1460f6086cc linux/receipt --- a/linux/receipt Sun Jan 12 10:13:45 2014 +0000 +++ b/linux/receipt Sun Jan 12 10:16:35 2014 +0000 @@ -2,7 +2,6 @@ PACKAGE="linux" VERSION="3.2.53" -_AUFSVER="20130311" KBASEVER="${VERSION:0:3}" CATEGORY="base-system" SHORT_DESC="The Linux kernel and modules." @@ -86,7 +85,7 @@ # Check for Aufs and cook it if unbuilt. echo "Checking for Aufs packages..." - #_AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` if [ -x /usr/bin/cook ]; then # Give info an redirect to /dev/null since aufs got it own log. AUFSDIR=$WOK/aufs/source/aufs-${_AUFSVER}