diff options
author | Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> | 2007-03-12 14:35:35 +0000 |
---|---|---|
committer | Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> | 2007-03-12 14:35:35 +0000 |
commit | e5d7adc68b0bdfd08c8c0be7f5d8ccdefe39d968 (patch) | |
tree | de6272a3dc4ec6fc39edda1a367bd62ca261d99f /sys-fs/aufs | |
parent | net-mail/policyd-weight: New Ebuild for bug 169646 (diff) | |
download | sunrise-e5d7adc68b0bdfd08c8c0be7f5d8ccdefe39d968.tar.gz sunrise-e5d7adc68b0bdfd08c8c0be7f5d8ccdefe39d968.tar.bz2 sunrise-e5d7adc68b0bdfd08c8c0be7f5d8ccdefe39d968.zip |
sys-fs/aufs: Fixed a bug using the lhash and ksize kernel patch
svn path=/sunrise/; revision=3208
Diffstat (limited to 'sys-fs/aufs')
-rw-r--r-- | sys-fs/aufs/ChangeLog | 5 | ||||
-rw-r--r-- | sys-fs/aufs/Manifest | 24 | ||||
-rw-r--r-- | sys-fs/aufs/aufs-20070212.ebuild | 132 | ||||
-rw-r--r-- | sys-fs/aufs/files/aufs-20070212-ksize.patch | 7 | ||||
-rw-r--r-- | sys-fs/aufs/files/aufs-20070212-lhash.patch | 41 | ||||
-rw-r--r-- | sys-fs/aufs/files/digest-aufs-20070212 | 2 |
6 files changed, 162 insertions, 49 deletions
diff --git a/sys-fs/aufs/ChangeLog b/sys-fs/aufs/ChangeLog index c570c07dd..6d4caaedc 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: $ + 12 Mar 2007; Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> + aufs-20070212.ebuild, +files/aufs-20070212-ksize.patch, + +files/aufs-20070212-lhash.patch: + Fixed a bug using the lhash and ksize kernel patch + 14 Feb 2007; Torsten Kockler (conbart) <torsten.kockler@fh-kl.de> aufs-20070212.ebuild: Changed Variablename to , changed ! kernel_is gt to kernel_is lt diff --git a/sys-fs/aufs/Manifest b/sys-fs/aufs/Manifest index ade8692d6..34ee294aa 100644 --- a/sys-fs/aufs/Manifest +++ b/sys-fs/aufs/Manifest @@ -1,4 +1,24 @@ +AUX aufs-20070212-ksize.patch 215 RMD160 aface602421301ed1e226194e9f8457f4a9dffd5 SHA1 d39db4cb4472b3dce1072d96c4f3198939b26bbe SHA256 0b50c428e0a23d825320c4b7960e3e8ead11fdb274ab92e927e0a86663f0a7a2 +MD5 86d3030cbfec1be4a5404ff407c924fa files/aufs-20070212-ksize.patch 215 +RMD160 aface602421301ed1e226194e9f8457f4a9dffd5 files/aufs-20070212-ksize.patch 215 +SHA256 0b50c428e0a23d825320c4b7960e3e8ead11fdb274ab92e927e0a86663f0a7a2 files/aufs-20070212-ksize.patch 215 +AUX aufs-20070212-lhash.patch 1707 RMD160 17589fed81c0602db71e8937279200658e3bbc66 SHA1 f9e3d5eb25df9bf0ace036deaf0c1c75be9f514a SHA256 6a963eb4e5fa08357b6ff3d6c02ed0a04c7b5abffdb1c9d9f0435ed988821965 +MD5 e0c6997335b63a90fa03957f617d2046 files/aufs-20070212-lhash.patch 1707 +RMD160 17589fed81c0602db71e8937279200658e3bbc66 files/aufs-20070212-lhash.patch 1707 +SHA256 6a963eb4e5fa08357b6ff3d6c02ed0a04c7b5abffdb1c9d9f0435ed988821965 files/aufs-20070212-lhash.patch 1707 DIST aufs-20070212.tar.bz2 104534 RMD160 3c6fedfba3f2bbc2733c758c413994e62aeccf17 SHA1 e35d678d8c4afeb1096c667dbb4db5a0030e1641 SHA256 dfa512bb1f2aaa415c17e15b205fc94e5895f3b178c905341634090267ac80af -EBUILD aufs-20070212.ebuild 2074 RMD160 9066b0cbe7953386df210f5d5badb53f5dcf8e5b SHA1 289e031162367b34edf6f677f15491654f9e3ed9 SHA256 b3c6b7aef61cfdf8844c5d6c0027abe73fb12475f3ea7fb363bc19069de26a9a -MISC ChangeLog 725 RMD160 9a67d065094b7d7f4540bd65f08f9d5107267302 SHA1 6e5e5877380a50b9ac457e8f85a516afe02a1b1d SHA256 358f1f04a1f195033107588ccfeb6eb25eaab18a91c0a96eb838c760944696d0 +EBUILD aufs-20070212.ebuild 3179 RMD160 68ff58cc3fed009cfa286e8a9bac6c0ad33e5cab SHA1 fe63c92529821b249aa1fcd233a66304c53f327e SHA256 4aaebc1ae94eed4a78f4dfc69ae4cfcef9743d9e0ccb3ec230c9e8b0000f6f3c +MD5 4065cb2a2e5cb8a06e1896090d24c120 aufs-20070212.ebuild 3179 +RMD160 68ff58cc3fed009cfa286e8a9bac6c0ad33e5cab aufs-20070212.ebuild 3179 +SHA256 4aaebc1ae94eed4a78f4dfc69ae4cfcef9743d9e0ccb3ec230c9e8b0000f6f3c aufs-20070212.ebuild 3179 +MISC ChangeLog 941 RMD160 68c00bae868b32e9fa41556bf8dda3f610dd5ffa SHA1 ae8f86f4703bc9ff358cbe42b4b31226dc0ac745 SHA256 a7e82358e8408305fcd41f74f9c0636292f80188d8f2762dd4920bc092c03c87 +MD5 6c604764bf8c0fa9a4ebe94e440bfb1a ChangeLog 941 +RMD160 68c00bae868b32e9fa41556bf8dda3f610dd5ffa ChangeLog 941 +SHA256 a7e82358e8408305fcd41f74f9c0636292f80188d8f2762dd4920bc092c03c87 ChangeLog 941 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 +MD5 1e678929a9fec6632e227bdf2262e9a1 metadata.xml 170 +RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 metadata.xml 170 +SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 metadata.xml 170 +MD5 4b8d7e5daef1ea3895f95dae7c7d1802 files/digest-aufs-20070212 178 +RMD160 0d4e2fe956628572b56bd4b8d6ee347ac777136f files/digest-aufs-20070212 178 +SHA256 e445f1f133873826071dedec738892d941e278f39c5f74b53ba13effab838947 files/digest-aufs-20070212 178 diff --git a/sys-fs/aufs/aufs-20070212.ebuild b/sys-fs/aufs/aufs-20070212.ebuild index 33e4e0b37..e07d3e9c1 100644 --- a/sys-fs/aufs/aufs-20070212.ebuild +++ b/sys-fs/aufs/aufs-20070212.ebuild @@ -4,7 +4,7 @@ inherit eutils linux-mod -DESCRIPTION="Another Unionfs is an entirely re-designed and re-implemented Unionfs." +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" @@ -17,20 +17,77 @@ MODULE_NAMES="aufs(addon/fs/${PN}:)" BUILD_PARAMS="KDIR=${KV_DIR} -f local.mk" BUILD_TARGETS="all" -pkg_setup(){ +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 - eerror "Aufs is being developed and tested on linux-2.6.16 and later." + 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!" - eerror 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 local.mk + if use ksize + then + sed -i -e 's/^#CONFIG_AUFS_KSIZE_PATCH/CONFIG_AUFS_KSIZE_PATCH/g' local.mk || die "Sed failed!" + fi + + # Enable lhash Patch in local.mk + if use nfs && kernel_is ge 2 6 19 + then + sed -i -e 's/^#CONFIG_AUFS_LHASH_PATCH/CONFIG_AUFS_LHASH_PATCH/g' local.mk || die "Sed failed!" + fi + +} + src_install() { exeinto /sbin exeopts -m0500 @@ -40,51 +97,32 @@ 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" - # ksize Patch - if use ksize + linux-mod_pkg_postinst +} + +pkg_postrm() { + check_patch + + # Tell the user that his kernel has already been patched + if [[ ${APPLY_KSIZE_PATCH} == "n" ]] || [[ ${APPLY_LHASH_PATCH} == "n" ]] then - # Check if Kernel is already patched - if grep -qs "EXPORT_SYMBOL(ksize);" "${KV_DIR}/mm/slab.c" - then - einfo "Your kernel has already been patched for ksize" - else - # Patch kernel - cd "${KV_DIR}" - epatch "${S}/ksize.patch" - ewarn - ewarn - ewarn "You have to recompile your kernel to make ksize work" - ewarn - fi + 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 and re-emerge your kernel - ${KV_FULL}" fi - # lhash Patch - if use nfs && kernel_is ge 2 6 19 + # Tell the user to recompile his kernel + if [[ ${APPLY_KSIZE_PATCH} == "y" ]] || [[ ${APPLY_LHASH_PATCH} == "y" ]] then - # Check if kernel is already patched - 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 - einfo "Your kernel has already been patched for lhash" - else - # Patch kernel - cd "${KV_DIR}" - epatch "${S}/lhash.patch" - ewarn - ewarn - ewarn "You have to recompile your kernel to make the lhash patch for nfs-support work" - ewarn - fi + echo + ewarn "Remember to re-compile your kernel to make the patch(es) work" + ewarn fi - linux-mod_pkg_postinst - - einfo - einfo "To be able to use aufs, you have to load the kernel module by typing:" - einfo "modprobe aufs" - einfo - einfo "For further information refer to the aufs man page" - einfo + linux-mod_pkg_postrm } diff --git a/sys-fs/aufs/files/aufs-20070212-ksize.patch b/sys-fs/aufs/files/aufs-20070212-ksize.patch new file mode 100644 index 000000000..2b92800d9 --- /dev/null +++ b/sys-fs/aufs/files/aufs-20070212-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-20070212-lhash.patch b/sys-fs/aufs/files/aufs-20070212-lhash.patch new file mode 100644 index 000000000..ddcd872bf --- /dev/null +++ b/sys-fs/aufs/files/aufs-20070212-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 **); diff --git a/sys-fs/aufs/files/digest-aufs-20070212 b/sys-fs/aufs/files/digest-aufs-20070212 new file mode 100644 index 000000000..98459e593 --- /dev/null +++ b/sys-fs/aufs/files/digest-aufs-20070212 @@ -0,0 +1,2 @@ +RMD160 3c6fedfba3f2bbc2733c758c413994e62aeccf17 aufs-20070212.tar.bz2 104534 +SHA256 dfa512bb1f2aaa415c17e15b205fc94e5895f3b178c905341634090267ac80af aufs-20070212.tar.bz2 104534 |