1 |
commit: 11035d22798a79fd90113e81ba39b66c63989dab |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 5 04:13:03 2019 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 5 04:29:30 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11035d22 |
7 |
|
8 |
sys-fs/zfs: bump to 0.7.13 |
9 |
|
10 |
proper python deps/handling |
11 |
fix automagic systemd dep |
12 |
linux 5.0 compatible |
13 |
|
14 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
15 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
16 |
|
17 |
sys-fs/zfs/Manifest | 1 + |
18 |
sys-fs/zfs/zfs-0.7.13.ebuild | 218 +++++++++++++++++++++++++++++++++++++++++++ |
19 |
2 files changed, 219 insertions(+) |
20 |
|
21 |
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest |
22 |
index da83a0dcc1f..89d0d6e1555 100644 |
23 |
--- a/sys-fs/zfs/Manifest |
24 |
+++ b/sys-fs/zfs/Manifest |
25 |
@@ -1,6 +1,7 @@ |
26 |
DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3e4812c05839d49d0cd877b756185c91b2609986f91939fbfda322809ddefc8ff9207fe076db03e0038e585ea2 SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451 |
27 |
DIST zfs-0.7.11.tar.gz 6561125 BLAKE2B ee579aa01272d5565fe78ae6074dc1acdd34c8e9a26838462aea937132c322b0fb915c4dadec230560d586db2b2af129735ed6b5e41def4183c9c7ed456ca7aa SHA512 b53c92de2c2542a1b0189368e4b298e93bea13aec8ba415559e86bfc01a9c7deaf436e694aa047ef8a302c79224f96edd150ea93a57eb88c9e26d054cf7ccd2b |
28 |
DIST zfs-0.7.12.tar.gz 6565017 BLAKE2B 493df30ecce1f169e02d6c8262ba71cc9e7b01d5b17ce188004f522f0c93943b858434067cba8173ccb3e08cde24a1d3e8a3996b2e852f8bc35251f8c4ab3809 SHA512 278e411eac5fb2a91108671b64521c2bd5c08024d5829e1679d8f243dfc3c6317363ed9c79dabfddecf425acb6b3003eeaf4e7d991513cbcae4d2644f5d30bf2 |
29 |
+DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e |
30 |
DIST zfs-0.7.8.tar.gz 6514969 BLAKE2B 689d96ad7afeb422cbeca724f248ac56b6fcdc0a7ef215f735180406a7fc0d4d3c9700a41e855186d8044b304c9f0c142c2bdca387299c499974e424965970a4 SHA512 cdeabe10acd2feeeff8a6362987c757b716bfea6ebad42ce022a081106661f774150c113bdaa9e1ac441efdd6da4cf11e6119323ad60ae15ab445a872d952e35 |
31 |
DIST zfs-0.7.9-r1-patches.tar.xz 10920 BLAKE2B 50a0b8533061b5eecc103179e6fd51499d87f1c3b331b0629efa29a5a7d405c03448db2245fed9389d149cc83021a2c263bc2f02133a5fdd11b088516c353fff SHA512 a9e8c04bf7449b0a63420202b2f6dd8a6aea96ac57e5925c2ca0223f662210f42316ada25aa6113103909de8c9976945828cdb91a6ff9932f282c01316d7b3ec |
32 |
DIST zfs-0.7.9.tar.gz 6548649 BLAKE2B aa2f1b9d0ba0eda1af7d420c43d65d5d4183169cfe97c693356e1e0b15967ea512c25454f2d77285600f2209d778e4299f420754932e403a390b87b4f488dc94 SHA512 af5d9c320885ee84019fb04250c4b12c7ac3bb3d1037b1961ec4584701a737558374dc22521743e197356efb1d1f0ced9beff675ae9cfcccf3cd8407467f18fa |
33 |
|
34 |
diff --git a/sys-fs/zfs/zfs-0.7.13.ebuild b/sys-fs/zfs/zfs-0.7.13.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..a7afd7254aa |
37 |
--- /dev/null |
38 |
+++ b/sys-fs/zfs/zfs-0.7.13.ebuild |
39 |
@@ -0,0 +1,218 @@ |
40 |
+# Copyright 1999-2019 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI="5" |
44 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
45 |
+ |
46 |
+if [ ${PV} == "9999" ] ; then |
47 |
+ inherit git-r3 linux-mod |
48 |
+ AUTOTOOLS_AUTORECONF="1" |
49 |
+ EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git" |
50 |
+else |
51 |
+ SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz" |
52 |
+ KEYWORDS="~amd64" |
53 |
+fi |
54 |
+ |
55 |
+inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-single-r1 systemd toolchain-funcs udev |
56 |
+ |
57 |
+DESCRIPTION="Userland utilities for ZFS Linux kernel module" |
58 |
+HOMEPAGE="https://zfsonlinux.org/" |
59 |
+ |
60 |
+LICENSE="BSD-2 CDDL MIT" |
61 |
+SLOT="0" |
62 |
+IUSE="custom-cflags debug kernel-builtin +rootfs systemd test-suite static-libs" |
63 |
+RESTRICT="test" |
64 |
+ |
65 |
+COMMON_DEPEND=" |
66 |
+ net-libs/libtirpc |
67 |
+ sys-apps/util-linux[static-libs?] |
68 |
+ sys-libs/zlib[static-libs(+)?] |
69 |
+ virtual/awk |
70 |
+" |
71 |
+DEPEND="${COMMON_DEPEND} |
72 |
+ virtual/pkgconfig |
73 |
+" |
74 |
+ |
75 |
+RDEPEND="${COMMON_DEPEND} |
76 |
+ ${PYTHON_DEPS} |
77 |
+ !=sys-apps/grep-2.13* |
78 |
+ !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* ) |
79 |
+ !sys-fs/zfs-fuse |
80 |
+ !prefix? ( virtual/udev ) |
81 |
+ test-suite? ( |
82 |
+ sys-apps/util-linux |
83 |
+ sys-devel/bc |
84 |
+ sys-block/parted |
85 |
+ sys-fs/lsscsi |
86 |
+ sys-fs/mdadm |
87 |
+ sys-process/procps |
88 |
+ virtual/modutils |
89 |
+ ) |
90 |
+ rootfs? ( |
91 |
+ app-arch/cpio |
92 |
+ app-misc/pax-utils |
93 |
+ !<sys-boot/grub-2.00-r2:2 |
94 |
+ !<sys-kernel/genkernel-3.5.1.1 |
95 |
+ !<sys-kernel/genkernel-next-67 |
96 |
+ !<sys-kernel/bliss-initramfs-7.1.0 |
97 |
+ !<sys-kernel/dracut-044-r1 |
98 |
+ ) |
99 |
+ sys-fs/udev-init-scripts |
100 |
+" |
101 |
+ |
102 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
103 |
+ |
104 |
+AT_M4DIR="config" |
105 |
+AUTOTOOLS_IN_SOURCE_BUILD="1" |
106 |
+ |
107 |
+pkg_setup() { |
108 |
+ python-single-r1_pkg_setup |
109 |
+ if use kernel_linux && use test-suite; then |
110 |
+ linux-info_pkg_setup |
111 |
+ if ! linux_config_exists; then |
112 |
+ ewarn "Cannot check the linux kernel configuration." |
113 |
+ else |
114 |
+ # recheck that we don't have usblp to collide with libusb |
115 |
+ if use test-suite; then |
116 |
+ if linux_chkconfig_present BLK_DEV_LOOP; then |
117 |
+ eerror "The ZFS test suite requires loop device support enabled." |
118 |
+ eerror "Please enable it:" |
119 |
+ eerror " CONFIG_BLK_DEV_LOOP=y" |
120 |
+ eerror "in /usr/src/linux/.config or" |
121 |
+ eerror " Device Drivers --->" |
122 |
+ eerror " Block devices --->" |
123 |
+ eerror " [ ] Loopback device support" |
124 |
+ fi |
125 |
+ fi |
126 |
+ fi |
127 |
+ fi |
128 |
+} |
129 |
+ |
130 |
+src_prepare() { |
131 |
+ # Update paths |
132 |
+ sed -e "s|/sbin/lsmod|/bin/lsmod|" \ |
133 |
+ -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \ |
134 |
+ -e "s|/sbin/parted|/usr/sbin/parted|" \ |
135 |
+ -i scripts/common.sh.in || die |
136 |
+ |
137 |
+ autotools-utils_src_prepare |
138 |
+} |
139 |
+ |
140 |
+src_configure() { |
141 |
+ use custom-cflags || strip-flags |
142 |
+ local myeconfargs=( |
143 |
+ --bindir="${EPREFIX}/bin" |
144 |
+ --sbindir="${EPREFIX}/sbin" |
145 |
+ --with-config=user |
146 |
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut" |
147 |
+ --with-linux="${KV_DIR}" |
148 |
+ --with-linux-obj="${KV_OUT_DIR}" |
149 |
+ --with-udevdir="$(get_udevdir)" |
150 |
+ --with-systemdunitdir="$(systemd_get_systemunitdir)" |
151 |
+ --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" |
152 |
+ $(use_enable debug) |
153 |
+ $(use_enable systemd) |
154 |
+ ) |
155 |
+ autotools-utils_src_configure |
156 |
+ |
157 |
+ # prepare systemd unit and helper script |
158 |
+ cat "${FILESDIR}/zfs.service.in" | \ |
159 |
+ sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \ |
160 |
+ -e "s:@sysconfdir@:${EPREFIX}/etc:g" \ |
161 |
+ > "${T}/zfs.service" || die |
162 |
+ cat "${FILESDIR}/zfs-init.sh.in" | \ |
163 |
+ sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \ |
164 |
+ -e "s:@sysconfdir@:${EPREFIX}/etc:g" \ |
165 |
+ > "${T}/zfs-init.sh" || die |
166 |
+} |
167 |
+ |
168 |
+src_install() { |
169 |
+ autotools-utils_src_install |
170 |
+ gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core |
171 |
+ use test-suite || rm -rf "${ED}usr/share/zfs" |
172 |
+ |
173 |
+ newbashcomp "${FILESDIR}/bash-completion-r1" zfs |
174 |
+ bashcomp_alias zfs zpool |
175 |
+ |
176 |
+ exeinto /usr/libexec |
177 |
+ doexe "${T}/zfs-init.sh" |
178 |
+ systemd_dounit "${T}/zfs.service" |
179 |
+ |
180 |
+ # enforce selected python implementation |
181 |
+ python_fix_shebang "${ED}/bin" |
182 |
+} |
183 |
+ |
184 |
+pkg_postinst() { |
185 |
+ if ! use kernel-builtin && [ ${PV} = "9999" ] |
186 |
+ then |
187 |
+ einfo "Adding ${P} to the module database to ensure that the" |
188 |
+ einfo "kernel modules and userland utilities stay in sync." |
189 |
+ update_moduledb |
190 |
+ fi |
191 |
+ |
192 |
+ if [ -e "${EROOT}etc/runlevels/boot/zfs" ] |
193 |
+ then |
194 |
+ einfo 'The zfs boot script has been split into the zfs-import,' |
195 |
+ einfo 'zfs-mount and zfs-share scripts.' |
196 |
+ einfo |
197 |
+ einfo 'You had the zfs script in your boot runlevel. For your' |
198 |
+ einfo 'convenience, it has been automatically removed and the three' |
199 |
+ einfo 'scripts that replace it have been configured to start.' |
200 |
+ einfo 'The zfs-import and zfs-mount scripts have been added to the boot' |
201 |
+ einfo 'runlevel while the zfs-share script is in the default runlevel.' |
202 |
+ |
203 |
+ rm "${EROOT}etc/runlevels/boot/zfs" |
204 |
+ ln -snf "${EROOT}etc/init.d/zfs-import" \ |
205 |
+ "${EROOT}etc/runlevels/boot/zfs-import" |
206 |
+ ln -snf "${EROOT}etc/init.d/zfs-mount" \ |
207 |
+ "${EROOT}etc/runlevels/boot/zfs-mount" |
208 |
+ ln -snf "${EROOT}etc/init.d/zfs-share" \ |
209 |
+ "${EROOT}etc/runlevels/default/zfs-share" |
210 |
+ else |
211 |
+ [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \ |
212 |
+ einfo "You should add zfs-import to the boot runlevel." |
213 |
+ [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \ |
214 |
+ einfo "You should add zfs-mount to the boot runlevel." |
215 |
+ [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \ |
216 |
+ einfo "You should add zfs-share to the default runlevel." |
217 |
+ fi |
218 |
+ |
219 |
+ if [ -e "${EROOT}etc/runlevels/default/zed" ] |
220 |
+ then |
221 |
+ einfo 'The downstream OpenRC zed script has replaced by the upstream' |
222 |
+ einfo 'OpenRC zfs-zed script.' |
223 |
+ einfo |
224 |
+ einfo 'You had the zed script in your default runlevel. For your' |
225 |
+ einfo 'convenience, it has been automatically removed and the zfs-zed' |
226 |
+ einfo 'script that replaced it has been configured to start.' |
227 |
+ |
228 |
+ rm "${EROOT}etc/runlevels/boot/zed" |
229 |
+ ln -snf "${EROOT}etc/init.d/zfs-sed" \ |
230 |
+ "${EROOT}etc/runlevels/default/zfs-zed" |
231 |
+ else |
232 |
+ [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \ |
233 |
+ einfo "You should add zfs-zed to the default runlevel." |
234 |
+ fi |
235 |
+ |
236 |
+ if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ] |
237 |
+ then |
238 |
+ einfo "The zfs-shutdown script is obsolete. Removing it from runlevel." |
239 |
+ rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown" |
240 |
+ fi |
241 |
+ |
242 |
+ systemd_reenable zfs-zed.service |
243 |
+ systemd_reenable zfs-import-cache.service |
244 |
+ systemd_reenable zfs-import-scan.service |
245 |
+ systemd_reenable zfs-mount.service |
246 |
+ systemd_reenable zfs-share.service |
247 |
+ systemd_reenable zfs-import.target |
248 |
+ systemd_reenable zfs.target |
249 |
+ systemd_reenable zfs.service |
250 |
+} |
251 |
+ |
252 |
+pkg_postrm() { |
253 |
+ if ! use kernel-builtin && [ ${PV} = "9999" ] |
254 |
+ then |
255 |
+ remove_moduledb |
256 |
+ fi |
257 |
+} |