Browse Source

initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2 years ago
commit
e81051b5bc
  1. 474
      SOURCES/0001.patch
  2. 87
      SOURCES/0002.patch
  3. 143
      SOURCES/0003.patch
  4. 71
      SOURCES/0004.patch
  5. 25
      SOURCES/0005.patch
  6. 29
      SOURCES/0006.patch
  7. 45
      SOURCES/0007.patch
  8. 43
      SOURCES/0008.patch
  9. 42
      SOURCES/0009.patch
  10. 35
      SOURCES/0010.patch
  11. 23
      SOURCES/0011.patch
  12. 88
      SOURCES/0012.patch
  13. 27
      SOURCES/0013.patch
  14. 24
      SOURCES/0014.patch
  15. 41
      SOURCES/0015.patch
  16. 59
      SOURCES/0016.patch
  17. 41
      SOURCES/0017.patch
  18. 38
      SOURCES/0018.patch
  19. 28
      SOURCES/0019.patch
  20. 36
      SOURCES/0020.patch
  21. 85
      SOURCES/0021.patch
  22. 70
      SOURCES/0022.patch
  23. 31
      SOURCES/0023.patch
  24. 51
      SOURCES/0024.patch
  25. 94
      SOURCES/0025.patch
  26. 51
      SOURCES/0026.patch
  27. 34
      SOURCES/0027.patch
  28. 40
      SOURCES/0028.patch
  29. 34
      SOURCES/0029.patch
  30. 81
      SOURCES/0030.patch
  31. 71
      SOURCES/0031.patch
  32. 46
      SOURCES/0032.patch
  33. 32
      SOURCES/0033.patch
  34. 85
      SOURCES/0034.patch
  35. 143
      SOURCES/0035.patch
  36. 56
      SOURCES/0036.patch
  37. 39
      SOURCES/0037.patch
  38. 502
      SOURCES/lgpl-2.1.txt
  39. 1949
      SPECS/dracut.spec

474
SOURCES/0001.patch

@ -0,0 +1,474 @@ @@ -0,0 +1,474 @@
From 0cdd05ba6644ef6215e4cfa83e1759f7059b5d6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= <lnykryn@redhat.com>
Date: Mon, 7 Jun 2021 14:02:29 +0200
Subject: [PATCH] Merge pull request #1 from mrc0mmand/ci-config

CI configuration
---
.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(-)

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/.packit.yml b/.packit.yml
index 482b4c4d..acc1f968 100644
--- a/.packit.yml
+++ b/.packit.yml
@@ -1,55 +1,45 @@
+---
# 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
+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_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
+# 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
-
+# 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
+
+# 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

87
SOURCES/0002.patch

@ -0,0 +1,87 @@ @@ -0,0 +1,87 @@
From 976f5e053537e424edcdcb2325230d370454efd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= <lnykryn@redhat.com>
Date: Mon, 7 Jun 2021 19:40:22 +0200
Subject: [PATCH] Merge pull request #3 from
redhat-plumbers/reconfigure-gh-actions

ci: drop the hardcoded repo owner name
---
.github/workflows/container.yml | 6 +++---
.github/workflows/integration.yml | 6 +++---
.github/workflows/lint.yml | 4 ++--
3 files changed, 8 insertions(+), 8 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 ]
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
on:
push:
- branches: [ master ]
+ branches: [ main ]
pull_request:
- branches: [ master ]
+ branches: [ main ]
jobs:
lint-c:

143
SOURCES/0003.patch

@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
From 5384368467e20c3243223ed46b997954c0d9eea0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= <lnykryn@redhat.com>
Date: Wed, 9 Jun 2021 14:12:25 +0200
Subject: [PATCH] Merge pull request #6 from redhat-plumbers/centos-stream-job

ci: add a CentOS 8 Stream job
---
.github/workflows/container.yml | 1 +
.github/workflows/integration.yml | 41 ++++++++++++++++++++
test/container/Dockerfile-CentOS-8-Stream | 63 +++++++++++++++++++++++++++++++
3 files changed, 105 insertions(+)

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:
- 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"]

71
SOURCES/0004.patch

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
From 456c3badc622cb8c4b6ec59bc37436f3d50f7ed5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= <lnykryn@redhat.com>
Date: Fri, 9 Jul 2021 12:32:00 +0200
Subject: [PATCH] Merge pull request #7 from lnykryn/bz1977347

Bz1977347
---
dracut.sh | 7 +++++--
modules.d/99squash/module-setup.sh | 8 ++++----
2 files changed, 9 insertions(+), 6 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
}

25
SOURCES/0005.patch

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
From 1b02912a8ed0767dc7881c45d55856f825e52b3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= <lnykryn@redhat.com>
Date: Fri, 9 Jul 2021 12:32:10 +0200
Subject: [PATCH] Merge pull request #8 from lnykryn/bz1970712

fix(network-manager): don't pull in systemd-udev-settle
---
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

29
SOURCES/0006.patch

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
From 7d3226fe3462685a4a0ad6b8cbe704c9d08f4e77 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
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

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(-)

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 @@
# 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
find_kernel_modules_external() {

45
SOURCES/0007.patch

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
From 5f8012de4cb73b90d69075e8118d904302d41c20 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Mon, 9 Aug 2021 09:28:46 +0200
Subject: [PATCH] fix(network-manager): check for nm-initrd-generator in both
/usr/{libexec,lib}

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(-)

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

43
SOURCES/0008.patch

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
From aa561847a82c2446ead5e41742f453629f112b63 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Wed, 4 Aug 2021 09:37:31 +0200
Subject: [PATCH] fix(cms): reload NetworkManager connections

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.

https://bugzilla.redhat.com/show_bug.cgi?id=1975929
(cherry picked from commit 07977ee5c5294a5d30c1f33f292a0b31303750fb)

Resolves: #1975929
---
modules.d/35network-manager/nm-lib.sh | 4 ++++
modules.d/80cms/cmsifup.sh | 1 +
2 files changed, 5 insertions(+)

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
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"
fi

42
SOURCES/0009.patch

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
From 058ffa90669a4dbd2af16e025f22312408ed4ba9 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Tue, 24 Aug 2021 15:39:25 +0200
Subject: [PATCH] 95resume: always install this module

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

RHEL-only

Resolves: #1926544
---
modules.d/95resume/module-setup.sh | 14 --------------
1 file changed, 14 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 @@
# 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
}

