diff options
author | Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> | 2007-04-14 20:50:33 +0000 |
---|---|---|
committer | Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> | 2007-04-14 20:50:33 +0000 |
commit | 94a6bc64502f9b1b6a7a88771e721c83b516d890 (patch) | |
tree | 698d609f52987dce38c58bc40f00f49acf23cd7f /sys-fs | |
parent | new USE flags 'hinotify' and 'nfsexport' for sys-fs/aufs (diff) | |
download | sunrise-94a6bc64502f9b1b6a7a88771e721c83b516d890.tar.gz sunrise-94a6bc64502f9b1b6a7a88771e721c83b516d890.tar.bz2 sunrise-94a6bc64502f9b1b6a7a88771e721c83b516d890.zip |
sys-fs/aufs: New aufs (Another Union FS) ebuild
svn path=/sunrise/; revision=3427
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/aufs/ChangeLog | 5 | ||||
-rw-r--r-- | sys-fs/aufs/Manifest | 6 | ||||
-rw-r--r-- | sys-fs/aufs/aufs-20070402.ebuild | 161 | ||||
-rw-r--r-- | sys-fs/aufs/files/aufs-20070402-ksize.patch | 7 | ||||
-rw-r--r-- | sys-fs/aufs/files/aufs-20070402-lhash.patch | 41 |
5 files changed, 219 insertions, 1 deletions
diff --git a/sys-fs/aufs/ChangeLog b/sys-fs/aufs/ChangeLog index d0a6f7981..23f77f991 100644 --- a/sys-fs/aufs/ChangeLog +++ b/sys-fs/aufs/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 14 Apr 2007; Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> + +aufs-20070402.ebuild, +files/aufs-20070402-ksize.patch, + +files/aufs-20070402-lhash.patch: + New aufs (Another Union FS) ebuild + 12 Mar 2007; Jakub Moc <jakub@gentoo.org> aufs-20070212.ebuild: Fix up the postinst/postrm checks a bit diff --git a/sys-fs/aufs/Manifest b/sys-fs/aufs/Manifest index 7cd2cf2ae..5c2107dab 100644 --- a/sys-fs/aufs/Manifest +++ b/sys-fs/aufs/Manifest @@ -1,6 +1,10 @@ AUX aufs-20070212-ksize.patch 215 RMD160 aface602421301ed1e226194e9f8457f4a9dffd5 SHA1 d39db4cb4472b3dce1072d96c4f3198939b26bbe SHA256 0b50c428e0a23d825320c4b7960e3e8ead11fdb274ab92e927e0a86663f0a7a2 AUX aufs-20070212-lhash.patch 1707 RMD160 17589fed81c0602db71e8937279200658e3bbc66 SHA1 f9e3d5eb25df9bf0ace036deaf0c1c75be9f514a SHA256 6a963eb4e5fa08357b6ff3d6c02ed0a04c7b5abffdb1c9d9f0435ed988821965 +AUX aufs-20070402-ksize.patch 215 RMD160 aface602421301ed1e226194e9f8457f4a9dffd5 SHA1 d39db4cb4472b3dce1072d96c4f3198939b26bbe SHA256 0b50c428e0a23d825320c4b7960e3e8ead11fdb274ab92e927e0a86663f0a7a2 +AUX aufs-20070402-lhash.patch 1707 RMD160 17589fed81c0602db71e8937279200658e3bbc66 SHA1 f9e3d5eb25df9bf0ace036deaf0c1c75be9f514a SHA256 6a963eb4e5fa08357b6ff3d6c02ed0a04c7b5abffdb1c9d9f0435ed988821965 DIST aufs-20070212.tar.bz2 104534 RMD160 3c6fedfba3f2bbc2733c758c413994e62aeccf17 SHA1 e35d678d8c4afeb1096c667dbb4db5a0030e1641 SHA256 dfa512bb1f2aaa415c17e15b205fc94e5895f3b178c905341634090267ac80af +DIST aufs-20070402.tar.bz2 120097 RMD160 13f3a1cc7a581b1b96255262af01d90c3f601a22 SHA1 496b01279214d0a5836498ea233176e3424a3280 SHA256 c11e7c5835196873a60ac3ccae147ba4941239a0bee23beec8747bc95997eb62 EBUILD aufs-20070212.ebuild 3313 RMD160 59503ceb514c834aa8f86a5ce55c887f53c748f3 SHA1 b235e47d93a9ddcbf11dd5fb58e77cd0c206a95a SHA256 556ad1a09c52688c014ed83be215e50d9673367bd52f226b3d33d0308e02222e -MISC ChangeLog 1050 RMD160 e1fa982cd02f1915ed3cc1c938871a1737c3fc2f SHA1 4984037bffd304d0ca567f2aa18ea888732c9e83 SHA256 1827f255b21dc7717edd6452572db30ac68b4abb88c7b23c9e28dd7da6ab2305 +EBUILD aufs-20070402.ebuild 4154 RMD160 e844b04e0706a30b5233c5ec844013f2ec375628 SHA1 ea9f83a2489c750b627ea3119b51a4769152bbe4 SHA256 d81ee97366e52b9b184c247c6e6627fa79da996aee10f33e3ccc03a056f832be +MISC ChangeLog 1251 RMD160 4184caac29a2d228a1620f320113086d3ce69fe9 SHA1 ebc5d1857878ce8d5773b13573120846cf8b4c4f SHA256 3bc344ed54787919e7b464da0a49a1dd399a44f49a01f130748b74c726e75b2e MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 diff --git a/sys-fs/aufs/aufs-20070402.ebuild b/sys-fs/aufs/aufs-20070402.ebuild new file mode 100644 index 000000000..43ed222d3 --- /dev/null +++ b/sys-fs/aufs/aufs-20070402.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2007 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://www.fh-kl.de/~torsten.kockler/gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="hinotify ksize nfs nfsexport" + +MODULE_NAMES="aufs(addon/fs/${PN}:)" +BUILD_PARAMS="KDIR=${KV_DIR} -f local.mk" +BUILD_TARGETS="all" + +check_patch() { + get_version + + # Check if ksize Patch has to be applied + if use ksize + then + APPLY_KSIZE_PATCH="n" + # If ksize patch is not applied + if ! grep -qs "EXPORT_SYMBOL(ksize);" "${KV_DIR}/mm/slab.c" ; then + APPLY_KSIZE_PATCH="y" + fi + fi + + # Check if lhash Patch has to be applied + if use nfs && kernel_is ge 2 6 19 + then + APPLY_LHASH_PATCH="n" + # If lhash patch is not applied + if ! grep -qs "EXPORT_SYMBOL(__lookup_hash);" "${KV_DIR}/fs/namei.c" \ + && ! grep -qs "struct dentry * __lookup_hash(struct qstr *name, struct dentry + * base, struct nameidata *nd);" "${KV_DIR}/fs/namei.h" ; then + APPLY_LHASH_PATCH="y" + fi + fi +} + +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 + + check_patch + + # If a patch has to be applied + if [[ ${APPLY_KSIZE_PATCH} == "y" ]] || [[ ${APPLY_LHASH_PATCH} == "y" ]] + then + ewarn "Patching your kernel..." + cd ${KV_DIR} + fi + + # If the ksize patch has to be applied + if [[ ${APPLY_KSIZE_PATCH} == "y" ]] ; then + epatch "${FILESDIR}"/${P}-ksize.patch + fi + + # If the lhash patch has to be applied + if [[ ${APPLY_LHASH_PATCH} == "y" ]] ; then + epatch "${FILESDIR}"/${P}-lhash.patch + fi + + linux-mod_pkg_setup +} + +src_unpack(){ + unpack ${A} + cd "${S}" + + # Enable ksize Patch in priv_def.mk + if use ksize + then + echo "CONFIG_AUFS_KSIZE_PATCH = y" >> priv_def.mk || die "setting ksize in priv_def.mk failed!" + fi + + # Enable lhash Patch in priv_def.mk + if use nfs && kernel_is ge 2 6 19 + then + echo "CONFIG_AUFS_LHASH_PATCH = y" >> priv_def.mk || die "setting lhash in priv_def.mk failed!" + fi + + # 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 + + # 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 nfsexport 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 + + # 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_install() { + 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" + + # Tell the user to recompile his kernel + if [[ ${APPLY_KSIZE_PATCH} == "y" ]] || [[ ${APPLY_LHASH_PATCH} == "y" ]] ; then + echo + ewarn "Remember to re-compile your kernel to make the patch(es) work" + ewarn + fi + + linux-mod_pkg_postinst +} + +pkg_prerm() { + built_with_use -o =${CATEGORY}/${PF} ksize nfs && DO_CHECK="y" +} + + +pkg_postrm() { + # Tell the user that his kernel has already been patched + if [[ DO_CHECK == "y" ]] ; then + check_patch + if [[ ${APPLY_KSIZE_PATCH} == "n" ]] || [[ ${APPLY_LHASH_PATCH} == "n" ]] ; then + ewarn "Your kernel has been patched previously by this ebuild." + ewarn "You can undo the patches by executing the following:" + echo + ewarn "cd ${KV_DIR}; make mrproper, re-emerge and re-compile your kernel - ${KV_FULL}" + fi + fi + + linux-mod_pkg_postrm +} diff --git a/sys-fs/aufs/files/aufs-20070402-ksize.patch b/sys-fs/aufs/files/aufs-20070402-ksize.patch new file mode 100644 index 000000000..2b92800d9 --- /dev/null +++ b/sys-fs/aufs/files/aufs-20070402-ksize.patch @@ -0,0 +1,7 @@ +--- mm/slab.c 9 Apr 2006 01:09:51 -0000 1.1 ++++ mm/slab.c 9 Apr 2006 01:10:33 -0000 1.2 +@@ -3861,3 +3861,4 @@ unsigned int ksize(const void *objp) + + return obj_size(virt_to_cache(objp)); + } ++EXPORT_SYMBOL(ksize); diff --git a/sys-fs/aufs/files/aufs-20070402-lhash.patch b/sys-fs/aufs/files/aufs-20070402-lhash.patch new file mode 100644 index 000000000..ddcd872bf --- /dev/null +++ b/sys-fs/aufs/files/aufs-20070402-lhash.patch @@ -0,0 +1,41 @@ +Index: fs/namei.c +=================================================================== +RCS file: linux-2.6.19/fs/namei.c,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -u -p -r1.1 -r1.3 +--- fs/namei.c 1 Dec 2006 11:38:24 -0000 1.1 ++++ fs/namei.c 8 Dec 2006 07:47:33 -0000 1.3 +@@ -1251,7 +1251,7 @@ int __user_path_lookup_open(const char _ + * needs parent already locked. Doesn't follow mounts. + * SMP-safe. + */ +-static struct dentry * __lookup_hash(struct qstr *name, struct dentry * base, struct nameidata *nd) ++struct dentry * __lookup_hash(struct qstr *name, struct dentry * base, struct nameidata *nd) + { + struct dentry * dentry; + struct inode *inode; +@@ -2761,6 +2761,7 @@ EXPORT_SYMBOL(follow_up); + EXPORT_SYMBOL(get_write_access); /* binfmt_aout */ + EXPORT_SYMBOL(getname); + EXPORT_SYMBOL(lock_rename); ++EXPORT_SYMBOL(__lookup_hash); + EXPORT_SYMBOL(lookup_one_len); + EXPORT_SYMBOL(page_follow_link_light); + EXPORT_SYMBOL(page_put_link); +Index: include/linux/namei.h +=================================================================== +RCS file: linux-2.6.19/include/linux/namei.h,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -u -p -r1.1 -r1.3 +--- include/linux/namei.h 1 Dec 2006 11:38:24 -0000 1.1 ++++ include/linux/namei.h 8 Dec 2006 07:47:33 -0000 1.3 +@@ -76,6 +76,7 @@ extern struct file *lookup_instantiate_f + extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); + extern void release_open_intent(struct nameidata *); + ++struct dentry * __lookup_hash(struct qstr *name, struct dentry * base, struct nameidata *nd); + extern struct dentry * lookup_one_len(const char *, struct dentry *, int); + + extern int follow_down(struct vfsmount **, struct dentry **); |