Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/, sys-fs/zfs/files/
Date: Fri, 01 Jul 2022 07:34:49
Message-Id: 1656660878.25f80a2eafbe1eae88d053b507ee7200f31c42dc.sam@gentoo
1 commit: 25f80a2eafbe1eae88d053b507ee7200f31c42dc
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 1 07:33:01 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 1 07:34:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25f80a2e
7
8 sys-fs/zfs: more Dracut fixes
9
10 - Backport the merged version of non-root fix (one we used should be fine,
11 but upstream went with another)
12
13 - Revert commit which breaks dist-kernel initramfs building (breaks
14 with USE=initramfs on gentoo-kernel b/c zfs isn't yet rebuilt when
15 gentoo-kernel's pkg_postinst builds dracut).
16
17 Bug: https://github.com/openzfs/zfs/issues/13595
18 Bug: https://bugs.gentoo.org/854333
19 Signed-off-by: Sam James <sam <AT> gentoo.org>
20
21 sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch | 14 +++++
22 sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch | 60 ++++++++++++++++++++++
23 .../zfs/{zfs-9999.ebuild => zfs-2.1.5-r2.ebuild} | 9 ++++
24 sys-fs/zfs/zfs-9999.ebuild | 4 ++
25 4 files changed, 87 insertions(+)
26
27 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
28 new file mode 100644
29 index 000000000000..077bcd55f6d5
30 --- /dev/null
31 +++ b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch
32 @@ -0,0 +1,14 @@
33 +https://github.com/openzfs/zfs/commit/ebbfc6cb853d2d2f3f0671362d5ff5588be39e9d
34 +https://github.com/openzfs/zfs/issues/13595
35 +--- b/contrib/dracut/90zfs/module-setup.sh.in
36 ++++ a/contrib/dracut/90zfs/module-setup.sh.in
37 +@@ -19,7 +19,7 @@
38 + }
39 +
40 + installkernel() {
41 ++ instmods zfs
42 +- instmods -c zfs
43 + }
44 +
45 + install() {
46 +
47
48 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
49 new file mode 100644
50 index 000000000000..a9c6130f5b00
51 --- /dev/null
52 +++ b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch
53 @@ -0,0 +1,60 @@
54 +https://github.com/openzfs/zfs/commit/eefe83eaa68f7cb4a49c580dd940d3688e42c849
55 +https://bugs.gentoo.org/854333
56 +
57 +From eefe83eaa68f7cb4a49c580dd940d3688e42c849 Mon Sep 17 00:00:00 2001
58 +From: Toyam Cox <aviator45003@×××××.com>
59 +Date: Thu, 30 Jun 2022 13:47:58 -0400
60 +Subject: [PATCH] dracut: fix boot on non-zfs-root systems
61 +
62 +Simply prevent overwriting root until it needs to be overwritten.
63 +
64 +Dracut could change this value before this module is called, but won't
65 +change the kernel command line.
66 +
67 +Reviewed-by: Andrew J. Hesford <ajh@××××××××.org>
68 +Signed-off-by: Toyam Cox <vaelatern@×××××××××.org>
69 +Closes #13592
70 +---
71 + contrib/dracut/90zfs/zfs-lib.sh.in | 10 +++++-----
72 + 1 file changed, 5 insertions(+), 5 deletions(-)
73 +
74 +diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in b/contrib/dracut/90zfs/zfs-lib.sh.in
75 +index e44673c2d75..3a43e514d6f 100755
76 +--- a/contrib/dracut/90zfs/zfs-lib.sh.in
77 ++++ b/contrib/dracut/90zfs/zfs-lib.sh.in
78 +@@ -88,11 +88,11 @@ decode_root_args() {
79 + return
80 + fi
81 +
82 +- root=$(getarg root=)
83 ++ xroot=$(getarg root=)
84 + rootfstype=$(getarg rootfstype=)
85 +
86 + # shellcheck disable=SC2249
87 +- case "$root" in
88 ++ case "$xroot" in
89 + ""|zfs|zfs:|zfs:AUTO)
90 + root=zfs:AUTO
91 + rootfstype=zfs
92 +@@ -100,7 +100,7 @@ decode_root_args() {
93 + ;;
94 +
95 + ZFS=*|zfs:*)
96 +- root="${root#zfs:}"
97 ++ root="${xroot#zfs:}"
98 + root="${root#ZFS=}"
99 + root=$(echo "$root" | tr '+' ' ')
100 + rootfstype=zfs
101 +@@ -109,9 +109,9 @@ decode_root_args() {
102 + esac
103 +
104 + if [ "$rootfstype" = "zfs" ]; then
105 +- case "$root" in
106 ++ case "$xroot" in
107 + "") root=zfs:AUTO ;;
108 +- *) root=$(echo "$root" | tr '+' ' ') ;;
109 ++ *) root=$(echo "$xroot" | tr '+' ' ') ;;
110 + esac
111 + return 0
112 + fi
113 +
114
115 diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-2.1.5-r2.ebuild
116 similarity index 97%
117 copy from sys-fs/zfs/zfs-9999.ebuild
118 copy to sys-fs/zfs/zfs-2.1.5-r2.ebuild
119 index 6e0b78a9c125..37907ff20733 100644
120 --- a/sys-fs/zfs/zfs-9999.ebuild
121 +++ b/sys-fs/zfs/zfs-2.1.5-r2.ebuild
122 @@ -100,6 +100,15 @@ REQUIRED_USE="
123
124 RESTRICT="test"
125
126 +PATCHES=(
127 + # bug #855182
128 + "${FILESDIR}"/${PV}-build-issues.patch
129 + # bug #854333
130 + "${FILESDIR}"/${PV}-r2-dracut-non-root.patch
131 + #
132 + "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
133 +)
134 +
135 pkg_pretend() {
136 use rootfs || return 0
137
138
139 diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
140 index 6e0b78a9c125..b3a9d416fb6e 100644
141 --- a/sys-fs/zfs/zfs-9999.ebuild
142 +++ b/sys-fs/zfs/zfs-9999.ebuild
143 @@ -100,6 +100,10 @@ REQUIRED_USE="
144
145 RESTRICT="test"
146
147 +PATCHES=(
148 + "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
149 +)
150 +
151 pkg_pretend() {
152 use rootfs || return 0