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