Compare commits

...

55 Commits
master ... main

Author SHA1 Message Date
Dusty Mabe 173829537c Support MACAddressPolicy=none for bond/bridge/team devices
In Fedora Linux there was a new 98-default-mac-none.link file added
to set the MACAddressPolicy=none for bond/bridge/team devices. We'd
like for this policy to apply in the initramfs as well. See

- https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
- https://src.fedoraproject.org/rpms/systemd/pull-request/100#
2023-03-20 13:34:42 +01:00
Pavel Valena 7a74f7ccec revert(network-manager): avoid restarting NetworkManager
https://github.com/dracutdevs/dracut/pull/2134
2023-03-16 09:02:54 +01:00
Pavel Valena dc707d41cc fix(dmsquash-live): restore compatibility with earlier releases
as current revert breaks NFS. Also re-add overlayfs module.

https://github.com/dracutdevs/dracut/pull/2233

rhbz#2172269
2023-03-16 09:02:54 +01:00
Pavel Valena 61fb1e8e40 fix(dracut.sh): handle --kmoddir with trailing /
https://github.com/dracutdevs/dracut/pull/2237

Resolves: #2173100
2023-02-24 19:52:25 +01:00
Pavel Valena 05988c6a16 Revert PR#1934
https://bugzilla.redhat.com/show_bug.cgi?id=2172269#c3
2023-02-21 22:03:22 +01:00
Pavel Valena 6ccd6ab537 Fixup .gitignore file. 2023-02-21 10:26:11 +01:00
Pavel Valena 6de3d96c7b feat(kernel-modules): add driver needed for macbook keyboards 2023-02-21 02:11:18 +01:00
Pavel Valena ec3ccd4eec Skip creating initrd when initrd already provided,
or different generator is configured.

https://github.com/dracutdevs/dracut/pull/1825/
2023-02-20 23:39:19 +01:00
Pavel Valena ac8a9b0f0b Update to 059 2023-02-20 23:36:58 +01:00
Fedora Release Engineering a4900f1415 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 01:45:55 +00:00
Davide Cavalca 54940adbaf Backport fix to add sysctl to initramfs to handle modprobe files 2022-11-13 21:57:33 -05:00
Neal Gompa e2800e6fc3 Backport dmsquash-live-autooverlay module 2022-10-15 15:25:19 -04:00
Pavel Valena 646eadf53c fix(dracut.spec): tpm2-tools is required for crypt module to work
tpm2-tools dependency can be can be pulled in case tmp2-tss package
is installed, using a soft conditional dependency.

Resolves: #2077697
2022-09-13 16:14:40 +02:00
Pavel Valena 52e9ef90a6 Re-add patch Never-enable-the-bluetooth-module-by-default
Keep until this gets fixed properly in upstream.

Resolves: #1964879
2022-09-13 16:14:40 +02:00
Pavel Valena adc42dfa9f dmsquash-live-root: Run checkisomd5 on correct device
Resolves: #2107858
2022-08-16 16:15:45 +02:00
Fedora Release Engineering f071cde08c Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 00:53:56 +00:00
Pavel Valena 913cfc7268 Clean up and ehnance .spec file
- removed unnecessary conditionals
 - removed unused dracut.log file
