summaryrefslogtreecommitdiff
path: root/sys-fs/zfs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-09 15:43:36 +0100
commit2719f73b6813d11d13a9650cdd2ab8ec6e69385d (patch)
tree8c816148bcbd22757d892089c989ae614eae4f5a /sys-fs/zfs
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
Diffstat (limited to 'sys-fs/zfs')
-rw-r--r--sys-fs/zfs/Manifest12
-rw-r--r--sys-fs/zfs/files/2.1.5-build-issues.patch74
-rw-r--r--sys-fs/zfs/files/2.1.5-dracut-non-root.patch33
-rw-r--r--sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch14
-rw-r--r--sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch60
-rw-r--r--sys-fs/zfs/zfs-2.0.7-r1.ebuild (renamed from sys-fs/zfs/zfs-2.0.7.ebuild)7
-rw-r--r--sys-fs/zfs/zfs-2.1.4-r1.ebuild311
-rw-r--r--sys-fs/zfs/zfs-2.1.5-r1.ebuild (renamed from sys-fs/zfs/zfs-2.1.4.ebuild)12
-rw-r--r--sys-fs/zfs/zfs-2.1.5-r3.ebuild319
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild11
10 files changed, 847 insertions, 6 deletions
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 04ea52a86227..dbdfa3360ff6 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,6 +1,10 @@
AUX 2.0.7-scrub-timers.patch 3128 BLAKE2B f7f55905df7e804bef3818c4b5ce9c34595bcfd77c8d0fa3fb94156d878e077f878a3acd76cc92a57a056d9e8643c9d769cce0b1f067ab228f75d3242178b588 SHA512 a2a649e5b59af8dc26312cf8adf5716671da9e897788af3b6598eec653a5cd73ef25f703ac1b549c9927036738c016acc629c9bfc6dca0335b1d1327f85c6af4
AUX 2.1.2-musl-tests.patch 1923 BLAKE2B 0029cba42b7914166cec894e30730f205f2c1508dd7f0c46b2567c365b5c6daa1d65cfc9ede9180f4831c924760b6a9a9ac81972e991c439148ad21bfcb3dfda SHA512 be96efa5b0b407388fe4f0066c5516a1b882bb158376d072373d6c73f2dc1414a61eda925fa12a0708d15e5c791c590f4b83809262d21e2160a0d931e608ab80
AUX 2.1.2-openrc-vendor.patch 1469 BLAKE2B d8c20bbeee95db8eb4c26e6d5b1798e89c3b152c03ddc852dea6810fb170f70e77a200bdbda00953a792d05467f268260ccfcc1d1b20576bfb21c65fde6e93df SHA512 ae5709acef0531146f7ac020fd4038dc76f99dd43c8322b3934522c2e74f90d60106c30de679cb9aaaa3f6ece00ed93e490c0787e573fc0871c30d73842ea04e
+AUX 2.1.5-build-issues.patch 2262 BLAKE2B 6d7540c2b8f97ba1a4e84109cda702cb6dd78b89979e757ffe7b7ce6ed98792daae0b56696dfbf264c772d2a90836a9ad5786ca81c13737cb2a5f6a6eb50e7dc SHA512 1b1e8e29db530c16385e8461a0f068cf2cbcd08f347d516ffecf26c3c995e20f454b8a77a380bce5b789ab6d5fd83a77c45d4f356532a6144cdf230cc38c9672
+AUX 2.1.5-dracut-non-root.patch 1418 BLAKE2B ed5e530c05b586ae73bacf274448574b72bd48aa395ad03c6ce943979ab880cae221feaaa975329979124a21a2159fc60d92dbced0bcadc678a600dc84a6461b SHA512 ce5834d12ba746e0063df3f23f17b5e7a15e5b84d840fa870a9bd02ae8fdef2a9e2d18dbbac4a3de299d2bddf379ae062338c7fb5acaa2101e55bfcbfa2dc261
+AUX 2.1.5-dracut-zfs-missing.patch 309 BLAKE2B e66e700757aa6498b71d714c13e29e671455c77b1b319c7e951b10edc7179f37149b093c5b24fa17b487b9025112bcf31dffb441bbdde7943d90d16443140384 SHA512 0de374270a4814a937e5d97ec4261c5f77ef44fb8f3afc74c4b802d140e4595362b288ff91b8a5c4e9754871969d1f6af05eafa9c91e38c8b913c26ba78b1676
+AUX 2.1.5-r2-dracut-non-root.patch 1823 BLAKE2B b6954c1648742cb19b1cea5709bdba78477731232bfd6a180f2b2aa179ba2e10ac968af6658fc9fd9a7a03127098c7e4401f3ad803e603d4e114d995b370da3d SHA512 33b3244de91f3d51ef2c2eff2ea4515890b7fa9b39a077b4034f770772077e75e6c5db187c76aa19dd2fb60dac91de35d70fbd84be3704bb950bbf8d4656c29a
AUX bash-completion-sudo.patch 905 BLAKE2B 92e58ff097893436d589f7df0134e09d2e0699ae82618c4c14caf4b26cb466367a5372d7e0a030aa857d024e3db0faef4bb5fa32c54f41f0d4766693a95ba5ab SHA512 e53c79401f4c634a94af27b2f88a40440b68a4c192fd1944668786650aaa0f1f08dff851dca5b9666ce8bba1f0e2b7cb195314cd9d1314c9bab1194d03122319
DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21 SHA512 1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38 SHA512 b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
@@ -8,8 +12,10 @@ DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B be303f1181f604770536aa4aa61d5319ec408abbd
DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a SHA512 53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee
DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1cb0384c9c78b30062f5c29142ac37ab9dbdaf96c91456d11c317d782d3524ade293f03fda983e5992b79e49 SHA512 d9ccf1049cefa9167d25f71fbdca70092cd02368b60f09341e6489fb68dc5f89e87b026b0191f4d81181a8851449124d824a1d959d0e2fb29c8a3d624edc4f03
DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786 SHA512 224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94
-EBUILD zfs-2.0.7.ebuild 8463 BLAKE2B 652e7b21478954257ed02ef341264da7d5ded2ac7f7361e760ede9638e589c61c95b5862878343935ee4271850f943562358546c9c521c1eb1e4959e6bf74b5e SHA512 f8d8ef189af7597c67ec8769ac8e615ab366eca16f797f77e596d7a2791eaa628c1e66557f751ad3de66f971c41845ae505d7a397b873ff91de391a57e1e0a37
-EBUILD zfs-2.1.4.ebuild 8673 BLAKE2B d8c05a44f18adfc4a0e95b12576947ca3aa90333e2d1cf06ea1975f49e56446b8e5cbeba19250c82722f558432406f27ed9a798daafda147023f31e6aa699c86 SHA512 d054c058b248b88158ba165fa33c5f7772bde2efc6eadb2c6792243e353ae025b5bf7cab8101689ffc57960e8827018b34165dce7f14c17e855016c6f64006ed
+EBUILD zfs-2.0.7-r1.ebuild 8668 BLAKE2B 5ee2a32d4d623e526ae551752f911cf816d8a9124dea9d0d311fa91c31bcf58c4c8c21d3020bc2174b57fad0e7ebe46ef3cf570e7b8188f8e898bbf9cd2c4d8f SHA512 3b1187a9693ef1c554f2ae7be0a532d694e7cb7c431a017ebc34cfda9d54e63928d0659e8f238c625986c0f2615c8ebc1bfa23599a2a6651833f126fc4eda635
+EBUILD zfs-2.1.4-r1.ebuild 8878 BLAKE2B 047fa1439d2cf2bc6b4eedcd2e324403a5461b5856b88b880951253981192c0e87525de45e5658aef2e5f3e8eb67326ca17b5961a2b19870c96256c1a92f5a7b SHA512 b57efc204eb954aad1765ac84ae8ae3349e931d54aab955d0be5b3dec2ef8cd55ca7ae263038c9f0e6d4b2511b4d90ea0259cf042f454ceafaccd02f324fab0e
+EBUILD zfs-2.1.5-r1.ebuild 8755 BLAKE2B 117d334d76866f6aa2c78ef0be12da14bf7f00f2a6dddd5a6c46f4f04f846f8c43e360237f3875b92c43bfd313cdc34c3c7eff4a0527de05fb2baeb1072a3c6b SHA512 c287e39dd0bc1869d41209505b7c4af28708a423f1aeb40a52371e5be90a15e6288e8eef5a3cfab3c02e0bbace87f731789503c411a5dd641a8e6b152c9732e0
+EBUILD zfs-2.1.5-r3.ebuild 9012 BLAKE2B aba14b0ecb731dc05354186be733f0f3fcdc195cf9dcd369b30bb1cc63bda9ef9b3de9f65f6a6bfdecdbb1f71350eb52b125a0897648dee92ae06c84e5612c9d SHA512 cd60ca314e1daad078816cb6ff94cc8ba36294db514c5076c0971a3a7de079f6a7893470eedc622fbde990455c066ef9247ee991c461433b5ed30f6509184a30
EBUILD zfs-2.1.5.ebuild 8629 BLAKE2B 1a41e5f11c63238de677cd39af866b5670801c3e289b6e5bbf34a145219d89995ff07f9f2ce49ec57b3ddab73546213f549be396d58d2e6adfcf265a5cb5687b SHA512 9cbfa779f28e399de1695b199939fa46bf248eb88b2ec0b5e924698312360c25673381b426a120850374f17c8a23ee29337ed6e857d8389160a490f7da891f35
-EBUILD zfs-9999.ebuild 8629 BLAKE2B 1a41e5f11c63238de677cd39af866b5670801c3e289b6e5bbf34a145219d89995ff07f9f2ce49ec57b3ddab73546213f549be396d58d2e6adfcf265a5cb5687b SHA512 9cbfa779f28e399de1695b199939fa46bf248eb88b2ec0b5e924698312360c25673381b426a120850374f17c8a23ee29337ed6e857d8389160a490f7da891f35
+EBUILD zfs-9999.ebuild 8893 BLAKE2B 34446b9139f93a8e8fd45fd8d82dd55c788bb453fef41453b517388e2a9980bdd0d1768b78d85e47bc42e36400364c1e546ff5c68a9fea3a8abea2b016c6f9bd SHA512 1f80d3cb72bbb1eaac7542ed3d0c3119ab1223cfbe454acc474cff5a462bd126638dd6a380274673b14835625288e614763226e4721ed5f6fa5c387025879f38
MISC metadata.xml 2194 BLAKE2B 57b0d1bcbcd78039d0cfd20f087bdfc339eefebbec3150af3c06d2e1a6dee882c4f8f97a9e470f63d4d628441a10650bda8b1843e33240dcc8d3e2ad55d104ec SHA512 fac8750d64d844b397fbbdcca9b7aea671f7642c64da92b89480439919ced80b9b6292ee3a2cc55e412e3c55dd02c418ef7c056f2973b7eb0f53ee763e099098
diff --git a/sys-fs/zfs/files/2.1.5-build-issues.patch b/sys-fs/zfs/files/2.1.5-build-issues.patch
new file mode 100644
index 000000000000..cca6561b16f7
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-build-issues.patch
@@ -0,0 +1,74 @@
+https://github.com/openzfs/zfs/commit/a6e8113fed8a508ffda13cf1c4d8da99a4e8133a
+https://github.com/openzfs/zfs/commit/60e389ca10085acfa7cd35f79ab4465d968a942f
+Cherry-picked from https://github.com/openzfs/zfs/pull/13575
+
+https://bugs.gentoo.org/855182
+--- a/config/always-compiler-options.m4
++++ b/config/always-compiler-options.m4
+@@ -205,6 +205,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [
+ AC_SUBST([NO_OMIT_FRAME_POINTER])
+ ])
+
++dnl #
++dnl # Check if cc supports -Winfinite-recursion option.
++dnl #
++AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [
++ AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
++
++ saved_flags="$CFLAGS"
++ CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
++
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
++ INFINITE_RECURSION=-Winfinite-recursion
++ AC_DEFINE([HAVE_INFINITE_RECURSION], 1,
++ [Define if compiler supports -Winfinite-recursion])
++ AC_MSG_RESULT([yes])
++ ], [
++ INFINITE_RECURSION=
++ AC_MSG_RESULT([no])
++ ])
++
++ CFLAGS="$saved_flags"
++ AC_SUBST([INFINITE_RECURSION])
++])
++
+ dnl #
+ dnl # Check if cc supports -fno-ipa-sra option.
+ dnl #
+--- a/config/zfs-build.m4
++++ b/config/zfs-build.m4
+@@ -211,6 +211,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
+
+ ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE
+ ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE
++ ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
+ ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
+ ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
+ ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
+--- a/module/lua/ldo.c
++++ b/module/lua/ldo.c
+@@ -168,6 +168,13 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
+ L->top = oldtop + 1;
+ }
+
++/*
++ * Silence infinite recursion warning which was added to -Wall in gcc 12.1
++ */
++#if defined(HAVE_INFINITE_RECURSION)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Winfinite-recursion"
++#endif
+
+ l_noret luaD_throw (lua_State *L, int errcode) {
+ if (L->errorJmp) { /* thread has an error handler? */
+@@ -190,6 +197,10 @@ l_noret luaD_throw (lua_State *L, int errcode) {
+ }
+ }
+
++#if defined(HAVE_INFINITE_RECURSION)
++#pragma GCC diagnostic pop
++#endif
++
+
+ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
+ unsigned short oldnCcalls = L->nCcalls;
diff --git a/sys-fs/zfs/files/2.1.5-dracut-non-root.patch b/sys-fs/zfs/files/2.1.5-dracut-non-root.patch
new file mode 100644
index 000000000000..6d1caf92cd2d
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-dracut-non-root.patch
@@ -0,0 +1,33 @@
+https://github.com/openzfs/zfs/pull/13589
+https://bugs.gentoo.org/854333
+
+From ef9d996669cc2ec596d4e90753b89b32a3f0ce59 Mon Sep 17 00:00:00 2001
+From: "Andrew J. Hesford" <ajh@sideband.org>
+Date: Fri, 24 Jun 2022 11:05:53 -0400
+Subject: [PATCH] Dracut module: fix parsing of root= kernel command-line
+ argument
+
+Some Dracut modules may read the `root=` kernel command-line argument
+and rewrite it; in particular, `rootfs-block` installs a command-line
+hook that to canonicalize arguments that specify block devices. If the
+`zfs` module is added to an initramfs (which it is, by default, as long
+as the core ZFS utilities are available) on a system that does not use a
+ZFS root filesystem, the `zfs` module will overwrite the `root` shell
+variable with the contents of the kernel command-line in the process of
+determining if it should control mounting the root. This breaks the
+initramfs. To solve this problem, only parse the kernel command-line
+directly if the `root` shell variable is empty; otherwise, rely on the
+parsing (and possible rewriting) done by other modules.
+
+Signed-off-by: Andrew J. Hesford <ajh@sideband.org>
+--- a/contrib/dracut/90zfs/zfs-lib.sh.in
++++ b/contrib/dracut/90zfs/zfs-lib.sh.in
+@@ -88,7 +88,7 @@ decode_root_args() {
+ return
+ fi
+
+- root=$(getarg root=)
++ [ -n "$root" ] || root=$(getarg root=)
+ rootfstype=$(getarg rootfstype=)
+
+ # shellcheck disable=SC2249
diff --git a/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch
new file mode 100644
index 000000000000..077bcd55f6d5
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch
@@ -0,0 +1,14 @@
+https://github.com/openzfs/zfs/commit/ebbfc6cb853d2d2f3f0671362d5ff5588be39e9d
+https://github.com/openzfs/zfs/issues/13595
+--- b/contrib/dracut/90zfs/module-setup.sh.in
++++ a/contrib/dracut/90zfs/module-setup.sh.in
+@@ -19,7 +19,7 @@
+ }
+
+ installkernel() {
++ instmods zfs
+- instmods -c zfs
+ }
+
+ install() {
+
diff --git a/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch
new file mode 100644
index 000000000000..a9c6130f5b00
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch
@@ -0,0 +1,60 @@
+https://github.com/openzfs/zfs/commit/eefe83eaa68f7cb4a49c580dd940d3688e42c849
+https://bugs.gentoo.org/854333
+
+From eefe83eaa68f7cb4a49c580dd940d3688e42c849 Mon Sep 17 00:00:00 2001
+From: Toyam Cox <aviator45003@gmail.com>
+Date: Thu, 30 Jun 2022 13:47:58 -0400
+Subject: [PATCH] dracut: fix boot on non-zfs-root systems
+
+Simply prevent overwriting root until it needs to be overwritten.
+
+Dracut could change this value before this module is called, but won't
+change the kernel command line.
+
+Reviewed-by: Andrew J. Hesford <ajh@sideband.org>
+Signed-off-by: Toyam Cox <vaelatern@voidlinux.org>
+Closes #13592
+---
+ contrib/dracut/90zfs/zfs-lib.sh.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in b/contrib/dracut/90zfs/zfs-lib.sh.in
+index e44673c2d75..3a43e514d6f 100755
+--- a/contrib/dracut/90zfs/zfs-lib.sh.in
++++ b/contrib/dracut/90zfs/zfs-lib.sh.in
+@@ -88,11 +88,11 @@ decode_root_args() {
+ return
+ fi
+
+- root=$(getarg root=)
++ xroot=$(getarg root=)
+ rootfstype=$(getarg rootfstype=)
+
+ # shellcheck disable=SC2249
+- case "$root" in
++ case "$xroot" in
+ ""|zfs|zfs:|zfs:AUTO)
+ root=zfs:AUTO
+ rootfstype=zfs
+@@ -100,7 +100,7 @@ decode_root_args() {
+ ;;
+
+ ZFS=*|zfs:*)
+- root="${root#zfs:}"
++ root="${xroot#zfs:}"
+ root="${root#ZFS=}"
+ root=$(echo "$root" | tr '+' ' ')
+ rootfstype=zfs
+@@ -109,9 +109,9 @@ decode_root_args() {
+ esac
+
+ if [ "$rootfstype" = "zfs" ]; then
+- case "$root" in
++ case "$xroot" in
+ "") root=zfs:AUTO ;;
+- *) root=$(echo "$root" | tr '+' ' ') ;;
++ *) root=$(echo "$xroot" | tr '+' ' ') ;;
+ esac
+ return 0
+ fi
+
diff --git a/sys-fs/zfs/zfs-2.0.7.ebuild b/sys-fs/zfs/zfs-2.0.7-r1.ebuild
index 2a638aee9616..68d9116fd3de 100644
--- a/sys-fs/zfs/zfs-2.0.7.ebuild
+++ b/sys-fs/zfs/zfs-2.0.7-r1.ebuild
@@ -191,6 +191,13 @@ src_configure() {
use custom-cflags || strip-flags
use minimal || python_setup
+ # All the same issue:
+ # Segfaults w/ GCC 12 and 'zfs send'
+ # bug #856373
+ # https://github.com/openzfs/zfs/issues/13620
+ # https://github.com/openzfs/zfs/issues/13605
+ append-flags -fno-tree-vectorize
+
local myconf=(
--bindir="${EPREFIX}/bin"
--enable-shared
diff --git a/sys-fs/zfs/zfs-2.1.4-r1.ebuild b/sys-fs/zfs/zfs-2.1.4-r1.ebuild
new file mode 100644
index 000000000000..fb6aab2ca7e7
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.1.4-r1.ebuild
@@ -0,0 +1,311 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3 linux-mod
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
+ inherit verify-sig
+
+ MY_P="${P/_rc/-rc}"
+ SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )"
+ S="${WORKDIR}/${P%_rc?}"
+
+ # 2.1.3 unkeyworded briefly for some testing
+ if [[ ${PV} != *_rc* ]]; then
+ KEYWORDS="amd64 arm64 ppc64 ~riscv"
+ fi
+fi
+
+LICENSE="BSD-2 CDDL MIT"
+# just libzfs soname major for now.
+# possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered.
+# see libsoversion_check() below as well
+SLOT="0/5"
+IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite"
+
+DEPEND="
+ net-libs/libtirpc:=
+ sys-apps/util-linux
+ sys-libs/zlib
+ virtual/libudev:=
+ dev-libs/openssl:0=
+ !minimal? ( ${PYTHON_DEPS} )
+ pam? ( sys-libs/pam )
+ python? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ )
+"
+
+BDEPEND="virtual/awk
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ || (
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/distlib[${PYTHON_USEDEP}]
+ )
+ )
+"
+
+if [[ ${PV} != "9999" ]] ; then
+ BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
+fi
+
+# awk is used for some scripts, completions, and the Dracut module
+RDEPEND="${DEPEND}
+ !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= )
+ !prefix? ( virtual/udev )
+ sys-fs/udev-init-scripts
+ virtual/awk
+ dist-kernel? ( virtual/dist-kernel:= )
+ rootfs? (
+ app-arch/cpio
+ app-misc/pax-utils
+ !<sys-kernel/genkernel-3.5.1.1
+ )
+ test-suite? (
+ app-shells/ksh
+ sys-apps/kmod[tools]
+ sys-apps/util-linux
+ sys-devel/bc
+ sys-block/parted
+ sys-fs/lsscsi
+ sys-fs/mdadm
+ sys-process/procps
+ )
+"
+
+# PDEPEND in this form is needed to trick portage suggest
+# enabling dist-kernel if only 1 package have it set, without suggesting to disable
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )"
+
+REQUIRED_USE="
+ !minimal? ( ${PYTHON_REQUIRED_USE} )
+ python? ( !minimal )
+ test-suite? ( !minimal )
+"
+
+RESTRICT="test"
+
+pkg_pretend() {
+ use rootfs || return 0
+
+ if has_version virtual/dist-kernel && ! use dist-kernel; then
+ ewarn "You have virtual/dist-kernel installed, but"
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
+ ewarn "It's recommended to globally enable dist-kernel USE flag"
+ ewarn "to auto-trigger initrd rebuilds with kernel updates"
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-info_pkg_setup
+
+ if ! linux_config_exists; then
+ ewarn "Cannot check the linux kernel configuration."
+ else
+ if use test-suite; then
+ if linux_chkconfig_present BLK_DEV_LOOP; then
+ eerror "The ZFS test suite requires loop device support enabled."
+ eerror "Please enable it:"
+ eerror " CONFIG_BLK_DEV_LOOP=y"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Device Drivers --->"
+ eerror " Block devices --->"
+ eerror " [X] Loopback device support"
+ fi
+ fi
+ fi
+ fi
+}
+
+libsoversion_check() {
+ local bugurl libzfs_sover
+ bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages"
+
+ libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \
+ | grep -Eo '[0-9]+:[0-9]+:[0-9]+')"
+ libzfs_sover="${libzfs_sover%%:*}"
+
+ if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then
+ echo
+ eerror "BUG BUG BUG BUG BUG BUG BUG BUG"
+ eerror "ebuild subslot does not match libzfs soversion!"
+ eerror "libzfs soversion: ${libzfs_sover}"
+ eerror "ebuild value: $(ver_cut 2 ${SLOT})"
+ eerror "This is a bug in the ebuild, please use the following URL to report it"
+ eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot"
+ echo
+ # we want to abort for releases, but just print a warning for live ebuild
+ # to keep package installable
+ [[ ${PV} == "9999" ]] || die
+ fi
+}
+
+src_prepare() {
+ default
+ libsoversion_check
+
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != "9999" ]]; then
+ # Set revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_prepare
+ popd >/dev/null || die
+ fi
+
+ # prevent errors showing up on zfs-mount stop, #647688
+ # openrc will unmount all filesystems anyway.
+ sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ use minimal || python_setup
+
+ # All the same issue:
+ # Segfaults w/ GCC 12 and 'zfs send'
+ # bug #856373
+ # https://github.com/openzfs/zfs/issues/13620
+ # https://github.com/openzfs/zfs/issues/13605
+ append-flags -fno-tree-vectorize
+
+ local myconf=(
+ --bindir="${EPREFIX}/bin"
+ --enable-shared
+ --enable-sysvinit
+ --localstatedir="${EPREFIX}/var"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=user
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut"
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-udevdir="$(get_udevdir)"
+ --with-pamconfigsdir="${EPREFIX}/unwanted_files"
+ --with-pammoduledir="$(getpam_mod_dir)"
+ --with-systemdunitdir="$(systemd_get_systemunitdir)"
+ --with-systemdpresetdir="$(systemd_get_systempresetdir)"
+ --with-vendor=gentoo
+ # Building zfs-mount-generator.c on musl breaks as strndupa
+ # isn't available. But systemd doesn't support musl anyway, so
+ # just disable building it.
+ $(use_enable !elibc_musl systemd)
+ $(use_enable debug)
+ $(use_enable nls)
+ $(use_enable pam)
+ $(use_enable python pyzfs)
+ --disable-static
+ $(usex minimal --without-python --with-python="${EPYTHON}")
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ default
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool
+
+ use pam && { rm -rv "${ED}/unwanted_files" || die ; }
+
+ use test-suite || { rm -r "${ED}"/usr/share/zfs/{test-runner,zfs-tests,runfiles,*sh} || die ; }
+
+ find "${ED}" -name '*.la' -delete || die
+
+ dobashcomp contrib/bash_completion.d/zfs
+ bashcomp_alias zfs zpool
+
+ # strip executable bit from conf.d file
+ fperms 0644 /etc/conf.d/zfs
+
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_install
+ popd >/dev/null || die
+ fi
+
+ # enforce best available python implementation
+ use minimal || python_fix_shebang "${ED}/bin"
+}
+
+pkg_postinst() {
+ udev_reload
+
+ # we always need userspace utils in sync with zfs-kmod
+ # so force initrd update for userspace as well, to avoid
+ # situation when zfs-kmod trigger initrd rebuild before
+ # userspace component is rebuilt
+ # KV_* variables are provided by linux-info.eclass
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+
+ if use rootfs; then
+ if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
+ elog "Root on zfs requires an initramfs to boot"
+ elog "The following packages provide one and are tested on a regular basis:"
+ elog " sys-kernel/dracut ( preferred, module maintained by zfs developers )"
+ elog " sys-kernel/genkernel"
+ fi
+ fi
+
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
+ einfo "Adding ${P} to the module database to ensure that the"
+ einfo "kernel modules and userland utilities stay in sync."
+ update_moduledb
+ fi
+
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ einfo "Please refer to ${EROOT}/$(systemd_get_systempresetdir)/50-zfs.preset"
+ einfo "for default zfs systemd service configuration"
+ else
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
+ einfo "You should add zfs-import to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-load-key" ]] || \
+ einfo "You should add zfs-load-key to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
+ einfo "You should add zfs-mount to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
+ einfo "You should add zfs-share to the default runlevel."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
+ einfo "You should add zfs-zed to the default runlevel."
+ fi
+}
+
+pkg_postrm() {
+ udev_reload
+
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
+ remove_moduledb
+ fi
+}
diff --git a/sys-fs/zfs/zfs-2.1.4.ebuild b/sys-fs/zfs/zfs-2.1.5-r1.ebuild
index 465412d2cee6..7f0466ea0e20 100644
--- a/sys-fs/zfs/zfs-2.1.4.ebuild
+++ b/sys-fs/zfs/zfs-2.1.5-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=7
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{8,9,10} )
+PYTHON_COMPAT=( python3_{8..10} )
inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript
@@ -23,9 +23,8 @@ else
SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )"
S="${WORKDIR}/${P%_rc?}"
- # 2.1.3 unkeyworded briefly for some testing
if [[ ${PV} != *_rc* ]]; then
- KEYWORDS="amd64 arm64 ppc64 ~riscv"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
fi
fi
@@ -101,6 +100,13 @@ REQUIRED_USE="
RESTRICT="test"
+PATCHES=(
+ # bug #855182
+ "${FILESDIR}"/${PV}-build-issues.patch
+ # bug #854333
+ "${FILESDIR}"/${PV}-dracut-non-root.patch
+)
+
pkg_pretend() {
use rootfs || return 0
diff --git a/sys-fs/zfs/zfs-2.1.5-r3.ebuild b/sys-fs/zfs/zfs-2.1.5-r3.ebuild
new file mode 100644
index 000000000000..a2c22c0ac350
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.1.5-r3.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3 linux-mod
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
+ inherit verify-sig
+
+ MY_P="${P/_rc/-rc}"
+ SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )"
+ S="${WORKDIR}/${P%_rc?}"
+
+ if [[ ${PV} != *_rc* ]]; then
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+ fi
+fi
+
+LICENSE="BSD-2 CDDL MIT"
+# just libzfs soname major for now.
+# possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered.
+# see libsoversion_check() below as well
+SLOT="0/5"
+IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite"
+
+DEPEND="
+ net-libs/libtirpc:=
+ sys-apps/util-linux
+ sys-libs/zlib
+ virtual/libudev:=
+ dev-libs/openssl:0=
+ !minimal? ( ${PYTHON_DEPS} )
+ pam? ( sys-libs/pam )
+ python? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ )
+"
+
+BDEPEND="virtual/awk
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ || (
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/distlib[${PYTHON_USEDEP}]
+ )
+ )
+"
+
+if [[ ${PV} != "9999" ]] ; then
+ BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
+fi
+
+# awk is used for some scripts, completions, and the Dracut module
+RDEPEND="${DEPEND}
+ !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= )
+ !prefix? ( virtual/udev )
+ sys-fs/udev-init-scripts
+ virtual/awk
+ dist-kernel? ( virtual/dist-kernel:= )
+ rootfs? (
+ app-arch/cpio
+ app-misc/pax-utils
+ !<sys-kernel/genkernel-3.5.1.1
+ )
+ test-suite? (
+ app-shells/ksh
+ sys-apps/kmod[tools]
+ sys-apps/util-linux
+ sys-devel/bc
+ sys-block/parted
+ sys-fs/lsscsi
+ sys-fs/mdadm
+ sys-process/procps
+ )
+"
+
+# PDEPEND in this form is needed to trick portage suggest
+# enabling dist-kernel if only 1 package have it set, without suggesting to disable
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )"
+
+REQUIRED_USE="
+ !minimal? ( ${PYTHON_REQUIRED_USE} )
+ python? ( !minimal )
+ test-suite? ( !minimal )
+"
+
+RESTRICT="test"
+
+PATCHES=(
+ # bug #855182
+ "${FILESDIR}"/${PV}-build-issues.patch
+ # bug #854333
+ "${FILESDIR}"/${PV}-r2-dracut-non-root.patch
+ #
+ "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+)
+
+pkg_pretend() {
+ use rootfs || return 0
+
+ if has_version virtual/dist-kernel && ! use dist-kernel; then
+ ewarn "You have virtual/dist-kernel installed, but"
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
+ ewarn "It's recommended to globally enable dist-kernel USE flag"
+ ewarn "to auto-trigger initrd rebuilds with kernel updates"
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-info_pkg_setup
+
+ if ! linux_config_exists; then
+ ewarn "Cannot check the linux kernel configuration."
+ else
+ if use test-suite; then
+ if linux_chkconfig_present BLK_DEV_LOOP; then
+ eerror "The ZFS test suite requires loop device support enabled."
+ eerror "Please enable it:"
+ eerror " CONFIG_BLK_DEV_LOOP=y"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Device Drivers --->"
+ eerror " Block devices --->"
+ eerror " [X] Loopback device support"
+ fi
+ fi
+ fi
+ fi
+}
+
+libsoversion_check() {
+ local bugurl libzfs_sover
+ bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages"
+
+ libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \
+ | grep -Eo '[0-9]+:[0-9]+:[0-9]+')"
+ libzfs_sover="${libzfs_sover%%:*}"
+
+ if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then
+ echo
+ eerror "BUG BUG BUG BUG BUG BUG BUG BUG"
+ eerror "ebuild subslot does not match libzfs soversion!"
+ eerror "libzfs soversion: ${libzfs_sover}"
+ eerror "ebuild value: $(ver_cut 2 ${SLOT})"
+ eerror "This is a bug in the ebuild, please use the following URL to report it"
+ eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot"
+ echo
+ # we want to abort for releases, but just print a warning for live ebuild
+ # to keep package installable
+ [[ ${PV} == "9999" ]] || die
+ fi
+}
+
+src_prepare() {
+ default
+ libsoversion_check
+
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != "9999" ]]; then
+ # Set revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_prepare
+ popd >/dev/null || die
+ fi
+
+ # prevent errors showing up on zfs-mount stop, #647688
+ # openrc will unmount all filesystems anyway.
+ sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ use minimal || python_setup
+
+ # All the same issue:
+ # Segfaults w/ GCC 12 and 'zfs send'
+ # bug #856373
+ # https://github.com/openzfs/zfs/issues/13620
+ # https://github.com/openzfs/zfs/issues/13605
+ append-flags -fno-tree-vectorize
+
+ local myconf=(
+ --bindir="${EPREFIX}/bin"
+ --enable-shared
+ --enable-sysvinit
+ --localstatedir="${EPREFIX}/var"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=user
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut"
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-udevdir="$(get_udevdir)"
+ --with-pamconfigsdir="${EPREFIX}/unwanted_files"
+ --with-pammoduledir="$(getpam_mod_dir)"
+ --with-systemdunitdir="$(systemd_get_systemunitdir)"
+ --with-systemdpresetdir="$(systemd_get_systempresetdir)"
+ --with-vendor=gentoo
+ # Building zfs-mount-generator.c on musl breaks as strndupa
+ # isn't available. But systemd doesn't support musl anyway, so
+ # just disable building it.
+ $(use_enable !elibc_musl systemd)
+ $(use_enable debug)
+ $(use_enable nls)
+ $(use_enable pam)
+ $(use_enable python pyzfs)
+ --disable-static
+ $(usex minimal --without-python --with-python="${EPYTHON}")
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ default
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool
+
+ use pam && { rm -rv "${ED}/unwanted_files" || die ; }
+
+ use test-suite || { rm -r "${ED}"/usr/share/zfs/{test-runner,zfs-tests,runfiles,*sh} || die ; }
+
+ find "${ED}" -name '*.la' -delete || die
+
+ dobashcomp contrib/bash_completion.d/zfs
+ bashcomp_alias zfs zpool
+
+ # strip executable bit from conf.d file
+ fperms 0644 /etc/conf.d/zfs
+
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_install
+ popd >/dev/null || die
+ fi
+
+ # enforce best available python implementation
+ use minimal || python_fix_shebang "${ED}/bin"
+}
+
+pkg_postinst() {
+ udev_reload
+
+ # we always need userspace utils in sync with zfs-kmod
+ # so force initrd update for userspace as well, to avoid
+ # situation when zfs-kmod trigger initrd rebuild before
+ # userspace component is rebuilt
+ # KV_* variables are provided by linux-info.eclass
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+
+ if use rootfs; then
+ if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
+ elog "Root on zfs requires an initramfs to boot"
+ elog "The following packages provide one and are tested on a regular basis:"
+ elog " sys-kernel/dracut ( preferred, module maintained by zfs developers )"
+ elog " sys-kernel/genkernel"
+ fi
+ fi
+
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
+ einfo "Adding ${P} to the module database to ensure that the"
+ einfo "kernel modules and userland utilities stay in sync."
+ update_moduledb
+ fi
+
+ if systemd_is_booted || has_version sys-apps/systemd; then
+ einfo "Please refer to ${EROOT}/$(systemd_get_systempresetdir)/50-zfs.preset"
+ einfo "for default zfs systemd service configuration"
+ else
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
+ einfo "You should add zfs-import to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-load-key" ]] || \
+ einfo "You should add zfs-load-key to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
+ einfo "You should add zfs-mount to the boot runlevel."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
+ einfo "You should add zfs-share to the default runlevel."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
+ einfo "You should add zfs-zed to the default runlevel."
+ fi
+}
+
+pkg_postrm() {
+ udev_reload
+
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
+ remove_moduledb
+ fi
+}
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 6e0b78a9c125..eb60343f89b3 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -100,6 +100,10 @@ REQUIRED_USE="
RESTRICT="test"
+PATCHES=(
+ "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+)
+
pkg_pretend() {
use rootfs || return 0
@@ -183,6 +187,13 @@ src_configure() {
use custom-cflags || strip-flags
use minimal || python_setup
+ # All the same issue:
+ # Segfaults w/ GCC 12 and 'zfs send'
+ # bug #856373
+ # https://github.com/openzfs/zfs/issues/13620
+ # https://github.com/openzfs/zfs/issues/13605
+ append-flags -fno-tree-vectorize
+
local myconf=(
--bindir="${EPREFIX}/bin"
--enable-shared