Gentoo Archives: gentoo-commits

From: Jonathan Vasquez <fearedbliss@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/, sys-kernel/spl/, sys-fs/zfs/
Date: Fri, 09 Feb 2018 02:24:10
Message-Id: 1518143041.6cecc8fd107f7dcdc8ed2f0b11ad9530726f8138.fearedbliss@gentoo
1 commit: 6cecc8fd107f7dcdc8ed2f0b11ad9530726f8138
2 Author: Jonathan Vasquez <fearedbliss <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 9 02:22:34 2018 +0000
4 Commit: Jonathan Vasquez <fearedbliss <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 9 02:24:01 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cecc8fd
7
8 sys-fs/zfs (and friends): version bump to 0.7.6
9
10 Package-Manager: Portage-2.3.21, Repoman-2.3.6
11
12 sys-fs/zfs-kmod/Manifest | 1 +
13 sys-fs/zfs-kmod/zfs-kmod-0.7.6.ebuild | 145 ++++++++++++++++++++++++
14 sys-fs/zfs/Manifest | 1 +
15 sys-fs/zfs/zfs-0.7.6.ebuild | 202 ++++++++++++++++++++++++++++++++++
16 sys-kernel/spl/Manifest | 1 +
17 sys-kernel/spl/spl-0.7.6.ebuild | 111 +++++++++++++++++++
18 6 files changed, 461 insertions(+)
19
20 diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
21 index a6cca4775d2..783d0d03db0 100644
22 --- a/sys-fs/zfs-kmod/Manifest
23 +++ b/sys-fs/zfs-kmod/Manifest
24 @@ -2,3 +2,4 @@ DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3
25 DIST zfs-0.6.5.4-patches-p1.tar.xz 64004 BLAKE2B e9db3c1bde3a2636b35a4204c484bc4cec0968278519762707849ba138eeb9128130de70c2f40bb28dc9102347465d724a60cebd45ddb12d4217739ecbed7714 SHA512 9203356b43bdad2ed78c946af8c95c9fc4d2996b41a09a3b1f5a8657d2742ac69d10b4a87d443db497d591878cf7a70ebb19762b0df135ee25f4e8d2ed6ad71f
26 DIST zfs-0.6.5.4.tar.gz 2506470 BLAKE2B 10a2242081891b94a7863f11b4c3b9e443d3b75b5eb03e8fc88e30484a94555203dec8964075cf23f694777dd699e20acb1a52b5d04cba410b6df84512436e08 SHA512 90c87cd95fd06cf34755358e7cc4053d19f351316133f0b808e7585a3fc8f82e7c0f49072c2995d0520de5104fd04d91a166a0d5b6c923c82dfb2fb4f7f57a01
27 DIST zfs-0.7.5.tar.gz 6403102 BLAKE2B 5159b2ab811b2f7bcbbc708814e07e68b0b38d7b5fca4a82205c7bb4332155121f1385f2cd3a6b7acb6bd64d13b9ad2af85d42b90623efb0f33a2f542fb90803 SHA512 3512aaa6225f74323f2d14e029a113593e0cf44be2ab18cc42dcb82d237b88843ccd7e48ed73a4c6f6da574151c1af461e0528725e11bcb42280467e37f63df2
28 +DIST zfs-0.7.6.tar.gz 6409035 BLAKE2B 498d02172f0eaaa658e2aad2dd74d37f0ce5d41fda817976cc370ad42ad320f09124e6dc4a609b5eeda7819f538247cf64823871d00902e80a9bc92a374d0d51 SHA512 d9d45696b81080234068a4731276f888382e6680a6ca30d302110dbd1fa00d38ef17bd59de4b787b1ce91c3184ccb403c5db6b064a611f6f8572fa077a989cdb
29
30 diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.6.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.6.ebuild
31 new file mode 100644
32 index 00000000000..175244af205
33 --- /dev/null
34 +++ b/sys-fs/zfs-kmod/zfs-kmod-0.7.6.ebuild
35 @@ -0,0 +1,145 @@
36 +# Copyright 1999-2018 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI="5"
40 +
41 +if [ ${PV} == "9999" ]; then
42 + AUTOTOOLS_AUTORECONF="1"
43 + EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
44 + inherit git-r3
45 +else
46 + SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
47 + S="${WORKDIR}/zfs-${PV}"
48 + KEYWORDS="~amd64"
49 +fi
50 +
51 +inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
52 +
53 +DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
54 +HOMEPAGE="http://zfsonlinux.org/"
55 +
56 +LICENSE="CDDL debug? ( GPL-2+ )"
57 +SLOT="0"
58 +IUSE="custom-cflags debug +rootfs"
59 +RESTRICT="debug? ( strip ) test"
60 +
61 +DEPEND="
62 + =sys-kernel/spl-${PV}*
63 + dev-lang/perl
64 + virtual/awk
65 +"
66 +
67 +RDEPEND="${DEPEND}
68 + !sys-fs/zfs-fuse
69 +"
70 +
71 +AT_M4DIR="config"
72 +AUTOTOOLS_IN_SOURCE_BUILD="1"
73 +
74 +DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
75 +
76 +pkg_setup() {
77 + linux-info_pkg_setup
78 + CONFIG_CHECK="
79 + !DEBUG_LOCK_ALLOC
80 + EFI_PARTITION
81 + IOSCHED_NOOP
82 + MODULES
83 + !PAX_KERNEXEC_PLUGIN_METHOD_OR
84 + ZLIB_DEFLATE
85 + ZLIB_INFLATE
86 + "
87 +
88 + use debug && CONFIG_CHECK="${CONFIG_CHECK}
89 + FRAME_POINTER
90 + DEBUG_INFO
91 + !DEBUG_INFO_REDUCED
92 + "
93 +
94 + use rootfs && \
95 + CONFIG_CHECK="${CONFIG_CHECK}
96 + BLK_DEV_INITRD
97 + DEVTMPFS
98 + "
99 +
100 + kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
101 +
102 + [ ${PV} != "9999" ] && \
103 + { kernel_is le 4 15 || die "Linux 4.15 is the latest supported version."; }
104 +
105 + check_extra_config
106 +}
107 +
108 +src_prepare() {
109 + # Remove GPLv2-licensed ZPIOS unless we are debugging
110 + use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
111 +
112 + # Set module revision number
113 + [ ${PV} != "9999" ] && \
114 + { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
115 +
116 + autotools-utils_src_prepare
117 +}
118 +
119 +src_configure() {
120 + local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
121 + use custom-cflags || strip-flags
122 + filter-ldflags -Wl,*
123 +
124 + set_arch_to_kernel
125 + local myeconfargs=(${myeconfargs}
126 + --bindir="${EPREFIX}/bin"
127 + --sbindir="${EPREFIX}/sbin"
128 + --with-config=kernel
129 + --with-linux="${KV_DIR}"
130 + --with-linux-obj="${KV_OUT_DIR}"
131 + --with-spl="${EROOT}usr/src/${SPL_PATH}"
132 + --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
133 + $(use_enable debug)
134 + )
135 +
136 + autotools-utils_src_configure
137 +}
138 +
139 +src_install() {
140 + autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
141 +}
142 +
143 +pkg_postinst() {
144 + linux-mod_pkg_postinst
145 +
146 + # Remove old modules
147 + if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
148 + then
149 + ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
150 + ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
151 + ewarn "Automatically removing old modules to avoid problems."
152 + rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
153 + rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
154 + fi
155 +
156 + if use x86 || use arm
157 + then
158 + ewarn "32-bit kernels will likely require increasing vmalloc to"
159 + ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
160 + fi
161 +
162 + ewarn "This version of ZFSOnLinux includes support for new feature flags"
163 + ewarn "that are incompatible with previous versions. GRUB2 support for"
164 + ewarn "/boot with the new feature flags is not yet available."
165 + ewarn "Do *NOT* upgrade root pools to use the new feature flags."
166 + ewarn "Any new pools will be created with the new feature flags by default"
167 + ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
168 + ewarn "create a newpool that is backward compatible wih GRUB2, use "
169 + ewarn
170 + ewarn "zpool create -d -o feature@async_destroy=enabled "
171 + ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
172 + ewarn " -o feature@spacemap_histogram=enabled"
173 + ewarn " -o feature@enabled_txg=enabled "
174 + ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
175 + ewarn " ..."
176 + ewarn
177 + ewarn "GRUB2 support will be updated as soon as either the GRUB2"
178 + ewarn "developers do a tag or the Gentoo developers find time to backport"
179 + ewarn "support from GRUB2 HEAD."
180 +}
181
182 diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
183 index 479c65e2312..10800c862f4 100644
184 --- a/sys-fs/zfs/Manifest
185 +++ b/sys-fs/zfs/Manifest
186 @@ -2,3 +2,4 @@ DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3
187 DIST zfs-0.6.5.4-patches-p2.tar.xz 63912 BLAKE2B f8bd5d0cd2b6170b45cf40a78b484d9a73017b20a77c603f4bcec63b6c77347b07df74c9d53288b5b2b984135d651d3d3ef830395ff2625576b13d8ce433fbcb SHA512 9f598c2a750b92dadddb677a6a9dda4573fa91421a82270d8104d718da4b945a4d5412bab92037a033cec1ec177f2a0eb52207babd023847918e3754054ec5e9
188 DIST zfs-0.6.5.4.tar.gz 2506470 BLAKE2B 10a2242081891b94a7863f11b4c3b9e443d3b75b5eb03e8fc88e30484a94555203dec8964075cf23f694777dd699e20acb1a52b5d04cba410b6df84512436e08 SHA512 90c87cd95fd06cf34755358e7cc4053d19f351316133f0b808e7585a3fc8f82e7c0f49072c2995d0520de5104fd04d91a166a0d5b6c923c82dfb2fb4f7f57a01
189 DIST zfs-0.7.5.tar.gz 6403102 BLAKE2B 5159b2ab811b2f7bcbbc708814e07e68b0b38d7b5fca4a82205c7bb4332155121f1385f2cd3a6b7acb6bd64d13b9ad2af85d42b90623efb0f33a2f542fb90803 SHA512 3512aaa6225f74323f2d14e029a113593e0cf44be2ab18cc42dcb82d237b88843ccd7e48ed73a4c6f6da574151c1af461e0528725e11bcb42280467e37f63df2
190 +DIST zfs-0.7.6.tar.gz 6409035 BLAKE2B 498d02172f0eaaa658e2aad2dd74d37f0ce5d41fda817976cc370ad42ad320f09124e6dc4a609b5eeda7819f538247cf64823871d00902e80a9bc92a374d0d51 SHA512 d9d45696b81080234068a4731276f888382e6680a6ca30d302110dbd1fa00d38ef17bd59de4b787b1ce91c3184ccb403c5db6b064a611f6f8572fa077a989cdb
191
192 diff --git a/sys-fs/zfs/zfs-0.7.6.ebuild b/sys-fs/zfs/zfs-0.7.6.ebuild
193 new file mode 100644
194 index 00000000000..596e6635277
195 --- /dev/null
196 +++ b/sys-fs/zfs/zfs-0.7.6.ebuild
197 @@ -0,0 +1,202 @@
198 +# Copyright 1999-2018 Gentoo Foundation
199 +# Distributed under the terms of the GNU General Public License v2
200 +
201 +EAPI="5"
202 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
203 +
204 +if [ ${PV} == "9999" ] ; then
205 + inherit git-r3 linux-mod
206 + AUTOTOOLS_AUTORECONF="1"
207 + EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
208 +else
209 + SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
210 + KEYWORDS="~amd64"
211 +fi
212 +
213 +inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
214 +
215 +DESCRIPTION="Userland utilities for ZFS Linux kernel module"
216 +HOMEPAGE="http://zfsonlinux.org/"
217 +
218 +LICENSE="BSD-2 CDDL MIT"
219 +SLOT="0"
220 +IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
221 +RESTRICT="test"
222 +
223 +COMMON_DEPEND="
224 + net-libs/libtirpc
225 + sys-apps/util-linux[static-libs?]
226 + sys-libs/zlib[static-libs(+)?]
227 + virtual/awk
228 +"
229 +DEPEND="${COMMON_DEPEND}
230 + virtual/pkgconfig
231 +"
232 +
233 +RDEPEND="${COMMON_DEPEND}
234 + !=sys-apps/grep-2.13*
235 + !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
236 + !sys-fs/zfs-fuse
237 + !prefix? ( virtual/udev )
238 + test-suite? (
239 + sys-apps/util-linux
240 + sys-devel/bc
241 + sys-block/parted
242 + sys-fs/lsscsi
243 + sys-fs/mdadm
244 + sys-process/procps
245 + virtual/modutils
246 + )
247 + rootfs? (
248 + app-arch/cpio
249 + app-misc/pax-utils
250 + !<sys-boot/grub-2.00-r2:2
251 + !<sys-kernel/genkernel-3.5.1.1
252 + !<sys-kernel/genkernel-next-67
253 + !<sys-kernel/bliss-initramfs-7.1.0
254 + !<sys-kernel/dracut-044-r1
255 + )
256 + sys-fs/udev-init-scripts
257 +"
258 +
259 +AT_M4DIR="config"
260 +AUTOTOOLS_IN_SOURCE_BUILD="1"
261 +
262 +pkg_setup() {
263 + if use kernel_linux && use test-suite; then
264 + linux-info_pkg_setup
265 + if ! linux_config_exists; then
266 + ewarn "Cannot check the linux kernel configuration."
267 + else
268 + # recheck that we don't have usblp to collide with libusb
269 + if use test-suite; then
270 + if linux_chkconfig_present BLK_DEV_LOOP; then
271 + eerror "The ZFS test suite requires loop device support enabled."
272 + eerror "Please enable it:"
273 + eerror " CONFIG_BLK_DEV_LOOP=y"
274 + eerror "in /usr/src/linux/.config or"
275 + eerror " Device Drivers --->"
276 + eerror " Block devices --->"
277 + eerror " [ ] Loopback device support"
278 + fi
279 + fi
280 + fi
281 + fi
282 +
283 +}
284 +
285 +src_prepare() {
286 + # Update paths
287 + sed -e "s|/sbin/lsmod|/bin/lsmod|" \
288 + -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
289 + -e "s|/sbin/parted|/usr/sbin/parted|" \
290 + -i scripts/common.sh.in
291 +
292 + autotools-utils_src_prepare
293 +}
294 +
295 +src_configure() {
296 + use custom-cflags || strip-flags
297 + local myeconfargs=(
298 + --bindir="${EPREFIX}/bin"
299 + --sbindir="${EPREFIX}/sbin"
300 + --with-config=user
301 + --with-dracutdir="/usr/$(get_libdir)/dracut"
302 + --with-linux="${KV_DIR}"
303 + --with-linux-obj="${KV_OUT_DIR}"
304 + --with-udevdir="$(get_udevdir)"
305 + --with-blkid
306 + $(use_enable debug)
307 + )
308 + autotools-utils_src_configure
309 +
310 + # prepare systemd unit and helper script
311 + cat "${FILESDIR}/zfs.service.in" | \
312 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
313 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
314 + > "${T}/zfs.service" || die
315 + cat "${FILESDIR}/zfs-init.sh.in" | \
316 + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
317 + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
318 + > "${T}/zfs-init.sh" || die
319 +}
320 +
321 +src_install() {
322 + autotools-utils_src_install
323 + gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
324 + use test-suite || rm -rf "${ED}usr/share/zfs"
325 +
326 + newbashcomp "${FILESDIR}/bash-completion-r1" zfs
327 + bashcomp_alias zfs zpool
328 +
329 + exeinto /usr/libexec
330 + doexe "${T}/zfs-init.sh"
331 + systemd_dounit "${T}/zfs.service"
332 +}
333 +
334 +pkg_postinst() {
335 + if ! use kernel-builtin && [ ${PV} = "9999" ]
336 + then
337 + einfo "Adding ${P} to the module database to ensure that the"
338 + einfo "kernel modules and userland utilities stay in sync."
339 + update_moduledb
340 + fi
341 +
342 + if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
343 + then
344 + einfo 'The zfs boot script has been split into the zfs-import,'
345 + einfo 'zfs-mount and zfs-share scripts.'
346 + einfo
347 + einfo 'You had the zfs script in your boot runlevel. For your'
348 + einfo 'convenience, it has been automatically removed and the three'
349 + einfo 'scripts that replace it have been configured to start.'
350 + einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
351 + einfo 'runlevel while the zfs-share script is in the default runlevel.'
352 +
353 + rm "${EROOT}etc/runlevels/boot/zfs"
354 + ln -snf "${EROOT}etc/init.d/zfs-import" \
355 + "${EROOT}etc/runlevels/boot/zfs-import"
356 + ln -snf "${EROOT}etc/init.d/zfs-mount" \
357 + "${EROOT}etc/runlevels/boot/zfs-mount"
358 + ln -snf "${EROOT}etc/init.d/zfs-share" \
359 + "${EROOT}etc/runlevels/default/zfs-share"
360 + else
361 + [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
362 + einfo "You should add zfs-import to the boot runlevel."
363 + [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
364 + einfo "You should add zfs-mount to the boot runlevel."
365 + [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
366 + einfo "You should add zfs-share to the default runlevel."
367 + fi
368 +
369 + if [ -e "${EROOT}etc/runlevels/default/zed" ]
370 + then
371 + einfo 'The downstream OpenRC zed script has replaced by the upstream'
372 + einfo 'OpenRC zfs-zed script.'
373 + einfo
374 + einfo 'You had the zed script in your default runlevel. For your'
375 + einfo 'convenience, it has been automatically removed and the zfs-zed'
376 + einfo 'script that replaced it has been configured to start.'
377 +
378 + rm "${EROOT}etc/runlevels/boot/zed"
379 + ln -snf "${EROOT}etc/init.d/zfs-sed" \
380 + "${EROOT}etc/runlevels/default/zfs-zed"
381 + else
382 + [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
383 + einfo "You should add zfs-zed to the default runlevel."
384 + fi
385 +
386 + if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
387 + then
388 + einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
389 + rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
390 + fi
391 +
392 +}
393 +
394 +pkg_postrm() {
395 + if ! use kernel-builtin && [ ${PV} = "9999" ]
396 + then
397 + remove_moduledb
398 + fi
399 +}
400
401 diff --git a/sys-kernel/spl/Manifest b/sys-kernel/spl/Manifest
402 index 7e44cfab010..6c331dd99a0 100644
403 --- a/sys-kernel/spl/Manifest
404 +++ b/sys-kernel/spl/Manifest
405 @@ -2,3 +2,4 @@ DIST spl-0.6.5.11.tar.gz 531710 BLAKE2B e89cb5a023d3f4b3949a385100b56e01c5fd0ff4
406 DIST spl-0.6.5.4-patches-p1.tar.xz 2020 BLAKE2B 82b836df5c18f68ebd967d5d33e65232167ff1c4b1da3998dadf49c1fd0ffad4a86fa418a30ba0ba106ee4baa190fc51dedabec68083af80e5eb5aa1b225dcc5 SHA512 2650f06bf23045bd2805ef58baa2561534373862e1fbbaf189cf93283aa8e18cbee989b4e81751b37da3058aeba357cf8e46db97331379e1b5eafde7faa33851
407 DIST spl-0.6.5.4.tar.gz 556298 BLAKE2B 142d92ece51f544ed53f8d15390a97469b322c0e8f16c6510eb72f69493a3489f98ead9fa4138765b364c22777ee0cb49a76c4d9b1c4ac4e5ce8c0e5dbfe9952 SHA512 a50d804008237820d6a8e7d938f6699df2966836ebedf0b6a4421f55bd6c24ae69e8f80eaf3aa2b7f6ed308983ab4ca11abfb32f98c8d070e4957b4802e00cac
408 DIST spl-0.7.5.tar.gz 549272 BLAKE2B b645c68fa53e3e10a80788684efbeeafecb04753a1b515de32555943f372fa61c1c24cd7afac1cc646de572daa32f88c5b95662797a085c756519e03fdf3e46f SHA512 a797ddab6841cbe9c7eacc4f276537ecb5905a694604185044e98ed017b325367a1fdd1ea6830d29d4a21ed11a8d1ff0505bda7bbd2112418db319df128141a3
409 +DIST spl-0.7.6.tar.gz 550089 BLAKE2B c0b1cc87a9b7997f6346a106eb8f23493938357fce9d6209e159016f2df5655678fce5ddc64dc4a63a4f93b715c44d5ff7fd30097c63ab62a1daabb3dcc28908 SHA512 b8e74e4ad8c16df1a4742639f00c4c4162607d136145bae58489f9a34539dcc5569da18639a67ac5d9d52b5feac93e052323ebf6efce6a92ba9a2b965f940fdd
410
411 diff --git a/sys-kernel/spl/spl-0.7.6.ebuild b/sys-kernel/spl/spl-0.7.6.ebuild
412 new file mode 100644
413 index 00000000000..31cf17318cf
414 --- /dev/null
415 +++ b/sys-kernel/spl/spl-0.7.6.ebuild
416 @@ -0,0 +1,111 @@
417 +# Copyright 1999-2018 Gentoo Foundation
418 +# Distributed under the terms of the GNU General Public License v2
419 +
420 +EAPI="5"
421 +
422 +if [[ ${PV} == "9999" ]] ; then
423 + AUTOTOOLS_AUTORECONF="1"
424 + EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
425 + inherit git-r3
426 +else
427 + SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
428 + KEYWORDS="~amd64"
429 +fi
430 +
431 +inherit flag-o-matic linux-info linux-mod autotools-utils
432 +
433 +DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
434 +HOMEPAGE="http://zfsonlinux.org/"
435 +
436 +LICENSE="GPL-2"
437 +SLOT="0"
438 +IUSE="custom-cflags debug"
439 +RESTRICT="debug? ( strip ) test"
440 +
441 +COMMON_DEPEND="
442 + dev-lang/perl
443 + virtual/awk"
444 +
445 +DEPEND="${COMMON_DEPEND}"
446 +
447 +RDEPEND="${COMMON_DEPEND}
448 + !sys-devel/spl"
449 +
450 +AT_M4DIR="config"
451 +AUTOTOOLS_IN_SOURCE_BUILD="1"
452 +DOCS=( AUTHORS DISCLAIMER )
453 +
454 +pkg_setup() {
455 + linux-info_pkg_setup
456 + CONFIG_CHECK="
457 + !DEBUG_LOCK_ALLOC
458 + MODULES
459 + KALLSYMS
460 + !PAX_KERNEXEC_PLUGIN_METHOD_OR
461 + !PAX_SIZE_OVERFLOW
462 + ZLIB_DEFLATE
463 + ZLIB_INFLATE
464 + "
465 +
466 + use debug && CONFIG_CHECK="${CONFIG_CHECK}
467 + FRAME_POINTER
468 + DEBUG_INFO
469 + !DEBUG_INFO_REDUCED
470 + "
471 +
472 + kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
473 +
474 + [ ${PV} != "9999" ] && \
475 + { kernel_is le 4 15 || die "Linux 4.15 is the latest supported version."; }
476 +
477 + check_extra_config
478 +}
479 +
480 +src_prepare() {
481 + # Workaround for hard coded path
482 + sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
483 + die "Cannot patch check.sh"
484 +
485 + # splat is unnecessary unless we are debugging
486 + use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
487 +
488 + # Set module revision number
489 + [ ${PV} != "9999" ] && \
490 + { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
491 +
492 + autotools-utils_src_prepare
493 +}
494 +
495 +src_configure() {
496 + use custom-cflags || strip-flags
497 + filter-ldflags -Wl,*
498 +
499 + set_arch_to_kernel
500 + local myeconfargs=(
501 + --bindir="${EPREFIX}/bin"
502 + --sbindir="${EPREFIX}/sbin"
503 + --with-config=all
504 + --with-linux="${KV_DIR}"
505 + --with-linux-obj="${KV_OUT_DIR}"
506 + $(use_enable debug)
507 + )
508 + autotools-utils_src_configure
509 +}
510 +
511 +src_install() {
512 + autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
513 +}
514 +
515 +pkg_postinst() {
516 + linux-mod_pkg_postinst
517 +
518 + # Remove old modules
519 + if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
520 + then
521 + ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
522 + ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
523 + ewarn "Automatically removing old modules to avoid problems."
524 + rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
525 + rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
526 + fi
527 +}