Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sys-fs/aufs-9999 ebuild
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message

Joined: 21 Oct 2005
Posts: 202
Location: Ottawa, Canada

PostPosted: Mon Sep 01, 2008 3:43 pm    Post subject: sys-fs/aufs-9999 ebuild Reply with quote

Here it is, based off of aufs-20080422 in the sunrise overlay. Make sure to mask all the aufs-200* ebuilds first.

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $ /var/cvsroot/gentoo-x86/sys-fs/aufs/aufs-9999.ebuild

inherit eutils linux-mod cvs


DESCRIPTION="An entirely re-designed and re-implemented Unionfs."

KEYWORDS="~amd64 ~x86"
IUSE="debug fuse hinotify nfsexport robr"



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"

   if kernel_is ge 2 6 24 && linux_chkconfig_present "SECURITY" ; then
      if ! grep -qs "EXPORT_SYMBOL(security_inode_permission);" "${KV_DIR}/security/security.c" ; then

      # make sure the user is allowing this to happen
      if [[ APPLY_SEC_PERM_PATCH="y" ]] ; then
         eerror "${PN} requires that all kernels with CONFIG_SECURITY enabled >= 2.6.24"
         eerror "be patched.  Please enable visit ${HOMEPAGE} and read"
         eerror "about the sec_perm patch to enable ${PN} support."
         die "Invalid kernel configuration, we won't compile if CONFIG_SECURITY is enabled"


        cvs_src_unpack || die
   cd "${S}"

   # Enable hinotify in
   if use hinotify && kernel_is ge 2 6 18 ; then
      echo "CONFIG_AUFS_HINOTIFY = y" >> || die "setting hinotify in failed!"

   # Disable SYSAUFS for kernel less than 2.6.18
   if kernel_is lt 2 6 18 ; then
      echo "CONFIG_AUFS_SYSAUFS = " >> || die "unsetting sysaufs in failed!"

   # Enable nfsexport in
   if use nfsexport && kernel_is ge 2 6 18 ; then
      echo "CONFIG_AUFS_EXPORT = y" >> || die "setting export in failed!"

   # Enable aufs readonly-branch in
   if use robr ; then
      echo "CONFIG_AUFS_ROBR = y" >> || die "setting robr in failed!"

   # Enable FUSE workaround for AUFS
   if use fuse ; then
      echo "CONFIG_AUFS_WORKAROUND_FUSE = y" >> || die "setting workaround_fuse in failed!"

   # Enable / Disable debugging
   if use debug ; then
      echo "CONFIG_AUFS_DEBUG = y" >> || die "setting debug in failed!"
      echo "CONFIG_AUFS_DEBUG = " >> || die "setting debug in failed!"

   # 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" >> || die "setting vserver in failed!"

src_compile() {
   use x86 && ARCH=i386
   use amd64 && ARCH=x86_64
   emake KDIR=${KV_DIR} SUBLEVEL=${KV_PATCH} -f || die "emake failed"

src_install() {
   cd util
   exeinto /sbin
   exeopts -m0500
   doexe mount.aufs umount.aufs auplink aulchown
   doman aufs.5

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"

Back to top
View user's profile Send private message

Joined: 22 Nov 2006
Posts: 449
Location: Ohio

PostPosted: Fri Sep 05, 2008 2:27 am    Post subject: Reply with quote

You might want to post this ebuild to bugzilla for inclusion in the overlay.
while(true) std::cout << "Jesus I trust in you." << std::endl;
My Political Compass
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum