commit:     63e535e4195c4429b6de6e385b504e5c13de8dce
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 20:30:29 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 20:34:35 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63e535e4

sys-fs/aufs3: Version Bump

Package-Manager: portage-2.3.2
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 sys-fs/aufs3/Manifest                 |   1 +
 sys-fs/aufs3/aufs3-3_p20160822.ebuild | 185 ++++++++++++++++++++++++++++++++++
 2 files changed, 186 insertions(+)

diff --git a/sys-fs/aufs3/Manifest b/sys-fs/aufs3/Manifest
index 0085254..dcfae5d 100644
--- a/sys-fs/aufs3/Manifest
+++ b/sys-fs/aufs3/Manifest
@@ -2,3 +2,4 @@ DIST aufs3-standalone-3_p20160219.tar.xz 3256736 SHA256 
23652c6d8fd12a9a29454293
 DIST aufs3-standalone-3_p20160223.tar.xz 3270932 SHA256 
4e213e678991a028595893a2c3425894bef021cd374a6798f80ad8863bf7f593 SHA512 
37805b54a2471def5948d3484349de7bfc4fee09788b36b9589aba2006484cf330bb642f27862d74a528999cf2e7fa4888b5d46b54bb3e7f8468c6857f34730f
 WHIRLPOOL 
1e42d1a32a62b25923041b8f71b00f8ae1a8b8524752b1d796ae2fd2ada79792cbe2a35ad380e24ecad8374bbd432674763d69ffa9144dfc3074742b33d4d138
 DIST aufs3-standalone-3_p20160627.tar.xz 3443904 SHA256 
1802aa5232780f2840efc8cdd85b74081632b2f9e83e97de0a89a607887710ee SHA512 
6c6256d5f042dbcde26abfb665fdfd8eee4193104fc3270371fdf503a560dd888b5306e3cfe4c6a1f95cd669b41279573dfc54aec8b5b5327220fa055bbbdb3d
 WHIRLPOOL 
88b5768910562c0c9eb28796d1031d85a68123f0ab43427355f2bb8b64a1a409aacc89be9ca77aeffd92b18524827c40826c02ef545c24cffcfe03d94eb913a8
 DIST aufs3-standalone-3_p20160815.tar.xz 3501932 SHA256 
83982c675faf4fa0bcd64b1f95de9cbba09e4b90da3294af1e8218214d384df7 SHA512 
502a1516e0e9f307a9e29669799f9572b225b38ed7c790130bd9d9c01fcb83d2bf81ca5d27136827b595838e9ee42544d9be130bf632be6a61cdf7e07d0f9676
 WHIRLPOOL 
6d7df7051f287dc6cc847ef817e28f9401f22b874fcbfa7f4fccaf0e8d9dfe8bc7ac3834c1494ffe3da473e6bf36abee8cfd1eeeaed4d13c03fe18318470586a
+DIST aufs3-standalone-3_p20160822.tar.xz 3515768 SHA256 
77d79912c66913e584a746b1f1aea8708eb8190522d2473e13582251a6e33a69 SHA512 
b3f6dc4883f565f73a81ff3aaf90bdca41419fe506c16b027e471e9901dce83a1e4d7a217574b686389433e2d7b280a53c0dbe805fad709f83cd5a689a53cc13
 WHIRLPOOL 
92a39bdf00ef7cc6f854e0823f784b0577709d84b07f8db1457be5f75bf0c102626ff62d38f57658253bf619b71f45070904275b1987ed9dd53c17ff25d3439c

diff --git a/sys-fs/aufs3/aufs3-3_p20160822.ebuild 
b/sys-fs/aufs3/aufs3-3_p20160822.ebuild
new file mode 100644
index 00000000..6e88f13
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20160822.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo-r1 
toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=18
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/";
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/aufs3-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/aufs4"
+
+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 3 ${KERN_MIN_VER} 0 && \
+               die "the kernel version isn't supported by upstream anymore. 
Please upgrade."
+       kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+       linux-mod_pkg_setup
+
+       if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+               PATCH_BRANCH="x-rcN"
+       elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "25" ]]; then
+               PATCH_BRANCH="${KV_MINOR}".25+
+       elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+               PATCH_BRANCH="${KV_MINOR}".1+
+       else
+               PATCH_BRANCH="${KV_MINOR}"
+       fi
+
+       case ${KV_EXTRA} in
+                       "")
+                               elog "It seems you are using vanilla-sources 
with aufs3"
+                               elog "Please use sys-kernel/aufs-sources with 
USE=vanilla"
+                               elog "This will save you the nasty reemerge of 
sys-fs/aufs3 on every kernel upgrade"
+                       ;;
+                       "-gentoo")
+                               elog "It seems you are using gentoo-sources 
with aufs3"
+                               elog "Please use sys-kernel/aufs-sources"
+                               elog "This will save you the nasty reemerge of 
sys-fs/aufs3 on every kernel upgrade"
+                       ;;
+       esac
+
+       pushd "${T}" &> /dev/null || die
+       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
+
+       use pax_kernel && epatch "${FILESDIR}"/pax-3.11.patch
+
+       sed \
+               -e "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" \
+               -i 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
+
+       use doc && dodoc -r Documentation
+
+       use kernel-patch || \
+               doins 
"${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+       dodoc \
+               Documentation/filesystems/aufs/README \
+               "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+       linux-mod_pkg_postinst
+}

Reply via email to