1 |
commit: d2dcbcc9d72d23ba07e56c40c1643561db942cb6 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 24 05:32:37 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 24 07:03:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2dcbcc9 |
7 |
|
8 |
sys-fs/zfs: bump to 0.8.3 |
9 |
|
10 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
11 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
12 |
|
13 |
sys-fs/zfs/Manifest | 1 + |
14 |
sys-fs/zfs/zfs-0.8.3.ebuild | 219 ++++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 220 insertions(+) |
16 |
|
17 |
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest |
18 |
index b0e4dc7805b..84cfb1d2a3e 100644 |
19 |
--- a/sys-fs/zfs/Manifest |
20 |
+++ b/sys-fs/zfs/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e |
23 |
DIST zfs-0.8.2.tar.gz 8738111 BLAKE2B 5c15f6664ca70f0deeb5b9e32f2bcff68f9821529e5203ff18612ce88473fee9af369354c442f3db7882d301cf17c805c9635b05bfd3460833ed8e5ff8004dd0 SHA512 1424b1a030b814f812b5da422100669db5b8c3ccae14c2fdd62a5e0df28e7255247fe5ca99c95a14f08c92cc1574c22dd132093e4a1dd81e38c95b10cc5e2496 |
24 |
+DIST zfs-0.8.3.tar.gz 8779385 BLAKE2B 8b51b9d5b61543566bc7839d8452fdf9358442155e95f93a011531338824bbd4fc8879500e276b02d5d49d504a046728ecc0c6154f69eb7b47180b9bb0e46958 SHA512 aded632e6b04180560d4f2ff283260016e883dadae4e7fda9070b7113dee948099cb7a7b183f1c8139654389a2610fb9cc6f997acdc846040e605125cf016010 |
25 |
|
26 |
diff --git a/sys-fs/zfs/zfs-0.8.3.ebuild b/sys-fs/zfs/zfs-0.8.3.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..9ac492e30ce |
29 |
--- /dev/null |
30 |
+++ b/sys-fs/zfs/zfs-0.8.3.ebuild |
31 |
@@ -0,0 +1,219 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+DISTUTILS_OPTIONAL=1 |
38 |
+PYTHON_COMPAT=( python{2_7,3_{6,7}} ) |
39 |
+ |
40 |
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod distutils-r1 systemd toolchain-funcs udev usr-ldscript |
41 |
+ |
42 |
+DESCRIPTION="Userland utilities for ZFS Linux kernel module" |
43 |
+HOMEPAGE="https://zfsonlinux.org/" |
44 |
+ |
45 |
+if [[ ${PV} == "9999" ]] ; then |
46 |
+ inherit autotools git-r3 |
47 |
+ EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git" |
48 |
+else |
49 |
+ SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz" |
50 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64" |
51 |
+fi |
52 |
+ |
53 |
+LICENSE="BSD-2 CDDL MIT" |
54 |
+SLOT="0" |
55 |
+IUSE="custom-cflags debug kernel-builtin libressl python +rootfs test-suite static-libs" |
56 |
+ |
57 |
+DEPEND=" |
58 |
+ ${PYTHON_DEPS} |
59 |
+ net-libs/libtirpc[static-libs?] |
60 |
+ sys-apps/util-linux[static-libs?] |
61 |
+ sys-libs/zlib[static-libs(+)?] |
62 |
+ virtual/awk |
63 |
+ virtual/libudev[static-libs(-)?] |
64 |
+ libressl? ( dev-libs/libressl:0=[static-libs?] ) |
65 |
+ !libressl? ( dev-libs/openssl:0=[static-libs?] ) |
66 |
+ python? ( |
67 |
+ virtual/python-cffi[${PYTHON_USEDEP}] |
68 |
+ ) |
69 |
+" |
70 |
+ |
71 |
+BDEPEND="virtual/awk |
72 |
+ virtual/pkgconfig |
73 |
+ python? ( |
74 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
75 |
+ ) |
76 |
+" |
77 |
+ |
78 |
+RDEPEND="${DEPEND} |
79 |
+ !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} ) |
80 |
+ !prefix? ( virtual/udev ) |
81 |
+ sys-fs/udev-init-scripts |
82 |
+ rootfs? ( |
83 |
+ app-arch/cpio |
84 |
+ app-misc/pax-utils |
85 |
+ !<sys-kernel/genkernel-3.5.1.1 |
86 |
+ ) |
87 |
+ test-suite? ( |
88 |
+ sys-apps/util-linux |
89 |
+ sys-devel/bc |
90 |
+ sys-block/parted |
91 |
+ sys-fs/lsscsi |
92 |
+ sys-fs/mdadm |
93 |
+ sys-process/procps |
94 |
+ virtual/modutils |
95 |
+ ) |
96 |
+" |
97 |
+ |
98 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
99 |
+ |
100 |
+RESTRICT="test" |
101 |
+ |
102 |
+PATCHES=( "${FILESDIR}/bash-completion-sudo.patch" ) |
103 |
+ |
104 |
+pkg_setup() { |
105 |
+ if use kernel_linux && use test-suite; then |
106 |
+ linux-info_pkg_setup |
107 |
+ |
108 |
+ if ! linux_config_exists; then |
109 |
+ ewarn "Cannot check the linux kernel configuration." |
110 |
+ else |
111 |
+ if use test-suite; then |
112 |
+ if linux_chkconfig_present BLK_DEV_LOOP; then |
113 |
+ eerror "The ZFS test suite requires loop device support enabled." |
114 |
+ eerror "Please enable it:" |
115 |
+ eerror " CONFIG_BLK_DEV_LOOP=y" |
116 |
+ eerror "in /usr/src/linux/.config or" |
117 |
+ eerror " Device Drivers --->" |
118 |
+ eerror " Block devices --->" |
119 |
+ eerror " [X] Loopback device support" |
120 |
+ fi |
121 |
+ fi |
122 |
+ fi |
123 |
+ fi |
124 |
+} |
125 |
+ |
126 |
+src_prepare() { |
127 |
+ default |
128 |
+ |
129 |
+ if [[ ${PV} == "9999" ]]; then |
130 |
+ eautoreconf |
131 |
+ else |
132 |
+ # Set revision number |
133 |
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" |
134 |
+ fi |
135 |
+ |
136 |
+ if use python; then |
137 |
+ pushd contrib/pyzfs >/dev/null || die |
138 |
+ distutils-r1_src_prepare |
139 |
+ popd >/dev/null || die |
140 |
+ fi |
141 |
+ |
142 |
+ # prevent errors showing up on zfs-mount stop, #647688 |
143 |
+ # openrc will unmount all filesystems anyway. |
144 |
+ sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" etc/init.d/zfs.in || die |
145 |
+} |
146 |
+ |
147 |
+src_configure() { |
148 |
+ use custom-cflags || strip-flags |
149 |
+ python_setup |
150 |
+ |
151 |
+ local myconf=( |
152 |
+ --bindir="${EPREFIX}/bin" |
153 |
+ --enable-shared |
154 |
+ --enable-systemd |
155 |
+ --enable-sysvinit |
156 |
+ --localstatedir="${EPREFIX}/var" |
157 |
+ --sbindir="${EPREFIX}/sbin" |
158 |
+ --with-config=user |
159 |
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut" |
160 |
+ --with-linux="${KV_DIR}" |
161 |
+ --with-linux-obj="${KV_OUT_DIR}" |
162 |
+ --with-udevdir="$(get_udevdir)" |
163 |
+ --with-python="${EPYTHON}" |
164 |
+ --with-systemdunitdir="$(systemd_get_systemunitdir)" |
165 |
+ --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" |
166 |
+ $(use_enable debug) |
167 |
+ $(use_enable python pyzfs) |
168 |
+ $(use_enable static-libs static) |
169 |
+ ) |
170 |
+ |
171 |
+ econf "${myconf[@]}" |
172 |
+ |
173 |
+ # temp hack for https://github.com/zfsonlinux/zfs/issues/9443 |
174 |
+ sed -i "s@/usr/local/@"${EPREFIX}/"@g" etc/init.d/zfs-functions || die |
175 |
+} |
176 |
+ |
177 |
+src_compile() { |
178 |
+ default |
179 |
+ if use python; then |
180 |
+ pushd contrib/pyzfs >/dev/null || die |
181 |
+ distutils-r1_src_compile |
182 |
+ popd >/dev/null || die |
183 |
+ fi |
184 |
+} |
185 |
+ |
186 |
+src_install() { |
187 |
+ default |
188 |
+ |
189 |
+ gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core |
190 |
+ |
191 |
+ use test-suite || rm -rf "${ED}/usr/share/zfs" |
192 |
+ |
193 |
+ if ! use static-libs; then |
194 |
+ find "${ED}/" -name '*.la' -delete || die |
195 |
+ fi |
196 |
+ |
197 |
+ dobashcomp contrib/bash_completion.d/zfs |
198 |
+ bashcomp_alias zfs zpool |
199 |
+ |
200 |
+ # strip executable bit from conf.d file |
201 |
+ fperms 0644 /etc/conf.d/zfs |
202 |
+ |
203 |
+ if use python; then |
204 |
+ pushd contrib/pyzfs >/dev/null || die |
205 |
+ distutils-r1_src_install |
206 |
+ popd >/dev/null || die |
207 |
+ fi |
208 |
+ |
209 |
+ # enforce best available python implementation |
210 |
+ python_fix_shebang "${ED}/bin" |
211 |
+ |
212 |
+} |
213 |
+ |
214 |
+pkg_postinst() { |
215 |
+ if use rootfs; then |
216 |
+ if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then |
217 |
+ elog "root on zfs requires initramfs to boot" |
218 |
+ elog "the following packages known to provide one and tested on regular basis:" |
219 |
+ elog " sys-kernel/dracut" |
220 |
+ elog " sys-kernel/genkernel" |
221 |
+ fi |
222 |
+ |
223 |
+ if has_version "<=sys-kernel/genkernel-3.5.3.3"; then |
224 |
+ einfo "genkernel version 3.5.3.3 and earlier does NOT support" |
225 |
+ einfo " unlocking pools with native zfs encryption enabled at boot" |
226 |
+ einfo " use dracut or >=genkernel-4 if you requre this functionality" |
227 |
+ fi |
228 |
+ fi |
229 |
+ |
230 |
+ if ! use kernel-builtin && [[ ${PV} = "9999" ]]; then |
231 |
+ einfo "Adding ${P} to the module database to ensure that the" |
232 |
+ einfo "kernel modules and userland utilities stay in sync." |
233 |
+ update_moduledb |
234 |
+ fi |
235 |
+ |
236 |
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \ |
237 |
+ einfo "You should add zfs-import to the boot runlevel." |
238 |
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \ |
239 |
+ einfo "You should add zfs-mount to the boot runlevel." |
240 |
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \ |
241 |
+ einfo "You should add zfs-share to the default runlevel." |
242 |
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \ |
243 |
+ einfo "You should add zfs-zed to the default runlevel." |
244 |
+} |
245 |
+ |
246 |
+pkg_postrm() { |
247 |
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then |
248 |
+ remove_moduledb |
249 |
+ fi |
250 |
+} |