summaryrefslogtreecommitdiff
path: root/sys-fs/zfs/files
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/files
parent0f558761aa2dee1017b4751e4017205e015a9560 (diff)
gentoo resync : 09.07.2022
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-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
4 files changed, 181 insertions, 0 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
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
+