public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/
Date: Fri,  1 Jul 2022 07:34:46 +0000 (UTC)	[thread overview]
Message-ID: <1656660878.25f80a2eafbe1eae88d053b507ee7200f31c42dc.sam@gentoo> (raw)

commit:     25f80a2eafbe1eae88d053b507ee7200f31c42dc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  1 07:33:01 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul  1 07:34:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25f80a2e

sys-fs/zfs: more Dracut fixes

- Backport the merged version of non-root fix (one we used should be fine,
but upstream went with another)

- Revert commit which breaks dist-kernel initramfs building (breaks
with USE=initramfs on gentoo-kernel b/c zfs isn't yet rebuilt when
gentoo-kernel's pkg_postinst builds dracut).

Bug: https://github.com/openzfs/zfs/issues/13595
Bug: https://bugs.gentoo.org/854333
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch    | 14 +++++
 sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch    | 60 ++++++++++++++++++++++
 .../zfs/{zfs-9999.ebuild => zfs-2.1.5-r2.ebuild}   |  9 ++++
 sys-fs/zfs/zfs-9999.ebuild                         |  4 ++
 4 files changed, 87 insertions(+)

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-9999.ebuild b/sys-fs/zfs/zfs-2.1.5-r2.ebuild
similarity index 97%
copy from sys-fs/zfs/zfs-9999.ebuild
copy to sys-fs/zfs/zfs-2.1.5-r2.ebuild
index 6e0b78a9c125..37907ff20733 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-2.1.5-r2.ebuild
@@ -100,6 +100,15 @@ REQUIRED_USE="
 
 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
 

diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 6e0b78a9c125..b3a9d416fb6e 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
 


             reply	other threads:[~2022-07-01  7:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  7:34 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-23  6:33 [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/ Sam James
2023-12-16 10:06 Sam James
2023-07-03 21:03 Sam James
2022-12-25  0:24 Georgy Yakovlev
2022-12-08 19:48 Georgy Yakovlev
2022-10-04  5:07 Sam James
2022-09-17 22:16 Georgy Yakovlev
2022-09-16 23:09 Georgy Yakovlev
2022-06-07 18:56 Georgy Yakovlev
2021-12-26 22:35 Georgy Yakovlev
2021-12-23 22:28 Georgy Yakovlev
2021-12-16  2:51 Georgy Yakovlev
2021-11-07 23:59 Georgy Yakovlev
2021-06-04  2:14 Georgy Yakovlev
2020-11-03 20:07 Georgy Yakovlev
2020-09-25 20:28 Georgy Yakovlev
2020-05-26 23:58 Georgy Yakovlev
2019-11-26 20:32 Georgy Yakovlev
2019-09-27 19:16 Georgy Yakovlev
2019-03-31  3:53 Georgy Yakovlev
2018-02-14 20:39 Matt Thode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1656660878.25f80a2eafbe1eae88d053b507ee7200f31c42dc.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox