1 |
commit: e6fb7c61f83bd9c58dfc488541ba4bf6750cb2f8 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 11 01:45:12 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 11 01:45:12 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6fb7c61 |
7 |
|
8 |
sys-fs/zfs: add 2.1.0_rc7 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-fs/zfs/Manifest | 2 + |
13 |
sys-fs/zfs/zfs-2.1.0_rc7.ebuild | 288 ++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 290 insertions(+) |
15 |
|
16 |
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest |
17 |
index 514e285239e..5c21005764e 100644 |
18 |
--- a/sys-fs/zfs/Manifest |
19 |
+++ b/sys-fs/zfs/Manifest |
20 |
@@ -2,3 +2,5 @@ DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcef |
21 |
DIST zfs-2.0.4.tar.gz 13123872 BLAKE2B 7e4780092c0a87d5d187cd5734ddc736574db80b500f155287640ef2230e09335cc9b6b26ec1b7d8ab1b7942673ea49a3007a81da372a6d2ac36f3908913045c SHA512 1dda92d424372bce7020f5215545485eae69211b6f0fb6bea3c7c22efac76c6a2662f0dd14a03f723b6a6fe73b1228ecca211a4034b86cf885bcadf38ba0dc6b |
22 |
DIST zfs-2.1.0-rc6.tar.gz 34777294 BLAKE2B 0080b03a9cf9717ae2bc7674e340dffafd923467368d8941df9be5a21f081e88745297e1a8b2ac5059e9f346949bbeb759a5fc8bcdb60c3be49b0645389ec8b1 SHA512 696d525c1c738a508d04366f8ffd0142aebe4498efbf129c9d38fa7c67dbec83554f55a2c4a5d7647a03ca0df173c2720fe85edbc859195f4ca19e04d2adf143 |
23 |
DIST zfs-2.1.0-rc6.tar.gz.asc 195 BLAKE2B a1267b8faffc75ac70082e261c6053b2070cbad014c92051ebc82af56b21bbe2e72e01e44c0701ed255a3201330bb56b5e1a72e12c1ae9f15f72883b53c17ec6 SHA512 afc0eb839de6b0b21b3d781dd74dce9f6f668b7b9fc079ea764666e28d4d3228b8a80641b6d0084851bffedfc3406dc0f829242f6b4247d192f554ba45ce3a4c |
24 |
+DIST zfs-2.1.0-rc7.tar.gz 34800406 BLAKE2B a645c3e19f521a7abb606cbcd619ea019abeb7810bd6476ecddcd76c7c801d6f1e3f197d49199eac72497db5c529b22bcd605b2e7ec2c236aec5216dc99b7dc1 SHA512 4e1cb1cc83454d92cac58110c219fca28dcf8361a5ea27dca955a5c88434b6e9ccd68892d93bf14d773056760f1907e004e65cc5d653308dd8996692ecba61f1 |
25 |
+DIST zfs-2.1.0-rc7.tar.gz.asc 195 BLAKE2B b772bba2f64bec51f11b5c51564a1449cd37d5e8e5c90eee1eb5c357193cab187bdeceef299c95622aed9c03601c1b5d67a941de12003c01e0af9ad68e82bfa2 SHA512 6c48eeab7658db1e9bac54da2f73087b1a58046504c507c94e58478f03f3b37336af254947964dbf9383575dc2cb3019640c7286ab0dfa5d5d9f55df96b34864 |
26 |
|
27 |
diff --git a/sys-fs/zfs/zfs-2.1.0_rc7.ebuild b/sys-fs/zfs/zfs-2.1.0_rc7.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..1cd4e63b4e6 |
30 |
--- /dev/null |
31 |
+++ b/sys-fs/zfs/zfs-2.1.0_rc7.ebuild |
32 |
@@ -0,0 +1,288 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+DISTUTILS_OPTIONAL=1 |
39 |
+DISTUTILS_USE_SETUPTOOLS=manual |
40 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
41 |
+ |
42 |
+inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript |
43 |
+ |
44 |
+DESCRIPTION="Userland utilities for ZFS Linux kernel module" |
45 |
+HOMEPAGE="https://github.com/openzfs/zfs" |
46 |
+ |
47 |
+if [[ ${PV} == "9999" ]]; then |
48 |
+ inherit git-r3 linux-mod |
49 |
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git" |
50 |
+else |
51 |
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc |
52 |
+ inherit verify-sig |
53 |
+ |
54 |
+ MY_P="${P/_rc/-rc}" |
55 |
+ SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" |
56 |
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )" |
57 |
+ S="${WORKDIR}/${P%_rc?}" |
58 |
+ |
59 |
+ if [[ ${PV} != *_rc* ]]; then |
60 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64" |
61 |
+ fi |
62 |
+fi |
63 |
+ |
64 |
+LICENSE="BSD-2 CDDL MIT" |
65 |
+# just libzfs soname major for now. |
66 |
+# possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. |
67 |
+# see libsoversion_check() below as well |
68 |
+SLOT="0/5" |
69 |
+IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" |
70 |
+ |
71 |
+DEPEND=" |
72 |
+ net-libs/libtirpc[static-libs?] |
73 |
+ sys-apps/util-linux[static-libs?] |
74 |
+ sys-libs/zlib[static-libs(+)?] |
75 |
+ virtual/libudev[static-libs(-)?] |
76 |
+ dev-libs/openssl:0=[static-libs?] |
77 |
+ !minimal? ( ${PYTHON_DEPS} ) |
78 |
+ pam? ( sys-libs/pam ) |
79 |
+ python? ( |
80 |
+ virtual/python-cffi[${PYTHON_USEDEP}] |
81 |
+ ) |
82 |
+" |
83 |
+ |
84 |
+BDEPEND="virtual/awk |
85 |
+ virtual/pkgconfig |
86 |
+ nls? ( sys-devel/gettext ) |
87 |
+ python? ( |
88 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
89 |
+ ) |
90 |
+" |
91 |
+ |
92 |
+if [[ ${PV} != "9999" ]] ; then |
93 |
+ BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" |
94 |
+fi |
95 |
+ |
96 |
+# awk is used for some scripts, completions, and the Dracut module |
97 |
+RDEPEND="${DEPEND} |
98 |
+ !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:=[dist-kernel?] ) |
99 |
+ !prefix? ( virtual/udev ) |
100 |
+ sys-fs/udev-init-scripts |
101 |
+ virtual/awk |
102 |
+ dist-kernel? ( virtual/dist-kernel:= ) |
103 |
+ rootfs? ( |
104 |
+ app-arch/cpio |
105 |
+ app-misc/pax-utils |
106 |
+ !<sys-kernel/genkernel-3.5.1.1 |
107 |
+ ) |
108 |
+ test-suite? ( |
109 |
+ sys-apps/kmod[tools] |
110 |
+ sys-apps/util-linux |
111 |
+ sys-devel/bc |
112 |
+ sys-block/parted |
113 |
+ sys-fs/lsscsi |
114 |
+ sys-fs/mdadm |
115 |
+ sys-process/procps |
116 |
+ ) |
117 |
+" |
118 |
+ |
119 |
+REQUIRED_USE=" |
120 |
+ !minimal? ( ${PYTHON_REQUIRED_USE} ) |
121 |
+ python? ( !minimal ) |
122 |
+ test-suite? ( !minimal ) |
123 |
+" |
124 |
+ |
125 |
+RESTRICT="test" |
126 |
+ |
127 |
+pkg_pretend() { |
128 |
+ use rootfs || return 0 |
129 |
+ |
130 |
+ if has_version virtual/dist-kernel && ! use dist-kernel; then |
131 |
+ ewarn "You have virtual/dist-kernel installed, but" |
132 |
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" |
133 |
+ ewarn "It's recommended to globally enable dist-kernel USE flag" |
134 |
+ ewarn "to auto-trigger initrd rebuilds with kernel updates" |
135 |
+ fi |
136 |
+} |
137 |
+ |
138 |
+pkg_setup() { |
139 |
+ if use kernel_linux; then |
140 |
+ linux-info_pkg_setup |
141 |
+ |
142 |
+ if ! linux_config_exists; then |
143 |
+ ewarn "Cannot check the linux kernel configuration." |
144 |
+ else |
145 |
+ if use test-suite; then |
146 |
+ if linux_chkconfig_present BLK_DEV_LOOP; then |
147 |
+ eerror "The ZFS test suite requires loop device support enabled." |
148 |
+ eerror "Please enable it:" |
149 |
+ eerror " CONFIG_BLK_DEV_LOOP=y" |
150 |
+ eerror "in /usr/src/linux/.config or" |
151 |
+ eerror " Device Drivers --->" |
152 |
+ eerror " Block devices --->" |
153 |
+ eerror " [X] Loopback device support" |
154 |
+ fi |
155 |
+ fi |
156 |
+ fi |
157 |
+ fi |
158 |
+} |
159 |
+ |
160 |
+libsoversion_check() { |
161 |
+ |
162 |
+ local bugurl libzfs_sover |
163 |
+ bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages" |
164 |
+ |
165 |
+ libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \ |
166 |
+ | grep -Eo '[0-9]+:[0-9]+:[0-9]+')" |
167 |
+ libzfs_sover="${libzfs_sover%%:*}" |
168 |
+ |
169 |
+ if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then |
170 |
+ echo |
171 |
+ eerror "BUG BUG BUG BUG BUG BUG BUG BUG" |
172 |
+ eerror "ebuild subslot does not match libzfs soversion!" |
173 |
+ eerror "libzfs soversion: ${libzfs_sover}" |
174 |
+ eerror "ebuild value: $(ver_cut 2 ${SLOT})" |
175 |
+ eerror "This is a bug in the ebuild, please use the following URL to report it" |
176 |
+ eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot" |
177 |
+ echo |
178 |
+ # we want to abort for releases, but just print a warning for live ebuild |
179 |
+ # to keep package installable |
180 |
+ [[ ${PV} == "9999" ]] || die |
181 |
+ fi |
182 |
+} |
183 |
+ |
184 |
+src_prepare() { |
185 |
+ default |
186 |
+ libsoversion_check |
187 |
+ |
188 |
+ if [[ ${PV} == "9999" ]]; then |
189 |
+ eautoreconf |
190 |
+ else |
191 |
+ # Set revision number |
192 |
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" |
193 |
+ fi |
194 |
+ |
195 |
+ if use python; then |
196 |
+ pushd contrib/pyzfs >/dev/null || die |
197 |
+ distutils-r1_src_prepare |
198 |
+ popd >/dev/null || die |
199 |
+ fi |
200 |
+ |
201 |
+ # prevent errors showing up on zfs-mount stop, #647688 |
202 |
+ # openrc will unmount all filesystems anyway. |
203 |
+ sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die |
204 |
+} |
205 |
+ |
206 |
+src_configure() { |
207 |
+ use custom-cflags || strip-flags |
208 |
+ use minimal || python_setup |
209 |
+ |
210 |
+ local myconf=( |
211 |
+ --bindir="${EPREFIX}/bin" |
212 |
+ --enable-shared |
213 |
+ --enable-systemd |
214 |
+ --enable-sysvinit |
215 |
+ --localstatedir="${EPREFIX}/var" |
216 |
+ --sbindir="${EPREFIX}/sbin" |
217 |
+ --with-config=user |
218 |
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut" |
219 |
+ --with-linux="${KV_DIR}" |
220 |
+ --with-linux-obj="${KV_OUT_DIR}" |
221 |
+ --with-udevdir="$(get_udevdir)" |
222 |
+ --with-pamconfigsdir="${EPREFIX}/unwanted_files" |
223 |
+ --with-pammoduledir="$(getpam_mod_dir)" |
224 |
+ --with-systemdunitdir="$(systemd_get_systemunitdir)" |
225 |
+ --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" |
226 |
+ --with-vendor=gentoo |
227 |
+ $(use_enable debug) |
228 |
+ $(use_enable nls) |
229 |
+ $(use_enable pam) |
230 |
+ $(use_enable python pyzfs) |
231 |
+ $(use_enable static-libs static) |
232 |
+ $(usex minimal --without-python --with-python="${EPYTHON}") |
233 |
+ ) |
234 |
+ |
235 |
+ econf "${myconf[@]}" |
236 |
+} |
237 |
+ |
238 |
+src_compile() { |
239 |
+ default |
240 |
+ if use python; then |
241 |
+ pushd contrib/pyzfs >/dev/null || die |
242 |
+ distutils-r1_src_compile |
243 |
+ popd >/dev/null || die |
244 |
+ fi |
245 |
+} |
246 |
+ |
247 |
+src_install() { |
248 |
+ default |
249 |
+ |
250 |
+ gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool |
251 |
+ |
252 |
+ use pam && { rm -rv "${ED}/unwanted_files" || die ; } |
253 |
+ |
254 |
+ use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; } |
255 |
+ |
256 |
+ if ! use static-libs; then |
257 |
+ find "${ED}" -name '*.la' -delete || die |
258 |
+ fi |
259 |
+ |
260 |
+ dobashcomp contrib/bash_completion.d/zfs |
261 |
+ bashcomp_alias zfs zpool |
262 |
+ |
263 |
+ # strip executable bit from conf.d file |
264 |
+ fperms 0644 /etc/conf.d/zfs |
265 |
+ |
266 |
+ if use python; then |
267 |
+ pushd contrib/pyzfs >/dev/null || die |
268 |
+ distutils-r1_src_install |
269 |
+ popd >/dev/null || die |
270 |
+ fi |
271 |
+ |
272 |
+ # enforce best available python implementation |
273 |
+ use minimal || python_fix_shebang "${ED}/bin" |
274 |
+} |
275 |
+ |
276 |
+pkg_postinst() { |
277 |
+ # we always need userspace utils in sync with zfs-kmod |
278 |
+ # so force initrd update for userspace as well, to avoid |
279 |
+ # situation when zfs-kmod trigger initrd rebuild before |
280 |
+ # userspace component is rebuilt |
281 |
+ # KV_* variables are provided by linux-info.eclass |
282 |
+ if [[ -z ${ROOT} ]] && use dist-kernel; then |
283 |
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" |
284 |
+ fi |
285 |
+ |
286 |
+ if use rootfs; then |
287 |
+ if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then |
288 |
+ elog "Root on zfs requires an initramfs to boot" |
289 |
+ elog "The following packages provide one and are tested on a regular basis:" |
290 |
+ elog " sys-kernel/dracut" |
291 |
+ elog " sys-kernel/genkernel" |
292 |
+ fi |
293 |
+ fi |
294 |
+ |
295 |
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then |
296 |
+ einfo "Adding ${P} to the module database to ensure that the" |
297 |
+ einfo "kernel modules and userland utilities stay in sync." |
298 |
+ update_moduledb |
299 |
+ fi |
300 |
+ |
301 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
302 |
+ einfo "Please refer to ${EROOT}/lib/systemd/system-preset/50-zfs.preset" |
303 |
+ einfo "for default zfs systemd service configuration" |
304 |
+ else |
305 |
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \ |
306 |
+ einfo "You should add zfs-import to the boot runlevel." |
307 |
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \ |
308 |
+ einfo "You should add zfs-mount to the boot runlevel." |
309 |
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \ |
310 |
+ einfo "You should add zfs-share to the default runlevel." |
311 |
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \ |
312 |
+ einfo "You should add zfs-zed to the default runlevel." |
313 |
+ fi |
314 |
+} |
315 |
+ |
316 |
+pkg_postrm() { |
317 |
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then |
318 |
+ remove_moduledb |
319 |
+ fi |
320 |
+} |