summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/Manifest.gzbin22229 -> 22225 bytes
-rw-r--r--sys-fs/zfs-kmod/Manifest6
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-2.1.6-fgrep.patch53
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.1.6.ebuild216
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild2
-rw-r--r--sys-fs/zfs/Manifest4
-rw-r--r--sys-fs/zfs/files/2.1.6-fgrep.patch53
-rw-r--r--sys-fs/zfs/zfs-2.1.6.ebuild330
8 files changed, 662 insertions, 2 deletions
diff --git a/sys-fs/Manifest.gz b/sys-fs/Manifest.gz
index 5bae1bab2fc3..0a5b75a7fe63 100644
--- a/sys-fs/Manifest.gz
+++ b/sys-fs/Manifest.gz
Binary files differ
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 4e27763f94cc..5bef5f958a3c 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,6 +1,10 @@
+AUX zfs-kmod-2.1.6-fgrep.patch 2183 BLAKE2B b8c9b58cc6d94e9ddeacbe3c5eca9d040f1c6fba84b814c8c553d5c1e15334765d3190286a4ad2298762bc54f66a8b89ef69d115cfbd5a25d928170a1d46a770 SHA512 f65e7ffa8cfd00da7ad6d1fcbf5d61172c52e55ea2630f719b49750692c1c046e8baed0e04cadc841adbd804cf861ec712b0d07dbbcae7c1c3b475326045ae8c
DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253 SHA512 d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd
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
+DIST zfs-2.1.6.tar.gz 34951282 BLAKE2B 615fe7a2128af77c6c855ea52b6503a78f0c992ea845b02875ac19aa9dd155c5d4110b668da91c463f96a54767ab92e67e5303572337352484c055c0a0ff9e46 SHA512 75639e4cecb281fe73a6e6bd116693f6609ace9b358385450297d175087b10938c2f489a08c657cf0a64250a8db995cbd19abc808a8523cb4c5344b3f76668d6
+DIST zfs-2.1.6.tar.gz.asc 836 BLAKE2B d85a79f8824a92c4d0a9682646f79c14871ebe27764289dc87cd9b0a773b7295538780401e70c492a9e4e7097ff2b3e459f7e0a7fdce2e2a59d3f467c41d88b3 SHA512 a83fcc00a8b35f1a1f9b94097d453019333a5351a3d78656dbd9ef732655ee817ccc88068c5ba11b5ff4a285e02250aee4169cc1450025edf547a2329fca7e15
EBUILD zfs-kmod-2.1.5-r1.ebuild 5580 BLAKE2B aa39c05aefd62f464322515d88ad98c084afcc024c4f5744feafabe1ad3723f701ab37f8d533c564b175b59b09fd0f369c55434a26aa7a8713750d10b850ed6b SHA512 d9e6e7ea21c87d12fd29372eda8d0fd2f6f85c1949278c253762de3cae816f2b145ee374e9835a8938f015ca9dce72e9ae9762012aa3e5bcdf012b1d59f1bed6
-EBUILD zfs-kmod-9999.ebuild 5226 BLAKE2B a476e6b40685ee5b00e87a01ee535189be72ab06f23fd43ef0ba92ab003f716de82379a124d222ba1fa529fdb69970af1e34be526c7b3fa65616870e3b8eb6c2 SHA512 ea7c7d681d146bf492994b98f647301b58b2d03d46df0c98f72b0eb7d9ea3d39c0bd8ac94c271c5592bac304090af2db28281c15d421863d0340f817bbc096a5
+EBUILD zfs-kmod-2.1.6.ebuild 5472 BLAKE2B 644aa4c9212705563e3daf47416f61db6d4745e390a793befd87e6853afc6797f82bf99fe0d52d4c61a18a8319744846ca2cf24ffb152a50ebc8d4986d10e465 SHA512 06bac767a260696259d99c945d9c0ff06323433891666e61e70dc55a921ef5463b37250197b045ac258eb014ddfcc331810f62f06feeeb66d16598ef430b185a
+EBUILD zfs-kmod-9999.ebuild 5226 BLAKE2B 71b7a19934d71f46912afba91522af071e5ea29144a9b45d0db5d8e683a50240d3a3326639766f05ac765d8c6cb427e2e90474d2f0f846924a943b1103e48040 SHA512 85a8a515135a3275403b8281571c2bcc650dfb3d466321271af1459885c59258460e892b233f1424cbc509fd813722479d278765265fcb788951ec2344c12e00
MISC metadata.xml 651 BLAKE2B 477c5d768a2eddab7bc0c14d0845801e25bfd9298fe229a132d7ff11a8560988d0230ec5d4b1447df32f58b9754df0cbe989f2a5600cd3fa99124ea4edc45cdd SHA512 d9bf0598c87bcdaab7d81dd5502caf1400f3c8d3834a6770630d85ed365cd4ebb3beeebae72d2d4d49bcdd0aa6cd709aa57cb2af4195dfc04a9c0cef89cfd724
diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-2.1.6-fgrep.patch b/sys-fs/zfs-kmod/files/zfs-kmod-2.1.6-fgrep.patch
new file mode 100644
index 000000000000..2e47c5bcc093
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/zfs-kmod-2.1.6-fgrep.patch
@@ -0,0 +1,53 @@
+https://github.com/openzfs/zfs/commit/d30577c9dd811688f2609ad532b011b99bceb485
+
+From d30577c9dd811688f2609ad532b011b99bceb485 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz>
+Date: Sat, 12 Mar 2022 00:26:46 +0100
+Subject: [PATCH] fgrep -> grep -F
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Reviewed-by: John Kennedy <john.kennedy@delphix.com>
+Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
+Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
+Closes #13259
+--- a/config/kernel.m4
++++ b/config/kernel.m4
+@@ -394,11 +394,11 @@ AC_DEFUN([ZFS_AC_KERNEL], [
+ utsrelease1=$kernelbuild/include/linux/version.h
+ utsrelease2=$kernelbuild/include/linux/utsrelease.h
+ utsrelease3=$kernelbuild/include/generated/utsrelease.h
+- AS_IF([test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1], [
++ AS_IF([test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1], [
+ utsrelease=$utsrelease1
+- ], [test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2], [
++ ], [test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2], [
+ utsrelease=$utsrelease2
+- ], [test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3], [
++ ], [test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3], [
+ utsrelease=$utsrelease3
+ ])
+
+--- a/config/zfs-build.m4
++++ b/config/zfs-build.m4
+@@ -173,7 +173,7 @@ AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
+ ])
+
+ AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS_DETECT_FREEBSD], [
+- AS_IF([sysctl -n kern.conftxt | fgrep -qx $'options\tINVARIANTS'],
++ AS_IF([sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'],
+ [enable_invariants="yes"],
+ [enable_invariants="no"])
+ ])
+--- a/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
++++ b/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
+@@ -120,5 +120,5 @@ function check_while_waiting
+ # Whether any vdev in the given pool is initializing
+ function is_vdev_initializing # pool
+ {
+- zpool status -i "$1" | grep 'initialized, started' >/dev/null
++ zpool status -i "$1" | grep -q 'initialized, started'
+ }
+
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.6.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.6.ebuild
new file mode 100644
index 000000000000..321ab809d1e2
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.6.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ 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_PV="${PV/_rc/-rc}"
+ SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
+ S="${WORKDIR}/zfs-${PV%_rc?}"
+ ZFS_KERNEL_COMPAT="5.19"
+
+ # increments minor eg 5.14 -> 5.15, and still supports override.
+ ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
+
+ if [[ ${PV} != *_rc* ]]; then
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+ fi
+fi
+
+LICENSE="CDDL MIT debug? ( GPL-2+ )"
+SLOT="0/${PVR}"
+IUSE="custom-cflags debug +rootfs"
+
+RDEPEND="${DEPEND}"
+
+BDEPEND="
+ dev-lang/perl
+ virtual/awk
+"
+
+# we want dist-kernel block in BDEPEND because of portage resolver.
+# since linux-mod.eclass already sets version-unbounded dep, portage
+# will pull new versions. So we set it in BDEPEND which takes priority.
+# and we don't need in in git ebuild.
+if [[ ${PV} != "9999" ]] ; then
+ BDEPEND+="
+ verify-sig? ( sec-keys/openpgp-keys-openzfs )
+ dist-kernel? ( <virtual/dist-kernel-${ZFS_KERNEL_DEP}:= )
+ "
+fi
+
+# PDEPEND in this form is needed to trick portage suggest
+# enabling dist-kernel if only 1 package have it set
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
+
+RESTRICT="debug? ( strip ) test"
+
+DOCS=( AUTHORS COPYRIGHT META README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.6-fgrep.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() {
+ CONFIG_CHECK="
+ !DEBUG_LOCK_ALLOC
+ EFI_PARTITION
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ !TRIM_UNUSED_KSYMS
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use debug && CONFIG_CHECK="${CONFIG_CHECK}
+ FRAME_POINTER
+ DEBUG_INFO
+ !DEBUG_INFO_REDUCED
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK}
+ BLK_DEV_INITRD
+ DEVTMPFS
+ "
+
+ kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
+
+ if [[ ${PV} != "9999" ]]; then
+ local kv_major_max kv_minor_max zcompat
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ kv_major_max="${zcompat%%.*}"
+ zcompat="${zcompat#*.}"
+ kv_minor_max="${zcompat%%.*}"
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
+
+ fi
+
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
+
+ linux-mod_pkg_setup
+}
+
+src_unpack() {
+ if use verify-sig ; then
+ # Needed for downloaded patch (which is unsigned, which is fine)
+ verify-sig_verify_detached "${DISTDIR}"/zfs-${MY_PV}.tar.gz{,.asc}
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != "9999" ]]; then
+ # Set module revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+}
+
+src_configure() {
+ set_arch_to_kernel
+
+ use custom-cflags || strip-flags
+
+ filter-ldflags -Wl,*
+
+ # Set CROSS_COMPILE in the environment.
+ # This allows the user to override it via make.conf or via a local Makefile.
+ # https://bugs.gentoo.org/811600
+ export CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-}
+
+ local myconf=(
+ HOSTCC="$(tc-getBUILD_CC)"
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ set_arch_to_kernel
+
+ myemakeargs=(
+ HOSTCC="$(tc-getBUILD_CC)"
+ V=1
+ )
+
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ set_arch_to_kernel
+
+ myemakeargs+=(
+ DEPMOD=:
+ # INSTALL_MOD_PATH ?= $(DESTDIR) in module/Makefile
+ DESTDIR="${D}"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ set_arch_to_pkgmgr
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+
+ if use x86 || use arm; then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ if has_version sys-boot/grub; then
+ ewarn "This version of OpenZFS includes support for new feature flags"
+ ewarn "that are incompatible with previous versions. GRUB2 support for"
+ ewarn "/boot with the new feature flags is not yet available."
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags."
+ ewarn "Any new pools will be created with the new feature flags by default"
+ ewarn "and will not be compatible with older versions of OpenZFS. To"
+ ewarn "create a newpool that is backward compatible wih GRUB2, use "
+ ewarn
+ ewarn "zpool create -o compatibility=grub2 ..."
+ ewarn
+ ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
+ fi
+}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
index c7623deb64c8..e0888f5b3a45 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
S="${WORKDIR}/zfs-${PV%_rc?}"
- ZFS_KERNEL_COMPAT="5.18"
+ ZFS_KERNEL_COMPAT="5.19"
# increments minor eg 5.14 -> 5.15, and still supports override.
ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index b60aab7b62ed..b63b1b7ca3c2 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -2,9 +2,13 @@ AUX 2.1.5-dracut-mount.patch 1093 BLAKE2B b22c3195332a6be3656282a16a5a10622effe6
AUX 2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch 4362 BLAKE2B 678b99fee828753318dbf59ac478b0c1d71843c040d56d598027578403f69935d271c3dc78ce82540acffee7bd282a055622440ef40410af08f07630b899ef50 SHA512 4a3e4942ac64dea6fe6bd37da9683880ff4cc7b69d797976669dfe7fe48e0603264b033f8ee83ed794a249b127d407b3320bb7249c903016769be6441f10110b
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 2.1.6-fgrep.patch 2183 BLAKE2B b8c9b58cc6d94e9ddeacbe3c5eca9d040f1c6fba84b814c8c553d5c1e15334765d3190286a4ad2298762bc54f66a8b89ef69d115cfbd5a25d928170a1d46a770 SHA512 f65e7ffa8cfd00da7ad6d1fcbf5d61172c52e55ea2630f719b49750692c1c046e8baed0e04cadc841adbd804cf861ec712b0d07dbbcae7c1c3b475326045ae8c
DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253 SHA512 d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd
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
+DIST zfs-2.1.6.tar.gz 34951282 BLAKE2B 615fe7a2128af77c6c855ea52b6503a78f0c992ea845b02875ac19aa9dd155c5d4110b668da91c463f96a54767ab92e67e5303572337352484c055c0a0ff9e46 SHA512 75639e4cecb281fe73a6e6bd116693f6609ace9b358385450297d175087b10938c2f489a08c657cf0a64250a8db995cbd19abc808a8523cb4c5344b3f76668d6
+DIST zfs-2.1.6.tar.gz.asc 836 BLAKE2B d85a79f8824a92c4d0a9682646f79c14871ebe27764289dc87cd9b0a773b7295538780401e70c492a9e4e7097ff2b3e459f7e0a7fdce2e2a59d3f467c41d88b3 SHA512 a83fcc00a8b35f1a1f9b94097d453019333a5351a3d78656dbd9ef732655ee817ccc88068c5ba11b5ff4a285e02250aee4169cc1450025edf547a2329fca7e15
EBUILD zfs-2.1.5-r6.ebuild 9454 BLAKE2B 15f19ae3739796159bd70beccda1bbeeb3cfa1044bb55dd1dc29dce6c210acc6442f77ea9bddd7f8ae7c204ae8755af7127fdcadbe3a9fc5ad91a3162d571965 SHA512 f2233c3120ad0468765bedae231c4ab57a1884c00dd3d7c79d4ca0a692ec45ffea5a2eccb6975713887434a4e8649a275c9378887a73fa0ca356fc858e8189be
+EBUILD zfs-2.1.6.ebuild 9201 BLAKE2B 86712d91e7c80a260446dd5c2a5b7726a868f05dd52e0d97a110adf7ba56b191f287ba213634b91670bd764e3d57ab0804a78adcc0881cd64e76cb8ca80acf2f SHA512 37e6fa70ac2d85d79fb18cc51389b793599f5a4070151bcd8179b361f10a52790c6de02c52341acab9fbcbed58a17cab0c18564debe2354e9f148996abdbcc65
EBUILD zfs-9999.ebuild 8860 BLAKE2B f866be6f204ad6dba9afc1d5e696731af97aedcd5800a76c9e9ca0f8fc148fd9f4506ff9bd1af30f56df106a8da2375c90e276af980f4519c309f3583f9e38eb SHA512 a34498a45d1d42f4e8baac011c45c993693b37382aa6f7c41ca5f814415d5e992be7f051a72ed2499cfe9840b54b58edd4ad778a8906834ea26565d9a81b5115
MISC metadata.xml 2205 BLAKE2B 82e20a6f5906b8cbbc6eb6e9520cf4e4213ce9cba2b056df5d5db0d4deaa4a20822a88e26286446d105326a8f61c807047a0e1e64494faac48d8ed5708807c02 SHA512 222981f945e98ddef646c593cbc8889f3526af4901c28ab5775ba760ca7d3aff3129b2699e8b7337b59fd33cbba388915cb5b2dc09674432c606f41ff27dbd9b
diff --git a/sys-fs/zfs/files/2.1.6-fgrep.patch b/sys-fs/zfs/files/2.1.6-fgrep.patch
new file mode 100644
index 000000000000..2e47c5bcc093
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.6-fgrep.patch
@@ -0,0 +1,53 @@
+https://github.com/openzfs/zfs/commit/d30577c9dd811688f2609ad532b011b99bceb485
+
+From d30577c9dd811688f2609ad532b011b99bceb485 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz>
+Date: Sat, 12 Mar 2022 00:26:46 +0100
+Subject: [PATCH] fgrep -> grep -F
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Reviewed-by: John Kennedy <john.kennedy@delphix.com>
+Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
+Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
+Closes #13259
+--- a/config/kernel.m4
++++ b/config/kernel.m4
+@@ -394,11 +394,11 @@ AC_DEFUN([ZFS_AC_KERNEL], [
+ utsrelease1=$kernelbuild/include/linux/version.h
+ utsrelease2=$kernelbuild/include/linux/utsrelease.h
+ utsrelease3=$kernelbuild/include/generated/utsrelease.h
+- AS_IF([test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1], [
++ AS_IF([test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1], [
+ utsrelease=$utsrelease1
+- ], [test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2], [
++ ], [test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2], [
+ utsrelease=$utsrelease2
+- ], [test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3], [
++ ], [test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3], [
+ utsrelease=$utsrelease3
+ ])
+
+--- a/config/zfs-build.m4
++++ b/config/zfs-build.m4
+@@ -173,7 +173,7 @@ AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
+ ])
+
+ AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS_DETECT_FREEBSD], [
+- AS_IF([sysctl -n kern.conftxt | fgrep -qx $'options\tINVARIANTS'],
++ AS_IF([sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'],
+ [enable_invariants="yes"],
+ [enable_invariants="no"])
+ ])
+--- a/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
++++ b/tests/zfs-tests/tests/functional/cli_root/zpool_wait/zpool_wait.kshlib
+@@ -120,5 +120,5 @@ function check_while_waiting
+ # Whether any vdev in the given pool is initializing
+ function is_vdev_initializing # pool
+ {
+- zpool status -i "$1" | grep 'initialized, started' >/dev/null
++ zpool status -i "$1" | grep -q 'initialized, started'
+ }
+
diff --git a/sys-fs/zfs/zfs-2.1.6.ebuild b/sys-fs/zfs/zfs-2.1.6.ebuild
new file mode 100644
index 000000000000..554cb0d418dc
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.1.6.ebuild
@@ -0,0 +1,330 @@
+# 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
+ )
+ 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 #854333
+ "${FILESDIR}"/2.1.5-r2-dracut-non-root.patch
+
+ "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+
+ # bug #857228
+ "${FILESDIR}"/2.1.5-dracut-mount.patch
+
+ "${FILESDIR}"/2.1.6-fgrep.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_unpack() {
+ if use verify-sig ; then
+ # Needed for downloaded patch (which is unsigned, which is fine)
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
+ fi
+
+ default
+}
+
+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
+}