2022-07-18 12:36:19 +02:00
Pavel Valena 868aaf1655 Upgrade to dracut 057
also sync up .spec file with upstream.
2022-07-18 12:36:19 +02:00
Pavel Valena 4fe40ec0ad Enhance newdracut.sh 2022-07-18 11:31:10 +02:00
Kevin Fenzi ce8caeca15 Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes 2022-04-19 16:12:23 -07:00
Peter Robinson 937971c7d1 Update to 056 2022-03-04 15:37:43 +00:00
Fedora Release Engineering 21d7df40dc - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 01:00:48 +00:00
Hans de Goede 76eb28fc2e Backport upstream changes for drm-privacy screen support in kernel >= 5.17 2021-12-20 14:46:50 +01:00
Jeremy Linton 6333f807a7 Add isp1760 patch from upstream.
Some Arm devices (corestone) use the isp1760 as their boot
device. This patch is upstream, but needs to be added here
until the next release.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
2021-11-04 15:12:50 -05:00
Olivier Lemasle 59c2556942 Backport PR #1611 to fix network manager when console is not usable 2021-10-26 21:06:17 +02:00
Adam Williamson 56d90eedfb Backport PR #1584 to fix missing block drivers, boot in EC2 (#2010058) 2021-10-18 16:11:20 -07:00
Peter Robinson d1ee2ba016 Add USB Type-C to fix display/input/storage attached via it (rhbz #1964218) 2021-10-06 12:08:11 +01:00
Fedora Release Engineering 2b68fa5d43 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 21:06:06 +00:00
Dusty Mabe cf3fe99ffa
Backport fixes for NM running via systemd+dbus in the initramfs
Also backport a fix to drop requirement on deprecated systemd-udev-settle.

- https://github.com/dracutdevs/dracut/pull/1547
- https://github.com/dracutdevs/dracut/pull/1548
- https://github.com/dracutdevs/dracut/pull/1552
2021-07-09 10:56:35 -04:00
Adam Williamson 3e8627dea8 Never include bluetooth module by default
This is a temporary workaround for RHBZ #1964879. Once that is
fixed properly it can be removed.
2021-06-10 08:46:24 -07:00
Harald Hoyer bf5f951f08 dracut - 055-1
- version 055
- install the missing fsck utils
2021-05-27 14:52:04 +02:00
Harald Hoyer 9f8738445a dracut - 054-12.git20210521
- fix `get_maj_min` for kdump
- suppress hardlink output
- sane default --kerneldir for dracut-install
- squash: don't mount the mount points if already mounted
2021-05-21 14:20:40 +02:00
Harald Hoyer 8db2b6ad75 fix for `str_replace: command not found` 2021-05-18 10:30:23 +02:00
Harald Hoyer b7366e786e version 054 2021-05-17 16:24:05 +02:00
Peter Robinson 7430406aed add watchdog drivers for generic initrd (rhbz 1592148) 2021-04-22 19:18:42 +01:00
Dusty Mabe fbb2532e93 Backport a few upstream fixes
- Backport: fix(dracut-logger.sh): double dash trigger unknown logger warnings during run
- Backport: fix(network-manager): nm-run.service: don't kill forked processes
- Backport: fix(network-manager): only run NetworkManager if rd.neednet=1
- Backport: fix(network-manager): use /run/NetworkManager/initrd/neednet in initqueue
2021-04-19 13:47:03 -04:00
Adam Williamson eeb15e69ee Fix removal of key system files when kdump enabled (#1936781) 2021-04-19 08:38:06 -07:00
Adam Williamson d7f61aa507 Backport upstream change to fix boot on encrypted LVM (#1946074) 2021-04-08 17:29:47 -07:00
Harald Hoyer 0d91bfb921 add changelog 2021-02-24 09:50:48 +01:00
Harald Hoyer e0e9e12ff6 dracut-053 2021-02-23 16:31:04 +01:00
Fedora Release Engineering a05a262423 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 03:44:01 +00:00
Tom Stellard f3d34643e9 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-19 06:16:54 +00:00
Harald Hoyer ce2d834370 dracut-051 2020-12-15 09:54:21 +01:00
Harald Hoyer 99c74373ee dracut-050-167.git20201006 2020-10-06 10:41:54 +02:00
Harald Hoyer 460d2c99f9 dracut-050-157.git20201002
git snapshot
2020-10-02 14:08:26 +02:00
Peter Robinson faebfd0d20 Fixes for Arm GPUs in early boot 2020-09-29 09:02:06 +01:00
Peter Robinson 5ff500b686 Fix for Rockchip devices 2020-09-25 16:15:35 +01:00
Merlin Mathesius a3f42e242f Correct conditionals to drop 51-dracut-rescue-postinst.sh for Fedora and
recent RHEL releases

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-08-19 07:48:08 -05:00
Fedora Release Engineering c2207419c3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 15:43:16 +00:00
Tom Stellard e965b21ea9 Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-13 19:12:37 +00:00
Harald Hoyer 308914b60e dracut - 050-61.git20200529
- git snapshot

(cherry picked from commit 0738a697c9202eb36911f02b0829bcaf3a224687)
2020-05-29 20:31:27 +02:00
Harald Hoyer 9d6a2bd992 Merge branch 'master' into f32 2020-03-16 16:11:22 +01:00
Harald Hoyer deb02b10b8 Merge branch 'master' into f32 2020-03-13 16:03:26 +01:00
Harald Hoyer 42f7141a9a Merge branch 'master' into f32 2020-03-11 13:30:00 +01:00
Harald Hoyer 46aa93e490 dracut-050 2020-03-04 13:03:08 +01:00
36 changed files with 616 additions and 1467 deletions

38
.gitignore vendored
View File

@ -1,37 +1 @@
/dracut-011-9b30d47.tar.bz2
/dracut-011.tar.bz2
/dracut-013.tar.bz2
/dracut-014.tar.bz2
/dracut-015.tar.bz2
/dracut-016.tar.bz2
/dracut-017.tar.bz2
/dracut-018.tar.bz2
/dracut-019.tar.bz2
/dracut-020.tar.bz2
/dracut-021.tar.bz2
/dracut-022.tar.bz2
/dracut-023.tar.bz2
/dracut-025.tar.bz2
/dracut-026.tar.bz2
/dracut-027.tar.bz2
/dracut-028.tar.bz2
/dracut-029.tar.bz2
/dracut-030.tar.bz2
/dracut-031.tar.bz2
/dracut-032.tar.bz2
/dracut-033.tar.bz2
/dracut-034.tar.bz2
/dracut-036.tar.xz
/dracut-037.tar.xz
/dracut-038.tar.xz
/dracut-040.tar.xz
/dracut-041.tar.xz
/dracut-042.tar.xz
/dracut-043.tar.xz
/dracut-044.tar.xz
/dracut-045.tar.xz
/dracut-046.tar.xz
/dracut-047.tar.xz
/dracut-048.tar.xz
/dracut-049.tar.xz
/dracut-050.tar.xz
/*.tar.*

View File

@ -1,27 +0,0 @@
From 3ba12b22491de49853685bec5bb345e624c119ab Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 4 Mar 2020 14:39:22 +0100
Subject: [PATCH] test/TEST-35-ISCSI-MULTI: bump disk space
---
test/TEST-35-ISCSI-MULTI/test.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/TEST-35-ISCSI-MULTI/test.sh b/test/TEST-35-ISCSI-MULTI/test.sh
index e96c9c56..740ab918 100755
--- a/test/TEST-35-ISCSI-MULTI/test.sh
+++ b/test/TEST-35-ISCSI-MULTI/test.sh
@@ -144,9 +144,9 @@ test_setup() {
fi
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45
+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=90
+ dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=90
+ dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=90
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay

View File

@ -1,33 +0,0 @@
From 9e68789d66a6a383e5c46f687350897705c7994f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 4 Mar 2020 14:39:39 +0100
Subject: [PATCH] dracut.spec: add version check for deprecated files
---
dracut.spec | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index e336a25c..03b41471 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -278,8 +278,7 @@ rm -f -- $RPM_BUILD_ROOT%{_mandir}/man1/lsinitrd.1*
echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
-%if 0%{?fedora} || 0%{?rhel}
-# FIXME: remove after F30
+%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
%endif
@@ -475,7 +474,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%files config-rescue
%{dracutlibdir}/dracut.conf.d/02-rescue.conf
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
-%if 0%{?fedora} || 0%{?rhel}
+%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8
# FIXME: remove after F30
%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
%endif

View File

@ -1,76 +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) *~

View File

@ -1,54 +0,0 @@
From 7ef5ead6f4cf4834b84ea6d9546b77ddc0da394b Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.de>
Date: Thu, 30 Jan 2020 13:48:11 +0100
Subject: [PATCH] Add module "90nvdimm" for NVDIMM support
Detection of persistent memory devices works mostly out of the box
already. Only the "provider" modules for ndbus devices, which are responsible
to extract information of available NVDIMM devices and their configuration
from system firmware, are only indirectly linked into the module stack.
Examples for such modules are nfit.ko, nd_e820.ko, and virtio-pmem.ko.
Add a module that resolves these dependencies.
---
modules.d/90nvdimm/module-setup.sh | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/modules.d/90nvdimm/module-setup.sh b/modules.d/90nvdimm/module-setup.sh
new file mode 100755
index 00000000..6d58efd7
--- /dev/null
+++ b/modules.d/90nvdimm/module-setup.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# called by dracut
+check() {
+ if [[ ! $hostonly ]]; then
+ return 0
+ fi
+ [[ $DRACUT_KERNEL_MODALIASES && -f "$DRACUT_KERNEL_MODALIASES" ]] && \
+ grep -q libnvdimm "$DRACUT_KERNEL_MODALIASES" && return 0
+ return 255
+}
+
+# called by dracut
+depends() {
+ return 0
+}
+
+# called by dracut
+installkernel() {
+ # Directories to search for NVDIMM "providers" (firmware drivers)
+ # These modules call "nvdimm_bus_register()".
+ local _provider_dirs='=drivers/nvdimm =drivers/acpi =arch/powerpc'
+
+ #instmods() will take care of hostonly
+ dracut_instmods -o -s nvdimm_bus_register $_provider_dirs
+}
+
+# called by dracut
+install() {
+ inst_multiple -o ndctl
+}

View File

@ -1,25 +0,0 @@
From 18420d9ce5bb738473d127affb96a5c6a44ba2ac Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.de>
Date: Thu, 30 Jan 2020 15:44:28 +0100
Subject: [PATCH] 90kernel-modules: remove nfit from static module list
The 90nvdimm module now resolves the nfit dependency when it's
necessary, so it's not necessary any more to pack it always.
---
modules.d/90kernel-modules/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 2ca4b719..bc3810cc 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -28,7 +28,7 @@ installkernel() {
hostonly='' instmods sr_mod sd_mod scsi_dh ata_piix
instmods \
scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
- =ide nvme vmd nfit \
+ =ide nvme vmd \
virtio_blk
dracut_instmods -o -s "${_blockfuncs}" "=drivers"

View File

@ -1,22 +0,0 @@
From 5a720ebf6711a119649645de673bcb247e09a1ba Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.de>
Date: Fri, 6 Mar 2020 10:26:43 +0100
Subject: [PATCH] dracut.spec: add 90nvdimm
---
dracut.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut.spec b/dracut.spec
index 03b41471..0369dde6 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -364,6 +364,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/90lvm
%{dracutlibdir}/modules.d/90mdraid
%{dracutlibdir}/modules.d/90multipath
+%{dracutlibdir}/modules.d/90nvdimm
%{dracutlibdir}/modules.d/90stratis
%{dracutlibdir}/modules.d/90ppcmac
%{dracutlibdir}/modules.d/90qemu

View File

@ -1,70 +0,0 @@
From db9b5851f3bca0844890d529c7560c89ef81b92a Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <daniel.molkentin@suse.com>
Date: Wed, 30 Oct 2019 09:30:32 +0100
Subject: [PATCH] 99base: Remove duplicate nfsroot_to_var from dracut-lib.sh
It already lives in nfs-lib.sh, which is the more correct library scope.
Fixes #17
---
modules.d/95nfs/parse-nfsroot.sh | 1 +
modules.d/99base/dracut-lib.sh | 33 ---------------------------------
2 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh
index f715767b..44a69d48 100755
--- a/modules.d/95nfs/parse-nfsroot.sh
+++ b/modules.d/95nfs/parse-nfsroot.sh
@@ -24,6 +24,7 @@
#
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+ . /lib/nfs-lib.sh
# This script is sourced, so root should be set. But let's be paranoid
[ -z "$root" ] && root=$(getarg root=)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index 207a2b5c..c53cd13b 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -579,39 +579,6 @@ else
}
fi
-# root=nfs:[<server-ip>:]<root-dir>[:<nfs-options>]
-# root=nfs4:[<server-ip>:]<root-dir>[:<nfs-options>]
-nfsroot_to_var() {
- # strip nfs[4]:
- local arg="$@:"
- nfs="${arg%%:*}"
- arg="${arg##$nfs:}"
-
- # check if we have a server
- if strstr "$arg" ':/' ; then
- server="${arg%%:/*}"
- arg="/${arg##*:/}"
- fi
-
- path="${arg%%:*}"
-
- # rest are options
- options="${arg##$path}"
- # strip leading ":"
- options="${options##:}"
- # strip ":"
- options="${options%%:}"
-
- # Does it really start with '/'?
- [ -n "${path%%/*}" ] && path="error";
-
- #Fix kernel legacy style separating path and options with ','
- if [ "$path" != "${path#*,}" ] ; then
- options=${path#*,}
- path=${path%%,*}
- fi
-}
-
# Create udev rule match for a device with its device name, or the udev property
# ID_FS_UUID or ID_FS_LABEL
#

View File

@ -1,26 +0,0 @@
From 7a04712ad0efa9afa3759656ea1b26db40a8a29e Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 21 Jan 2019 14:40:06 +0100
Subject: [PATCH] 95zfcp_rules/parse-zfcp.sh: remove rule existence check
Reference: bsc#1008352
Original-Patch-By: Michal Suchanek <msuchanek@suse.com>
---
modules.d/95zfcp_rules/parse-zfcp.sh | 2 --
1 file changed, 2 deletions(-)
diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh
index 7defb04f..2b62012b 100755
--- a/modules.d/95zfcp_rules/parse-zfcp.sh
+++ b/modules.d/95zfcp_rules/parse-zfcp.sh
@@ -22,8 +22,6 @@ create_udev_rule() {
return 0;
fi
- [ -e ${_rule} ] && return 0
-
if [ ! -f "$_rule" ] ; then
cat > $_rule <<EOF
ACTION=="add", SUBSYSTEM=="ccw", KERNEL=="$ccw", IMPORT{program}="collect $ccw %k ${ccw} zfcp"

View File

@ -1,73 +0,0 @@
From 0386e4627779cb51f4292b3c642d90586d5e71b4 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.de>
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

View File

@ -1,38 +0,0 @@
From bc1e69b691e6d25722b64e1df58a35e3be977801 Mon Sep 17 00:00:00 2001
From: Topi Miettinen <toiwoton@gmail.com>
Date: Sun, 1 Mar 2020 10:45:16 +0200
Subject: [PATCH] Use TMPDIR if available
Use environment variable TMPDIR (typically /run/user/$UID) as default
temporary directory, if available. This should be more private
location than /var/tmp. Path specified with --tmpdir is takes
precedence over TMPDIR and /var/tmp is still used as last resort if
neither TMPDIR is set nor --tmpdir is used.
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
---
dracut.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index c14f6c0b..ab82cbc9 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -140,7 +140,7 @@ Creates initial ramdisk images for preloading modules
--confdir [DIR] Specify configuration directory to use *.conf files
from. Default: /etc/dracut.conf.d
--tmpdir [DIR] Temporary directory to be used instead of default
- /var/tmp.
+ ${TMPDIR:-/var/tmp}.
-r, --sysroot [DIR] Specify sysroot directory to collect files from.
-l, --local Local mode. Use modules from the current working
directory instead of the system-wide installed in
@@ -765,6 +765,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $dracutbasedir ]] || dracutbasedir=$dracutsysrootdir/usr/lib/dracut
[[ $fw_dir ]] || fw_dir="$dracutsysrootdir/lib/firmware/updates:$dracutsysrootdir/lib/firmware:$dracutsysrootdir/lib/firmware/$kernel"
[[ $tmpdir_l ]] && tmpdir="$tmpdir_l"
+[[ $tmpdir ]] && tmpdir="$TMPDIR"
[[ $tmpdir ]] || tmpdir=$dracutsysrootdir/var/tmp
[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
[[ $compress_l ]] && compress=$compress_l

View File

@ -1,17 +0,0 @@
From 2293609dcba01f5bf256b4245896927d4719a273 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Tue, 24 Jul 2018 19:38:30 +0200
Subject: [PATCH] 95dcssblk: fix script permissions
---
modules.d/95dcssblk/module-setup.sh | 0
modules.d/95dcssblk/parse-dcssblk.sh | 0
2 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/modules.d/95dcssblk/module-setup.sh b/modules.d/95dcssblk/module-setup.sh
old mode 100644
new mode 100755
diff --git a/modules.d/95dcssblk/parse-dcssblk.sh b/modules.d/95dcssblk/parse-dcssblk.sh
old mode 100644
new mode 100755

View File

@ -1,32 +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

View File

@ -1,26 +0,0 @@
From 7fb8f939a52a904b1860e303a6a7fe69ba0d2ceb Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Tue, 10 Mar 2020 10:48:21 +0100
Subject: [PATCH] Fix pre-trigger stage by replacing exit with return in
lldpad.sh
Using exit makes the pre-trigger stage finish after running 03-lldpad.sh
pre-trigger hook.
---
modules.d/95fcoe/lldpad.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
index c32feeed..444c943e 100755
--- a/modules.d/95fcoe/lldpad.sh
+++ b/modules.d/95fcoe/lldpad.sh
@@ -2,7 +2,7 @@
if ! getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping lldpad activation"
- exit 0
+ return 0
fi
# Note lldpad will stay running after switchroot, the system initscripts

View File

@ -1,39 +0,0 @@
From 8446c8f9deefcc6c47d96a128b1e9b23d8855a96 Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Mon, 24 Feb 2020 12:11:25 +0100
Subject: [PATCH] 95fcoe: default rd.nofcoe to false
rd.nofcoe should default to false, e.g. fcoe should be enabled unless
overwritten from the command line.
The same applies for lldapd.sh.
---
modules.d/95fcoe/lldpad.sh | 2 +-
modules.d/95fcoe/parse-fcoe.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh
index 444c943e..7faa2e19 100755
--- a/modules.d/95fcoe/lldpad.sh
+++ b/modules.d/95fcoe/lldpad.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-if ! getargbool 0 rd.nofcoe ; then
+if getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping lldpad activation"
return 0
fi
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
index 8bb55c6e..86f4331e 100755
--- a/modules.d/95fcoe/parse-fcoe.sh
+++ b/modules.d/95fcoe/parse-fcoe.sh
@@ -13,7 +13,7 @@
# fcoe=eth0:nodcb:vn2vn
# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
-if ! getargbool 0 rd.nofcoe ; then
+if getargbool 0 rd.nofcoe ; then
info "rd.nofcoe=0: skipping fcoe"
return 0
fi

View File

@ -1,25 +0,0 @@
From 058739bf6941f4e96cc734fe4582abbb55baac38 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 11 Mar 2020 12:38:01 +0100
Subject: [PATCH] README.md: fix github action badge links
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c0ee79e2..9948bf97 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@ dracut
dracut is an event driven initramfs infrastructure.
[![Build Status](https://travis-ci.org/dracutdevs/dracut.svg?branch=master)](https://travis-ci.org/dracutdevs/dracut)
-![Fedora-30](https://github.com/dracutdevs/dracut/workflows/Fedora-30/badge.svg?branch=master)
-![Fedora-31](https://github.com/dracutdevs/dracut/workflows/Fedora-31/badge.svg?branch=master)
+[![Fedora-30](https://github.com/dracutdevs/dracut/workflows/Fedora-30/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-30)
+[![Fedora-31](https://github.com/dracutdevs/dracut/workflows/Fedora-31/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-31)
dracut (the tool) is used to create an initramfs image by copying tools
and files from an installed system and combining it with the

View File

@ -1,28 +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
}
-

View File

@ -1,39 +0,0 @@
From fc6f458c3becd55277d1ab87d1608f0fe1fccf08 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 11 Mar 2020 13:14:26 +0100
Subject: [PATCH] TEST-12-RAID-DEG/create-root.sh: more udevadm settle
---
test/TEST-12-RAID-DEG/create-root.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh
index c210b582..f40d2500 100755
--- a/test/TEST-12-RAID-DEG/create-root.sh
+++ b/test/TEST-12-RAID-DEG/create-root.sh
@@ -20,7 +20,7 @@ echo "The passphrase is test"
set -e
cryptsetup luksOpen /dev/md0 dracut_crypt_test </keyfile
lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test
-lvm vgcreate dracut /dev/mapper/dracut_crypt_test
+lvm vgcreate dracut /dev/mapper/dracut_crypt_test
lvm lvcreate -l 100%FREE -n root dracut
lvm vgchange -ay
mke2fs -L root /dev/dracut/root
@@ -29,12 +29,14 @@ mount /dev/dracut/root /sysroot
cp -a -t /sysroot /source/*
mkdir /sysroot/run
umount /sysroot
-lvm lvchange -a n /dev/dracut/root
+lvm lvchange -a n /dev/dracut/root
udevadm settle
cryptsetup luksClose /dev/mapper/dracut_crypt_test
udevadm settle
mdadm -W /dev/md0 || :
+udevadm settle
mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
. /tmp/mduuid
+udevadm settle
eval $(udevadm info --query=env --name=/dev/md0|while read line || [ -n "$line" ]; do [ "$line" != "${line#*ID_FS_UUID*}" ] && echo $line; done;)
{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID; echo "ID_FS_UUID=$ID_FS_UUID";} | dd oflag=direct,dsync of=/dev/sda

View File

@ -1,46 +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

View File

@ -1,344 +0,0 @@
From a22ab24d5371cbd73b18b27e98e980e45e39ff5f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 12 Mar 2020 11:55:37 +0100
Subject: [PATCH] test: use dd from /dev/zero, instead of creating files with a
hole
---
test/TEST-01-BASIC/test.sh | 2 +-
test/TEST-02-SYSTEMD/test.sh | 2 +-
test/TEST-03-USR-MOUNT/test.sh | 4 ++--
test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++--
test/TEST-10-RAID/test.sh | 2 +-
test/TEST-11-LVM/test.sh | 2 +-
test/TEST-12-RAID-DEG/test.sh | 10 +++++-----
test/TEST-13-ENC-RAID-LVM/test.sh | 2 +-
test/TEST-14-IMSM/test.sh | 8 ++++----
test/TEST-15-BTRFSRAID/test.sh | 2 +-
test/TEST-17-LVM-THIN/test.sh | 2 +-
test/TEST-20-NFS/test.sh | 2 +-
test/TEST-30-ISCSI/test.sh | 10 +++++-----
test/TEST-35-ISCSI-MULTI/test.sh | 10 +++++-----
test/TEST-40-NBD/test.sh | 8 ++++----
test/TEST-50-MULTINIC/test.sh | 2 +-
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh | 2 +-
17 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index c47098ea..668a35d8 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -20,7 +20,7 @@ test_run() {
test_setup() {
rm -f -- $TESTDIR/root.ext3
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80
+ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=80
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
index cf1fcaa5..5c0a54de 100755
--- a/test/TEST-02-SYSTEMD/test.sh
+++ b/test/TEST-02-SYSTEMD/test.sh
@@ -16,7 +16,7 @@ test_run() {
test_setup() {
rm -f -- $TESTDIR/root.ext3
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=80
+ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=80
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
index 5de7f4a1..5190f220 100755
--- a/test/TEST-03-USR-MOUNT/test.sh
+++ b/test/TEST-03-USR-MOUNT/test.sh
@@ -41,8 +41,8 @@ test_setup() {
rm -f -- $TESTDIR/root.btrfs
rm -f -- $TESTDIR/usr.btrfs
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=160
- dd if=/dev/null of=$TESTDIR/usr.btrfs bs=1M seek=160
+ dd if=/dev/zero of=$TESTDIR/root.btrfs bs=1M count=160
+ dd if=/dev/zero of=$TESTDIR/usr.btrfs bs=1M count=160
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
index 3a544d7c..e3b23327 100755
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
@@ -42,8 +42,8 @@ test_setup() {
rm -f -- $TESTDIR/root.btrfs
rm -f -- $TESTDIR/usr.btrfs
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.btrfs bs=1M seek=320
- dd if=/dev/null of=$TESTDIR/usr.btrfs bs=1M seek=320
+ dd if=/dev/zero of=$TESTDIR/root.btrfs bs=1M count=320
+ dd if=/dev/zero of=$TESTDIR/usr.btrfs bs=1M count=320
export kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
index 981c1b9d..4203cfdc 100755
--- a/test/TEST-10-RAID/test.sh
+++ b/test/TEST-10-RAID/test.sh
@@ -19,7 +19,7 @@ test_setup() {
DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
# Create the blank file to use as a root filesystem
rm -f -- $DISKIMAGE
- dd if=/dev/null of=$DISKIMAGE bs=1M seek=128
+ dd if=/dev/zero of=$DISKIMAGE bs=1M count=128
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
index c718ad57..22643758 100755
--- a/test/TEST-11-LVM/test.sh
+++ b/test/TEST-11-LVM/test.sh
@@ -16,7 +16,7 @@ test_run() {
test_setup() {
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80
+ dd if=/dev/zero of=$TESTDIR/root.ext2 bs=1M count=80
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
index f8dc08d9..09eb28bb 100755
--- a/test/TEST-12-RAID-DEG/test.sh
+++ b/test/TEST-12-RAID-DEG/test.sh
@@ -25,7 +25,7 @@ client_run() {
return 1;
fi
rm -f -- $TESTDIR/marker.img
- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=40
+ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=40
echo "CLIENT TEST END: $@ [OK]"
return 0
@@ -56,10 +56,10 @@ test_run() {
test_setup() {
# Create the blank file to use as a root filesystem
rm -f -- $TESTDIR/marker.img
- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=40
- dd if=/dev/null of=$TESTDIR/disk1.img bs=1M seek=35
- dd if=/dev/null of=$TESTDIR/disk2.img bs=1M seek=35
- dd if=/dev/null of=$TESTDIR/disk3.img bs=1M seek=35
+ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=40
+ dd if=/dev/zero of=$TESTDIR/disk1.img bs=1M count=35
+ dd if=/dev/zero of=$TESTDIR/disk2.img bs=1M count=35
+ dd if=/dev/zero of=$TESTDIR/disk3.img bs=1M count=35
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
index 580ade85..16ee8e66 100755
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
@@ -50,7 +50,7 @@ test_run() {
test_setup() {
# Create the blank file to use as a root filesystem
rm -f -- $TESTDIR/root.ext2
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=134
+ dd if=/dev/zero of=$TESTDIR/root.ext2 bs=1M count=134
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
index 2f153ba3..1f822e4e 100755
--- a/test/TEST-14-IMSM/test.sh
+++ b/test/TEST-14-IMSM/test.sh
@@ -11,7 +11,7 @@ client_run() {
echo "CLIENT TEST START: $@"
rm -f -- $TESTDIR/marker.img
- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=1
+ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=1
$testdir/run-qemu \
-drive format=raw,index=0,media=disk,file=$TESTDIR/marker.img \
@@ -53,9 +53,9 @@ test_setup() {
rm -f -- $TESTDIR/marker.img
rm -f -- $TESTDIR/disk1
rm -f -- $TESTDIR/disk2
- dd if=/dev/null of=$TESTDIR/marker.img bs=1M seek=1
- dd if=/dev/null of=$TESTDIR/disk1 bs=1M seek=104
- dd if=/dev/null of=$TESTDIR/disk2 bs=1M seek=104
+ dd if=/dev/zero of=$TESTDIR/marker.img bs=1M count=1
+ dd if=/dev/zero of=$TESTDIR/disk1 bs=1M count=104
+ dd if=/dev/zero of=$TESTDIR/disk2 bs=1M count=104
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
index 435e52be..227daaba 100755
--- a/test/TEST-15-BTRFSRAID/test.sh
+++ b/test/TEST-15-BTRFSRAID/test.sh
@@ -21,7 +21,7 @@ test_setup() {
# Create the blank file to use as a root filesystem
DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img
rm -f -- $DISKIMAGE
- dd if=/dev/null of=$DISKIMAGE bs=1M seek=1024
+ dd if=/dev/zero of=$DISKIMAGE bs=1M count=1024
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
index e4755f78..8ab30a45 100755
--- a/test/TEST-17-LVM-THIN/test.sh
+++ b/test/TEST-17-LVM-THIN/test.sh
@@ -16,7 +16,7 @@ test_run() {
test_setup() {
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=92
+ dd if=/dev/zero of=$TESTDIR/root.ext2 bs=1M count=92
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 9d5493c7..53d1d804 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -225,7 +225,7 @@ test_run() {
test_setup() {
# Make server root
- dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=120
+ dd if=/dev/zero of=$TESTDIR/server.ext3 bs=1M count=120
mke2fs -j -F $TESTDIR/server.ext3
mkdir $TESTDIR/mnt
mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
index a8aee221..2f37f5c9 100755
--- a/test/TEST-30-ISCSI/test.sh
+++ b/test/TEST-30-ISCSI/test.sh
@@ -129,9 +129,9 @@ test_setup() {
fi
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45
+ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=45
+ dd if=/dev/zero of=$TESTDIR/iscsidisk2.img bs=1M count=45
+ dd if=/dev/zero of=$TESTDIR/iscsidisk3.img bs=1M count=45
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
@@ -182,7 +182,7 @@ test_setup() {
# Need this so kvm-qemu will boot (needs non-/dev/zero local disk)
- if ! dd if=/dev/null of=$TESTDIR/client.img bs=1M seek=1; then
+ if ! dd if=/dev/zero of=$TESTDIR/client.img bs=1M count=1; then
echo "Unable to make client sdb image" 1>&2
return 1
fi
@@ -198,7 +198,7 @@ test_setup() {
rm -- $TESTDIR/client.img
# Make server root
- dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60
+ dd if=/dev/zero of=$TESTDIR/server.ext3 bs=1M count=60
mkfs.ext3 -j -F $TESTDIR/server.ext3
mkdir $TESTDIR/mnt
mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
diff --git a/test/TEST-35-ISCSI-MULTI/test.sh b/test/TEST-35-ISCSI-MULTI/test.sh
index 740ab918..54700609 100755
--- a/test/TEST-35-ISCSI-MULTI/test.sh
+++ b/test/TEST-35-ISCSI-MULTI/test.sh
@@ -144,9 +144,9 @@ test_setup() {
fi
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=90
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=90
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=90
+ dd if=/dev/zero of=$TESTDIR/root.ext3 bs=1M count=90
+ dd if=/dev/zero of=$TESTDIR/iscsidisk2.img bs=1M count=90
+ dd if=/dev/zero of=$TESTDIR/iscsidisk3.img bs=1M count=90
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
@@ -197,7 +197,7 @@ test_setup() {
# Need this so kvm-qemu will boot (needs non-/dev/zero local disk)
- if ! dd if=/dev/null of=$TESTDIR/client.img bs=1M seek=1; then
+ if ! dd if=/dev/zero of=$TESTDIR/client.img bs=1M count=1; then
echo "Unable to make client sdb image" 1>&2
return 1
fi
@@ -213,7 +213,7 @@ test_setup() {
rm -- $TESTDIR/client.img
# Make server root
- dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60
+ dd if=/dev/zero of=$TESTDIR/server.ext3 bs=1M count=60
mkfs.ext3 -j -F $TESTDIR/server.ext3
mkdir $TESTDIR/mnt
mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
index f06c36c3..b6c45f01 100755
--- a/test/TEST-40-NBD/test.sh
+++ b/test/TEST-40-NBD/test.sh
@@ -209,8 +209,8 @@ client_run() {
make_encrypted_root() {
# Create the blank file to use as a root filesystem
- dd if=/dev/null of=$TESTDIR/encrypted.ext2 bs=1M seek=80
- dd if=/dev/null of=$TESTDIR/flag.img bs=1M seek=1
+ dd if=/dev/zero of=$TESTDIR/encrypted.ext2 bs=1M count=80
+ dd if=/dev/zero of=$TESTDIR/flag.img bs=1M count=1
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay
@@ -280,7 +280,7 @@ make_encrypted_root() {
}
make_client_root() {
- dd if=/dev/null of=$TESTDIR/nbd.ext2 bs=1M seek=120
+ dd if=/dev/zero of=$TESTDIR/nbd.ext2 bs=1M count=120
mke2fs -F -j $TESTDIR/nbd.ext2
mkdir $TESTDIR/mnt
if ! mount -o loop $TESTDIR/nbd.ext2 $TESTDIR/mnt; then
@@ -325,7 +325,7 @@ make_client_root() {
}
make_server_root() {
- dd if=/dev/null of=$TESTDIR/server.ext2 bs=1M seek=120
+ dd if=/dev/zero of=$TESTDIR/server.ext2 bs=1M count=120
mke2fs -F $TESTDIR/server.ext2
mkdir $TESTDIR/mnt
mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
index b4326d5a..be87caab 100755
--- a/test/TEST-50-MULTINIC/test.sh
+++ b/test/TEST-50-MULTINIC/test.sh
@@ -173,7 +173,7 @@ test_client() {
test_setup() {
# Make server root
- dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120
+ dd if=/dev/zero of="$TESTDIR"/server.ext3 bs=1M count=120
mke2fs -j -F -- "$TESTDIR"/server.ext3
mkdir -- "$TESTDIR"/mnt
mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
diff --git a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
index 72826a5d..accfa006 100755
--- a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
+++ b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
@@ -199,7 +199,7 @@ root=nfs:192.168.50.1:/nfs/client bootdev=br0
test_setup() {
# Make server root
- dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120
+ dd if=/dev/zero of="$TESTDIR"/server.ext3 bs=1M count=120
mke2fs -j -F -- "$TESTDIR"/server.ext3
mkdir -- "$TESTDIR"/mnt
mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt

View File

@ -1,53 +0,0 @@
From d5bfaf58ab2098737bad92008916d39a0ec361db Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 12 Mar 2020 12:50:08 +0100
Subject: [PATCH] github actions: use test container directly
---
.github/workflows/fedora-30.yml | 6 ++++--
.github/workflows/fedora-31.yml | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/fedora-30.yml b/.github/workflows/fedora-30.yml
index 345ed0d4..1a3d3e8d 100644
--- a/.github/workflows/fedora-30.yml
+++ b/.github/workflows/fedora-30.yml
@@ -13,7 +13,9 @@ on:
jobs:
test:
runs-on: ubuntu-latest
- #container: quay.io/haraldh/dracut-fedora:30
+ container:
+ image: quay.io/haraldh/dracut-fedora:30
+ options: "--privileged"
timeout-minutes: 45
strategy:
matrix:
@@ -45,4 +47,4 @@ jobs:
fetch-depth: 0
- name: "TEST-${{ matrix.test }}"
- run: docker run --privileged -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:30 /dracut/fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
+ run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
diff --git a/.github/workflows/fedora-31.yml b/.github/workflows/fedora-31.yml
index 20ad62c2..aa829df2 100644
--- a/.github/workflows/fedora-31.yml
+++ b/.github/workflows/fedora-31.yml
@@ -13,7 +13,9 @@ on:
jobs:
test:
runs-on: ubuntu-latest
- #container: quay.io/haraldh/dracut-fedora:30
+ container:
+ image: quay.io/haraldh/dracut-fedora:31
+ options: "--privileged"
timeout-minutes: 45
strategy:
matrix:
@@ -51,4 +53,4 @@ jobs:
fetch-depth: 0
- name: "TEST-${{ matrix.test }}"
- run: docker run --privileged -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:31 /dracut/fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
+ run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}

View File

@ -1,23 +0,0 @@
From 3b396a7d5092cec4c7b185bda63906069b8ec320 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 12 Mar 2020 13:22:10 +0100
Subject: [PATCH] TEST-41-NBD-NM/Makefile: should be based on TEST-40-NBD not
TEST-20-NFS
---
test/TEST-41-NBD-NM/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/TEST-41-NBD-NM/Makefile b/test/TEST-41-NBD-NM/Makefile
index b19122a1..47c90c31 100644
--- a/test/TEST-41-NBD-NM/Makefile
+++ b/test/TEST-41-NBD-NM/Makefile
@@ -1,6 +1,6 @@
.PHONY: all setup clean run
-BASETEST=../TEST-20-NFS
+BASETEST=../TEST-40-NBD
all:
@$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all

View File

@ -1,30 +0,0 @@
From 7069132ec7e94a3274aa1b3b3b6e339066118a4d Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Tue, 10 Mar 2020 15:18:37 +0100
Subject: [PATCH] network: fix glob matching ipv6 addresses
In this case we want to cover three cases
1) ip_address:ip_address
2) number:macaddress
3) :macaddress
We consider something an IPv6 address if it starts with number and
contains ":", but IPv6 addresses are in hexa.
---
modules.d/40network/net-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index 16730e5b..7f185fdd 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -510,7 +510,7 @@ ip_to_var() {
[ -n "$6" ] && dev=$6
[ -n "$7" ] && autoconf=$7
case "$8" in
- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
+ [0-9a-fA-F]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
dns1="$8"
[ -n "$9" ] && dns2="$9"
;;

View File

@ -1,90 +0,0 @@
From ca8ca19091a1822ee813657764263f76ffaa4ebb Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 12 Mar 2020 13:01:46 +0100
Subject: [PATCH] .travis.yml: reformat
---
.travis.yml | 56 ++++++++++++++++++++++++++++----------------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index e9f62a98..a82e1778 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,34 +2,34 @@ language: generic
dist: bionic
sudo: required
services:
-- docker
+ - docker
env:
matrix:
- - IMAGE=latest
- - IMAGE=latest TESTS=01
- - IMAGE=latest TESTS=12
- - IMAGE=latest TESTS=20
- - IMAGE=latest TESTS=21
- - IMAGE=latest TESTS=50
- - IMAGE=latest TESTS=51
- - IMAGE=latest TESTS=30
- - IMAGE=latest TESTS=31
- - IMAGE=latest TESTS=35
- - IMAGE=latest TESTS=36
- - IMAGE=latest TESTS=40
- - IMAGE=latest TESTS=41
- - IMAGE=latest TESTS=60
- - IMAGE=latest TESTS=61
- - IMAGE=latest TESTS=99
- - IMAGE=latest TESTS=02
- - IMAGE=latest TESTS=03
- - IMAGE=latest TESTS=04
- - IMAGE=latest TESTS=10
- - IMAGE=latest TESTS=11
- - IMAGE=latest TESTS=13
- - IMAGE=latest TESTS=14
- - IMAGE=latest TESTS=15
- - IMAGE=latest TESTS=17
+ - IMAGE=latest
+ - IMAGE=latest TESTS=01
+ - IMAGE=latest TESTS=12
+ - IMAGE=latest TESTS=20
+ - IMAGE=latest TESTS=21
+ - IMAGE=latest TESTS=50
+ - IMAGE=latest TESTS=51
+ - IMAGE=latest TESTS=30
+ - IMAGE=latest TESTS=31
+ - IMAGE=latest TESTS=35
+ - IMAGE=latest TESTS=36
+ - IMAGE=latest TESTS=40
+ - IMAGE=latest TESTS=41
+ - IMAGE=latest TESTS=60
+ - IMAGE=latest TESTS=61
+ - IMAGE=latest TESTS=99
+ - IMAGE=latest TESTS=02
+ - IMAGE=latest TESTS=03
+ - IMAGE=latest TESTS=04
+ - IMAGE=latest TESTS=10
+ - IMAGE=latest TESTS=11
+ - IMAGE=latest TESTS=13
+ - IMAGE=latest TESTS=14
+ - IMAGE=latest TESTS=15
+ - IMAGE=latest TESTS=17
before_script:
- docker pull quay.io/haraldh/dracut-fedora:$IMAGE
@@ -44,12 +44,12 @@ before_script:
script:
## The test container is created with https://github.com/dracutdevs/fedora-container
-- docker run --privileged -it -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS"
+ - docker run --privileged -it -v $(pwd)/:/dracut quay.io/haraldh/dracut-fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS"
notifications:
webhooks:
urls:
- - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e
+ - https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always

View File

@ -1,24 +0,0 @@
From 91418b13dc679947bb4d22ae6badcbf41b56c645 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 12 Mar 2020 13:44:08 +0100
Subject: [PATCH] TEST-03-USR-MOUNT/test.sh: increase loglevel
to debug the spurious fails
---
test/TEST-03-USR-MOUNT/test.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
index 5190f220..3bb479e4 100755
--- a/test/TEST-03-USR-MOUNT/test.sh
+++ b/test/TEST-03-USR-MOUNT/test.sh
@@ -19,7 +19,7 @@ client_run() {
-drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \
-drive format=raw,index=2,media=disk,file=$TESTDIR/result \
-watchdog i6300esb -watchdog-action poweroff \
- -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts loglevel=7 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-initrd $TESTDIR/initramfs.testing
if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/result; then

View File

@ -1,26 +0,0 @@
From 97a931c7d9f8190115893a932f2e10292704cae4 Mon Sep 17 00:00:00 2001
From: Dusty Mabe <dusty@dustymabe.com>
Date: Fri, 13 Mar 2020 15:40:11 -0400
Subject: [PATCH] don't prefer $TMPDIR over --tmpdir
Ability to use `$TMPDIR` was introduced in bc1e69b but
causes the `--tmpdir` option on the command line to be
ignored. Switch to only using `$TMPDIR` if `--tmpdir`
wasn't specified.
---
dracut.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index ab82cbc9..39fa3692 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -765,7 +765,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $dracutbasedir ]] || dracutbasedir=$dracutsysrootdir/usr/lib/dracut
[[ $fw_dir ]] || fw_dir="$dracutsysrootdir/lib/firmware/updates:$dracutsysrootdir/lib/firmware:$dracutsysrootdir/lib/firmware/$kernel"
[[ $tmpdir_l ]] && tmpdir="$tmpdir_l"
-[[ $tmpdir ]] && tmpdir="$TMPDIR"
+[[ $tmpdir ]] || tmpdir="$TMPDIR"
[[ $tmpdir ]] || tmpdir=$dracutsysrootdir/var/tmp
[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
[[ $compress_l ]] && compress=$compress_l

View File

@ -0,0 +1,33 @@
From ea8c9b1c4f39c52fc45788516dea19892cc275f7 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 10 Jun 2021 08:41:30 -0700
Subject: [PATCH] Never enable the bluetooth module by default (#1521)
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
modules.d/62bluetooth/module-setup.sh | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/modules.d/62bluetooth/module-setup.sh b/modules.d/62bluetooth/module-setup.sh
index b8270dd5..fd22670d 100755
--- a/modules.d/62bluetooth/module-setup.sh
+++ b/modules.d/62bluetooth/module-setup.sh
@@ -6,14 +6,7 @@
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed
require_any_binary /usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd || return 1
-
- if [[ $hostonly ]]; then
- # Include by default if a Peripheral (0x500) is found of minor class:
- # * Keyboard (0x40)
- # * Keyboard/pointing (0xC0)
- grep -qiE 'Class=0x[0-9a-f]{3}5[4c]0' /var/lib/bluetooth/*/*/info 2> /dev/null && return 0
- fi
-
+ # disabled until https://github.com/dracutdevs/dracut/issues/1521 is resolved
return 255
}
--
2.32.0.rc2

View File

@ -0,0 +1,93 @@
From f47bcdd7342ca0d46b889e712a1c7446e18434bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 18 Jan 2022 18:08:42 +0100
Subject: [PATCH 1/2] feat(kernel-install): do nothing when
$KERNEL_INSTALL_INITRD_GENERATOR says so
dracut may be installed without being actually used. This is very common in
binary distros where a package may be pulled in through dependencies, even
though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR
is being added in systemd's kernel-install to select which of the possibly many
initrd generation mechanisms will be used.
For backwards compat, if it not set, continue as before. But if set to
something else, skip our kernel-install plugins.
---
install.d/50-dracut.install | 8 +++++++-
install.d/51-dracut-rescue.install | 5 +++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
index 70632ec7f..552fd0338 100755
--- a/install.d/50-dracut.install
+++ b/install.d/50-dracut.install
@@ -6,11 +6,17 @@ BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
-# So, let's skip to create initrd.
+# In this case, do not create the initrd.
if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
exit 0
fi
+# Skip this plugin if we're using a different generator. If nothing is specified,
+# assume we're wanted since we're installed.
+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then
+ exit 0
+fi
+
if [[ -d "$BOOT_DIR_ABS" ]]; then
INITRD="initrd"
else
diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install
index 8bf9a6d95..93483931a 100755
--- a/install.d/51-dracut-rescue.install
+++ b/install.d/51-dracut-rescue.install
@@ -7,6 +7,11 @@ KERNEL_VERSION="$2"
BOOT_DIR_ABS="${3%/*}/0-rescue"
KERNEL_IMAGE="$4"
+# Skip this plugin if we're using a different generator. If nothing is specified,
+# assume we're wanted since we're installed.
+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then
+ exit 0
+fi
dropindirs_sort()
{
From 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 18 Jan 2022 18:58:58 +0100
Subject: [PATCH 2/2] fix(kernel-install): do not generate an initrd when one
was specified
According to the synopsis, kernel-install can be called with an
already-prepared initrd. In that case, no initrd should be generated by dracut.
---
install.d/50-dracut.install | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
index 552fd0338..836251e92 100755
--- a/install.d/50-dracut.install
+++ b/install.d/50-dracut.install
@@ -4,6 +4,7 @@ COMMAND="$1"
KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
+INITRD_OPTIONS_SHIFT=4
# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
# In this case, do not create the initrd.
@@ -27,6 +28,9 @@ fi
ret=0
case "$COMMAND" in
add)
+ # If the initrd was provided on the kernel command line, we shouldn't generate our own.
+ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0
+
INITRD_IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
# we found an initrd at the same place as the kernel

View File

@ -0,0 +1,38 @@
From 5dc6aede4b99f1c76219370660b5b62e935a3cb8 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 20 Dec 2022 13:06:43 +0100
Subject: [PATCH] revert(network-manager): avoid restarting NetworkManager
This reverts commit 77630365aed201a729c73a9ffda0733a75f3fee4.
Its commit message states:
On EL8.3 the NetworkManager keep restarting even if it exits successfully
while waiting for Clevis to unlock. This patch ensures NetworkManager runs
only once in initrd.
Yes; NetworkManager is run multiple times, so that it's able to
configure interfaces that haven't been seen previously (because bus was
slow to scan or device took time to initialize).
It's not clear what problem was the original commit trying to fix.
I suspect there was no problem, just a misunderstanding.
---
modules.d/35network-manager/nm-run.sh | 4 ----
1 file changed, 4 deletions(-)
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
index 7d8d61fa7..14b9cb1ad 100755
--- a/modules.d/35network-manager/nm-run.sh
+++ b/modules.d/35network-manager/nm-run.sh
@@ -2,10 +2,6 @@
type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
-if [ -e /tmp/nm.done ]; then
- return
-fi
-
if [ -z "$DRACUT_SYSTEMD" ]; then
# Only start NM if networking is needed
if [ -e /run/NetworkManager/initrd/neednet ]; then

View File

@ -0,0 +1,23 @@
From 3c871a89c281d9ef4447576e4ea072ce38c65ac0 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Tue, 21 Feb 2023 01:57:50 +0100
Subject: [PATCH] feat(kernel-modules): driver support for macbook keyboards
Discussed in: https://bugzilla.redhat.com/show_bug.cgi?id=2166209
---
modules.d/90kernel-modules/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 9bc4c27ac..5b6df776a 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -55,7 +55,7 @@ installkernel() {
"=drivers/watchdog"
instmods \
- yenta_socket \
+ yenta_socket spi_pxa2xx_platform \
atkbd i8042 firewire-ohci pcmcia hv-vmbus \
virtio virtio_ring virtio_pci pci_hyperv \
"=drivers/pcmcia"

View File

@ -0,0 +1,67 @@
From f6810b69ae722096184eaaf282e12a2caa6928b9 Mon Sep 17 00:00:00 2001
From: Dusty Mabe <dusty@dustymabe.com>
Date: Tue, 21 Feb 2023 22:21:35 -0500
Subject: [PATCH] feat(network): include 98-default-mac-none.link if it exists
In Fedora Linux there was a new 98-default-mac-none.link file added
to set the MACAddressPolicy=none for bond/bridge/team devices. We'd
like for this policy to apply in the initramfs as well. See
- https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
- https://src.fedoraproject.org/rpms/systemd/pull-request/100#
---
modules.d/01systemd-networkd/module-setup.sh | 1 +
modules.d/35network-legacy/module-setup.sh | 6 ++++--
modules.d/35network-manager/module-setup.sh | 6 ++++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh
index 27d90101..46033549 100755
--- a/modules.d/01systemd-networkd/module-setup.sh
+++ b/modules.d/01systemd-networkd/module-setup.sh
@@ -44,6 +44,7 @@ install() {
"$systemdnetwork"/80-container-vz.network \
"$systemdnetwork"/80-vm-vt.network \
"$systemdnetwork"/80-wifi-adhoc.network \
+ "$systemdnetwork"/98-default-mac-none.link \
"$systemdnetwork"/99-default.link \
"$systemdsystemunitdir"/systemd-networkd.service \
"$systemdsystemunitdir"/systemd-networkd.socket \
diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh
index 868ea8fc..a42f5797 100755
--- a/modules.d/35network-legacy/module-setup.sh
+++ b/modules.d/35network-legacy/module-setup.sh
@@ -23,9 +23,11 @@ installkernel() {
install() {
local _arch
- #Adding default link
+ # Adding default link and (if exists) 98-default-mac-none.link
if dracut_module_included "systemd"; then
- inst_multiple -o "${systemdnetwork}/99-default.link"
+ inst_multiple -o \
+ "${systemdnetwork}/99-default.link" \
+ "${systemdnetwork}/98-default-mac-none.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
fi
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
index c5d568f0..6e6cd6cf 100755
--- a/modules.d/35network-manager/module-setup.sh
+++ b/modules.d/35network-manager/module-setup.sh
@@ -51,8 +51,10 @@ install() {
inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
- # Adding default link
- inst_multiple -o "${systemdnetwork}/99-default.link"
+ # Adding default link and (if exists) 98-default-mac-none.link
+ inst_multiple -o \
+ "${systemdnetwork}/99-default.link" \
+ "${systemdnetwork}/98-default-mac-none.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
--
2.39.2

View File

@ -0,0 +1,26 @@
From 0e780720efe6488c4e07af39926575ee12f40339 Mon Sep 17 00:00:00 2001
From: Laszlo Gombos <laszlo.gombos@gmail.com>
Date: Fri, 24 Feb 2023 01:57:19 +0000
Subject: [PATCH] fix(dmsquash-live): restore compatibility with earlier
releases
Follow-up to 40dd5c90e0efcb9ebaa9abb42a38c7316e9706bd .
---
modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
index 62d1b5e7c..a98e258c2 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -403,6 +403,10 @@ fi
ROOTFLAGS="$(getarg rootflags)"
+if [ "$overlayfs" = required ]; then
+ echo "rd.live.overlay.overlayfs=1" > /etc/cmdline.d/dmsquash-need-overlay.conf
+fi
+
if [ -n "$overlayfs" ]; then
if [ -n "$FSIMG" ]; then
mkdir -m 0755 -p /run/rootfsbase

View File

@ -0,0 +1,28 @@
From 6fb0f4b4d54eeb1b1e89c06cc54bdcab504138da Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Fri, 24 Feb 2023 19:19:59 +0100
Subject: [PATCH] fix(dracut.sh): kmoddir does not handle trailing /
Fixes https://github.com/dracutdevs/dracut/issues/2236
+(/) only works in bash interactive mode. Using any non-interactive
bash run simply doesn't remove anything.
The solution is copied from dracut-lib.sh, trim().
---
dracut.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index 1aa3f8e1f..0c0f85c2d 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1033,7 +1033,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
((stdloglvl < 0)) && stdloglvl=0
[[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l
-drivers_dir="${drivers_dir%%+(/)}"
+drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}"
[[ $do_strip_l ]] && do_strip=$do_strip_l
[[ $do_strip ]] || do_strip=yes
[[ $aggressive_strip_l ]] && aggressive_strip=$aggressive_strip_l

View File

@ -5,87 +5,73 @@
# strip the automatically generated dep here and instead co-own the
# directory.
%global __requires_exclude pkg-config
%define dist_free_release 26.git20200316
# rpmdev-bumpspec and releng automation compatible variable
%global baserelease 5
Name: dracut
Version: 050
Release: %{dist_free_release}%{?dist}
Version: 059
Release: %{baserelease}%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
Group: System Environment/Base
%endif
%if 0%{?suse_version}
Group: System/Base
%endif
# The entire source code is GPLv2+
# except install/* which is LGPLv2+
License: GPLv2+ and LGPLv2+
# except util/* which is GPLv2
License: GPLv2+ and LGPLv2+ and GPLv2
URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
Patch1: 0001.patch
Patch2: 0002.patch
Patch3: 0003.patch
Patch4: 0004.patch
Patch5: 0005.patch
Patch6: 0006.patch
Patch7: 0007.patch
Patch8: 0008.patch
Patch9: 0009.patch
Patch10: 0010.patch
Patch11: 0011.patch
Patch12: 0012.patch
Patch13: 0013.patch
Patch14: 0014.patch
Patch15: 0015.patch
Patch16: 0016.patch
Patch17: 0017.patch
Patch18: 0018.patch
Patch19: 0019.patch
Patch20: 0020.patch
Patch21: 0021.patch
Patch22: 0022.patch
Patch23: 0023.patch
Patch24: 0024.patch
Patch25: 0025.patch
Source0: https://github.com/dracutdevs/dracut/archive/refs/tags/%{version}.tar.gz
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
# Never auto-enable bluetooth module (but it can be manually included
# for debugging) - workaround for RHBZ #1964879.
# https://github.com/dracutdevs/dracut/pull/1521
Patch1: 1521-Never-enable-the-bluetooth-module-by-default.patch
# Skip creating initrd when initrd already provided,
# or different generator is configured
# https://github.com/dracutdevs/dracut/pull/1825/
Patch2: 1825-Skip-creating-initrd-when-initrd-is-provided.patch
# Add kernel module with support for macbook keyboards
# https://github.com/dracutdevs/dracut/pull/2218
Patch3: 2218-add-module-driver-support-for-macbook-keyboards.patch
# fix(dmsquash-live): restore compatibility with earlier releases
# https://github.com/dracutdevs/dracut/pull/2233/
# https://bugzilla.redhat.com/show_bug.cgi?id=2172269
Patch4: 2233-dmsquash-live-restore-compatibility.patch
# Fix: dracut --kmoddir fails on paths with traling /
# https://bugzilla.redhat.com/show_bug.cgi?id=2173100
Patch5: 2237-kmoddir-fix-trailing-forwardslash-handling.patch
# revert(network-manager): avoid restarting NetworkManager
# https://github.com/dracutdevs/dracut/pull/2134
Patch6: 2134-revert-avoid-restarting-NetworkManager.patch
# Support MACAddressPolicy=none for bond/bridge/team devices
# https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none
# https://github.com/dracutdevs/dracut/pull/2224
Patch7: 2224-network-include-default-mac-none-link.patch
BuildRequires: bash
BuildRequires: git
BuildRequires: git-core
BuildRequires: pkgconfig(libkmod) >= 23
BuildRequires: gcc
%if 0%{?fedora} || 0%{?rhel}
BuildRequires: pkgconfig
BuildRequires: systemd
%endif
%if 0%{?fedora}
BuildRequires: bash-completion
%endif
%if %{with doc}
%if 0%{?fedora} || 0%{?rhel}
BuildRequires: docbook-style-xsl docbook-dtds libxslt
%endif
%if 0%{?suse_version}
BuildRequires: docbook-xsl-stylesheets libxslt
%endif
BuildRequires: asciidoc
%endif
%if 0%{?suse_version} > 9999
Obsoletes: mkinitrd < 2.6.1
Provides: mkinitrd = 2.6.1
%endif
Obsoletes: dracut-fips <= 047
Provides: dracut-fips = %{version}-%{release}
Obsoletes: dracut-fips-aesni <= 047
@ -102,29 +88,21 @@ Requires: sed
Requires: xz
Requires: gzip
%if 0%{?fedora} || 0%{?rhel}
Recommends: memstrack
Recommends: hardlink
Recommends: pigz
Recommends: kpartx
Recommends: (tpm2-tools if tpm2-tss)
Requires: util-linux >= 2.21
Requires: systemd >= 219
Requires: systemd-udev >= 219
Requires: procps-ng
%else
Requires: hardlink
Requires: gzip
Requires: kpartx
Requires: udev > 166
Requires: util-linux-ng >= 2.21
%endif
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Requires: libkcapi-hmaccalc
%endif
%description
dracut contains tools to create bootable initramfses for the Linux
kernel. Unlike previous implementations, dracut hard-codes as little
kernel. Unlike other implementations, dracut hard-codes as little
as possible into the initramfs. dracut contains various modules which
are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS
is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network
@ -132,15 +110,7 @@ package.
%package network
Summary: dracut modules to build a dracut initramfs with network support
%if 0%{?_module_build}
# In the module-build-service, we have pieces of dracut provided by different
# modules ("base-runtime" provides most functionality, but we need
# dracut-network in "installer". Since these two modules build with separate
# dist-tags, we need to reduce this strict requirement to ignore the dist-tag.
Requires: %{name} >= %{version}-%{dist_free_release}
%else
Requires: %{name} = %{version}-%{release}
%endif
Requires: iputils
Requires: iproute
Requires: (NetworkManager >= 1.20 or dhclient)
@ -163,17 +133,10 @@ initramfs with dracut, which drops capabilities.
%package live
Summary: dracut modules to build a dracut initramfs with live image capabilities
%if 0%{?_module_build}
# See the network subpackage comment.
Requires: %{name} >= %{version}-%{dist_free_release}
%else
Requires: %{name} = %{version}-%{release}
%endif
Requires: %{name}-network = %{version}-%{release}
Requires: tar gzip coreutils bash device-mapper curl
%if 0%{?fedora}
Requires: tar gzip coreutils bash device-mapper curl parted
Requires: fuse ntfs-3g
%endif
%description live
This package requires everything which is needed to build an
@ -228,11 +191,10 @@ cp %{SOURCE1} .
%endif
${NULL}
make %{?_smp_mflags}
%make_build
%install
make %{?_smp_mflags} install \
DESTDIR=$RPM_BUILD_ROOT \
%make_install %{?_smp_mflags} \
libdir=%{_prefix}/lib
echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh
@ -241,20 +203,12 @@ echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dr
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips
%endif
%if %{defined _unitdir}
# for systemd, better use systemd-bootchart
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
%endif
# we do not support dash in the initramfs
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash
# we do not support mksh in the initramfs
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00mksh
# remove gentoo specific modules
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
%if %{defined _unitdir}
# with systemd IMA and selinux modules do not make sense
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
@ -282,46 +236,23 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock
mkdir -p $RPM_BUILD_ROOT/boot/dracut
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs
%if 0%{?fedora} || 0%{?rhel}
install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf
%endif
%if 0%{?suse_version}
install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf
%else
rm -f $RPM_BUILD_ROOT%{_mandir}/man?/*suse*
%endif
%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999
rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd
rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
rm -f -- $RPM_BUILD_ROOT%{_mandir}/man8/mkinitrd.8*
rm -f -- $RPM_BUILD_ROOT%{_mandir}/man1/lsinitrd.1*
%endif
echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
%endif
%files
%if %{with doc}
%doc README.md HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
%doc README.md docs/HACKING.md AUTHORS NEWS.md dracut.html docs/dracut.png docs/dracut.svg
%endif
%{!?_licensedir:%global license %%doc}
%license COPYING lgpl-2.1.txt
%{_bindir}/dracut
%{_datadir}/bash-completion/completions/dracut
%{_datadir}/bash-completion/completions/lsinitrd
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
%{_bindir}/mkinitrd
%{_bindir}/lsinitrd
%endif
%dir %{dracutlibdir}
%dir %{dracutlibdir}/modules.d
%{dracutlibdir}/dracut-functions.sh
@ -331,11 +262,10 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/dracut-logger.sh
%{dracutlibdir}/dracut-initramfs-restore
%{dracutlibdir}/dracut-install
%{dracutlibdir}/dracut-util
%{dracutlibdir}/skipcpio
%config(noreplace) %{_sysconfdir}/dracut.conf
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
%{dracutlibdir}/dracut.conf.d/01-dist.conf
%endif
%dir %{_sysconfdir}/dracut.conf.d
%dir %{dracutlibdir}/dracut.conf.d
%dir %{_datadir}/pkgconfig
@ -344,13 +274,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%if %{with doc}
%{_mandir}/man8/dracut.8*
%{_mandir}/man8/*service.8*
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
%{_mandir}/man8/mkinitrd.8*
%{_mandir}/man1/lsinitrd.1*
%endif
%if 0%{?suse_version}
%{_mandir}/man8/mkinitrd-suse.8*
%endif
%{_mandir}/man7/dracut.kernel.7*
%{_mandir}/man7/dracut.cmdline.7*
%{_mandir}/man7/dracut.modules.7*
@ -358,29 +282,56 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{_mandir}/man5/dracut.conf.5*
%endif
%if %{undefined _unitdir}
%{dracutlibdir}/modules.d/00bootchart
%endif
%{dracutlibdir}/modules.d/00bash
%{dracutlibdir}/modules.d/00systemd
%{dracutlibdir}/modules.d/00systemd-network-management
%ifnarch s390 s390x
%{dracutlibdir}/modules.d/00warpclock
%endif
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
%{dracutlibdir}/modules.d/01fips
%endif
%{dracutlibdir}/modules.d/01systemd-ac-power
%{dracutlibdir}/modules.d/01systemd-ask-password
%{dracutlibdir}/modules.d/01systemd-coredump
%{dracutlibdir}/modules.d/01systemd-hostnamed
%{dracutlibdir}/modules.d/01systemd-initrd
%{dracutlibdir}/modules.d/01systemd-integritysetup
%{dracutlibdir}/modules.d/01systemd-journald
%{dracutlibdir}/modules.d/01systemd-ldconfig
%{dracutlibdir}/modules.d/01systemd-modules-load
%{dracutlibdir}/modules.d/01systemd-pcrphase
%{dracutlibdir}/modules.d/01systemd-portabled
%{dracutlibdir}/modules.d/01systemd-pstore
%{dracutlibdir}/modules.d/01systemd-repart
%{dracutlibdir}/modules.d/01systemd-resolved
%{dracutlibdir}/modules.d/01systemd-rfkill
%{dracutlibdir}/modules.d/01systemd-sysext
%{dracutlibdir}/modules.d/01systemd-sysctl
%{dracutlibdir}/modules.d/01systemd-sysusers
%{dracutlibdir}/modules.d/01systemd-timedated
%{dracutlibdir}/modules.d/01systemd-timesyncd
%{dracutlibdir}/modules.d/01systemd-tmpfiles
%{dracutlibdir}/modules.d/01systemd-udevd
%{dracutlibdir}/modules.d/01systemd-veritysetup
%{dracutlibdir}/modules.d/03modsign
%{dracutlibdir}/modules.d/03rescue
%{dracutlibdir}/modules.d/04watchdog
%{dracutlibdir}/modules.d/04watchdog-modules
%{dracutlibdir}/modules.d/05busybox
%{dracutlibdir}/modules.d/06dbus-broker
%{dracutlibdir}/modules.d/06dbus-daemon
%{dracutlibdir}/modules.d/06rngd
%{dracutlibdir}/modules.d/09dbus
%{dracutlibdir}/modules.d/10i18n
%{dracutlibdir}/modules.d/30convertfs
%{dracutlibdir}/modules.d/45url-lib
%{dracutlibdir}/modules.d/50drm
%{dracutlibdir}/modules.d/50plymouth
%{dracutlibdir}/modules.d/62bluetooth
%{dracutlibdir}/modules.d/80lvmmerge
%{dracutlibdir}/modules.d/80lvmthinpool-monitor
%{dracutlibdir}/modules.d/80test
%{dracutlibdir}/modules.d/80test-makeroot
%{dracutlibdir}/modules.d/80test-root
%{dracutlibdir}/modules.d/90btrfs
%{dracutlibdir}/modules.d/90crypt
%{dracutlibdir}/modules.d/90dm
@ -391,19 +342,25 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/90mdraid
%{dracutlibdir}/modules.d/90multipath
%{dracutlibdir}/modules.d/90nvdimm
%{dracutlibdir}/modules.d/90stratis
%{dracutlibdir}/modules.d/90overlayfs
%{dracutlibdir}/modules.d/90ppcmac
%{dracutlibdir}/modules.d/90qemu
%{dracutlibdir}/modules.d/91crypt-gpg
%{dracutlibdir}/modules.d/91crypt-loop
%{dracutlibdir}/modules.d/91fido2
%{dracutlibdir}/modules.d/91pcsc
%{dracutlibdir}/modules.d/91pkcs11
%{dracutlibdir}/modules.d/91tpm2-tss
%{dracutlibdir}/modules.d/95debug
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95lunmask
%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
%{dracutlibdir}/modules.d/95virtfs
%{dracutlibdir}/modules.d/95virtiofs
%ifarch s390 s390x
%{dracutlibdir}/modules.d/80cms
%{dracutlibdir}/modules.d/81cio_ignore
@ -429,12 +386,13 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{dracutlibdir}/modules.d/98syslog
%{dracutlibdir}/modules.d/98usrmount
%{dracutlibdir}/modules.d/99base
%{dracutlibdir}/modules.d/99memstrack
%{dracutlibdir}/modules.d/99fs-lib
%{dracutlibdir}/modules.d/99shutdown
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
%dir %{_sharedstatedir}/initramfs
%if %{defined _unitdir}
%{_unitdir}/dracut-shutdown.service
%{_unitdir}/dracut-shutdown-onfailure.service
%{_unitdir}/sysinit.target.wants/dracut-shutdown.service
%{_unitdir}/dracut-cmdline.service
%{_unitdir}/dracut-initqueue.service
@ -454,9 +412,11 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%{_prefix}/lib/kernel/install.d/50-dracut.install
%files network
%{dracutlibdir}/modules.d/02systemd-networkd
%{dracutlibdir}/modules.d/01systemd-networkd
%{dracutlibdir}/modules.d/35connman
%{dracutlibdir}/modules.d/35network-manager
%{dracutlibdir}/modules.d/35network-legacy
%{dracutlibdir}/modules.d/35network-wicked
%{dracutlibdir}/modules.d/40network
%{dracutlibdir}/modules.d/45ifcfg
%{dracutlibdir}/modules.d/90kernel-network-modules
@ -479,6 +439,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%files live
%{dracutlibdir}/modules.d/99img-lib
%{dracutlibdir}/modules.d/90dmsquash-live
%{dracutlibdir}/modules.d/90dmsquash-live-autooverlay
%{dracutlibdir}/modules.d/90dmsquash-live-ntfs
%{dracutlibdir}/modules.d/90livenet
@ -501,12 +462,149 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
%files config-rescue
%{dracutlibdir}/dracut.conf.d/02-rescue.conf
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%if 0%{?fedora} <= 30 || 0%{?rhel} <= 8
# FIXME: remove after F30
%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
%endif
%changelog
* Tue Mar 14 2023 Dusty Mabe <dusty@dustymabe.com> - 059-5
- feat(network): include 98-default-mac-none.link if it exists
* Thu Mar 09 2023 Pavel Valena <pvalena@redhat.com> - 059-4
- fix(dmsquash-live): restore compatibility with earlier releases
- Re-add overlayfs module (drop patch 1934)
- revert(network-manager): avoid restarting NetworkManager
* Fri Feb 24 2023 Pavel Valena <pvalena@redhat.com> - 059-3
- fix(dracut.sh): handle --kmoddir with trailing /
* Tue Feb 21 2023 Pavel Valena <pvalena@redhat.com> - 059-2
- Revert: PR#1934 add overlayfs module
* Mon Feb 13 2023 Pavel Valena <pvalena@redhat.com> - 059-1
- Update to 059
- feat(dracut.sh): option to skip creating initrd
- feat(kernel-modules): driver support for macbook keyboards
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 057-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sun Nov 13 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 057-5
- Backport fix to add sysctl to initramfs to handle modprobe files
* Sat Oct 15 2022 Neal Gompa <ngompa@datto.com> - 057-4
- Backport dmsquash-live-autooverlay module
* Thu Aug 25 2022 Pavel Valena <pvalena@redhat.com> - 057-3
- Re-add patch Never-enable-the-bluetooth-module-by-default-1521
- Recommend tpm2-tools package, as it's required by crypt module
* Tue Aug 16 2022 Pavel Valena <pvalena@redhat.com> - 057-2
- dmsquash-live-root: Run checkisomd5 on correct device
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 057-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 18 2022 Pavel Valena <pvalena@redhat.com> - 057-1
- Update to 057
* Tue Apr 19 2022 Kevin Fenzi <kevin@scrye.com> - 056-2
- Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes
* Thu Mar 03 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 056-1
- Update to 056
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 055-8.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Dec 20 2021 Hans de Goede <hdegoede@redhat.com> - 055-8
- Backport upstream changes for drm-privacy screen support in kernel >= 5.17
* Thu Nov 4 2021 Jeremy Linton <jeremy.linton@arm.com> - 055-7
- Backport Upstream: 15398458 fix(90kernel-modules): add isp1760 USB controller
* Tue Oct 26 2021 Olivier Lemasle <o.lemasle@gmail.com> - 055-6
- Backport PR #1611 to fix network manager when console is not usable
* Mon Oct 18 2021 Adam Williamson <awilliam@redhat.com> - 055-5
- Backport PR #1584 to fix missing block drivers, boot in EC2 (#2010058)
* Wed Oct 06 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 055-4
- Add USB Type-C to fix display/input/storage attached via it (rhbz #1964218)
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 055-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jul 09 2021 Dusty Mabe <dusty@dustymabe.com> - 055-3
- Fixes for NM running via systemd+dbus in the initramfs
- Drop requirement on deprecated systemd-udev-settle
* Thu Jun 10 2021 Adam Williamson <awilliam@redhat.com> - 055-2
- Never include bluetooth module by default (rhbz 1964879) (workaround)
* Thu May 27 2021 Harald Hoyer <harald@redhat.com> - 055-1
- version 055
- install the missing fsck utils
* Fri May 21 2021 Harald Hoyer <harald@redhat.com> - 054-12.git20210521
- fix `get_maj_min` for kdump
- suppress hardlink output
- sane default --kerneldir for dracut-install
- squash: don't mount the mount points if already mounted
* Tue May 18 2021 Harald Hoyer <harald@redhat.com> - 054-6.git20210518
- fix for `str_replace: command not found`
* Mon May 17 2021 Harald Hoyer <harald@redhat.com> - 054-4.git20210517
- version 054
* Thu Apr 22 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 053-5
- Backport: fix(90kernel-modules): add watchdog drivers for generic initrd (rhbz 1592148)
* Mon Apr 19 2021 Dusty Mabe <dusty@dustymabe.com> - 053-4
- Backport: fix(dracut-logger.sh): double dash trigger unknown logger warnings during run
- Backport: fix(network-manager): nm-run.service: don't kill forked processes
- Backport: fix(network-manager): only run NetworkManager if rd.neednet=1
- Backport: fix(network-manager): use /run/NetworkManager/initrd/neednet in initqueue
* Mon Apr 19 2021 Adam Williamson <awilliam@redhat.com> - 053-3
- Fix removal of key system files when kdump enabled (thanks kasong) (#1936781)
* Thu Apr 08 2021 Adam Williamson <awilliam@redhat.com> - 053-2
- Backport upstream change reported to fix boot on some encrypted LVM setups (#1946074)
* Tue Feb 23 2021 Harald Hoyer <harald@redhat.com> - 053-1
- version 053
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 051-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Dec 15 2020 Harald Hoyer <harald@redhat.com> - 051-1
- version 051
* Tue Oct 06 2020 Harald Hoyer <harald@redhat.com> - 050-167.git20201006
- git snapshot
* Fri Oct 02 2020 Harald Hoyer <harald@redhat.com> - 050-157.git20201002
- git snapshot
* Tue Sep 29 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 050-63.git20200529
- Fixes for Arm GPUs in early boot
* Fri Sep 25 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 050-62.git20200529
- Fix for Rockchip devices
* Wed Aug 19 2020 Merlin Mathesius <mmathesi@redhat.com> - 050-61.git20200529.3
- Correct conditionals to drop 51-dracut-rescue-postinst.sh for Fedora and
recent RHEL releases
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 050-61.git20200529.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 050-61.git20200529.1
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Fri May 29 2020 Harald Hoyer <harald@redhat.com> - 050-61.git20200529
- git snapshot
* Mon Mar 16 2020 Harald Hoyer <harald@redhat.com> - 050-26.git20200316
- fixed `--tmpdir` mishandling

77
newdracut.sh Normal file → Executable file
View File

@ -1,17 +1,82 @@
#!/bin/bash
#!/usr/bin/bash
if [[ -f "$HOME/git/dracut/$1" ]]; then
bash -n "$0" || exit 1
shopt -s extglob
patchnr() {
local nr
while [[ -n "$1" ]]; do
nr=$(cut -d'.' -f1 <<< "$1")
shift
[[ $((10#$nr)) -gt 0 ]] || echo "Invalid patch number: $nr" >&2
echo "$nr"
done
}
if [[ -e "$HOME/git/dracut/$1" ]]; then
srcrpm="$HOME/git/dracut/$1"
elif [[ -e "$HOME/dev/upstream/dracut/$1" ]]; then
srcrpm="$HOME/dev/upstream/dracut/$1"
else
srcrpm="$1"
fi
[[ -f $srcrpm ]] || exit 0
[[ -f $srcrpm ]] || exit 3
old_release=$(rpmspec -D "_sourcedir $(pwd)" -q --srpm --qf '%{release}' dracut.spec)
old_release=${old_release%%.*}
cp dracut.spec dracut.spec.old
for i in *.patch; do git rm -f $i;done
rm *.patch; git reset --hard HEAD
last_patch_nr=$(patchnr *.patch | sort -n | tail -n 1)
last_patch_nr=${last_patch_nr:-0000}
#for i in *.patch; do git rm -f $i;done
if rpm -ivh --define "_srcrpmdir $PWD" --define "_specdir $PWD" --define "_sourcedir $PWD" "$srcrpm"; then
ls *.patch &>/dev/null && git add *.patch
perl -n -e 'if ($do_print) {print "$_" ;}; if (/^%changelog/) { $do_print=1; }' < dracut.spec.old >> dracut.spec
for nr in $(patchnr *.patch); do
[[ $((10#$nr)) -gt $((10#$last_patch_nr)) ]] && git add "${nr}.patch"
done
new_version=$(rpmspec -D "_sourcedir $(pwd)" -q --srpm --qf '%{version}' dracut.spec)
new_release=$(rpmspec -D "_sourcedir $(pwd)" -q --srpm --qf '%{release}' dracut.spec)
new_release_full=${new_release%.*}
new_release=${new_release%%.*}
do_print=""
while IFS=$'\n' read -r line
do
if [ -z "$do_print" ] && [ "$line" = "%changelog" ]; then
do_print="yes"
echo "* $(LANG='C' date '+%a %b %d %Y') $(git config user.name) <$(git config user.email)> - ${new_version}-${new_release_full}"
for ((i=old_release; i<new_release; i++)); do
subject=$(grep '^Subject: ' +(0)$i.patch | head -1)
if [ -n "$subject" ]; then
echo "-${subject#*\[PATCH\]}"
fi
done
echo
elif [ -n "$do_print" ]; then
echo "$line"
fi
done < dracut.spec.old >> dracut.spec
# Patch list:
# ls *.patch | tr -s ' ' '\n' | cut -d'.' -f1 | xargs -i zsh -c "nr=\$((10#{})); echo \"Patch\${nr}: {}.patch\""
git add dracut.spec
msg="Resolves: $(
for ((i=old_release; i<new_release; i++)); do
resolves=$(grep '^Resolves: ' +(0)$i.patch | head -1)
if [ -n "$resolves" ]; then
echo "${resolves#Resolves: }"
fi
done | sed -e 's/rhbz#/#/g' | sort -u | tr -s '\n' ',')"
git commit -m "$(echo -e "dracut-${new_version}-${new_release_full}\n\n${msg%,}")"
fi

View File

@ -1 +1 @@
SHA512 (dracut-050.tar.xz) = 9d9a66acfd6b9d2fd50855a59a2393e0602c2ef97119db046f68d6167ea84d1423fa465b8b4d96339febb38d5a96df26dec7862c4b3397c3d726db18d280eee4
SHA512 (059.tar.gz) = 196bc8bf18703c72bffb51a7e0493719c58173ad2da7d121eb42f9a8de47e953af36d109214dc4a10b2dc2d3bd19e844f7f51c2bdec087e064ea11f75124032d