1 |
commit: 99dfdcacc7c6b094d5e8d4c5c8ace4edbeb5a0f9 |
2 |
Author: Branko Grubic <bitlord0xff <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jun 5 07:19:52 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 7 23:46:59 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99dfdcac |
7 |
|
8 |
sys-kernel/dracut: Add missing grep to lvm module |
9 |
|
10 |
Includes upstream fix to add missing grep binary required |
11 |
by lvm module. |
12 |
|
13 |
https://github.com/dracutdevs/dracut/pull/1782/commits |
14 |
https://github.com/dracutdevs/dracut/commit/79f9d9e1c29a9c8fc046ab20765e5bde2aaa3428 |
15 |
|
16 |
Closes: https://bugs.gentoo.org/849764 |
17 |
Signed-off-by: Branko Grubic <bitlord0xff <AT> gmail.com> |
18 |
Closes: https://github.com/gentoo/gentoo/pull/25762 |
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
sys-kernel/dracut/dracut-056-r1.ebuild | 175 +++++++++++++++++++++ |
22 |
.../056-fix-lvm-add-missing-grep-requirement.patch | 36 +++++ |
23 |
2 files changed, 211 insertions(+) |
24 |
|
25 |
diff --git a/sys-kernel/dracut/dracut-056-r1.ebuild b/sys-kernel/dracut/dracut-056-r1.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..312710f43e05 |
28 |
--- /dev/null |
29 |
+++ b/sys-kernel/dracut/dracut-056-r1.ebuild |
30 |
@@ -0,0 +1,175 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs |
37 |
+ |
38 |
+if [[ ${PV} == 9999 ]] ; then |
39 |
+ inherit git-r3 |
40 |
+ EGIT_REPO_URI="https://github.com/dracutdevs/dracut" |
41 |
+else |
42 |
+ [[ "${PV}" = *_rc* ]] || \ |
43 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" |
44 |
+ SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" |
45 |
+fi |
46 |
+ |
47 |
+DESCRIPTION="Generic initramfs generation tool" |
48 |
+HOMEPAGE="https://dracut.wiki.kernel.org" |
49 |
+ |
50 |
+LICENSE="GPL-2" |
51 |
+SLOT="0" |
52 |
+IUSE="selinux test" |
53 |
+ |
54 |
+RESTRICT="!test? ( test )" |
55 |
+ |
56 |
+RDEPEND=" |
57 |
+ app-arch/cpio |
58 |
+ >=app-shells/bash-4.0:0 |
59 |
+ sys-apps/coreutils[xattr(-)] |
60 |
+ >=sys-apps/kmod-23[tools] |
61 |
+ || ( |
62 |
+ >=sys-apps/sysvinit-2.87-r3 |
63 |
+ sys-apps/openrc[sysv-utils(-),selinux?] |
64 |
+ sys-apps/systemd[sysv-utils] |
65 |
+ ) |
66 |
+ >=sys-apps/util-linux-2.21 |
67 |
+ virtual/pkgconfig |
68 |
+ virtual/udev |
69 |
+ |
70 |
+ elibc_musl? ( sys-libs/fts-standalone ) |
71 |
+ selinux? ( |
72 |
+ sec-policy/selinux-dracut |
73 |
+ sys-libs/libselinux |
74 |
+ sys-libs/libsepol |
75 |
+ ) |
76 |
+" |
77 |
+DEPEND=" |
78 |
+ >=sys-apps/kmod-23 |
79 |
+ elibc_musl? ( sys-libs/fts-standalone ) |
80 |
+" |
81 |
+ |
82 |
+BDEPEND=" |
83 |
+ app-text/asciidoc |
84 |
+ app-text/docbook-xml-dtd:4.5 |
85 |
+ >=app-text/docbook-xsl-stylesheets-1.75.2 |
86 |
+ >=dev-libs/libxslt-1.1.26 |
87 |
+ virtual/pkgconfig |
88 |
+" |
89 |
+ |
90 |
+QA_MULTILIB_PATHS="usr/lib/dracut/.*" |
91 |
+ |
92 |
+PATCHES=( |
93 |
+ "${FILESDIR}"/gentoo-ldconfig-paths-r1.patch |
94 |
+ "${FILESDIR}"/056-musl.patch |
95 |
+ "${FILESDIR}"/056-fix-lvm-add-missing-grep-requirement.patch |
96 |
+) |
97 |
+ |
98 |
+src_configure() { |
99 |
+ local myconf=( |
100 |
+ --prefix="${EPREFIX}/usr" |
101 |
+ --sysconfdir="${EPREFIX}/etc" |
102 |
+ --bashcompletiondir="$(get_bashcompdir)" |
103 |
+ --systemdsystemunitdir="$(systemd_get_systemunitdir)" |
104 |
+ ) |
105 |
+ |
106 |
+ tc-export CC PKG_CONFIG |
107 |
+ |
108 |
+ echo ./configure "${myconf[@]}" |
109 |
+ ./configure "${myconf[@]}" || die |
110 |
+ |
111 |
+ if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then |
112 |
+ # Source tarball from github doesn't include this file |
113 |
+ echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_test() { |
118 |
+ if [[ ${EUID} != 0 ]]; then |
119 |
+ # Tests need root privileges, bug #298014 |
120 |
+ ewarn "Skipping tests: Not running as root." |
121 |
+ elif [[ ! -w /dev/kvm ]]; then |
122 |
+ ewarn "Skipping tests: Unable to access /dev/kvm." |
123 |
+ else |
124 |
+ emake -C test check |
125 |
+ fi |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ local DOCS=( |
130 |
+ AUTHORS |
131 |
+ NEWS.md |
132 |
+ README.md |
133 |
+ docs/README.cross |
134 |
+ docs/README.generic |
135 |
+ docs/README.kernel |
136 |
+ docs/SECURITY.md |
137 |
+ ) |
138 |
+ |
139 |
+ default |
140 |
+ |
141 |
+ docinto html |
142 |
+ dodoc dracut.html |
143 |
+} |
144 |
+ |
145 |
+pkg_postinst() { |
146 |
+ if linux-info_get_any_version && linux_config_exists; then |
147 |
+ ewarn "" |
148 |
+ ewarn "If the following test report contains a missing kernel" |
149 |
+ ewarn "configuration option, you should reconfigure and rebuild your" |
150 |
+ ewarn "kernel before booting image generated with this Dracut version." |
151 |
+ ewarn "" |
152 |
+ |
153 |
+ local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS" |
154 |
+ |
155 |
+ # Kernel configuration options descriptions: |
156 |
+ local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" ' |
157 |
+ ERROR_DEVTMPFS+='is missing and REQUIRED' |
158 |
+ local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk ' |
159 |
+ ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED' |
160 |
+ |
161 |
+ check_extra_config |
162 |
+ echo |
163 |
+ else |
164 |
+ ewarn "" |
165 |
+ ewarn "Your kernel configuration couldn't be checked." |
166 |
+ ewarn "Please check manually if following options are enabled:" |
167 |
+ ewarn "" |
168 |
+ ewarn " CONFIG_BLK_DEV_INITRD" |
169 |
+ ewarn " CONFIG_DEVTMPFS" |
170 |
+ ewarn "" |
171 |
+ fi |
172 |
+ |
173 |
+ optfeature "Networking support" net-misc/networkmanager |
174 |
+ optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \ |
175 |
+ sys-apps/iproute2 "net-misc/iputils[arping]" |
176 |
+ optfeature \ |
177 |
+ "Measure performance of the boot process for later visualisation" \ |
178 |
+ app-benchmarks/bootchart2 app-admin/killproc sys-process/acct |
179 |
+ optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs |
180 |
+ optfeature "Load kernel modules and drop this privilege for real init" \ |
181 |
+ sys-libs/libcap |
182 |
+ optfeature "Support CIFS" net-fs/cifs-utils |
183 |
+ optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \ |
184 |
+ "sys-fs/cryptsetup[-static-libs]" |
185 |
+ optfeature "Support for GPG-encrypted keys for crypt module" \ |
186 |
+ app-crypt/gnupg |
187 |
+ optfeature \ |
188 |
+ "Allows use of dash instead of default bash (on your own risk)" \ |
189 |
+ app-shells/dash |
190 |
+ optfeature "Support iSCSI" sys-block/open-iscsi |
191 |
+ optfeature "Support Logical Volume Manager" sys-fs/lvm2 |
192 |
+ optfeature "Support MD devices, also known as software RAID devices" \ |
193 |
+ sys-fs/mdadm |
194 |
+ optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools |
195 |
+ optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5' |
196 |
+ optfeature "Support network block devices" sys-block/nbd |
197 |
+ optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind |
198 |
+ optfeature \ |
199 |
+ "Install ssh and scp along with config files and specified keys" \ |
200 |
+ net-misc/openssh |
201 |
+ optfeature "Enable logging with rsyslog" app-admin/rsyslog |
202 |
+ optfeature \ |
203 |
+ "Enable rngd service to help generating entropy early during boot" \ |
204 |
+ sys-apps/rng-tools |
205 |
+} |
206 |
|
207 |
diff --git a/sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch b/sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch |
208 |
new file mode 100644 |
209 |
index 000000000000..ca24180fd689 |
210 |
--- /dev/null |
211 |
+++ b/sys-kernel/dracut/files/056-fix-lvm-add-missing-grep-requirement.patch |
212 |
@@ -0,0 +1,36 @@ |
213 |
+From 79f9d9e1c29a9c8fc046ab20765e5bde2aaa3428 Mon Sep 17 00:00:00 2001 |
214 |
+From: Antonio Alvarez Feijoo <antonio.feijoo@××××.com> |
215 |
+Date: Mon, 11 Apr 2022 08:33:17 +0200 |
216 |
+Subject: [PATCH] fix(lvm): add missing grep requirement |
217 |
+ |
218 |
+Since commit https://github.com/dracutdevs/dracut/commit/7ffc5e38 |
219 |
+lvm_scan.sh needs grep. |
220 |
+--- |
221 |
+ modules.d/90lvm/module-setup.sh | 4 ++-- |
222 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
223 |
+ |
224 |
+diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh |
225 |
+index 25be0133..aa8c6db8 100755 |
226 |
+--- a/modules.d/90lvm/module-setup.sh |
227 |
++++ b/modules.d/90lvm/module-setup.sh |
228 |
+@@ -3,7 +3,7 @@ |
229 |
+ # called by dracut |
230 |
+ check() { |
231 |
+ # No point trying to support lvm if the binaries are missing |
232 |
+- require_binaries lvm || return 1 |
233 |
++ require_binaries lvm grep || return 1 |
234 |
+ |
235 |
+ [[ $hostonly ]] || [[ $mount_needs ]] && { |
236 |
+ for fs in "${host_fs_types[@]}"; do |
237 |
+@@ -48,7 +48,7 @@ installkernel() { |
238 |
+ |
239 |
+ # called by dracut |
240 |
+ install() { |
241 |
+- inst lvm |
242 |
++ inst_multiple lvm grep |
243 |
+ |
244 |
+ if [[ $hostonly_cmdline == "yes" ]]; then |
245 |
+ local _lvmconf |
246 |
+-- |
247 |
+2.35.1 |
248 |
+ |