mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
Merge pull request #2837 from flatcar/chewi/dracut
Upgrade Dracut to 106, use its sysroot feature, fix CPU microcode
This commit is contained in:
commit
5c04d0fcf6
@ -652,6 +652,7 @@ sys-fs/xfsprogs
|
||||
sys-fs/zfs
|
||||
sys-fs/zfs-kmod
|
||||
|
||||
sys-kernel/dracut
|
||||
sys-kernel/linux-headers
|
||||
|
||||
sys-libs/binutils-libs
|
||||
|
1
changelog/bugfixes/2025-04-17-cpu-microcode.md
Normal file
1
changelog/bugfixes/2025-04-17-cpu-microcode.md
Normal file
@ -0,0 +1 @@
|
||||
- Fixed the inclusion of Intel and AMD CPU microcode in the initrd. This was accidentally dropped some time ago.
|
1
changelog/changes/2025-04-17-systemd-crypt.md
Normal file
1
changelog/changes/2025-04-17-systemd-crypt.md
Normal file
@ -0,0 +1 @@
|
||||
- systemd now uses OpenSSL instead of gcrypt for cryptography to reduce the size of the initrd. This change disables systemd-journal's Forward Secure Sealing feature, but it is generally not useful for Flatcar.
|
1
changelog/updates/2025-04-17-dracut-update.md
Normal file
1
changelog/updates/2025-04-17-dracut-update.md
Normal file
@ -0,0 +1 @@
|
||||
- dracut ([106](https://github.com/dracut-ng/dracut-ng/releases/tag/106) (includes [105](https://github.com/dracut-ng/dracut-ng/releases/tag/105), [104](https://github.com/dracut-ng/dracut-ng/releases/tag/104), [103](https://github.com/dracut-ng/dracut-ng/releases/tag/103), [102](https://github.com/dracut-ng/dracut-ng/releases/tag/102), [101](https://github.com/dracut-ng/dracut-ng/releases/tag/101), [100](https://github.com/dracut-ng/dracut-ng/releases/tag/100), [060](https://github.com/dracut-ng/dracut-ng/releases/tag/060), [059](https://github.com/dracut-ng/dracut-ng/releases/tag/059), [058](https://github.com/dracut-ng/dracut-ng/releases/tag/058), [057](https://github.com/dracut-ng/dracut-ng/releases/tag/057), [056](https://github.com/dracut-ng/dracut-ng/releases/tag/056), [055](https://github.com/dracut-ng/dracut-ng/releases/tag/055), [054](https://github.com/dracut-ng/dracut-ng/releases/tag/054)))
|
@ -0,0 +1,980 @@
|
||||
From 62c75393ea18b65ba0f7f224070c3bb94d3bd930 Mon Sep 17 00:00:00 2001
|
||||
From: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Date: Fri, 7 Feb 2025 20:24:39 -0500
|
||||
Subject: [PATCH 01/22] fix(systemd-sysusers): always silence stdout
|
||||
|
||||
systemd-sysusers does not have quiet option, so
|
||||
always silence stdout (but not stderr).
|
||||
|
||||
Fixes: https://github.com/dracut-ng/dracut-ng/issues/1195
|
||||
---
|
||||
modules.d/60systemd-sysusers/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/60systemd-sysusers/module-setup.sh b/modules.d/60systemd-sysusers/module-setup.sh
|
||||
index 05680553..977695e6 100755
|
||||
--- a/modules.d/60systemd-sysusers/module-setup.sh
|
||||
+++ b/modules.d/60systemd-sysusers/module-setup.sh
|
||||
@@ -15,5 +15,5 @@ check() {
|
||||
install() {
|
||||
inst_sysusers basic.conf
|
||||
|
||||
- systemd-sysusers --root="$initdir"
|
||||
+ systemd-sysusers --root="$initdir" > /dev/null
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 9b822c31e3c096a276904c0d6ebfd379ec443e23 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Fjeldstad <bfjelds@microsoft.com>
|
||||
Date: Tue, 4 Feb 2025 22:09:04 +0000
|
||||
Subject: [PATCH 02/22] fix(dracut): avoid mktemp collisions with find filter
|
||||
|
||||
---
|
||||
dracut.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 88b14f3e..ef959021 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1324,10 +1324,10 @@ if findmnt --raw -n --target "$tmpdir" --output=options | grep -q noexec; then
|
||||
noexec=1
|
||||
fi
|
||||
|
||||
-DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)"
|
||||
+DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.dXXXXXX)"
|
||||
readonly DRACUT_TMPDIR
|
||||
[ -d "$DRACUT_TMPDIR" ] || {
|
||||
- printf "%s\n" "dracut[F]: mktemp -p '$TMPDIR/' -d -t dracut.XXXXXX failed." >&2
|
||||
+ printf "%s\n" "dracut[F]: mktemp -p '$TMPDIR/' -d -t dracut.dXXXXXX failed." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 89da4257a6ffa737a69f7095bb41d5ae3f247d82 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Drung <benjamin.drung@canonical.com>
|
||||
Date: Wed, 12 Feb 2025 11:10:30 +0100
|
||||
Subject: [PATCH 03/22] fix(dracut-lib): support "set -e" in setdebug
|
||||
|
||||
A `return` statement will return with the exit code of the previous
|
||||
command if no exit code is specified. In case `/usr/lib/initrd-release`
|
||||
does not exist, `setdebug` will return with the exit code 1.
|
||||
|
||||
Return this function with code 0 in that case to support `set -e` users.
|
||||
|
||||
Fixes: 2b125c69cc80 ("base/dracut-lib.sh: do not setdebug, if not in initramfs")
|
||||
---
|
||||
modules.d/99base/dracut-lib.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index acedea98..05c361c6 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -340,7 +340,7 @@ splitsep() {
|
||||
}
|
||||
|
||||
setdebug() {
|
||||
- [ -f /usr/lib/initrd-release ] || return
|
||||
+ [ -f /usr/lib/initrd-release ] || return 0
|
||||
if [ -z "$RD_DEBUG" ]; then
|
||||
if [ -e /proc/cmdline ]; then
|
||||
RD_DEBUG=no
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 57911e76e2826fa6d9f2b80915cf99c6eb0e05b0 Mon Sep 17 00:00:00 2001
|
||||
From: You-Sheng Yang <vicamo.yang@canonical.com>
|
||||
Date: Wed, 22 Jan 2025 23:37:53 +0800
|
||||
Subject: [PATCH 04/22] fix(dracut-install): install compressed blobs that
|
||||
match wildcard fwpath
|
||||
|
||||
dracut-install tries to invoke `glob()` with full path expanded from
|
||||
"intel/ish/ish_*.bin", but while all the binaries were compressed, this
|
||||
matches no file and none of the custom ISH firmware blobs will be
|
||||
installed.
|
||||
|
||||
Closes: #1150
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2095518
|
||||
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
|
||||
---
|
||||
src/install/dracut-install.c | 42 +++++++++++++++++++++++++++---------
|
||||
1 file changed, 32 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
||||
index 96bc2eb6..bacbe86e 100644
|
||||
--- a/src/install/dracut-install.c
|
||||
+++ b/src/install/dracut-install.c
|
||||
@@ -1437,12 +1437,15 @@ static int install_all(int argc, char **argv)
|
||||
return r;
|
||||
}
|
||||
|
||||
-static int install_firmware_fullpath(const char *fwpath)
|
||||
+static int install_firmware_fullpath(const char *fwpath, bool maybe_compressed)
|
||||
{
|
||||
const char *fw = fwpath;
|
||||
_cleanup_free_ char *fwpath_compressed = NULL;
|
||||
int ret;
|
||||
if (access(fwpath, F_OK) != 0) {
|
||||
+ if (!maybe_compressed)
|
||||
+ return 1;
|
||||
+
|
||||
_asprintf(&fwpath_compressed, "%s.zst", fwpath);
|
||||
if (access(fwpath_compressed, F_OK) != 0) {
|
||||
strcpy(fwpath_compressed + strlen(fwpath) + 1, "xz");
|
||||
@@ -1460,6 +1463,23 @@ static int install_firmware_fullpath(const char *fwpath)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static bool install_firmware_glob(const char *fwpath)
|
||||
+{
|
||||
+ size_t i;
|
||||
+ _cleanup_globfree_ glob_t globbuf;
|
||||
+ bool found = false;
|
||||
+ int ret;
|
||||
+
|
||||
+ glob(fwpath, 0, NULL, &globbuf);
|
||||
+ for (i = 0; i < globbuf.gl_pathc; i++) {
|
||||
+ ret = install_firmware_fullpath(globbuf.gl_pathv[i], false);
|
||||
+ if (ret == 0)
|
||||
+ found = true;
|
||||
+ }
|
||||
+
|
||||
+ return found;
|
||||
+}
|
||||
+
|
||||
static int install_firmware(struct kmod_module *mod)
|
||||
{
|
||||
struct kmod_list *l = NULL;
|
||||
@@ -1490,17 +1510,19 @@ static int install_firmware(struct kmod_module *mod)
|
||||
|
||||
if (strpbrk(value, "*?[") != NULL
|
||||
&& access(fwpath, F_OK) != 0) {
|
||||
- size_t i;
|
||||
- _cleanup_globfree_ glob_t globbuf;
|
||||
-
|
||||
- glob(fwpath, 0, NULL, &globbuf);
|
||||
- for (i = 0; i < globbuf.gl_pathc; i++) {
|
||||
- ret = install_firmware_fullpath(globbuf.gl_pathv[i]);
|
||||
- if (ret == 0)
|
||||
- found_this = true;
|
||||
+ found_this = install_firmware_glob(fwpath);
|
||||
+ if (!found_this) {
|
||||
+ _cleanup_free_ char *fwpath_compressed = NULL;
|
||||
+
|
||||
+ _asprintf(&fwpath_compressed, "%s.zst", fwpath);
|
||||
+ found_this = install_firmware_glob(fwpath_compressed);
|
||||
+ if (!found_this) {
|
||||
+ strcpy(fwpath_compressed + strlen(fwpath) + 1, "xz");
|
||||
+ found_this = install_firmware_glob(fwpath_compressed);
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
- ret = install_firmware_fullpath(fwpath);
|
||||
+ ret = install_firmware_fullpath(fwpath, true);
|
||||
if (ret == 0)
|
||||
found_this = true;
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From ddbeed81b2d43a03a16dc60ff76fd0355d4be5b9 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Harmstone <mark@harmstone.com>
|
||||
Date: Thu, 23 Jan 2025 11:39:13 +0000
|
||||
Subject: [PATCH 05/22] feat(btrfs): also install btrfstune
|
||||
|
||||
---
|
||||
modules.d/90btrfs/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
|
||||
index 5d881332..80bba155 100755
|
||||
--- a/modules.d/90btrfs/module-setup.sh
|
||||
+++ b/modules.d/90btrfs/module-setup.sh
|
||||
@@ -55,6 +55,6 @@ install() {
|
||||
inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
|
||||
fi
|
||||
|
||||
- inst_multiple -o btrfsck btrfs-zero-log
|
||||
+ inst_multiple -o btrfsck btrfs-zero-log btrfstune
|
||||
inst "$(command -v btrfs)" /sbin/btrfs
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From cb8fb9641feec8ee3e0ce249da98becc6cdbb98b Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Drung <benjamin.drung@canonical.com>
|
||||
Date: Fri, 21 Feb 2025 23:49:04 +0100
|
||||
Subject: [PATCH 06/22] fix(systemd-sysusers): silence "Creating " on stderr
|
||||
|
||||
dracut prints 20 lines when creating users and groups even with
|
||||
`--quiet` option. Sample output:
|
||||
|
||||
```
|
||||
Creating group 'nobody' with GID 65534.
|
||||
Creating group 'audio' with GID 997.
|
||||
Creating group 'disk' with GID 995.
|
||||
Creating group 'input' with GID 994.
|
||||
Creating group 'kmem' with GID 993.
|
||||
Creating group 'kvm' with GID 992.
|
||||
Creating group 'lp' with GID 991.
|
||||
Creating group 'optical' with GID 990.
|
||||
Creating group 'render' with GID 989.
|
||||
Creating group 'sgx' with GID 988.
|
||||
Creating group 'storage' with GID 987.
|
||||
Creating group 'tty' with GID 5.
|
||||
Creating group 'uucp' with GID 986.
|
||||
Creating group 'video' with GID 985.
|
||||
Creating group 'users' with GID 984.
|
||||
Creating group 'systemd-journal' with GID 983.
|
||||
Creating user 'root' (Super User) with UID 0 and GID 0.
|
||||
Creating user 'nobody' (Kernel Overflow User) with UID 65534 and GID 65534.
|
||||
Creating group 'nobody' with GID 65534.
|
||||
Creating group 'audio' with GID 997.
|
||||
```
|
||||
|
||||
Filter "Creating " messages from stderr, but keep the other messages on
|
||||
stderr and all messages on stdout untouched.
|
||||
|
||||
Fixes: https://github.com/dracut-ng/dracut-ng/issues/1195
|
||||
Fixes: f3dacc013d90 ("feat(systemd-sysusers): run systemd-sysusers as part of the build process")
|
||||
---
|
||||
modules.d/60systemd-sysusers/module-setup.sh | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/60systemd-sysusers/module-setup.sh b/modules.d/60systemd-sysusers/module-setup.sh
|
||||
index 977695e6..0bddd19d 100755
|
||||
--- a/modules.d/60systemd-sysusers/module-setup.sh
|
||||
+++ b/modules.d/60systemd-sysusers/module-setup.sh
|
||||
@@ -15,5 +15,9 @@ check() {
|
||||
install() {
|
||||
inst_sysusers basic.conf
|
||||
|
||||
- systemd-sysusers --root="$initdir" > /dev/null
|
||||
+ # redirect stdout temporarily to FD 3 to use filter stderr
|
||||
+ {
|
||||
+ set -o pipefail
|
||||
+ systemd-sysusers --root="$initdir" 2>&1 >&3 | grep -v "^Creating " >&2
|
||||
+ } 3>&1
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From f3fffa1edce2fd5e542c115296c9b0856611faa7 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Thu, 20 Feb 2025 11:20:36 +0100
|
||||
Subject: [PATCH 07/22] fix(systemd-veritysetup): install dm-verity kernel
|
||||
module
|
||||
|
||||
---
|
||||
modules.d/01systemd-veritysetup/module-setup.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules.d/01systemd-veritysetup/module-setup.sh b/modules.d/01systemd-veritysetup/module-setup.sh
|
||||
index fecfecc8..9dad8d4f 100755
|
||||
--- a/modules.d/01systemd-veritysetup/module-setup.sh
|
||||
+++ b/modules.d/01systemd-veritysetup/module-setup.sh
|
||||
@@ -26,6 +26,11 @@ depends() {
|
||||
|
||||
}
|
||||
|
||||
+# Install kernel module(s).
|
||||
+installkernel() {
|
||||
+ instmods dm-verity
|
||||
+}
|
||||
+
|
||||
# Install the required file(s) and directories for the module in the initramfs.
|
||||
install() {
|
||||
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 3d5bab815570d2a271a45ceb9135f7cb3bde11f1 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Wed, 26 Feb 2025 14:54:51 +0100
|
||||
Subject: [PATCH 08/22] fix(iscsi): don't require network setup for qedi
|
||||
|
||||
This adds the logic of cc2c48a ("fix(iscsi): don't require network setup
|
||||
for bnx2i") for the qedi iSCSI offload driver. Testing has shown
|
||||
that for qedi, network setup in the initrd is even more superfluous
|
||||
as it is for bnx2i. qedi devices are usually separate PCI functions
|
||||
that don't show up as ethernet interfaces at all.
|
||||
|
||||
While at it, simplify the conditional a bit.
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
---
|
||||
modules.d/95iscsi/parse-iscsiroot.sh | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||
index 2dace3a6..a388bec1 100755
|
||||
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||
@@ -79,8 +79,9 @@ fi
|
||||
|
||||
# iscsi_firmware does not need argument checking
|
||||
if [ -n "$iscsi_firmware" ]; then
|
||||
- if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then
|
||||
- [ -z "$netroot" ] && [ "$iscsi_transport" != bnx2i ] && netroot=iscsi:
|
||||
+ if [ "$root" != "dhcp" ] && [ -z "$netroot" ] \
|
||||
+ && [ "$iscsi_transport" != bnx2i ] && [ "$iscsi_transport" != qedi ]; then
|
||||
+ netroot=iscsi:
|
||||
fi
|
||||
modprobe -b -q iscsi_boot_sysfs 2> /dev/null
|
||||
modprobe -b -q iscsi_ibft
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From fcde3355456323be9674aac1d00e3c66683b7f99 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Wed, 26 Feb 2025 14:59:44 +0100
|
||||
Subject: [PATCH 09/22] fix(iscsi): make sure services are shut down when
|
||||
switching root
|
||||
|
||||
When systemd prepares switching root, it starts 'initrd-cleanup.service',
|
||||
which runs 'systemctl --no-block isolate initrd-switch-root.target'.
|
||||
This will stop all units on which initrd-switch-root.target does not
|
||||
depend, including iscsid.service and iscsiuio.service. But systemd
|
||||
doesn't guarantee a time ordering in this case. It can happen that
|
||||
systemd switches root (i.e. restarts itself on the new root) before
|
||||
iscsiuio is actually stopped, or at least before PID 1 receives
|
||||
the notification that it has stopped. In this case, it considers
|
||||
iscsiuio still running, and will not start it later in the boot
|
||||
sequence when iscsid is coming up.
|
||||
|
||||
A typical log excerpt with systemd.log_level=debug looks like this:
|
||||
|
||||
[ 36.470761] worker2 systemd[1]: initrd-cleanup.service: Trying to enqueue job initrd-cleanup.service/start/replace
|
||||
[ 36.765241] worker2 systemd[1]: initrd-switch-root.target: Trying to enqueue job initrd-switch-root.target/start/isolate
|
||||
[ 36.765337] worker2 systemd[1]: iscsid.service: Installed new job iscsid.service/stop as 139
|
||||
[ 36.765535] worker2 systemd[1]: iscsiuio.service: Installed new job iscsiuio.service/stop as 138
|
||||
[ 36.824789] worker2 systemd[1]: iscsid.socket: stopping held back, waiting for: iscsid.service
|
||||
[ 36.824813] worker2 systemd[1]: iscsiuio.socket: stopping held back, waiting for: iscsiuio.service
|
||||
[ 36.888759] worker2 systemd[1]: iscsid.service: Thawing unit.
|
||||
[ 36.888882] worker2 systemd[1]: iscsid.service: Changed running -> stop-sigterm
|
||||
[ 36.889355] worker2 systemd[1]: Stopping Open-iSCSI...
|
||||
[ 36.889413] worker2 systemd[1]: iscsiuio.service: stopping held back, waiting for: iscsid.service
|
||||
[ 37.512072] worker2 systemd[1]: Reached target Switch Root.
|
||||
[ 37.549512] worker2 @ystemctl[1614]: Switching root - root: /sysroot; init: n/a
|
||||
[ 37.577264] worker2 systemd[1]: Switching root.
|
||||
|
||||
When iscsid is started later on in the real root, it resets all existing iSCSI
|
||||
connections, causing the root FS to come offline. In iSCSI offload scenarios
|
||||
if iscsiuio is already running, it will re-establish the session after a few
|
||||
seconds. But if iscsiuio has not been started at this point in time, it can't
|
||||
be loaded any more from the root FS, and booting fails.
|
||||
|
||||
To avoid this problem, add "Conflicts" and a "Before" dependencies against
|
||||
initrd-cleanup.service to the iSCSI service units.
|
||||
|
||||
See also https://github.com/systemd/systemd/issues/3436
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index 1b2ea110..3bb9a63d 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -234,8 +234,8 @@ install() {
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "DefaultDependencies=no"
|
||||
- echo "Conflicts=shutdown.target"
|
||||
- echo "Before=shutdown.target"
|
||||
+ echo "Conflicts=shutdown.target initrd-cleanup.service"
|
||||
+ echo "Before=shutdown.target initrd-cleanup.service"
|
||||
} > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
|
||||
|
||||
mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
|
||||
@@ -250,8 +250,8 @@ install() {
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "DefaultDependencies=no"
|
||||
- echo "Conflicts=shutdown.target"
|
||||
- echo "Before=shutdown.target"
|
||||
+ echo "Conflicts=shutdown.target initrd-cleanup.service"
|
||||
+ echo "Before=shutdown.target initrd-cleanup.service"
|
||||
} > "${initdir}/$systemdsystemunitdir/iscsiuio.service.d/dracut.conf"
|
||||
|
||||
mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 20cc20d2ac9c2908da6735b04dba49c1cb1b0bab Mon Sep 17 00:00:00 2001
|
||||
From: Xinhui Yang <cyan@cyano.uk>
|
||||
Date: Sat, 1 Mar 2025 00:54:31 +0800
|
||||
Subject: [PATCH 10/22] fix(90kernel-modules): explicitly include
|
||||
xhci-pci-renesas
|
||||
|
||||
Since Linux v6.12-rc1 (commit 25f51b76f90f), xhci-pci no longer depends
|
||||
on xhci-pci-renesas, causing the Renesas driver to be omitted during
|
||||
initramfs generation (when built as a module).
|
||||
|
||||
This makes platforms with such xHCI controllers unavailable during
|
||||
initrd, and unable to boot from a USB drive. There are SuperSpeed ports
|
||||
routed through such controller on some platforms, too, which also
|
||||
renders the USB keyboard and mouse unusable.
|
||||
|
||||
Here's a snippet of the kernel log from such platform, showing a
|
||||
keyboard and a mouse being detected only after the initrd switched root:
|
||||
|
||||
[ 9.352608] systemd-journald[187]: Received SIGTERM from PID 1 (systemd).
|
||||
[ 9.500146] systemd[1]: systemd 257.2 running in system mode (OMITTED)
|
||||
...
|
||||
[ 11.187756] xhci-pci-renesas 0000:04:00.0: xHCI Host Controller
|
||||
[ 11.187870] xhci-pci-renesas 0000:04:00.0: new USB bus registered, assigned bus number 7
|
||||
[ 11.193261] xhci-pci-renesas 0000:04:00.0: hcc params 0x014051cf hci version 0x100 quirks 0x0000000100000010
|
||||
[ 11.194806] xhci-pci-renesas 0000:04:00.0: xHCI Host Controller
|
||||
[ 11.196601] xhci-pci-renesas 0000:04:00.0: new USB bus registered, assigned bus number 8
|
||||
[ 11.196613] xhci-pci-renesas 0000:04:00.0: Host supports USB 3.0 SuperSpeed
|
||||
[ 11.196927] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.13
|
||||
[ 11.196931] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
|
||||
[ 11.196935] usb usb7: Product: xHCI Host Controller
|
||||
[ 11.196938] usb usb7: Manufacturer: Linux 6.13.3-aosc-main xhci-hcd
|
||||
[ 11.196941] usb usb7: SerialNumber: 0000:04:00.0
|
||||
[ 11.199598] hub 7-0:1.0: USB hub found
|
||||
[ 11.199630] hub 7-0:1.0: 4 ports detected
|
||||
...
|
||||
[ 11.439561] usb 7-2: new high-speed USB device number 2 using xhci-pci-renesas
|
||||
[ 11.568361] usb 7-2: New USB device found, idVendor=1532, idProduct=0114, bcdDevice= 1.00
|
||||
[ 11.568369] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
|
||||
[ 11.568372] usb 7-2: Product: DeathStalker Ultimate
|
||||
[ 11.568376] usb 7-2: Manufacturer: Razer
|
||||
[ 11.600474] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.0/0003:1532:0114.0001/input/input12
|
||||
[ 11.600686] hid-generic 0003:1532:0114.0001: input,hidraw0: USB HID v1.11 Mouse [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input0
|
||||
[ 11.601137] input: Razer DeathStalker Ultimate Keyboard as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.1/0003:1532:0114.0002/input/input13
|
||||
[ 11.652148] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.1/0003:1532:0114.0002/input/input14
|
||||
[ 11.652409] hid-generic 0003:1532:0114.0002: input,hidraw1: USB HID v1.11 Keyboard [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input1
|
||||
[ 11.653054] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.2/0003:1532:0114.0003/input/input15
|
||||
[ 11.703768] hid-generic 0003:1532:0114.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input2
|
||||
---
|
||||
modules.d/90kernel-modules/module-setup.sh | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||
index f159f0be..1ac91d02 100755
|
||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||
@@ -39,12 +39,15 @@ installkernel() {
|
||||
hostonly='' instmods \
|
||||
hid_generic unix
|
||||
|
||||
+ # xhci-pci-renesas is needed for the USB to be available during
|
||||
+ # initrd on platforms with such USB controllers since Linux
|
||||
+ # 6.12-rc1 (commit 25f51b76f90f).
|
||||
hostonly=$(optional_hostonly) instmods \
|
||||
ehci-hcd ehci-pci ehci-platform \
|
||||
ohci-hcd ohci-pci \
|
||||
uhci-hcd \
|
||||
usbhid \
|
||||
- xhci-hcd xhci-pci xhci-plat-hcd \
|
||||
+ xhci-hcd xhci-pci xhci-pci-renesas xhci-plat-hcd \
|
||||
"=drivers/hid" \
|
||||
"=drivers/tty/serial" \
|
||||
"=drivers/input/serio" \
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 4402aeb271933e6b542f5d9a4ff13f6e8b97e6c2 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Wed, 26 Feb 2025 08:20:09 +0100
|
||||
Subject: [PATCH 11/22] feat(systemd-integritysetup): add
|
||||
remote-integritysetup.target
|
||||
|
||||
Required since https://github.com/systemd/systemd/commit/810708f4b820543b8585a36e84ccca4bc5b18fee
|
||||
---
|
||||
modules.d/01systemd-integritysetup/module-setup.sh | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/01systemd-integritysetup/module-setup.sh b/modules.d/01systemd-integritysetup/module-setup.sh
|
||||
index 3d176404..dffc88ac 100755
|
||||
--- a/modules.d/01systemd-integritysetup/module-setup.sh
|
||||
+++ b/modules.d/01systemd-integritysetup/module-setup.sh
|
||||
@@ -26,6 +26,7 @@ depends() {
|
||||
|
||||
}
|
||||
|
||||
+# Install kernel module(s).
|
||||
installkernel() {
|
||||
instmods dm-integrity
|
||||
}
|
||||
@@ -36,9 +37,11 @@ install() {
|
||||
inst_multiple -o \
|
||||
"$systemdutildir"/systemd-integritysetup \
|
||||
"$systemdutildir"/system-generators/systemd-integritysetup-generator \
|
||||
+ "$systemdsystemunitdir"/remote-integritysetup.target \
|
||||
"$systemdsystemunitdir"/integritysetup-pre.target \
|
||||
"$systemdsystemunitdir"/integritysetup.target \
|
||||
- "$systemdsystemunitdir"/sysinit.target.wants/integritysetup.target
|
||||
+ "$systemdsystemunitdir"/sysinit.target.wants/integritysetup.target \
|
||||
+ "$systemdsystemunitdir"/initrd-root-device.target.wants/remote-integritysetup.target
|
||||
|
||||
# Install the hosts local user configurations if enabled.
|
||||
if [[ $hostonly ]]; then
|
||||
@@ -48,8 +51,11 @@ install() {
|
||||
"$systemdsystemconfdir/integritysetup.target.wants/*.target" \
|
||||
"$systemdsystemconfdir"/integritysetup-pre.target \
|
||||
"$systemdsystemconfdir/integritysetup-pre.target.wants/*.target" \
|
||||
+ "$systemdsystemconfdir"/remote-integritysetup.target \
|
||||
+ "$systemdsystemconfdir/remote-integritysetup.target.wants/*.target" \
|
||||
"$systemdsystemconfdir"/sysinit.target.wants/integritysetup.target \
|
||||
- "$systemdsystemconfdir/sysinit.target.wants/integritysetup.target.wants/*.target"
|
||||
+ "$systemdsystemconfdir/sysinit.target.wants/integritysetup.target.wants/*.target" \
|
||||
+ "$systemdsystemconfdir"/initrd-root-device.target.wants/remote-integritysetup.target
|
||||
fi
|
||||
|
||||
# Install required libraries.
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From c43b79056ffdb7b410e70550a8ad8d137b4720c0 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Wed, 26 Mar 2025 18:04:25 -0400
|
||||
Subject: [PATCH 13/22] fix(multipath): skip default multipath.conf with
|
||||
mpathconf
|
||||
|
||||
Commit 1e802f15f creates a default multipath.conf file with
|
||||
"find_multipaths strict" when run in non-hostonly mode if there are no
|
||||
multipath devices and no multipath.conf. Unfortunately for systems that
|
||||
want to use mpathconf to create a multipath.conf file (e.g. Fedora and
|
||||
Centos) either through multipathd-configure.service or multipathd.sh,
|
||||
this default file keeps that from occurring. To make sure mpathconf is
|
||||
called to create the config file, do not install a default config file
|
||||
if mpathconf is installed.
|
||||
|
||||
Fixes: ("fix(multipath): include module with find_multipaths strict")
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
modules.d/90multipath/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||
index 5fdbb9a7..a05df018 100755
|
||||
--- a/modules.d/90multipath/module-setup.sh
|
||||
+++ b/modules.d/90multipath/module-setup.sh
|
||||
@@ -122,7 +122,7 @@ install() {
|
||||
fi
|
||||
}
|
||||
|
||||
- [[ $hostonly ]] || {
|
||||
+ [[ $hostonly ]] || mpathconf_installed || {
|
||||
for_each_host_dev_and_slaves is_mpath \
|
||||
|| [[ -f /etc/multipath.conf ]] || {
|
||||
cat > "${initdir}"/etc/multipath.conf << EOF
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From e6b2c882af61a804f7658ed6e2f84f02277c7b8a Mon Sep 17 00:00:00 2001
|
||||
From: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Date: Mon, 24 Mar 2025 09:12:13 -0400
|
||||
Subject: [PATCH 14/22] chore(network-legacy): no need to call chmod on ifup.sh
|
||||
|
||||
This is a small optimization, with the goal of avoiding
|
||||
calling chmod for a file that is already guaranteed to be
|
||||
an executable.
|
||||
---
|
||||
modules.d/35network-legacy/ifup.sh | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
||||
index 1cd27b14..59629f11 100755
|
||||
--- a/modules.d/35network-legacy/ifup.sh
|
||||
+++ b/modules.d/35network-legacy/ifup.sh
|
||||
@@ -47,7 +47,6 @@ do_dhcp_parallel() {
|
||||
echo 'dhcp=dhclient' >> /run/NetworkManager/conf.d/10-dracut-dhclient.conf
|
||||
fi
|
||||
|
||||
- chmod +x /sbin/dhcp-multi.sh
|
||||
/sbin/dhcp-multi.sh "$netif" "$DO_VLAN" "$@" &
|
||||
return 0
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From ddc1f54d3ec96c55c444af22a0a964cb48266a21 Mon Sep 17 00:00:00 2001
|
||||
From: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Date: Mon, 24 Mar 2025 09:23:22 -0400
|
||||
Subject: [PATCH 15/22] perf(base): move the chmod dependency from base to
|
||||
systemd
|
||||
|
||||
base dracut module no longer requires chmod.
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 1 +
|
||||
modules.d/95ssh-client/module-setup.sh | 2 +-
|
||||
modules.d/99base/module-setup.sh | 1 -
|
||||
3 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 1f35a73c..283a39af 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -84,6 +84,7 @@ install() {
|
||||
"$systemdsystemunitdir"/-.slice \
|
||||
systemctl \
|
||||
echo swapoff \
|
||||
+ chmod \
|
||||
mount umount reboot poweroff \
|
||||
systemd-run systemd-escape \
|
||||
systemd-cgls
|
||||
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
|
||||
index 75fc94f3..662ad177 100755
|
||||
--- a/modules.d/95ssh-client/module-setup.sh
|
||||
+++ b/modules.d/95ssh-client/module-setup.sh
|
||||
@@ -65,7 +65,7 @@ inst_sshenv() {
|
||||
install() {
|
||||
local _nsslibs
|
||||
|
||||
- inst_multiple ssh scp
|
||||
+ inst_multiple ssh scp chmod
|
||||
inst_sshenv
|
||||
|
||||
_nsslibs=$(
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index 4a86e90d..12194964 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -9,7 +9,6 @@ depends() {
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_multiple \
|
||||
- chmod \
|
||||
cp \
|
||||
dmesg \
|
||||
flock \
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 2ae73d639834758a88b34033693bd97a7b1ed2f0 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Drung <benjamin.drung@canonical.com>
|
||||
Date: Thu, 3 Apr 2025 14:14:07 +0200
|
||||
Subject: [PATCH 16/22] feat: add simpledrm module (as subset of drm module)
|
||||
|
||||
Plymouth doesn't always show a splash screen if DRM drivers are
|
||||
installed in initrd.
|
||||
|
||||
Provide a `simpledrm` module that only installs the SimpleDRM module
|
||||
and the potentially needed privacy screen providers. This `simpledrm`
|
||||
module is a subset of the `drm` module. It could be used instead of
|
||||
`drm` to avoid pulling in drivers like amdgpu, nouveau, or nvidia-drm.
|
||||
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/2105377
|
||||
---
|
||||
modules.d/45simpledrm/module-setup.sh | 28 +++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
create mode 100755 modules.d/45simpledrm/module-setup.sh
|
||||
|
||||
diff --git a/modules.d/45simpledrm/module-setup.sh b/modules.d/45simpledrm/module-setup.sh
|
||||
new file mode 100755
|
||||
index 00000000..aa5fcd33
|
||||
--- /dev/null
|
||||
+++ b/modules.d/45simpledrm/module-setup.sh
|
||||
@@ -0,0 +1,28 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+# called by dracut
|
||||
+check() {
|
||||
+ return 255
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+installkernel() {
|
||||
+ # Include simple DRM driver
|
||||
+ instmods simpledrm
|
||||
+
|
||||
+ if [[ $hostonly ]]; then
|
||||
+ # if there is a privacy screen then its driver must be loaded before the
|
||||
+ # kms driver will bind, otherwise its probe() will return -EPROBE_DEFER
|
||||
+ # note privacy screens always register, even with e.g. nokmsboot
|
||||
+ for i in /sys/class/drm/privacy_screen-*/device/driver/module; do
|
||||
+ [[ -L $i ]] || continue
|
||||
+ modlink=$(readlink "$i")
|
||||
+ modname=$(basename "$modlink")
|
||||
+ instmods "$modname"
|
||||
+ done
|
||||
+ else
|
||||
+ # include privacy screen providers (see above comment)
|
||||
+ # atm all providers live under drivers/platform/x86
|
||||
+ dracut_instmods -o -s "drm_privacy_screen_register" "=drivers/platform/x86"
|
||||
+ fi
|
||||
+}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 1b5669c1d89e0cc1134ad5b0aa5c091144d24b84 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Fri, 4 Apr 2025 10:18:07 +0200
|
||||
Subject: [PATCH 17/22] feat(systemd): add new systemd-validatefs@.service
|
||||
|
||||
Introduced in https://github.com/systemd/systemd/commit/0bdd5ccc8145af8dae9779751d3e7a34c4fa6aa5
|
||||
Used internally in fstab-generator (new `x-systemd.validatefs` mount option) and
|
||||
gpt-auto-generator: https://github.com/systemd/systemd/commit/f872373a26dcaa0818b49220abfe35611d12fa82
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 283a39af..8f25475e 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -35,6 +35,7 @@ install() {
|
||||
"$systemdutildir"/systemd-shutdown \
|
||||
"$systemdutildir"/systemd-reply-password \
|
||||
"$systemdutildir"/systemd-fsck \
|
||||
+ "$systemdutildir"/systemd-validatefs \
|
||||
"$systemdutildir"/systemd-volatile-root \
|
||||
"$systemdutildir"/systemd-sysroot-fstab-check \
|
||||
"$systemdutildir"/system-generators/systemd-debug-generator \
|
||||
@@ -76,6 +77,7 @@ install() {
|
||||
"$systemdsystemunitdir"/systemd-reboot.service \
|
||||
"$systemdsystemunitdir"/systemd-kexec.service \
|
||||
"$systemdsystemunitdir"/systemd-fsck@.service \
|
||||
+ "$systemdsystemunitdir"/systemd-validatefs@.service \
|
||||
"$systemdsystemunitdir"/systemd-volatile-root.service \
|
||||
"$systemdsystemunitdir"/ctrl-alt-del.target \
|
||||
"$systemdsystemunitdir"/syslog.socket \
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From e8f72ed9bed9f80c976867953a3eb92e62f9df2f Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Mon, 3 Mar 2025 15:22:14 +0100
|
||||
Subject: [PATCH 18/22] chore(multipath): remove `rd_NO_MULTIPATH` kernel
|
||||
command line option
|
||||
|
||||
Deprecated since 778b3543609d8c9d32df7111229f4072d00d02f0 (Nov 25, 2014).
|
||||
---
|
||||
modules.d/90multipath/multipathd.service | 1 -
|
||||
modules.d/90multipath/multipathd.sh | 2 +-
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
|
||||
index 1680cdfb..3248fa97 100644
|
||||
--- a/modules.d/90multipath/multipathd.service
|
||||
+++ b/modules.d/90multipath/multipathd.service
|
||||
@@ -11,7 +11,6 @@ Conflicts=shutdown.target
|
||||
Conflicts=initrd-cleanup.service
|
||||
ConditionKernelCommandLine=!nompath
|
||||
ConditionKernelCommandLine=!rd.multipath=0
|
||||
-ConditionKernelCommandLine=!rd_NO_MULTIPATH
|
||||
ConditionKernelCommandLine=!multipath=off
|
||||
ConditionVirtualization=!container
|
||||
|
||||
diff --git a/modules.d/90multipath/multipathd.sh b/modules.d/90multipath/multipathd.sh
|
||||
index e17fd921..68bd0383 100755
|
||||
--- a/modules.d/90multipath/multipathd.sh
|
||||
+++ b/modules.d/90multipath/multipathd.sh
|
||||
@@ -8,7 +8,7 @@ if [ "$(getarg rd.multipath)" = "default" ] && [ ! -e /etc/multipath.conf ]; the
|
||||
mpathconf --enable
|
||||
fi
|
||||
|
||||
-if getargbool 1 rd.multipath -d -n rd_NO_MULTIPATH && [ -e /etc/multipath.conf ]; then
|
||||
+if getargbool 1 rd.multipath && [ -e /etc/multipath.conf ]; then
|
||||
modprobe dm-multipath
|
||||
multipathd -B || multipathd
|
||||
need_shutdown
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 5e87b68cfb706b499a4d6814e3414d954db46083 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Mon, 3 Mar 2025 15:23:41 +0100
|
||||
Subject: [PATCH 19/22] refactor(multipath): remove custom multipathd.service
|
||||
|
||||
Install `multipathd.service` provided by upstream, and add a dropin to support
|
||||
`rd.multipath=0`.
|
||||
---
|
||||
modules.d/90multipath/module-setup.sh | 3 ++-
|
||||
modules.d/90multipath/multipathd-dracut.conf | 2 ++
|
||||
modules.d/90multipath/multipathd.service | 26 --------------------
|
||||
3 files changed, 4 insertions(+), 27 deletions(-)
|
||||
create mode 100644 modules.d/90multipath/multipathd-dracut.conf
|
||||
delete mode 100644 modules.d/90multipath/multipathd.service
|
||||
|
||||
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||
index a05df018..5a7f91fa 100755
|
||||
--- a/modules.d/90multipath/module-setup.sh
|
||||
+++ b/modules.d/90multipath/module-setup.sh
|
||||
@@ -91,6 +91,7 @@ install() {
|
||||
[[ -d $config_dir ]] || config_dir=/etc/multipath/conf.d
|
||||
|
||||
inst_multiple \
|
||||
+ "$systemdsystemunitdir"/multipathd.service \
|
||||
pkill \
|
||||
kpartx \
|
||||
dmsetup \
|
||||
@@ -151,7 +152,7 @@ EOF
|
||||
inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service"
|
||||
$SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service
|
||||
fi
|
||||
- inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
|
||||
+ inst_simple "$moddir/multipathd-dracut.conf" "$systemdsystemunitdir/multipathd.service.d/multipathd-dracut.conf"
|
||||
$SYSTEMCTL -q --root "$initdir" enable multipathd.service
|
||||
else
|
||||
inst_hook pre-trigger 02 "$moddir/multipathd.sh"
|
||||
diff --git a/modules.d/90multipath/multipathd-dracut.conf b/modules.d/90multipath/multipathd-dracut.conf
|
||||
new file mode 100644
|
||||
index 00000000..783b05d5
|
||||
--- /dev/null
|
||||
+++ b/modules.d/90multipath/multipathd-dracut.conf
|
||||
@@ -0,0 +1,2 @@
|
||||
+[Unit]
|
||||
+ConditionKernelCommandLine=!rd.multipath=0
|
||||
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
|
||||
deleted file mode 100644
|
||||
index 3248fa97..00000000
|
||||
--- a/modules.d/90multipath/multipathd.service
|
||||
+++ /dev/null
|
||||
@@ -1,26 +0,0 @@
|
||||
-[Unit]
|
||||
-Description=Device-Mapper Multipath Device Controller
|
||||
-Before=lvm2-activation-early.service
|
||||
-Before=local-fs-pre.target blk-availability.service shutdown.target
|
||||
-Wants=systemd-udevd-kernel.socket
|
||||
-After=systemd-udevd-kernel.socket
|
||||
-After=multipathd.socket systemd-remount-fs.service
|
||||
-Before=initrd-cleanup.service
|
||||
-DefaultDependencies=no
|
||||
-Conflicts=shutdown.target
|
||||
-Conflicts=initrd-cleanup.service
|
||||
-ConditionKernelCommandLine=!nompath
|
||||
-ConditionKernelCommandLine=!rd.multipath=0
|
||||
-ConditionKernelCommandLine=!multipath=off
|
||||
-ConditionVirtualization=!container
|
||||
-
|
||||
-[Service]
|
||||
-Type=notify
|
||||
-NotifyAccess=main
|
||||
-ExecStartPre=-/sbin/modprobe dm-multipath
|
||||
-ExecStart=/sbin/multipathd -d -s
|
||||
-ExecReload=/sbin/multipathd reconfigure
|
||||
-TasksMax=infinity
|
||||
-
|
||||
-[Install]
|
||||
-WantedBy=sysinit.target
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 6b30662e6e4720428f0efb0ab85c80303dd34afd Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Tue, 25 Mar 2025 15:20:48 +0100
|
||||
Subject: [PATCH 20/22] fix(nfs): libnfsidmap plugins not added in some
|
||||
distributions
|
||||
|
||||
`nfs-utils` can be configured using `--with-pluginpath` to avoid using the
|
||||
default `/usr/lib/libnfsidmap`. For example, Fedora sets
|
||||
`--with-pluginpath=%{_libdir}/libnfsidmap`, which is covered by the current
|
||||
glob, but openSUSE sets `--with-pluginpath=%{_libdir}/libnfsidmap-1.0.0`.
|
||||
|
||||
Also, remove reference to the old `libnfsidmap_<plugin>.so` path.
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index 039b4e4c..6c76faf4 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -139,5 +139,5 @@ install() {
|
||||
|
||||
dracut_need_initqueue
|
||||
|
||||
- inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'
|
||||
+ inst_libdir_file 'libnfsidmap*/*.so' 'libnfsidmap*.so*'
|
||||
}
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 2f5a759f490bb813ec24a685f015b15ff196783b Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Tue, 1 Apr 2025 14:33:38 +0200
|
||||
Subject: [PATCH 21/22] fix(nfs): use `DRACUT_CP` instead of `cp`
|
||||
|
||||
Using `cp` directly ignores `DRACUT_NO_XATTR`.
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index 6c76faf4..d097cd38 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -120,9 +120,15 @@ install() {
|
||||
mkdir -m 0770 -p "$initdir/var/lib/rpcbind"
|
||||
|
||||
# use the same directory permissions as the host
|
||||
- [ -d "/var/lib/nfs/statd" ] && cp -a --attributes-only "$dracutsysrootdir"/var/lib/nfs/statd "${initdir}"/var/lib/nfs/ && rm -rf "${initdir}"/var/lib/nfs/statd/*
|
||||
- [ -d "/var/lib/nfs/statd/sm" ] && cp -a --attributes-only "$dracutsysrootdir"/var/lib/nfs/statd/sm "${initdir}"/var/lib/nfs/statd/ && rm -rf "${initdir}"/var/lib/nfs/statd/sm/*
|
||||
- [ -d "/var/lib/nfs/sm" ] && cp -a --attributes-only "$dracutsysrootdir"/var/lib/nfs/sm "${initdir}"/var/lib/nfs/ && rm -rf "${initdir}"/var/lib/nfs/sm/*
|
||||
+ [[ -d "$dracutsysrootdir"/var/lib/nfs/statd ]] \
|
||||
+ && $DRACUT_CP -L --preserve=ownership -t "$initdir"/var/lib/nfs "$dracutsysrootdir"/var/lib/nfs/statd \
|
||||
+ && rm -rf "$initdir"/var/lib/nfs/statd/*
|
||||
+ [[ -d "$dracutsysrootdir"/var/lib/nfs/statd/sm ]] \
|
||||
+ && $DRACUT_CP -L --preserve=ownership -t "$initdir"/var/lib/nfs/statd "$dracutsysrootdir"/var/lib/nfs/statd/sm \
|
||||
+ && rm -rf "$initdir"/var/lib/nfs/statd/sm/*
|
||||
+ [[ -d "$dracutsysrootdir"/var/lib/nfs/sm ]] \
|
||||
+ && $DRACUT_CP -L --preserve=ownership -t "$initdir"/var/lib/nfs "$dracutsysrootdir"/var/lib/nfs/sm \
|
||||
+ && rm -rf "$initdir"/var/lib/nfs/sm/*
|
||||
|
||||
# Rather than copy the passwd file in, just set a user for rpcbind
|
||||
# We'll save the state and restart the daemon from the root anyway
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From 7eaa8536fae73aa65fae604820f10e842a18bc88 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Tue, 1 Apr 2025 14:34:04 +0200
|
||||
Subject: [PATCH 22/22] fix(nfs): add possible `statd` user and group
|
||||
|
||||
Some distributions use the `statd` user (openSUSE, Ubuntu) and group (openSUSE)
|
||||
to handle `rpc.statd` directories.
|
||||
---
|
||||
modules.d/95nfs/module-setup.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||
index d097cd38..b34c75c0 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -136,10 +136,10 @@ install() {
|
||||
local _confdir
|
||||
for _confdir in etc usr/lib; do
|
||||
|
||||
- grep -sE '^(nfsnobody|_rpc|rpc|rpcuser):' "${dracutsysrootdir}/${_confdir}/passwd" \
|
||||
+ grep -sE '^(nfsnobody|_rpc|rpc|rpcuser|statd):' "${dracutsysrootdir}/${_confdir}/passwd" \
|
||||
>> "$initdir/${_confdir}/passwd"
|
||||
|
||||
- grep -sE '^(nogroup|rpc|nobody):' "${dracutsysrootdir}/${_confdir}/group" \
|
||||
+ grep -sE '^(nogroup|rpc|nobody|statd):' "${dracutsysrootdir}/${_confdir}/group" \
|
||||
>> "$initdir/${_confdir}/group"
|
||||
done
|
||||
|
||||
--
|
||||
2.48.1
|
||||
|
File diff suppressed because it is too large
Load Diff
11
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-kernel/dracut/README.md
vendored
Normal file
11
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-kernel/dracut/README.md
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
`001-dracut-post-106.patch` is the merged upstream changes from v106 to current
|
||||
main for some potentially important fixes and to provide a clean base for
|
||||
`002-dracut-sysroot.patch`. This can be dropped when bumping to v107.
|
||||
|
||||
`002-dracut-sysroot.patch` is Chewi's new Dracut improvements, which allow it to
|
||||
parse the ELF .note.dlopen dependency metadata used by JSON and reliably
|
||||
determine dependencies across foreign architectures. They will hopefully be
|
||||
merged in v108. See https://github.com/dracut-ng/dracut-ng/pull/1260.
|
||||
|
||||
`050-change-network-dep-iscsi.patch` is a Flatcar-specific dependency tweak to
|
||||
use flatcar-network instead of network.
|
@ -156,9 +156,20 @@ sys-libs/libsemanage -python
|
||||
sys-fs/zfs minimal -rootfs
|
||||
|
||||
# Do not tinker with /boot partition at installation time.
|
||||
sys-firmware/intel-microcode -initramfs
|
||||
sys-fs/zfs-kmod -initramfs
|
||||
|
||||
# Only needed for direct loading by the kernel, which is dangerous, and we
|
||||
# include all the microcode in the initrd anyway.
|
||||
sys-firmware/intel-microcode -split-ucode
|
||||
|
||||
# For sys-auth/sssd
|
||||
net-dns/bind gssapi
|
||||
net-dns/bind-tools gssapi
|
||||
|
||||
# Flatcar can't benefit from this performance boost for several reasons, the
|
||||
# main one being the use of binary packages.
|
||||
sys-kernel/dracut -dracut-cpio
|
||||
|
||||
# Avoid initrd bloat by using OpenSSL instead of gcrypt in systemd.
|
||||
# systemd-journal's FSS feature requires gcrypt, but Flatcar doesn't need it.
|
||||
sys-apps/systemd -gcrypt
|
||||
|
@ -7,7 +7,7 @@ EGIT_REPO_URI="https://github.com/flatcar/bootengine.git"
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
else
|
||||
EGIT_COMMIT="9b57178c5390855d10c09a21278467ada35df767" # flatcar-master
|
||||
EGIT_COMMIT="26231c67c14aa6032a85c2d15c7a6c15c62348a5" # flatcar-master
|
||||
KEYWORDS="amd64 arm arm64 x86"
|
||||
fi
|
||||
|
||||
|
@ -1,15 +1,21 @@
|
||||
# Copyright 2014-2016 CoreOS, Inc.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
COREOS_SOURCE_REVISION=""
|
||||
inherit coreos-kernel
|
||||
inherit coreos-kernel toolchain-funcs
|
||||
|
||||
DESCRIPTION="CoreOS Linux kernel"
|
||||
KEYWORDS="amd64 arm64"
|
||||
RESTRICT="userpriv" # dracut (via bootengine) needs root
|
||||
|
||||
RDEPEND="=sys-kernel/coreos-modules-${PVR}"
|
||||
DEPEND="${RDEPEND}
|
||||
BDEPEND="
|
||||
sys-kernel/dracut
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
${BDEPEND}
|
||||
app-alternatives/awk
|
||||
app-alternatives/gzip
|
||||
app-arch/xz-utils
|
||||
@ -36,53 +42,52 @@ DEPEND="${RDEPEND}
|
||||
sys-fs/e2fsprogs
|
||||
sys-fs/mdadm
|
||||
sys-fs/xfsprogs
|
||||
>=sys-kernel/bootengine-0.0.38-r37:=
|
||||
>=sys-kernel/coreos-firmware-20180103-r1:=
|
||||
>=sys-kernel/bootengine-0.0.4:=
|
||||
sys-kernel/dracut
|
||||
virtual/udev
|
||||
amd64? ( sys-firmware/intel-microcode:= )"
|
||||
|
||||
# We are bad, we want to get around the sandbox. So do the creation of the
|
||||
# cpio image in pkg_setup() where we are free to mount filesystems, chroot,
|
||||
# and other fun stuff.
|
||||
pkg_setup() {
|
||||
coreos-kernel_pkg_setup
|
||||
|
||||
[[ "${MERGE_TYPE}" == binary ]] && return
|
||||
amd64? ( sys-firmware/intel-microcode:= )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
# Fail early if we didn't detect the build installed by coreos-modules
|
||||
[[ -n "${KV_OUT_DIR}" ]] || die "Failed to detect modules build tree"
|
||||
|
||||
if [[ "${ROOT:-/}" != / ]]; then
|
||||
# TMPDIR needs to be corrected for chroot
|
||||
TMPDIR=${TMPDIR#${ROOT}} ${ROOT}/usr/sbin/update-bootengine -m -c ${ROOT} -k "${KV_FULL}" || die
|
||||
else
|
||||
update-bootengine -k "${KV_FULL}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# KV_OUT_DIR points to the minimal build tree installed by coreos-modules
|
||||
# Pull in the config and public module signing key
|
||||
KV_OUT_DIR="${SYSROOT%/}/lib/modules/${COREOS_SOURCE_NAME#linux-}/build"
|
||||
KV_OUT_DIR="${ESYSROOT}/lib/modules/${COREOS_SOURCE_NAME#linux-}/build"
|
||||
cp -v "${KV_OUT_DIR}/.config" build/ || die
|
||||
local sig_key="$(getconfig MODULE_SIG_KEY)"
|
||||
mkdir -p "build/${sig_key%/*}" || die
|
||||
cp -v "${KV_OUT_DIR}/${sig_key}" "build/${sig_key}" || die
|
||||
|
||||
# Symlink to bootengine.cpio so we can stick with relative paths in .config
|
||||
ln -sv "${SYSROOT%/}"/usr/share/bootengine/bootengine.cpio build/ || die
|
||||
config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"'
|
||||
|
||||
# include all intel and amd microcode files, avoiding the signatures
|
||||
local fw_dir="${SYSROOT%/}/lib/firmware"
|
||||
local fw_dir="${ESYSROOT}/lib/firmware"
|
||||
use amd64 && config_update "CONFIG_EXTRA_FIRMWARE=\"$(find ${fw_dir} -type f \
|
||||
\( -path ${fw_dir}'/intel-ucode/*' -o -path ${fw_dir}'/amd-ucode/*' \) -printf '%P ')\""
|
||||
use amd64 && config_update "CONFIG_EXTRA_FIRMWARE_DIR=\"${fw_dir}\""
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local BE_ARGS=()
|
||||
|
||||
if [[ -n ${SYSROOT} ]]; then
|
||||
BE_ARGS+=( -r "${SYSROOT}" )
|
||||
export DRACUT_ARCH="${CHOST%%-*}"
|
||||
|
||||
# We may need to run ldconfig via QEMU, so use the wrapper. Dracut calls
|
||||
# it with -r, which chroots and confuses the sandbox, so calm it down.
|
||||
export DRACUT_LDCONFIG="${CHOST}-ldconfig"
|
||||
local f; for f in /etc/ld.so.cache{,~} /var/cache/ldconfig/aux-cache{,~}; do
|
||||
addwrite "${f}"
|
||||
done
|
||||
fi
|
||||
|
||||
tc-export PKG_CONFIG
|
||||
"${ESYSROOT}"/usr/bin/update-bootengine -k "${KV_FULL}" -o "${S}"/build/bootengine.cpio "${BE_ARGS[@]}" || die
|
||||
kmake "$(kernel_target)"
|
||||
|
||||
# sanity check :)
|
||||
@ -104,5 +109,5 @@ src_install() {
|
||||
|
||||
# For easy access to vdso debug symbols in gdb:
|
||||
# set debug-file-directory /usr/lib/debug/usr/lib/modules/${KV_FULL}/vdso/
|
||||
kmake INSTALL_MOD_PATH="${D}/usr/lib/debug/usr" vdso_install
|
||||
kmake INSTALL_MOD_PATH="${ED}/usr/lib/debug/usr" vdso_install
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
DIST dracut-050.tar.xz 333592 BLAKE2B cb0bfa5a8e7547260b8a80a3606eb284182c062926269c85b09e07d26ad177df0eeaa64b17005bff9290611f1c83fc8cd8e2216cfe14b5e66ec7f659d4c2fa7b SHA512 eba046cf1c8013369a398e585e0bff233daa8595d469ce9acc8bbc6a32d55c6a5429d4219db19abbf6001104be05b357f0961f9e66b7f926039a5d3ee7c2b850
|
||||
DIST dracut-051.tar.xz 346500 BLAKE2B 38129b6b713b3338bbb2554fffd611f80216969eebac9fca7fb72df2db2036d4fbe66ebd54e646e562e24801e61064e54b62f066bab9e77ca88814100ebdd8ff SHA512 f3533430e479bc91c538e0a198ca97450ec449a7d661d876ecd0ad3e417e22f7e4abf0a384fc676a63a4d3479f25d717c8acdcd1bdec7d0a5714298c5c4ea6b8
|
||||
DIST dracut-053.tar.xz 354668 BLAKE2B d20d0f1675e18cf44615a98255c8b1a73f23e9c665a771a1fe99716d3bf0b6082961ab20fe058bf31c106c4f521d9e8708e2ae98cff00f613197bbf9dd3abda3 SHA512 4736f84442bda208a38d3285ffeb8b845f06e52e3bf60d2aaea121240cf695e1369208c2d2cee1137a6c1d3f8f7794385675006beaf5cd86ade259d5f42d039a
|
||||
DIST dracut-055.tar.xz 361752 BLAKE2B 9fcb0bce9ead2e079c70a377ea53701e4634d3dc64ae163e0e157d7d85822a274813e05f6079768640e1807818fad7a8158626413d773686a8d52fcd95fb5680 SHA512 2d2ea2889d9013bc94245bd7d1a2154f24d02bd9c2f7dbb28e5968e17d918e6598c68d85b0f551f968218980a80b19361ca0c9e8e94997ba54f4c09afcd6d866
|
@ -1,170 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86"
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://dracut.wiki.kernel.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="selinux"
|
||||
|
||||
# Tests need root privileges, bug #298014
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules
|
||||
README.testsuite TODO )
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/050-Makefile-merge-main-version-and-git-version-earlier.patch
|
||||
"${FILESDIR}"/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch
|
||||
"${FILESDIR}"/050-Makefile-fix-VERSION-again.patch
|
||||
"${FILESDIR}"/050-btrfs-force-preload-btrfs-module.patch
|
||||
"${FILESDIR}"/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch
|
||||
"${FILESDIR}"/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch
|
||||
"${FILESDIR}"/050-busybox-module-fix.patch
|
||||
"${FILESDIR}"/050-systemd-remove-obsolete-syslog-parameter.patch
|
||||
"${FILESDIR}"/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch
|
||||
"${FILESDIR}"/050-gentoo-ldconfig-paths.patch
|
||||
# Flatcar: override iscsi network dependency
|
||||
"${FILESDIR}"/050-change-network-dep-iscsi.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
echo ./configure "${myconf[@]}"
|
||||
./configure "${myconf[@]}" || die
|
||||
|
||||
if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins dracut.logrotate dracut
|
||||
|
||||
docinto html
|
||||
dodoc dracut.html
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if linux-info_get_any_version && linux_config_exists; then
|
||||
ewarn ""
|
||||
ewarn "If the following test report contains a missing kernel"
|
||||
ewarn "configuration option, you should reconfigure and rebuild your"
|
||||
ewarn "kernel before booting image generated with this Dracut version."
|
||||
ewarn ""
|
||||
|
||||
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
||||
|
||||
# Kernel configuration options descriptions:
|
||||
local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
|
||||
ERROR_DEVTMPFS+='is missing and REQUIRED'
|
||||
local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
|
||||
ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
|
||||
|
||||
check_extra_config
|
||||
echo
|
||||
else
|
||||
ewarn ""
|
||||
ewarn "Your kernel configuration couldn't be checked."
|
||||
ewarn "Please check manually if following options are enabled:"
|
||||
ewarn ""
|
||||
ewarn " CONFIG_BLK_DEV_INITRD"
|
||||
ewarn " CONFIG_DEVTMPFS"
|
||||
ewarn ""
|
||||
fi
|
||||
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature \
|
||||
"Measure performance of the boot process for later visualisation" \
|
||||
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
net-misc/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://dracut.wiki.kernel.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="selinux"
|
||||
|
||||
# Tests need root privileges, bug #298014
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules
|
||||
README.testsuite TODO )
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/051-dracut.sh-move-ldconfig.patch
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
echo ./configure "${myconf[@]}"
|
||||
./configure "${myconf[@]}" || die
|
||||
|
||||
if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins dracut.logrotate dracut
|
||||
|
||||
docinto html
|
||||
dodoc dracut.html
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if linux-info_get_any_version && linux_config_exists; then
|
||||
ewarn ""
|
||||
ewarn "If the following test report contains a missing kernel"
|
||||
ewarn "configuration option, you should reconfigure and rebuild your"
|
||||
ewarn "kernel before booting image generated with this Dracut version."
|
||||
ewarn ""
|
||||
|
||||
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
||||
|
||||
# Kernel configuration options descriptions:
|
||||
local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
|
||||
ERROR_DEVTMPFS+='is missing and REQUIRED'
|
||||
local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
|
||||
ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
|
||||
|
||||
check_extra_config
|
||||
echo
|
||||
else
|
||||
ewarn ""
|
||||
ewarn "Your kernel configuration couldn't be checked."
|
||||
ewarn "Please check manually if following options are enabled:"
|
||||
ewarn ""
|
||||
ewarn " CONFIG_BLK_DEV_INITRD"
|
||||
ewarn " CONFIG_DEVTMPFS"
|
||||
ewarn ""
|
||||
fi
|
||||
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature \
|
||||
"Measure performance of the boot process for later visualisation" \
|
||||
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
net-misc/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
}
|
@ -1,162 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86"
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://dracut.wiki.kernel.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="selinux"
|
||||
|
||||
# Tests need root privileges, bug #298014
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS README.md README.generic README.kernel )
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/053-network-manager.patch
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths.patch
|
||||
# Flatcar: override iscsi network dependency
|
||||
"${FILESDIR}"/050-change-network-dep-iscsi.patch
|
||||
# Add required systemd 255 binary
|
||||
"${FILESDIR}"/059-systemd-executor.patch
|
||||
# Add systemd vconsole setup fix using i118n
|
||||
"${FILESDIR}"/0001-systemd-initrd-install-only-keymap-required-by-syste.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
echo ./configure "${myconf[@]}"
|
||||
./configure "${myconf[@]}" || die
|
||||
|
||||
if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
docinto html
|
||||
dodoc dracut.html
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if linux-info_get_any_version && linux_config_exists; then
|
||||
ewarn ""
|
||||
ewarn "If the following test report contains a missing kernel"
|
||||
ewarn "configuration option, you should reconfigure and rebuild your"
|
||||
ewarn "kernel before booting image generated with this Dracut version."
|
||||
ewarn ""
|
||||
|
||||
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
||||
|
||||
# Kernel configuration options descriptions:
|
||||
local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
|
||||
ERROR_DEVTMPFS+='is missing and REQUIRED'
|
||||
local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
|
||||
ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
|
||||
|
||||
check_extra_config
|
||||
echo
|
||||
else
|
||||
ewarn ""
|
||||
ewarn "Your kernel configuration couldn't be checked."
|
||||
ewarn "Please check manually if following options are enabled:"
|
||||
ewarn ""
|
||||
ewarn " CONFIG_BLK_DEV_INITRD"
|
||||
ewarn " CONFIG_DEVTMPFS"
|
||||
ewarn ""
|
||||
fi
|
||||
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature \
|
||||
"Measure performance of the boot process for later visualisation" \
|
||||
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
net-misc/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
}
|
@ -1,173 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://dracut.wiki.kernel.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="selinux test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
echo ./configure "${myconf[@]}"
|
||||
./configure "${myconf[@]}" || die
|
||||
|
||||
if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ ${EUID} != 0 ]]; then
|
||||
# Tests need root privileges, bug #298014
|
||||
ewarn "Skipping tests: Not running as root."
|
||||
elif [[ ! -w /dev/kvm ]]; then
|
||||
ewarn "Skipping tests: Unable to access /dev/kvm."
|
||||
else
|
||||
emake -C test check
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
NEWS.md
|
||||
README.md
|
||||
docs/README.cross
|
||||
docs/README.generic
|
||||
docs/README.kernel
|
||||
docs/SECURITY.md
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
docinto html
|
||||
dodoc dracut.html
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if linux-info_get_any_version && linux_config_exists; then
|
||||
ewarn ""
|
||||
ewarn "If the following test report contains a missing kernel"
|
||||
ewarn "configuration option, you should reconfigure and rebuild your"
|
||||
ewarn "kernel before booting image generated with this Dracut version."
|
||||
ewarn ""
|
||||
|
||||
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
||||
|
||||
# Kernel configuration options descriptions:
|
||||
local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
|
||||
ERROR_DEVTMPFS+='is missing and REQUIRED'
|
||||
local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
|
||||
ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
|
||||
|
||||
check_extra_config
|
||||
echo
|
||||
else
|
||||
ewarn ""
|
||||
ewarn "Your kernel configuration couldn't be checked."
|
||||
ewarn "Please check manually if following options are enabled:"
|
||||
ewarn ""
|
||||
ewarn " CONFIG_BLK_DEV_INITRD"
|
||||
ewarn " CONFIG_DEVTMPFS"
|
||||
ewarn ""
|
||||
fi
|
||||
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature \
|
||||
"Measure performance of the boot process for later visualisation" \
|
||||
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
net-misc/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
From 6d7e4b88c21f45cf1695e4495004a12cacd58d0c Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Vladu <avladu@cloudbasesolutions.com>
|
||||
Date: Thu, 7 Mar 2024 11:17:54 +0000
|
||||
Subject: [PATCH] systemd: initrd: install only keymap required by
|
||||
systemd-vconsole-setup
|
||||
|
||||
Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
|
||||
---
|
||||
modules.d/10i18n/module-setup.sh | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
|
||||
index d6688b47..516883be 100755
|
||||
--- a/modules.d/10i18n/module-setup.sh
|
||||
+++ b/modules.d/10i18n/module-setup.sh
|
||||
@@ -4,7 +4,7 @@
|
||||
check() {
|
||||
[[ "$mount_needs" ]] && return 1
|
||||
|
||||
- require_binaries setfont loadkeys kbd_mode || return 1
|
||||
+ require_binaries loadkeys || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -164,6 +164,10 @@ install() {
|
||||
fi
|
||||
shopt -q -u nocasematch
|
||||
|
||||
+ # install only one keymap: us
|
||||
+ KEYMAP=us
|
||||
+
|
||||
+
|
||||
# Gentoo user may have KEYMAP set to something like "-u pl2",
|
||||
KEYMAP=${KEYMAP#-* }
|
||||
|
||||
@@ -267,10 +271,7 @@ install() {
|
||||
inst_simple ${VCONFIG_CONF}
|
||||
fi
|
||||
|
||||
- if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
|
||||
- install_local_i18n || install_all_kbd
|
||||
- else
|
||||
- install_all_kbd
|
||||
- fi
|
||||
+ # install only one keyboard map
|
||||
+ install_local_i18n
|
||||
fi
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,34 +0,0 @@
|
||||
From a76aa8e39016a8564adb0f18f93bbf2e15d3243f Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Sun, 8 Mar 2020 05:47:50 +0300
|
||||
Subject: [PATCH] Makefile: fix VERSION again
|
||||
|
||||
The variable is not undefined anymore after the first assignment, so
|
||||
we should check if variable is empty instead.
|
||||
---
|
||||
Makefile | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c69e2dfc..02e2c4b5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,9 +1,13 @@
|
||||
-include dracut-version.sh
|
||||
|
||||
DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
||||
-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
|
||||
+ifeq ($(DRACUT_MAIN_VERSION),)
|
||||
+DRACUT_MAIN_VERSION = $(DRACUT_VERSION)
|
||||
+endif
|
||||
DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
|
||||
-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
|
||||
+ifeq ($(DRACUT_FULL_VERSION),)
|
||||
+DRACUT_FULL_VERSION = $(DRACUT_VERSION)
|
||||
+endif
|
||||
|
||||
-include Makefile.inc
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,78 +0,0 @@
|
||||
From eb8a7a96351b6e1cfd9dc34f1e854333a8f4a4e0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
|
||||
<congdanhqx@gmail.com>
|
||||
Date: Fri, 6 Mar 2020 08:46:36 +0700
|
||||
Subject: [PATCH] Makefile: merge main-version and git-version earlier
|
||||
|
||||
With GNU Make 4.3 on both ArchLinux, and VoidLinux,
|
||||
GITVERION is always empty because of bad substitution.
|
||||
Change '\#' to simply '#' can fix it,
|
||||
but we don't need that complation.
|
||||
|
||||
We can merge DRACUT_MAIN_VERSION and GITVERSION into DRACUT_FULL_VERSION.
|
||||
Because, GITVERSION will be attached back to DRACUT_MAIN_VERSION in all
|
||||
situation.
|
||||
|
||||
While we're at it, detect if we're in git worktree by:
|
||||
limiting GIT_CEILING_DIRECTORIES to parent directory of
|
||||
dracut's top level directory; instead of checking for .git directory,
|
||||
in order to support git-worktree, in such case, .git will be a file, see
|
||||
gitrepository-layout(5)
|
||||
---
|
||||
Makefile | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 22b584f1..c69e2dfc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,8 +1,9 @@
|
||||
-include dracut-version.sh
|
||||
|
||||
-DRACUT_MAIN_VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
||||
+DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
||||
DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
|
||||
-GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
||||
+DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
|
||||
+DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
|
||||
|
||||
-include Makefile.inc
|
||||
|
||||
@@ -92,14 +93,14 @@ endif
|
||||
|
||||
%.xml: %.asc
|
||||
@rm -f -- "$@"
|
||||
- asciidoc -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" -d manpage -b docbook -o "$@" $<
|
||||
+ asciidoc -a "version=$(DRACUT_FULL_VERSION)" -d manpage -b docbook -o "$@" $<
|
||||
|
||||
dracut.8: dracut.usage.asc dracut.8.asc
|
||||
|
||||
dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
||||
@rm -f -- dracut.xml
|
||||
asciidoc -a "mainversion=$(DRACUT_MAIN_VERSION)" \
|
||||
- -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" \
|
||||
+ -a "version=$(DRACUT_FULL_VERSION)" \
|
||||
-a numbered \
|
||||
-d book -b docbook -o dracut.xml dracut.asc
|
||||
@rm -f -- dracut.html
|
||||
@@ -112,7 +113,7 @@ dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
||||
dracut.pc: Makefile.inc Makefile
|
||||
@echo "Name: dracut" > dracut.pc
|
||||
@echo "Description: dracut" >> dracut.pc
|
||||
- @echo "Version: $(DRACUT_MAIN_VERSION)$(GITVERSION)" >> dracut.pc
|
||||
+ @echo "Version: $(DRACUT_FULL_VERSION)" >> dracut.pc
|
||||
@echo "dracutdir=$(pkglibdir)" >> dracut.pc
|
||||
@echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc
|
||||
@echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc
|
||||
@@ -182,7 +183,7 @@ endif
|
||||
|
||||
dracut-version.sh:
|
||||
@rm -f dracut-version.sh
|
||||
- @echo "DRACUT_VERSION=$(DRACUT_MAIN_VERSION)$(GITVERSION)" > dracut-version.sh
|
||||
+ @echo "DRACUT_VERSION=$(DRACUT_FULL_VERSION)" > dracut-version.sh
|
||||
|
||||
clean:
|
||||
$(RM) *~
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 0402b3777b1c64bd716f588ff7457b905e98489d Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 11 Mar 2020 12:56:52 +0100
|
||||
Subject: [PATCH] btrfs: force preload btrfs module
|
||||
|
||||
fixes https://github.com/dracutdevs/dracut/issues/658
|
||||
|
||||
raid6_pq and xor takes time doing benchmarking
|
||||
|
||||
[ 3.983009] request_module fs-btrfs succeeded, but still no fs?
|
||||
---
|
||||
modules.d/90btrfs/module-setup.sh | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
|
||||
index b0d0058b..66a254e1 100755
|
||||
--- a/modules.d/90btrfs/module-setup.sh
|
||||
+++ b/modules.d/90btrfs/module-setup.sh
|
||||
@@ -48,5 +48,7 @@ install() {
|
||||
|
||||
inst_multiple -o btrfsck btrfs-zero-log
|
||||
inst $(command -v btrfs) /sbin/btrfs
|
||||
+ # Hack for slow machines
|
||||
+ # see https://github.com/dracutdevs/dracut/issues/658
|
||||
+ echo "rd.driver.pre=btrfs" > ${initdir}/etc/cmdline.d/00-btrfs.conf
|
||||
}
|
||||
-
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,102 +0,0 @@
|
||||
From f769154bccf22d2b5caf5e4888f88bf7edde2662 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Mon, 25 May 2020 19:02:05 +0300
|
||||
Subject: [PATCH 1/2] dracut-functions: fix find_binary() to return full path
|
||||
|
||||
Fixes: a01204202b30 (Allow running on a cross-compiled rootfs)
|
||||
---
|
||||
dracut-functions.sh | 21 +++++++++++++--------
|
||||
1 file changed, 13 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 3cb9c7af..b5c28248 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -41,31 +41,36 @@ str_ends() { [ "${1%*"$2"}" != "$1" ]; }
|
||||
# search in the usual places to find the binary.
|
||||
find_binary() {
|
||||
local _delim
|
||||
+ local _path
|
||||
local l
|
||||
local p
|
||||
[[ -z ${1##/*} ]] || _delim="/"
|
||||
|
||||
if [[ "$1" == *.so* ]]; then
|
||||
for l in libdirs ; do
|
||||
- if { $DRACUT_LDD "$dracutsysrootdir$l$_delim$1" &>/dev/null; }; then
|
||||
- printf "%s\n" "$1"
|
||||
+ _path="${l}${_delim}${1}"
|
||||
+ if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &>/dev/null; }; then
|
||||
+ printf "%s\n" "${_path}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
- if { $DRACUT_LDD "$dracutsysrootdir$_delim$1" &>/dev/null; }; then
|
||||
- printf "%s\n" "$1"
|
||||
+ _path="${_delim}${1}"
|
||||
+ if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &>/dev/null; }; then
|
||||
+ printf "%s\n" "${_path}"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
if [[ "$1" == */* ]]; then
|
||||
- if [[ -L $dracutsysrootdir$_delim$1 ]] || [[ -x $dracutsysrootdir$_delim$1 ]]; then
|
||||
- printf "%s\n" "$1"
|
||||
+ _path="${_delim}${1}"
|
||||
+ if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then
|
||||
+ printf "%s\n" "${_path}"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
for p in $DRACUT_PATH ; do
|
||||
- if [[ -L $dracutsysrootdir$p$_delim$1 ]] || [[ -x $dracutsysrootdir$p$_delim$1 ]]; then
|
||||
- printf "%s\n" "$1"
|
||||
+ _path="${p}${_delim}${1}"
|
||||
+ if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then
|
||||
+ printf "%s\n" "${_path}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From 50cc23ba32b0fda63eff7623b529dbeb4e6a38c6 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Mon, 25 May 2020 17:49:20 +0300
|
||||
Subject: [PATCH 2/2] busybox: simplify listing of supported utilities
|
||||
|
||||
'--list' option is supported since busybox-1.20.0, which was released
|
||||
in 2010.
|
||||
---
|
||||
modules.d/05busybox/module-setup.sh | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh
|
||||
index ecbd6a13..5d88c5d1 100755
|
||||
--- a/modules.d/05busybox/module-setup.sh
|
||||
+++ b/modules.d/05busybox/module-setup.sh
|
||||
@@ -14,15 +14,16 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
- local _i _progs _path _busybox
|
||||
+ local _i _path _busybox
|
||||
+ local _progs=()
|
||||
_busybox=$(type -P busybox)
|
||||
inst $_busybox /usr/bin/busybox
|
||||
- for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}')
|
||||
- do
|
||||
- _progs="$_progs $_i"
|
||||
+ for _i in $($_busybox --list); do
|
||||
+ [[ ${_i} == busybox ]] && continue
|
||||
+ _progs+=("${_i}")
|
||||
done
|
||||
|
||||
- for _i in $_progs; do
|
||||
+ for _i in "${_progs[@]}"; do
|
||||
_path=$(find_binary "$_i")
|
||||
[ -z "$_path" ] && continue
|
||||
ln_r /usr/bin/busybox $_path
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,111 +0,0 @@
|
||||
From 8e1a4dc5f8a777fc718db490414ffdc9dc755f66 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Witschel <diabonas@archlinux.org>
|
||||
Date: Sat, 18 Apr 2020 14:55:41 +0200
|
||||
Subject: [PATCH] dracut-lib.sh: quote variables in parameter expansion
|
||||
patterns
|
||||
|
||||
According to POSIX.1-2017, 2.6.2 Parameter Expansion:
|
||||
|
||||
${parameter%[word]} [...] The word shall be expanded to produce a
|
||||
pattern.
|
||||
|
||||
This means if word contains variables that itself contain special
|
||||
characters like asterisks or backslashes, these are treated as pattern
|
||||
characters unless the variable is quoted. Try e.g. the following example
|
||||
in bash, dash or (busybox) ash:
|
||||
|
||||
i='a\c'; j='\'; echo "${i%$j*}"
|
||||
|
||||
This prints "a\c" because "$j*" is expanded to "\*", escaping the
|
||||
asterisk. In contrast,
|
||||
|
||||
i='a\c'; j='\'; echo "${i%"$j"*}"
|
||||
|
||||
produces the expected result "a" because the backslash is not specially
|
||||
treated any more after quoting.
|
||||
|
||||
The quotes that this commit adds have been previously removed in commit
|
||||
f9c96cf56fed390841eac05c43826e62014c9188, citing issues with busybox
|
||||
hush without further specifying the actual error. I tested a recent
|
||||
busybox build (upstream commit 9aa751b08ab03d6396f86c3df77937a19687981b)
|
||||
and couldn't find any problems. Note that the above example always
|
||||
produces "a\c" in hush regardless of quoting $j, making hush unsuitable
|
||||
for use with dracut, but using quotes in parameter expansions generally
|
||||
works.
|
||||
|
||||
The unquoted variables break the "rd.luks.uuid/name" kernel command line
|
||||
options in dracut 050 because
|
||||
|
||||
str_replace "$luksname" '\' '\\'
|
||||
|
||||
in modules.d/90crypt/parse-crypt.sh is not able to escape the
|
||||
backslashes any more, see GH-723, GH-727: backslashes in the
|
||||
systemd-cryptsetup@.service unit name stay unescaped for use in udev
|
||||
(cf. commit 0f6d93eb9d63695a64002ec8b0421fbc9fc8a7a3), leading to
|
||||
failures in starting the unit.
|
||||
|
||||
This partially reverts commit f9c96cf56fed390841eac05c43826e62014c9188.
|
||||
---
|
||||
modules.d/99base/dracut-lib.sh | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index c53cd13b..c57523d3 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -24,7 +24,7 @@ debug_on() {
|
||||
|
||||
# returns OK if $1 contains literal string $2 (and isn't empty)
|
||||
strstr() {
|
||||
- [ "${1##*$2*}" != "$1" ]
|
||||
+ [ "${1##*"$2"*}" != "$1" ]
|
||||
}
|
||||
|
||||
# returns OK if $1 matches (completely) glob pattern $2
|
||||
@@ -43,18 +43,18 @@ strglobin() {
|
||||
|
||||
# returns OK if $1 contains literal string $2 at the beginning, and isn't empty
|
||||
str_starts() {
|
||||
- [ "${1#$2*}" != "$1" ]
|
||||
+ [ "${1#"$2"*}" != "$1" ]
|
||||
}
|
||||
|
||||
# returns OK if $1 contains literal string $2 at the end, and isn't empty
|
||||
str_ends() {
|
||||
- [ "${1%*$2}" != "$1" ]
|
||||
+ [ "${1%*"$2"}" != "$1" ]
|
||||
}
|
||||
|
||||
trim() {
|
||||
local var="$*"
|
||||
- var="${var#${var%%[![:space:]]*}}" # remove leading whitespace characters
|
||||
- var="${var%${var##*[![:space:]]}}" # remove trailing whitespace characters
|
||||
+ var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
||||
+ var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
|
||||
printf "%s" "$var"
|
||||
}
|
||||
|
||||
@@ -108,9 +108,9 @@ str_replace() {
|
||||
local out=''
|
||||
|
||||
while strstr "${in}" "$s"; do
|
||||
- chop="${in%%$s*}"
|
||||
+ chop="${in%%"$s"*}"
|
||||
out="${out}${chop}$r"
|
||||
- in="${in#*$s}"
|
||||
+ in="${in#*"$s"}"
|
||||
done
|
||||
echo "${out}${in}"
|
||||
}
|
||||
@@ -396,7 +396,7 @@ splitsep() {
|
||||
while [ -n "$str" -a "$#" -gt 1 ]; do
|
||||
tmp="${str%%$sep*}"
|
||||
eval "$1='${tmp}'"
|
||||
- str="${str#$tmp}"
|
||||
+ str="${str#"$tmp"}"
|
||||
str="${str#$sep}"
|
||||
shift
|
||||
done
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,75 +0,0 @@
|
||||
From 0386e4627779cb51f4292b3c642d90586d5e71b4 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Wed, 29 Jan 2020 23:53:29 +0100
|
||||
Subject: [PATCH] dracut.sh: don't call fsfreeze on subvol of root file system
|
||||
|
||||
dracut.sh already doesn't call fsfreeze if the output file is on
|
||||
the root file system. For btrfs, however, this is not sufficient.
|
||||
Because fsfreeze is a superblock operation, and all btrfs subvolumes
|
||||
share the same superblock, fsfreeze may freeze the entire system
|
||||
if the subvolume on which the output file is written and / are
|
||||
subvolumes of the same file system. Avoid this by comparing file
|
||||
system UUIDs for btrfs.
|
||||
|
||||
Fixes: de576db3c225 ("call fsfreeze(8) on /boot to flush initramfs data & metadata to media")
|
||||
---
|
||||
dracut.sh | 36 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 35 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index af346f3a..c14f6c0b 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2075,6 +2075,40 @@ fi
|
||||
|
||||
command -v restorecon &>/dev/null && restorecon -- "$outfile"
|
||||
|
||||
+btrfs_uuid() {
|
||||
+ btrfs filesystem show "$1" | sed -n '1s/^.*uuid: //p'
|
||||
+}
|
||||
+
|
||||
+freeze_ok_for_btrfs() {
|
||||
+ local mnt uuid1 uuid2
|
||||
+ # If the output file is on btrfs, we need to make sure that it's
|
||||
+ # not on a subvolume of the same file system as the root FS.
|
||||
+ # Otherwise, fsfreeze() might freeze the entire system.
|
||||
+ # This is most conveniently checked by comparing the FS uuid.
|
||||
+
|
||||
+ [[ "$(stat -f -c %T -- "/")" == "btrfs" ]] || return 0
|
||||
+ mnt=$(stat -c %m -- "$1")
|
||||
+ uuid1=$(btrfs_uuid "$mnt")
|
||||
+ uuid2=$(btrfs_uuid "/")
|
||||
+ [[ "$uuid1" && "$uuid2" && "$uuid1" != "$uuid2" ]]
|
||||
+}
|
||||
+
|
||||
+freeze_ok_for_fstype() {
|
||||
+ local outfile=$1
|
||||
+ local fstype
|
||||
+
|
||||
+ [[ "$(stat -c %m -- "$outfile")" == "/" ]] && return 1
|
||||
+ fstype=$(stat -f -c %T -- "$outfile")
|
||||
+ case $fstype in
|
||||
+ msdos)
|
||||
+ return 1;;
|
||||
+ btrfs)
|
||||
+ freeze_ok_for_btrfs "$outfile";;
|
||||
+ *)
|
||||
+ return 0;;
|
||||
+ esac
|
||||
+}
|
||||
+
|
||||
# We sync/fsfreeze only if we're operating on a live booted system.
|
||||
# It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
|
||||
# and there's no reason to sync, and *definitely* no reason to fsfreeze.
|
||||
@@ -2087,7 +2121,7 @@ if test -d $dracutsysrootdir/run/systemd/system; then
|
||||
fi
|
||||
|
||||
# use fsfreeze only if we're not writing to /
|
||||
- if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then
|
||||
+ if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then
|
||||
if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
|
||||
dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
|
||||
fi
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 07417b7fc5cb261187519c916e4735189f20f4c6 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Sat, 23 May 2020 18:03:47 +0300
|
||||
Subject: [PATCH] lvm: fix removal of pvscan from udev rules
|
||||
|
||||
udev rules provided by lvm 2.02.128 and newer uses '+=' instead of '='.
|
||||
---
|
||||
modules.d/90lvm/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
||||
index d6d2c185..52c803f7 100755
|
||||
--- a/modules.d/90lvm/module-setup.sh
|
||||
+++ b/modules.d/90lvm/module-setup.sh
|
||||
@@ -101,7 +101,7 @@ install() {
|
||||
sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
|
||||
${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
+ sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
else
|
||||
sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
|
||||
${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 3dcaa97ca4dcfa8092252a22df62c60941e59ce3 Mon Sep 17 00:00:00 2001
|
||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
||||
Date: Wed, 11 Mar 2020 09:40:50 +0100
|
||||
Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when
|
||||
needed
|
||||
|
||||
The network-manager command line hook must install a
|
||||
initqueue/finished hook to ensure that nm-run.sh is executed when
|
||||
there are network connections to activate.
|
||||
|
||||
Fixes: #694
|
||||
---
|
||||
modules.d/35network-manager/nm-config.sh | 11 +++++++++++
|
||||
modules.d/35network-manager/nm-run.sh | 2 ++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
|
||||
index 1efa737c..39a1c8bd 100755
|
||||
--- a/modules.d/35network-manager/nm-config.sh
|
||||
+++ b/modules.d/35network-manager/nm-config.sh
|
||||
@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
|
||||
fi
|
||||
|
||||
/usr/libexec/nm-initrd-generator -- $(getcmdline)
|
||||
+
|
||||
+if getargbool 0 rd.neednet; then
|
||||
+ for i in /usr/lib/NetworkManager/system-connections/* \
|
||||
+ /run/NetworkManager/system-connections/* \
|
||||
+ /etc/NetworkManager/system-connections/* \
|
||||
+ /etc/sysconfig/network-scripts/ifcfg-*; do
|
||||
+ [ -f "$i" ] || continue
|
||||
+ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh
|
||||
+ break
|
||||
+ done
|
||||
+fi
|
||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||
index 4079b735..fc5280a1 100755
|
||||
--- a/modules.d/35network-manager/nm-run.sh
|
||||
+++ b/modules.d/35network-manager/nm-run.sh
|
||||
@@ -22,3 +22,5 @@ do
|
||||
source_hook initqueue/online $ifname
|
||||
/sbin/netroot $ifname
|
||||
done
|
||||
+
|
||||
+> /tmp/nm.done
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,241 +0,0 @@
|
||||
From 265f696b532f63f0ac1f9f341e0469a6eafe2fdd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:26:00 +0000
|
||||
Subject: [PATCH 01/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/90stratis/stratisd-init.service | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90stratis/stratisd-init.service b/modules.d/90stratis/stratisd-init.service
|
||||
index 318e8c27..1be2e33b 100644
|
||||
--- a/modules.d/90stratis/stratisd-init.service
|
||||
+++ b/modules.d/90stratis/stratisd-init.service
|
||||
@@ -8,8 +8,6 @@ DefaultDependencies=no
|
||||
Type=simple
|
||||
ExecStart=/sbin/stratisd-init --debug
|
||||
KillSignal=SIGINT
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From 38ba90bf88b38228e128c65be40a2da287c0b1ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:29:34 +0000
|
||||
Subject: [PATCH 02/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/99squash/squash-mnt-clear.service | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
|
||||
index 84441f60..9d94c524 100644
|
||||
--- a/modules.d/99squash/squash-mnt-clear.service
|
||||
+++ b/modules.d/99squash/squash-mnt-clear.service
|
||||
@@ -12,6 +12,6 @@ ConditionPathExists=/squash/root
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog+console
|
||||
-StandardError=syslog+console
|
||||
+StandardOutput=journal+console
|
||||
+StandardError=journal+console
|
||||
ExecStart=/squash/clear-squash.sh
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From 5cb2a4004d18e4b96ddc18f221fae922350a9000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:31:17 +0000
|
||||
Subject: [PATCH 03/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-pre-trigger.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.service b/modules.d/98dracut-systemd/dracut-pre-trigger.service
|
||||
index 7bf16167..6f1ba521 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-pre-trigger.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-pre-trigger.service
|
||||
@@ -20,8 +20,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-pre-trigger
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From 317d841c788e841d3533515ceda5597a099eb64e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:31:59 +0000
|
||||
Subject: [PATCH 04/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-initqueue.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-initqueue.service b/modules.d/98dracut-systemd/dracut-initqueue.service
|
||||
index 207d545d..3a8679a5 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-initqueue.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-initqueue.service
|
||||
@@ -21,8 +21,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-initqueue
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From 0c1bd016ecfb9c6d194c4356199b509d90db4071 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:32:44 +0000
|
||||
Subject: [PATCH 05/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-pre-pivot.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.service b/modules.d/98dracut-systemd/dracut-pre-pivot.service
|
||||
index 9a1f0854..e893d1dd 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-pre-pivot.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.service
|
||||
@@ -27,8 +27,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-pre-pivot
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From e1130a83405648777210fdc99f7eee087eebaadc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:33:33 +0000
|
||||
Subject: [PATCH 06/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-pre-udev.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-udev.service b/modules.d/98dracut-systemd/dracut-pre-udev.service
|
||||
index 570ec02d..e4092e35 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-pre-udev.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-pre-udev.service
|
||||
@@ -24,8 +24,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-pre-udev
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From c437933cb0490e800e776cb7695d2ea0e95056a2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:34:17 +0000
|
||||
Subject: [PATCH 07/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-pre-mount.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.service b/modules.d/98dracut-systemd/dracut-pre-mount.service
|
||||
index d3909689..18c9730c 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-pre-mount.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-pre-mount.service
|
||||
@@ -19,8 +19,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-pre-mount
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From d9149c6ca7c52c204c1b346e9b6a32bbadd0b2ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:35:02 +0000
|
||||
Subject: [PATCH 08/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-cmdline.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.service b/modules.d/98dracut-systemd/dracut-cmdline.service
|
||||
index e577ec88..a8078bd2 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.service
|
||||
@@ -23,8 +23,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-cmdline
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
From 8cb5ac1b30be458df9497911ba601d90e68f4d5b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
|
||||
Date: Wed, 15 Jul 2020 14:35:38 +0000
|
||||
Subject: [PATCH 09/10] As of v246 of systemd "syslog" and "syslog-console"
|
||||
switches have been deprecated
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-mount.service | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service
|
||||
index 77d34f62..c88e6d84 100644
|
||||
--- a/modules.d/98dracut-systemd/dracut-mount.service
|
||||
+++ b/modules.d/98dracut-systemd/dracut-mount.service
|
||||
@@ -19,8 +19,7 @@ Environment=NEWROOT=/sysroot
|
||||
Type=oneshot
|
||||
ExecStart=-/bin/dracut-mount
|
||||
StandardInput=null
|
||||
-StandardOutput=syslog
|
||||
-StandardError=syslog+console
|
||||
+StandardError=journal+console
|
||||
KillMode=process
|
||||
RemainAfterExit=yes
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,60 +0,0 @@
|
||||
From 48258fae9fa58046d7d1a246ea3d821530180643 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Fri, 18 Dec 2020 00:01:32 +0300
|
||||
Subject: [PATCH] dracut.sh: Move ldconfig after library workaround
|
||||
|
||||
This fixes boot failures when libgcc_s.so.1 is in a non-standard
|
||||
directory.
|
||||
|
||||
Bug: https://bugs.gentoo.org/760249
|
||||
Fixes: de3cb0e3214c (dracut.sh: Move the library workaround after squash)
|
||||
---
|
||||
dracut.sh | 28 ++++++++++++++--------------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 0f4648397..c6c361acc 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1724,20 +1724,6 @@ for ((i=0; i < ${#include_src[@]}; i++)); do
|
||||
fi
|
||||
done
|
||||
|
||||
-if [[ $kernel_only != yes ]]; then
|
||||
- # make sure that library links are correct and up to date
|
||||
- for f in $dracutsysrootdir/etc/ld.so.conf $dracutsysrootdir/etc/ld.so.conf.d/*; do
|
||||
- [[ -f $f ]] && inst_simple "${f#$dracutsysrootdir}"
|
||||
- done
|
||||
- if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then
|
||||
- if [[ $EUID = 0 ]]; then
|
||||
- derror "ldconfig exited ungracefully"
|
||||
- else
|
||||
- derror "ldconfig might need uid=0 (root) for chroot()"
|
||||
- fi
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
if [[ $do_hardlink = yes ]] && command -v hardlink >/dev/null; then
|
||||
dinfo "*** Hardlinking files ***"
|
||||
hardlink "$initdir" 2>&1
|
||||
@@ -1920,6 +1906,20 @@ if [[ $kernel_only != yes ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+if [[ $kernel_only != yes ]]; then
|
||||
+ # make sure that library links are correct and up to date
|
||||
+ for f in $dracutsysrootdir/etc/ld.so.conf $dracutsysrootdir/etc/ld.so.conf.d/*; do
|
||||
+ [[ -f $f ]] && inst_simple "${f#$dracutsysrootdir}"
|
||||
+ done
|
||||
+ if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then
|
||||
+ if [[ $EUID = 0 ]]; then
|
||||
+ derror "ldconfig exited ungracefully"
|
||||
+ else
|
||||
+ derror "ldconfig might need uid=0 (root) for chroot()"
|
||||
+ fi
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
||||
dinfo "*** Stripping files ***"
|
||||
find "$initdir" -type f \
|
@ -1,24 +0,0 @@
|
||||
From ba4bcf5f4f11ad624c647ddf4f566997186135e7 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 31 Mar 2021 16:11:41 +0200
|
||||
Subject: [PATCH] fix(network-manager): no default deps for nm-run.service
|
||||
|
||||
Otherwise nm-run.service will run only in basic.target, which is too
|
||||
late in the initramfs.
|
||||
---
|
||||
modules.d/35network-manager/nm-run.service | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-run.service b/modules.d/35network-manager/nm-run.service
|
||||
index 63fe7564d0..f3493c41a3 100644
|
||||
--- a/modules.d/35network-manager/nm-run.service
|
||||
+++ b/modules.d/35network-manager/nm-run.service
|
||||
@@ -2,6 +2,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
[Unit]
|
||||
+DefaultDependencies=no
|
||||
+
|
||||
#make sure all devices showed up
|
||||
Wants=systemd-udev-settle.service
|
||||
After=systemd-udev-settle.service
|
@ -1,31 +0,0 @@
|
||||
From bee1c4824a8cd47ce6c01892a548bdc07b1fa678 Mon Sep 17 00:00:00 2001
|
||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||
Date: Sat, 14 Oct 2023 23:45:57 +0200
|
||||
Subject: [PATCH] feat(systemd): install systemd-executor
|
||||
|
||||
In [0] systemd gained a new binary - systemd-executor - that's used to
|
||||
spawn processes forked off systemd. Let's copy it into the initrd if
|
||||
it's available.
|
||||
|
||||
[0] https://github.com/systemd/systemd/pull/27890
|
||||
|
||||
Signed-off-by: Brian Harring <ferringb@gmail.com>
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 554c25a08..9a13a1dbb 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -34,6 +34,7 @@ install() {
|
||||
"$systemdutildir"/systemd \
|
||||
"$systemdutildir"/systemd-coredump \
|
||||
"$systemdutildir"/systemd-cgroups-agent \
|
||||
+ "$systemdutildir"/systemd-executor \
|
||||
"$systemdutildir"/systemd-shutdown \
|
||||
"$systemdutildir"/systemd-reply-password \
|
||||
"$systemdutildir"/systemd-fsck \
|
||||
--
|
||||
2.41.0
|
||||
|
@ -1,39 +0,0 @@
|
||||
From 0674b9136831b1beb6a7ec91147fd5c280c693a3 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Mon, 9 Mar 2020 02:47:07 +0300
|
||||
Subject: [PATCH] Remove redundant gcc paths in ldconfig_paths()
|
||||
|
||||
Bug: https://bugs.gentoo.org/705728
|
||||
---
|
||||
dracut-functions.sh | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 3cb9c7af..5337ff6c 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -76,7 +76,20 @@ find_binary() {
|
||||
|
||||
ldconfig_paths()
|
||||
{
|
||||
- $DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
|
||||
+ local gccpath
|
||||
+
|
||||
+ if type -P gcc-config &>/dev/null; then
|
||||
+ gccpath=$(gcc-config -c)
|
||||
+ gccpath=/usr/lib/gcc/${gccpath%-*}/${gccpath##*-}
|
||||
+ fi
|
||||
+
|
||||
+ while read -r line; do
|
||||
+ if [[ ${line} != /usr/lib/gcc/* || -z ${gccpath} ]]; then
|
||||
+ echo ${line}
|
||||
+ elif [[ ${line} == ${gccpath} ]]; then
|
||||
+ echo ${line}
|
||||
+ fi
|
||||
+ done < <($DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq)
|
||||
}
|
||||
|
||||
# Version comparision function. Assumes Linux style version scheme.
|
||||
--
|
||||
2.24.1
|
||||
|
3
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/Manifest
vendored
Normal file
3
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/Manifest
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
DIST dracut-060_pre20240104.tar.gz 499965 BLAKE2B 935e0e5da348426d69c6dab6b91078f126cadd9ffc6a32378e79cd93b1dbadff35899efc3786fc12bf5a6741843d3637b0c98cc71fe4a96a8caf053ae887bac3 SHA512 f7818265f082e9c05ebb81a91b67fb9b1d3bf8b2433b7e6ea9be6bee43d28cd1ee48577648e1d9b3729c17608b028d294c13bf5d4db4cc5a18e3b007eb2cd67e
|
||||
DIST dracut-103.tar.gz 567713 BLAKE2B 7781c0b7fc83a2c0c461f6398687e053226b489fb5405b3132b30d8e7a4f3cea2bb73aa0fe6e4c4b27187d6270ba623f403916ec38025a912930ae347a7e25ce SHA512 ba0dbefbcbecb09c44ce240664bc4f4ee25dfb8be7bc060028ae3b1ccf7d70410491c105e64fcef3d6f44d2794cb6162bcea9404125906be46bf3dff098e0277
|
||||
DIST dracut-106.tar.gz 527743 BLAKE2B 837621da329500b88b0c81a724990702a9f4e816a4818c26622b2bc5e3885c908f0bbba682a262f967d9a08a912cfd63a33270143560a30e3d067dc4217c5262 SHA512 ab17f9440129e2db7c2902115459309132ce7f7b29bbb3172002b7a8ea8ab54799d62d89fbf3f84581a5c14196f6754d33669b583b9d758ab4686a3443a3c4ad
|
@ -1,30 +1,36 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
|
||||
inherit bash-completion-r1 edo optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
|
||||
else
|
||||
[[ "${PV}" = *_rc* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
|
||||
if [[ ${PV} == *_p* ]] ; then
|
||||
EGIT_COMMIT="4980bad34775da715a2639b736cba5e65a8a2604"
|
||||
SRC_URI="https://github.com/dracutdevs/dracut/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${EGIT_COMMIT}
|
||||
else
|
||||
SRC_URI="https://github.com/dracutdevs/dracut/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
fi
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://dracut.wiki.kernel.org"
|
||||
HOMEPAGE="https://github.com/dracutdevs/dracut/wiki"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
if [[ "${PV}" != *_rc* ]]; then
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv sparc x86"
|
||||
fi
|
||||
IUSE="selinux test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/cpio
|
||||
app-alternatives/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
@ -32,9 +38,10 @@ RDEPEND="
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
sys-apps/s6-linux-init[sysv-utils(-)]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig
|
||||
virtual/pkgconfig[native-symlinks(+)]
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
@ -61,6 +68,10 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
|
||||
"${FILESDIR}"/dracut-060-fix-resume-hostonly.patch
|
||||
"${FILESDIR}"/dracut-060-grub-layout.patch
|
||||
"${FILESDIR}"/dracut-060-systemd-255.patch
|
||||
"${FILESDIR}"/dracut-059-install-new-systemd-hibernate-resume.service.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
@ -73,13 +84,7 @@ src_configure() {
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
echo ./configure "${myconf[@]}"
|
||||
./configure "${myconf[@]}" || die
|
||||
|
||||
if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
|
||||
fi
|
||||
edo ./configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
@ -111,39 +116,9 @@ src_install() {
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if linux-info_get_any_version && linux_config_exists; then
|
||||
ewarn ""
|
||||
ewarn "If the following test report contains a missing kernel"
|
||||
ewarn "configuration option, you should reconfigure and rebuild your"
|
||||
ewarn "kernel before booting image generated with this Dracut version."
|
||||
ewarn ""
|
||||
|
||||
local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
|
||||
|
||||
# Kernel configuration options descriptions:
|
||||
local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
|
||||
ERROR_DEVTMPFS+='is missing and REQUIRED'
|
||||
local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
|
||||
ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
|
||||
|
||||
check_extra_config
|
||||
echo
|
||||
else
|
||||
ewarn ""
|
||||
ewarn "Your kernel configuration couldn't be checked."
|
||||
ewarn "Please check manually if following options are enabled:"
|
||||
ewarn ""
|
||||
ewarn " CONFIG_BLK_DEV_INITRD"
|
||||
ewarn " CONFIG_DEVTMPFS"
|
||||
ewarn ""
|
||||
fi
|
||||
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature \
|
||||
"Measure performance of the boot process for later visualisation" \
|
||||
app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
@ -155,19 +130,29 @@ pkg_postinst() {
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature \
|
||||
"Allows use of busybox instead of default bash (on your own risk)" \
|
||||
sys-apps/busybox
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2[lvm]
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm
|
||||
sys-fs/mdadm sys-fs/dmraid
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
net-misc/openssh
|
||||
virtual/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature "Support Squashfs" sys-fs/squashfs-tools
|
||||
optfeature "Support TPM 2.0 TSS" app-crypt/tpm2-tools
|
||||
optfeature "Support Bluetooth (experimental)" net-wireless/bluez
|
||||
optfeature "Support BIOS-given device names" sys-apps/biosdevname
|
||||
optfeature "Support network NVMe" sys-apps/nvme-cli app-misc/jq
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
optfeature "automatically generating an initramfs on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut]"
|
||||
}
|
203
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/dracut-103-r4.ebuild
vendored
Normal file
203
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/dracut-103-r4.ebuild
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic bash-completion-r1 edo optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracut-ng/dracut-ng"
|
||||
else
|
||||
if [[ "${PV}" != *_rc* ]]; then
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv sparc x86"
|
||||
fi
|
||||
SRC_URI="https://github.com/dracut-ng/dracut-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-ng-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://github.com/dracut-ng/dracut-ng/wiki"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="selinux test"
|
||||
RESTRICT="test"
|
||||
PROPERTIES="test? ( test_privileged test_network )"
|
||||
|
||||
RDEPEND="
|
||||
app-alternatives/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
sys-apps/s6-linux-init[sysv-utils(-)]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig[native-symlinks(+)]
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
test? (
|
||||
net-nds/rpcbind
|
||||
net-fs/nfs-utils
|
||||
sys-block/open-iscsi
|
||||
sys-fs/btrfs-progs
|
||||
sys-fs/dmraid
|
||||
sys-fs/lvm2[lvm,thin]
|
||||
sys-fs/mdadm
|
||||
sys-fs/multipath-tools
|
||||
alpha? ( app-emulation/qemu[qemu_softmmu_targets_alpha] )
|
||||
amd64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
||||
arm? ( app-emulation/qemu[qemu_softmmu_targets_arm] )
|
||||
arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] )
|
||||
hppa? ( app-emulation/qemu[qemu_softmmu_targets_hppa] )
|
||||
loong? ( app-emulation/qemu[qemu_softmmu_targets_loongarch64] )
|
||||
mips? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips]
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips64]
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips64el]
|
||||
) )
|
||||
ppc? ( app-emulation/qemu[qemu_softmmu_targets_ppc] )
|
||||
ppc64? ( app-emulation/qemu[qemu_softmmu_targets_ppc64] )
|
||||
riscv? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_riscv32]
|
||||
app-emulation/qemu[qemu_softmmu_targets_riscv64]
|
||||
) )
|
||||
sparc? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_sparc]
|
||||
app-emulation/qemu[qemu_softmmu_targets_sparc64]
|
||||
) )
|
||||
x86? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
||||
)
|
||||
"
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
|
||||
# Gentoo specific acct-user and acct-group conf adjustments
|
||||
"${FILESDIR}"/${PN}-103-acct-user-group-gentoo.patch
|
||||
# https://github.com/dracut-ng/dracut-ng/pull/507
|
||||
"${FILESDIR}"/${PN}-103-systemd-udev-256-kmod.patch
|
||||
# libsystemd-core is sometimes missing
|
||||
"${FILESDIR}"/${PN}-103-always-install-libsystemd.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
# this emulates what the build system would be doing without us
|
||||
append-cflags -D_FILE_OFFSET_BITS=64
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
edo ./configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
addwrite /dev/kvm
|
||||
# Translate ARCH so run-qemu can find the correct qemu-system-ARCH
|
||||
local qemu_arch
|
||||
if use amd64; then
|
||||
qemu_arch=x86_64
|
||||
elif use arm64; then
|
||||
qemu_arch=aarch64
|
||||
elif use loong; then
|
||||
qemu_arch=loongarch64
|
||||
elif use x86; then
|
||||
qemu_arch=i386
|
||||
else
|
||||
qemu_arch=$(tc-arch)
|
||||
fi
|
||||
ARCH=${qemu_arch} emake -C test check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
NEWS.md
|
||||
README.md
|
||||
docs/HACKING.md
|
||||
docs/README.cross
|
||||
docs/README.kernel
|
||||
docs/RELEASE.md
|
||||
docs/SECURITY.md
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
docinto html
|
||||
dodoc dracut.html
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature \
|
||||
"Allows use of busybox instead of default bash (on your own risk)" \
|
||||
sys-apps/busybox
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2[lvm]
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm sys-fs/dmraid
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
virtual/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature "Support Squashfs" sys-fs/squashfs-tools
|
||||
optfeature "Support TPM 2.0 TSS" app-crypt/tpm2-tools
|
||||
optfeature "Support Bluetooth (experimental)" net-wireless/bluez
|
||||
optfeature "Support BIOS-given device names" sys-apps/biosdevname
|
||||
optfeature "Support network NVMe" sys-apps/nvme-cli app-misc/jq
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
optfeature "building Unified Kernel Images with dracut (--uefi)" \
|
||||
"sys-apps/systemd[boot]" "sys-apps/systemd-utils[boot]"
|
||||
optfeature "automatically generating an initramfs on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut]"
|
||||
optfeature "automatically generating an UKI on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut,uki]"
|
||||
}
|
236
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/dracut-106-r2.ebuild
vendored
Normal file
236
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/dracut-106-r2.ebuild
vendored
Normal file
@ -0,0 +1,236 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
CARGO_OPTIONAL=1
|
||||
|
||||
inherit cargo flag-o-matic bash-completion-r1 edo optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracut-ng/dracut-ng"
|
||||
else
|
||||
if [[ "${PV}" != *_rc* ]]; then
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86"
|
||||
fi
|
||||
SRC_URI="https://github.com/dracut-ng/dracut-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-ng-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://github.com/dracut-ng/dracut-ng/wiki"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+dracut-cpio selinux test"
|
||||
RESTRICT="test"
|
||||
PROPERTIES="test? ( test_privileged test_network )"
|
||||
|
||||
RDEPEND="
|
||||
app-alternatives/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
sys-apps/s6-linux-init[sysv-utils(-)]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig[native-symlinks(+)]
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
dracut-cpio? ( ${RUST_DEPEND} )
|
||||
test? (
|
||||
net-nds/rpcbind
|
||||
net-fs/nfs-utils
|
||||
sys-block/open-iscsi
|
||||
sys-fs/btrfs-progs
|
||||
sys-fs/dmraid
|
||||
sys-fs/lvm2[lvm,thin]
|
||||
sys-fs/mdadm
|
||||
sys-fs/multipath-tools
|
||||
alpha? ( app-emulation/qemu[qemu_softmmu_targets_alpha] )
|
||||
amd64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
||||
arm? ( app-emulation/qemu[qemu_softmmu_targets_arm] )
|
||||
arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] )
|
||||
hppa? ( app-emulation/qemu[qemu_softmmu_targets_hppa] )
|
||||
loong? ( app-emulation/qemu[qemu_softmmu_targets_loongarch64] )
|
||||
mips? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips]
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips64]
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips64el]
|
||||
) )
|
||||
ppc? ( app-emulation/qemu[qemu_softmmu_targets_ppc] )
|
||||
ppc64? ( app-emulation/qemu[qemu_softmmu_targets_ppc64] )
|
||||
riscv? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_riscv32]
|
||||
app-emulation/qemu[qemu_softmmu_targets_riscv64]
|
||||
) )
|
||||
sparc? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_sparc]
|
||||
app-emulation/qemu[qemu_softmmu_targets_sparc64]
|
||||
) )
|
||||
x86? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
||||
)
|
||||
"
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
|
||||
# Gentoo specific acct-user and acct-group conf adjustments
|
||||
"${FILESDIR}"/${PN}-106-acct-user-group-gentoo.patch
|
||||
# https://github.com/dracut-ng/dracut-ng/pull/1207
|
||||
"${FILESDIR}"/${PN}-106-fix-rngd-module.patch
|
||||
# https://github.com/dracut-ng/dracut-ng/pull/1250
|
||||
"${FILESDIR}"/${PN}-106-fix-mdraid-module.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use dracut-cpio && rust_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
--disable-dracut-cpio
|
||||
)
|
||||
|
||||
# this emulates what the build system would be doing without us
|
||||
append-cflags -D_FILE_OFFSET_BITS=64
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
edo ./configure "${myconf[@]}"
|
||||
if use dracut-cpio; then
|
||||
cargo_gen_config
|
||||
cargo_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
if use dracut-cpio; then
|
||||
pushd src/dracut-cpio >/dev/null || die
|
||||
cargo_src_compile
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
addwrite /dev/kvm
|
||||
# Translate ARCH so run-qemu can find the correct qemu-system-ARCH
|
||||
local qemu_arch
|
||||
if use amd64; then
|
||||
qemu_arch=x86_64
|
||||
elif use arm64; then
|
||||
qemu_arch=aarch64
|
||||
elif use loong; then
|
||||
qemu_arch=loongarch64
|
||||
elif use x86; then
|
||||
qemu_arch=i386
|
||||
else
|
||||
qemu_arch=$(tc-arch)
|
||||
fi
|
||||
ARCH=${qemu_arch} emake -C test check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
NEWS.md
|
||||
README.md
|
||||
)
|
||||
default
|
||||
if use dracut-cpio; then
|
||||
exeinto /usr/lib/dracut
|
||||
doexe "src/dracut-cpio/$(cargo_target_dir)/dracut-cpio"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Remove directory/symlink conflicts
|
||||
# https://bugs.gentoo.org/943007
|
||||
local save_nullglob=$(shopt -p nullglob)
|
||||
shopt -s nullglob
|
||||
local module
|
||||
for module in "${EROOT}"/usr/lib/dracut/modules.d/{80test,80test-makeroot,80test-root}; do
|
||||
if [[ ! -L ${module} && -d ${module} ]]; then
|
||||
rm -rv "${module}" || die
|
||||
fi
|
||||
local backups=( "${module}".backup.* )
|
||||
if [[ ${#backups[@]} -gt 0 ]]; then
|
||||
rm -v "${backups[@]}" || die
|
||||
fi
|
||||
done
|
||||
eval "${save_nullglob}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature \
|
||||
"Allows use of busybox instead of default bash (on your own risk)" \
|
||||
sys-apps/busybox
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2[lvm]
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm sys-fs/dmraid
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
virtual/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature "Support Squashfs" sys-fs/squashfs-tools
|
||||
optfeature "Support TPM 2.0 TSS" app-crypt/tpm2-tools
|
||||
optfeature "Support Bluetooth (experimental)" net-wireless/bluez
|
||||
optfeature "Support BIOS-given device names" sys-apps/biosdevname
|
||||
optfeature "Support network NVMe" sys-apps/nvme-cli app-misc/jq
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
optfeature "building Unified Kernel Images with dracut (--uefi)" \
|
||||
"sys-apps/systemd[boot]" "sys-apps/systemd-utils[boot]"
|
||||
optfeature "automatically generating an initramfs on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut]"
|
||||
optfeature "automatically generating an UKI on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut,uki]"
|
||||
}
|
232
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/dracut-9999.ebuild
vendored
Normal file
232
sdk_container/src/third_party/portage-stable/sys-kernel/dracut/dracut-9999.ebuild
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
CARGO_OPTIONAL=1
|
||||
|
||||
inherit cargo flag-o-matic bash-completion-r1 edo optfeature systemd toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/dracut-ng/dracut-ng"
|
||||
else
|
||||
if [[ "${PV}" != *_rc* ]]; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
SRC_URI="https://github.com/dracut-ng/dracut-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-ng-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Generic initramfs generation tool"
|
||||
HOMEPAGE="https://github.com/dracut-ng/dracut-ng/wiki"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+dracut-cpio selinux test"
|
||||
RESTRICT="test"
|
||||
PROPERTIES="test? ( test_privileged test_network )"
|
||||
|
||||
RDEPEND="
|
||||
app-alternatives/cpio
|
||||
>=app-shells/bash-4.0:0
|
||||
sys-apps/coreutils[xattr(-)]
|
||||
>=sys-apps/kmod-23[tools]
|
||||
|| (
|
||||
>=sys-apps/sysvinit-2.87-r3
|
||||
sys-apps/openrc[sysv-utils(-),selinux?]
|
||||
sys-apps/systemd[sysv-utils]
|
||||
sys-apps/s6-linux-init[sysv-utils(-)]
|
||||
)
|
||||
>=sys-apps/util-linux-2.21
|
||||
virtual/pkgconfig[native-symlinks(+)]
|
||||
virtual/udev
|
||||
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
selinux? (
|
||||
sec-policy/selinux-dracut
|
||||
sys-libs/libselinux
|
||||
sys-libs/libsepol
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
>=sys-apps/kmod-23
|
||||
elibc_musl? ( sys-libs/fts-standalone )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-text/asciidoc
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
virtual/pkgconfig
|
||||
dracut-cpio? ( ${RUST_DEPEND} )
|
||||
test? (
|
||||
net-nds/rpcbind
|
||||
net-fs/nfs-utils
|
||||
sys-block/open-iscsi
|
||||
sys-fs/btrfs-progs
|
||||
sys-fs/dmraid
|
||||
sys-fs/lvm2[lvm,thin]
|
||||
sys-fs/mdadm
|
||||
sys-fs/multipath-tools
|
||||
alpha? ( app-emulation/qemu[qemu_softmmu_targets_alpha] )
|
||||
amd64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
||||
arm? ( app-emulation/qemu[qemu_softmmu_targets_arm] )
|
||||
arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] )
|
||||
hppa? ( app-emulation/qemu[qemu_softmmu_targets_hppa] )
|
||||
loong? ( app-emulation/qemu[qemu_softmmu_targets_loongarch64] )
|
||||
mips? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips]
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips64]
|
||||
app-emulation/qemu[qemu_softmmu_targets_mips64el]
|
||||
) )
|
||||
ppc? ( app-emulation/qemu[qemu_softmmu_targets_ppc] )
|
||||
ppc64? ( app-emulation/qemu[qemu_softmmu_targets_ppc64] )
|
||||
riscv? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_riscv32]
|
||||
app-emulation/qemu[qemu_softmmu_targets_riscv64]
|
||||
) )
|
||||
sparc? ( || (
|
||||
app-emulation/qemu[qemu_softmmu_targets_sparc]
|
||||
app-emulation/qemu[qemu_softmmu_targets_sparc64]
|
||||
) )
|
||||
x86? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
||||
)
|
||||
"
|
||||
|
||||
QA_MULTILIB_PATHS="usr/lib/dracut/.*"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
|
||||
# Gentoo specific acct-user and acct-group conf adjustments
|
||||
"${FILESDIR}"/${PN}-106-acct-user-group-gentoo.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use dracut-cpio && rust_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--sysconfdir="${EPREFIX}/etc"
|
||||
--bashcompletiondir="$(get_bashcompdir)"
|
||||
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
--disable-dracut-cpio
|
||||
)
|
||||
|
||||
# this emulates what the build system would be doing without us
|
||||
append-cflags -D_FILE_OFFSET_BITS=64
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
|
||||
edo ./configure "${myconf[@]}"
|
||||
if use dracut-cpio; then
|
||||
cargo_gen_config
|
||||
cargo_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
if use dracut-cpio; then
|
||||
pushd src/dracut-cpio >/dev/null || die
|
||||
cargo_src_compile
|
||||
popd >/dev/null || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
addwrite /dev/kvm
|
||||
# Translate ARCH so run-qemu can find the correct qemu-system-ARCH
|
||||
local qemu_arch
|
||||
if use amd64; then
|
||||
qemu_arch=x86_64
|
||||
elif use arm64; then
|
||||
qemu_arch=aarch64
|
||||
elif use loong; then
|
||||
qemu_arch=loongarch64
|
||||
elif use x86; then
|
||||
qemu_arch=i386
|
||||
else
|
||||
qemu_arch=$(tc-arch)
|
||||
fi
|
||||
ARCH=${qemu_arch} emake -C test check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
NEWS.md
|
||||
README.md
|
||||
)
|
||||
default
|
||||
if use dracut-cpio; then
|
||||
exeinto /usr/lib/dracut
|
||||
doexe "src/dracut-cpio/$(cargo_target_dir)/dracut-cpio"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Remove directory/symlink conflicts
|
||||
# https://bugs.gentoo.org/943007
|
||||
local save_nullglob=$(shopt -p nullglob)
|
||||
shopt -s nullglob
|
||||
local module
|
||||
for module in "${EROOT}"/usr/lib/dracut/modules.d/{80test,80test-makeroot,80test-root}; do
|
||||
if [[ ! -L ${module} && -d ${module} ]]; then
|
||||
rm -rv "${module}" || die
|
||||
fi
|
||||
local backups=( "${module}".backup.* )
|
||||
if [[ ${#backups[@]} -gt 0 ]]; then
|
||||
rm -v "${backups[@]}" || die
|
||||
fi
|
||||
done
|
||||
eval "${save_nullglob}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "Networking support" net-misc/networkmanager
|
||||
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
|
||||
sys-apps/iproute2 "net-misc/iputils[arping]"
|
||||
optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
|
||||
optfeature "Load kernel modules and drop this privilege for real init" \
|
||||
sys-libs/libcap
|
||||
optfeature "Support CIFS" net-fs/cifs-utils
|
||||
optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
|
||||
"sys-fs/cryptsetup[-static-libs]"
|
||||
optfeature "Support for GPG-encrypted keys for crypt module" \
|
||||
app-crypt/gnupg
|
||||
optfeature \
|
||||
"Allows use of dash instead of default bash (on your own risk)" \
|
||||
app-shells/dash
|
||||
optfeature \
|
||||
"Allows use of busybox instead of default bash (on your own risk)" \
|
||||
sys-apps/busybox
|
||||
optfeature "Support iSCSI" sys-block/open-iscsi
|
||||
optfeature "Support Logical Volume Manager" sys-fs/lvm2[lvm]
|
||||
optfeature "Support MD devices, also known as software RAID devices" \
|
||||
sys-fs/mdadm sys-fs/dmraid
|
||||
optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
|
||||
optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
|
||||
optfeature "Support network block devices" sys-block/nbd
|
||||
optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
|
||||
optfeature \
|
||||
"Install ssh and scp along with config files and specified keys" \
|
||||
virtual/openssh
|
||||
optfeature "Enable logging with rsyslog" app-admin/rsyslog
|
||||
optfeature "Support Squashfs" sys-fs/squashfs-tools
|
||||
optfeature "Support TPM 2.0 TSS" app-crypt/tpm2-tools
|
||||
optfeature "Support Bluetooth (experimental)" net-wireless/bluez
|
||||
optfeature "Support BIOS-given device names" sys-apps/biosdevname
|
||||
optfeature "Support network NVMe" sys-apps/nvme-cli app-misc/jq
|
||||
optfeature \
|
||||
"Enable rngd service to help generating entropy early during boot" \
|
||||
sys-apps/rng-tools
|
||||
optfeature "building Unified Kernel Images with dracut (--uefi)" \
|
||||
"sys-apps/systemd[boot]" "sys-apps/systemd-utils[boot]"
|
||||
optfeature "automatically generating an initramfs on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut]"
|
||||
optfeature "automatically generating an UKI on each kernel installation" \
|
||||
"sys-kernel/installkernel[dracut,uki]"
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
From https://github.com/dracutdevs/dracut/pull/2527
|
||||
From a2fe89116db4b286fbf515f26bd1773b5e6ee8ad Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Tue, 26 Sep 2023 09:43:37 +0200
|
||||
Subject: [PATCH] fix(resume): add new systemd-hibernate-resume.service
|
||||
|
||||
Since https://github.com/systemd/systemd/commit/a628d933, the generator only
|
||||
does the initial validation of the system info and then enables the new
|
||||
`systemd-hibernate-resume.service`.
|
||||
|
||||
Fixes #2513
|
||||
--- a/modules.d/95resume/module-setup.sh
|
||||
+++ b/modules.d/95resume/module-setup.sh
|
||||
@@ -44,6 +44,7 @@ install() {
|
||||
if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then
|
||||
inst_multiple -o \
|
||||
"$systemdutildir"/system-generators/systemd-hibernate-resume-generator \
|
||||
+ "$systemdsystemunitdir"/systemd-hibernate-resume.service \
|
||||
"$systemdsystemunitdir"/systemd-hibernate-resume@.service \
|
||||
"$systemdutildir"/systemd-hibernate-resume
|
||||
return 0
|
@ -0,0 +1,65 @@
|
||||
https://bugs.gentoo.org/917000
|
||||
https://github.com/dracutdevs/dracut/pull/2494
|
||||
|
||||
From b88d0bab791bdc4ca75d13802f0391caf537650d Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
||||
Date: Sun, 20 Aug 2023 11:47:22 +0200
|
||||
Subject: [PATCH] fix(resume): include in hostonly mode if resume= on cmdline
|
||||
|
||||
The grep introduced in commit e3a7112bef794e2f2dd741ec2c74fa9cb9117651
|
||||
does not work as intended. The resume module is always excluded in hostonly
|
||||
mode.
|
||||
|
||||
Made this a bit more explicit with if/else so it is more clear what is going
|
||||
on. The in-line ||/&& makes the line really long and makes it more difficult
|
||||
to understand what is going on.
|
||||
|
||||
Bug: https://github.com/dracutdevs/dracut/issues/924
|
||||
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
||||
---
|
||||
modules.d/95resume/module-setup.sh | 32 +++++++++++++++++++++++-------
|
||||
1 file changed, 25 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
|
||||
index d255103366..2d48043827 100755
|
||||
--- a/modules.d/95resume/module-setup.sh
|
||||
+++ b/modules.d/95resume/module-setup.sh
|
||||
@@ -10,13 +10,31 @@ check() {
|
||||
return 1
|
||||
}
|
||||
|
||||
- # Only support resume if hibernation is currently on
|
||||
- # and no swap is mounted on a net device
|
||||
- [[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
- swap_on_netdevice || [[ -f /sys/power/resume && "$(< /sys/power/resume)" == "0:0" ]] || grep -rq '^\|[[:space:]]resume=' /proc/cmdline /etc/cmdline /etc/cmdline.d /etc/kernel/cmdline /usr/lib/kernel/cmdline 2> /dev/null && return 255
|
||||
- }
|
||||
-
|
||||
- return 0
|
||||
+ # If hostonly check if we want to include the resume module
|
||||
+ if [[ $hostonly ]] || [[ $mount_needs ]]; then
|
||||
+ # Resuming won't work if swap is on a netdevice
|
||||
+ swap_on_netdevice && return 255
|
||||
+ if grep -rq 'resume=' /proc/cmdline /etc/cmdline /etc/cmdline.d /etc/kernel/cmdline /usr/lib/kernel/cmdline 2> /dev/null; then
|
||||
+ # hibernation support requested on kernel command line
|
||||
+ return 0
|
||||
+ else
|
||||
+ # resume= not set on kernel command line
|
||||
+ if [[ -f /sys/power/resume ]]; then
|
||||
+ if [[ "$(< /sys/power/resume)" == "0:0" ]]; then
|
||||
+ # hibernation supported by the kernel, but not enabled
|
||||
+ return 255
|
||||
+ else
|
||||
+ # hibernation supported by the kernel and enabled
|
||||
+ return 0
|
||||
+ fi
|
||||
+ else
|
||||
+ # resume file doesn't exist, hibernation not supported by kernel
|
||||
+ return 255
|
||||
+ fi
|
||||
+ fi
|
||||
+ else
|
||||
+ return 0
|
||||
+ fi
|
||||
}
|
||||
|
||||
# called by dracut
|
@ -0,0 +1,31 @@
|
||||
Ensures that the generated initrd is installed in the "new" way via the
|
||||
staging area in the grub layout. This prevents accidentally creating
|
||||
an UKI named initrd, and also ensures that BOOT_ROOT and
|
||||
KERNEL_INSTALL_INITRD_GENERATOR are respected when the layout is set to grub.
|
||||
|
||||
Downstream only since the grub layout for using grub with systemd's
|
||||
kernel-install is not supported by systemd upstream and therefore this
|
||||
patch is unlikely to be accepted by dracut upstream.
|
||||
|
||||
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
|
||||
index 441414ac..a98449fe 100755
|
||||
--- a/install.d/50-dracut.install
|
||||
+++ b/install.d/50-dracut.install
|
||||
@@ -38,6 +38,17 @@ elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; t
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
+elif [[ $KERNEL_INSTALL_LAYOUT == "grub" || $KERNEL_INSTALL_LAYOUT == "compat" || $KERNEL_INSTALL_LAYOUT == "efistub" ]]; then
|
||||
+ BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
|
||||
+ if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then
|
||||
+ IMAGE="uki.efi"
|
||||
+ UEFI_OPTS="--uefi"
|
||||
+ elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then
|
||||
+ IMAGE="initrd"
|
||||
+ UEFI_OPTS="--no-uefi"
|
||||
+ else
|
||||
+ exit 0
|
||||
+ fi
|
||||
else
|
||||
# No layout information, use users --uefi/--no-uefi preference
|
||||
UEFI_OPTS=""
|
@ -0,0 +1,26 @@
|
||||
https://github.com/dracutdevs/dracut/pull/2586/files
|
||||
diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh
|
||||
index fa960a42c1..87efd0c1a6 100755
|
||||
--- a/modules.d/01systemd-pcrphase/module-setup.sh
|
||||
+++ b/modules.d/01systemd-pcrphase/module-setup.sh
|
||||
@@ -6,7 +6,11 @@
|
||||
check() {
|
||||
|
||||
# If the binary(s) requirements are not fulfilled the module can't be installed.
|
||||
- require_binaries "$systemdutildir"/systemd-pcrphase || return 1
|
||||
+ # systemd-255 renamed the binary, check for old and new location.
|
||||
+ if ! require_binaries "$systemdutildir"/systemd-pcrphase && \
|
||||
+ ! require_binaries "$systemdutildir"/systemd-pcrextend; then
|
||||
+ return 1
|
||||
+ fi
|
||||
|
||||
# Return 255 to only include the module, if another module requires it.
|
||||
return 255
|
||||
@@ -28,6 +32,7 @@ install() {
|
||||
|
||||
inst_multiple -o \
|
||||
"$systemdutildir"/systemd-pcrphase \
|
||||
+ "$systemdutildir"/systemd-pcrextend \
|
||||
"$systemdsystemunitdir"/systemd-pcrphase-initrd.service \
|
||||
"$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \
|
||||
"$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service
|
@ -0,0 +1,30 @@
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 986da96b..bd47bc92 100755
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -711,10 +711,10 @@ inst_libdir_file() {
|
||||
|
||||
# install sysusers files
|
||||
inst_sysusers() {
|
||||
- inst_multiple -o "$sysusers/$*"
|
||||
+ inst_multiple -o "$sysusers/acct-*-$*"
|
||||
|
||||
if [[ $hostonly ]]; then
|
||||
- inst_multiple -H -o "$sysusersconfdir/$*"
|
||||
+ inst_multiple -H -o "$sysusersconfdir/acct-*-$*"
|
||||
fi
|
||||
}
|
||||
|
||||
diff --git a/modules.d/91tpm2-tss/module-setup.sh b/modules.d/91tpm2-tss/module-setup.sh
|
||||
index 4441f552..4b5654d5 100755
|
||||
--- a/modules.d/91tpm2-tss/module-setup.sh
|
||||
+++ b/modules.d/91tpm2-tss/module-setup.sh
|
||||
@@ -30,7 +30,7 @@ installkernel() {
|
||||
|
||||
# Install the required file(s) and directories for the module in the initramfs.
|
||||
install() {
|
||||
- inst_sysusers tpm2-tss.conf
|
||||
+ inst_sysusers tss.conf
|
||||
|
||||
inst_multiple -o \
|
||||
"$tmpfilesdir"/tpm2-tss-fapi.conf \
|
@ -0,0 +1,21 @@
|
||||
From 921792f201e954de461d3b551e01b5369d666db8 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Tue, 10 Sep 2024 15:51:46 +0200
|
||||
Subject: [PATCH] feat(systemd): always install libsystemd libraries
|
||||
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 498cd7edd..fb8a8200b 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -156,5 +156,6 @@ EOF
|
||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
inst_libdir_file \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \
|
||||
- {"tls/$_arch/",tls/,"$_arch/",}"libnss_*"
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_*" \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"systemd/libsystemd*.so"
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
From e16195f28669264227c169d45107ea95b83d8f48 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Tsoy <alexander@tsoy.me>
|
||||
Date: Tue, 16 Jul 2024 08:48:54 +0300
|
||||
Subject: [PATCH] fix(systemd): move installation of libkmod to udev-rules
|
||||
module
|
||||
|
||||
libkmod library should be installed even if systemd module is
|
||||
omitted, so move its installation to udev-rules module.
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 1 -
|
||||
modules.d/95udev-rules/module-setup.sh | 6 +++++-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index ce7bb520c..e4fb9a586 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -171,6 +171,5 @@ EOF
|
||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
inst_libdir_file \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \
|
||||
- {"tls/$_arch/",tls/,"$_arch/",}"libkmod.so*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libnss_*"
|
||||
}
|
||||
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
|
||||
index d82ed5eb9..6078751f6 100755
|
||||
--- a/modules.d/95udev-rules/module-setup.sh
|
||||
+++ b/modules.d/95udev-rules/module-setup.sh
|
||||
@@ -93,7 +93,11 @@ install() {
|
||||
"${udevdir}"/usb_id \
|
||||
"${udevdir}"/v4l_id
|
||||
|
||||
- inst_libdir_file "libnss_files*"
|
||||
+ # Install required libraries.
|
||||
+ _arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
+ inst_libdir_file \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libkmod.so*" \
|
||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_files*"
|
||||
|
||||
# Install the hosts local user configurations if enabled.
|
||||
if [[ $hostonly ]]; then
|
@ -0,0 +1,48 @@
|
||||
From 1579bb0c77d9e1e4599623a165c54a0dccdaf875 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
||||
Date: Thu, 31 Oct 2024 11:28:37 +0100
|
||||
Subject: [PATCH] fix(dracut.sh): ensure abs path for objcopy args
|
||||
|
||||
Closes: https://github.com/dracut-ng/dracut-ng/issues/833
|
||||
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
|
||||
---
|
||||
dracut.sh | 19 ++++++++++++++++---
|
||||
1 file changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 90927136e..8b666a1ac 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -35,6 +35,19 @@ readonly dracut_cmd=$(readlink -f "$0")
|
||||
|
||||
set -o pipefail
|
||||
|
||||
+# below we sometimes cd, which causes problems if we're building an UKI
|
||||
+# and relative paths are passed on to us. Store the pwd before we do anything.
|
||||
+pwd=$(pwd)
|
||||
+path_rel_to_abs() {
|
||||
+ for var in "$@"; do
|
||||
+ if [[ $var == /* ]]; then
|
||||
+ echo "$var"
|
||||
+ else
|
||||
+ echo "$pwd/$var"
|
||||
+ fi
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
usage() {
|
||||
[[ $sysroot_l ]] && dracutsysrootdir="$sysroot_l"
|
||||
[[ $dracutbasedir ]] || dracutbasedir="$dracutsysrootdir"/usr/lib/dracut
|
||||
@@ -1095,9 +1108,9 @@ drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}"
|
||||
[[ $reproducible_l ]] && reproducible="$reproducible_l"
|
||||
[[ $loginstall_l ]] && loginstall="$loginstall_l"
|
||||
[[ $uefi_l ]] && uefi=$uefi_l
|
||||
-[[ $uefi_stub_l ]] && uefi_stub="$uefi_stub_l"
|
||||
-[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
|
||||
-[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
|
||||
+[[ $uefi_stub_l ]] && uefi_stub=$(path_rel_to_abs "$uefi_stub_l")
|
||||
+[[ $uefi_splash_image_l ]] && uefi_splash_image=$(path_rel_to_abs "$uefi_splash_image_l")
|
||||
+[[ $kernel_image_l ]] && kernel_image=$(path_rel_to_abs "$kernel_image_l")
|
||||
[[ $sbat_l ]] && sbat="$sbat_l"
|
||||
[[ $machine_id_l ]] && machine_id="$machine_id_l"
|
||||
|
@ -0,0 +1,28 @@
|
||||
From b90eda4b431af23d1101f1ea68b656929c6a82b2 Mon Sep 17 00:00:00 2001
|
||||
From: Nowa Ammerlaan <andrewammerlaan@gentoo.org>
|
||||
Date: Fri, 8 Nov 2024 20:01:54 +0100
|
||||
Subject: [PATCH] fix(dracut-functions.sh): check for modules in --kmoddir, not
|
||||
in --sysroot
|
||||
|
||||
Modules are installed from the directory specified by --kmoddir, but currently
|
||||
the check_kernel_module() function is checking for the module in
|
||||
--sysroot/lib/modules. This is notably not the same when kernels packages are
|
||||
being built inside some docker container. We should check for the modules
|
||||
existence in the directory we are actually going to install it from.
|
||||
---
|
||||
dracut-functions.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 865c31290..245c69cb6 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -761,7 +761,7 @@ check_kernel_config() {
|
||||
# 0 if the kernel module is either built-in or available
|
||||
# 1 if the kernel module is not enabled
|
||||
check_kernel_module() {
|
||||
- modprobe -d "$dracutsysrootdir" -S "$kernel" --dry-run "$1" &> /dev/null || return 1
|
||||
+ modprobe -d "$drivers_dir/../../../" -S "$kernel" --dry-run "$1" &> /dev/null || return 1
|
||||
}
|
||||
|
||||
# get_cpu_vendor
|
@ -0,0 +1,29 @@
|
||||
https://github.com/dracut-ng/dracut-ng/pull/921
|
||||
https://bugs.gentoo.org/943035
|
||||
|
||||
From 2d4b550c71cc79ac7a3f18afc09d8263963d5de2 Mon Sep 17 00:00:00 2001
|
||||
From: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Date: Sat, 9 Nov 2024 14:06:57 -0500
|
||||
Subject: [PATCH] fix(dracut-systemd): check systemd-cryptsetup before
|
||||
including
|
||||
|
||||
---
|
||||
modules.d/98dracut-systemd/module-setup.sh | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh
|
||||
index 0438e40f0..f2502cd78 100755
|
||||
--- a/modules.d/98dracut-systemd/module-setup.sh
|
||||
+++ b/modules.d/98dracut-systemd/module-setup.sh
|
||||
@@ -19,7 +19,10 @@ depends() {
|
||||
# systemd-cryptsetup is mandatory dependency
|
||||
# see https://github.com/dracut-ng/dracut-ng/issues/563
|
||||
if dracut_module_included "crypt"; then
|
||||
- deps+=" systemd-cryptsetup"
|
||||
+ module_check systemd-cryptsetup > /dev/null 2>&1
|
||||
+ if [[ $? == 255 ]]; then
|
||||
+ deps+=" systemd-cryptsetup"
|
||||
+ fi
|
||||
fi
|
||||
|
||||
echo "$deps"
|
@ -0,0 +1,13 @@
|
||||
diff --git a/modules.d/91tpm2-tss/module-setup.sh b/modules.d/91tpm2-tss/module-setup.sh
|
||||
index 4441f5528..4b5654d56 100755
|
||||
--- a/modules.d/91tpm2-tss/module-setup.sh
|
||||
+++ b/modules.d/91tpm2-tss/module-setup.sh
|
||||
@@ -30,7 +30,7 @@ installkernel() {
|
||||
|
||||
# Install the required file(s) and directories for the module in the initramfs.
|
||||
install() {
|
||||
- inst_sysusers tpm2-tss.conf
|
||||
+ inst_sysusers tss.conf
|
||||
|
||||
inst_multiple -o \
|
||||
"$tmpfilesdir"/tpm2-tss-fapi.conf \
|
@ -0,0 +1,17 @@
|
||||
https://github.com/dracut-ng/dracut-ng/pull/1250
|
||||
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
|
||||
index 8ce5f2ee..b0ab8411 100755
|
||||
--- a/modules.d/90mdraid/module-setup.sh
|
||||
+++ b/modules.d/90mdraid/module-setup.sh
|
||||
@@ -46,7 +46,7 @@ cmdline() {
|
||||
[[ ${host_fs_types[$dev]} != *_raid_member ]] && continue
|
||||
|
||||
UUID=$(
|
||||
- /sbin/mdadm --examine --export "$dev" \
|
||||
+ mdadm --examine --export "$dev" \
|
||||
| while read -r line || [[ "$line" ]]; do
|
||||
[[ ${line#MD_UUID=} == "$line" ]] && continue
|
||||
printf "%s" "${line#MD_UUID=} "
|
||||
--
|
||||
2.48.1
|
||||
|
@ -0,0 +1,14 @@
|
||||
https://github.com/dracut-ng/dracut-ng/pull/1207
|
||||
diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh
|
||||
index 1fcc831c4..064379242 100755
|
||||
--- a/modules.d/06rngd/module-setup.sh
|
||||
+++ b/modules.d/06rngd/module-setup.sh
|
||||
@@ -21,7 +21,7 @@
|
||||
check() {
|
||||
# if there's no rngd binary, no go.
|
||||
require_binaries rngd || return 1
|
||||
- require_binaries "${systemdsystemunitdir}/rngd.service" || return 1
|
||||
+ [[ -e "${systemdsystemunitdir}/rngd.service" ]] || return 1
|
||||
|
||||
return 0
|
||||
}
|
@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>chutzpah@gentoo.org</email>
|
||||
<name>Patrick McLean</name>
|
||||
</maintainer>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>alexander@tsoy.me</email>
|
||||
<name>Alexander Tsoy</name>
|
||||
@ -13,4 +9,14 @@
|
||||
<email>floppym@gentoo.org</email>
|
||||
<name>Mike Gilbert</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>nowa@gentoo.org</email>
|
||||
<name>Nowa Ammerlaan</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="dracut-cpio">Build the enhanced 'dracut-cpio' program, written in Rust.</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">dracut-ng/dracut-ng</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user