diff --git a/.dracut.metadata b/.dracut.metadata index a463fbe..407d365 100644 --- a/.dracut.metadata +++ b/.dracut.metadata @@ -1 +1 @@ -5b8bfb4e333dd5de1e4a4ce8562abb813d9093fc SOURCES/dracut-055.tar.xz +20a52ee200099c22550e344dc041590dd570c896 SOURCES/dracut-057.tar.xz diff --git a/.gitignore b/.gitignore index 896f693..2bcde2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dracut-055.tar.xz +SOURCES/dracut-057.tar.xz diff --git a/SOURCES/0001.patch b/SOURCES/0001.patch index 126a5a5..24ac538 100644 --- a/SOURCES/0001.patch +++ b/SOURCES/0001.patch @@ -1,474 +1,270 @@ -From 0cdd05ba6644ef6215e4cfa83e1759f7059b5d6d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= -Date: Mon, 7 Jun 2021 14:02:29 +0200 -Subject: [PATCH] Merge pull request #1 from mrc0mmand/ci-config +From b13e8ee2caaa84046e25a73e52dedb9c0f5c57a3 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Tue, 12 Jul 2022 14:12:04 +0200 +Subject: [PATCH] ci: all layered RHEL-9 changes -CI configuration + - previous downstream changes + - use dracut.spec as submitted in the PR + - sync selected changes from upstream + - add new-main for pull-requests temporarily + +rhel-only +Related: #2066816 --- - .github/labeler.yml | 293 ------------------------------------------- - .github/stale.yml | 21 ---- - .github/workflows/labels.yml | 11 -- - .github/workflows/pr.yml | 19 --- - .packit.yml | 72 +++++------ - 5 files changed, 31 insertions(+), 385 deletions(-) + .github/workflows/container.yml | 7 ++-- + .github/workflows/differential-shellcheck.yml | 19 ++++++++++ + .github/workflows/integration.yml | 47 ++++++++++++++++++++++-- + .github/workflows/lint.yml | 4 +- + .packit.yml | 36 ++++++++++++++++++ + test/container/Dockerfile-CentOS-9-Stream | 53 +++++++++++++++++++++++++++ + 6 files changed, 158 insertions(+), 8 deletions(-) -diff --git a/.github/labeler.yml b/.github/labeler.yml -deleted file mode 100644 -index 73f51875..00000000 ---- a/.github/labeler.yml -+++ /dev/null -@@ -1,293 +0,0 @@ --repository: -- - ./* -- --github: -- - .github/* -- - .github/**/* -- --dracut-install: -- - install/* -- - install/**/* -- --example: -- - examples/* -- - examples/**/* -- - examples/**/**/* -- --modules: -- - modules.d/* -- - modules.d/**/* -- --bash: -- - modules.d/00bash/* -- --bootchart: -- - modules.d/00bootchart/* -- --dash: -- - modules.d/00dash/* -- --mksh: -- - modules.d/00mksh/* -- --systemd: -- - modules.d/00systemd/* -- --warpclock: -- - modules.d/00warpclock/* -- --fips: -- - modules.d/01fips/* -- --systemd-initrd: -- - modules.d/01systemd-initrd/* -- --caps: -- - modules.d/02caps/* -- --systemd-networkd: -- - modules.d/02systemd-networkd/* -- --modsign: -- - modules.d/03modsign/* -- --rescue: -- - modules.d/03rescue/* -- --watchdog: -- - modules.d/04watchdog/* -- --busybox: -- - modules.d/05busybox/* -- --rngd: -- - modules.d/06rngd/* -- --i18n: -- - modules.d/10i18n/* -- --convertfs: -- - modules.d/30convertfs/* -- --network-legacy: -- - modules.d/35network-legacy/* -- --network-manager: -- - modules.d/35network-manager/* -- --network: -- - modules.d/40network/* -- --ifcfg: -- - modules.d/45ifcfg/* -- --url-lib: -- - modules.d/45url-lib/* -- --drm: -- - modules.d/50drm/* -- --gensplash: -- - modules.d/50gensplash/* -- --plymouth: -- - modules.d/50plymouth/* -- --cms: -- - modules.d/80cms/* -- --lvmmerge: -- - modules.d/80lvmmerge/* -- --cio_ignore: -- - modules.d/81cio_ignore/* -- --btrfs: -- - modules.d/90btrfs/* -- --crypt: -- - modules.d/90crypt/* -- --dm: -- - modules.d/90dm/* -- --dmraid: -- - modules.d/90dmraid/* -- --dmsquash-live: -- - modules.d/90dmsquash-live/* -- --dmsquash-live-ntfs: -- - modules.d/90dmsquash-live-ntfs/* -- --kernel-modules: -- - modules.d/90kernel-modules/* -- --kernel-modules-extra: -- - modules.d/90kernel-modules-extra/* -- --kernel-network-modules: -- - modules.d/90kernel-network-modules/* -- --livenet: -- - modules.d/90livenet/* -- --lvm: -- - modules.d/90lvm/* -- --mdraid: -- - modules.d/90mdraid/* -- --multipath: -- - modules.d/90multipath/* -- --nvdimm: -- - modules.d/90nvdimm/* -- --ppcmac: -- - modules.d/90ppcmac/* -- --qemu: -- - modules.d/90qemu/* -- --qemu-net: -- - modules.d/90qemu-net/* -- --stratis: -- - modules.d/90stratis/* -- --crypt-gpg: -- - modules.d/91crypt-gpg/* -- --crypt-loop: -- - modules.d/91crypt-loop/* -- --zipl: -- - modules.d/91zipl/* -- --cifs: -- - modules.d/95cifs/* -- --dasd: -- - modules.d/95dasd/* -- --dasd_mod: -- - modules.d/95dasd_mod/* -- --dasd_rules: -- - modules.d/95dasd_rules/* -- --dcssblk: -- - modules.d/95dcssblk/* -- --debug: -- - modules.d/95debug/* -- --fcoe: -- - modules.d/95fcoe/* -- --fcoe-uefi: -- - modules.d/95fcoe-uefi/* -- --fstab-sys: -- - modules.d/95fstab-sys/* -- --iscsi: -- - modules.d/95iscsi/* -- --lunmask: -- - modules.d/95lunmask/* -- --nbd: -- - modules.d/95nbd/* -- --nfs: -- - modules.d/95nfs/* -- --nvmf: -- - modules.d/95nvmf/* -- --qeth_rules: -- - modules.d/95qeth_rules/* -- --resume: -- - modules.d/95resume/* -- --rootfs-block: -- - modules.d/95rootfs-block/* -- --ssh-client: -- - modules.d/95ssh-client/* -- --terminfo: -- - modules.d/95terminfo/* -- --udev-rules: -- - modules.d/95udev-rules/* -- --virtfs: -- - modules.d/95virtfs/* -- --zfcp: -- - modules.d/95zfcp/* -- --zfcp_rules: -- - modules.d/95zfcp_rules/* -- --znet: -- - modules.d/95znet/* -- --securityfs: -- - modules.d/96securityfs/* -- --biosdevname: -- - modules.d/97biosdevname/* -- --masterkey: --- modules.d/97masterkey/* -- --dracut-systemd: -- - modules.d/98dracut-systemd/* -- --ecryptfs: -- - modules.d/98ecryptfs/* -- --integrity: -- - modules.d/98integrity/* -- --pollcdrom: -- - modules.d/98pollcdrom/* -- --selinux: -- - modules.d/98selinux/* -- --syslog: -- - modules.d/98syslog/* -- --usrmount: -- - modules.d/98usrmount/* -- --base: -- - modules.d/99base/* -- --fs-lib: -- - modules.d/99fs-lib/* -- --img-lib: -- - modules.d/99img-lib/* -- --memstrack: -- - modules.d/99memstrack/* -- --shutdown: -- - modules.d/99shutdown/* -- --squash: -- - modules.d/99squash/* -- --uefi-lib: -- - modules.d/99uefi-lib/* -- --test: -- - test/* -- - test/**/* -diff --git a/.github/stale.yml b/.github/stale.yml -deleted file mode 100644 -index 1e873606..00000000 ---- a/.github/stale.yml -+++ /dev/null -@@ -1,21 +0,0 @@ --# Number of days of inactivity before an issue becomes stale --daysUntilStale: 30 --# Number of days of inactivity before a stale issue is closed --daysUntilClose: 7 --# Issues with these labels will never be considered stale --exemptLabels: -- - documents -- - enhancement -- - regression -- - wiki -- - bug --# Label to use when marking an issue as stale --staleLabel: stale --# Comment to post when marking an issue as stale. Set to `false` to disable --markComment: > -- This issue is being marked as stale because it has not had any recent activity. -- It will be closed if no further activity occurs. -- If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. -- Thank you for your contributions. --# Comment to post when closing a stale issue. Set to `false` to disable --closeComment: false -diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml -deleted file mode 100644 -index 9fa7a929..00000000 ---- a/.github/workflows/labels.yml -+++ /dev/null -@@ -1,11 +0,0 @@ --name: "Pull Request Labeler" -- --on: pull_request_target -- --jobs: -- triage: -- runs-on: ubuntu-latest -- steps: -- - uses: actions/labeler@main -- with: -- repo-token: "${{ secrets.GITHUB_TOKEN }}" -diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml -deleted file mode 100644 -index ee46168e..00000000 ---- a/.github/workflows/pr.yml -+++ /dev/null -@@ -1,19 +0,0 @@ --name: Commisery --on: -- pull_request: -- types: [edited, opened, synchronize, reopened] -- --jobs: -- commit-message: -- name: Conventional Commit Message Checker (Commisery) -- runs-on: ubuntu-latest -- steps: -- - name: Check-out the repo under $GITHUB_WORKSPACE -- uses: actions/checkout@v2 -- -- - name: Run Commisery -- uses: dracutdevs/commisery-action@master -- with: -- token: ${{ secrets.GITHUB_TOKEN }} -- pull_request: ${{ github.event.number }} -- +diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml +index 03c9c5ec..99d57f5b 100644 +--- a/.github/workflows/container.yml ++++ b/.github/workflows/container.yml +@@ -3,12 +3,12 @@ on: + schedule: + - cron: '30 11 * * *' # every day at 4:40 + push: +- branches: [ master ] ++ branches: [ main ] + paths: + - 'test/container/**' + - '.github/workflows/container.yml' + pull_request: +- branches: [ master ] ++ branches: [ main new-main ] + paths: + - 'test/container/**' + - '.github/workflows/container.yml' +@@ -31,6 +31,7 @@ jobs: + - { 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 +@@ -49,5 +50,5 @@ jobs: + uses: docker/build-push-action@v2 + with: + file: test/container/${{ matrix.config.dockerfile }} +- tags: ghcr.io/dracutdevs/${{ matrix.config.tag }} ++ tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.config.tag }} + push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} +diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml +new file mode 100644 +index 00000000..c4b05fad +--- /dev/null ++++ b/.github/workflows/differential-shellcheck.yml +@@ -0,0 +1,19 @@ ++name: Differential ShellCheck ++on: ++ pull_request: ++ branches: [ main new-main ] ++ ++jobs: ++ test: ++ runs-on: ubuntu-20.04 ++ ++ steps: ++ - name: Repository checkout ++ uses: actions/checkout@v3 ++ with: ++ fetch-depth: 0 ++ ++ - name: Differential ShellCheck ++ uses: redhat-plumbers-in-action/differential-shellcheck@v2 ++ with: ++ token: ${{ secrets.GITHUB_TOKEN }} +diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml +index 3d78555f..aa354e3e 100644 +--- a/.github/workflows/integration.yml ++++ b/.github/workflows/integration.yml +@@ -2,7 +2,7 @@ name: Integration Test + + on: + pull_request: +- branches: [ master ] ++ branches: [ main new-main ] + + jobs: + basic: +@@ -24,7 +24,7 @@ jobs: + ] + fail-fast: false + container: +- image: ghcr.io/dracutdevs/${{ matrix.container }} ++ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} + options: "--privileged -v /dev:/dev" + steps: + - name: "Checkout Repository" +@@ -69,7 +69,48 @@ jobs: + ] + fail-fast: false + container: +- image: ghcr.io/dracutdevs/${{ matrix.container }} ++ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} ++ options: "--privileged -v /dev:/dev" ++ steps: ++ - name: "Checkout Repository" ++ uses: actions/checkout@v2 ++ with: ++ fetch-depth: 0 ++ ++ - name: "${{ matrix.container }} TEST-${{ matrix.test }}" ++ run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} ++ centos-9-stream: ++ runs-on: ubuntu-latest ++ timeout-minutes: 45 ++ concurrency: ++ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} ++ cancel-in-progress: true ++ strategy: ++ matrix: ++ container: [ ++ "centos:stream9", ++ ] ++ # Disabled tests (due to dropped packages in RHEL/CentOS): ++ # 03, 04, 15: requires btrfs ++ # 14: requires dmraid ++ # 30, 31, 35, 36: requires scsi-target-utils ++ test: [ ++ "01", ++ "02", ++ "10", ++ "11", ++ "12", ++ "13", ++ "17", ++ "20", ++ "21", ++ "40", ++ "41", ++ "98", ++ ] ++ fail-fast: false ++ container: ++ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} + options: "--privileged -v /dev:/dev" + steps: + - name: "Checkout Repository" +diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml +index 7b1b8ee7..5e3a299f 100644 +--- a/.github/workflows/lint.yml ++++ b/.github/workflows/lint.yml +@@ -2,9 +2,9 @@ name: Lint + + on: + push: +- branches: [ master ] ++ branches: [ main ] + pull_request: +- branches: [ master ] ++ branches: [ main new-main ] + + jobs: + lint-c: diff --git a/.packit.yml b/.packit.yml -index 482b4c4d..acc1f968 100644 ---- a/.packit.yml +new file mode 100644 +index 00000000..86ba83d2 +--- /dev/null +++ b/.packit.yml -@@ -1,55 +1,45 @@ +@@ -0,0 +1,36 @@ +--- - # This file is part of dracut. - # SPDX-License-Identifier: GPL-2.0-or-later ++# This file is part of dracut. ++# SPDX-License-Identifier: GPL-2.0-or-later +# +# vi:ts=2 sw=2 et: +# +# Docs: https://packit.dev/docs/ - --# The name of the upstream package -+specfile_path: .packit_rpm/dracut.spec ++ ++specfile_path: pkgbuild/dracut.spec +synced_files: + - .packit.yaml -+ - src: .packit_rpm/dracut.spec -+ dest: dracut.spec - upstream_package_name: dracut -- --# The upstream tag versioning scheme --upstream_tag_template: "{version}" -- --# The URL of the upstream project --upstream_project_url: https://github.com/dracutdevs/dracut -- --# Relative path to a spec file within the upstream repository --specfile_path: pkgbuild/dracut.spec -- --# Name of the downstream package - downstream_package_name: dracut ++upstream_package_name: dracut ++downstream_package_name: dracut +upstream_tag_template: "{version}" - --# The URL of the downstream project --dist_git_base_url: https://src.fedoraproject.org/ -- --# Sync file(s) from upstream repo to dist-git --synced_files: -- # The dracut spec file is maintained upstream so we sync it downstream. -- - dracut.spec -- # We sync the packit file downstream be able to optionally use the sync-from-downstream command -- - .packit.yaml ++ +actions: + post-upstream-clone: -+ # Use the CentOS Stream specfile -+ - "git clone https://gitlab.com/redhat/centos-stream/rpms/dracut .packit_rpm --depth=1" -+ # Drop the "sources" file so rebase-helper doesn't think we're a dist-git$ -+ - "rm -fv .packit_rpm/sources" - --# We want new releases to be automatically built on rawhide and have few jobs --# on copr. --create_pr: false ++ # Use the current specfile ++ - "cp pkgbuild/dracut.spec ." ++ +# Available targets can be listed via `copr-cli list-chroots` - jobs: --- job: propose_downstream -- trigger: release -- metadata: -- dist_git_branches: main -- --- job: tests -- trigger: pull_request -- metadata: -- targets: -- - fedora-rawhide -- ++jobs: +# Build test - - job: copr_build - trigger: pull_request - metadata: - targets: -- - fedora-development -- --- job: copr_build -- trigger: commit -+ - epel-8-x86_64 -+ - epel-8-aarch64 -+ # FIXME: change to CentOS 9 once it's available -+ - fedora-34-x86_64 -+ - fedora-34-aarch64 -+ - fedora-34-s390x ++- job: copr_build ++ trigger: pull_request ++ metadata: ++ targets: ++ - centos-stream-9-x86_64 ++ - centos-stream-9-aarch64 + +# Run tests (via testing farm) +- job: tests + trigger: pull_request - metadata: - targets: -- - fedora-all -- - fedora-development -+ # FIXME: change to CentOS 9 once it's available -+ - fedora-34-x86_64 ++ metadata: ++ targets: ++ - centos-stream-9-x86_64 +diff --git a/test/container/Dockerfile-CentOS-9-Stream b/test/container/Dockerfile-CentOS-9-Stream +new file mode 100644 +index 00000000..c9a96020 +--- /dev/null ++++ b/test/container/Dockerfile-CentOS-9-Stream +@@ -0,0 +1,53 @@ ++FROM quay.io/centos/centos:stream9 ++ ++MAINTAINER https://github.com/dracutdevs/dracut ++ ++ENV container docker ++LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE" ++ ++RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh ++ ++# Install needed packages for the dracut CI container ++# FIXME: properly re-add dash once C9S EPEL is available ++RUN dnf -y install --enablerepo crb --setopt=install_weak_deps=False \ ++ http://mirrors.kernel.org/fedora/releases/34/Everything/x86_64/os/Packages/d/dash-0.5.10.2-8.fc34.x86_64.rpm \ ++ qemu-kvm \ ++ NetworkManager \ ++ asciidoc \ ++ bash-completion \ ++ bzip2 \ ++ cryptsetup \ ++ dbus-daemon \ ++ dhcp-client \ ++ dhcp-server \ ++ e2fsprogs \ ++ gcc \ ++ git \ ++ iproute \ ++ iputils \ ++ iscsi-initiator-utils \ ++ kbd \ ++ kernel \ ++ kmod-devel \ ++ lvm2 \ ++ make \ ++ mdadm \ ++ nfs-utils \ ++ pigz \ ++ rpm-build \ ++ strace \ ++ sudo \ ++ tar \ ++ tcpdump \ ++ wget \ ++ which \ ++ xz \ ++ && dnf -y update && dnf clean all ++ ++# C9S ships only qemu-kvm, but it disables the KVM accel when it's not ++# available ++RUN ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-kvm && \ ++ ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-system-$(uname -m) ++ ++# Set default command ++CMD ["/usr/bin/bash"] diff --git a/SOURCES/0002.patch b/SOURCES/0002.patch index d64196a..2e84870 100644 --- a/SOURCES/0002.patch +++ b/SOURCES/0002.patch @@ -1,87 +1,55 @@ -From 976f5e053537e424edcdcb2325230d370454efd5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= -Date: Mon, 7 Jun 2021 19:40:22 +0200 -Subject: [PATCH] Merge pull request #3 from - redhat-plumbers/reconfigure-gh-actions +From a6c4171117924cacaa727a9828e72f70e09b1fa9 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Tue, 12 Jul 2022 14:15:25 +0200 +Subject: [PATCH] fix(fips): enhance commit 'handle s390x OSTree systems' -ci: drop the hardcoded repo owner name +78557f05a69fe718a97df85d2ed741ce10d3f806 + +Refactored to enhance readability. + +Related: rhbz#2050567 --- - .github/workflows/container.yml | 6 +++--- - .github/workflows/integration.yml | 6 +++--- - .github/workflows/lint.yml | 4 ++-- - 3 files changed, 8 insertions(+), 8 deletions(-) + modules.d/01fips/fips.sh | 15 +++++++++++---- + modules.d/01fips/module-setup.sh | 2 +- + 2 files changed, 12 insertions(+), 5 deletions(-) -diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml -index 0706bf48..32bb7f16 100644 ---- a/.github/workflows/container.yml -+++ b/.github/workflows/container.yml -@@ -3,12 +3,12 @@ on: - schedule: - - cron: '30 11 * * *' # every day at 4:40 - push: -- branches: [ master ] -+ branches: [ main ] - paths: - - 'test/container/**' - - '.github/workflows/container.yml' - pull_request: -- branches: [ master ] -+ branches: [ main ] - paths: - - 'test/container/**' - - '.github/workflows/container.yml' -@@ -50,5 +50,5 @@ jobs: - uses: docker/build-push-action@v2 - with: - file: test/container/${{ matrix.config.dockerfile }} -- tags: ghcr.io/dracutdevs/${{ matrix.config.tag }} -+ tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.config.tag }} - push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} -diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml -index 89310d44..18582364 100644 ---- a/.github/workflows/integration.yml -+++ b/.github/workflows/integration.yml -@@ -2,7 +2,7 @@ name: Integration Test - - on: - pull_request: -- branches: [ master ] -+ branches: [ main ] +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 26f65414..6ad61df8 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -132,10 +132,17 @@ do_fips() { + if [ -e "/boot/vmlinuz-${KERNEL}" ]; then + BOOT_IMAGE="vmlinuz-${KERNEL}" + elif [ -d /boot/loader/entries ]; then +- bls=$(find /boot/loader/entries -name '*.conf' | sort -rV | sed -n "$((BOOT_IMAGE + 1))p") +- if [ -e "${bls}" ]; then +- BOOT_IMAGE=$(grep ^linux "${bls}" | cut -d' ' -f2) +- fi ++ i=0 ++ # shellcheck disable=SC2012 ++ for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do ++ if [ "$i" -eq "${BOOT_IMAGE:-0}" ] && [ -r "$bls" ]; then ++ BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" ++ BOOT_IMAGE=${BOOT_IMAGE## } ++ break ++ fi ++ ++ i=$((i + 1)) ++ done + fi + fi - jobs: - basic: -@@ -24,7 +24,7 @@ jobs: - ] - fail-fast: false - container: -- image: ghcr.io/dracutdevs/${{ matrix.container }} -+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} - options: "--privileged -v /dev:/dev" - steps: - - name: "Checkout Repository" -@@ -69,7 +69,7 @@ jobs: - ] - fail-fast: false - container: -- image: ghcr.io/dracutdevs/${{ matrix.container }} -+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} - options: "--privileged -v /dev:/dev" - steps: - - name: "Checkout Repository" -diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml -index 7b1b8ee7..f6778a65 100644 ---- a/.github/workflows/lint.yml -+++ b/.github/workflows/lint.yml -@@ -2,9 +2,9 @@ name: Lint +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index 8860159d..cc9d15ce 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -67,7 +67,7 @@ install() { + inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh" + inst_script "$moddir/fips.sh" /sbin/fips.sh - on: - push: -- branches: [ master ] -+ branches: [ main ] - pull_request: -- branches: [ master ] -+ branches: [ main ] +- inst_multiple sha512hmac rmmod insmod mount uname umount grep sed cut find sort ++ inst_multiple sha512hmac rmmod insmod mount uname umount grep sed sort - jobs: - lint-c: + inst_simple /etc/system-fips + [ -c "${initdir}"/dev/random ] || mknod "${initdir}"/dev/random c 1 8 \ diff --git a/SOURCES/0003.patch b/SOURCES/0003.patch index 7b9227c..3eea192 100644 --- a/SOURCES/0003.patch +++ b/SOURCES/0003.patch @@ -1,143 +1,41 @@ -From 5384368467e20c3243223ed46b997954c0d9eea0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= -Date: Wed, 9 Jun 2021 14:12:25 +0200 -Subject: [PATCH] Merge pull request #6 from redhat-plumbers/centos-stream-job +From ec58df436c7ecaa04a9a4a8f72615c59739f890d Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Wed, 16 Feb 2022 02:42:11 +0100 +Subject: [PATCH] build(spec): do not use recommends for base packages -ci: add a CentOS 8 Stream job +rhel-only +Resolves: rhbz#1947892 --- - .github/workflows/container.yml | 1 + - .github/workflows/integration.yml | 41 ++++++++++++++++++++ - test/container/Dockerfile-CentOS-8-Stream | 63 +++++++++++++++++++++++++++++++ - 3 files changed, 105 insertions(+) + pkgbuild/dracut.spec | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) -diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml -index 32bb7f16..a8b3f9b8 100644 ---- a/.github/workflows/container.yml -+++ b/.github/workflows/container.yml -@@ -33,6 +33,7 @@ jobs: - - { dockerfile: 'Dockerfile-Fedora-rawhide', tag: 'fedora:rawhide' } - - { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' } - - { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' } -+ - { dockerfile: 'Dockerfile-CentOS-8-Stream', tag: 'centos:stream8' } - steps: - - name: Check out the repo - uses: actions/checkout@v2 -diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml -index 18582364..9ea718f1 100644 ---- a/.github/workflows/integration.yml -+++ b/.github/workflows/integration.yml -@@ -79,3 +79,44 @@ jobs: +diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec +index 71b7421c..38de47b4 100644 +--- a/pkgbuild/dracut.spec ++++ b/pkgbuild/dracut.spec +@@ -71,20 +71,17 @@ Requires: kmod + Requires: sed + Requires: xz + Requires: gzip ++Requires: hardlink ++Requires: pigz ++Requires: kpartx - - name: "${{ matrix.container }} TEST-${{ matrix.test }}" - run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} -+ centos-8-stream: -+ runs-on: ubuntu-latest -+ timeout-minutes: 45 -+ concurrency: -+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} -+ cancel-in-progress: true -+ strategy: -+ matrix: -+ container: [ -+ "centos:stream8", -+ ] -+ # Disabled tests (due to dropped packages in RHEL/CentOS): -+ # 03, 04, 15: requires btrfs -+ # 14: requires dmraid -+ # 30, 31, 35, 36: requires scsi-target-utils -+ test: [ -+ "01", -+ "02", -+ "10", -+ "11", -+ "12", -+ "13", -+ "17", -+ "20", -+ "21", -+ "40", -+ "41", -+ "98", -+ ] -+ fail-fast: false -+ container: -+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} -+ options: "--privileged -v /dev:/dev" -+ steps: -+ - name: "Checkout Repository" -+ uses: actions/checkout@v2 -+ with: -+ fetch-depth: 0 -+ -+ - name: "${{ matrix.container }} TEST-${{ matrix.test }}" -+ run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} -diff --git a/test/container/Dockerfile-CentOS-8-Stream b/test/container/Dockerfile-CentOS-8-Stream -new file mode 100644 -index 00000000..b14cc64a ---- /dev/null -+++ b/test/container/Dockerfile-CentOS-8-Stream -@@ -0,0 +1,63 @@ -+FROM quay.io/centos/centos:stream8 -+ -+MAINTAINER https://github.com/dracutdevs/dracut -+ -+ENV container docker -+LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE" -+ -+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh -+ -+# FIXME: the mirrors were desynchronized at the time of writing, leading to several -+# conflicts when installing dependencies below -+RUN sed -i -e 's/^mirrorlist=/#mirrorlist=/g' -e 's/^#baseurl=/baseurl=/g' /etc/yum.repos.d/*.repo -+ -+# Install needed packages for the dracut CI container -+RUN dnf -y install epel-release && \ -+ `# FIXME: this is required to work around a bug in e2fsprogs, remove when CentOS 8.5 is out` && \ -+ dnf -y install dnf-plugins-core && \ -+ dnf -y copr enable mrc0mmand/systemd-centos-ci-centos8 && \ -+ dnf -y install e2fsprogs && \ -+ `# End of FIXME` && \ -+ dnf -y install --enablerepo powertools --enablerepo epel --setopt=install_weak_deps=False \ -+ qemu-kvm \ -+ NetworkManager \ -+ asciidoc \ -+ bash-completion \ -+ bzip2 \ -+ cryptsetup \ -+ dash \ -+ dbus-daemon \ -+ dhcp-client \ -+ dhcp-server \ -+ e2fsprogs \ -+ gcc \ -+ git \ -+ iproute \ -+ iputils \ -+ iscsi-initiator-utils \ -+ kbd \ -+ kernel \ -+ kmod-devel \ -+ lvm2 \ -+ make \ -+ mdadm \ -+ nfs-utils \ -+ pigz \ -+ python3-imgcreate \ -+ rpm-build \ -+ strace \ -+ sudo \ -+ tar \ -+ tcpdump \ -+ wget \ -+ which \ -+ xz \ -+ && dnf -y update && dnf clean all -+ -+# CentOS 8 ships only qemu-kvm, but it disables the KVM accel when it's not -+# available -+RUN ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-kvm && \ -+ ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-system-$(uname -m) -+ -+# Set default command -+CMD ["/usr/bin/bash"] + %if 0%{?fedora} || 0%{?rhel} +-Recommends: memstrack +-Recommends: hardlink +-Recommends: pigz +-Recommends: kpartx ++Suggests: memstrack + 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 diff --git a/SOURCES/0004.patch b/SOURCES/0004.patch index d050363..e13f366 100644 --- a/SOURCES/0004.patch +++ b/SOURCES/0004.patch @@ -1,71 +1,35 @@ -From 456c3badc622cb8c4b6ec59bc37436f3d50f7ed5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= -Date: Fri, 9 Jul 2021 12:32:00 +0200 -Subject: [PATCH] Merge pull request #7 from lnykryn/bz1977347 +From 3a0a1774798178f709fc4aa54b6fc3c78e30add7 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 19 Jul 2021 11:27:28 +0200 +Subject: [PATCH] fix(95nfs): set correct ownership and permissions for statd + directory -Bz1977347 +The directory ownership for the statd directory should be +rpcuser:rpcuser. + +Resolves: #2017846 --- - dracut.sh | 7 +++++-- - modules.d/99squash/module-setup.sh | 8 ++++---- - 2 files changed, 9 insertions(+), 6 deletions(-) + modules.d/95nfs/module-setup.sh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) -diff --git a/dracut.sh b/dracut.sh -index 60ac46f4..78917763 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -2067,9 +2067,11 @@ for ((i = 0; i < ${#include_src[@]}; i++)); do - # check for preexisting symlinks, so we can cope with the - # symlinks to $prefix - # Objectname is a file or a directory -+ reset_dotglob="$(shopt -p dotglob)" -+ shopt -q -s dotglob - for objectname in "$src"/*; do - [[ -e $objectname || -L $objectname ]] || continue -- if [[ -d $objectname ]]; then -+ if [[ -d $objectname ]] && [[ ! -L $objectname ]]; then - # objectname is a directory, let's compute the final directory name - object_destdir=${destdir}/${objectname#$src/} - if ! [[ -e $object_destdir ]]; then -@@ -2077,11 +2079,12 @@ for ((i = 0; i < ${#include_src[@]}; i++)); do - mkdir -m 0755 -p "$object_destdir" - chmod --reference="$objectname" "$object_destdir" - fi -- $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/* -+ $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/. - else - $DRACUT_CP -t "$destdir" "$dracutsysrootdir$objectname" - fi - done -+ eval "$reset_dotglob" - elif [[ -e $src ]]; then - derror "$src is neither a directory nor a regular file" - else -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index e3196213..a2525cff 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -42,19 +42,19 @@ installpost() { - # Install required modules and binaries for the squash image init script. - if [[ $_busybox ]]; then - inst "$_busybox" /usr/bin/busybox -- for _i in sh echo mount modprobe mkdir switch_root grep; do -+ for _i in sh echo mount modprobe mkdir switch_root grep umount; do - ln_r /usr/bin/busybox /usr/bin/$_i - done - else -- DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep -+ DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep umount - fi - - hostonly="" instmods "loop" "squashfs" "overlay" - dracut_kernel_post - - # Install squash image init script. -- ln -sfn /usr/bin "$initdir/bin" -- ln -sfn /usr/sbin "$initdir/sbin" -+ ln_r /usr/bin /bin -+ ln_r /usr/sbin /sbin - inst_simple "$moddir"/init-squash.sh /init - } +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index 16bafe30..5351c2d5 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -120,8 +120,13 @@ install() { + mkdir -m 0755 -p "$initdir/var/lib/nfs" + mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" + mkdir -m 0770 -p "$initdir/var/lib/rpcbind" +- [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" +- [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" ++ [ -d "$dracutsysrootdir/var/lib/nfs/statd/sm" ] \ ++ && mkdir -m 0700 -p "$initdir/var/lib/nfs/statd" \ ++ && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" \ ++ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/statd" ++ [ -d "$dracutsysrootdir/var/lib/nfs/sm" ] \ ++ && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" \ ++ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/sm" + # Rather than copy the passwd file in, just set a user for rpcbind + # We'll save the state and restart the daemon from the root anyway diff --git a/SOURCES/0005.patch b/SOURCES/0005.patch index a03f5e9..bb2f6a2 100644 --- a/SOURCES/0005.patch +++ b/SOURCES/0005.patch @@ -1,25 +1,27 @@ -From 1b02912a8ed0767dc7881c45d55856f825e52b3c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= -Date: Fri, 9 Jul 2021 12:32:10 +0200 -Subject: [PATCH] Merge pull request #8 from lnykryn/bz1970712 +From 21b7898d5c3a074203d6cb8a71962010874f87bb Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 15 Feb 2022 13:47:40 +0100 +Subject: [PATCH] fix(95resume): only exclude this module, when swap is netdev -fix(network-manager): don't pull in systemd-udev-settle +Resolves: #2017787 --- - modules.d/35network-manager/nm-initrd.service | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/35network-manager/nm-initrd.service b/modules.d/35network-manager/nm-initrd.service -index 815797a4..e076f50b 100644 ---- a/modules.d/35network-manager/nm-initrd.service -+++ b/modules.d/35network-manager/nm-initrd.service -@@ -1,7 +1,7 @@ - [Unit] - DefaultDependencies=no --Wants=systemd-udev-settle.service --After=systemd-udev-settle.service -+Wants=systemd-udev-trigger.service -+After=systemd-udev-trigger.service - After=dracut-cmdline.service - Before=network.target - ConditionPathExists=/run/NetworkManager/initrd/neednet + modules.d/95resume/module-setup.sh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index 5e891048..4b8d8422 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -10,10 +10,9 @@ check() { + return 1 + } + +- # Only support resume if hibernation is currently on +- # and no swap is mounted on a net device ++ # Only support resume if no swap is mounted on a net device + [[ $hostonly ]] || [[ $mount_needs ]] && { +- swap_on_netdevice || [[ -f /sys/power/resume && "$(cat /sys/power/resume)" == "0:0" ]] && return 255 ++ swap_on_netdevice && return 255 + } + + return 0 diff --git a/SOURCES/0006.patch b/SOURCES/0006.patch index 41ec723..ff7d7a5 100644 --- a/SOURCES/0006.patch +++ b/SOURCES/0006.patch @@ -1,29 +1,65 @@ -From 7d3226fe3462685a4a0ad6b8cbe704c9d08f4e77 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 12 Aug 2021 11:46:35 +0200 -Subject: [PATCH] fix(kernel-modules): add blk_mq_alloc_disk and - blk_cleanup_disk to blockfuncs +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 -Since kernel 5-14 those are used by many drivers for example: -xen-blkfront, loop, nbd, pd - -Cherry-picked from: rhel-only -Resolves: #1986909 --- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .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/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 499fc066..36f8ca3c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -2,7 +2,7 @@ +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 ] - # called by dracut - installkernel() { -- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma' -+ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma|blk_mq_alloc_disk|blk_cleanup_disk' - local -A _hostonly_drvs + 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 ] - find_kernel_modules_external() { + jobs: + lint-c: diff --git a/SOURCES/0007.patch b/SOURCES/0007.patch index 5cef064..fc854bc 100644 --- a/SOURCES/0007.patch +++ b/SOURCES/0007.patch @@ -1,45 +1,42 @@ -From 5f8012de4cb73b90d69075e8118d904302d41c20 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 9 Aug 2021 09:28:46 +0200 -Subject: [PATCH] fix(network-manager): check for nm-initrd-generator in both - /usr/{libexec,lib} +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 -Sice commit 22d6863ef1b2 ("fix(network-manager): cope with distributions not -using `libexec`") nm-initrd-generator can be installed in either /usr/libexec -or /usr/lib. Change other modules to check for the binary in both locations. - -(cherry picked from commit 5ee7e249b8cc74461122ccd7efe954b3402c23da) - -Resolves: #1975929 --- - modules.d/40network/module-setup.sh | 2 +- - modules.d/80cms/cmsifup.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + .github/workflows/container.yml | 4 ---- + .github/workflows/integration.yml | 3 --- + 2 files changed, 7 deletions(-) -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 60824da6..9fd5d806 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -19,7 +19,7 @@ depends() { - if [ -z "$network_handler" ]; then - if [[ -x $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then - network_handler="network-wicked" -- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then -+ elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then - network_handler="network-manager" - elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then - network_handler="systemd-networkd" -diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh -index a319227a..73d76fbf 100755 ---- a/modules.d/80cms/cmsifup.sh -+++ b/modules.d/80cms/cmsifup.sh -@@ -34,7 +34,7 @@ fi - IFACES="$IFACES $DEVICE" - echo "$IFACES" >> /tmp/net.ifaces - --if [ -x /usr/libexec/nm-initrd-generator ]; then -+if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then - type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh - nm_generate_connections - else +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/SOURCES/0008.patch b/SOURCES/0008.patch index 7d8315c..942000e 100644 --- a/SOURCES/0008.patch +++ b/SOURCES/0008.patch @@ -1,43 +1,29 @@ -From aa561847a82c2446ead5e41742f453629f112b63 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 4 Aug 2021 09:37:31 +0200 -Subject: [PATCH] fix(cms): reload NetworkManager connections +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 -When NetworkManager is running as systemd service, it's not enough to write -connection files; the module should also tell NetworkManager to reload the -connections from disk so that any new connection can be auto-activated. +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. -https://bugzilla.redhat.com/show_bug.cgi?id=1975929 -(cherry picked from commit 07977ee5c5294a5d30c1f33f292a0b31303750fb) - -Resolves: #1975929 +rhel-only +Fixes: #1835 --- - modules.d/35network-manager/nm-lib.sh | 4 ++++ - modules.d/80cms/cmsifup.sh | 1 + - 2 files changed, 5 insertions(+) + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/modules.d/35network-manager/nm-lib.sh b/modules.d/35network-manager/nm-lib.sh -index 2d27e079..1f749587 100644 ---- a/modules.d/35network-manager/nm-lib.sh -+++ b/modules.d/35network-manager/nm-lib.sh -@@ -28,3 +28,7 @@ nm_generate_connections() { - done +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 - } -+ -+nm_reload_connections() { -+ [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active nm-initrd.service && nmcli connection reload -+} -diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh -index 73d76fbf..285e20d1 100755 ---- a/modules.d/80cms/cmsifup.sh -+++ b/modules.d/80cms/cmsifup.sh -@@ -37,6 +37,7 @@ echo "$IFACES" >> /tmp/net.ifaces - if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then - type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh - nm_generate_connections -+ nm_reload_connections - else - exec ifup "$DEVICE" +-elif [[ ! -f $conffile ]]; then ++elif [[ ! -e $conffile ]]; then + printf "%s\n" "dracut: Configuration file '$conffile' not found." >&2 + exit 1 fi diff --git a/SOURCES/0009.patch b/SOURCES/0009.patch index ab87381..9dc2952 100644 --- a/SOURCES/0009.patch +++ b/SOURCES/0009.patch @@ -1,42 +1,61 @@ -From 058ffa90669a4dbd2af16e025f22312408ed4ba9 Mon Sep 17 00:00:00 2001 +From 96116c784edda6675c80fdf95823188c72b28652 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn -Date: Tue, 24 Aug 2021 15:39:25 +0200 -Subject: [PATCH] 95resume: always install this module +Date: Mon, 18 Jul 2022 16:29:27 +0200 +Subject: [PATCH] fix(98dracut-systemd): partly revert "emergency mode: use + sulogin" -We can't always correctly decide if the resume module is needed. -So let's play safe and always include it. - -see: https://github.com/dracutdevs/dracut/issues/924 +Partly reverts 32f68c1f9ac3720e8ce4b95a09c0ce680d5da786 +In RHEL we don't want to have a password to log in into emergency mode. RHEL-only -Resolves: #1926544 +Resolves: #2057365 --- - modules.d/95resume/module-setup.sh | 14 -------------- - 1 file changed, 14 deletions(-) + 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/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh -index f0507b13..4f68e947 100755 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -2,20 +2,6 @@ +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 - # called by dracut - check() { -- swap_on_netdevice() { -- local _dev -- for _dev in "${swap_devs[@]}"; do -- block_is_netdevice "$_dev" && return 0 -- done -- return 1 -- } -- -- # Only support resume if hibernation is currently on -- # and no swap is mounted on a net device -- [[ $hostonly ]] || [[ $mount_needs ]] && { -- swap_on_netdevice || [[ "$(cat /sys/power/resume)" == "0:0" ]] && return 255 -- } + inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" - - return 0 +- 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/SOURCES/0010.patch b/SOURCES/0010.patch index 1ec46fb..c73f2cd 100644 --- a/SOURCES/0010.patch +++ b/SOURCES/0010.patch @@ -1,35 +1,29 @@ -From 324e6ba13d8abef22c636e64ad0cbd8018704c93 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Tue, 9 Nov 2021 12:39:19 +0100 -Subject: [PATCH] ci: use C9S chroots for Packit/TFT +From 733d47fb873c2b821a430a614d83b60475df2d13 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 15 Aug 2022 16:25:53 +0200 +Subject: [PATCH] fix(kernel-modules): always include nvmem driver on + nvmem_on_arm +These drivers are needed to boot on some SoCs like NXP i.MX +We should include them so installation images will work. + +(cherry picked from commit bc965cd8890013a6362733d217c18756134bbcdf) + +Resolves: #2109498 --- - .packit.yml | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) + modules.d/90kernel-modules/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) -diff --git a/.packit.yml b/.packit.yml -index acc1f968..1b1809ab 100644 ---- a/.packit.yml -+++ b/.packit.yml -@@ -29,17 +29,12 @@ jobs: - trigger: pull_request - metadata: - targets: -- - epel-8-x86_64 -- - epel-8-aarch64 -- # FIXME: change to CentOS 9 once it's available -- - fedora-34-x86_64 -- - fedora-34-aarch64 -- - fedora-34-s390x -+ - centos-stream-9-x86_64 -+ - centos-stream-9-aarch64 - - # Run tests (via testing farm) - - job: tests - trigger: pull_request - metadata: - targets: -- # FIXME: change to CentOS 9 once it's available -- - fedora-34-x86_64 -+ - centos-stream-9-x86_64 +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index e2073a04..191af041 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -85,6 +85,7 @@ installkernel() { + "=drivers/mfd" \ + "=drivers/mmc/core" \ + "=drivers/mmc/host" \ ++ "=drivers/nvmem" \ + "=drivers/phy" \ + "=drivers/power" \ + "=drivers/regulator" \ diff --git a/SOURCES/0011.patch b/SOURCES/0011.patch index 8ea6850..1f329a1 100644 --- a/SOURCES/0011.patch +++ b/SOURCES/0011.patch @@ -1,23 +1,32 @@ -From 816891a11e3a3b4a792b68257eff4af7df411064 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Tue, 9 Nov 2021 12:45:47 +0100 -Subject: [PATCH] ci: drop patches from the C9S spec before using it +From 58a310fdbfc1a7e07703c6ab9b21c43a73330a92 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 15 Aug 2022 16:32:51 +0200 +Subject: [PATCH] fix(drm): add video drivers needed on hyper-v and similar +Due to non-availability of Hyper-V video driver hyperv_drm in kdump +initramfs, the console seems to be in hang state with no text over it. + +We should also go through the /sys/bus/vmbus/devices and include drivers +referenced there. + +(cherry picked from commit 85149b85961aa535a3c61d492cd3594794e5cc3f) + +Resolves: #2099502 --- - .packit.yml | 2 ++ - 1 file changed, 2 insertions(+) + modules.d/50drm/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/.packit.yml b/.packit.yml -index 1b1809ab..dd3a1fa6 100644 ---- a/.packit.yml -+++ b/.packit.yml -@@ -21,6 +21,8 @@ actions: - - "git clone https://gitlab.com/redhat/centos-stream/rpms/dracut .packit_rpm --depth=1" - # Drop the "sources" file so rebase-helper doesn't think we're a dist-git$ - - "rm -fv .packit_rpm/sources" -+ # Drop all patches (since they're already applied in this repository) -+ - "sed -ri '/^Patch[0-9]+:/d' .packit_rpm/dracut.spec" +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index cff0550c..1fb38677 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -31,7 +31,7 @@ installkernel() { + if [[ $hostonly ]]; then + local i modlink modname - # Available targets can be listed via `copr-cli list-chroots` - jobs: +- for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?}/*/modalias; do ++ for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?,vmbus/devices}/*/modalias; do + [[ -e $i ]] || continue + [[ -n $(< "$i") ]] || continue + # shellcheck disable=SC2046 diff --git a/SOURCES/0012.patch b/SOURCES/0012.patch index 1985060..0956f95 100644 --- a/SOURCES/0012.patch +++ b/SOURCES/0012.patch @@ -1,88 +1,51 @@ -From d19ca83f909ed695f199aa688406f62e3eecadcd Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Tue, 9 Nov 2021 16:01:51 +0100 -Subject: [PATCH] ci: bump C8 jobs to C9S +From a84df47afae75a0b4068c78d8201a515a841f353 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Tue, 16 Aug 2022 13:30:16 +0200 +Subject: [PATCH] fix(skipcpio): ignore broken pipe -rhel-only +If lsinitrd is called from a context in which SIGPIPE is ignored (e.g., +from a systemd unit with default setting of IgnoreSIGPIPE=), the +following line will result in an error being issued: + +bin="$($SKIP "$image" | { read -r -N 6 bin && echo "$bin"; })" + +An example error from `kdumpctl start` (which internally just calls +`systemctl start kdump.service`): + +kdumpctl[1287]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite + +A minimal reproducer: + +systemd-run -t sh -c '/path/to/skipcpio /path/to/any/file | false' + +(cherry-picked from e9a4d73b73b716a9d2d5f01ceb7b427ef544ed9b) + +Resolves: #2109803 --- - .github/workflows/container.yml | 2 +- - .github/workflows/integration.yml | 4 ++-- - ...ockerfile-CentOS-8-Stream => Dockerfile-CentOS-9-Stream} | 13 ++----------- - 3 files changed, 5 insertions(+), 14 deletions(-) + src/skipcpio/skipcpio.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml -index a8b3f9b8..adcec4f6 100644 ---- a/.github/workflows/container.yml -+++ b/.github/workflows/container.yml -@@ -33,7 +33,7 @@ jobs: - - { dockerfile: 'Dockerfile-Fedora-rawhide', tag: 'fedora:rawhide' } - - { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' } - - { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' } -- - { dockerfile: 'Dockerfile-CentOS-8-Stream', tag: 'centos:stream8' } -+ - { dockerfile: 'Dockerfile-CentOS-9-Stream', tag: 'centos:stream9' } - steps: - - name: Check out the repo - uses: actions/checkout@v2 -diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml -index 9ea718f1..990dd079 100644 ---- a/.github/workflows/integration.yml -+++ b/.github/workflows/integration.yml -@@ -79,7 +79,7 @@ jobs: - - - name: "${{ matrix.container }} TEST-${{ matrix.test }}" - run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} -- centos-8-stream: -+ centos-9-stream: - runs-on: ubuntu-latest - timeout-minutes: 45 - concurrency: -@@ -88,7 +88,7 @@ jobs: - strategy: - matrix: - container: [ -- "centos:stream8", -+ "centos:stream9", - ] - # Disabled tests (due to dropped packages in RHEL/CentOS): - # 03, 04, 15: requires btrfs -diff --git a/test/container/Dockerfile-CentOS-8-Stream b/test/container/Dockerfile-CentOS-9-Stream -similarity index 65% -rename from test/container/Dockerfile-CentOS-8-Stream -rename to test/container/Dockerfile-CentOS-9-Stream -index b14cc64a..da94f134 100644 ---- a/test/container/Dockerfile-CentOS-8-Stream -+++ b/test/container/Dockerfile-CentOS-9-Stream -@@ -1,4 +1,4 @@ --FROM quay.io/centos/centos:stream8 -+FROM quay.io/centos/centos:stream9 - - MAINTAINER https://github.com/dracutdevs/dracut +diff --git a/src/skipcpio/skipcpio.c b/src/skipcpio/skipcpio.c +index 13bfaf53..f66c1869 100644 +--- a/src/skipcpio/skipcpio.c ++++ b/src/skipcpio/skipcpio.c +@@ -23,6 +23,7 @@ + #define _GNU_SOURCE + #endif -@@ -7,17 +7,8 @@ LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=h ++#include + #include + #include + #include +@@ -187,8 +188,10 @@ cat_rest: + goto end; + } - RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh - --# FIXME: the mirrors were desynchronized at the time of writing, leading to several --# conflicts when installing dependencies below --RUN sed -i -e 's/^mirrorlist=/#mirrorlist=/g' -e 's/^#baseurl=/baseurl=/g' /etc/yum.repos.d/*.repo -- - # Install needed packages for the dracut CI container - RUN dnf -y install epel-release && \ -- `# FIXME: this is required to work around a bug in e2fsprogs, remove when CentOS 8.5 is out` && \ -- dnf -y install dnf-plugins-core && \ -- dnf -y copr enable mrc0mmand/systemd-centos-ci-centos8 && \ -- dnf -y install e2fsprogs && \ -- `# End of FIXME` && \ - dnf -y install --enablerepo powertools --enablerepo epel --setopt=install_weak_deps=False \ - qemu-kvm \ - NetworkManager \ -@@ -54,7 +45,7 @@ RUN dnf -y install epel-release && \ - xz \ - && dnf -y update && dnf clean all - --# CentOS 8 ships only qemu-kvm, but it disables the KVM accel when it's not -+# C9S ships only qemu-kvm, but it disables the KVM accel when it's not - # available - RUN ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-kvm && \ - ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-system-$(uname -m) - ++ errno = 0; + if (fwrite(buf.copy_buffer, 1, s, stdout) != s) { +- pr_err("fwrite\n"); ++ if (errno != EPIPE) ++ pr_err("fwrite\n"); + goto end; + } + } diff --git a/SOURCES/0013.patch b/SOURCES/0013.patch deleted file mode 100644 index 399b25f..0000000 --- a/SOURCES/0013.patch +++ /dev/null @@ -1,27 +0,0 @@ -From cc4e8d16b743b8b720b502174df7c934a2d5c5dc Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Tue, 9 Nov 2021 16:40:17 +0100 -Subject: [PATCH] ci: drop `epel-release` - -since it's not available (yet) for C9S. - -rhel-only ---- - test/container/Dockerfile-CentOS-9-Stream | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/test/container/Dockerfile-CentOS-9-Stream b/test/container/Dockerfile-CentOS-9-Stream -index da94f134..3f643e88 100644 ---- a/test/container/Dockerfile-CentOS-9-Stream -+++ b/test/container/Dockerfile-CentOS-9-Stream -@@ -8,8 +8,7 @@ LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=h - RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh - - # Install needed packages for the dracut CI container --RUN dnf -y install epel-release && \ -- dnf -y install --enablerepo powertools --enablerepo epel --setopt=install_weak_deps=False \ -+RUN dnf -y install --enablerepo powertools --setopt=install_weak_deps=False \ - qemu-kvm \ - NetworkManager \ - asciidoc \ - diff --git a/SOURCES/0014.patch b/SOURCES/0014.patch deleted file mode 100644 index 72f2a78..0000000 --- a/SOURCES/0014.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 33170038ddc5affa14e9464337983cfad033b8a4 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Tue, 9 Nov 2021 16:46:31 +0100 -Subject: [PATCH] ci: the PowerTools repo was renamed back to CRB in C9S - -rhel-only ---- - test/container/Dockerfile-CentOS-9-Stream | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/container/Dockerfile-CentOS-9-Stream b/test/container/Dockerfile-CentOS-9-Stream -index 3f643e88..9d0e81e3 100644 ---- a/test/container/Dockerfile-CentOS-9-Stream -+++ b/test/container/Dockerfile-CentOS-9-Stream -@@ -8,7 +8,7 @@ LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=h - RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh - - # Install needed packages for the dracut CI container --RUN dnf -y install --enablerepo powertools --setopt=install_weak_deps=False \ -+RUN dnf -y install --enablerepo crb --setopt=install_weak_deps=False \ - qemu-kvm \ - NetworkManager \ - asciidoc \ - diff --git a/SOURCES/0015.patch b/SOURCES/0015.patch deleted file mode 100644 index 5ab31c6..0000000 --- a/SOURCES/0015.patch +++ /dev/null @@ -1,41 +0,0 @@ -From d8f6162d3d86c81744c5f2c8215959aac3a2f9e9 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Tue, 9 Nov 2021 17:13:37 +0100 -Subject: [PATCH] ci: temporarily use an F34 dash package until C9S EPEL is - available - -rhel-only ---- - test/container/Dockerfile-CentOS-9-Stream | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/container/Dockerfile-CentOS-9-Stream b/test/container/Dockerfile-CentOS-9-Stream -index 9d0e81e3..c9a96020 100644 ---- a/test/container/Dockerfile-CentOS-9-Stream -+++ b/test/container/Dockerfile-CentOS-9-Stream -@@ -8,14 +8,15 @@ LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=h - RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh - - # Install needed packages for the dracut CI container -+# FIXME: properly re-add dash once C9S EPEL is available - RUN dnf -y install --enablerepo crb --setopt=install_weak_deps=False \ -+ http://mirrors.kernel.org/fedora/releases/34/Everything/x86_64/os/Packages/d/dash-0.5.10.2-8.fc34.x86_64.rpm \ - qemu-kvm \ - NetworkManager \ - asciidoc \ - bash-completion \ - bzip2 \ - cryptsetup \ -- dash \ - dbus-daemon \ - dhcp-client \ - dhcp-server \ -@@ -33,7 +34,6 @@ RUN dnf -y install --enablerepo crb --setopt=install_weak_deps=False \ - mdadm \ - nfs-utils \ - pigz \ -- python3-imgcreate \ - rpm-build \ - strace \ - sudo \ - diff --git a/SOURCES/0016.patch b/SOURCES/0016.patch deleted file mode 100644 index 19ced8b..0000000 --- a/SOURCES/0016.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 6e304517801fdfb58df582e37cd4df04b5adc1b6 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Fri, 12 Nov 2021 21:43:12 +0100 -Subject: [PATCH] test: don't use `-cpu max` in GH Actions - -There appears to be an issue with newer QEMU versions (spotted with Arch -Linux and C9S containers) which causes the respective GH Action to hang -when booting a QEMU VM in combination with the `-cpu max` parameter. - -During (a particularly painful) debugging session I once managed to get -some output from such "frozen" machine (using `earlycon` and -`earlyprintk` kernel cmdline options), and in that particular case the -VM died with a trap caused by an invalid opcode. - -I couldn't reproduce this locally, only in GH Actions environment with -Arch Linux and C9S containers. Also, so far I haven't found out which -specific CPUID flag causes this, but using the `IvyBridge-v2` feature -set seems to mitigate the issue. - -(cherry picked from commit 3f56d481e8a3c67c2e795686e6ec3bfc4ea08e1d) ---- - test/run-qemu | 5 +++-- - tools/test-github.sh | 1 + - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/test/run-qemu b/test/run-qemu -index 3c521a14..5dc61037 100755 ---- a/test/run-qemu -+++ b/test/run-qemu -@@ -3,13 +3,14 @@ - # We prefer kvm, kqemu, userspace in that order. - - export PATH=/usr/sbin:/usr/bin:/sbin:/bin -+QEMU_CPU="${QEMU_CPU:-max}" - --[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS=(-cpu max) -+[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS=(-cpu "$QEMU_CPU") - (lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS=(-kernel-kqemu -cpu host) - [[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS=(-cpu host) - [[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS=(-cpu host) - [[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS=(-cpu host) --[[ -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-cpu max) -+[[ -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-cpu "$QEMU_CPU") - [[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-enable-kvm -cpu host) - - [[ $BIN ]] || { -diff --git a/tools/test-github.sh b/tools/test-github.sh -index eab59dcc..1d61b8e3 100755 ---- a/tools/test-github.sh -+++ b/tools/test-github.sh -@@ -41,6 +41,7 @@ else - cd /lib/modules - ls -1 | tail -1 - )" \ -+ QEMU_CPU="IvyBridge-v2" \ - DRACUT_NO_XATTR=1 \ - TEST_RUN_ID="$RUN_ID" \ - ${TESTS:+TESTS="$TESTS"} \ - diff --git a/SOURCES/0017.patch b/SOURCES/0017.patch deleted file mode 100644 index 5fe98e9..0000000 --- a/SOURCES/0017.patch +++ /dev/null @@ -1,41 +0,0 @@ -From cecc1fbae879c189739691ecff3df67d20b0899a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Tue, 16 Nov 2021 11:15:52 +0100 -Subject: [PATCH] fix(shutdown): be robust against forced shutdown - -When a forced shutdown is issued through sending a burst of Ctrl-Alt-Del -keys, systemd sends SIGTERM to all processes. This ends up killing -dracut-initramfs-restore as well, preventing the script from detecting -that the unpack of the initramfs is incomplete, which later causes a -crash to happen when "shutdown" tries to execute from the unpacked -initramfs. - -This fix makes sure dracut-initramfs-restore remains alive to detect -the unpack failed (because cpio was killed by systemd too). - -Refs: - * https://bugzilla.redhat.com/show_bug.cgi?id=2023665 -(cherry picked from commit b9ba3c8bb8f0f1328cd1ffaa8dbf64585b28c474) - -Resolves: #2024502 ---- - dracut-initramfs-restore.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index abe6b1e2..d97030a3 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -6,6 +6,11 @@ set -e - [ -e /run/initramfs/bin/sh ] && exit 0 - [ -e /run/initramfs/.need_shutdown ] || exit 0 - -+# SIGTERM signal is received upon forced shutdown: ignore the signal -+# We want to remain alive to be able to trap unpacking errors to avoid -+# switching root to an incompletely unpacked initramfs -+trap 'echo "Received SIGTERM signal, ignoring!" >&2' TERM -+ - KERNEL_VERSION="$(uname -r)" - - [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut - diff --git a/SOURCES/0018.patch b/SOURCES/0018.patch deleted file mode 100644 index f59b0d9..0000000 --- a/SOURCES/0018.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 9e17bed7c0f30f6c557f837592772522c384779b Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 15 Feb 2022 13:44:16 +0100 -Subject: [PATCH] Revert "95resume: always install this module" - -This reverts commit 058ffa90669a4dbd2af16e025f22312408ed4ba9. - -Resolves: #2017787 ---- - modules.d/95resume/module-setup.sh | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh -index 4f68e947..f0507b13 100755 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -2,6 +2,20 @@ - - # called by dracut - check() { -+ swap_on_netdevice() { -+ local _dev -+ for _dev in "${swap_devs[@]}"; do -+ block_is_netdevice "$_dev" && return 0 -+ done -+ return 1 -+ } -+ -+ # Only support resume if hibernation is currently on -+ # and no swap is mounted on a net device -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ swap_on_netdevice || [[ "$(cat /sys/power/resume)" == "0:0" ]] && return 255 -+ } -+ - return 0 - } - - diff --git a/SOURCES/0019.patch b/SOURCES/0019.patch deleted file mode 100644 index 8ac2155..0000000 --- a/SOURCES/0019.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8b1252ce33d45340a3420568c66790fb53b14d0a Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 15 Feb 2022 13:47:40 +0100 -Subject: [PATCH] 95resume: only exclude this module, when swap is netdev - -Resolves: #2017787 ---- - modules.d/95resume/module-setup.sh | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh -index f0507b13..ccf2493f 100755 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -10,10 +10,9 @@ check() { - return 1 - } - -- # Only support resume if hibernation is currently on -- # and no swap is mounted on a net device -+ # Only support resume if no swap is mounted on a net device - [[ $hostonly ]] || [[ $mount_needs ]] && { -- swap_on_netdevice || [[ "$(cat /sys/power/resume)" == "0:0" ]] && return 255 -+ swap_on_netdevice && return 255 - } - - return 0 - diff --git a/SOURCES/0020.patch b/SOURCES/0020.patch deleted file mode 100644 index d6e7053..0000000 --- a/SOURCES/0020.patch +++ /dev/null @@ -1,36 +0,0 @@ -From eff17c61ba358d03461b62c95ef593e3b8d65e26 Mon Sep 17 00:00:00 2001 -From: Coiby Xu -Date: Wed, 14 Jul 2021 15:26:10 +0800 -Subject: [PATCH] fix(qeth_rules): check the existence of - /sys/devices/qeth/*/online beforehand - -On s390x KVM machines, the follow errors occurred, - $ kdumpctl rebuild - kdump: Rebuilding /boot/initramfs-4.18.0-321.el8.s390xkdump.img - /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory - /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory - -because s390x KVM uses virtual devices and /sys/devices/qeth/*/online -doesn't exist. Eliminate this error by checking the existence -beforehand. - -(cherry picked from commit 6c71ba4121ae64ccd13fefba68ca327ac623810f) - -Resolves: #2050570 ---- - modules.d/95qeth_rules/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/95qeth_rules/module-setup.sh b/modules.d/95qeth_rules/module-setup.sh -index 914a28ce..884ae072 100755 ---- a/modules.d/95qeth_rules/module-setup.sh -+++ b/modules.d/95qeth_rules/module-setup.sh -@@ -10,6 +10,7 @@ check() { - - [[ $hostonly ]] && { - for i in /sys/devices/qeth/*/online; do -+ [ ! -f "$i" ] && continue - read -r _online < "$i" - [ "$_online" -eq 1 ] && return 0 - done - diff --git a/SOURCES/0021.patch b/SOURCES/0021.patch deleted file mode 100644 index 608265c..0000000 --- a/SOURCES/0021.patch +++ /dev/null @@ -1,85 +0,0 @@ -From a0d8caa8090a78f627f26fcd9b47c4b099cbc1ba Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Thu, 17 Jun 2021 10:47:33 -0400 -Subject: [PATCH] fix(fips): handle s390x OSTree systems - -On s390x, the `BOOT_IMAGE` karg injected by the bootloader is not a path -to the kernel image, but rather an integer describing the index of the -menu entry selected. Because of the way the s390x bootloader works, -there is no information retained about e.g. the path of the kernel that -was loaded. - -This causes issues for the FIPS code which assumes that `BOOT_IMAGE` is -a path to the kernel image to derive the HMAC path. In non-OSTree -systems, this ends up working anyway, because the kernel is located at -the root of the boot partition. In OSTree systems, this is not the -case. However, OSTree systems use BLS configs, and they are named in -reverse order of precedence (i.e. menu ordering). So from the -`BOOT_IMAGE` integer, we can figure out which BLS entry was selected. - -Add some code to do just this on s390x. This isn't completely foolproof, -because it presumes that (1) BLS configs were used to populate the -bootloader (and that they were exactly in the same state they currently -are when `zipl` was run), and (2) there are no other menu entries -originating from outside the BLS configs. However, if these assumptions -are wrong we would simply fail the boot, which is currently what is -happening anyway. - -See also: -https://github.com/openshift/os/pull/546 -https://github.com/ibm-s390-linux/s390-tools/issues/78 - -Tested-by: Muhammad Adeel - -Resolves: rhbz#2050567 ---- - modules.d/01fips/fips.sh | 21 +++++++++++++++++++++ - modules.d/01fips/module-setup.sh | 2 +- - 2 files changed, 22 insertions(+), 1 deletion(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 821c26a2..3297cb17 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -124,6 +124,27 @@ do_fips() { - else - BOOT_IMAGE="$(getarg BOOT_IMAGE)" - -+ # On s390x, BOOT_IMAGE isn't a path but an integer representing the -+ # entry number selected. Let's try the root of /boot first, and -+ # otherwise fallback to trying to parse the BLS entries if it's a -+ # BLS-based system. -+ if [ "$(uname -m)" = s390x ]; then -+ if [ -e "/boot/vmlinuz-${KERNEL}" ]; then -+ BOOT_IMAGE="vmlinuz-${KERNEL}" -+ elif [ -d /boot/loader/entries ]; then -+ i=0 -+ for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do -+ ((i++)) -+ -+ if [ $i -eq ${BOOT_IMAGE:-0} ] && [ -r "$bls" ]; then -+ BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" -+ BOOT_IMAGE=${BOOT_IMAGE:1} -+ break -+ fi -+ done -+ fi -+ fi -+ - # Trim off any leading GRUB boot device (e.g. ($root) ) - BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')" - -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index a1e499af..913a660c 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -67,7 +67,7 @@ install() { - inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh" - inst_script "$moddir/fips.sh" /sbin/fips.sh - -- inst_multiple sha512hmac rmmod insmod mount uname umount -+ inst_multiple sha512hmac rmmod insmod mount uname umount grep sort - - inst_simple /etc/system-fips - [ -c "${initdir}"/dev/random ] || mknod "${initdir}"/dev/random c 1 8 \ - diff --git a/SOURCES/0022.patch b/SOURCES/0022.patch deleted file mode 100644 index fc68c01..0000000 --- a/SOURCES/0022.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 94ec96c35678f56bc74b9c12c3229971bc40c9b3 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Mon, 22 Nov 2021 16:40:39 +0100 -Subject: [PATCH] fix(network): add errors and warnings when network interface - does not exist - -End with error, or show a warning when nonexistent device is specified for network setup like -`ip=10.12.8.12::10.12.255.254:255.255.0.0:xk12:eth0:off`. - -I've added the error only for `write-ifcfg.sh`, as I think no such setup should be written. - -(cherry picked from commit 7938935267dd8824f074adf84c219340ad4c8db6) - -Resolves: #2050562 ---- - modules.d/35network-legacy/ifup.sh | 6 +++++- - modules.d/35network-legacy/parse-ip-opts.sh | 5 +++++ - modules.d/45ifcfg/write-ifcfg.sh | 5 +++++ - 3 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index a05c4698..0dc9541c 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -446,7 +446,11 @@ for p in $(getargs ip=); do - - # If this option isn't directed at our interface, skip it - if [ -n "$dev" ]; then -- [ "$dev" != "$netif" ] && continue -+ if [ "$dev" != "$netif" ]; then -+ [ ! -e "/sys/class/net/$dev" ] \ -+ && warn "Network interface '$dev' does not exist!" -+ continue -+ fi - else - iface_is_enslaved "$netif" && continue - fi -diff --git a/modules.d/35network-legacy/parse-ip-opts.sh b/modules.d/35network-legacy/parse-ip-opts.sh -index 35917bbf..19af8789 100755 ---- a/modules.d/35network-legacy/parse-ip-opts.sh -+++ b/modules.d/35network-legacy/parse-ip-opts.sh -@@ -97,6 +97,11 @@ for p in $(getargs ip=); do - fi - # IFACES list for later use - IFACES="$IFACES $dev" -+ -+ # Interface should exist -+ if [ ! -e "/sys/class/net/$dev" ]; then -+ warn "Network interface '$dev' does not exist" -+ fi - fi - - # Do we need to check for specific options? -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index 5f71515a..345863f9 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -103,6 +103,11 @@ interface_bind() { - local _netif="$1" - local _macaddr="$2" - -+ if [ ! -e "/sys/class/net/$_netif" ]; then -+ derror "Cannot find network interface '$_netif'!" -+ return 1 -+ fi -+ - # see, if we can bind it to some hw parms - if hw_bind "$_netif" "$_macaddr"; then - # only print out DEVICE, if it's user assigned - diff --git a/SOURCES/0023.patch b/SOURCES/0023.patch deleted file mode 100644 index 9e9d70a..0000000 --- a/SOURCES/0023.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cccc1e9ff2d80c7277563fd8fa35f44db48d2fd9 Mon Sep 17 00:00:00 2001 -From: The Plumber <50238977+systemd-rhel-bot@users.noreply.github.com> -Date: Tue, 15 Feb 2022 20:26:33 +0100 -Subject: [PATCH] (#2050560) fix(url-lib): make pre-pivot hook separetely per - nfs mount (#24) - -* fix(url-lib): make pre-pivot hook separetely per nfs mount - -(cherry picked from commit 2f091b17075f81ff490b05d3d566d736fc32f0be) -(cherry picked from commit acb18869e98687a3f8c172d7e7befaa5326cf67a) -(cherry picked from commit ec50cec3bd9169410df409e077d0487c63c2a627) - -Resolves: #2050560 ---- - modules.d/45url-lib/url-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh -index e1e7d5af..b68f72b0 100755 ---- a/modules.d/45url-lib/url-lib.sh -+++ b/modules.d/45url-lib/url-lib.sh -@@ -159,7 +159,7 @@ nfs_fetch_url() { - mntdir="$(mkuniqdir /run nfs_mnt)" - mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir" - # lazy unmount during pre-pivot hook -- inst_hook --hook pre-pivot --name 99url-lib-umount-nfs umount -l -- "$mntdir" -+ inst_hook --hook pre-pivot --name 99url-lib-umount-nfs-"$(basename "$mntdir")" umount -l -- "$mntdir" - fi - - if [ -z "$outloc" ]; then - diff --git a/SOURCES/0024.patch b/SOURCES/0024.patch deleted file mode 100644 index 19c48e1..0000000 --- a/SOURCES/0024.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8d3b5eeb684f0872069fbab9e3b6470aa6a04729 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Tue, 15 Feb 2022 21:06:21 +0100 -Subject: [PATCH] Fix shellcheck for a0d8caa8090a78f627f26fcd9b47c4b099cbc1ba - -In modules.d/01fips/fips.sh line 137: - ((i++)) - ^-----^ SC3006: In POSIX sh, standalone ((..)) is undefined. - ^-- SC3018: In POSIX sh, ++ is undefined. - -In modules.d/01fips/fips.sh line 139: - if [ $i -eq ${BOOT_IMAGE:-0} ] && [ -r "$bls" ]; then - ^-- SC2086: Double quote to prevent globbing and word splitting. - ^--------------^ SC2086: Double quote to prevent globbing and word splitting. - -In modules.d/01fips/fips.sh line 141: - BOOT_IMAGE=${BOOT_IMAGE:1} - ^-------------^ SC3057: In POSIX sh, string indexing is undefined. - -Related: rhbz#2050567 ---- - modules.d/01fips/fips.sh | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 3297cb17..bee061ab 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -133,14 +133,15 @@ do_fips() { - BOOT_IMAGE="vmlinuz-${KERNEL}" - elif [ -d /boot/loader/entries ]; then - i=0 -+ # shellcheck disable=SC2012 - for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do -- ((i++)) -+ i=$((i + 1)) - -- if [ $i -eq ${BOOT_IMAGE:-0} ] && [ -r "$bls" ]; then -- BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" -- BOOT_IMAGE=${BOOT_IMAGE:1} -- break -- fi -+ if [ "$i" -eq "${BOOT_IMAGE:-0}" ] && [ -r "$bls" ]; then -+ BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" -+ BOOT_IMAGE=${BOOT_IMAGE## } -+ break -+ fi - done - fi - fi - diff --git a/SOURCES/0025.patch b/SOURCES/0025.patch deleted file mode 100644 index fe82805..0000000 --- a/SOURCES/0025.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 865d74e9388dcc6ac6eff21a44e8229ffa8283e9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Thu, 13 Jan 2022 17:35:59 +0100 -Subject: [PATCH] fix(dracut-shutdown): add cleanup handler on failure - -It may happen that dracut-shutdown.service fails, for example on timeout -due to very low bandwidth. -In such case, for hardening purposes, a new dracut-shutdown-onfailure.service -unit doing dracut-shutdown.service cleanup needs to execute to make sure -switching root to an incomplete initramfs won't occur later. - -See also RHBZ #1924587 (https://bugzilla.redhat.com/show_bug.cgi?id=1924587). - -(cherry picked from commit 7ab1d00227cad6f1b86ba01fdc766769faebb031) - -Resolves: #2050556 ---- - Makefile | 1 + - .../98dracut-systemd/dracut-shutdown-onfailure.service | 13 +++++++++++++ - modules.d/98dracut-systemd/dracut-shutdown.service | 1 + - modules.d/98dracut-systemd/dracut-shutdown.service.8.asc | 3 +++ - pkgbuild/dracut.spec | 1 + - 5 files changed, 19 insertions(+) - -diff --git a/Makefile b/Makefile -index e7d69e10..1e1d093e 100644 ---- a/Makefile -+++ b/Makefile -@@ -168,6 +168,7 @@ ifneq ($(enable_documentation),no) - endif - if [ -n "$(systemdsystemunitdir)" ]; then \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ -+ ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown-onfailure.service; \ - ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \ - ln -s ../dracut-shutdown.service \ -diff --git a/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service b/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service -new file mode 100644 -index 00000000..96de58c5 ---- /dev/null -+++ b/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service -@@ -0,0 +1,13 @@ -+# This file is part of dracut. -+# -+# See dracut.bootup(7) for details -+ -+[Unit] -+Description=Service executing upon dracut-shutdown failure to perform cleanup -+Documentation=man:dracut-shutdown.service(8) -+DefaultDependencies=no -+ -+[Service] -+Type=oneshot -+ExecStart=-/bin/rm /run/initramfs/shutdown -+StandardError=null -diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service b/modules.d/98dracut-systemd/dracut-shutdown.service -index 81043b2d..7c36f14f 100644 ---- a/modules.d/98dracut-systemd/dracut-shutdown.service -+++ b/modules.d/98dracut-systemd/dracut-shutdown.service -@@ -10,6 +10,7 @@ Wants=local-fs.target - Conflicts=shutdown.target umount.target - DefaultDependencies=no - ConditionPathExists=!/run/initramfs/bin/sh -+OnFailure=dracut-shutdown-onfailure.service - - [Service] - RemainAfterExit=yes -diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -index ba80b187..21ec88ca 100644 ---- a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -+++ b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -@@ -40,6 +40,9 @@ by injecting "rd.break=pre-shutdown rd.shell" or "rd.break=shutdown rd.shell". - # touch /run/initramfs/.need_shutdown - ---- - -+In case the unpack of the initramfs fails, dracut-shutdown-onfailure.service -+executes to make sure switch root doesn't happen, since it would result in -+switching to an incomplete initramfs. - - AUTHORS - ------- -diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec -index 04c61f90..d35bbe37 100644 ---- a/pkgbuild/dracut.spec -+++ b/pkgbuild/dracut.spec -@@ -414,6 +414,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ - %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 - diff --git a/SOURCES/0026.patch b/SOURCES/0026.patch deleted file mode 100644 index 6e2a6e1..0000000 --- a/SOURCES/0026.patch +++ /dev/null @@ -1,51 +0,0 @@ -From edce5bac8f65cee78fcf6c960ffb4e5924f81f78 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 1 Jun 2021 15:06:01 +0200 -Subject: [PATCH] fix(multipath): get config. dir from configuration - -(cherry picked from commit 2e3c5444d271cb8f05955858b8fdc367c4ea5c48) - -Resolves: #1992464 ---- - modules.d/90multipath/module-setup.sh | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index b6002c6a..05222389 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -63,6 +63,7 @@ installkernel() { - # called by dracut - install() { - local -A _allow -+ local config_dir - - add_hostonly_mpath_conf() { - if is_mpath "$1"; then -@@ -74,6 +75,16 @@ install() { - fi - } - -+ local k v -+ while read -r k v; do -+ if [[ $k == "config_dir" ]]; then -+ v="${v#\"}" -+ config_dir="${v%\"}" -+ break -+ fi -+ done < <(multipath -t 2> /dev/null) -+ [[ -d $config_dir ]] || config_dir=/etc/multipath/conf.d -+ - inst_multiple \ - pkill \ - pidof \ -@@ -91,7 +102,7 @@ install() { - /etc/xdrdevices.conf \ - /etc/multipath.conf \ - /etc/multipath/* \ -- /etc/multipath/conf.d/* -+ "$config_dir"/* - - [[ $hostonly ]] && [[ $hostonly_mode == "strict" ]] && { - for_each_host_dev_and_slaves_all add_hostonly_mpath_conf - diff --git a/SOURCES/0027.patch b/SOURCES/0027.patch deleted file mode 100644 index d2437c6..0000000 --- a/SOURCES/0027.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 955222afe5bd7f23da48b94087ad7a4256d47605 Mon Sep 17 00:00:00 2001 -From: Jan Macku -Date: Tue, 15 Feb 2022 15:29:03 +0100 -Subject: [PATCH] ci: Add Differential ShellCheck action - -Related: #2050567 ---- - .github/workflows/differential-shellcheck.yml | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml -new file mode 100644 -index 00000000..095c3fe6 ---- /dev/null -+++ b/.github/workflows/differential-shellcheck.yml -@@ -0,0 +1,17 @@ -+name: Differential ShellCheck -+on: -+ push: -+ branches: [main] -+ pull_request: -+ branches: [main] -+ -+jobs: -+ test: -+ runs-on: ubuntu-20.04 -+ -+ steps: -+ - name: Repository checkout -+ uses: actions/checkout@v2 -+ -+ - name: Differential ShellCheck -+ uses: redhat-plumbers-in-action/differential-shellcheck@v1 - diff --git a/SOURCES/0028.patch b/SOURCES/0028.patch deleted file mode 100644 index e6bfe11..0000000 --- a/SOURCES/0028.patch +++ /dev/null @@ -1,40 +0,0 @@ -From c988ca3aa81026c008bce69810584a651a0e75b3 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Wed, 16 Feb 2022 02:42:11 +0100 -Subject: [PATCH] Do not use recommends for base packages - -Resolves: rhbz#1947892 ---- - pkgbuild/dracut.spec | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec -index d35bbe37..4c9b1da3 100644 ---- a/pkgbuild/dracut.spec -+++ b/pkgbuild/dracut.spec -@@ -71,20 +71,17 @@ Requires: kmod - Requires: sed - Requires: xz - Requires: gzip -+Requires: hardlink -+Requires: pigz -+Requires: kpartx - - %if 0%{?fedora} || 0%{?rhel} --Recommends: memstrack --Recommends: hardlink --Recommends: pigz --Recommends: kpartx -+Suggests: memstrack - 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 - diff --git a/SOURCES/0029.patch b/SOURCES/0029.patch deleted file mode 100644 index df2715b..0000000 --- a/SOURCES/0029.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b4f4c927d25b273498d96ee0d367669ee011400e Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 19 Jul 2021 11:27:28 +0200 -Subject: [PATCH] 95nfs: set correct ownership and permissions for statd - directory - -The directory ownership for the statd directory should be -rpcuser:rpcuser. - -Resolves: #2017846 ---- - modules.d/95nfs/module-setup.sh | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 38da5957..1c5f780e 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -120,8 +120,13 @@ install() { - mkdir -m 0755 -p "$initdir/var/lib/nfs" - mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" - mkdir -m 0770 -p "$initdir/var/lib/rpcbind" -- [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" -- [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" -+ [ -d "$dracutsysrootdir/var/lib/nfs/statd/sm" ] \ -+ && mkdir -m 0700 -p "$initdir/var/lib/nfs/statd" \ -+ && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" \ -+ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/statd" -+ [ -d "$dracutsysrootdir/var/lib/nfs/sm" ] \ -+ && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" \ -+ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/sm" - - # Rather than copy the passwd file in, just set a user for rpcbind - # We'll save the state and restart the daemon from the root anyway diff --git a/SOURCES/0030.patch b/SOURCES/0030.patch deleted file mode 100644 index 34bc80e..0000000 --- a/SOURCES/0030.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 2bfe8c53280b6c1e18339dddc5bb60b062cad5bb Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 8 Dec 2021 14:04:25 -0600 -Subject: [PATCH] revert(lvm): remove snapshot feature - -The feature of managing lvm snapshots has no known -recent usage. It is unknown if it works. The lvm -developers do not wish to maintain or support it. - -(cherry picked from commit 1549d5e89818603e1aa6dd8a40981222f59f1548) - -Resolves: #2037955 ---- - modules.d/90lvm/lvm_scan.sh | 39 ++++----------------------------------- - 1 file changed, 4 insertions(+), 35 deletions(-) - -diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh -index c42f97d5..43601ad1 100755 ---- a/modules.d/90lvm/lvm_scan.sh -+++ b/modules.d/90lvm/lvm_scan.sh -@@ -7,8 +7,6 @@ type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh - - VGS=$(getargs rd.lvm.vg -d rd_LVM_VG=) - LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=) --SNAPSHOT=$(getargs rd.lvm.snapshot -d rd_LVM_SNAPSHOT=) --SNAPSIZE=$(getargs rd.lvm.snapsize -d rd_LVM_SNAPSIZE=) - - # shellcheck disable=SC2174 - [ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm -@@ -31,17 +29,10 @@ if [ ! -e /etc/lvm/lvm.conf ]; then - echo '}' - - # establish LVM locking -- if [ -n "$SNAPSHOT" ]; then -- echo 'global {' -- echo ' locking_type = 1' -- echo ' use_lvmetad = 0' -- echo '}' -- else -- echo 'global {' -- echo ' locking_type = 4' -- echo ' use_lvmetad = 0' -- echo '}' -- fi -+ echo 'global {' -+ echo ' locking_type = 4' -+ echo ' use_lvmetad = 0' -+ echo '}' - } > /etc/lvm/lvm.conf - lvmwritten=1 - fi -@@ -90,28 +81,6 @@ unset extraargs - - export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 - --if [ -n "$SNAPSHOT" ]; then -- # HACK - this should probably be done elsewhere or turned into a function -- # Enable read-write LVM locking -- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 1/' /etc/lvm/lvm.conf -- -- # Expected SNAPSHOT format ":" -- ORIG_LV=${SNAPSHOT%%:*} -- SNAP_LV=${SNAPSHOT##*:} -- -- info "Removing existing LVM snapshot $SNAP_LV" -- lvm lvremove --force "$SNAP_LV" 2>&1 | vinfo -- -- # Determine snapshot size -- if [ -z "$SNAPSIZE" ]; then -- SNAPSIZE=$(lvm lvs --noheadings --units m --options lv_size "$ORIG_LV") -- info "No LVM snapshot size provided, using size of $ORIG_LV ($SNAPSIZE)" -- fi -- -- info "Creating LVM snapshot $SNAP_LV ($SNAPSIZE)" -- lvm lvcreate -s -n "$SNAP_LV" -L "$SNAPSIZE" "$ORIG_LV" 2>&1 | vinfo --fi -- - if [ -n "$LVS" ]; then - info "Scanning devices $lvmdevs for LVM logical volumes $LVS" - lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo - diff --git a/SOURCES/0031.patch b/SOURCES/0031.patch deleted file mode 100644 index b035a32..0000000 --- a/SOURCES/0031.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 441c2c211d3c0fd8003ebb7622f44f360e75cbcd Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 8 Dec 2021 14:07:42 -0600 -Subject: [PATCH] revert(lvm): remove lvmetad config changes - -Remove support for modifying use_lvmetad and locking_type -settings in lvm.conf for lvm versions 2.2.*. Recent lvm -versions (2.3.*) do not include lvmetad or locking_type. -This cleanup simplifies code maintenance. - -To use the lvm module with older versions (2.2), a user -would need to ensure that lvmetad settings are disabled -in the initrd's lvm.conf rather than relying on the lvm -dracut mode to modify their lvm.conf. - -(cherry picked from commit f6f393f550625e3e1c968ef32d6d7bdd90f51d73) - -Resolves: #2037955 ---- - modules.d/90lvm/lvm_scan.sh | 3 --- - modules.d/90lvm/module-setup.sh | 14 -------------- - 2 files changed, 17 deletions(-) - -diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh -index 43601ad1..80382407 100755 ---- a/modules.d/90lvm/lvm_scan.sh -+++ b/modules.d/90lvm/lvm_scan.sh -@@ -28,10 +28,7 @@ if [ ! -e /etc/lvm/lvm.conf ]; then - echo '"r/.*/" ]' - echo '}' - -- # establish LVM locking - echo 'global {' -- echo ' locking_type = 4' -- echo ' use_lvmetad = 0' - echo '}' - } > /etc/lvm/lvm.conf - lvmwritten=1 -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index e1e6c582..0bb491f3 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -61,10 +61,6 @@ install() { - if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then - if [[ -f $dracutsysrootdir/etc/lvm/lvm.conf ]]; then - inst_simple -H /etc/lvm/lvm.conf -- # FIXME: near-term hack to establish read-only locking; -- # use command-line lvm.conf editor once it is available -- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/etc/lvm/lvm.conf" -- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/etc/lvm/lvm.conf" - fi - - export LVM_SUPPRESS_FD_WARNINGS=1 -@@ -82,16 +78,6 @@ install() { - unset LVM_SUPPRESS_FD_WARNINGS - fi - -- if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then -- mkdir -p "${initdir}/etc/lvm" -- { -- echo 'global {' -- echo 'locking_type = 4' -- echo 'use_lvmetad = 0' -- echo '}' -- } > "${initdir}/etc/lvm/lvm.conf" -- fi -- - inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules - - # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! - diff --git a/SOURCES/0032.patch b/SOURCES/0032.patch deleted file mode 100644 index c579d3c..0000000 --- a/SOURCES/0032.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a755fb8c0dfa28d57b7bbe900d3bde5d2fe4789f Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 8 Dec 2021 14:11:13 -0600 -Subject: [PATCH] revert(lvm): remove 69-dm-lvm-metad.rules - -This udev rule runs pvscan to autoactivate VGs, which dracut -does not want to do, and previously disabled by editing the -rule file and commenting out lines. - -This also stops /dev/disk/by-id/lvm-pv-uuid-* symlinks from -being created in the initrd. - -(cherry picked from commit 50e74668434d935db649b5690dc2158b0f87d91c) - -Resolves: #2037955 ---- - modules.d/90lvm/module-setup.sh | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) - -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index 0bb491f3..25be0133 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -78,20 +78,7 @@ install() { - unset LVM_SUPPRESS_FD_WARNINGS - fi - -- inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules -- -- # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! -- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then -- if grep -q SYSTEMD_WANTS "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules; then -- sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \ -- "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules -- sed -i -e 's/^ENV{ID_MODEL}=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules -- sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules -- else -- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \ -- "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules -- fi -- fi -+ inst_rules 11-dm-lvm.rules - - # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules - # files, but provides the one below: - diff --git a/SOURCES/0033.patch b/SOURCES/0033.patch deleted file mode 100644 index 0859dfd..0000000 --- a/SOURCES/0033.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bf521a1e968472b74288046830bd2c85e3cbb023 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 8 Dec 2021 14:14:27 -0600 -Subject: [PATCH] fix(lvm): replace --partial option - -The --partial option will activate a linear (or other) LV -without segments for missing devices, which is unlikely to -be useful. The intention was to activate raid LVs in a useful -form while missing devices, which is specified with the option ---activationmode degraded. - -(cherry picked from commit 97543cca48dfde849396f11c83f9c320e1b91c46) - -Resolves: #2037955 ---- - modules.d/90lvm/64-lvm.rules | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules -index 65f65249..ca718ce0 100644 ---- a/modules.d/90lvm/64-lvm.rules -+++ b/modules.d/90lvm/64-lvm.rules -@@ -15,7 +15,7 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && - GOTO="lvm_end" - - RUN+="/sbin/initqueue --settled --onetime --unique /sbin/lvm_scan" --RUN+="/sbin/initqueue --timeout --name 51-lvm_scan --onetime --unique /sbin/lvm_scan --partial" -+RUN+="/sbin/initqueue --timeout --name 51-lvm_scan --onetime --unique /sbin/lvm_scan --activationmode degraded" - RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k;'" - - LABEL="lvm_end" - diff --git a/SOURCES/0034.patch b/SOURCES/0034.patch deleted file mode 100644 index 7f3e5fd..0000000 --- a/SOURCES/0034.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 9ab4c18355df1e55c39ca96f27ddb9b540054286 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 8 Dec 2021 14:43:58 -0600 -Subject: [PATCH] feat(lvm): update lvm command options - -Drop checking for options that have been available for -at least ten years. This simplifies code maintenance. - -Add the new --nohints option (when available) to disable -the use of hints which is not useful during startup. - -(cherry picked from commit c0a54f2993b1d3c2101202c274a41f925445d54b) - -Resolves: #2037955 ---- - modules.d/90lvm/lvm_scan.sh | 41 ++++++++++++++++++++++------------------- - 1 file changed, 22 insertions(+), 19 deletions(-) - -diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh -index 80382407..00143bff 100755 ---- a/modules.d/90lvm/lvm_scan.sh -+++ b/modules.d/90lvm/lvm_scan.sh -@@ -59,39 +59,42 @@ min=$2 - sub=${3%% *} - sub=${sub%%\(*} - --lvm_ignorelockingfailure="--ignorelockingfailure" --lvm_quirk_args="--ignorelockingfailure --ignoremonitoring" -- --check_lvm_ver 2 2 57 "$maj" "$min" "$sub" \ -- && lvm_quirk_args="$lvm_quirk_args --poll n" -- --if check_lvm_ver 2 2 65 "$maj" "$min" "$sub"; then -- lvm_quirk_args=" --sysinit $extraargs" --fi -- --if check_lvm_ver 2 2 221 "$maj" "$min" "$sub"; then -- lvm_quirk_args=" $extraargs" -- unset lvm_ignorelockingfailure --fi -- -+# For lvchange and vgchange use --sysinit which: -+# disables polling (--poll n) -+# ignores monitoring (--ignoremonitoring) -+# ignores locking failures (--ignorelockingfailure) -+# disables hints (--nohints) -+# -+# For lvscan and vgscan: -+# disable locking (--nolocking) -+# disable hints (--nohints) -+ -+activate_args="--sysinit $extraargs" - unset extraargs - - export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 - -+scan_args="--nolocking" -+ -+check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \ -+ && scan_args="$scan_args --nohints" -+ - if [ -n "$LVS" ]; then - info "Scanning devices $lvmdevs for LVM logical volumes $LVS" -- lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo -+ # shellcheck disable=SC2086 -+ lvm lvscan $scan_args 2>&1 | vinfo - for LV in $LVS; do - # shellcheck disable=SC2086 -- lvm lvchange --yes -K -ay $lvm_quirk_args "$LV" 2>&1 | vinfo -+ lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo - done - fi - - if [ -z "$LVS" ] || [ -n "$VGS" ]; then - info "Scanning devices $lvmdevs for LVM volume groups $VGS" -- lvm vgscan $lvm_ignorelockingfailure 2>&1 | vinfo - # shellcheck disable=SC2086 -- lvm vgchange -ay $lvm_quirk_args $VGS 2>&1 | vinfo -+ lvm vgscan $scan_args 2>&1 | vinfo -+ # shellcheck disable=SC2086 -+ lvm vgchange -ay $activate_args $VGS 2>&1 | vinfo - fi - - if [ "$lvmwritten" ]; then - diff --git a/SOURCES/0035.patch b/SOURCES/0035.patch deleted file mode 100644 index a01de8d..0000000 --- a/SOURCES/0035.patch +++ /dev/null @@ -1,143 +0,0 @@ -From ded4448ba98305b6f0c58cdd67a8b0de9a3db0d3 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 8 Dec 2021 15:16:03 -0600 -Subject: [PATCH] feat(lvm): use generated filter when none is set - -Previously, the lvm device filter generated by dracut -would not be used if any lvm.conf file existed in the -initrd. Change this so that the generated filter will -be used when the included lvm.conf has no filter set. - -(cherry picked from commit 7ffc5e388bcce20785803825bdd260c3c854b34f) - -Resolves: #2037955 ---- - modules.d/90lvm/lvm_scan.sh | 91 +++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 75 insertions(+), 16 deletions(-) - -diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh -index 00143bff..bda265f6 100755 ---- a/modules.d/90lvm/lvm_scan.sh -+++ b/modules.d/90lvm/lvm_scan.sh -@@ -10,6 +10,7 @@ LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=) - - # shellcheck disable=SC2174 - [ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm -+[ -d /run/lvm ] || mkdir -m 0755 -p /run/lvm - # build a list of devices to scan - lvmdevs=$( - for f in /tmp/.lvm_scan-*; do -@@ -18,22 +19,6 @@ lvmdevs=$( - done - ) - --if [ ! -e /etc/lvm/lvm.conf ]; then -- { -- echo 'devices {' -- printf ' filter = [ ' -- for dev in $lvmdevs; do -- printf '"a|^/dev/%s$|", ' "$dev" -- done -- echo '"r/.*/" ]' -- echo '}' -- -- echo 'global {' -- echo '}' -- } > /etc/lvm/lvm.conf -- lvmwritten=1 --fi -- - check_lvm_ver() { - maj=$1 - min=$2 -@@ -47,6 +32,75 @@ check_lvm_ver() { - return 1 - } - -+no_lvm_conf_filter() { -+ if [ ! -e /etc/lvm/lvm.conf ]; then -+ return 0 -+ fi -+ -+ if [ -e /run/lvm/initrd_no_filter ]; then -+ return 0 -+ fi -+ -+ if [ -e /run/lvm/initrd_filter ]; then -+ return 1 -+ fi -+ -+ if [ -e /run/lvm/initrd_global_filter ]; then -+ return 1 -+ fi -+ -+ # Save lvm config results in /run to avoid running -+ # lvm config commands for every PV that's scanned. -+ -+ filter=$(lvm config devices/filter | grep "$filter=") -+ if [ -n "$filter" ]; then -+ printf '%s\n' "$filter" > /run/lvm/initrd_filter -+ return 1 -+ fi -+ -+ global_filter=$(lvm config devices/global_filter | grep "$global_filter=") -+ if [ -n "$global_filter" ]; then -+ printf '%s\n' "$global_filter" > /run/lvm/initrd_global_filter -+ return 1 -+ fi -+ -+ # /etc/lvm/lvm.conf exists with no filter setting -+ true > /run/lvm/initrd_no_filter -+ return 0 -+} -+ -+# If no lvm.conf exists, create a basic one with a global section. -+if [ ! -e /etc/lvm/lvm.conf ]; then -+ { -+ echo 'global {' -+ echo '}' -+ } > /etc/lvm/lvm.conf -+ lvmwritten=1 -+fi -+ -+# Save the original lvm.conf before appending a filter setting. -+if [ ! -e /etc/lvm/lvm.conf.orig ]; then -+ cp /etc/lvm/lvm.conf /etc/lvm/lvm.conf.orig -+fi -+ -+# If the original lvm.conf does not contain a filter setting, -+# then generate a filter and append it to the original lvm.conf. -+# The filter is generated from the list PVs that have been seen -+# so far (each has been processed by the lvm udev rule.) -+if no_lvm_conf_filter; then -+ { -+ echo 'devices {' -+ printf ' filter = [ ' -+ for dev in $lvmdevs; do -+ printf '"a|^/dev/%s$|", ' "$dev" -+ done -+ echo '"r/.*/" ]' -+ echo '}' -+ } > /etc/lvm/lvm.conf.filter -+ lvmfilter=1 -+ cat /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf.filter > /etc/lvm/lvm.conf -+fi -+ - # hopefully this output format will never change, e.g.: - # LVM version: 2.02.53(1) (2009-09-25) - OLDIFS=$IFS -@@ -99,8 +153,13 @@ fi - - if [ "$lvmwritten" ]; then - rm -f -- /etc/lvm/lvm.conf -+elif [ "$lvmfilter" ]; then -+ # revert filter that was appended to existing lvm.conf -+ cp /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf -+ rm -f -- /etc/lvm/lvm.conf.filter - fi - unset lvmwritten -+unset lvmfilter - - udevadm settle - - diff --git a/SOURCES/0036.patch b/SOURCES/0036.patch deleted file mode 100644 index bd56033..0000000 --- a/SOURCES/0036.patch +++ /dev/null @@ -1,56 +0,0 @@ -From ec9b1e872ad3be0ec9440927a0f702c7bfa80932 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Fri, 10 Dec 2021 12:51:26 -0600 -Subject: [PATCH] feat(lvm): only run lvchange for LV that is seen on devices - -Change the command listing LVs from lvscan to lvs, and list -only the LV names that are being activated. Before attempting -to activate an LV, check that that LV name appears in the -lvs command output. This avoids wasting time running an -lvchange command that we know will fail. - -(cherry picked from commit 1af46743195422aaebcde5c508a5dd479eff51ea) - -Resolves: #2037955 ---- - modules.d/90lvm/lvm_scan.sh | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh -index bda265f6..89f077ae 100755 ---- a/modules.d/90lvm/lvm_scan.sh -+++ b/modules.d/90lvm/lvm_scan.sh -@@ -119,7 +119,7 @@ sub=${sub%%\(*} - # ignores locking failures (--ignorelockingfailure) - # disables hints (--nohints) - # --# For lvscan and vgscan: -+# For lvs and vgscan: - # disable locking (--nolocking) - # disable hints (--nohints) - -@@ -136,10 +136,20 @@ check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \ - if [ -n "$LVS" ]; then - info "Scanning devices $lvmdevs for LVM logical volumes $LVS" - # shellcheck disable=SC2086 -- lvm lvscan $scan_args 2>&1 | vinfo -+ LVSLIST=$(lvm lvs $scan_args --noheading -o lv_full_name,segtype $LVS) -+ info "$LVSLIST" -+ -+ # Only attempt to activate an LV if it appears in the lvs output. - for LV in $LVS; do -- # shellcheck disable=SC2086 -- lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo -+ if strstr "$LVSLIST" "$LV"; then -+ # This lvchange is expected to fail if all PVs used by -+ # the LV are not yet present. Premature/failed lvchange -+ # could be avoided by reporting if an LV is complete -+ # from the lvs command above and skipping this lvchange -+ # if the LV is not lised as complete. -+ # shellcheck disable=SC2086 -+ lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo -+ fi - done - fi - - diff --git a/SOURCES/0037.patch b/SOURCES/0037.patch deleted file mode 100644 index bcf12d4..0000000 --- a/SOURCES/0037.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f659bd462a6b605c36a89fa205b41bf8f55c41be Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Fri, 17 Dec 2021 12:14:51 -0600 -Subject: [PATCH] fix(lvm): restore setting LVM_MD_PV_ACTIVATED - -The 69-dm-lvm-metad.rules udev rule has been removed from -the initrd, because it's been dropped by recent upstream -lvm versions, and it never performed any primary function -within the initrd. But, it did have the job of setting -LVM_MD_PV_ACTIVATED=1 for active md devices used by PVs. -That step needs to be restored, and is now included in -64-lvm.rules. - -(cherry picked from commit 164e5ebb1199ea3e3d641ce402d8257f0055a529) - -Resolves: #2037955 ---- - modules.d/90lvm/64-lvm.rules | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules -index ca718ce0..1ad49111 100644 ---- a/modules.d/90lvm/64-lvm.rules -+++ b/modules.d/90lvm/64-lvm.rules -@@ -6,6 +6,14 @@ - - SUBSYSTEM!="block", GOTO="lvm_end" - ACTION!="add|change", GOTO="lvm_end" -+ -+# If the md device is active (indicated by array_state), then set the flag -+# LVM_MD_PV_ACTIVATED=1 indicating that the md device for the PV is ready -+# to be used. The lvm udev rule running in root will check that this flag -+# is set before it will process the md device (it wants to avoid -+# processing an md device that exists but is not yet ready to be used.) -+KERNEL=="md[0-9]*", ACTION=="change", ENV{ID_FS_TYPE}=="LVM2_member", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1" -+ - # Also don't process disks that are slated to be a multipath device - ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end" - KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end" diff --git a/SOURCES/0038.patch b/SOURCES/0038.patch deleted file mode 100644 index 0b7e2d9..0000000 --- a/SOURCES/0038.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 697811ff58c3dfa62fad86e9fe8c9dd7268cadfa Mon Sep 17 00:00:00 2001 -From: Pingfan Liu -Date: Wed, 28 Jul 2021 18:13:43 +0800 -Subject: [PATCH] fix(kernel-modules): detect block device's hardware driver - -On hostonly mode, the platform driver is not copied blindless. There -should be a way to detect the real hardware driver, which probes a block -device. - -/sys/dev/block/major:minor is a symbol link, which points to the real -device, recording the hardware stack. And those info can help to -identify the associated drivers for the hardware stack. - -Signed-off-by: Pingfan Liu ---- -v2 -> v3: - address shellcheck in dracut-functions.sh -v1 -> v2: - remove local variable _extra_mod - shorten subject - -(cherry picked from commit c86f4d286000d1e76fd405560b4114537e2cbbff) - -Resolves: #1981251 ---- - dracut-functions.sh | 21 +++++++++++++++++++++ - modules.d/90kernel-modules/module-setup.sh | 6 ++++++ - 2 files changed, 27 insertions(+) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 5206bd21..32177994 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -617,6 +617,27 @@ for_each_host_dev_and_slaves() { - return 1 - } - -+# /sys/dev/block/major:minor is symbol link to real hardware device -+# go downstream $(realpath /sys/dev/block/major:minor) to detect driver -+get_blockdev_drv_through_sys() { -+ local _block_mods="" -+ local _path -+ -+ _path=$(realpath "$1") -+ while true; do -+ if [[ -L "$_path"/driver/module ]]; then -+ _mod=$(realpath "$_path"/driver/module) -+ _mod=$(basename "$_mod") -+ _block_mods="$_block_mods $_mod" -+ fi -+ _path=$(dirname "$_path") -+ if [[ $_path == '/sys/devices' ]] || [[ $_path == '/' ]]; then -+ break -+ fi -+ done -+ echo "$_block_mods" -+} -+ - # ugly workaround for the lvm design - # There is no volume group device, - # so, there are no slave devices for volume groups. -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 36f8ca3c..86e281ae 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -16,9 +16,15 @@ installkernel() { - } - - record_block_dev_drv() { -+ - for _mod in $(get_dev_module /dev/block/"$1"); do - _hostonly_drvs["$_mod"]="$_mod" - done -+ -+ for _mod in $(get_blockdev_drv_through_sys "/sys/dev/block/$1"); do -+ _hostonly_drvs["$_mod"]="$_mod" -+ done -+ - ((${#_hostonly_drvs[@]} > 0)) && return 0 - return 1 - } - diff --git a/SOURCES/0039.patch b/SOURCES/0039.patch deleted file mode 100644 index b18aaf2..0000000 --- a/SOURCES/0039.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1cd3626354131eecbaea0ce16f04be34ad4dfbf9 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Fri, 11 Mar 2022 14:04:16 +0100 -Subject: [PATCH] fix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set - -It can happen that SELINUXTYPE is not set, e.g., in Fedora/RHEL -installation images /etc/selinux/config is an empty file. That means -that setfiles fails, which makes dracut-initramfs-restore fail too -because it uses "set -x", which means that dracut-shutdown.service -fails. But, after commit 7ab1d00227cad6f1b86ba01fdc766769faebb031, a -failure of dracut-shutdown.service means that the final switch back into -initrd is skipped. Let's just add an additional sanity check to -workaround that. - -Resolves: #2059552 ---- - dracut-initramfs-restore.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index d97030a3..25cc881d 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -65,7 +65,7 @@ fi - - if [ -e /etc/selinux/config -a -x /usr/sbin/setfiles ]; then - . /etc/selinux/config -- /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null -+ [ -n "${SELINUXTYPE}" ] && /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null - fi - - exit 0 diff --git a/SOURCES/0040.patch b/SOURCES/0040.patch deleted file mode 100644 index 46d1e9a..0000000 --- a/SOURCES/0040.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 30fe16eafd75336c74ee16003452f0681c1ea4ed Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Fri, 25 Mar 2022 16:39:55 +0100 -Subject: [PATCH] fix(bluetooth): nullglob should not be needed - ---- - modules.d/62bluetooth/module-setup.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/62bluetooth/module-setup.sh b/modules.d/62bluetooth/module-setup.sh -index b8270dd5..e4b8b06c 100755 ---- a/modules.d/62bluetooth/module-setup.sh -+++ b/modules.d/62bluetooth/module-setup.sh -@@ -51,8 +51,8 @@ installkernel() { - # Install the required file(s) for the module in the initramfs. - install() { - # shellcheck disable=SC2064 -- trap "$(shopt -p nullglob globstar)" RETURN -- shopt -q -s nullglob globstar -+ trap "$(shopt -p globstar)" RETURN -+ shopt -q -s globstar - local -a var_lib_files - - inst_multiple \ - diff --git a/SOURCES/0041.patch b/SOURCES/0041.patch deleted file mode 100644 index 9f5b867..0000000 --- a/SOURCES/0041.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a8018a5553bfccfbd28ea77e06207d68f60f12e6 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Fri, 25 Mar 2022 16:20:16 +0100 -Subject: [PATCH] fix(dracut-install): do not fail when SOURCE is optional and - missing - -When running dracut-install with '-o' (optional source), and nullglob -at the same time, when all of the arguments evaluate , dracut-install -should not fail even when the source is not specified. - -Resolves: #2047654 ---- - src/install/dracut-install.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c -index 9a40e022..ad16b98f 100644 ---- a/src/install/dracut-install.c -+++ b/src/install/dracut-install.c -@@ -1199,8 +1199,12 @@ static int parse_argv(int argc, char *argv[]) - } - - if (!optind || optind == argc) { -- log_error("No SOURCE argument given"); -- usage(EXIT_FAILURE); -+ if (!arg_optional) { -+ log_error("No SOURCE argument given"); -+ usage(EXIT_FAILURE); -+ } else { -+ exit(EXIT_SUCCESS); -+ } - } - - return 1; - diff --git a/SOURCES/0042.patch b/SOURCES/0042.patch deleted file mode 100644 index 1772a1f..0000000 --- a/SOURCES/0042.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0b46516a1b7ab5f70e4a08274555e111ccd0bbd3 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Fri, 25 Mar 2022 16:57:28 +0100 -Subject: [PATCH] fix(test): nullglob should not be needed - ---- - test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 38cb1464..c44151b9 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -47,8 +47,8 @@ test_run() { - - test_setup() { - # shellcheck disable=SC2064 -- trap "$(shopt -p nullglob globstar)" RETURN -- shopt -q -s nullglob globstar -+ trap "$(shopt -p globstar)" RETURN -+ shopt -q -s globstar - - export kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay - diff --git a/SOURCES/0043.patch b/SOURCES/0043.patch deleted file mode 100644 index 60218a0..0000000 --- a/SOURCES/0043.patch +++ /dev/null @@ -1,52 +0,0 @@ -From a6984b52a7194d2b4a0007af74659f3a5fd2c9ed Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Fri, 25 Mar 2022 17:26:19 +0100 -Subject: [PATCH] fix(10i18n): stop leaking shell options - -Avoid using shell options in findkeymap, instead of using a wrapper[*] -to restore the previous options. Using mapfile and find to generate the list -of files also has the benefit of being more readable in this case. - -[*] Reverted commit 35064768ebf14d3ec6bf3f7df52580fb4920ea3d -Original issue description from Michal Hecko : - -The findkeymap function manipulates the shell options and relies on -restoring them using the trap. However, as the function might be called -recursively, each recursive invocation changes the signal handler to its -own. As the recursion is entered with shell options already modified, -the changed trap handler is replaced with restoration to the modified -shell options, not the original ones. - -Resolves: #2047654 ---- - modules.d/10i18n/module-setup.sh | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh -index f25026fb..35bda36f 100755 ---- a/modules.d/10i18n/module-setup.sh -+++ b/modules.d/10i18n/module-setup.sh -@@ -31,10 +31,6 @@ install() { - VCONFIG_CONF="/etc/vconsole.conf" - - findkeymap() { -- # shellcheck disable=SC2064 -- trap "$(shopt -p nullglob globstar)" RETURN -- shopt -q -s nullglob globstar -- - local -a MAPS - local MAPNAME - local INCLUDES -@@ -46,7 +42,10 @@ install() { - MAPS=("$1") - else - MAPNAME=${1%.map*} -- MAPS=("$dracutsysrootdir""${kbddir}"/keymaps/**/"${MAPNAME}"{,.map{,.*}}) -+ -+ mapfile -t -d '' MAPS < <( -+ find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f \( -name "${MAPNAME}" -o -name "${MAPNAME}.map*" \) -print0 -+ ) - fi - - for MAP in "${MAPS[@]}"; do - diff --git a/SOURCES/0044.patch b/SOURCES/0044.patch deleted file mode 100644 index 6b758b7..0000000 --- a/SOURCES/0044.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 56a29d9a9283338a8d7b5af6b6b9aeb06ac34f3f Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Fri, 25 Mar 2022 17:39:04 +0100 -Subject: [PATCH] docs: do not mention nullglob in cases where it's not needed - ---- - docs/BASH.md | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/docs/BASH.md b/docs/BASH.md -index 941754ea..e72a2f66 100644 ---- a/docs/BASH.md -+++ b/docs/BASH.md -@@ -16,8 +16,8 @@ Don't use `dirname`, use: - If you set `shopt` in a function, reset to its default state with `trap`: - ```shell - func() { -- trap "$(shopt -p nullglob globstar)" RETURN -- shopt -q -s nullglob globstar -+ trap "$(shopt -p globstar)" RETURN -+ shopt -q -s globstar - } - ``` - -@@ -51,8 +51,8 @@ func() { - Or collect the filenames in an array, if you need them more than once: - ```shell - func() { -- trap "$(shopt -p nullglob globstar)" RETURN -- shopt -q -s nullglob globstar -+ trap "$(shopt -p globstar)" RETURN -+ shopt -q -s globstar - - filenames=( /usr/lib*/**/lib*.a ) - diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index e6d41b9..404e8c6 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -5,10 +5,10 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 45.git20220404 +%define dist_free_release 13.git20220816 Name: dracut -Version: 055 +Version: 057 Release: %{dist_free_release}%{?dist} Summary: Initramfs generator using udev @@ -41,38 +41,6 @@ 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 -Patch26: 0026.patch -Patch27: 0027.patch -Patch28: 0028.patch -Patch29: 0029.patch -Patch30: 0030.patch -Patch31: 0031.patch -Patch32: 0032.patch -Patch33: 0033.patch -Patch34: 0034.patch -Patch35: 0035.patch -Patch36: 0036.patch -Patch37: 0037.patch -Patch38: 0038.patch -Patch39: 0039.patch -Patch40: 0040.patch -Patch41: 0041.patch -Patch42: 0042.patch -Patch43: 0043.patch -Patch44: 0044.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -259,9 +227,6 @@ 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 @@ -370,6 +335,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{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 @@ -400,6 +366,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/50plymouth %{dracutlibdir}/modules.d/62bluetooth %{dracutlibdir}/modules.d/80lvmmerge +%{dracutlibdir}/modules.d/80lvmthinpool-monitor %{dracutlibdir}/modules.d/90btrfs %{dracutlibdir}/modules.d/90crypt %{dracutlibdir}/modules.d/90dm @@ -414,6 +381,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{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 @@ -424,6 +394,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{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 @@ -477,6 +448,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %files network %{dracutlibdir}/modules.d/01systemd-networkd +%{dracutlibdir}/modules.d/35connman %{dracutlibdir}/modules.d/35network-manager %{dracutlibdir}/modules.d/35network-legacy %{dracutlibdir}/modules.d/35network-wicked @@ -526,26 +498,17 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog -* Mon Apr 04 2022 Pavel Valena - 055-45.git20220404 -- fix(bluetooth): nullglob should not be needed -- fix(dracut-install): do not fail when SOURCE is optional and -- fix(test): nullglob should not be needed -- fix(10i18n): stop leaking shell options -- docs: do not mention nullglob in cases where it's not needed - -* Mon Apr 04 2022 Pavel Valena - 055-40.git20220404 -- fix(kernel-modules): detect block device's hardware driver -- fix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set - -* Tue Mar 22 2022 Pavel Valena - 055-38.git20220322 -- revert(lvm): remove snapshot feature -- revert(lvm): remove lvmetad config changes -- revert(lvm): remove 69-dm-lvm-metad.rules -- fix(lvm): replace --partial option -- feat(lvm): update lvm command options -- feat(lvm): use generated filter when none is set -- feat(lvm): only run lvchange for LV that is seen on devices -- fix(lvm): restore setting LVM_MD_PV_ACTIVATED +* Tue Aug 16 2022 Pavel Valena - 057-13.git20220816 +- fix(kernel-modules): always include nvmem driver on +- fix(drm): add video drivers needed on hyper-v and similar +- fix(skipcpio): ignore broken pipe + +* 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 * Wed Feb 16 2022 Pavel Valena - 055-30.git20220216 - fix(shutdown): be robust against forced shutdown