35
SOURCES/0010.patch

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
From 324e6ba13d8abef22c636e64ad0cbd8018704c93 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Tue, 9 Nov 2021 12:39:19 +0100
Subject: [PATCH] ci: use C9S chroots for Packit/TFT

---
.packit.yml | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

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

23
SOURCES/0011.patch

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
From 816891a11e3a3b4a792b68257eff4af7df411064 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Tue, 9 Nov 2021 12:45:47 +0100
Subject: [PATCH] ci: drop patches from the C9S spec before using it

---
.packit.yml | 2 ++
1 file changed, 2 insertions(+)

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"
# Available targets can be listed via `copr-cli list-chroots`
jobs:

88
SOURCES/0012.patch

@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
From d19ca83f909ed695f199aa688406f62e3eecadcd Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Tue, 9 Nov 2021 16:01:51 +0100
Subject: [PATCH] ci: bump C8 jobs to C9S

rhel-only
---
.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(-)

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
@@ -7,17 +7,8 @@ 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
-# 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)

27
SOURCES/0013.patch

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
From cc4e8d16b743b8b720b502174df7c934a2d5c5dc Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
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 \

24
SOURCES/0014.patch

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
From 33170038ddc5affa14e9464337983cfad033b8a4 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
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 \

41
SOURCES/0015.patch

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
From d8f6162d3d86c81744c5f2c8215959aac3a2f9e9 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
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 \

59
SOURCES/0016.patch

@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
From 6e304517801fdfb58df582e37cd4df04b5adc1b6 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
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"} \

41
SOURCES/0017.patch

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
From cecc1fbae879c189739691ecff3df67d20b0899a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
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

38
SOURCES/0018.patch

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
From 9e17bed7c0f30f6c557f837592772522c384779b Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
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
}

28
SOURCES/0019.patch

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
From 8b1252ce33d45340a3420568c66790fb53b14d0a Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
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

36
SOURCES/0020.patch

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
From eff17c61ba358d03461b62c95ef593e3b8d65e26 Mon Sep 17 00:00:00 2001
From: Coiby Xu <coxu@redhat.com>
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

85
SOURCES/0021.patch

@ -0,0 +1,85 @@ @@ -0,0 +1,85 @@
From a0d8caa8090a78f627f26fcd9b47c4b099cbc1ba Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jonathan@jlebon.com>
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 <muhammad.adeel@ibm.com>

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 \

70
SOURCES/0022.patch

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
From 94ec96c35678f56bc74b9c12c3229971bc40c9b3 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
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

31
SOURCES/0023.patch

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

51
SOURCES/0024.patch

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
From 8d3b5eeb684f0872069fbab9e3b6470aa6a04729 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
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

94
SOURCES/0025.patch

@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
From 865d74e9388dcc6ac6eff21a44e8229ffa8283e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
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

51
SOURCES/0026.patch

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
From edce5bac8f65cee78fcf6c960ffb4e5924f81f78 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
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

34
SOURCES/0027.patch

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
From 955222afe5bd7f23da48b94087ad7a4256d47605 Mon Sep 17 00:00:00 2001
From: Jan Macku <jamacku@redhat.com>
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

40
SOURCES/0028.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
From c988ca3aa81026c008bce69810584a651a0e75b3 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
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

34
SOURCES/0029.patch

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
From b4f4c927d25b273498d96ee0d367669ee011400e Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
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

81
SOURCES/0030.patch

@ -0,0 +1,81 @@ @@ -0,0 +1,81 @@
From 2bfe8c53280b6c1e18339dddc5bb60b062cad5bb Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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 name>:<snap lv name>"
- 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

71
SOURCES/0031.patch

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
From 441c2c211d3c0fd8003ebb7622f44f360e75cbcd Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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!

46
SOURCES/0032.patch

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
From a755fb8c0dfa28d57b7bbe900d3bde5d2fe4789f Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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:

32
SOURCES/0033.patch

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
From bf521a1e968472b74288046830bd2c85e3cbb023 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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"

85
SOURCES/0034.patch

@ -0,0 +1,85 @@ @@ -0,0 +1,85 @@
From 9ab4c18355df1e55c39ca96f27ddb9b540054286 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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

143
SOURCES/0035.patch

@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
From ded4448ba98305b6f0c58cdd67a8b0de9a3db0d3 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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

56
SOURCES/0036.patch

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
From ec9b1e872ad3be0ec9440927a0f702c7bfa80932 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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

39
SOURCES/0037.patch

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
From f659bd462a6b605c36a89fa205b41bf8f55c41be Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
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"

502
SOURCES/lgpl-2.1.txt

@ -0,0 +1,502 @@ @@ -0,0 +1,502 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999

Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.

We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.

We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.

For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)

"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) The modified work must itself be a software library.

b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.

c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.

d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.

(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.

If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:

a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)

b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.

c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.

d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.

e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.

For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.

b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.

8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.

13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.

<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice

That's all there is to it!

1949
SPECS/dracut.spec

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save