diff --git a/0006.patch b/0006.patch new file mode 100644 index 0000000..ff7d7a5 --- /dev/null +++ b/0006.patch @@ -0,0 +1,65 @@ +From c1dee82d80d1b4d76a476d822cdf817686da7ebb Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Tue, 19 Jul 2022 16:42:59 +0200 +Subject: [PATCH] ci: fix branch to run integration tests in + +--- + .github/workflows/container.yml | 2 +- + .github/workflows/differential-shellcheck.yml | 2 +- + .github/workflows/integration.yml | 2 +- + .github/workflows/lint.yml | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml +index 99d57f5b..82d7a097 100644 +--- a/.github/workflows/container.yml ++++ b/.github/workflows/container.yml +@@ -8,7 +8,7 @@ on: + - 'test/container/**' + - '.github/workflows/container.yml' + pull_request: +- branches: [ main new-main ] ++ branches: [ main ] + paths: + - 'test/container/**' + - '.github/workflows/container.yml' +diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml +index c4b05fad..63a022bf 100644 +--- a/.github/workflows/differential-shellcheck.yml ++++ b/.github/workflows/differential-shellcheck.yml +@@ -1,7 +1,7 @@ + name: Differential ShellCheck + on: + pull_request: +- branches: [ main new-main ] ++ branches: [ main ] + + jobs: + test: +diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml +index aa354e3e..82d01457 100644 +--- a/.github/workflows/integration.yml ++++ b/.github/workflows/integration.yml +@@ -2,7 +2,7 @@ name: Integration Test + + on: + pull_request: +- branches: [ main new-main ] ++ branches: [ main ] + + jobs: + basic: +diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml +index 5e3a299f..f6778a65 100644 +--- a/.github/workflows/lint.yml ++++ b/.github/workflows/lint.yml +@@ -4,7 +4,7 @@ on: + push: + branches: [ main ] + pull_request: +- branches: [ main new-main ] ++ branches: [ main ] + + jobs: + lint-c: + diff --git a/0007.patch b/0007.patch new file mode 100644 index 0000000..fc854bc --- /dev/null +++ b/0007.patch @@ -0,0 +1,42 @@ +From d754571fea528af061db46a0284e996d012f14c9 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Tue, 19 Jul 2022 17:06:25 +0200 +Subject: [PATCH] ci: run integration tests only on C9s + +--- + .github/workflows/container.yml | 4 ---- + .github/workflows/integration.yml | 3 --- + 2 files changed, 7 deletions(-) + +diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml +index 82d7a097..34038f57 100644 +--- a/.github/workflows/container.yml ++++ b/.github/workflows/container.yml +@@ -28,11 +28,7 @@ jobs: + fail-fast: false + matrix: + config: +- - { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' } +- - { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' } +- - { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' } + - { dockerfile: 'Dockerfile-CentOS-9-Stream', tag: 'centos:stream9' } +- - { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' } + steps: + - name: Check out the repo + uses: actions/checkout@v2 +diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml +index 82d01457..40da300c 100644 +--- a/.github/workflows/integration.yml ++++ b/.github/workflows/integration.yml +@@ -14,10 +14,7 @@ jobs: + strategy: + matrix: + container: [ +- "arch:latest", +- "debian:latest", + "fedora:latest", +- "opensuse:latest", + ] + test: [ + "04", + diff --git a/0008.patch b/0008.patch new file mode 100644 index 0000000..942000e --- /dev/null +++ b/0008.patch @@ -0,0 +1,29 @@ +From 263b9095200cf277db3bff4753b06306175b1534 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Thu, 21 Jul 2022 17:40:20 +0200 +Subject: [PATCH] fix(dracut.sh): do not fail on irregular files + +If file is not a regular file (test -f), dracut.sh fails, +which is unexpected change of behaviour. +The workaround would be to create an empty file. + +rhel-only +Fixes: #1835 +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index a1ea1bc3..210a8275 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -905,7 +905,7 @@ if [[ -z $conffile ]]; then + else + conffile="$dracutsysrootdir/etc/dracut.conf" + fi +-elif [[ ! -f $conffile ]]; then ++elif [[ ! -e $conffile ]]; then + printf "%s\n" "dracut: Configuration file '$conffile' not found." >&2 + exit 1 + fi + diff --git a/0009.patch b/0009.patch new file mode 100644 index 0000000..9dc2952 --- /dev/null +++ b/0009.patch @@ -0,0 +1,61 @@ +From 96116c784edda6675c80fdf95823188c72b28652 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 18 Jul 2022 16:29:27 +0200 +Subject: [PATCH] fix(98dracut-systemd): partly revert "emergency mode: use + sulogin" + +Partly reverts 32f68c1f9ac3720e8ce4b95a09c0ce680d5da786 +In RHEL we don't want to have a password to log in into emergency mode. + +RHEL-only + +Resolves: #2057365 +--- + modules.d/98dracut-systemd/dracut-emergency.sh | 2 +- + modules.d/98dracut-systemd/module-setup.sh | 2 -- + modules.d/99base/module-setup.sh | 8 ++------ + 3 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh +index c6637a5c..48062f49 100755 +--- a/modules.d/98dracut-systemd/dracut-emergency.sh ++++ b/modules.d/98dracut-systemd/dracut-emergency.sh +@@ -34,7 +34,7 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + done < /proc/consoles + [ -f /etc/profile ] && . /etc/profile + [ -z "$PS1" ] && export PS1="$_name:\${PWD}# " +- exec sulogin -e ++ exec sh -i -l + else + export hook="shutdown-emergency" + warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." +diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh +index b7da86db..6fb26efa 100755 +--- a/modules.d/98dracut-systemd/module-setup.sh ++++ b/modules.d/98dracut-systemd/module-setup.sh +@@ -51,6 +51,4 @@ install() { + done + + inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" +- +- inst_multiple sulogin + } +diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh +index 10a44d91..3fa2659a 100755 +--- a/modules.d/99base/module-setup.sh ++++ b/modules.d/99base/module-setup.sh +@@ -30,12 +30,8 @@ install() { + fi + + # add common users in /etc/passwd, it will be used by nfs/ssh currently +- # use password for hostonly images to facilitate secure sulogin in emergency console +- [[ $hostonly ]] && pwshadow='x' +- grep '^root:' "$initdir/etc/passwd" 2> /dev/null || echo "root:$pwshadow:0:0::/root:/bin/sh" >> "$initdir/etc/passwd" +- grep '^nobody:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd" +- +- [[ $hostonly ]] && grep '^root:' "$dracutsysrootdir"/etc/shadow >> "$initdir/etc/shadow" ++ grep '^root:' "$initdir/etc/passwd" 2> /dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd" ++ grep '^nobody:' /etc/passwd >> "$initdir/etc/passwd" + + # install our scripts and hooks + inst_script "$moddir/init.sh" "/init" diff --git a/dracut.spec b/dracut.spec index bbe9e79..fc871f9 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 6.git20220718 +%define dist_free_release 10.git20220721 Name: dracut Version: 057 @@ -34,6 +34,10 @@ Patch2: 0002.patch Patch3: 0003.patch Patch4: 0004.patch Patch5: 0005.patch +Patch6: 0006.patch +Patch7: 0007.patch +Patch8: 0008.patch +Patch9: 0009.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -491,6 +495,10 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Thu Jul 21 2022 Pavel Valena - 057-10.git20220721 +- fix(dracut.sh): do not fail on irregular files +- fix(98dracut-systemd): partly revert "emergency mode: use + * Mon Jul 18 2022 Pavel Valena - 057-6.git20220718 - Upgrade to Dracut version 057