summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/zfs-utils/Manifest2
-rw-r--r--sys-fs/zfs-utils/files/2.2.2-no-USER_NS.patch39
-rw-r--r--sys-fs/zfs-utils/zfs-utils-2.2.6.ebuild (renamed from sys-fs/zfs-utils/zfs-utils-2.2.4.ebuild)19
-rw-r--r--sys-fs/zfs/zfs-2.2.6.ebuild (renamed from sys-fs/zfs/zfs-2.2.4.ebuild)0
4 files changed, 56 insertions, 4 deletions
diff --git a/sys-fs/zfs-utils/Manifest b/sys-fs/zfs-utils/Manifest
index f9b51cff..c17ea78f 100644
--- a/sys-fs/zfs-utils/Manifest
+++ b/sys-fs/zfs-utils/Manifest
@@ -1 +1 @@
-DIST zfs-2.2.4.tar.gz 33882933 BLAKE2B f0026a12b7c1252bf8941e39f23d3e165750034707dfddf034d8aac942a749cb7f0108478797ca978704a22743d9928240b29cf78fe89eda9f873f40102413f0 SHA512 1d17e30573d594fb5c9ea77cde104616dca362fed7530296816d1b55173594f66170fcfb23ab57c27074f85b79d3eb557b4ee9a1c420e507b2434a7902d8dcc1
+DIST zfs-2.2.6.tar.gz 33900138 BLAKE2B 0bbe36df779aaf19460a75725af9c9b13e64e77a6020974ad18d60d9fd52db2ddd6ea98b3e6c7451195bdfb347b8aab51db9b3f9a7c15c77bff47329bbd07dd2 SHA512 c217a3397b67d7239bc30bc492d58fff96bb29c9cf73e390d1787a4fb787cb297557e594a926453fed11faaab80363d40853af271f8ee18ce9a317dfde4c6745
diff --git a/sys-fs/zfs-utils/files/2.2.2-no-USER_NS.patch b/sys-fs/zfs-utils/files/2.2.2-no-USER_NS.patch
new file mode 100644
index 00000000..b132db9d
--- /dev/null
+++ b/sys-fs/zfs-utils/files/2.2.2-no-USER_NS.patch
@@ -0,0 +1,39 @@
+https://github.com/openzfs/zfs/issues/15241
+https://github.com/openzfs/zfs/pull/15560
+
+From e0a7ec29d91b79adfd81073f229241351ed0ae21 Mon Sep 17 00:00:00 2001
+From: Ilkka Sovanto <github@ilkka.kapsi.fi>
+Date: Wed, 22 Nov 2023 20:24:47 +0200
+Subject: [PATCH] Fix zoneid when USER_NS is disabled
+
+getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.
+
+Signed-off-by: Ilkka Sovanto <github@ilkka.kapsi.fi>
+--- a/lib/libspl/os/linux/zone.c
++++ b/lib/libspl/os/linux/zone.c
+@@ -42,20 +42,20 @@ getzoneid(void)
+ int c = snprintf(path, sizeof (path), "/proc/self/ns/user");
+ /* This API doesn't have any error checking... */
+ if (c < 0 || c >= sizeof (path))
+- return (0);
++ return (GLOBAL_ZONEID);
+
+ ssize_t r = readlink(path, buf, sizeof (buf) - 1);
+ if (r < 0)
+- return (0);
++ return (GLOBAL_ZONEID);
+
+ cp = strchr(buf, '[');
+ if (cp == NULL)
+- return (0);
++ return (GLOBAL_ZONEID);
+ cp++;
+
+ unsigned long n = strtoul(cp, NULL, 10);
+ if (n == ULONG_MAX && errno == ERANGE)
+- return (0);
++ return (GLOBAL_ZONEID);
+ zoneid_t z = (zoneid_t)n;
+
+ return (z);
+
diff --git a/sys-fs/zfs-utils/zfs-utils-2.2.4.ebuild b/sys-fs/zfs-utils/zfs-utils-2.2.6.ebuild
index 0545a209..2ef8e142 100644
--- a/sys-fs/zfs-utils/zfs-utils-2.2.4.ebuild
+++ b/sys-fs/zfs-utils/zfs-utils-2.2.6.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit bash-completion-r1 flag-o-matic pam toolchain-funcs udev
+inherit autotools bash-completion-r1 flag-o-matic pam toolchain-funcs udev usr-ldscript
MY_PN="zfs"
MY_P="${MY_PN}-${PV}"
@@ -17,15 +17,16 @@ S="${WORKDIR}/${MY_P}"
LICENSE="BSD-2 CDDL MIT"
SLOT="0"
-IUSE="debug nls pam test-suite"
+IUSE="debug nls pam test-suite unwind"
DEPEND="
net-libs/libtirpc:=
sys-apps/util-linux
sys-libs/zlib
virtual/libudev:=
- dev-libs/openssl:0=
+ dev-libs/openssl:=
pam? ( sys-libs/pam )
+ unwind? ( sys-libs/libunwind:= )
"
BDEPEND="app-alternatives/awk
@@ -34,6 +35,7 @@ BDEPEND="app-alternatives/awk
"
RDEPEND="${DEPEND}
+ app-alternatives/awk
virtual/udev
sys-fs/udev-init-scripts
test-suite? (
@@ -51,11 +53,18 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+ "${FILESDIR}"/2.2.2-no-USER_NS.patch
)
src_prepare() {
default
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ # Tries to use /etc/conf.d which we reserve for OpenRC
+ sed -i -e '/EnvironmentFile/d' etc/systemd/system/zfs*.in || die
+
# 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
@@ -78,6 +87,7 @@ src_configure() {
$(use_enable debug)
$(use_enable nls)
$(use_enable pam)
+ $(use_with unwind libunwind)
--disable-pyzfs
--disable-static
)
@@ -96,4 +106,7 @@ src_install() {
doins "${S}"/etc/default/zfs
use pam && { rm -rv "${ED}/unwanted_files" || die ; }
use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; }
+
+ # strip executable bit from conf.d file
+ fperms 0644 /etc/conf.d/zfs
}
diff --git a/sys-fs/zfs/zfs-2.2.4.ebuild b/sys-fs/zfs/zfs-2.2.6.ebuild
index bdcb914c..bdcb914c 100644
--- a/sys-fs/zfs/zfs-2.2.4.ebuild
+++ b/sys-fs/zfs/zfs-2.2.6.ebuild