summaryrefslogtreecommitdiff
path: root/sys-fs/zfs/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-17 05:16:32 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-17 05:16:32 +0100
commit8900e3e6f840b95c1c8126f9c283ca5c99f5f4fd (patch)
tree98a756d04cd2d068833a219fe02a7feaf960f87a /sys-fs/zfs/files
parent3b827127cdc24d49f3dbaa82def6c80501d2cd87 (diff)
gentoo auto-resync : 17:09:2022 - 05:16:32
Diffstat (limited to 'sys-fs/zfs/files')
-rw-r--r--sys-fs/zfs/files/2.1.5-build-issues.patch74
-rw-r--r--sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch78
2 files changed, 78 insertions, 74 deletions
diff --git a/sys-fs/zfs/files/2.1.5-build-issues.patch b/sys-fs/zfs/files/2.1.5-build-issues.patch
deleted file mode 100644
index cca6561b16f7..000000000000
--- a/sys-fs/zfs/files/2.1.5-build-issues.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-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-zfs-bootfs-snapshot-fixes.patch b/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch
new file mode 100644
index 000000000000..05c44faf9d93
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-dracut-zfs-bootfs-snapshot-fixes.patch
@@ -0,0 +1,78 @@
+From 2d434e8ae4139ce14a1b058839a144bf952e79ea Mon Sep 17 00:00:00 2001
+From: gregory-lee-bartholomew <gregory.lee.bartholomew@gmail.com>
+Date: Wed, 29 Jun 2022 18:56:04 -0500
+Subject: [PATCH] contrib: dracut: zfs-{rollback,snapshot}-bootfs: explicit
+ snapname fix
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Due to a missing semicolon on the ExecStart line, it wasn't possible
+to specify the snapshot name on the bootfs.{rollback,snapshot}
+kernel parameters if the boot dataset name was obtained from the
+root=zfs:... kernel parameter.
+
+Reviewed-by: Ahelenia ZiemiaƄska <nabijaczleweli@nabijaczleweli.xyz>
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Gregory Bartholomew <gregory.lee.bartholomew@gmail.com>
+Closes #13585
+---
+ contrib/dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +-
+ contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
+index b4f5707516c..a29cf3a3dd8 100644
+--- a/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
++++ b/contrib/dracut/90zfs/zfs-rollback-bootfs.service.in
+@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.rollback
+
+ [Service]
+ Type=oneshot
+-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS" SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
++ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.rollback)"; exec @sbindir@/zfs rollback -Rf "$root@${SNAPNAME:-%v}"'
+ RemainAfterExit=yes
+diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+index afdba2c9d19..befd163b653 100644
+--- a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
++++ b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.snapshot
+
+ [Service]
+ Type=oneshot
+-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS" SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
++ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
+ RemainAfterExit=yes
+From d22dd77c4d4556373b995121412c4abac02bcf8a Mon Sep 17 00:00:00 2001
+From: gregory-lee-bartholomew <gregory.lee.bartholomew@gmail.com>
+Date: Fri, 12 Aug 2022 16:28:15 -0500
+Subject: [PATCH] contrib: dracut: zfs-snapshot-bootfs: exit status fix
+
+When the zfs-snapshot-bootfs service attempts to create a snapshot
+that already exists, the exit status of the command is non-zero and
+the service reports failed to the systemd service manager. This is a
+common occurrence if bootfs.snapshot is left set on the kernel command
+line and it should not be considered a failure.
+
+This service was originally set to ignore this error by prefixing
+the command with - on the ExecStart line, but the leading - appears
+to have been dropped in #13359.
+
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Gregory Bartholomew <gregory.lee.bartholomew@gmail.com>
+Closes #13769
+---
+ contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+index befd163b653..9e73d1a7872 100644
+--- a/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
++++ b/contrib/dracut/90zfs/zfs-snapshot-bootfs.service.in
+@@ -8,5 +8,5 @@ ConditionKernelCommandLine=bootfs.snapshot
+
+ [Service]
+ Type=oneshot
+-ExecStart=/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
++ExecStart=-/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; exec @sbindir@/zfs snapshot "$root@${SNAPNAME:-%v}"'
+ RemainAfterExit=yes