summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-fs/aufs4
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-fs/aufs4')
-rw-r--r--sys-fs/aufs4/Manifest8
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150420.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150504.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150511.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150518.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150525.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150608.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150622.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150629.ebuild164
-rw-r--r--sys-fs/aufs4/files/README.gentoo20
-rw-r--r--sys-fs/aufs4/files/pax-4.patch89
-rw-r--r--sys-fs/aufs4/metadata.xml17
12 files changed, 1446 insertions, 0 deletions
diff --git a/sys-fs/aufs4/Manifest b/sys-fs/aufs4/Manifest
new file mode 100644
index 000000000000..b8cb5aa210d3
--- /dev/null
+++ b/sys-fs/aufs4/Manifest
@@ -0,0 +1,8 @@
+DIST aufs4-standalone-0_pre20150420.tar.xz 424400 SHA256 7d96ee8bb16a4b72d60bfbab2955f5e68aec5a01d61a0a4870bb90f69099ad0f SHA512 71e460c582591861a1042fe628b186f081581f61fef61ccdc1ddb98ae7ee289ae58922c9df1549109f4351c8de3858fb3b2eb040f7e1da488f05f5b954468311 WHIRLPOOL f6b324404a62b465cd8a2d677000c4b4c7f951fa502f7ed6e5634d4a39dc90bb87e245a7f7036379a02d8e7f8a9fc64801c33e86ceb747b63912b8509d68a925
+DIST aufs4-standalone-0_pre20150504.tar.xz 466636 SHA256 b14bba141ead117ff9193a8a896a2bcefc418e11e642eb8547d4785833d70261 SHA512 c1299eb6ca179e60e60be2f7792001e2277f9507fd416994abd41c43e066be46ea508eaface45740153e4c34ccfcdcb3aa6a6118c840786fb1abf5aa56d6cc63 WHIRLPOOL 37bf469947c8ef5e0724e37fa40ec9535ff4065f81e64d45d924c16bb1d059d526ae853d0a73cd67de2aeacd3c41444a3a51545e9a12d08c0b8b27b526fa4dff
+DIST aufs4-standalone-0_pre20150511.tar.xz 501548 SHA256 a26e5e684c1878d0bd8e18c512979a6d0cccd9b1c8219746fe3d93ab1448f1be SHA512 da123ea8da38c840de76201284bf6846d794421e38e6193206ac753380eab3ecea33724c23c7b25d62f933c0c3d1e67082d17c1e702eefdb24c722808b88a69d WHIRLPOOL c7d2c81119933a55f0aa357fbc840f4a60597144386150c45260f2c7b99a0722d362595558df4b0db146c0fe65fb6886b002186e15a5e8cea00b3a04075a5500
+DIST aufs4-standalone-0_pre20150518.tar.xz 515624 SHA256 e2c2aeb02dce4f2b15da8459e92e90896c0fc795d6df829e2cab4eb2a82174a1 SHA512 4188d4d7928e1ee8ce88a7a079ee75c0ab9695c3e23db66952ff9d276ad3cfa5dbed1585dabe05856c5f3417d436fa3a1f93645ee68ebaa65a21610de8e34aca WHIRLPOOL 013672a12293ffe9067013d0295f6d797fafafa9f1ca49eb37a831fb77addac52dee804b9c809eadf4d18205a81e419be0b0b273d875a0f04e657498ccf95af8
+DIST aufs4-standalone-0_pre20150525.tar.xz 523720 SHA256 39abd01774e92eb717af89c57797601073c9237554d7e29ec509c7f61629a1e5 SHA512 3856eb2ca8bef3f0f54a8ea87ddb97c367cb96b10efff68b6edda7be1ec95a87742e1328e3d15f2c7a578659c9017187263c4e5371b602448d7ab5defdce43c2 WHIRLPOOL b5a91d900910bab24ccd01cc7b9626fd23cc92fdaf054f669e0fe2cefb5784065703b422a69379eda85d36c63cb8e9dc3a8018cdd277a85bab6886e68c62d60a
+DIST aufs4-standalone-0_pre20150608.tar.xz 532144 SHA256 8aaa1f348de3b6cfa86f21539d0ec44e5d0d18c27f0645719e3140462522a4e7 SHA512 1abd663b5f7997b93a865bf478c2900a3f69aff1d25149be683f8fd0f7362eaeccb7cdd9ce91ff08d1c4f2660414e03b7c9170fb7818c0839176b94c720d2896 WHIRLPOOL 36fa2691e8f5f27be41463c67df10d0e467892151e50df6f8396293c2572ad3d9229f00302bc47d816b48a08bdb64c92926381ba9d00c150dfb9f445dba8aeeb
+DIST aufs4-standalone-0_pre20150622.tar.xz 543932 SHA256 28de7f6968c62a48b78f4b6c9234dd4b7b134632e1d4e7d50e87da9e05c06343 SHA512 82f130ed3b43e2bfe42079c96dca70e868d7ce1df5511f68e7b85d343105d452c334fe7a15c1cd4e01450ca39dd527123c060b98b396d13c4250541ec464c2fc WHIRLPOOL e46a01857f2cbd52e6a3717bc5d076197443146fa9eab3b542aeb2698da652a45e8d40e1f9f50d9d4c3fc34d9a6da225712ac32f27f15eded4e8e3f23e113de8
+DIST aufs4-standalone-0_pre20150629.tar.xz 547808 SHA256 7c1d9a815c73e8cb1c9f909eee8f6945486c8e8feeea9cae4b3865b6032f17e5 SHA512 b7c734fb83515790b58a81b904acb286ef52124e0799dad1c7900dc8af3e0dc6f2875ba86805f1f39b8d04ce6660bf0c0307e4bbc1b58f2ca6171ead5e668a94 WHIRLPOOL b39f2cdeffd20b636c4a3aa5ec8e87cd6b1c8bdfdab071d1cabf53e10629beebffc919abf5fc90915ec0c14f4b4c45a510bbd303765564348a0e2d1688ddf79b
diff --git a/sys-fs/aufs4/aufs4-0_pre20150420.ebuild b/sys-fs/aufs4/aufs4-0_pre20150420.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150420.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150504.ebuild b/sys-fs/aufs4/aufs4-0_pre20150504.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150504.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150511.ebuild b/sys-fs/aufs4/aufs4-0_pre20150511.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150511.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150518.ebuild b/sys-fs/aufs4/aufs4-0_pre20150518.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150518.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150525.ebuild b/sys-fs/aufs4/aufs4-0_pre20150525.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150525.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150608.ebuild b/sys-fs/aufs4/aufs4-0_pre20150608.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150608.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150622.ebuild b/sys-fs/aufs4/aufs4-0_pre20150622.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150622.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150629.ebuild b/sys-fs/aufs4/aufs4-0_pre20150629.ebuild
new file mode 100644
index 000000000000..382aafeef0a1
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150629.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=1
+# highest supported version
+KERN_MAX_VER=2
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/files/README.gentoo b/sys-fs/aufs4/files/README.gentoo
new file mode 100644
index 000000000000..64dfe94b4bda
--- /dev/null
+++ b/sys-fs/aufs4/files/README.gentoo
@@ -0,0 +1,20 @@
+There several other patches in aufs3. They are all
+optional. When you meet some problems, they will help you. You can find them
+in the documentation directory.
+
+ - aufs3-loopback.patch
+ Supports a nested loopback mount in a branch-fs. This patch is
+ unnecessary until aufs produces a message such like "you may want to try
+ another patch for loopback file".
+
+ - vfs-ino.patch
+ Modifies a system global kernel internal function get_next_ino() in
+ order to stop assigning 0 for an inode-number. Not directly related to
+ aufs, but recommended generally.
+
+ - tmpfs-idr.patch
+ Keeps the tmpfs inode number as the lowest value. Effective to reduce
+ the size of aufs XINO files for tmpfs branch. Also it prevents the
+ duplication of inode number, which is important for backup
+ tools, aubrsync or other utilities. When you find aufs XINO files for
+ tmpfs branch growing too much, try this patch.
diff --git a/sys-fs/aufs4/files/pax-4.patch b/sys-fs/aufs4/files/pax-4.patch
new file mode 100644
index 000000000000..cf216a5708ca
--- /dev/null
+++ b/sys-fs/aufs4/files/pax-4.patch
@@ -0,0 +1,89 @@
+--- a/fs/aufs/dynop.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/dynop.c 2012-10-09 15:41:58.562989820 -0400
+@@ -149,9 +149,11 @@
+ #define DySet(func, dst, src, h_op, h_sb) do { \
+ DyDbgInc(cnt); \
+ if (h_op->func) { \
+- if (src.func) \
+- dst.func = src.func; \
+- else \
++ if (src.func) { \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
++ } else \
+ AuDbg("%s %s\n", au_sbtype(h_sb), #func); \
+ } \
+ } while (0)
+@@ -159,7 +161,9 @@
+ #define DySetForce(func, dst, src) do { \
+ AuDebugOn(!src.func); \
+ DyDbgInc(cnt); \
+- dst.func = src.func; \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
+ } while (0)
+
+ #define DySetAop(func) \
+@@ -266,15 +270,17 @@
+ */
+ static void dy_adx(struct au_dyaop *dyaop, int do_dx)
+ {
++ pax_open_kernel();
+ if (!do_dx) {
+- dyaop->da_op.direct_IO = NULL;
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.direct_IO = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ } else {
+- dyaop->da_op.direct_IO = aufs_aop.direct_IO;
+- dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
++ *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO;
++ *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
+ if (!dyaop->da_get_xip_mem)
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ }
++ pax_close_kernel();
+ }
+
+ static struct au_dyaop *dy_aget(struct au_branch *br,
+--- a/fs/aufs/f_op_sp.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/f_op_sp.c 2012-10-09 15:41:58.562989820 -0400
+@@ -104,7 +104,7 @@
+ static int aufs_open_sp(struct inode *inode, struct file *file);
+ static struct au_sp_fop {
+ int done;
+- struct file_operations fop; /* not 'const' */
++ file_operations_no_const fop; /* not 'const' */
+ spinlock_t spin;
+ } au_sp_fop[AuSp_Last] = {
+ [AuSp_FIFO] = {
+@@ -157,8 +157,10 @@
+ h_file = au_hf_top(file);
+ spin_lock(&p->spin);
+ if (!p->done) {
+- p->fop = *h_file->f_op;
++ pax_open_kernel();
++ memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop));
+ p->fop.owner = THIS_MODULE;
++ pax_close_kernel();
+ if (p->fop.aio_read)
+ p->fop.aio_read = aufs_aio_read_sp;
+ if (p->fop.aio_write)
+--- a/fs/aufs/sysfs.c 2013-10-20 17:08:37.000000000 -0400
++++ b/fs/aufs/sysfs.c 2013-10-19 17:08:29.000000000 -0400
+@@ -233,8 +233,10 @@
+ for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) {
+ attr = &br_sysfs->attr;
+ sysfs_attr_init(attr);
+- attr->name = br_sysfs->name;
+- attr->mode = S_IRUGO;
++ pax_open_kernel();
++ *(void **)&attr->name = br_sysfs->name;
++ *(void **)&attr->mode = S_IRUGO;
++ pax_close_kernel();
+ br_sysfs++;
+ }
+ }
diff --git a/sys-fs/aufs4/metadata.xml b/sys-fs/aufs4/metadata.xml
new file mode 100644
index 000000000000..078f0414d465
--- /dev/null
+++ b/sys-fs/aufs4/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="debug">Enable additional debugging support</flag>
+ <flag name="hfs">Enable hfs support</flag>
+ <flag name="fuse">Enable fuse support</flag>
+ <flag name="inotify">Enable inotify support</flag>
+ <flag name="kernel-patch">Patch the current kernel for aufs3 support</flag>
+ <flag name="nfs">Enable support for nfs export</flag>
+ <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag>
+ <flag name="ramfs">Enable initramfs/rootfs support</flag>
+ </use>
+</pkgmetadata>