Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 150798 Details for
Bug 219034
[sunrise-overlay] sys-fs/aufs-20080422 ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
ebuild for sys-fs/aufs-20080422
aufs-20080422.ebuild (text/plain), 7.79 KB, created by
Austen Dicken
on 2008-04-24 06:20:34 UTC
(
hide
)
Description:
ebuild for sys-fs/aufs-20080422
Filename:
MIME Type:
Creator:
Austen Dicken
Created:
2008-04-24 06:20:34 UTC
Size:
7.79 KB
patch
obsolete
># 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/${P}.tar.bz2" > >LICENSE="GPL-2" >SLOT="0" >KEYWORDS="~amd64 ~x86" >IUSE="debug fuse hinotify nfs nfsexport robr sec_perm" > >S="${WORKDIR}"/aufs > >MODULE_NAMES="aufs(misc:${S})" > >check_patch() { > 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 > > # Check if the user wants to use loopback mounts in aufs > #if use loopback && kernel_is ge 2 6 23 ; then > # APPLY_SPLICE_PATCH="n" > # if ! grep -qs "EXPORT_SYMBOL(do_splice_from);" "${KV_DIR}/fs/splice.c" \ > # && ! grep -qs "EXPORT_SYMBOL(do_splice_to);" "${KV_DIR}/fs/splice.c" ; then > # APPLY_SPLICE_PATCH="y" > # APPLY_KERNEL_PATCH="y" > # fi > #fi > > # Check if the user wants to use nfs mounts as aufs branches > #if use nfs && kernel_is ge 2 6 19 ; then > # APPLY_PUT_FILP_PATCH="n" > # if ! grep -qs "EXPORT_SYMBOL(put_filp);" "${KV_DIR}/fs/file_table.c" ; then > # APPLY_PUT_FILP_PATCH="y" > # APPLY_KERNEL_PATCH="y" > # fi > # > # > # APPLY_LHASH_PATCH="n" > # 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}/include/linux/namei.h" || \ > # grep -qs "struct dentry *__lookup_hash(struct qstr *name, struct dentry *base, struct nameidata *nd);" "${KV_DIR}/include/linux/namei.h" ) ; then > # APPLY_LHASH_PATCH="y" > # APPLY_KERNEL_PATCH="y" > # if kernel_is ge 2 6 25 ; then > # LHASH_PATCH_NAME="lhash-2.6.25" > # elif kernel_is ge 2 6 22 && kernel_is le 2 6 24 ; then > # LHASH_PATCH_NAME="lhash-2.6.22" > # else > # LHASH_PATCH_NAME="lhash" > # fi > # fi > #fi > > # Check if the user wants to enable ksize optimization > #if use ksize && kernel_is lt 2 6 22 ; then > # APPLY_KSIZE_PATCH="n" > # if ! grep -qs "EXPORT_SYMBOL(ksize);" "${KV_DIR}/mm/slab.c" ; then > # APPLY_KSIZE_PATCH="y" > # APPLY_KERNEL_PATCH="y" > # fi > #fi > > # Check if the user wants to deny write access to running executables > #if use deny_write && kernel_is ge 2 6 17 ; then > # APPLY_DENY_WRITE_PATCH="n" > # if ! grep -qs "EXPORT_SYMBOL(deny_write_access);" "${KV_DIR}/fs/namei.c" ; then > # APPLY_DENY_WRITE_PATCH="y" > # APPLY_KERNEL_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_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 > > # If the splice patch has to be applied > #if [[ ${APPLY_SPLICE_PATCH} == "y" ]] ; then > # epatch "${FILESDIR}"/${P}-splice-2.6.23.patch > #fi > > # If the put_filp patch is to be applied > #if [[ ${APPLY_PUT_FILP_PATCH} == "y" ]] ; then > # epatch "${FILESDIR}"/${P}-put_filp.patch > #fi > > # If the lhash patch is to be applied > #if [[ ${APPLY_LHASH_PATCH} == "y" ]] ; then > # epatch "${FILESDIR}"/${P}-${LHASH_PATCH_NAME}.patch > #fi > > # If the ksize patch is to be applied > #if [[ ${APPLY_KSIZE_PATCH} == "y" ]] ; then > # epatch "${FILESDIR}"/${P}-ksize.patch > #fi > > # If the deny_write patch is to be applied > #if [[ ${APPLY_DENY_WRITE_PATCH} == "y" ]] ; then > # epatch "${FILESDIR}"/${P}-deny_write.patch > #fi > fi > > linux-mod_pkg_setup >} > >src_unpack(){ > unpack ${A} > cd "${S}" > > # > # Below we declare all of our patches that have been applied to the kernel > # > > # Enable sec_perm Patch in priv_def.mk > if use sec_perm ; then > echo "CONFIG_AUFS_SEC_PERM_PATCH = y" >> priv_def.mk || die "setting sec_perm in priv_def.mk failed!" > fi > > # Enable splice Patch in priv_def.mk > #if use loopback ; then > # echo "CONFIG_AUFS_SPLICE_PATCH = y" >> priv_def.mk || die "setting splice in priv_def.mk failed!" > #fi > > # Enable put_filp / lhash Patch in priv_def.mk > #if use nfs ; then > # echo "CONFIG_AUFS_PUT_FILP_PATCH = y" >> priv_def.mk || die "setting put_filp in priv_def.mk failed!" > # echo "CONFIG_AUFS_LHASH_PATCH = y" >> priv_def.mk || die "setting lhash in priv_def.mk failed!" > #fi > > # Enable ksize Patch in priv_dev.mk > #if use ksize && kernel_is lt 2 6 22; then > # echo "CONFIG_AUFS_KSIZE_PATCH = y" >> priv_def.mk || die "setting ksize in priv_dev.mk failed!" > #fi > > # Enable deny_write Patch in priv_dev.mk > #if use deny_write ; then > # echo "CONFIG_AUFS_DENY_WRITE_ACCESS_PATCH = y" >> priv_def.mk || die "setting deny_write in priv_dev.mk failed!" > #fi > > # > # Now we set various config options for AUFS > # > > # 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 > > # Disable fake nameidata for NFS filesystems > if use nfs ; then > echo "CONFIG_AUFS_FAKE_DM = " >> priv_def.mk || die "setting fake_dm 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 >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 219034
:
150710
|
150712
|
150714
|
150756
| 150798 |
150802