Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/aufs4/
Date: Mon, 28 Sep 2015 06:09:50
Message-Id: 1443420311.80f9a00443ba36bc99b4ace177d060d88bf77429.jlec@gentoo
1 commit: 80f9a00443ba36bc99b4ace177d060d88bf77429
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 28 06:05:11 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 28 06:05:11 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80f9a004
7
8 sys-fs/aufs4: Bump to latest aufs release
9
10 Package-Manager: portage-2.2.22
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 sys-fs/aufs4/Manifest | 1 +
14 sys-fs/aufs4/aufs4-0_pre20150928.ebuild | 164 ++++++++++++++++++++++++++++++++
15 2 files changed, 165 insertions(+)
16
17 diff --git a/sys-fs/aufs4/Manifest b/sys-fs/aufs4/Manifest
18 index b8cb5aa..59823a5 100644
19 --- a/sys-fs/aufs4/Manifest
20 +++ b/sys-fs/aufs4/Manifest
21 @@ -6,3 +6,4 @@ DIST aufs4-standalone-0_pre20150525.tar.xz 523720 SHA256 39abd01774e92eb717af89c
22 DIST aufs4-standalone-0_pre20150608.tar.xz 532144 SHA256 8aaa1f348de3b6cfa86f21539d0ec44e5d0d18c27f0645719e3140462522a4e7 SHA512 1abd663b5f7997b93a865bf478c2900a3f69aff1d25149be683f8fd0f7362eaeccb7cdd9ce91ff08d1c4f2660414e03b7c9170fb7818c0839176b94c720d2896 WHIRLPOOL 36fa2691e8f5f27be41463c67df10d0e467892151e50df6f8396293c2572ad3d9229f00302bc47d816b48a08bdb64c92926381ba9d00c150dfb9f445dba8aeeb
23 DIST aufs4-standalone-0_pre20150622.tar.xz 543932 SHA256 28de7f6968c62a48b78f4b6c9234dd4b7b134632e1d4e7d50e87da9e05c06343 SHA512 82f130ed3b43e2bfe42079c96dca70e868d7ce1df5511f68e7b85d343105d452c334fe7a15c1cd4e01450ca39dd527123c060b98b396d13c4250541ec464c2fc WHIRLPOOL e46a01857f2cbd52e6a3717bc5d076197443146fa9eab3b542aeb2698da652a45e8d40e1f9f50d9d4c3fc34d9a6da225712ac32f27f15eded4e8e3f23e113de8
24 DIST aufs4-standalone-0_pre20150629.tar.xz 547808 SHA256 7c1d9a815c73e8cb1c9f909eee8f6945486c8e8feeea9cae4b3865b6032f17e5 SHA512 b7c734fb83515790b58a81b904acb286ef52124e0799dad1c7900dc8af3e0dc6f2875ba86805f1f39b8d04ce6660bf0c0307e4bbc1b58f2ca6171ead5e668a94 WHIRLPOOL b39f2cdeffd20b636c4a3aa5ec8e87cd6b1c8bdfdab071d1cabf53e10629beebffc919abf5fc90915ec0c14f4b4c45a510bbd303765564348a0e2d1688ddf79b
25 +DIST aufs4-standalone-0_pre20150928.tar.xz 649696 SHA256 3d8b5a31c7ebc26da0670927c778404f8820071dc559a8eef8bfd38a366d9a8e SHA512 a45a94d67dbd785d732bc9c257a722cd11acccab4b318647af226cf0a593768d47fd107e07b6f5ca7907ccb1e920bdc74c7d4b12b715a5fd3be103f1b7bd8605 WHIRLPOOL 8fa2f64821b9aea7e4dddc75deaca45bf954f97becbfffe313a0caceb51b7d915f35610544964229c5dd0a80f28d44ea817724aad50d297e7acd6ce52209d8da
26
27 diff --git a/sys-fs/aufs4/aufs4-0_pre20150928.ebuild b/sys-fs/aufs4/aufs4-0_pre20150928.ebuild
28 new file mode 100644
29 index 0000000..e9d57d6
30 --- /dev/null
31 +++ b/sys-fs/aufs4/aufs4-0_pre20150928.ebuild
32 @@ -0,0 +1,164 @@
33 +# Copyright 1999-2015 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=5
38 +
39 +inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
40 +
41 +AUFS_VERSION="${PV%%_p*}"
42 +# highest branch version
43 +PATCH_MAX_VER=2
44 +# highest supported version
45 +KERN_MAX_VER=3
46 +# lowest supported version
47 +KERN_MIN_VER=0
48 +
49 +DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
50 +HOMEPAGE="http://aufs.sourceforge.net/"
51 +SRC_URI="https://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +KEYWORDS="~amd64 ~x86"
56 +IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
57 +
58 +DEPEND="
59 + dev-util/patchutils
60 + dev-vcs/git"
61 +RDEPEND="
62 + sys-fs/aufs-util
63 + !sys-fs/aufs
64 + !sys-fs/aufs2
65 + !sys-fs/aufs3"
66 +
67 +S="${WORKDIR}"/${PN}-standalone
68 +
69 +MODULE_NAMES="aufs(misc:${S})"
70 +
71 +pkg_setup() {
72 + CONFIG_CHECK+=" !AUFS_FS"
73 + use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
74 + use nfs && CONFIG_CHECK+=" EXPORTFS"
75 + use fuse && CONFIG_CHECK+=" ~FUSE_FS"
76 + use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
77 + use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
78 +
79 + # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
80 + [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
81 +
82 + get_version
83 + kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
84 + kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
85 +
86 + linux-mod_pkg_setup
87 +
88 + if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
89 + PATCH_BRANCH="x-rcN"
90 + else
91 + PATCH_BRANCH="${KV_MINOR}"
92 + fi
93 +
94 + case ${KV_EXTRA} in
95 + "")
96 + elog "It seems you are using vanilla-sources with aufs4"
97 + elog "Please use sys-kernel/aufs-sources with USE=vanilla"
98 + elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
99 + ;;
100 + "-gentoo")
101 + elog "It seems you are using gentoo-sources with aufs4"
102 + elog "Please use sys-kernel/aufs-sources"
103 + elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
104 + ;;
105 + esac
106 +
107 + pushd "${T}" &> /dev/null
108 + unpack ${A}
109 + cd ${PN}-standalone || die
110 + local module_branch=origin/${PN}.${PATCH_BRANCH}
111 + einfo "Using ${module_branch} as patch source"
112 + git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
113 + combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
114 + combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
115 + if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
116 + if use kernel-patch; then
117 + cd ${KV_DIR}
118 + ewarn "Patching your kernel..."
119 + patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
120 + epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
121 + ewarn "You need to compile your kernel with the applied patch"
122 + ewarn "to be able to load and use the aufs kernel module"
123 + else
124 + eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
125 + eerror "Either enable the kernel-patch useflag to do it with this ebuild"
126 + eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
127 + die "missing kernel patch, please apply it first"
128 + fi
129 + fi
130 + popd &> /dev/null
131 + export PKG_SETUP_HAS_BEEN_RAN=1
132 +}
133 +
134 +set_config() {
135 + for option in $*; do
136 + grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
137 + sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
138 + done
139 +}
140 +
141 +src_prepare() {
142 + local module_branch=origin/${PN}.${PATCH_BRANCH}
143 +
144 + einfo "Using for module creation branch ${module_branch}"
145 + git checkout -q -b local-gentoo ${module_branch} || die
146 +
147 + # All config options to off
148 + sed "s:= y:=:g" -i config.mk || die
149 +
150 + set_config RDU BRANCH_MAX_127 SBILIST
151 +
152 + use debug && set_config DEBUG
153 + use fuse && set_config BR_FUSE POLL
154 + use hfs && set_config BR_HFSPLUS
155 + use inotify && set_config HNOTIFY HFSNOTIFY
156 + use nfs && set_config EXPORT
157 + use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
158 + use ramfs && set_config BR_RAMFS
159 +
160 + if use pax_kernel; then
161 + epatch "${FILESDIR}"/pax-4.patch
162 + fi
163 +
164 + sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
165 +}
166 +
167 +src_compile() {
168 + local ARCH=x86
169 +
170 + emake \
171 + CC=$(tc-getCC) \
172 + LD=$(tc-getLD) \
173 + LDFLAGS="$(raw-ldflags)" \
174 + ARCH=$(tc-arch-kernel) \
175 + CONFIG_AUFS_FS=m \
176 + KDIR="${KV_OUT_DIR}"
177 +}
178 +
179 +src_install() {
180 + linux-mod_src_install
181 +
182 + insinto /usr/share/doc/${PF}
183 +
184 + use doc && doins -r Documentation
185 +
186 + use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
187 +
188 + dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
189 +
190 + readme.gentoo_create_doc
191 +}
192 +
193 +pkg_postinst() {
194 + readme.gentoo_pkg_postinst
195 + linux-mod_pkg_postinst
196 +}