summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Sachau <tommy@gentoo.org>2008-12-08 20:25:28 +0000
committerThomas Sachau <tommy@gentoo.org>2008-12-08 20:25:28 +0000
commitd1feba784805513a69eb9176cdddc22bda9547dd (patch)
tree6887f42914adf684b7539b6741474f0f4b1dfe5a
parentdev-cpp/libcwd: fix for src_install as pointed out in bug 18587 (diff)
downloadsunrise-d1feba784805513a69eb9176cdddc22bda9547dd.tar.gz
sunrise-d1feba784805513a69eb9176cdddc22bda9547dd.tar.bz2
sunrise-d1feba784805513a69eb9176cdddc22bda9547dd.zip
sys-fs/aufs: Version bump, needs some more testing before removing old version
svn path=/sunrise/; revision=7467
-rw-r--r--sys-fs/aufs/ChangeLog4
-rw-r--r--sys-fs/aufs/Manifest7
-rw-r--r--sys-fs/aufs/aufs-20081208.ebuild143
-rw-r--r--sys-fs/aufs/files/aufs-20081208-sec_perm-2.6.24.patch16
-rw-r--r--sys-fs/aufs/metadata.xml2
5 files changed, 170 insertions, 2 deletions
diff --git a/sys-fs/aufs/ChangeLog b/sys-fs/aufs/ChangeLog
index 99fb1b718..400a7076a 100644
--- a/sys-fs/aufs/ChangeLog
+++ b/sys-fs/aufs/ChangeLog
@@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 08 Dec 2008; Thomas Sachau (Tommy[D]) <tommy@gentoo.org>
+ +aufs-20081208.ebuild, +files/aufs-20081208-sec_perm-2.6.24.patch:
+ Version bump, needs some more testing before removing old version
+
25 Sep 2008; Thomas Sachau (Tommy[D]) <tommy@gentoo.org>
aufs-20080422.ebuild:
Hopefully fix sec_perm check
diff --git a/sys-fs/aufs/Manifest b/sys-fs/aufs/Manifest
index af970356e..c1a1918af 100644
--- a/sys-fs/aufs/Manifest
+++ b/sys-fs/aufs/Manifest
@@ -1,9 +1,12 @@
AUX aufs-20070402-ksize.patch 215 RMD160 aface602421301ed1e226194e9f8457f4a9dffd5 SHA1 d39db4cb4472b3dce1072d96c4f3198939b26bbe SHA256 0b50c428e0a23d825320c4b7960e3e8ead11fdb274ab92e927e0a86663f0a7a2
AUX aufs-20070402-lhash.patch 1707 RMD160 17589fed81c0602db71e8937279200658e3bbc66 SHA1 f9e3d5eb25df9bf0ace036deaf0c1c75be9f514a SHA256 6a963eb4e5fa08357b6ff3d6c02ed0a04c7b5abffdb1c9d9f0435ed988821965
AUX aufs-20080207-disable_security_inode_permission.patch 457 RMD160 9e7b8f0cc39c77c66f8242852f44fefc392e7ae4 SHA1 8be3cb23ab7324f071fa4a59b46ad451f7cfbb4b SHA256 8ea77586169e90019d959d81f7905690929664e69028cedcb60f450447e3b8c8
+AUX aufs-20081208-sec_perm-2.6.24.patch 666 RMD160 b71e4e7d78117e771b266f662168d46165eb53a7 SHA1 a423dac8e518e641e4164ec281a57b36de4ec9e5 SHA256 2a05bc16d50fc2429efca20c9d557e2ec4147a97dbb8934d492a0b10f48ccd33
DIST aufs-20070402.tar.bz2 120097 RMD160 13f3a1cc7a581b1b96255262af01d90c3f601a22 SHA1 496b01279214d0a5836498ea233176e3424a3280 SHA256 c11e7c5835196873a60ac3ccae147ba4941239a0bee23beec8747bc95997eb62
DIST aufs-20080422.tar.bz2 286548 RMD160 6c13e75c476322fc9b1c87689af521617c3131a3 SHA1 866267b877284b0bf92958d471190dad1f861d73 SHA256 1694e699e141a6a1dc9f1eb2678e765af6041b7386d3c32aefb360024fdc5faf
+DIST aufs-20081208.tar.bz2 325134 RMD160 430a916c70d4777f272eb722e74c730f6f490072 SHA1 03d5316b0f46f9f5f464f76f9de4a21398d46f0a SHA256 8f6174115ceb5e4cf3b8269bf718cd79a7faa57d71cc41f3ecd07dcad5c22475
EBUILD aufs-20070402.ebuild 4164 RMD160 0a206413b832bf09a117376abd48b7c463ef7011 SHA1 34d1891a98809fbb85dfa2964f209dff769c3d0f SHA256 188bfd0d3be8d118c35354a89a5a171c80bd0f0ed72a32acd5526d712294b113
EBUILD aufs-20080422.ebuild 3333 RMD160 17e24bbe788af492cf81f13fd9bda4ba0422b8c7 SHA1 a543abb0035c69b9a9778d0f4a746d95b56abe39 SHA256 0ca7d1c2a16cd74cc6494618953667130486e414d92987bbf87c4bd31920c61c
-MISC ChangeLog 4458 RMD160 0e91deb4cdb2c3950ebfd664b9ddf0c16463a73d SHA1 1283b7ae1f4df8022b23d5cd4f10b800e88607ad SHA256 208b72ef39bf8da8f7333320c43ece7ec45bdd689085a5ffb89b51ae4dd48152
-MISC metadata.xml 591 RMD160 93ae10fc73b4bb53a698eb05eeed427b7a13671d SHA1 46138c65121b0b023c363337839a0f2a7313d024 SHA256 de01003733a1300ce6d1a8872bca3023d0fb4ecd6c217175242de98cf43bbaeb
+EBUILD aufs-20081208.ebuild 4196 RMD160 0bb9c01ffa227e61f6a6649f67d50e9aa28099b5 SHA1 3e1189ff1fb88d1c7d2a726b0d5dc55080e5f0eb SHA256 0e5bdd1049a9f8c48a0879e9b5c304063f3dbe17be6b1ca47867ccfa1b9d7099
+MISC ChangeLog 4655 RMD160 338037f44d722eb43cecb20ca61efe842f3bec90 SHA1 2859df0c857f15078894669ae3ae151a09390386 SHA256 d6ac02e43fdbc315c83e0a838b2870899ed3db04a14cb4d9691393ff7236f0e7
+MISC metadata.xml 678 RMD160 2fdbd569a4c3145a8b7e66c8e155df5c684c8491 SHA1 9acd92f53094809071ee0bdcea60b583ed110189 SHA256 135218bc612707a4cb1a0b35303657f0f1978b78cab135c2e756102069e76b09
diff --git a/sys-fs/aufs/aufs-20081208.ebuild b/sys-fs/aufs/aufs-20081208.ebuild
new file mode 100644
index 000000000..054f97a4e
--- /dev/null
+++ b/sys-fs/aufs/aufs-20081208.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils linux-mod
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs."
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentooexperimental.org/~tommy/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug fuse hinotify nfsexport robr sec_perm"
+
+S="${WORKDIR}"/aufs
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ # kernel version check
+ if kernel_is lt 2 6 16 ; then
+ eerror "${PN} is being developed and tested on linux-2.6.16 and later."
+ eerror "Make sure you have a proper kernel version!"
+ die "Wrong kernel version"
+ fi
+
+ get_version
+
+ # assume no kernel patches will be applied today
+ APPLY_KERNEL_PATCH="n"
+
+ # Check if sec_perm patch needs to be applied
+ if kernel_is ge 2 6 24 && linux_chkconfig_present "SECURITY" ; then
+ APPLY_SEC_PERM_PATCH="n"
+ if ! grep -qs "EXPORT_SYMBOL(security_inode_permission);" "${KV_DIR}/security/security.c" ; then
+ APPLY_SEC_PERM_PATCH="y"
+ APPLY_KERNEL_PATCH="y"
+ fi
+
+ # make sure the user is allowing this to happen
+ if [[ APPLY_SEC_PERM_PATCH = "y" ]] && ! use sec_perm; then
+ eerror "${PN} requires that all kernels with CONFIG_SECURITY enabled >= 2.6.24"
+ eerror "be patched. Please enable USE=\"sec_perm\" to allow this patch to be"
+ eerror "applied."
+ die "Invalid configuration"
+ fi
+ # Also check to make sure they aren't enabling it when they don't need to
+ else
+ if use sec_perm ; then
+ eerror "${PN} does not require the sec_perm patch to be applied to your kernel."
+ eerror "Please disabe the sec_perm USE flag: USE=\"-sec_perm\"."
+ die "Invalid configuration"
+ fi
+ fi
+
+ # If a patch has to be applied
+ if [[ ${APPLY_KERNEL_PATCH} == "y" ]] ; then
+ ewarn "Patching your kernel..."
+ cd ${KV_DIR}
+
+ # If the sec_perm patch has to be applied
+ if [[ ${APPLY_SEC_PERM_PATCH} == "y" ]] ; then
+ epatch "${FILESDIR}"/${P}-sec_perm-2.6.24.patch
+ fi
+
+ fi
+
+ linux-mod_pkg_setup
+}
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+
+ # Enable hinotify in priv_def.mk
+ if use hinotify && kernel_is ge 2 6 18 ; then
+ echo "CONFIG_AUFS_HINOTIFY = y" >> priv_def.mk || die "setting hinotify in priv_def.mk failed!"
+ fi
+
+ # Disable SYSAUFS for kernel less than 2.6.18
+ if kernel_is lt 2 6 18 ; then
+ echo "CONFIG_AUFS_SYSAUFS = " >> priv_def.mk || die "unsetting sysaufs in priv_def.mk failed!"
+ fi
+
+ # Enable nfsexport in priv_def.mk
+ if use nfsexport && kernel_is ge 2 6 18 ; then
+ echo "CONFIG_AUFS_EXPORT = y" >> priv_def.mk || die "setting export in priv_def.mk failed!"
+ fi
+
+ # Enable aufs readonly-branch in priv_def.mk
+ if use robr ; then
+ echo "CONFIG_AUFS_ROBR = y" >> priv_def.mk || die "setting robr in priv_def.mk failed!"
+ fi
+
+ # Enable FUSE workaround for AUFS
+ if use fuse ; then
+ echo "CONFIG_AUFS_WORKAROUND_FUSE = y" >> priv_def.mk || die "setting workaround_fuse in priv_def.mk failed!"
+ fi
+
+ # Enable / Disable debugging
+ if use debug ; then
+ echo "CONFIG_AUFS_DEBUG = y" >> priv_def.mk || die "setting debug in priv_dev.mk failed!"
+ else
+ echo "CONFIG_AUFS_DEBUG = " >> priv_def.mk || die "setting debug in priv_dev.mk failed!"
+ fi
+
+ # Check if a vserver-kernel is installed
+ if [[ -e ${KV_DIR}/include/linux/vserver ]] ; then
+ einfo "vserver kernel seems to be installed"
+ einfo "using vserver patch"
+ echo "AUFS_DEF_CONFIG = -DVSERVER" >> priv_def.mk || die "setting vserver in priv_def.mk failed!"
+ fi
+}
+
+src_compile() {
+ use x86 && ARCH=i386
+ use amd64 && ARCH=x86_64
+ emake KDIR=${KV_DIR} SUBLEVEL=${KV_PATCH} -f local.mk || die "emake failed"
+}
+
+src_install() {
+ cd util
+ exeinto /sbin
+ exeopts -m0500
+ doexe mount.aufs umount.aufs auplink aulchown
+ doman aufs.5
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ elog "To be able to use aufs, you have to load the kernel module by typing:"
+ elog "modprobe aufs"
+ elog "For further information refer to the aufs man page"
+
+ if use sec_perm ; then
+ ewarn "Your kernel has been patched in order to export security"
+ ewarn "permissions. You will need to recompile your kernel with"
+ ewarn "this new patch in order for ${PN} to function."
+ fi
+
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs/files/aufs-20081208-sec_perm-2.6.24.patch b/sys-fs/aufs/files/aufs-20081208-sec_perm-2.6.24.patch
new file mode 100644
index 000000000..de9b29949
--- /dev/null
+++ b/sys-fs/aufs/files/aufs-20081208-sec_perm-2.6.24.patch
@@ -0,0 +1,16 @@
+Index: linux-2.6.24-rc3/security/security.c
+===================================================================
+RCS file: /ext1/sysadm/transparent/repository/linux-2.6.24-rc3/security/security.c,v
+retrieving revision 1.1
+retrieving revision 1.2
+diff -u -p -r1.1 -r1.2
+--- linux-2.6.24-rc3/security/security.c 21 Nov 2007 13:03:11 -0000 1.1
++++ linux-2.6.24-rc3/security/security.c 21 Nov 2007 13:07:55 -0000 1.2
+@@ -409,6 +409,7 @@ int security_inode_permission(struct ino
+ return 0;
+ return security_ops->inode_permission(inode, mask, nd);
+ }
++EXPORT_SYMBOL(security_inode_permission);
+
+ int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
+ {
diff --git a/sys-fs/aufs/metadata.xml b/sys-fs/aufs/metadata.xml
index 980db3f54..6c48536ac 100644
--- a/sys-fs/aufs/metadata.xml
+++ b/sys-fs/aufs/metadata.xml
@@ -11,5 +11,7 @@
aufs via nfs</flag>
<flag name='fuse'>Enable FUSE workaround</flag>
<flag name='robr'>Enable aufs readonly-branch</flag>
+ <flag name='sec_perm'>Enable patch for kernel with CONFIG_SECURITY
+ enabled</flag>
</use>
</pkgmetadata>