Compare commits
No commits in common. "c9s" and "c8" have entirely different histories.
|
@ -1 +1 @@
|
|||
20a52ee200099c22550e344dc041590dd570c896 dracut-057.tar.xz
|
||||
62ab5e53c734ad6ec77ebf0580383e8b6de96d16 SOURCES/dracut-049.tar.xz
|
||||
|
|
|
@ -1 +1 @@
|
|||
/dracut-*.tar.xz
|
||||
SOURCES/dracut-049.tar.xz
|
||||
|
|
270
0001.patch
270
0001.patch
|
@ -1,270 +0,0 @@
|
|||
From b13e8ee2caaa84046e25a73e52dedb9c0f5c57a3 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 12 Jul 2022 14:12:04 +0200
|
||||
Subject: [PATCH] ci: all layered RHEL-9 changes
|
||||
|
||||
- previous downstream changes
|
||||
- use dracut.spec as submitted in the PR
|
||||
- sync selected changes from upstream
|
||||
- add new-main for pull-requests temporarily
|
||||
|
||||
rhel-only
|
||||
Related: #2066816
|
||||
---
|
||||
.github/workflows/container.yml | 7 ++--
|
||||
.github/workflows/differential-shellcheck.yml | 19 ++++++++++
|
||||
.github/workflows/integration.yml | 47 ++++++++++++++++++++++--
|
||||
.github/workflows/lint.yml | 4 +-
|
||||
.packit.yml | 36 ++++++++++++++++++
|
||||
test/container/Dockerfile-CentOS-9-Stream | 53 +++++++++++++++++++++++++++
|
||||
6 files changed, 158 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
|
||||
index 03c9c5ec..99d57f5b 100644
|
||||
--- a/.github/workflows/container.yml
|
||||
+++ b/.github/workflows/container.yml
|
||||
@@ -3,12 +3,12 @@ on:
|
||||
schedule:
|
||||
- cron: '30 11 * * *' # every day at 4:40
|
||||
push:
|
||||
- branches: [ master ]
|
||||
+ branches: [ main ]
|
||||
paths:
|
||||
- 'test/container/**'
|
||||
- '.github/workflows/container.yml'
|
||||
pull_request:
|
||||
- branches: [ master ]
|
||||
+ branches: [ main new-main ]
|
||||
paths:
|
||||
- 'test/container/**'
|
||||
- '.github/workflows/container.yml'
|
||||
@@ -31,6 +31,7 @@ jobs:
|
||||
- { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' }
|
||||
- { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
|
||||
- { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
|
||||
+ - { dockerfile: 'Dockerfile-CentOS-9-Stream', tag: 'centos:stream9' }
|
||||
- { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
@@ -49,5 +50,5 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: test/container/${{ matrix.config.dockerfile }}
|
||||
- tags: ghcr.io/dracutdevs/${{ matrix.config.tag }}
|
||||
+ tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.config.tag }}
|
||||
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
|
||||
diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml
|
||||
new file mode 100644
|
||||
index 00000000..c4b05fad
|
||||
--- /dev/null
|
||||
+++ b/.github/workflows/differential-shellcheck.yml
|
||||
@@ -0,0 +1,19 @@
|
||||
+name: Differential ShellCheck
|
||||
+on:
|
||||
+ pull_request:
|
||||
+ branches: [ main new-main ]
|
||||
+
|
||||
+jobs:
|
||||
+ test:
|
||||
+ runs-on: ubuntu-20.04
|
||||
+
|
||||
+ steps:
|
||||
+ - name: Repository checkout
|
||||
+ uses: actions/checkout@v3
|
||||
+ with:
|
||||
+ fetch-depth: 0
|
||||
+
|
||||
+ - name: Differential ShellCheck
|
||||
+ uses: redhat-plumbers-in-action/differential-shellcheck@v2
|
||||
+ with:
|
||||
+ token: ${{ secrets.GITHUB_TOKEN }}
|
||||
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
|
||||
index 3d78555f..aa354e3e 100644
|
||||
--- a/.github/workflows/integration.yml
|
||||
+++ b/.github/workflows/integration.yml
|
||||
@@ -2,7 +2,7 @@ name: Integration Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
- branches: [ master ]
|
||||
+ branches: [ main new-main ]
|
||||
|
||||
jobs:
|
||||
basic:
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
]
|
||||
fail-fast: false
|
||||
container:
|
||||
- image: ghcr.io/dracutdevs/${{ matrix.container }}
|
||||
+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
|
||||
options: "--privileged -v /dev:/dev"
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
@@ -69,7 +69,48 @@ jobs:
|
||||
]
|
||||
fail-fast: false
|
||||
container:
|
||||
- image: ghcr.io/dracutdevs/${{ matrix.container }}
|
||||
+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
|
||||
+ options: "--privileged -v /dev:/dev"
|
||||
+ steps:
|
||||
+ - name: "Checkout Repository"
|
||||
+ uses: actions/checkout@v2
|
||||
+ with:
|
||||
+ fetch-depth: 0
|
||||
+
|
||||
+ - name: "${{ matrix.container }} TEST-${{ matrix.test }}"
|
||||
+ run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
|
||||
+ centos-9-stream:
|
||||
+ runs-on: ubuntu-latest
|
||||
+ timeout-minutes: 45
|
||||
+ concurrency:
|
||||
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
|
||||
+ cancel-in-progress: true
|
||||
+ strategy:
|
||||
+ matrix:
|
||||
+ container: [
|
||||
+ "centos:stream9",
|
||||
+ ]
|
||||
+ # Disabled tests (due to dropped packages in RHEL/CentOS):
|
||||
+ # 03, 04, 15: requires btrfs
|
||||
+ # 14: requires dmraid
|
||||
+ # 30, 31, 35, 36: requires scsi-target-utils
|
||||
+ test: [
|
||||
+ "01",
|
||||
+ "02",
|
||||
+ "10",
|
||||
+ "11",
|
||||
+ "12",
|
||||
+ "13",
|
||||
+ "17",
|
||||
+ "20",
|
||||
+ "21",
|
||||
+ "40",
|
||||
+ "41",
|
||||
+ "98",
|
||||
+ ]
|
||||
+ fail-fast: false
|
||||
+ container:
|
||||
+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
|
||||
options: "--privileged -v /dev:/dev"
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
|
||||
index 7b1b8ee7..5e3a299f 100644
|
||||
--- a/.github/workflows/lint.yml
|
||||
+++ b/.github/workflows/lint.yml
|
||||
@@ -2,9 +2,9 @@ name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
- branches: [ master ]
|
||||
+ branches: [ main ]
|
||||
pull_request:
|
||||
- branches: [ master ]
|
||||
+ branches: [ main new-main ]
|
||||
|
||||
jobs:
|
||||
lint-c:
|
||||
diff --git a/.packit.yml b/.packit.yml
|
||||
new file mode 100644
|
||||
index 00000000..86ba83d2
|
||||
--- /dev/null
|
||||
+++ b/.packit.yml
|
||||
@@ -0,0 +1,36 @@
|
||||
+---
|
||||
+# 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/
|
||||
+
|
||||
+specfile_path: pkgbuild/dracut.spec
|
||||
+synced_files:
|
||||
+ - .packit.yaml
|
||||
+upstream_package_name: dracut
|
||||
+downstream_package_name: dracut
|
||||
+upstream_tag_template: "{version}"
|
||||
+
|
||||
+actions:
|
||||
+ post-upstream-clone:
|
||||
+ # Use the current specfile
|
||||
+ - "cp pkgbuild/dracut.spec ."
|
||||
+
|
||||
+# Available targets can be listed via `copr-cli list-chroots`
|
||||
+jobs:
|
||||
+# Build test
|
||||
+- job: copr_build
|
||||
+ trigger: pull_request
|
||||
+ metadata:
|
||||
+ targets:
|
||||
+ - centos-stream-9-x86_64
|
||||
+ - centos-stream-9-aarch64
|
||||
+
|
||||
+# Run tests (via testing farm)
|
||||
+- job: tests
|
||||
+ trigger: pull_request
|
||||
+ metadata:
|
||||
+ targets:
|
||||
+ - centos-stream-9-x86_64
|
||||
diff --git a/test/container/Dockerfile-CentOS-9-Stream b/test/container/Dockerfile-CentOS-9-Stream
|
||||
new file mode 100644
|
||||
index 00000000..c9a96020
|
||||
--- /dev/null
|
||||
+++ b/test/container/Dockerfile-CentOS-9-Stream
|
||||
@@ -0,0 +1,53 @@
|
||||
+FROM quay.io/centos/centos:stream9
|
||||
+
|
||||
+MAINTAINER https://github.com/dracutdevs/dracut
|
||||
+
|
||||
+ENV container docker
|
||||
+LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE"
|
||||
+
|
||||
+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh
|
||||
+
|
||||
+# Install needed packages for the dracut CI container
|
||||
+# FIXME: properly re-add dash once C9S EPEL is available
|
||||
+RUN dnf -y install --enablerepo crb --setopt=install_weak_deps=False \
|
||||
+ http://mirrors.kernel.org/fedora/releases/34/Everything/x86_64/os/Packages/d/dash-0.5.10.2-8.fc34.x86_64.rpm \
|
||||
+ qemu-kvm \
|
||||
+ NetworkManager \
|
||||
+ asciidoc \
|
||||
+ bash-completion \
|
||||
+ bzip2 \
|
||||
+ cryptsetup \
|
||||
+ dbus-daemon \
|
||||
+ dhcp-client \
|
||||
+ dhcp-server \
|
||||
+ e2fsprogs \
|
||||
+ gcc \
|
||||
+ git \
|
||||
+ iproute \
|
||||
+ iputils \
|
||||
+ iscsi-initiator-utils \
|
||||
+ kbd \
|
||||
+ kernel \
|
||||
+ kmod-devel \
|
||||
+ lvm2 \
|
||||
+ make \
|
||||
+ mdadm \
|
||||
+ nfs-utils \
|
||||
+ pigz \
|
||||
+ rpm-build \
|
||||
+ strace \
|
||||
+ sudo \
|
||||
+ tar \
|
||||
+ tcpdump \
|
||||
+ wget \
|
||||
+ which \
|
||||
+ xz \
|
||||
+ && dnf -y update && dnf clean all
|
||||
+
|
||||
+# C9S ships only qemu-kvm, but it disables the KVM accel when it's not
|
||||
+# available
|
||||
+RUN ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-kvm && \
|
||||
+ ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-system-$(uname -m)
|
||||
+
|
||||
+# Set default command
|
||||
+CMD ["/usr/bin/bash"]
|
||||
|
55
0002.patch
55
0002.patch
|
@ -1,55 +0,0 @@
|
|||
From a6c4171117924cacaa727a9828e72f70e09b1fa9 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 12 Jul 2022 14:15:25 +0200
|
||||
Subject: [PATCH] fix(fips): enhance commit 'handle s390x OSTree systems'
|
||||
|
||||
78557f05a69fe718a97df85d2ed741ce10d3f806
|
||||
|
||||
Refactored to enhance readability.
|
||||
|
||||
Related: rhbz#2050567
|
||||
---
|
||||
modules.d/01fips/fips.sh | 15 +++++++++++----
|
||||
modules.d/01fips/module-setup.sh | 2 +-
|
||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
||||
index 26f65414..6ad61df8 100755
|
||||
--- a/modules.d/01fips/fips.sh
|
||||
+++ b/modules.d/01fips/fips.sh
|
||||
@@ -132,10 +132,17 @@ do_fips() {
|
||||
if [ -e "/boot/vmlinuz-${KERNEL}" ]; then
|
||||
BOOT_IMAGE="vmlinuz-${KERNEL}"
|
||||
elif [ -d /boot/loader/entries ]; then
|
||||
- bls=$(find /boot/loader/entries -name '*.conf' | sort -rV | sed -n "$((BOOT_IMAGE + 1))p")
|
||||
- if [ -e "${bls}" ]; then
|
||||
- BOOT_IMAGE=$(grep ^linux "${bls}" | cut -d' ' -f2)
|
||||
- fi
|
||||
+ i=0
|
||||
+ # shellcheck disable=SC2012
|
||||
+ for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do
|
||||
+ if [ "$i" -eq "${BOOT_IMAGE:-0}" ] && [ -r "$bls" ]; then
|
||||
+ BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')"
|
||||
+ BOOT_IMAGE=${BOOT_IMAGE## }
|
||||
+ break
|
||||
+ fi
|
||||
+
|
||||
+ i=$((i + 1))
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index 8860159d..cc9d15ce 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -67,7 +67,7 @@ install() {
|
||||
inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh"
|
||||
inst_script "$moddir/fips.sh" /sbin/fips.sh
|
||||
|
||||
- inst_multiple sha512hmac rmmod insmod mount uname umount grep sed cut find sort
|
||||
+ inst_multiple sha512hmac rmmod insmod mount uname umount grep sed sort
|
||||
|
||||
inst_simple /etc/system-fips
|
||||
[ -c "${initdir}"/dev/random ] || mknod "${initdir}"/dev/random c 1 8 \
|
||||
|
41
0003.patch
41
0003.patch
|
@ -1,41 +0,0 @@
|
|||
From ec58df436c7ecaa04a9a4a8f72615c59739f890d Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Wed, 16 Feb 2022 02:42:11 +0100
|
||||
Subject: [PATCH] build(spec): do not use recommends for base packages
|
||||
|
||||
rhel-only
|
||||
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 71b7421c..38de47b4 100644
|
||||
--- a/pkgbuild/dracut.spec
|
||||
+++ b/pkgbuild/dracut.spec
|
||||
@@ -71,20 +71,17 @@ Requires: kmod
|
||||
Requires: sed
|
||||
Requires: xz
|
||||
Requires: gzip
|
||||
+Requires: hardlink
|
||||
+Requires: pigz
|
||||
+Requires: kpartx
|
||||
|
||||
%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
|
||||
|
35
0004.patch
35
0004.patch
|
@ -1,35 +0,0 @@
|
|||
From 3a0a1774798178f709fc4aa54b6fc3c78e30add7 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 19 Jul 2021 11:27:28 +0200
|
||||
Subject: [PATCH] fix(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 16bafe30..5351c2d5 100755
|
||||
--- a/modules.d/95nfs/module-setup.sh
|
||||
+++ b/modules.d/95nfs/module-setup.sh
|
||||
@@ -120,8 +120,13 @@ install() {
|
||||
mkdir -m 0755 -p "$initdir/var/lib/nfs"
|
||||
mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
|
||||
mkdir -m 0770 -p "$initdir/var/lib/rpcbind"
|
||||
- [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm"
|
||||
- [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm"
|
||||
+ [ -d "$dracutsysrootdir/var/lib/nfs/statd/sm" ] \
|
||||
+ && mkdir -m 0700 -p "$initdir/var/lib/nfs/statd" \
|
||||
+ && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" \
|
||||
+ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/statd"
|
||||
+ [ -d "$dracutsysrootdir/var/lib/nfs/sm" ] \
|
||||
+ && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" \
|
||||
+ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/sm"
|
||||
|
||||
# Rather than copy the passwd file in, just set a user for rpcbind
|
||||
# We'll save the state and restart the daemon from the root anyway
|
||||
|
27
0005.patch
27
0005.patch
|
@ -1,27 +0,0 @@
|
|||
From 21b7898d5c3a074203d6cb8a71962010874f87bb Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 15 Feb 2022 13:47:40 +0100
|
||||
Subject: [PATCH] fix(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 5e891048..4b8d8422 100755
|
||||
--- a/modules.d/95resume/module-setup.sh
|
||||
+++ b/modules.d/95resume/module-setup.sh
|
||||
@@ -10,10 +10,9 @@ check() {
|
||||
return 1
|
||||
}
|
||||
|
||||
- # Only support resume if hibernation is currently on
|
||||
- # and no swap is mounted on a net device
|
||||
+ # Only support resume if no swap is mounted on a net device
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
- swap_on_netdevice || [[ -f /sys/power/resume && "$(cat /sys/power/resume)" == "0:0" ]] && return 255
|
||||
+ swap_on_netdevice && return 255
|
||||
}
|
||||
|
||||
return 0
|
65
0006.patch
65
0006.patch
|
@ -1,65 +0,0 @@
|
|||
From c1dee82d80d1b4d76a476d822cdf817686da7ebb Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 19 Jul 2022 16:42:59 +0200
|
||||
Subject: [PATCH] ci: fix branch to run integration tests in
|
||||
|
||||
---
|
||||
.github/workflows/container.yml | 2 +-
|
||||
.github/workflows/differential-shellcheck.yml | 2 +-
|
||||
.github/workflows/integration.yml | 2 +-
|
||||
.github/workflows/lint.yml | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
|
||||
index 99d57f5b..82d7a097 100644
|
||||
--- a/.github/workflows/container.yml
|
||||
+++ b/.github/workflows/container.yml
|
||||
@@ -8,7 +8,7 @@ on:
|
||||
- 'test/container/**'
|
||||
- '.github/workflows/container.yml'
|
||||
pull_request:
|
||||
- branches: [ main new-main ]
|
||||
+ branches: [ main ]
|
||||
paths:
|
||||
- 'test/container/**'
|
||||
- '.github/workflows/container.yml'
|
||||
diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml
|
||||
index c4b05fad..63a022bf 100644
|
||||
--- a/.github/workflows/differential-shellcheck.yml
|
||||
+++ b/.github/workflows/differential-shellcheck.yml
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Differential ShellCheck
|
||||
on:
|
||||
pull_request:
|
||||
- branches: [ main new-main ]
|
||||
+ branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
|
||||
index aa354e3e..82d01457 100644
|
||||
--- a/.github/workflows/integration.yml
|
||||
+++ b/.github/workflows/integration.yml
|
||||
@@ -2,7 +2,7 @@ name: Integration Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
- branches: [ main new-main ]
|
||||
+ branches: [ main ]
|
||||
|
||||
jobs:
|
||||
basic:
|
||||
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
|
||||
index 5e3a299f..f6778a65 100644
|
||||
--- a/.github/workflows/lint.yml
|
||||
+++ b/.github/workflows/lint.yml
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
- branches: [ main new-main ]
|
||||
+ branches: [ main ]
|
||||
|
||||
jobs:
|
||||
lint-c:
|
||||
|
42
0007.patch
42
0007.patch
|
@ -1,42 +0,0 @@
|
|||
From d754571fea528af061db46a0284e996d012f14c9 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 19 Jul 2022 17:06:25 +0200
|
||||
Subject: [PATCH] ci: run integration tests only on C9s
|
||||
|
||||
---
|
||||
.github/workflows/container.yml | 4 ----
|
||||
.github/workflows/integration.yml | 3 ---
|
||||
2 files changed, 7 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
|
||||
index 82d7a097..34038f57 100644
|
||||
--- a/.github/workflows/container.yml
|
||||
+++ b/.github/workflows/container.yml
|
||||
@@ -28,11 +28,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- - { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' }
|
||||
- - { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
|
||||
- - { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
|
||||
- { dockerfile: 'Dockerfile-CentOS-9-Stream', tag: 'centos:stream9' }
|
||||
- - { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
|
||||
index 82d01457..40da300c 100644
|
||||
--- a/.github/workflows/integration.yml
|
||||
+++ b/.github/workflows/integration.yml
|
||||
@@ -14,10 +14,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
container: [
|
||||
- "arch:latest",
|
||||
- "debian:latest",
|
||||
"fedora:latest",
|
||||
- "opensuse:latest",
|
||||
]
|
||||
test: [
|
||||
"04",
|
||||
|
29
0008.patch
29
0008.patch
|
@ -1,29 +0,0 @@
|
|||
From 263b9095200cf277db3bff4753b06306175b1534 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Thu, 21 Jul 2022 17:40:20 +0200
|
||||
Subject: [PATCH] fix(dracut.sh): do not fail on irregular files
|
||||
|
||||
If file is not a regular file (test -f), dracut.sh fails,
|
||||
which is unexpected change of behaviour.
|
||||
The workaround would be to create an empty file.
|
||||
|
||||
rhel-only
|
||||
Fixes: #1835
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index a1ea1bc3..210a8275 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -905,7 +905,7 @@ if [[ -z $conffile ]]; then
|
||||
else
|
||||
conffile="$dracutsysrootdir/etc/dracut.conf"
|
||||
fi
|
||||
-elif [[ ! -f $conffile ]]; then
|
||||
+elif [[ ! -e $conffile ]]; then
|
||||
printf "%s\n" "dracut: Configuration file '$conffile' not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
61
0009.patch
61
0009.patch
|
@ -1,61 +0,0 @@
|
|||
From 96116c784edda6675c80fdf95823188c72b28652 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 18 Jul 2022 16:29:27 +0200
|
||||
Subject: [PATCH] fix(98dracut-systemd): partly revert "emergency mode: use
|
||||
sulogin"
|
||||
|
||||
Partly reverts 32f68c1f9ac3720e8ce4b95a09c0ce680d5da786
|
||||
In RHEL we don't want to have a password to log in into emergency mode.
|
||||
|
||||
RHEL-only
|
||||
|
||||
Resolves: #2057365
|
||||
---
|
||||
modules.d/98dracut-systemd/dracut-emergency.sh | 2 +-
|
||||
modules.d/98dracut-systemd/module-setup.sh | 2 --
|
||||
modules.d/99base/module-setup.sh | 8 ++------
|
||||
3 files changed, 3 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh
|
||||
index c6637a5c..48062f49 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-emergency.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-emergency.sh
|
||||
@@ -34,7 +34,7 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
|
||||
done < /proc/consoles
|
||||
[ -f /etc/profile ] && . /etc/profile
|
||||
[ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
|
||||
- exec sulogin -e
|
||||
+ exec sh -i -l
|
||||
else
|
||||
export hook="shutdown-emergency"
|
||||
warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
|
||||
diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh
|
||||
index b7da86db..6fb26efa 100755
|
||||
--- a/modules.d/98dracut-systemd/module-setup.sh
|
||||
+++ b/modules.d/98dracut-systemd/module-setup.sh
|
||||
@@ -51,6 +51,4 @@ install() {
|
||||
done
|
||||
|
||||
inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf"
|
||||
-
|
||||
- inst_multiple sulogin
|
||||
}
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index 10a44d91..3fa2659a 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -30,12 +30,8 @@ install() {
|
||||
fi
|
||||
|
||||
# add common users in /etc/passwd, it will be used by nfs/ssh currently
|
||||
- # use password for hostonly images to facilitate secure sulogin in emergency console
|
||||
- [[ $hostonly ]] && pwshadow='x'
|
||||
- grep '^root:' "$initdir/etc/passwd" 2> /dev/null || echo "root:$pwshadow:0:0::/root:/bin/sh" >> "$initdir/etc/passwd"
|
||||
- grep '^nobody:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
|
||||
-
|
||||
- [[ $hostonly ]] && grep '^root:' "$dracutsysrootdir"/etc/shadow >> "$initdir/etc/shadow"
|
||||
+ grep '^root:' "$initdir/etc/passwd" 2> /dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
|
||||
+ grep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
|
||||
|
||||
# install our scripts and hooks
|
||||
inst_script "$moddir/init.sh" "/init"
|
29
0010.patch
29
0010.patch
|
@ -1,29 +0,0 @@
|
|||
From 733d47fb873c2b821a430a614d83b60475df2d13 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 15 Aug 2022 16:25:53 +0200
|
||||
Subject: [PATCH] fix(kernel-modules): always include nvmem driver on
|
||||
nvmem_on_arm
|
||||
|
||||
These drivers are needed to boot on some SoCs like NXP i.MX
|
||||
We should include them so installation images will work.
|
||||
|
||||
(cherry picked from commit bc965cd8890013a6362733d217c18756134bbcdf)
|
||||
|
||||
Resolves: #2109498
|
||||
---
|
||||
modules.d/90kernel-modules/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||
index e2073a04..191af041 100755
|
||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||
@@ -85,6 +85,7 @@ installkernel() {
|
||||
"=drivers/mfd" \
|
||||
"=drivers/mmc/core" \
|
||||
"=drivers/mmc/host" \
|
||||
+ "=drivers/nvmem" \
|
||||
"=drivers/phy" \
|
||||
"=drivers/power" \
|
||||
"=drivers/regulator" \
|
||||
|
32
0011.patch
32
0011.patch
|
@ -1,32 +0,0 @@
|
|||
From 58a310fdbfc1a7e07703c6ab9b21c43a73330a92 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 15 Aug 2022 16:32:51 +0200
|
||||
Subject: [PATCH] fix(drm): add video drivers needed on hyper-v and similar
|
||||
|
||||
Due to non-availability of Hyper-V video driver hyperv_drm in kdump
|
||||
initramfs, the console seems to be in hang state with no text over it.
|
||||
|
||||
We should also go through the /sys/bus/vmbus/devices and include drivers
|
||||
referenced there.
|
||||
|
||||
(cherry picked from commit 85149b85961aa535a3c61d492cd3594794e5cc3f)
|
||||
|
||||
Resolves: #2099502
|
||||
---
|
||||
modules.d/50drm/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
|
||||
index cff0550c..1fb38677 100755
|
||||
--- a/modules.d/50drm/module-setup.sh
|
||||
+++ b/modules.d/50drm/module-setup.sh
|
||||
@@ -31,7 +31,7 @@ installkernel() {
|
||||
if [[ $hostonly ]]; then
|
||||
local i modlink modname
|
||||
|
||||
- for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?}/*/modalias; do
|
||||
+ for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?,vmbus/devices}/*/modalias; do
|
||||
[[ -e $i ]] || continue
|
||||
[[ -n $(< "$i") ]] || continue
|
||||
# shellcheck disable=SC2046
|
||||
|
51
0012.patch
51
0012.patch
|
@ -1,51 +0,0 @@
|
|||
From a84df47afae75a0b4068c78d8201a515a841f353 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Tue, 16 Aug 2022 13:30:16 +0200
|
||||
Subject: [PATCH] fix(skipcpio): ignore broken pipe
|
||||
|
||||
If lsinitrd is called from a context in which SIGPIPE is ignored (e.g.,
|
||||
from a systemd unit with default setting of IgnoreSIGPIPE=), the
|
||||
following line will result in an error being issued:
|
||||
|
||||
bin="$($SKIP "$image" | { read -r -N 6 bin && echo "$bin"; })"
|
||||
|
||||
An example error from `kdumpctl start` (which internally just calls
|
||||
`systemctl start kdump.service`):
|
||||
|
||||
kdumpctl[1287]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite
|
||||
|
||||
A minimal reproducer:
|
||||
|
||||
systemd-run -t sh -c '/path/to/skipcpio /path/to/any/file | false'
|
||||
|
||||
(cherry-picked from e9a4d73b73b716a9d2d5f01ceb7b427ef544ed9b)
|
||||
|
||||
Resolves: #2109803
|
||||
---
|
||||
src/skipcpio/skipcpio.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/skipcpio/skipcpio.c b/src/skipcpio/skipcpio.c
|
||||
index 13bfaf53..f66c1869 100644
|
||||
--- a/src/skipcpio/skipcpio.c
|
||||
+++ b/src/skipcpio/skipcpio.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
+#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -187,8 +188,10 @@ cat_rest:
|
||||
goto end;
|
||||
}
|
||||
|
||||
+ errno = 0;
|
||||
if (fwrite(buf.copy_buffer, 1, s, stdout) != s) {
|
||||
- pr_err("fwrite\n");
|
||||
+ if (errno != EPIPE)
|
||||
+ pr_err("fwrite\n");
|
||||
goto end;
|
||||
}
|
||||
}
|
29
0013.patch
29
0013.patch
|
@ -1,29 +0,0 @@
|
|||
From bdd3fa585fcfa21f20d66f01568967c0d7a771d6 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 16 Aug 2022 15:21:05 +0200
|
||||
Subject: [PATCH] ci: pull request template
|
||||
|
||||
rhel-only
|
||||
---
|
||||
.github/pull_request_template.md | 11 +++--------
|
||||
1 file changed, 3 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
|
||||
index ef281c3d..8fcf4d33 100644
|
||||
--- a/.github/pull_request_template.md
|
||||
+++ b/.github/pull_request_template.md
|
||||
@@ -1,10 +1,5 @@
|
||||
-This pull request changes...
|
||||
+<description/>
|
||||
|
||||
-## Changes
|
||||
+(cherry picked from commit ... )
|
||||
|
||||
-## Checklist
|
||||
-- [ ] I have tested it locally
|
||||
-- [ ] I have reviewed and updated any documentation if relevant
|
||||
-- [ ] I am providing new code and test(s) for it
|
||||
-
|
||||
-Fixes #
|
||||
+Resolves: #
|
||||
|
42
0014.patch
42
0014.patch
|
@ -1,42 +0,0 @@
|
|||
From f93ac80a0b3e9017bf2c374b72126908a7f5cbde Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Mon, 8 Aug 2022 13:42:51 +0200
|
||||
Subject: [PATCH] refactor(url-lib): write curl output directly to file
|
||||
|
||||
The redirection to stdout was originally added to workaround
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=989133 (curl would create no
|
||||
file if the source was empty), but I don't see that problem with current
|
||||
curl.
|
||||
|
||||
A nice side-effect of this change is that curl shows download progress.
|
||||
|
||||
(cherry picked from commit 1343d21d8c0d1f7239e27165e9c7633b504f777f)
|
||||
|
||||
Resolves: #2112475
|
||||
---
|
||||
modules.d/45url-lib/url-lib.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
|
||||
index e88fbc14..b009fd09 100755
|
||||
--- a/modules.d/45url-lib/url-lib.sh
|
||||
+++ b/modules.d/45url-lib/url-lib.sh
|
||||
@@ -67,7 +67,7 @@ curl_fetch_url() {
|
||||
echo "$url" > /proc/self/fd/0
|
||||
if [ -n "$outloc" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
- curl $curl_args --output - -- "$url" > "$outloc" || return $?
|
||||
+ curl $curl_args --output "$outloc" -- "$url" || return $?
|
||||
else
|
||||
local outdir
|
||||
outdir="$(mkuniqdir /tmp curl_fetch_url)"
|
||||
@@ -101,7 +101,7 @@ ctorrent_fetch_url() {
|
||||
echo "$url" > /proc/self/fd/0
|
||||
if [ -n "$outloc" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
- curl $curl_args --output - -- "$url" > "$torrent_outloc" || return $?
|
||||
+ curl $curl_args --output "$torrent_outloc" -- "$url" || return $?
|
||||
else
|
||||
local outdir
|
||||
outdir="$(mkuniqdir /tmp torrent_fetch_url)"
|
||||
|
45
0015.patch
45
0015.patch
|
@ -1,45 +0,0 @@
|
|||
From f5ef6694eae2696b10b4f6e5a0d72a29223651ce Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@tencent.com>
|
||||
Date: Tue, 20 Sep 2022 02:13:01 +0800
|
||||
Subject: [PATCH] fix(dracut-initramfs-restore.sh): initramfs detection not
|
||||
working
|
||||
|
||||
The path detection is not working on latest Fedora and some other
|
||||
distros, and it fails to extract the initramfs. It seems the if
|
||||
statement is broken by a previous commit, so let's fix it.
|
||||
|
||||
Fixes: 3d8e1ad ('fix(dracut-initramfs-restore.sh): add missing default paths')
|
||||
Signed-off-by: Kairui Song <kasong@tencent.com>
|
||||
(cherry picked from commit 481b87fa7a82be54663071ad9ad76c34e378ddc7)
|
||||
|
||||
Resolves: #2149232
|
||||
---
|
||||
dracut-initramfs-restore.sh | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh
|
||||
index 68ea3873..df6cb9a8 100644
|
||||
--- a/dracut-initramfs-restore.sh
|
||||
+++ b/dracut-initramfs-restore.sh
|
||||
@@ -27,14 +27,14 @@ fi
|
||||
|
||||
mount -o ro /boot &> /dev/null || true
|
||||
|
||||
-if [[ -d /efi/loader/entries ]] || [[ -L /efi/loader/entries ]] \
|
||||
- || [[ -d /efi/$MACHINE_ID ]] || [[ -L /efi/$MACHINE_ID ]]; then
|
||||
+if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
|
||||
+ && [[ -d /efi/$MACHINE_ID || -L /efi/$MACHINE_ID ]]; then
|
||||
IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
-elif [[ -d /boot/loader/entries ]] || [[ -L /boot/loader/entries ]] \
|
||||
- || [[ -d /boot/$MACHINE_ID ]] || [[ -L /boot/$MACHINE_ID ]]; then
|
||||
+elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
|
||||
+ && [[ -d /boot/$MACHINE_ID || -L /boot/$MACHINE_ID ]]; then
|
||||
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
-elif [[ -d /boot/efi/loader/entries ]] || [[ -L /boot/efi/loader/entries ]] \
|
||||
- || [[ -d /boot/efi/$MACHINE_ID ]] || [[ -L /boot/efi/$MACHINE_ID ]]; then
|
||||
+elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
|
||||
+ && [[ -d /boot/efi/$MACHINE_ID || -L /boot/efi/$MACHINE_ID ]]; then
|
||||
IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
|
||||
elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
|
||||
IMG="/lib/modules/${KERNEL_VERSION}/initrd"
|
||||
|
31
0016.patch
31
0016.patch
|
@ -1,31 +0,0 @@
|
|||
From 6a1d39e50d9f8a7f3765fa6cb85b34e6597d864d Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 6 Dec 2022 21:46:01 +0100
|
||||
Subject: [PATCH] fix(90kernel-modules): install blk modules using symbol
|
||||
blk_alloc_disk
|
||||
|
||||
Corresponding kernel symbol blk_cleanup_disk is no longer used in the nvdimm
|
||||
driver and calls are made directly instead.
|
||||
|
||||
blk_alloc_disk is used:
|
||||
https://elixir.bootlin.com/linux/v6.1-rc8/source/drivers/nvdimm/pmem.c#L522
|
||||
|
||||
Resolves: #2149781
|
||||
---
|
||||
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 191af041..0b9488c3 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|blk_mq_alloc_disk|blk_cleanup_disk'
|
||||
+ 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_alloc_disk|blk_mq_alloc_disk|blk_cleanup_disk'
|
||||
local -A _hostonly_drvs
|
||||
|
||||
find_kernel_modules_external() {
|
||||
|
59
0018.patch
59
0018.patch
|
@ -1,59 +0,0 @@
|
|||
From 37e73a30c5b75a57de9e2bb6843eb9a1dab12abf Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Gombos <laszlo.gombos@gmail.com>
|
||||
Date: Sun, 14 Aug 2022 22:46:10 +0000
|
||||
Subject: [PATCH] test(16-DMSQUASH): make it pass on arch
|
||||
|
||||
Include additional kernel drivers and install squashfs-tools
|
||||
into the arch container.
|
||||
|
||||
(cherry picked from commit b8ffc87d13989f95c8f48ec64613dd9138835618)
|
||||
|
||||
Related: #2135060
|
||||
---
|
||||
test/TEST-16-DMSQUASH/test.sh | 4 +++-
|
||||
test/container/Dockerfile-Arch | 2 +-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
|
||||
index cf433489..52029375 100755
|
||||
--- a/test/TEST-16-DMSQUASH/test.sh
|
||||
+++ b/test/TEST-16-DMSQUASH/test.sh
|
||||
@@ -6,7 +6,7 @@ TEST_DESCRIPTION="live root on a squash filesystem"
|
||||
KVERSION="${KVERSION-$(uname -r)}"
|
||||
|
||||
# Uncomment this to debug failures
|
||||
-# DEBUGFAIL="rd.shell rd.debug loglevel=7"
|
||||
+#DEBUGFAIL="rd.shell rd.debug loglevel=7"
|
||||
|
||||
test_run() {
|
||||
dd if=/dev/zero of="$TESTDIR"/marker.img bs=1MiB count=1
|
||||
@@ -72,6 +72,7 @@ test_setup() {
|
||||
# devices, volume groups, encrypted partitions, etc.
|
||||
"$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \
|
||||
--modules "rootfs-block qemu" \
|
||||
+ --drivers "ext4 sd_mod" \
|
||||
--no-hostonly --no-hostonly-cmdline --no-early-microcode --nofscks --nomdadmconf --nohardlink --nostrip \
|
||||
--force "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
|
||||
rm -rf -- "$TESTDIR"/overlay
|
||||
@@ -109,6 +110,7 @@ test_setup() {
|
||||
"$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \
|
||||
--modules "dmsquash-live qemu" \
|
||||
--omit "rngd" \
|
||||
+ --drivers "ext4 sd_mod" \
|
||||
--no-hostonly --no-hostonly-cmdline \
|
||||
--force "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
|
||||
|
||||
diff --git a/test/container/Dockerfile-Arch b/test/container/Dockerfile-Arch
|
||||
index 922b8ede..ac1513a1 100644
|
||||
--- a/test/container/Dockerfile-Arch
|
||||
+++ b/test/container/Dockerfile-Arch
|
||||
@@ -9,7 +9,7 @@ RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)'
|
||||
|
||||
# Install needed packages for the dracut CI container
|
||||
RUN pacman --noconfirm -Sy \
|
||||
- linux dash strace dhclient asciidoc cpio pigz \
|
||||
+ linux dash strace dhclient asciidoc cpio pigz squashfs-tools \
|
||||
qemu btrfs-progs mdadm dmraid nfs-utils nfsidmap lvm2 nbd \
|
||||
dhcp networkmanager multipath-tools vi tcpdump open-iscsi \
|
||||
git shfmt shellcheck astyle which base-devel && yes | pacman -Scc
|
||||
|
425
0019.patch
425
0019.patch
|
@ -1,425 +0,0 @@
|
|||
From 8aa62b8cb28a41d4739633aee9b02e40dc4a75d0 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Coleman <matt@datto.com>
|
||||
Date: Fri, 23 Sep 2022 19:28:25 -0400
|
||||
Subject: [PATCH] feat(dmsquash-live): add new dmsquash-live-autooverlay module
|
||||
|
||||
Adapt to test properly with the CentOS Stream 9 container too.
|
||||
|
||||
(cherry picked from commit a3c67d27e75223bb45df19f850d246ced9a09938)
|
||||
|
||||
Co-authored-by: Neal Gompa <ngompa@datto.com>
|
||||
|
||||
Resolves: #2135060
|
||||
---
|
||||
.github/workflows/integration.yml | 1 +
|
||||
man/dracut.cmdline.7.asc | 4 +
|
||||
.../create-overlay-genrules.sh | 10 ++
|
||||
.../90dmsquash-live-autooverlay/create-overlay.sh | 119 +++++++++++++++++++++
|
||||
.../90dmsquash-live-autooverlay/module-setup.sh | 25 +++++
|
||||
pkgbuild/dracut.spec | 3 +-
|
||||
test/TEST-16-DMSQUASH/create-root.sh | 12 ++-
|
||||
test/TEST-16-DMSQUASH/test-init.sh | 6 ++
|
||||
test/TEST-16-DMSQUASH/test.sh | 38 ++++++-
|
||||
test/container/Dockerfile-Arch | 2 +-
|
||||
test/container/Dockerfile-CentOS-9-Stream | 2 +
|
||||
test/container/Dockerfile-Debian | 1 +
|
||||
test/container/Dockerfile-Fedora-latest | 1 +
|
||||
test/container/Dockerfile-OpenSuse-latest | 2 +-
|
||||
14 files changed, 218 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
|
||||
index 40da300c..c22bf916 100644
|
||||
--- a/.github/workflows/integration.yml
|
||||
+++ b/.github/workflows/integration.yml
|
||||
@@ -98,6 +98,7 @@ jobs:
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
+ "16",
|
||||
"17",
|
||||
"20",
|
||||
"21",
|
||||
diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc
|
||||
index fda62fd1..40d13d83 100644
|
||||
--- a/man/dracut.cmdline.7.asc
|
||||
+++ b/man/dracut.cmdline.7.asc
|
||||
@@ -1161,6 +1161,10 @@ rd.live.overlay=/dev/sdb1:persistent-overlay.img
|
||||
rd.live.overlay=UUID=99440c1f-8daa-41bf-b965-b7240a8996f4
|
||||
--
|
||||
|
||||
+**rd.live.overlay.cowfs=**__[btrfs|ext4|xfs]__::
|
||||
+Specifies the filesystem to use when formatting the overlay partition.
|
||||
+The default is ext4.
|
||||
+
|
||||
**rd.live.overlay.size=**__<size_MiB>__::
|
||||
Specifies a non-persistent Device-mapper overlay size in MiB. The default is
|
||||
_32768_.
|
||||
diff --git a/modules.d/90dmsquash-live-autooverlay/create-overlay-genrules.sh b/modules.d/90dmsquash-live-autooverlay/create-overlay-genrules.sh
|
||||
new file mode 100755
|
||||
index 00000000..ed168d9f
|
||||
--- /dev/null
|
||||
+++ b/modules.d/90dmsquash-live-autooverlay/create-overlay-genrules.sh
|
||||
@@ -0,0 +1,10 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+# shellcheck disable=SC2154
|
||||
+case "$root" in
|
||||
+ live:/dev/*)
|
||||
+ printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/create-overlay %s"\n' \
|
||||
+ "${root#live:/dev/}" "${root#live:}" >> /etc/udev/rules.d/95-create-overlay.rules
|
||||
+ wait_for_dev -n "${root#live:}"
|
||||
+ ;;
|
||||
+esac
|
||||
diff --git a/modules.d/90dmsquash-live-autooverlay/create-overlay.sh b/modules.d/90dmsquash-live-autooverlay/create-overlay.sh
|
||||
new file mode 100755
|
||||
index 00000000..c89bda2b
|
||||
--- /dev/null
|
||||
+++ b/modules.d/90dmsquash-live-autooverlay/create-overlay.sh
|
||||
@@ -0,0 +1,119 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
+
|
||||
+if getargbool 0 rd.live.debug -n -y rdlivedebug; then
|
||||
+ exec > /tmp/create-overlay.$$.out
|
||||
+ exec 2>> /tmp/create-overlay.$$.out
|
||||
+ set -x
|
||||
+fi
|
||||
+
|
||||
+gatherData() {
|
||||
+ overlay=$(getarg rd.live.overlay)
|
||||
+ if [ -z "$overlay" ]; then
|
||||
+ info "Skipping overlay creation: kernel command line parameter 'rd.live.overlay' is not set"
|
||||
+ exit 0
|
||||
+ fi
|
||||
+ # shellcheck disable=SC2086
|
||||
+ if ! str_starts ${overlay} LABEL=; then
|
||||
+ die "Overlay creation failed: the partition must be set by LABEL in the 'rd.live.overlay' kernel parameter"
|
||||
+ fi
|
||||
+
|
||||
+ overlayLabel=${overlay#LABEL=}
|
||||
+ # shellcheck disable=SC2086
|
||||
+ if [ -b /dev/disk/by-label/${overlayLabel} ]; then
|
||||
+ info "Skipping overlay creation: overlay already exists"
|
||||
+ exit 0
|
||||
+ fi
|
||||
+
|
||||
+ filesystem=$(getarg rd.live.overlay.cowfs)
|
||||
+ [ -z "$filesystem" ] && filesystem="ext4"
|
||||
+ if [ "$filesystem" != "ext4" ] && [ "$filesystem" != "xfs" ] && [ "$filesystem" != "btrfs" ]; then
|
||||
+ die "Overlay creation failed: only ext4, xfs, and btrfs are supported in the 'rd.live.overlay.cowfs' kernel parameter"
|
||||
+ fi
|
||||
+
|
||||
+ live_dir=$(getarg rd.live.dir)
|
||||
+ [ -z "$live_dir" ] && live_dir="LiveOS"
|
||||
+
|
||||
+ [ -z "$1" ] && exit 1
|
||||
+ rootDevice=$1
|
||||
+
|
||||
+ # The kernel command line's 'root=' parameter was parsed into the $root variable by the dmsquash-live module.
|
||||
+ # $root contains the path to a symlink within /dev/disk/by-label, which points to a partition.
|
||||
+ # This script needs that partition's parent block device.
|
||||
+ # shellcheck disable=SC2046
|
||||
+ # shellcheck disable=SC2086
|
||||
+ rootDeviceAbsolutePath=$(readlink -f ${rootDevice})
|
||||
+ rootDeviceSysfsPath=/sys/class/block/${rootDeviceAbsolutePath##*/}
|
||||
+ if [ -f "${rootDeviceSysfsPath}/partition" ]; then
|
||||
+ # shellcheck disable=SC2086
|
||||
+ partition=$(cat ${rootDeviceSysfsPath}/partition)
|
||||
+ else
|
||||
+ partition=0
|
||||
+ fi
|
||||
+ # shellcheck disable=SC2086
|
||||
+ readonly=$(cat ${rootDeviceSysfsPath}/ro)
|
||||
+ # shellcheck disable=SC2086
|
||||
+ if [ "$partition" != "1" ] || [ "$readonly" != "0" ]; then
|
||||
+ info "Skipping overlay creation: unpartitioned or read-only media detected"
|
||||
+ exit 0
|
||||
+ fi
|
||||
+ # shellcheck disable=SC2046
|
||||
+ # shellcheck disable=SC2086
|
||||
+ fullDriveSysfsPath=$(readlink -f ${rootDeviceSysfsPath}/..)
|
||||
+ blockDevice=/dev/${fullDriveSysfsPath##*/}
|
||||
+ currentPartitionCount=$(grep --count -E "${blockDevice#/dev/}[0-9]+" /proc/partitions)
|
||||
+
|
||||
+ # shellcheck disable=SC2086
|
||||
+ freeSpaceStart=$(parted --script ${blockDevice} unit % print free \
|
||||
+ | awk -v x=${currentPartitionCount} '$1 == x {getline; print $1}')
|
||||
+ if [ -z "$freeSpaceStart" ]; then
|
||||
+ info "Skipping overlay creation: there is no free space after the last partition"
|
||||
+ exit 0
|
||||
+ fi
|
||||
+ partitionStart=$((${freeSpaceStart%.*} + 1))
|
||||
+ if [ $partitionStart -eq 100 ]; then
|
||||
+ info "Skipping overlay creation: there is not enough free space after the last partition"
|
||||
+ exit 0
|
||||
+ fi
|
||||
+
|
||||
+ overlayPartition=${blockDevice}$((currentPartitionCount + 1))
|
||||
+
|
||||
+ label=$(blkid --match-tag LABEL --output value "$rootDevice")
|
||||
+ uuid=$(blkid --match-tag UUID --output value "$rootDevice")
|
||||
+ if [ -z "$label" ] || [ -z "$uuid" ]; then
|
||||
+ die "Overlay creation failed: failed to look up root device label and UUID"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+createPartition() {
|
||||
+ # shellcheck disable=SC2086
|
||||
+ parted --script --align optimal ${blockDevice} mkpart primary ${partitionStart}% 100%
|
||||
+}
|
||||
+
|
||||
+createFilesystem() {
|
||||
+ # shellcheck disable=SC2086
|
||||
+ mkfs.${filesystem} -L ${overlayLabel} ${overlayPartition}
|
||||
+
|
||||
+ baseDir=/run/initramfs/create-overlayfs
|
||||
+ mkdir -p ${baseDir}
|
||||
+ # shellcheck disable=SC2086
|
||||
+ mount -t auto ${overlayPartition} ${baseDir}
|
||||
+
|
||||
+ mkdir -p ${baseDir}/${live_dir}/ovlwork
|
||||
+ # shellcheck disable=SC2086
|
||||
+ mkdir ${baseDir}/${live_dir}/overlay-${label}-${uuid}
|
||||
+
|
||||
+ umount ${baseDir}
|
||||
+ rm -r ${baseDir}
|
||||
+}
|
||||
+
|
||||
+main() {
|
||||
+ gatherData "$1"
|
||||
+ createPartition
|
||||
+ udevsettle
|
||||
+ createFilesystem
|
||||
+ udevsettle
|
||||
+}
|
||||
+
|
||||
+main "$1"
|
||||
diff --git a/modules.d/90dmsquash-live-autooverlay/module-setup.sh b/modules.d/90dmsquash-live-autooverlay/module-setup.sh
|
||||
new file mode 100755
|
||||
index 00000000..c3712eba
|
||||
--- /dev/null
|
||||
+++ b/modules.d/90dmsquash-live-autooverlay/module-setup.sh
|
||||
@@ -0,0 +1,25 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+check() {
|
||||
+ # including a module dedicated to live environments in a host-only initrd doesn't make sense
|
||||
+ [[ $hostonly ]] && return 1
|
||||
+ return 255
|
||||
+}
|
||||
+
|
||||
+depends() {
|
||||
+ echo dmsquash-live
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+installkernel() {
|
||||
+ instmods btrfs ext4 xfs
|
||||
+}
|
||||
+
|
||||
+install() {
|
||||
+ inst_multiple awk blkid cat grep mkdir mount parted readlink rmdir tr umount
|
||||
+ inst_multiple -o mkfs.btrfs mkfs.ext4 mkfs.xfs
|
||||
+ # shellcheck disable=SC2154
|
||||
+ inst_hook pre-udev 25 "$moddir/create-overlay-genrules.sh"
|
||||
+ inst_script "$moddir/create-overlay.sh" "/sbin/create-overlay"
|
||||
+ dracut_need_initqueue
|
||||
+}
|
||||
diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec
|
||||
index 38de47b4..e148bbf7 100644
|
||||
--- a/pkgbuild/dracut.spec
|
||||
+++ b/pkgbuild/dracut.spec
|
||||
@@ -138,7 +138,7 @@ Requires: %{name} >= %{version}-%{dist_free_release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%endif
|
||||
Requires: %{name}-network = %{version}-%{release}
|
||||
-Requires: tar gzip coreutils bash device-mapper curl
|
||||
+Requires: tar gzip coreutils bash device-mapper curl parted
|
||||
%if 0%{?fedora}
|
||||
Requires: fuse ntfs-3g
|
||||
%endif
|
||||
@@ -461,6 +461,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%files live
|
||||
%{dracutlibdir}/modules.d/99img-lib
|
||||
%{dracutlibdir}/modules.d/90dmsquash-live
|
||||
+%{dracutlibdir}/modules.d/90dmsquash-live-autooverlay
|
||||
%{dracutlibdir}/modules.d/90dmsquash-live-ntfs
|
||||
%{dracutlibdir}/modules.d/90livenet
|
||||
|
||||
diff --git a/test/TEST-16-DMSQUASH/create-root.sh b/test/TEST-16-DMSQUASH/create-root.sh
|
||||
index 9bc1aa5d..c11e17e0 100755
|
||||
--- a/test/TEST-16-DMSQUASH/create-root.sh
|
||||
+++ b/test/TEST-16-DMSQUASH/create-root.sh
|
||||
@@ -11,9 +11,17 @@ udevadm control --reload
|
||||
set -e
|
||||
|
||||
udevadm settle
|
||||
-mkfs.ext4 -q -L dracut /dev/disk/by-id/ata-disk_root
|
||||
+
|
||||
+# create a single partition using 50% of the capacity of the image file created by test_setup() in test.sh
|
||||
+sfdisk /dev/disk/by-id/ata-disk_root << EOF
|
||||
+2048,161792
|
||||
+EOF
|
||||
+
|
||||
+udevadm settle
|
||||
+
|
||||
+mkfs.ext4 -q -L dracut /dev/disk/by-id/ata-disk_root-part1
|
||||
mkdir -p /root
|
||||
-mount /dev/disk/by-id/ata-disk_root /root
|
||||
+mount /dev/disk/by-id/ata-disk_root-part1 /root
|
||||
mkdir -p /root/run /root/testdir
|
||||
echo "Creating squashfs"
|
||||
mksquashfs /source /root/testdir/rootfs.img -quiet
|
||||
diff --git a/test/TEST-16-DMSQUASH/test-init.sh b/test/TEST-16-DMSQUASH/test-init.sh
|
||||
index 068e8f38..959fa25f 100755
|
||||
--- a/test/TEST-16-DMSQUASH/test-init.sh
|
||||
+++ b/test/TEST-16-DMSQUASH/test-init.sh
|
||||
@@ -9,6 +9,12 @@ exec > /dev/console 2>&1
|
||||
|
||||
echo "dracut-root-block-success" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
|
||||
|
||||
+if grep -qF ' rd.live.overlay=LABEL=persist ' /proc/cmdline; then
|
||||
+ # Writing to a file in the root filesystem lets test_run() verify that the autooverlay module successfully created
|
||||
+ # and formatted the overlay partition and that the dmsquash-live module used it when setting up the rootfs overlay.
|
||||
+ echo "dracut-autooverlay-success" > /overlay-marker
|
||||
+fi
|
||||
+
|
||||
export TERM=linux
|
||||
export PS1='initramfs-test:\w\$ '
|
||||
[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab
|
||||
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
|
||||
index 52029375..58d73b0d 100755
|
||||
--- a/test/TEST-16-DMSQUASH/test.sh
|
||||
+++ b/test/TEST-16-DMSQUASH/test.sh
|
||||
@@ -5,8 +5,9 @@ TEST_DESCRIPTION="live root on a squash filesystem"
|
||||
|
||||
KVERSION="${KVERSION-$(uname -r)}"
|
||||
|
||||
-# Uncomment this to debug failures
|
||||
-#DEBUGFAIL="rd.shell rd.debug loglevel=7"
|
||||
+# Uncomment these to debug failures
|
||||
+#DEBUGFAIL="rd.shell rd.debug rd.live.debug loglevel=7"
|
||||
+#DEBUGTOOLS="setsid ls cat sfdisk"
|
||||
|
||||
test_run() {
|
||||
dd if=/dev/zero of="$TESTDIR"/marker.img bs=1MiB count=1
|
||||
@@ -23,6 +24,27 @@ test_run() {
|
||||
-initrd "$TESTDIR"/initramfs.testing
|
||||
|
||||
grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success -- "$TESTDIR"/marker.img || return 1
|
||||
+
|
||||
+ rootPartitions=$(sfdisk -d "$TESTDIR"/root.img | grep -c 'root\.img[0-9]')
|
||||
+ [ "$rootPartitions" -eq 1 ] || return 1
|
||||
+
|
||||
+ "$testdir"/run-qemu \
|
||||
+ "${disk_args[@]}" \
|
||||
+ -boot order=d \
|
||||
+ -append "rd.live.image rd.live.overlay.overlayfs=1 rd.live.overlay=LABEL=persist rd.live.dir=testdir root=LABEL=dracut console=ttyS0,115200n81 quiet selinux=0 rd.info rd.shell=0 panic=1 oops=panic softlockup_panic=1 $DEBUGFAIL" \
|
||||
+ -initrd "$TESTDIR"/initramfs.testing-autooverlay
|
||||
+
|
||||
+ rootPartitions=$(sfdisk -d "$TESTDIR"/root.img | grep -c 'root\.img[0-9]')
|
||||
+ [ "$rootPartitions" -eq 2 ] || return 1
|
||||
+
|
||||
+ (
|
||||
+ # Ensure that this test works when run with the `V=1` parameter, which runs the script with `set -o pipefail`.
|
||||
+ set +o pipefail
|
||||
+
|
||||
+ # Verify that the string "dracut-autooverlay-success" occurs in the second partition in the image file.
|
||||
+ dd if="$TESTDIR"/root.img bs=1MiB skip=80 status=none \
|
||||
+ | grep -U --binary-files=binary -F -m 1 -q dracut-autooverlay-success
|
||||
+ ) || return 1
|
||||
}
|
||||
|
||||
test_setup() {
|
||||
@@ -49,7 +71,7 @@ test_setup() {
|
||||
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
|
||||
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"
|
||||
|
||||
- inst_multiple mkdir ln dd stty mount poweroff
|
||||
+ inst_multiple mkdir ln dd stty mount poweroff grep "$DEBUGTOOLS"
|
||||
|
||||
cp -a -- /etc/ld.so.conf* "$initdir"/etc
|
||||
ldconfig -r "$initdir"
|
||||
@@ -115,6 +137,16 @@ test_setup() {
|
||||
--force "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
|
||||
|
||||
ls -sh "$TESTDIR"/initramfs.testing
|
||||
+
|
||||
+ "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \
|
||||
+ --modules "dmsquash-live-autooverlay qemu" \
|
||||
+ --omit "rngd" \
|
||||
+ --drivers "ext4 sd_mod" \
|
||||
+ --no-hostonly --no-hostonly-cmdline \
|
||||
+ --force "$TESTDIR"/initramfs.testing-autooverlay "$KVERSION" || return 1
|
||||
+
|
||||
+ ls -sh "$TESTDIR"/initramfs.testing-autooverlay
|
||||
+
|
||||
rm -rf -- "$TESTDIR"/overlay
|
||||
}
|
||||
|
||||
diff --git a/test/container/Dockerfile-Arch b/test/container/Dockerfile-Arch
|
||||
index ac1513a1..4112cc5b 100644
|
||||
--- a/test/container/Dockerfile-Arch
|
||||
+++ b/test/container/Dockerfile-Arch
|
||||
@@ -12,7 +12,7 @@ RUN pacman --noconfirm -Sy \
|
||||
linux dash strace dhclient asciidoc cpio pigz squashfs-tools \
|
||||
qemu btrfs-progs mdadm dmraid nfs-utils nfsidmap lvm2 nbd \
|
||||
dhcp networkmanager multipath-tools vi tcpdump open-iscsi \
|
||||
- git shfmt shellcheck astyle which base-devel && yes | pacman -Scc
|
||||
+ git shfmt shellcheck astyle which base-devel glibc parted && yes | pacman -Scc
|
||||
|
||||
RUN useradd -m build
|
||||
RUN su build -c 'cd && git clone https://aur.archlinux.org/perl-config-general.git && cd perl-config-general && makepkg -s --noconfirm'
|
||||
diff --git a/test/container/Dockerfile-CentOS-9-Stream b/test/container/Dockerfile-CentOS-9-Stream
|
||||
index c9a96020..abcc067e 100644
|
||||
--- a/test/container/Dockerfile-CentOS-9-Stream
|
||||
+++ b/test/container/Dockerfile-CentOS-9-Stream
|
||||
@@ -33,8 +33,10 @@ RUN dnf -y install --enablerepo crb --setopt=install_weak_deps=False \
|
||||
make \
|
||||
mdadm \
|
||||
nfs-utils \
|
||||
+ parted \
|
||||
pigz \
|
||||
rpm-build \
|
||||
+ squashfs-tools \
|
||||
strace \
|
||||
sudo \
|
||||
tar \
|
||||
diff --git a/test/container/Dockerfile-Debian b/test/container/Dockerfile-Debian
|
||||
index b4c1704e..15eb9958 100644
|
||||
--- a/test/container/Dockerfile-Debian
|
||||
+++ b/test/container/Dockerfile-Debian
|
||||
@@ -42,6 +42,7 @@ RUN apt-get update -y -qq && apt-get upgrade -y -qq && DEBIAN_FRONTEND=nonintera
|
||||
network-manager \
|
||||
nfs-common \
|
||||
open-iscsi \
|
||||
+ parted \
|
||||
pigz \
|
||||
pkg-config \
|
||||
procps \
|
||||
diff --git a/test/container/Dockerfile-Fedora-latest b/test/container/Dockerfile-Fedora-latest
|
||||
index 87c749f9..a38a72ef 100644
|
||||
--- a/test/container/Dockerfile-Fedora-latest
|
||||
+++ b/test/container/Dockerfile-Fedora-latest
|
||||
@@ -49,6 +49,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
|
||||
which \
|
||||
ShellCheck \
|
||||
shfmt \
|
||||
+ parted \
|
||||
&& dnf -y update && dnf clean all
|
||||
|
||||
# Set default command
|
||||
diff --git a/test/container/Dockerfile-OpenSuse-latest b/test/container/Dockerfile-OpenSuse-latest
|
||||
index 637d50c6..9aaf07b1 100644
|
||||
--- a/test/container/Dockerfile-OpenSuse-latest
|
||||
+++ b/test/container/Dockerfile-OpenSuse-latest
|
||||
@@ -13,7 +13,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \
|
||||
strace libkmod-devel gcc bzip2 xz tar wget rpm-build make git bash-completion \
|
||||
sudo kernel dhcp-client qemu-kvm /usr/bin/qemu-system-$(uname -m) e2fsprogs \
|
||||
tcpdump iproute iputils kbd NetworkManager btrfsprogs tgt dbus-broker \
|
||||
- iscsiuio open-iscsi which ShellCheck procps pigz \
|
||||
+ iscsiuio open-iscsi which ShellCheck procps pigz parted squashfs \
|
||||
&& dnf -y update && dnf clean all
|
||||
|
||||
RUN shfmt_version=3.2.4; wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O /usr/local/bin/shfmt \
|
39
0020.patch
39
0020.patch
|
@ -1,39 +0,0 @@
|
|||
From 3e912f878de8d310bd06199e03602c63d2b60dba Mon Sep 17 00:00:00 2001
|
||||
From: Radek Vykydal <rvykydal@redhat.com>
|
||||
Date: Tue, 20 Dec 2022 16:40:23 +0100
|
||||
Subject: [PATCH] fix(network-manager): allow running nm-run.sh multiple times
|
||||
|
||||
This partially reverts
|
||||
https://github.com/redhat-plumbers/dracut-rhel9/commit/77630365aed201a729c73a9ffda0733a75f3fee4
|
||||
|
||||
Anaconda needs to be able to run nm-run.sh to trigger online hooks again
|
||||
after kickstart is fetched from storage and network is configured
|
||||
accordingly.
|
||||
|
||||
rhel-only
|
||||
Resolves: rhbz#2157082
|
||||
---
|
||||
modules.d/35network-manager/nm-run.sh | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||
index 7d8d61fa..6110733d 100755
|
||||
--- a/modules.d/35network-manager/nm-run.sh
|
||||
+++ b/modules.d/35network-manager/nm-run.sh
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
-if [ -e /tmp/nm.done ]; then
|
||||
- return
|
||||
-fi
|
||||
-
|
||||
if [ -z "$DRACUT_SYSTEMD" ]; then
|
||||
+
|
||||
+ if [ -e /tmp/nm.done ]; then
|
||||
+ return
|
||||
+ fi
|
||||
+
|
||||
# Only start NM if networking is needed
|
||||
if [ -e /run/NetworkManager/initrd/neednet ]; then
|
||||
for i in /usr/lib/NetworkManager/system-connections/* \
|
56
0021.patch
56
0021.patch
|
@ -1,56 +0,0 @@
|
|||
From f814aed234f5bfb99029b9926a41727cbc68824c Mon Sep 17 00:00:00 2001
|
||||
From: Tao Liu <ltao@redhat.com>
|
||||
Date: Fri, 3 Mar 2023 18:27:25 +0800
|
||||
Subject: [PATCH] fix(lvmthinpool-monitor): activate lvm thin pool before
|
||||
extend its size
|
||||
|
||||
The state of lvm thin pool may change into inactived state when kdump into
|
||||
2nd kernel. As a result, lvextend will fail to extend its size. For example:
|
||||
|
||||
In 1st kernel:
|
||||
|
||||
$ lvs
|
||||
LV VG Attr LSize Pool Origin Data% Meta%
|
||||
vol vg00 Vwi-a-tz-- 300.00m thinpool 70.54
|
||||
thinpool vg00 twi-aotz-- 236.00m 89.67 12.50
|
||||
...
|
||||
|
||||
In 2nd kernel:
|
||||
|
||||
LV VG Attr LSize Pool Origin Data% Meta%
|
||||
vol vg00 Vwi-aotz-- 300.00m thinpool 70.54
|
||||
thinpool vg00 twi---tz-- 236.00m 89.67 12.50
|
||||
...
|
||||
|
||||
And the lvextend failing log:
|
||||
[ 8.483878] start-thinpool-monitor[590]: lvextend using policy requires the thin pool to be active.
|
||||
|
||||
In this patch, we will first activate lvm thin pool before calling lvextend
|
||||
during kdump.
|
||||
|
||||
Signed-off-by: Tao Liu <ltao@redhat.com>
|
||||
|
||||
(Cherry-picked commit: 4a6b81378f5c542fa1a94386744b9f4a0cc3e33a)
|
||||
|
||||
Resolves: #2175096
|
||||
---
|
||||
modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh b/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh
|
||||
index 75d8eada..10f4a4bb 100755
|
||||
--- a/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh
|
||||
+++ b/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh
|
||||
@@ -31,6 +31,12 @@ if [ -n "$THIN_POOLS" ]; then
|
||||
CONFIG="activation {monitoring=0 thin_pool_autoextend_threshold=70 thin_pool_autoextend_percent=20}"
|
||||
fi
|
||||
|
||||
+ # Activate the thinpool in case the thinpool is in inactive state.
|
||||
+ # Otherwise lvextend will fail.
|
||||
+ for THIN_POOL in $THIN_POOLS; do
|
||||
+ lvm lvchange -ay "$THIN_POOL" --config "$CONFIG"
|
||||
+ done
|
||||
+
|
||||
while true; do
|
||||
for THIN_POOL in $THIN_POOLS; do
|
||||
lvm lvextend --use-policies --config "$CONFIG" "$THIN_POOL"
|
145
0022.patch
145
0022.patch
|
@ -1,145 +0,0 @@
|
|||
From cd2bfd13e80d5a20ca27e3f7e9dd5f4d33c30a6d Mon Sep 17 00:00:00 2001
|
||||
From: Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
Date: Mon, 13 Mar 2023 12:06:13 +0100
|
||||
Subject: [PATCH] fix(dracut.sh): use dynamically uefi's sections offset
|
||||
|
||||
* Uefi section are creating by `objcopy` with hardcoded sections
|
||||
offset. This commit allow to have the correct offset between
|
||||
each part of the efi file, needed to create an UKI. Offsets
|
||||
are simply calculated so no sections overlap, as recommended
|
||||
in https://wiki.archlinux.org/title/Unified_kernel_image#Manually
|
||||
Moreover, efi stub file's header is parsed to apply the correct
|
||||
offsets according the section alignment factor.
|
||||
* Remove EFI_SECTION_VMA_INITRD, no need anymore as initrd
|
||||
section offset dynamically calculated
|
||||
|
||||
Fixes dracutdevs#2275
|
||||
|
||||
Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
(Cherry-picked commit: f32e95bcadbc5158843530407adc1e7b700561b1)
|
||||
|
||||
Resolves: #2180787
|
||||
---
|
||||
dracut-functions.sh | 23 +++++++++++++++++++++++
|
||||
dracut.sh | 45 +++++++++++++++++++++++++++++++++++----------
|
||||
2 files changed, 58 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index ff6749a1..a95755b2 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -995,3 +995,26 @@ get_dev_module() {
|
||||
fi
|
||||
echo "$dev_drivers"
|
||||
}
|
||||
+
|
||||
+# Check if file is in PE format
|
||||
+pe_file_format() {
|
||||
+ if [[ $# -eq 1 ]]; then
|
||||
+ local magic
|
||||
+ magic=$(objdump -p "$1" \
|
||||
+ | awk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
|
||||
+ magic=$(printf "0x%x" "$magic")
|
||||
+ # 0x10b (PE32), 0x20b (PE32+)
|
||||
+ [[ $magic == 0x20b || $magic == 0x10b ]] && return 0
|
||||
+ fi
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+# Get the sectionAlignment data from the PE header
|
||||
+pe_get_section_align() {
|
||||
+ local align_hex
|
||||
+ [[ $# -ne "1" ]] && return 1
|
||||
+ [[ $(pe_file_format "$1") -eq 1 ]] && return 1
|
||||
+ align_hex=$(objdump -p "$1" \
|
||||
+ | awk '{if ($1 == "SectionAlignment"){print $2}}')
|
||||
+ echo "$((16#$align_hex))"
|
||||
+}
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index d2f07ac6..0c963431 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1433,7 +1433,6 @@ if [[ ! $print_cmdline ]]; then
|
||||
exit 1
|
||||
fi
|
||||
unset EFI_MACHINE_TYPE_NAME
|
||||
- EFI_SECTION_VMA_INITRD=0x3000000
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
EFI_MACHINE_TYPE_NAME=x64
|
||||
@@ -1443,8 +1442,6 @@ if [[ ! $print_cmdline ]]; then
|
||||
;;
|
||||
aarch64)
|
||||
EFI_MACHINE_TYPE_NAME=aa64
|
||||
- # aarch64 kernels are uncompressed and thus larger, so we need a bigger gap between vma sections
|
||||
- EFI_SECTION_VMA_INITRD=0x4000000
|
||||
;;
|
||||
*)
|
||||
dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable"
|
||||
@@ -2596,29 +2593,57 @@ if [[ $uefi == yes ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
+ offs=$(objdump -h "$uefi_stub" 2> /dev/null | awk 'NF==7 {size=strtonum("0x"$3);\
|
||||
+ offset=strtonum("0x"$4)} END {print size + offset}')
|
||||
+ if [[ $offs -eq 0 ]]; then
|
||||
+ dfatal "Failed to get the size of $uefi_stub to create UEFI image file"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ align=$(pe_get_section_align "$uefi_stub")
|
||||
+ if [[ $? -eq 1 ]]; then
|
||||
+ dfatal "Failed to get the sectionAlignment of the stub PE header to create the UEFI image file"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ offs=$((offs + "$align" - offs % "$align"))
|
||||
+ [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release"
|
||||
+ [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release"
|
||||
+ [[ -s $uefi_osrelease ]] \
|
||||
+ && uefi_osrelease_offs=${offs} \
|
||||
+ && offs=$((offs + $(stat -Lc%s "$uefi_osrelease"))) \
|
||||
+ && offs=$((offs + "$align" - offs % "$align"))
|
||||
+
|
||||
if [[ $kernel_cmdline ]] || [[ $hostonly_cmdline == yes && -d "$initdir/etc/cmdline.d" ]]; then
|
||||
echo -ne "\x00" >> "$uefi_outdir/cmdline.txt"
|
||||
dinfo "Using UEFI kernel cmdline:"
|
||||
dinfo "$(tr -d '\000' < "$uefi_outdir/cmdline.txt")"
|
||||
uefi_cmdline="${uefi_outdir}/cmdline.txt"
|
||||
+ uefi_cmdline_offs=${offs}
|
||||
+ offs=$((offs + $(stat -Lc%s "$uefi_cmdline")))
|
||||
+ offs=$((offs + "$align" - offs % "$align"))
|
||||
else
|
||||
unset uefi_cmdline
|
||||
fi
|
||||
|
||||
- [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release"
|
||||
- [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release"
|
||||
if [[ -s ${dracutsysrootdir}${uefi_splash_image} ]]; then
|
||||
uefi_splash_image="${dracutsysrootdir}${uefi_splash_image}"
|
||||
+ uefi_splash_offs=${offs}
|
||||
+ offs=$((offs + $(stat -Lc%s "$uefi_splash_image")))
|
||||
+ offs=$((offs + "$align" - offs % "$align"))
|
||||
else
|
||||
unset uefi_splash_image
|
||||
fi
|
||||
|
||||
+ uefi_linux_offs="${offs}"
|
||||
+ offs=$((offs + $(stat -Lc%s "$kernel_image")))
|
||||
+ offs=$((offs + "$align" - offs % "$align"))
|
||||
+ uefi_initrd_offs="${offs}"
|
||||
+
|
||||
if objcopy \
|
||||
- ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=0x20000} \
|
||||
- ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=0x30000} \
|
||||
- ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=0x40000} \
|
||||
- --add-section .linux="$kernel_image" --change-section-vma .linux=0x2000000 \
|
||||
- --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="${EFI_SECTION_VMA_INITRD}" \
|
||||
+ ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \
|
||||
+ ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \
|
||||
+ ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \
|
||||
+ --add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \
|
||||
+ --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \
|
||||
"$uefi_stub" "${uefi_outdir}/linux.efi"; then
|
||||
if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then
|
||||
if sbsign \
|
||||
|
97
0023.patch
97
0023.patch
|
@ -1,97 +0,0 @@
|
|||
From 11e1ffb0cf614fb6ec9b740cb6eb8c07c2a081ac Mon Sep 17 00:00:00 2001
|
||||
From: keentux <valentin.lefebvre@suse.com>
|
||||
Date: Wed, 22 Mar 2023 10:40:39 +0000
|
||||
Subject: [PATCH] fix(dracut.sh): handle imagebase for uefi
|
||||
|
||||
* UEFI creation didn't handle the ImageBase data for the PE file
|
||||
generation. Create an UKI thanks a stub file with a non zero BaseImage
|
||||
logs some warning ans generate a bad file offset management. The efi
|
||||
becomes unloadable.
|
||||
* This commit parse the PE file header, get the data and apply the
|
||||
ImageBase on the objcopy command.
|
||||
|
||||
Fixes dracutdevs#2284
|
||||
|
||||
Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
|
||||
|
||||
(Cherry-picked commit: 6178a9d83ffad67fa371cef2ff3f5bbb337bc8b7)
|
||||
|
||||
Related: #2180787
|
||||
---
|
||||
dracut-functions.sh | 26 ++++++++++++++++++++++----
|
||||
dracut.sh | 9 ++++++++-
|
||||
2 files changed, 30 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index a95755b2..7f05da6e 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -1009,12 +1009,30 @@ pe_file_format() {
|
||||
return 1
|
||||
}
|
||||
|
||||
-# Get the sectionAlignment data from the PE header
|
||||
+# Get specific data from the PE header
|
||||
+pe_get_header_data() {
|
||||
+ local data_header
|
||||
+ [[ $# -ne "2" ]] && return 1
|
||||
+ [[ $(pe_file_format "$1") -eq 1 ]] && return 1
|
||||
+ data_header=$(objdump -p "$1" \
|
||||
+ | awk -v data="$2" '{if ($1 == data){print $2}}')
|
||||
+ echo "$data_header"
|
||||
+}
|
||||
+
|
||||
+# Get the SectionAlignment data from the PE header
|
||||
pe_get_section_align() {
|
||||
local align_hex
|
||||
[[ $# -ne "1" ]] && return 1
|
||||
- [[ $(pe_file_format "$1") -eq 1 ]] && return 1
|
||||
- align_hex=$(objdump -p "$1" \
|
||||
- | awk '{if ($1 == "SectionAlignment"){print $2}}')
|
||||
+ align_hex=$(pe_get_header_data "$1" "SectionAlignment")
|
||||
+ [[ $? -eq 1 ]] && return 1
|
||||
echo "$((16#$align_hex))"
|
||||
}
|
||||
+
|
||||
+# Get the ImageBase data from the PE header
|
||||
+pe_get_image_base() {
|
||||
+ local base_image
|
||||
+ [[ $# -ne "1" ]] && return 1
|
||||
+ base_image=$(pe_get_header_data "$1" "ImageBase")
|
||||
+ [[ $? -eq 1 ]] && return 1
|
||||
+ echo "$((16#$base_image))"
|
||||
+}
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 0c963431..a6a27dcf 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2601,7 +2601,7 @@ if [[ $uefi == yes ]]; then
|
||||
fi
|
||||
align=$(pe_get_section_align "$uefi_stub")
|
||||
if [[ $? -eq 1 ]]; then
|
||||
- dfatal "Failed to get the sectionAlignment of the stub PE header to create the UEFI image file"
|
||||
+ dfatal "Failed to get the SectionAlignment of the stub PE header to create the UEFI image file"
|
||||
exit 1
|
||||
fi
|
||||
offs=$((offs + "$align" - offs % "$align"))
|
||||
@@ -2638,12 +2638,19 @@ if [[ $uefi == yes ]]; then
|
||||
offs=$((offs + "$align" - offs % "$align"))
|
||||
uefi_initrd_offs="${offs}"
|
||||
|
||||
+ base_image=$(pe_get_image_base "$uefi_stub")
|
||||
+ if [[ $? -eq 1 ]]; then
|
||||
+ dfatal "Failed to get ImageBase data of $uefi_stub to create UEFI image file"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
if objcopy \
|
||||
${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \
|
||||
${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \
|
||||
${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \
|
||||
--add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \
|
||||
--add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \
|
||||
+ --image-base="$(printf 0x%x "$base_image")" \
|
||||
"$uefi_stub" "${uefi_outdir}/linux.efi"; then
|
||||
if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then
|
||||
if sbsign \
|
||||
|
46
0024.patch
46
0024.patch
|
@ -1,46 +0,0 @@
|
|||
From 11cc7032853ea254a7d4cabed0b7bf3a605ccc6c Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Thu, 20 Jul 2023 04:36:01 +0100
|
||||
Subject: [PATCH] fix(dracut.sh): use gawk for strtonum
|
||||
|
||||
strtonum is a gawkism and is not available in all awks, e.g. mawk. Use gawk
|
||||
to avoid failure.
|
||||
|
||||
Fixes: f32e95bcadbc5158843530407adc1e7b700561b1
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
|
||||
(Cherry-picked commit: 33a66ed04bdc30eccb172a0cd6dcc36d9d74f825)
|
||||
|
||||
Related: #2180787
|
||||
---
|
||||
dracut-functions.sh | 2 +-
|
||||
dracut.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 7f05da6e..3c475ca7 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -1001,7 +1001,7 @@ pe_file_format() {
|
||||
if [[ $# -eq 1 ]]; then
|
||||
local magic
|
||||
magic=$(objdump -p "$1" \
|
||||
- | awk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
|
||||
+ | gawk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
|
||||
magic=$(printf "0x%x" "$magic")
|
||||
# 0x10b (PE32), 0x20b (PE32+)
|
||||
[[ $magic == 0x20b || $magic == 0x10b ]] && return 0
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index a6a27dcf..1ff51bb1 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2593,7 +2593,7 @@ if [[ $uefi == yes ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
- offs=$(objdump -h "$uefi_stub" 2> /dev/null | awk 'NF==7 {size=strtonum("0x"$3);\
|
||||
+ offs=$(objdump -h "$uefi_stub" 2> /dev/null | gawk 'NF==7 {size=strtonum("0x"$3);\
|
||||
offset=strtonum("0x"$4)} END {print size + offset}')
|
||||
if [[ $offs -eq 0 ]]; then
|
||||
dfatal "Failed to get the size of $uefi_stub to create UEFI image file"
|
||||
|
59
0026.patch
59
0026.patch
|
@ -1,59 +0,0 @@
|
|||
From a63fbfe7eb109214fbcee726c9ba898ba3c954d3 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Wed, 14 Sep 2022 12:44:26 +0200
|
||||
Subject: [PATCH] fix(nvmf): nvme list-subsys prints the address using commas
|
||||
as separator
|
||||
|
||||
nvme-cli 1.x printed the address using spaces as separator, but nvme-cli 2.x
|
||||
prints the address using commas as separator (exact output from sysfs). E.g.,
|
||||
output from `cat /sys/class/nvme/nvme0/address`:
|
||||
|
||||
traddr=nn-0x201700a09890f5bf:pn-0x201900a09890f5bf,host_traddr=nn-0x200000109b579ef5:pn-0x100000109b579ef5
|
||||
|
||||
Also, I suppress rd.nvmf.discover= cmdline option if all fields are empty.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 21 ++++++++++++++++++---
|
||||
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index be1c85f3..0825b51c 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -61,6 +61,11 @@ cmdline() {
|
||||
gen_nvmf_cmdline() {
|
||||
local _dev=$1
|
||||
local trtype
|
||||
+ local traddr
|
||||
+ local host_traddr
|
||||
+ local trsvcid
|
||||
+ local _address
|
||||
+ local -a _address_parts
|
||||
|
||||
[[ -L "/sys/dev/block/$_dev" ]] || return 0
|
||||
cd -P "/sys/dev/block/$_dev" || return 0
|
||||
@@ -76,9 +81,19 @@ cmdline() {
|
||||
done
|
||||
|
||||
[ -z "$trtype" ] && return 0
|
||||
- nvme list-subsys "${PWD##*/}" | while read -r _ _ trtype traddr host_traddr _; do
|
||||
- [ "$trtype" != "${trtype#NQN}" ] && continue
|
||||
- echo -n " rd.nvmf.discover=$trtype,${traddr#traddr=},${host_traddr#host_traddr=}"
|
||||
+ nvme list-subsys "${PWD##*/}" | while read -r _ _ trtype _address _; do
|
||||
+ [[ -z $trtype || $trtype != "${trtype#NQN}" ]] && continue
|
||||
+ unset traddr
|
||||
+ unset host_traddr
|
||||
+ unset trsvcid
|
||||
+ mapfile -t -d ',' _address_parts < <(printf "%s" "$_address")
|
||||
+ for i in "${_address_parts[@]}"; do
|
||||
+ [[ $i =~ ^traddr= ]] && traddr="${i#traddr=}"
|
||||
+ [[ $i =~ ^host_traddr= ]] && host_traddr="${i#host_traddr=}"
|
||||
+ [[ $i =~ ^trsvcid= ]] && trsvcid="${i#trsvcid=}"
|
||||
+ done
|
||||
+ [[ -z $traddr && -z $host_traddr && -z $trsvcid ]] && continue
|
||||
+ echo -n " rd.nvmf.discover=$trtype,$traddr,$host_traddr,$trsvcid"
|
||||
done
|
||||
}
|
||||
|
||||
|
65
0027.patch
65
0027.patch
|
@ -1,65 +0,0 @@
|
|||
From 0322e328d94f70693e1e33fb96bd5d9d771fea3a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Fri, 16 Sep 2022 23:46:42 +0200
|
||||
Subject: [PATCH] fix(nvmf): don't try to validate network connections in
|
||||
cmdline hook
|
||||
|
||||
The cmdline hook runs before any network interfaces have been brought
|
||||
up. There's no point in trying to validate the connections at this
|
||||
stage.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 31 -------------------------
|
||||
1 file changed, 31 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index 46c00636..39923503 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -26,34 +26,6 @@ fi
|
||||
|
||||
initqueue --onetime modprobe --all -b -q nvme nvme_tcp nvme_core nvme_fabrics
|
||||
|
||||
-validate_ip_conn() {
|
||||
- if ! getargbool 0 rd.neednet; then
|
||||
- warn "$trtype transport requires rd.neednet=1"
|
||||
- return 1
|
||||
- fi
|
||||
-
|
||||
- local_address=$(ip -o route get to "$traddr" | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p')
|
||||
-
|
||||
- # confirm we got a local IP address
|
||||
- if ! is_ip "$local_address"; then
|
||||
- warn "$traddr is an invalid address"
|
||||
- return 1
|
||||
- fi
|
||||
-
|
||||
- ifname=$(ip -o route get from "$local_address" to "$traddr" | sed -n 's/.*dev \([^ ]*\).*/\1/p')
|
||||
-
|
||||
- if ! ip l show "$ifname" > /dev/null 2>&1; then
|
||||
- warn "invalid network interface $ifname"
|
||||
- return 1
|
||||
- fi
|
||||
-
|
||||
- # confirm there's a route to destination
|
||||
- if ! ip route get "$traddr" > /dev/null 2>&1; then
|
||||
- warn "no route to $traddr"
|
||||
- return 1
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
parse_nvmf_discover() {
|
||||
traddr="none"
|
||||
trtype="none"
|
||||
@@ -103,9 +75,6 @@ parse_nvmf_discover() {
|
||||
warn "unsupported transport $trtype"
|
||||
return 0
|
||||
fi
|
||||
- if [ "$trtype" = "tcp" ]; then
|
||||
- validate_ip_conn
|
||||
- fi
|
||||
if [ "$trtype" = "fc" ]; then
|
||||
echo "--transport=$trtype --traddr=$traddr --host-traddr=$hosttraddr" >> /etc/nvme/discovery.conf
|
||||
else
|
||||
|
26
0028.patch
26
0028.patch
|
@ -1,26 +0,0 @@
|
|||
From cd4d4282b5dd7d30af31c41faa807dcf8de01c29 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:01:07 +0200
|
||||
Subject: [PATCH] fix(nvmf): no need to load the nvme module
|
||||
|
||||
The module "nvme" is not required for NVMeoF.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index 39923503..cfed5ae5 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -24,7 +24,7 @@ if getargbool 0 rd.nonvmf; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
-initqueue --onetime modprobe --all -b -q nvme nvme_tcp nvme_core nvme_fabrics
|
||||
+initqueue --onetime modprobe --all -b -q nvme_tcp nvme_core nvme_fabrics
|
||||
|
||||
parse_nvmf_discover() {
|
||||
traddr="none"
|
||||
|
28
0029.patch
28
0029.patch
|
@ -1,28 +0,0 @@
|
|||
From aef95e59e918ed9aaaf7e5c2daf32ff205ed314c Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:40:49 +0200
|
||||
Subject: [PATCH] fix(nvmf): don't create did-setup file
|
||||
|
||||
did-setup files are meant to indicate that an interface setup
|
||||
was successful. Don't do it here.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index cfed5ae5..1cdaba69 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -102,9 +102,6 @@ done
|
||||
|
||||
if [ -f "/etc/nvme/discovery.conf" ]; then
|
||||
/sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
|
||||
- if [ "$trtype" = "tcp" ]; then
|
||||
- : > /tmp/net."$ifname".did-setup
|
||||
- fi
|
||||
else
|
||||
# No nvme command line arguments present, try autodiscovery
|
||||
if [ "$trtype" = "fc" ]; then
|
||||
|
26
0030.patch
26
0030.patch
|
@ -1,26 +0,0 @@
|
|||
From b4987c9544224e7b3dae7b4411a2c8437ec573ab Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:49:29 +0200
|
||||
Subject: [PATCH] fix(nvmf): don't use "finished" queue for autoconnect
|
||||
|
||||
The "finished" initqueue is for testing if everything is alright,
|
||||
not for triggering any actions.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index 1cdaba69..df104606 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -105,6 +105,6 @@ if [ -f "/etc/nvme/discovery.conf" ]; then
|
||||
else
|
||||
# No nvme command line arguments present, try autodiscovery
|
||||
if [ "$trtype" = "fc" ]; then
|
||||
- /sbin/initqueue --finished --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
+ /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
fi
|
||||
fi
|
||||
|
48
0031.patch
48
0031.patch
|
@ -1,48 +0,0 @@
|
|||
From 5f0e59418133379f50cc7af30674ce96569d9038 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:51:46 +0200
|
||||
Subject: [PATCH] fix(nvmf): make sure "rd.nvmf.discover=fc,auto" takes
|
||||
precedence
|
||||
|
||||
The command line may contain several rd.nvmf.discover options.
|
||||
The "fc,auto" option should take precedence.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index df104606..c8078a76 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -92,19 +92,21 @@ if [ -n "$nvmf_hostid" ]; then
|
||||
echo "$nvmf_hostid" > /etc/nvme/hostid
|
||||
fi
|
||||
|
||||
+NVMF_FC_AUTO=
|
||||
for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do
|
||||
- parse_nvmf_discover "$d" || break
|
||||
+ parse_nvmf_discover "$d" || {
|
||||
+ NVMF_FC_AUTO=1
|
||||
+ break
|
||||
+ }
|
||||
done
|
||||
|
||||
# Host NQN and host id are mandatory for NVMe-oF
|
||||
[ -f "/etc/nvme/hostnqn" ] || exit 0
|
||||
[ -f "/etc/nvme/hostid" ] || exit 0
|
||||
|
||||
-if [ -f "/etc/nvme/discovery.conf" ]; then
|
||||
- /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
|
||||
+# If no nvme command line arguments present, try autodiscovery
|
||||
+if [ $NVMF_FC_AUTO ] || [ ! -f "/etc/nvme/discovery.conf" ]; then
|
||||
+ /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
else
|
||||
- # No nvme command line arguments present, try autodiscovery
|
||||
- if [ "$trtype" = "fc" ]; then
|
||||
- /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
- fi
|
||||
+ /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
|
||||
fi
|
||||
|
38
0032.patch
38
0032.patch
|
@ -1,38 +0,0 @@
|
|||
From 5b6ddf6e989f44211e799fec9aac6b7afb36e1ce Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:54:25 +0200
|
||||
Subject: [PATCH] fix(nvmf): avoid calling "exit" in a cmdline hook
|
||||
|
||||
"exit" should never be executed in dracut hooks, because the
|
||||
hooks are sourced by the main script.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index c8078a76..cc545ee0 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -101,12 +101,12 @@ for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do
|
||||
done
|
||||
|
||||
# Host NQN and host id are mandatory for NVMe-oF
|
||||
-[ -f "/etc/nvme/hostnqn" ] || exit 0
|
||||
-[ -f "/etc/nvme/hostid" ] || exit 0
|
||||
+if [ -f "/etc/nvme/hostnqn" ] && [ -f "/etc/nvme/hostid" ]; then
|
||||
|
||||
-# If no nvme command line arguments present, try autodiscovery
|
||||
-if [ $NVMF_FC_AUTO ] || [ ! -f "/etc/nvme/discovery.conf" ]; then
|
||||
- /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
-else
|
||||
- /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
|
||||
+ # If no nvme command line arguments present, try autodiscovery
|
||||
+ if [ $NVMF_FC_AUTO ] || [ ! -f "/etc/nvme/discovery.conf" ]; then
|
||||
+ /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
+ else
|
||||
+ /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
|
||||
+ fi
|
||||
fi
|
||||
|
26
0033.patch
26
0033.patch
|
@ -1,26 +0,0 @@
|
|||
From 0464b41d8dfc7676429fcee67357bf01e09eac7d Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:02:16 +0200
|
||||
Subject: [PATCH] fix(nvmf): run cmdline hook before parse-ip-opts.sh
|
||||
|
||||
This way we can set "rd.neednet" and have it seen by parse-ip-options.sh
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index 0825b51c..ce5ccde2 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -128,7 +128,7 @@ install() {
|
||||
inst_script "${moddir}/nvmf-autoconnect.sh" /sbin/nvmf-autoconnect.sh
|
||||
|
||||
inst_multiple nvme
|
||||
- inst_hook cmdline 99 "$moddir/parse-nvmf-boot-connections.sh"
|
||||
+ inst_hook cmdline 92 "$moddir/parse-nvmf-boot-connections.sh"
|
||||
inst_simple "/etc/nvme/discovery.conf"
|
||||
inst_rules /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules
|
||||
inst_rules "$moddir/95-nvmf-initqueue.rules"
|
||||
|
50
0034.patch
50
0034.patch
|
@ -1,50 +0,0 @@
|
|||
From 0a074c5d0813df405e7a5dd55493c78099094106 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Sat, 17 Sep 2022 00:24:38 +0200
|
||||
Subject: [PATCH] feat(nvmf): set rd.neednet=1 if tcp records encountered
|
||||
|
||||
This is currently always the case for NBFT records.
|
||||
We can do this now, as we run before parse-ip-options.sh
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index cc545ee0..6b26f762 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -62,7 +62,9 @@ parse_nvmf_discover() {
|
||||
warn "traddr is mandatory for $trtype"
|
||||
return 0
|
||||
fi
|
||||
- if [ "$trtype" = "fc" ]; then
|
||||
+ if [ "$trtype" = "tcp" ]; then
|
||||
+ : > /tmp/nvmf_needs_network
|
||||
+ elif [ "$trtype" = "fc" ]; then
|
||||
if [ "$traddr" = "auto" ]; then
|
||||
rm /etc/nvme/discovery.conf
|
||||
return 1
|
||||
@@ -71,7 +73,7 @@ parse_nvmf_discover() {
|
||||
warn "host traddr is mandatory for fc"
|
||||
return 0
|
||||
fi
|
||||
- elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ]; then
|
||||
+ elif [ "$trtype" != "rdma" ]; then
|
||||
warn "unsupported transport $trtype"
|
||||
return 0
|
||||
fi
|
||||
@@ -100,6 +102,11 @@ for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do
|
||||
}
|
||||
done
|
||||
|
||||
+if [ -e /tmp/nvmf_needs_network ]; then
|
||||
+ echo "rd.neednet=1" > /etc/cmdline.d/nvmf-neednet.conf
|
||||
+ rm -f /tmp/nvmf_needs_network
|
||||
+fi
|
||||
+
|
||||
# Host NQN and host id are mandatory for NVMe-oF
|
||||
if [ -f "/etc/nvme/hostnqn" ] && [ -f "/etc/nvme/hostid" ]; then
|
||||
|
||||
|
28
0035.patch
28
0035.patch
|
@ -1,28 +0,0 @@
|
|||
From 185e200e9969f717faa5014d87be579ce452d2fe Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Thu, 12 Jan 2023 11:06:35 +0100
|
||||
Subject: [PATCH] fix(nvmf): install 8021q module unconditionally
|
||||
|
||||
In NBFT setups, VLAN can be configured in the firmware.
|
||||
Add the 8021q module in hostonly mode even if VLAN is currently
|
||||
not used to be prepared for such configuration change.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index ce5ccde2..f7fd62a0 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -50,7 +50,7 @@ depends() {
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
instmods nvme_fc lpfc qla2xxx
|
||||
- hostonly="" instmods nvme_tcp nvme_fabrics
|
||||
+ hostonly="" instmods nvme_tcp nvme_fabrics 8021q
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
|
45
0036.patch
45
0036.patch
|
@ -1,45 +0,0 @@
|
|||
From 1a6c2fdade221e9d69e14e2b6f3386ca8fc4a8b6 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Thu, 9 Mar 2023 16:55:36 +0100
|
||||
Subject: [PATCH] fix(nvmf): support /etc/nvme/config.json
|
||||
|
||||
Since nvme-cli 2.0, configuration of subsystems to connect to is
|
||||
stored under `/etc/nvme` in either `discovery.conf` or `config.json`.
|
||||
Attempt discovery also if the latter exists, but not the former.
|
||||
Also, install "config.json" if it's present on the root FS.
|
||||
|
||||
As before, "rd.nvmf.discover=fc,auto" will force either file to be ignored,
|
||||
and NBFT-defined targets take precedence if found.
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 1 +
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index f7fd62a0..46ecb38f 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -130,6 +130,7 @@ install() {
|
||||
inst_multiple nvme
|
||||
inst_hook cmdline 92 "$moddir/parse-nvmf-boot-connections.sh"
|
||||
inst_simple "/etc/nvme/discovery.conf"
|
||||
+ inst_simple "/etc/nvme/config.json"
|
||||
inst_rules /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules
|
||||
inst_rules "$moddir/95-nvmf-initqueue.rules"
|
||||
dracut_need_initqueue
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index 6b26f762..6c5ef4bc 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -66,7 +66,7 @@ parse_nvmf_discover() {
|
||||
: > /tmp/nvmf_needs_network
|
||||
elif [ "$trtype" = "fc" ]; then
|
||||
if [ "$traddr" = "auto" ]; then
|
||||
- rm /etc/nvme/discovery.conf
|
||||
+ rm -f /etc/nvme/discovery.conf /etc/nvme/config.json
|
||||
return 1
|
||||
fi
|
||||
if [ "$hosttraddr" = "none" ]; then
|
||||
|
511
0037.patch
511
0037.patch
|
@ -1,511 +0,0 @@
|
|||
From add394a3532b968e12bc7b9a8923cc4b85f5f724 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.de>
|
||||
Date: Fri, 16 Sep 2022 21:36:52 +0200
|
||||
Subject: [PATCH] feat(nvmf): add code for parsing the NBFT
|
||||
|
||||
Add code to parse the Nvme-oF Boot Firmware Table (NBFT) according
|
||||
to the NVM Express Boot Specification 1.0 [1]. The implementation in
|
||||
dracut follows a similar general approach as iBFT support in the
|
||||
iscsi module.
|
||||
|
||||
NBFT support requires two steps:
|
||||
|
||||
(1) Setting up the network and routing according to the
|
||||
HFI ("Host Fabric Interface") records in the NBFT,
|
||||
(2) Establishing the actual NVMe-oF connection.
|
||||
|
||||
(1) is accomplished by reading the NBFT using JSON output from
|
||||
the "nvme nbft show" command, and transforming it into command
|
||||
line options ("ip=", "rd.neednet", etc.) understood by dracut's
|
||||
network module and its backends. The resulting network setup code
|
||||
is backend-agnostic. It has been tested with the "network-legacy"
|
||||
and "network-manager" network backend modules. The network setup
|
||||
code supports IPv4 and IPv6 with static, RA, or DHCP configurations,
|
||||
802.1q VLANs, and simple routing / gateway setup.
|
||||
|
||||
(2) is done using the "nvme connect-all" command [2] in the netroot handler,
|
||||
which is invoked by networking backends when an interface gets fully
|
||||
configured. This patch adds support for "netboot=nbft". The "nbftroot"
|
||||
handler calls nvmf-autoconnect.sh, which contains the actual connect
|
||||
logic. nvmf-autoconnect.sh itself is preserved, because there are
|
||||
other NVMe-oF setups like NVMe over FC which don't depend on the
|
||||
network.
|
||||
|
||||
The various ways to configure NVMe-oF are prioritized like this:
|
||||
|
||||
1 FC autoconnect from kernel commandline (rd.nvmf.discover=fc,auto)
|
||||
2 NBFT, if present
|
||||
3 discovery.conf or config.json, if present, and cmdline.d parameters,
|
||||
if present (rd.nvmf.discovery=...)
|
||||
4 FC autoconnect (without kernel command line)
|
||||
|
||||
The reason for this priorization is that in the initial RAM fs, we try
|
||||
to activate only those connections that are necessary to mount the root
|
||||
file system. This avoids confusion, possible contradicting or ambiguous
|
||||
configuration, and timeouts from unavailable targets.
|
||||
|
||||
A retry logic is implemented for enabling the NVMe-oF connections,
|
||||
using the "settled" initqueue, the netroot handler, and eventually, the
|
||||
"timeout" initqueue. This is similar to the retry logic of the iscsi module.
|
||||
In the "timeout" case, connection to all possible NVMe-oF subsystems
|
||||
is attempted.
|
||||
|
||||
Two new command line parameters are introduced to make it possible to
|
||||
change the priorities above:
|
||||
|
||||
- "rd.nvmf.nonbft" causes the NBFT to be ignored,
|
||||
- "rd.nvmf.nostatic" causes any statically configured NVMe-oF targets
|
||||
(config.json, discovery.conf, and cmdline.d) to be ignored.
|
||||
|
||||
These parameters may be helpful to skip attempts to set up broken
|
||||
configurations.
|
||||
|
||||
At initramfs build time, the nvmf module is now enabled if an NBFT
|
||||
table is detected in the system.
|
||||
|
||||
[1] https://nvmexpress.org/wp-content/uploads/NVM-Express-Boot-Specification-2022.11.15-Ratified.pdf
|
||||
[2] NBFT support in nvme-cli requires the latest upstream code (> v2.4).
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Co-authored-by: John Meneghini <jmeneghi@redhat.com>
|
||||
Co-authored-by: Charles Rose <charles.rose@dell.com>
|
||||
|
||||
(Cherry-picked commits:
|
||||
9664e98b5db603567d42d4d0c6e6ea1bd3d5bf24
|
||||
b3ff3f3fbce6878a754332cd4a05374e5e1156c8
|
||||
a3cf4ec92202df43adf368c7fdd12e35d304a0e4
|
||||
03921ec09e95ea49f89ae307dcca4e2e3d1bc6d6
|
||||
e93e46520dd89a7357a15441ab6b141ff9ff9aeb
|
||||
556ef46aa96650d72b2fd850a09fa04dff64bbb8
|
||||
a93968b07567a654d18b8ef2144337d803186eca
|
||||
a65fab69662d3adf52eb968411f59ebc5a173f7c
|
||||
cf8986af7d9a3ce73f330de23d5312f924acea34
|
||||
7c28e1148c086d8504caab6e70a1bcfda1bbf0b9
|
||||
b03dc850e4630c3b727f71b853a1be588507a59e
|
||||
0a4d7f9aece172f0f9a9286c94308b7e1ef8d500)
|
||||
|
||||
Resolves: #1933787
|
||||
---
|
||||
man/dracut.cmdline.7.asc | 9 +
|
||||
modules.d/95nvmf/module-setup.sh | 25 ++-
|
||||
modules.d/95nvmf/nbftroot.sh | 5 +
|
||||
modules.d/95nvmf/nvmf-autoconnect.sh | 55 +++++-
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 235 ++++++++++++++++++++++--
|
||||
5 files changed, 305 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc
|
||||
index 40d13d83..abe1ec3f 100644
|
||||
--- a/man/dracut.cmdline.7.asc
|
||||
+++ b/man/dracut.cmdline.7.asc
|
||||
@@ -898,6 +898,15 @@ NVMf
|
||||
**rd.nonvmf=0**::
|
||||
Disable NVMf
|
||||
|
||||
+**rd.nvmf.nonbft**::
|
||||
+ Disable connecting to targets from the NVMe Boot Firmware Table. Without
|
||||
+ this parameter, NBFT connections will take precedence over _rd.nvmf.discover_.
|
||||
+
|
||||
+**rd.nvmf.nostatic**::
|
||||
+ Disable connecting to targets that have been statically configured when
|
||||
+ the initramfs was built. Targets specified with rd.nvmf.discover on the
|
||||
+ kernel command line will still be tried.
|
||||
+
|
||||
**rd.nvmf.hostnqn=**__<hostNQN>__::
|
||||
NVMe host NQN to use
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index 46ecb38f..1dd2ca53 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
- require_binaries nvme || return 1
|
||||
+ require_binaries nvme jq || return 1
|
||||
[ -f /etc/nvme/hostnqn ] || return 255
|
||||
[ -f /etc/nvme/hostid ] || return 255
|
||||
|
||||
@@ -25,17 +25,27 @@ check() {
|
||||
[[ $trtype == "fc" ]] || [[ $trtype == "tcp" ]] || [[ $trtype == "rdma" ]]
|
||||
}
|
||||
|
||||
+ has_nbft() {
|
||||
+ local f found=
|
||||
+ for f in /sys/firmware/acpi/tables/NBFT*; do
|
||||
+ [ -f "$f" ] || continue
|
||||
+ found=1
|
||||
+ break
|
||||
+ done
|
||||
+ [[ $found ]]
|
||||
+ }
|
||||
+
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
pushd . > /dev/null
|
||||
for_each_host_dev_and_slaves is_nvmf
|
||||
local _is_nvmf=$?
|
||||
popd > /dev/null || exit
|
||||
[[ $_is_nvmf == 0 ]] || return 255
|
||||
- if [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ]; then
|
||||
- if [ ! -f /etc/nvme/discovery.conf ]; then
|
||||
- echo "No discovery arguments present"
|
||||
- return 255
|
||||
- fi
|
||||
+ if [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ] \
|
||||
+ && [ ! -f /etc/nvme/discovery.conf ] \
|
||||
+ && [ ! -f /etc/nvme/config.json ] && ! has_nbft; then
|
||||
+ echo "No discovery arguments present"
|
||||
+ return 255
|
||||
fi
|
||||
}
|
||||
return 0
|
||||
@@ -126,8 +136,9 @@ install() {
|
||||
inst_multiple ip sed
|
||||
|
||||
inst_script "${moddir}/nvmf-autoconnect.sh" /sbin/nvmf-autoconnect.sh
|
||||
+ inst_script "${moddir}/nbftroot.sh" /sbin/nbftroot
|
||||
|
||||
- inst_multiple nvme
|
||||
+ inst_multiple nvme jq
|
||||
inst_hook cmdline 92 "$moddir/parse-nvmf-boot-connections.sh"
|
||||
inst_simple "/etc/nvme/discovery.conf"
|
||||
inst_simple "/etc/nvme/config.json"
|
||||
diff --git a/modules.d/95nvmf/nbftroot.sh b/modules.d/95nvmf/nbftroot.sh
|
||||
new file mode 100755
|
||||
index 00000000..0f334995
|
||||
--- /dev/null
|
||||
+++ b/modules.d/95nvmf/nbftroot.sh
|
||||
@@ -0,0 +1,5 @@
|
||||
+#! /bin/sh
|
||||
+# This script is called from /sbin/netroot
|
||||
+
|
||||
+/sbin/nvmf-autoconnect.sh online
|
||||
+exit 0
|
||||
diff --git a/modules.d/95nvmf/nvmf-autoconnect.sh b/modules.d/95nvmf/nvmf-autoconnect.sh
|
||||
index c8f676a7..35ee9487 100755
|
||||
--- a/modules.d/95nvmf/nvmf-autoconnect.sh
|
||||
+++ b/modules.d/95nvmf/nvmf-autoconnect.sh
|
||||
@@ -1,5 +1,54 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
+# Argument $1 is "settled", "online", or "timeout", indicating
|
||||
+# the queue from which the script is called.
|
||||
+# In the "timeout" case, try everything.
|
||||
+# Otherwise, try options according to the priorities below.
|
||||
|
||||
-[ -f /sys/class/fc/fc_udev_device/nvme_discovery ] || exit 1
|
||||
-echo add > /sys/class/fc/fc_udev_device/nvme_discovery
|
||||
+[ "$RD_DEBUG" != yes ] || set -x
|
||||
+
|
||||
+if [ "$1" = timeout ]; then
|
||||
+ [ ! -f /sys/class/fc/fc_udev_device/nvme_discovery ] \
|
||||
+ || echo add > /sys/class/fc/fc_udev_device/nvme_discovery
|
||||
+ /usr/sbin/nvme connect-all
|
||||
+ exit 0
|
||||
+fi
|
||||
+
|
||||
+NVMF_HOSTNQN_OK=
|
||||
+[ ! -f "/etc/nvme/hostnqn" ] || [ ! -f "/etc/nvme/hostid" ] || NVMF_HOSTNQN_OK=1
|
||||
+
|
||||
+# Only nvme-cli 2.5 or newer supports the options --nbft and --no-nbft
|
||||
+# for the connect-all command.
|
||||
+# Make sure we don't use unsupported options with earlier versions.
|
||||
+NBFT_SUPPORTED=
|
||||
+# shellcheck disable=SC2016
|
||||
+/usr/sbin/nvme connect-all --help 2>&1 | sed -n '/[[:space:]]--nbft[[:space:]]/q1;$q0' \
|
||||
+ || NBFT_SUPPORTED=1
|
||||
+
|
||||
+if [ -e /tmp/nvmf-fc-auto ] && [ "$NVMF_HOSTNQN_OK" ] \
|
||||
+ && [ -f /sys/class/fc/fc_udev_device/nvme_discovery ]; then
|
||||
+ # prio 1: cmdline override "rd.nvmf.discovery=fc,auto"
|
||||
+ echo add > /sys/class/fc/fc_udev_device/nvme_discovery
|
||||
+ exit 0
|
||||
+fi
|
||||
+if [ "$NBFT_SUPPORTED" ] && [ -e /tmp/valid_nbft_entry_found ]; then
|
||||
+ # prio 2: NBFT
|
||||
+ /usr/sbin/nvme connect-all --nbft
|
||||
+ exit 0
|
||||
+fi
|
||||
+if [ -f /etc/nvme/discovery.conf ] || [ -f /etc/nvme/config.json ] \
|
||||
+ && [ "$NVMF_HOSTNQN_OK" ]; then
|
||||
+ # prio 3: configuration from initrd and/or kernel command line
|
||||
+ # We can get here even if "rd.nvmf.nonbft" was given, thus use --no-nbft
|
||||
+ if [ "$NBFT_SUPPORTED" ]; then
|
||||
+ /usr/sbin/nvme connect-all --no-nbft
|
||||
+ else
|
||||
+ /usr/sbin/nvme connect-all
|
||||
+ fi
|
||||
+ exit 0
|
||||
+fi
|
||||
+if [ "$NVMF_HOSTNQN_OK" ] \
|
||||
+ && [ -f /sys/class/fc/fc_udev_device/nvme_discovery ]; then
|
||||
+ # prio 4: no discovery entries, try NVMeoFC autoconnect
|
||||
+ echo add > /sys/class/fc/fc_udev_device/nvme_discovery
|
||||
+fi
|
||||
exit 0
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index 6c5ef4bc..66018371 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -17,13 +17,225 @@
|
||||
# specify any discover parameters for FC.
|
||||
#
|
||||
|
||||
-type is_ip > /dev/null 2>&1 || . /lib/net-lib.sh
|
||||
+command -v getarg > /dev/null || . /lib/dracut-lib.sh
|
||||
+command -v is_ip > /dev/null || . /lib/net-lib.sh
|
||||
+
|
||||
+## Sample NBFT output from nvme show-nbft -H -s -d -o json
|
||||
+# [
|
||||
+# {
|
||||
+# "filename":"/sys/firmware/acpi/tables/NBFT",
|
||||
+# "host":{
|
||||
+# "nqn":"nqn.2014-08.org.nvmexpress:uuid:d6f07002-7eb5-4841-a185-400e296afae4",
|
||||
+# "id":"111919da-21ea-cc4e-bafe-216d8372dd31",
|
||||
+# "host_id_configured":0,
|
||||
+# "host_nqn_configured":0,
|
||||
+# "primary_admin_host_flag":"not indicated"
|
||||
+# },
|
||||
+# "subsystem":[
|
||||
+# {
|
||||
+# "index":1,
|
||||
+# "num_hfis":1,
|
||||
+# "hfis":[
|
||||
+# 1
|
||||
+# ],
|
||||
+# "transport":"tcp",
|
||||
+# "transport_address":"192.168.100.216",
|
||||
+# "transport_svcid":"4420",
|
||||
+# "subsys_port_id":0,
|
||||
+# "nsid":1,
|
||||
+# "nid_type":"uuid",
|
||||
+# "nid":"424d1c8a-8ef9-4681-b2fc-8c343bd8fa69",
|
||||
+# "subsys_nqn":"timberland-01",
|
||||
+# "controller_id":0,
|
||||
+# "asqsz":0,
|
||||
+# "pdu_header_digest_required":0,
|
||||
+# "data_digest_required":0
|
||||
+# }
|
||||
+# ],
|
||||
+# "hfi":[
|
||||
+# {
|
||||
+# "index":1,
|
||||
+# "transport":"tcp",
|
||||
+# "pcidev":"0:0:2.0",
|
||||
+# "mac_addr":"52:54:00:4f:97:e9",
|
||||
+# "vlan":0,
|
||||
+# "ip_origin":63,
|
||||
+# "ipaddr":"192.168.100.217",
|
||||
+# "subnet_mask_prefix":24,
|
||||
+# "gateway_ipaddr":"0.0.0.0",
|
||||
+# "route_metric":0,
|
||||
+# "primary_dns_ipaddr":"0.0.0.0",
|
||||
+# "secondary_dns_ipaddr":"0.0.0.0",
|
||||
+# "dhcp_server_ipaddr":"",
|
||||
+# "this_hfi_is_default_route":1
|
||||
+# }
|
||||
+# ],
|
||||
+# "discovery":[
|
||||
+# ]
|
||||
+# }
|
||||
+# ]
|
||||
+#
|
||||
+# If the IP address is derived from DHCP, it sets the field
|
||||
+# "hfi.dhcp_server_ipaddr" to a non-emtpy value.
|
||||
+#
|
||||
+#
|
||||
+
|
||||
+nbft_run_jq() {
|
||||
+ local st
|
||||
+ local opts="-e"
|
||||
+
|
||||
+ while [ $# -gt 0 ]; do
|
||||
+ case $1 in
|
||||
+ -*)
|
||||
+ opts="$opts $1"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ break
|
||||
+ ;;
|
||||
+ esac
|
||||
+ shift
|
||||
+ done
|
||||
+ # Not quoting is intentional here. We won't get glob expressions passed.
|
||||
+ # shellcheck disable=SC2086
|
||||
+ jq $opts "$1" << EOF
|
||||
+$2
|
||||
+EOF
|
||||
+ st=$?
|
||||
+ if [ $st -ne 0 ]; then
|
||||
+ warn "NBFT: jq error while processing \"$1\""
|
||||
+ return $st
|
||||
+ else
|
||||
+ return 0
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+nbft_check_empty_address() {
|
||||
+ # suppress meaningless or empty IP addresses
|
||||
+ # "null" is returned by jq if no match found for expression
|
||||
+ case $1 in
|
||||
+ null | "::" | "0.0.0.0") ;;
|
||||
+ *)
|
||||
+ echo "$1"
|
||||
+ ;;
|
||||
+ esac
|
||||
+}
|
||||
+
|
||||
+nbft_parse_hfi() {
|
||||
+ # false positive of shellcheck - no expansion in variable assignments
|
||||
+ # shellcheck disable=2086
|
||||
+ local hfi_json=$1
|
||||
+ local mac iface ipaddr prefix vlan gateway dns1 dns2 hostname adrfam dhcp
|
||||
+
|
||||
+ mac=$(nbft_run_jq -r .mac_addr "$hfi_json") || return 1
|
||||
+ iface=$(set_ifname nbft "$mac")
|
||||
+
|
||||
+ vlan=$(nbft_run_jq .vlan "$hfi_json") || vlan=0
|
||||
+ # treat VLAN zero as "no vlan"
|
||||
+ [ "$vlan" -ne 0 ] || vlan=
|
||||
+
|
||||
+ [ ! -e /tmp/net."${iface}${vlan:+.$vlan}".has_ibft_config ] || return 0
|
||||
+
|
||||
+ dhcp=$(nbft_run_jq -r .dhcp_server_ipaddr "$hfi_json")
|
||||
+ # We need to check $? here as the above is an assignment
|
||||
+ # shellcheck disable=2181
|
||||
+ if [ $? -eq 0 ] && [ "$dhcp" ] && [ "$dhcp" != null ]; then
|
||||
+ case $dhcp in
|
||||
+ *:*)
|
||||
+ echo ip="$iface${vlan:+.$vlan}:dhcp6"
|
||||
+ ;;
|
||||
+ *.*.*.*)
|
||||
+ echo ip="$iface${vlan:+.$vlan}:dhcp"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ warn "Invalid value for dhcp_server_ipaddr: $dhcp"
|
||||
+ return 1
|
||||
+ ;;
|
||||
+ esac
|
||||
+ else
|
||||
+ ipaddr=$(nbft_run_jq -r .ipaddr "$hfi_json") || return 1
|
||||
+
|
||||
+ case $ipaddr in
|
||||
+ *.*.*.*)
|
||||
+ adrfam=ipv4
|
||||
+ ;;
|
||||
+ *:*)
|
||||
+ adrfam=ipv6
|
||||
+ ;;
|
||||
+ *)
|
||||
+ warn "invalid address: $ipaddr"
|
||||
+ return 1
|
||||
+ ;;
|
||||
+ esac
|
||||
+ prefix=$(nbft_run_jq -r .subnet_mask_prefix "$hfi_json")
|
||||
+ # Need to check $? here as he above is an assignment
|
||||
+ # shellcheck disable=2181
|
||||
+ if [ $? -ne 0 ] && [ "$adrfam" = ipv6 ]; then
|
||||
+ prefix=128
|
||||
+ fi
|
||||
+ # Use brackets for IPv6
|
||||
+ if [ "$adrfam" = ipv6 ]; then
|
||||
+ ipaddr="[$ipaddr]"
|
||||
+ fi
|
||||
+
|
||||
+ gateway=$(nbft_check_empty_address \
|
||||
+ "$(nbft_run_jq -r .gateway_ipaddr "$hfi_json")")
|
||||
+ dns1=$(nbft_check_empty_address \
|
||||
+ "$(nbft_run_jq -r .primary_dns_ipaddr "$hfi_json")")
|
||||
+ dns2=$(nbft_check_empty_address \
|
||||
+ "$(nbft_run_jq -r .secondary_dns_ipaddr "$hfi_json")")
|
||||
+ hostname=$(nbft_run_jq -r .host_name "$hfi_json" 2> /dev/null) || hostname=
|
||||
+
|
||||
+ echo "ip=$ipaddr::$gateway:$prefix:$hostname:$iface${vlan:+.$vlan}:none${dns1:+:$dns1}${dns2:+:$dns2}"
|
||||
+ fi
|
||||
+
|
||||
+ if [ "$vlan" ]; then
|
||||
+ echo "vlan=$iface.$vlan:$iface"
|
||||
+ echo "$mac" > "/tmp/net.$iface.$vlan.has_ibft_config"
|
||||
+ else
|
||||
+ echo "$mac" > "/tmp/net.$iface.has_ibft_config"
|
||||
+ fi
|
||||
+ : > /tmp/valid_nbft_entry_found
|
||||
+}
|
||||
+
|
||||
+nbft_parse() {
|
||||
+ local nbft_json n_nbft all_hfi_json n_hfi
|
||||
+ local j=0 i
|
||||
+
|
||||
+ nbft_json=$(nvme nbft show -H -o json) || return 0
|
||||
+ n_nbft=$(nbft_run_jq ". | length" "$nbft_json") || return 0
|
||||
+
|
||||
+ while [ "$j" -lt "$n_nbft" ]; do
|
||||
+ all_hfi_json=$(nbft_run_jq ".[$j].hfi" "$nbft_json") || continue
|
||||
+ n_hfi=$(nbft_run_jq ". | length" "$all_hfi_json") || continue
|
||||
+ i=0
|
||||
+
|
||||
+ while [ "$i" -lt "$n_hfi" ]; do
|
||||
+ nbft_parse_hfi "$(nbft_run_jq ".[$i]" "$all_hfi_json")"
|
||||
+ i=$((i + 1))
|
||||
+ done
|
||||
+ j=$((j + 1))
|
||||
+ done >> /etc/cmdline.d/40-nbft.conf
|
||||
+}
|
||||
|
||||
if getargbool 0 rd.nonvmf; then
|
||||
warn "rd.nonvmf=0: skipping nvmf"
|
||||
return 0
|
||||
fi
|
||||
|
||||
+if getargbool 0 rd.nvmf.nostatic; then
|
||||
+ rm -f /etc/cmdline.d/95nvmf-args.conf
|
||||
+ rm -f /etc/nvme/discovery.conf /etc/nvme/config.json
|
||||
+fi
|
||||
+
|
||||
+if ! getargbool 0 rd.nvmf.nonbft; then
|
||||
+ for _x in /sys/firmware/acpi/tables/NBFT*; do
|
||||
+ if [ -f "$_x" ]; then
|
||||
+ nbft_parse
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+fi
|
||||
+
|
||||
initqueue --onetime modprobe --all -b -q nvme_tcp nvme_core nvme_fabrics
|
||||
|
||||
parse_nvmf_discover() {
|
||||
@@ -94,26 +306,21 @@ if [ -n "$nvmf_hostid" ]; then
|
||||
echo "$nvmf_hostid" > /etc/nvme/hostid
|
||||
fi
|
||||
|
||||
-NVMF_FC_AUTO=
|
||||
+rm -f /tmp/nvmf-fc-auto
|
||||
for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do
|
||||
parse_nvmf_discover "$d" || {
|
||||
- NVMF_FC_AUTO=1
|
||||
+ : > /tmp/nvmf-fc-auto
|
||||
break
|
||||
}
|
||||
done
|
||||
|
||||
-if [ -e /tmp/nvmf_needs_network ]; then
|
||||
+if [ -e /tmp/nvmf_needs_network ] || [ -e /tmp/valid_nbft_entry_found ]; then
|
||||
echo "rd.neednet=1" > /etc/cmdline.d/nvmf-neednet.conf
|
||||
+ # netroot is a global variable that is present in all "sourced" scripts
|
||||
+ # shellcheck disable=SC2034
|
||||
+ netroot=nbft
|
||||
rm -f /tmp/nvmf_needs_network
|
||||
fi
|
||||
|
||||
-# Host NQN and host id are mandatory for NVMe-oF
|
||||
-if [ -f "/etc/nvme/hostnqn" ] && [ -f "/etc/nvme/hostid" ]; then
|
||||
-
|
||||
- # If no nvme command line arguments present, try autodiscovery
|
||||
- if [ $NVMF_FC_AUTO ] || [ ! -f "/etc/nvme/discovery.conf" ]; then
|
||||
- /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
|
||||
- else
|
||||
- /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
|
||||
- fi
|
||||
-fi
|
||||
+/sbin/initqueue --settled --onetime --name nvmf-connect-settled /sbin/nvmf-autoconnect.sh settled
|
||||
+/sbin/initqueue --timeout --onetime --name nvmf-connect-timeout /sbin/nvmf-autoconnect.sh timeout
|
41
0038.patch
41
0038.patch
|
@ -1,41 +0,0 @@
|
|||
From abc03e87ef3dff517c1da05643e8a5ec92b1bf14 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 14 Aug 2023 10:24:14 +0200
|
||||
Subject: [PATCH] feat(spec): include modules for IMA
|
||||
|
||||
Resolves: #2158155
|
||||
---
|
||||
pkgbuild/dracut.spec | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec
|
||||
index e148bbf7..b2d75951 100644
|
||||
--- a/pkgbuild/dracut.spec
|
||||
+++ b/pkgbuild/dracut.spec
|
||||
@@ -214,13 +214,6 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash
|
||||
# we do not support mksh in the initramfs
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00mksh
|
||||
|
||||
-%if %{defined _unitdir}
|
||||
-# with systemd IMA and selinux modules do not make sense
|
||||
-rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
|
||||
-rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
|
||||
-rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
|
||||
-%endif
|
||||
-
|
||||
%ifnarch s390 s390x
|
||||
# remove architecture specific modules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80cms
|
||||
@@ -394,11 +387,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{dracutlibdir}/modules.d/95zfcp
|
||||
%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
%endif
|
||||
-%if %{undefined _unitdir}
|
||||
%{dracutlibdir}/modules.d/96securityfs
|
||||
%{dracutlibdir}/modules.d/97masterkey
|
||||
%{dracutlibdir}/modules.d/98integrity
|
||||
-%endif
|
||||
%{dracutlibdir}/modules.d/97biosdevname
|
||||
%{dracutlibdir}/modules.d/98dracut-systemd
|
||||
%{dracutlibdir}/modules.d/98ecryptfs
|
||||
|
24
0039.patch
24
0039.patch
|
@ -1,24 +0,0 @@
|
|||
From aaffb39dc86b674501cb447c7fef5dd40aad85fb Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 14 Aug 2023 11:25:19 +0200
|
||||
Subject: [PATCH] fix(dracut): there can be \ at the end on line in awk script
|
||||
|
||||
Related: #2158155
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 1ff51bb1..30dfb229 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2592,7 +2592,7 @@ if [[ $uefi == yes ]]; then
|
||||
printf "%s " "$(< "$conf")" >> "$uefi_outdir/cmdline.txt"
|
||||
done
|
||||
fi
|
||||
-
|
||||
+ # shellcheck disable=SC1004
|
||||
offs=$(objdump -h "$uefi_stub" 2> /dev/null | gawk 'NF==7 {size=strtonum("0x"$3);\
|
||||
offset=strtonum("0x"$4)} END {print size + offset}')
|
||||
if [[ $offs -eq 0 ]]; then
|
||||
|
24
0040.patch
24
0040.patch
|
@ -1,24 +0,0 @@
|
|||
From 9c1c19de50de5dba6d0875425539cb9259dd7451 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Mon, 14 Aug 2023 12:37:33 +0200
|
||||
Subject: [PATCH] fix(rngd): spacing
|
||||
|
||||
Related: #2158155
|
||||
---
|
||||
modules.d/06rngd/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh
|
||||
index 66923a38..1e5f0eb9 100644
|
||||
--- a/modules.d/06rngd/module-setup.sh
|
||||
+++ b/modules.d/06rngd/module-setup.sh
|
||||
@@ -35,7 +35,7 @@ install() {
|
||||
inst_simple "${systemdsystemunitdir}/rngd.service"
|
||||
|
||||
if [ -r /etc/sysconfig/rngd ]; then
|
||||
- inst_simple "${moddir}/sysconfig" "/etc/sysconfig/rngd"
|
||||
+ inst_simple "${moddir}/sysconfig" "/etc/sysconfig/rngd"
|
||||
fi
|
||||
|
||||
# make sure dependant libs are installed too
|
||||
|
49
0041.patch
49
0041.patch
|
@ -1,49 +0,0 @@
|
|||
From 9d2a3df5453001612b225c7423451f6e02e06c19 Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Planas <aplanas@suse.com>
|
||||
Date: Mon, 20 Jun 2022 17:13:19 +0200
|
||||
Subject: [PATCH] fix(integrity): do not enable EVM if there is no key
|
||||
|
||||
Track when a key is successfully loaded, and return 1 if no key has been
|
||||
loaded. This will not enable EVM if there are no keys available in the
|
||||
system.
|
||||
|
||||
Fix #1847
|
||||
|
||||
Signed-off-by: Alberto Planas <aplanas@suse.com>
|
||||
|
||||
(Cherry-picked commit: 90585c624af15ba0abb7f32b0c2afc2b122dd019)
|
||||
|
||||
Related: #2158155
|
||||
---
|
||||
modules.d/98integrity/evm-enable.sh | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/98integrity/evm-enable.sh b/modules.d/98integrity/evm-enable.sh
|
||||
index 0abdfb80..913b5f12 100755
|
||||
--- a/modules.d/98integrity/evm-enable.sh
|
||||
+++ b/modules.d/98integrity/evm-enable.sh
|
||||
@@ -99,6 +99,7 @@ load_evm_x509() {
|
||||
fi
|
||||
# load the default EVM public key onto the EVM keyring along
|
||||
# with all the other ones in $EVMKEYSDIR
|
||||
+ local key_imported=1
|
||||
for PUBKEY in ${EVMX509PATH} "${NEWROOT}${EVMKEYSDIR}"/*; do
|
||||
if [ ! -f "${PUBKEY}" ]; then
|
||||
if [ "${RD_DEBUG}" = "yes" ]; then
|
||||
@@ -110,13 +111,14 @@ load_evm_x509() {
|
||||
info "integrity: failed to load the EVM X509 cert ${PUBKEY}"
|
||||
return 1
|
||||
fi
|
||||
+ key_imported=0
|
||||
done
|
||||
|
||||
if [ "${RD_DEBUG}" = "yes" ]; then
|
||||
keyctl show @u
|
||||
fi
|
||||
|
||||
- return 0
|
||||
+ return ${key_imported}
|
||||
}
|
||||
|
||||
unload_evm_key() {
|
||||
|
46
0042.patch
46
0042.patch
|
@ -1,46 +0,0 @@
|
|||
From ecc17a2cd574b31ce6f95f5a7d8ee6c62ecbb51b Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Wed, 16 Aug 2023 14:02:51 +0200
|
||||
Subject: [PATCH] fix(fips): include openssl's fips.so and openssl.cnf
|
||||
|
||||
Resolves: #2176560
|
||||
---
|
||||
modules.d/01fips/module-setup.sh | 13 +++++++++++++
|
||||
modules.d/01fips/openssl.cnf | 7 +++++++
|
||||
2 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index cc9d15ce..7ff5e640 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -82,4 +82,17 @@ install() {
|
||||
dfatal "To create an initramfs with fips support, dracut has to run as root"
|
||||
return 1
|
||||
}
|
||||
+
|
||||
+ # if we have openssl we need to install their fips library and configuration
|
||||
+ [ -x /usr/bin/openssl ] && {
|
||||
+ read -r _ conf < <(openssl version -d)
|
||||
+ conf=${conf#\"}
|
||||
+ conf=${conf%\"}
|
||||
+ inst_simple "${moddir}/openssl.cnf" "$conf/openssl.cnf"
|
||||
+
|
||||
+ read -r _ mod < <(openssl version -m)
|
||||
+ mod=${mod#\"}
|
||||
+ mod=${mod%\"}
|
||||
+ inst_simple "$mod/fips.so"
|
||||
+ }
|
||||
}
|
||||
diff --git a/modules.d/01fips/openssl.cnf b/modules.d/01fips/openssl.cnf
|
||||
new file mode 100644
|
||||
index 00000000..ee9adcf0
|
||||
--- /dev/null
|
||||
+++ b/modules.d/01fips/openssl.cnf
|
||||
@@ -0,0 +1,7 @@
|
||||
+openssl_conf = openssl_init
|
||||
+[openssl_init]
|
||||
+providers = provider_sect
|
||||
+[provider_sect]
|
||||
+default = default_sect
|
||||
+[default_sect]
|
||||
+activate = 1
|
180
0044.patch
180
0044.patch
|
@ -1,180 +0,0 @@
|
|||
From 410d8fc37f1ce5fc5a6f66eda3d3280a6fa0023c Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
||||
Date: Mon, 11 Jul 2022 12:52:58 +0200
|
||||
Subject: [PATCH] fix(dracut.sh): correct wrong systemd variable paths
|
||||
|
||||
systemdsystemconfdir usually expands to /etc/systemd/system, but the local
|
||||
configuration of systemd-networkd, systemd-timesyncd, portablectl and systemd
|
||||
users is saved into directories whose parent is /etc/systemd
|
||||
(systemdutilconfdir).
|
||||
|
||||
Also add missing exports.
|
||||
|
||||
fix(network-legacy): correct wrong local network configuration path
|
||||
|
||||
fix(network-manager): correct wrong local network configuration path
|
||||
|
||||
refactor(systemd-networkd): use more precise global variables
|
||||
|
||||
refactor(systemd-timesyncd): use more precise global variables
|
||||
|
||||
refactor(network-legacy): use more precise global variables
|
||||
|
||||
refactor(network-manager): use more precise global variables
|
||||
|
||||
(Cherry-picked commits:
|
||||
ae4c8744dc3dbceb142c6eb88fd69bc6aaf29e20
|
||||
a60543bf9746022e4430d310892ee03bb837b6a2
|
||||
cb39aec479bdabfa7b1af5168c14ca5683905a7d
|
||||
5781b6e7ab8c2f176331c960c677de1fe8a39592
|
||||
3866ebc601bff71996c7e0892392332577e2a9c7
|
||||
7fa66e106af021dd24fca8e76893c422775a6b61
|
||||
c8adc9f72fef906b5706fa6d0e788564a508f4ee)
|
||||
|
||||
Resolves: RHEL-9479
|
||||
---
|
||||
dracut.sh | 14 ++++++++------
|
||||
modules.d/01systemd-networkd/module-setup.sh | 14 +++++++-------
|
||||
modules.d/01systemd-timesyncd/module-setup.sh | 4 ++--
|
||||
modules.d/35network-legacy/module-setup.sh | 4 ++--
|
||||
modules.d/35network-manager/module-setup.sh | 4 ++--
|
||||
5 files changed, 21 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 30dfb229..8c757b14 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1830,7 +1830,7 @@ fi
|
||||
[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] \
|
||||
|| systemdnetworkconfdir=$(pkg-config systemd --variable=systemdnetworkconfdir 2> /dev/null)
|
||||
|
||||
-[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdsystemconfdir}/network
|
||||
+[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdutilconfdir}/network
|
||||
|
||||
[[ -d $dracutsysrootdir$systemdntpunits ]] \
|
||||
|| systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2> /dev/null)
|
||||
@@ -1840,7 +1840,7 @@ fi
|
||||
[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] \
|
||||
|| systemdntpunitsconfdir=$(pkg-config systemd --variable=systemdntpunitsconfdir 2> /dev/null)
|
||||
|
||||
-[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdsystemconfdir}/ntp-units.d
|
||||
+[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdutilconfdir}/ntp-units.d
|
||||
|
||||
[[ -d $dracutsysrootdir$systemdportable ]] \
|
||||
|| systemdportable=$(pkg-config systemd --variable=systemdportable 2> /dev/null)
|
||||
@@ -1850,7 +1850,7 @@ fi
|
||||
[[ -d $dracutsysrootdir$systemdportableconfdir ]] \
|
||||
|| systemdportableconfdir=$(pkg-config systemd --variable=systemdportableconfdir 2> /dev/null)
|
||||
|
||||
-[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdsystemconfdir}/portable
|
||||
+[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdutilconfdir}/portable
|
||||
|
||||
[[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
|
||||
|| systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2> /dev/null)
|
||||
@@ -1865,7 +1865,7 @@ fi
|
||||
[[ -d $dracutsysrootdir$systemduserconfdir ]] \
|
||||
|| systemduserconfdir=$(pkg-config systemd --variable=systemduserconfdir 2> /dev/null)
|
||||
|
||||
-[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdsystemconfdir}/user
|
||||
+[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdutilconfdir}/user
|
||||
|
||||
[[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
|
||||
|| systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2> /dev/null)
|
||||
@@ -1919,8 +1919,10 @@ export initdir dracutbasedir \
|
||||
dbussessionconfdir dbussystem dbussystemconfdir dbussystemservices \
|
||||
dbussystemservicesconfdir environment environmentconfdir modulesload \
|
||||
modulesloadconfdir sysctld sysctlconfdir sysusers sysusersconfdir \
|
||||
- systemdutildir systemdutilconfdir systemdcatalog systemdntpunits \
|
||||
- systemdntpunitsconfdir systemdsystemunitdir systemdsystemconfdir \
|
||||
+ systemdutildir systemdutilconfdir systemdcatalog systemdnetwork \
|
||||
+ systemdnetworkconfdir systemdntpunits systemdntpunitsconfdir \
|
||||
+ systemdportable systemdportableconfdir systemdsystemunitdir \
|
||||
+ systemdsystemconfdir systemduser systemduserconfdir \
|
||||
hostonly_cmdline loginstall tmpfilesdir tmpfilesconfdir depmodd \
|
||||
depmodconfdir
|
||||
|
||||
diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh
|
||||
index c3f3c051..e6d113d8 100755
|
||||
--- a/modules.d/01systemd-networkd/module-setup.sh
|
||||
+++ b/modules.d/01systemd-networkd/module-setup.sh
|
||||
@@ -39,12 +39,12 @@ install() {
|
||||
"$systemdutildir"/systemd-networkd \
|
||||
"$systemdutildir"/systemd-network-generator \
|
||||
"$systemdutildir"/systemd-networkd-wait-online \
|
||||
- "$systemdutildir"/network/80-container-host0.network \
|
||||
- "$systemdutildir"/network/80-container-ve.network \
|
||||
- "$systemdutildir"/network/80-container-vz.network \
|
||||
- "$systemdutildir"/network/80-vm-vt.network \
|
||||
- "$systemdutildir"/network/80-wifi-adhoc.network \
|
||||
- "$systemdutildir"/network/99-default.link \
|
||||
+ "$systemdnetwork"/80-container-host0.network \
|
||||
+ "$systemdnetwork"/80-container-ve.network \
|
||||
+ "$systemdnetwork"/80-container-vz.network \
|
||||
+ "$systemdnetwork"/80-vm-vt.network \
|
||||
+ "$systemdnetwork"/80-wifi-adhoc.network \
|
||||
+ "$systemdnetwork"/99-default.link \
|
||||
"$systemdsystemunitdir"/systemd-networkd.service \
|
||||
"$systemdsystemunitdir"/systemd-networkd.socket \
|
||||
"$systemdsystemunitdir"/systemd-network-generator.service \
|
||||
@@ -67,7 +67,7 @@ install() {
|
||||
inst_multiple -H -o \
|
||||
"$systemdutilconfdir"/networkd.conf \
|
||||
"$systemdutilconfdir/networkd.conf.d/*.conf" \
|
||||
- "$systemdutilconfdir/network/*" \
|
||||
+ "$systemdnetworkconfdir/*" \
|
||||
"$systemdsystemconfdir"/systemd-networkd.service \
|
||||
"$systemdsystemconfdir/systemd-networkd.service/*.conf" \
|
||||
"$systemdsystemunitdir"/systemd-networkd.socket \
|
||||
diff --git a/modules.d/01systemd-timesyncd/module-setup.sh b/modules.d/01systemd-timesyncd/module-setup.sh
|
||||
index 015caecf..f6f35fee 100755
|
||||
--- a/modules.d/01systemd-timesyncd/module-setup.sh
|
||||
+++ b/modules.d/01systemd-timesyncd/module-setup.sh
|
||||
@@ -35,7 +35,7 @@ install() {
|
||||
inst_multiple -o \
|
||||
"$dbussystem"/org.freedesktop.timesync1.conf \
|
||||
"$dbussystemservices"/org.freedesktop.timesync1.service \
|
||||
- "$systemdutildir/ntp-units.d/*.list" \
|
||||
+ "$systemdntpunits/*.list" \
|
||||
"$systemdutildir"/systemd-timesyncd \
|
||||
"$systemdutildir"/systemd-time-wait-sync \
|
||||
"$systemdutildir/timesyncd.conf.d/*.conf" \
|
||||
@@ -55,7 +55,7 @@ install() {
|
||||
# Install the hosts local user configurations if enabled.
|
||||
if [[ $hostonly ]]; then
|
||||
inst_multiple -H -o \
|
||||
- "$systemdutilconfdir/ntp-units.d/*.list" \
|
||||
+ "$systemdntpunitsconfdir/*.list" \
|
||||
"$systemdutilconfdir"/timesyncd.conf \
|
||||
"$systemdutilconfdir/timesyncd.conf.d/*.conf" \
|
||||
"$systemdsystemconfdir"/systemd-timesyncd.service \
|
||||
diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh
|
||||
index 84dcf7f5..e57fc6fa 100755
|
||||
--- a/modules.d/35network-legacy/module-setup.sh
|
||||
+++ b/modules.d/35network-legacy/module-setup.sh
|
||||
@@ -24,8 +24,8 @@ install() {
|
||||
|
||||
#Adding default link
|
||||
if dracut_module_included "systemd"; then
|
||||
- inst_multiple -o "${systemdutildir}/network/99-default.link"
|
||||
- [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
|
||||
+ inst_multiple -o "${systemdnetwork}/99-default.link"
|
||||
+ [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
|
||||
fi
|
||||
|
||||
inst_multiple ip dhclient sed awk grep pgrep tr expr
|
||||
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
|
||||
index 04898a39..c93c6a3c 100755
|
||||
--- a/modules.d/35network-manager/module-setup.sh
|
||||
+++ b/modules.d/35network-manager/module-setup.sh
|
||||
@@ -52,8 +52,8 @@ install() {
|
||||
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
|
||||
|
||||
# Adding default link
|
||||
- inst_multiple -o "${systemdutildir}/network/99-default.link"
|
||||
- [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
|
||||
+ inst_multiple -o "${systemdnetwork}/99-default.link"
|
||||
+ [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
|
||||
|
||||
$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
|
||||
fi
|
||||
|
31
0045.patch
31
0045.patch
|
@ -1,31 +0,0 @@
|
|||
From 7bdb3fbdce70bea19dca3fec792b5266d7b9e48b Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 14 Nov 2023 14:55:44 +0100
|
||||
Subject: [PATCH] fix(hwdb): follow shfmt-recommended format
|
||||
|
||||
Related: RHEL-9479
|
||||
---
|
||||
modules.d/95hwdb/module-setup.sh | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95hwdb/module-setup.sh b/modules.d/95hwdb/module-setup.sh
|
||||
index 16365377..7e4b1af6 100755
|
||||
--- a/modules.d/95hwdb/module-setup.sh
|
||||
+++ b/modules.d/95hwdb/module-setup.sh
|
||||
@@ -11,11 +11,12 @@ install() {
|
||||
local hwdb_bin
|
||||
|
||||
# systemd-hwdb ships the file in /etc, with /usr/lib as an alternative.
|
||||
- # Therefore consider this location as preferred for configuration.
|
||||
+ # The alternative location is preferred, as we can consider it being user
|
||||
+ # configuration.
|
||||
hwdb_bin="${udevdir}"/hwdb.bin
|
||||
|
||||
- if [[ ! -r "${hwdb_bin}" ]]; then
|
||||
- hwdb_bin="${udevconfdir}"/hwdb.bin
|
||||
+ if [[ ! -r ${hwdb_bin} ]]; then
|
||||
+ hwdb_bin="${udevconfdir}"/hwdb.bin
|
||||
fi
|
||||
|
||||
if [[ $hostonly ]]; then
|
||||
|
55
0046.patch
55
0046.patch
|
@ -1,55 +0,0 @@
|
|||
From edd1efe46a6c211034f06ad1e20c027a5e1102db Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Date: Thu, 21 Sep 2023 14:31:07 +0200
|
||||
Subject: [PATCH] fix(nvmf): move /etc/nvme/host{nqn,id} requirement to
|
||||
hostonly
|
||||
|
||||
When creating initramfs for universal boot image such as an installer,
|
||||
we can't include any machine-specific IDs. Let's move the check
|
||||
for /etc/nvme/hostnqn and /etc/nvme/hostid files presence to
|
||||
the hostonly section to avoid unsatisfied requirements.
|
||||
|
||||
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
||||
|
||||
(Cherry-picked commit: 1cf10397b5f002790a096e5bdce733436fffbd2d
|
||||
PR: https://github.com/dracutdevs/dracut/pull/2523)
|
||||
|
||||
Resolves: RHEL-3630
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index 1dd2ca53..0b90d8be 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -3,8 +3,6 @@
|
||||
# called by dracut
|
||||
check() {
|
||||
require_binaries nvme jq || return 1
|
||||
- [ -f /etc/nvme/hostnqn ] || return 255
|
||||
- [ -f /etc/nvme/hostid ] || return 255
|
||||
|
||||
is_nvmf() {
|
||||
local _dev=$1
|
||||
@@ -36,6 +34,8 @@ check() {
|
||||
}
|
||||
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
+ [ -f /etc/nvme/hostnqn ] || return 255
|
||||
+ [ -f /etc/nvme/hostid ] || return 255
|
||||
pushd . > /dev/null
|
||||
for_each_host_dev_and_slaves is_nvmf
|
||||
local _is_nvmf=$?
|
||||
@@ -130,8 +130,8 @@ install() {
|
||||
_nvmf_args=$(cmdline)
|
||||
[[ "$_nvmf_args" ]] && printf "%s" "$_nvmf_args" >> "${initdir}/etc/cmdline.d/95nvmf-args.conf"
|
||||
fi
|
||||
- inst_simple "/etc/nvme/hostnqn"
|
||||
- inst_simple "/etc/nvme/hostid"
|
||||
+ inst_simple -H "/etc/nvme/hostnqn"
|
||||
+ inst_simple -H "/etc/nvme/hostid"
|
||||
|
||||
inst_multiple ip sed
|
||||
|
||||
|
177
0047.patch
177
0047.patch
|
@ -1,177 +0,0 @@
|
|||
From 28cadd4829118d2831908dd267766613fd74f0b1 Mon Sep 17 00:00:00 2001
|
||||
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||
Date: Wed, 12 Jul 2023 03:50:47 -0400
|
||||
Subject: [PATCH] feat(dracut): add --sbat option to add sbat policy to UKI
|
||||
|
||||
Take existing .sbat section from the uefi stub and merge it
|
||||
with vmlinux .sbat (if it exists) and user-provided .sbat parameters
|
||||
using the new --sbat option.
|
||||
|
||||
For some reasons, --update-section in objcopy does not resize the
|
||||
.sbat section, so remove the section from the stub and add it
|
||||
to the UKI as new one, to avoid having incomplete SBAT strings.
|
||||
|
||||
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
||||
|
||||
(Cherry-picked commit: 550a0084fd95870f35218dc2cf8ea91fde1c728a)
|
||||
|
||||
Resolves: RHEL-5732
|
||||
---
|
||||
dracut.sh | 46 +++++++++++++++++++++++++++++++++++++++++++-
|
||||
man/dracut.8.asc | 5 +++++
|
||||
man/dracut.conf.5.asc | 5 +++++
|
||||
shell-completion/bash/dracut | 2 +-
|
||||
4 files changed, 56 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 8c757b14..0bac6a33 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -271,6 +271,10 @@ Creates initial ramdisk images for preloading modules
|
||||
Use [FILE] as a splash image when creating an UEFI
|
||||
executable. Requires bitmap (.bmp) image format.
|
||||
--kernel-image [FILE] Location of the kernel image.
|
||||
+ --sbat [PARAMETERS] The SBAT parameters to be added to .sbat.
|
||||
+ The string "sbat,1,SBAT Version,sbat,1,
|
||||
+ https://github.com/rhboot/shim/blob/main/SBAT.md" is
|
||||
+ already added by default.
|
||||
--regenerate-all Regenerate all initramfs images at the default location
|
||||
for the kernel versions found on the system.
|
||||
-p, --parallel Use parallel processing if possible (currently only
|
||||
@@ -462,6 +466,7 @@ rearrange_params() {
|
||||
--long uefi-stub: \
|
||||
--long uefi-splash-image: \
|
||||
--long kernel-image: \
|
||||
+ --long sbat: \
|
||||
--long no-hostonly-i18n \
|
||||
--long hostonly-i18n \
|
||||
--long hostonly-nics: \
|
||||
@@ -839,6 +844,11 @@ while :; do
|
||||
PARMS_TO_STORE+=" '$2'"
|
||||
shift
|
||||
;;
|
||||
+ --sbat)
|
||||
+ sbat_l="$2"
|
||||
+ PARMS_TO_STORE+=" '$2'"
|
||||
+ shift
|
||||
+ ;;
|
||||
--no-machineid)
|
||||
machine_id_l="no"
|
||||
;;
|
||||
@@ -1076,6 +1086,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||||
[[ $uefi_stub_l ]] && uefi_stub="$uefi_stub_l"
|
||||
[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
|
||||
[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
|
||||
+[[ $sbat_l ]] && sbat="$sbat_l"
|
||||
[[ $machine_id_l ]] && machine_id="$machine_id_l"
|
||||
|
||||
if ! [[ $outfile ]]; then
|
||||
@@ -2585,6 +2596,24 @@ fi
|
||||
|
||||
umask 077
|
||||
|
||||
+SBAT_DEFAULT="sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md"
|
||||
+sbat_out=$uefi_outdir/uki.sbat
|
||||
+
|
||||
+clean_sbat_string() {
|
||||
+ local inp=$1
|
||||
+ local temp=$uefi_outdir/temp.sbat
|
||||
+ sed "/${SBAT_DEFAULT//\//\\/}/d" "$inp" > "$temp"
|
||||
+ [[ -s $temp ]] && cat "$temp" >> "$sbat_out"
|
||||
+ rm "$temp"
|
||||
+}
|
||||
+
|
||||
+get_sbat_string() {
|
||||
+ local inp=$1
|
||||
+ local out=$uefi_outdir/$2
|
||||
+ objcopy -O binary --only-section=.sbat "$inp" "$out"
|
||||
+ clean_sbat_string "$out"
|
||||
+}
|
||||
+
|
||||
if [[ $uefi == yes ]]; then
|
||||
if [[ $kernel_cmdline ]]; then
|
||||
echo -n "$kernel_cmdline" > "$uefi_outdir/cmdline.txt"
|
||||
@@ -2635,6 +2664,16 @@ if [[ $uefi == yes ]]; then
|
||||
unset uefi_splash_image
|
||||
fi
|
||||
|
||||
+ echo "$SBAT_DEFAULT" > "$sbat_out"
|
||||
+ if [[ -n $sbat ]]; then
|
||||
+ echo "$sbat" | sed "/${SBAT_DEFAULT//\//\\/}/d" >> "$sbat_out"
|
||||
+ fi
|
||||
+ get_sbat_string "$kernel_image" kernel.sbat
|
||||
+ get_sbat_string "$uefi_stub" stub.sbat
|
||||
+
|
||||
+ uefi_sbat_offs="${offs}"
|
||||
+ offs=$((offs + $(stat -Lc%s "$sbat_out")))
|
||||
+ offs=$((offs + "$align" - offs % "$align"))
|
||||
uefi_linux_offs="${offs}"
|
||||
offs=$((offs + $(stat -Lc%s "$kernel_image")))
|
||||
offs=$((offs + "$align" - offs % "$align"))
|
||||
@@ -2646,14 +2685,19 @@ if [[ $uefi == yes ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+ tmp_uefi_stub=$uefi_outdir/elf.stub
|
||||
+ cp "$uefi_stub" "$tmp_uefi_stub"
|
||||
+ objcopy --remove-section .sbat "$tmp_uefi_stub" &> /dev/null
|
||||
+
|
||||
if objcopy \
|
||||
${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \
|
||||
${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \
|
||||
${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \
|
||||
+ --add-section .sbat="$sbat_out" --change-section-vma .sbat="$(printf 0x%x "$uefi_sbat_offs")" \
|
||||
--add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \
|
||||
--add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \
|
||||
--image-base="$(printf 0x%x "$base_image")" \
|
||||
- "$uefi_stub" "${uefi_outdir}/linux.efi"; then
|
||||
+ "$tmp_uefi_stub" "${uefi_outdir}/linux.efi"; then
|
||||
if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then
|
||||
if sbsign \
|
||||
--key "${uefi_secureboot_key}" \
|
||||
diff --git a/man/dracut.8.asc b/man/dracut.8.asc
|
||||
index bfb86f5d..8339e8a9 100644
|
||||
--- a/man/dracut.8.asc
|
||||
+++ b/man/dracut.8.asc
|
||||
@@ -600,6 +600,11 @@ and no /etc/cmdline/*.conf will be generated into the initramfs.
|
||||
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
|
||||
_/boot/vmlinuz-<KERNEL-VERSION>_.
|
||||
|
||||
+**--sbat <parameters>**::
|
||||
+ Specifies the SBAT parameters, which to include in the UEFI executable. By default
|
||||
+ the default SBAT string added is "sbat,1,SBAT Version,sbat,1,
|
||||
+ https://github.com/rhboot/shim/blob/main/SBAT.md".
|
||||
+
|
||||
**--enhanced-cpio**::
|
||||
Attempt to use the dracut-cpio binary, which optimizes archive creation for
|
||||
copy-on-write filesystems by using the copy_file_range(2) syscall via Rust's
|
||||
diff --git a/man/dracut.conf.5.asc b/man/dracut.conf.5.asc
|
||||
index 96c80129..132ca8e3 100644
|
||||
--- a/man/dracut.conf.5.asc
|
||||
+++ b/man/dracut.conf.5.asc
|
||||
@@ -299,6 +299,11 @@ Logging levels:
|
||||
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
|
||||
_/boot/vmlinuz-<KERNEL-VERSION>_.
|
||||
|
||||
+*sbat=*"__parameters__"::
|
||||
+ Specifies the SBAT parameters, which to include in the UEFI executable. By default
|
||||
+ the default SBAT string added is "sbat,1,SBAT Version,sbat,1,
|
||||
+ https://github.com/rhboot/shim/blob/main/SBAT.md".
|
||||
+
|
||||
*enhanced_cpio=*"__{yes|no}__"::
|
||||
Attempt to use the dracut-cpio binary, which optimizes archive creation for
|
||||
copy-on-write filesystems (default=no).
|
||||
diff --git a/shell-completion/bash/dracut b/shell-completion/bash/dracut
|
||||
index 86de2071..9b51db01 100644
|
||||
--- a/shell-completion/bash/dracut
|
||||
+++ b/shell-completion/bash/dracut
|
||||
@@ -46,7 +46,7 @@ _dracut() {
|
||||
--kernel-cmdline --sshkey --persistent-policy --install-optional
|
||||
--loginstall --uefi-stub --kernel-image --squash-compressor
|
||||
--sysroot --hostonly-mode --hostonly-nics --include --logfile
|
||||
- --uefi-splash-image
|
||||
+ --uefi-splash-image --sbat
|
||||
'
|
||||
)
|
||||
|
||||
|
41
0049.patch
41
0049.patch
|
@ -1,41 +0,0 @@
|
|||
From 4c75e51c585eebd9bc175920aa8c8b4afe808144 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Wed, 20 Sep 2023 14:56:41 +0200
|
||||
Subject: [PATCH] fix(dracut.spec): add jq dependency to network subpackage
|
||||
|
||||
and also move nvmf module to network subpackage.
|
||||
|
||||
Resolves: RHEL-15012
|
||||
---
|
||||
pkgbuild/dracut.spec | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec
|
||||
index 1996f44d..bd850986 100644
|
||||
--- a/pkgbuild/dracut.spec
|
||||
+++ b/pkgbuild/dracut.spec
|
||||
@@ -111,6 +111,7 @@ Requires: %{name} = %{version}-%{release}
|
||||
%endif
|
||||
Requires: iputils
|
||||
Requires: iproute
|
||||
+Requires: jq
|
||||
Requires: (NetworkManager >= 1.20 or dhclient)
|
||||
Suggests: NetworkManager
|
||||
Obsoletes: dracut-generic < 008
|
||||
@@ -369,7 +370,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{dracutlibdir}/modules.d/95fstab-sys
|
||||
%{dracutlibdir}/modules.d/95hwdb
|
||||
%{dracutlibdir}/modules.d/95lunmask
|
||||
-%{dracutlibdir}/modules.d/95nvmf
|
||||
%{dracutlibdir}/modules.d/95resume
|
||||
%{dracutlibdir}/modules.d/95rootfs-block
|
||||
%{dracutlibdir}/modules.d/95terminfo
|
||||
@@ -441,6 +441,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{dracutlibdir}/modules.d/95iscsi
|
||||
%{dracutlibdir}/modules.d/95nbd
|
||||
%{dracutlibdir}/modules.d/95nfs
|
||||
+%{dracutlibdir}/modules.d/95nvmf
|
||||
%{dracutlibdir}/modules.d/95ssh-client
|
||||
%ifarch s390 s390x
|
||||
%{dracutlibdir}/modules.d/95znet
|
||||
|
77
0052.patch
77
0052.patch
|
@ -1,77 +0,0 @@
|
|||
From 4c46806a793d66a188c4e9b40e74f6c371ac5b8a Mon Sep 17 00:00:00 2001
|
||||
From: runsisi <runsisi@hust.edu.cn>
|
||||
Date: Sat, 6 Aug 2022 10:15:48 +0800
|
||||
Subject: [PATCH] fix(dracut-install): use stripped kernel module path as hash
|
||||
key
|
||||
|
||||
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting,
|
||||
let's do the same for checking.
|
||||
|
||||
otherwise installing kernel module has circular dependency from a custom kernel
|
||||
module directory will cause infinite recursion and segfault.
|
||||
|
||||
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep
|
||||
kernel/drivers/char/ipmi/ipmi_msghandler.ko:
|
||||
kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko
|
||||
|
||||
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep
|
||||
softdep ipmi_msghandler post: ipmi_devintf
|
||||
|
||||
$ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf
|
||||
Segmentation fault (core dumped)
|
||||
|
||||
(gdb) b install_dependent_modules
|
||||
Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513.
|
||||
(gdb) bt
|
||||
#0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513
|
||||
#1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553
|
||||
#2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548
|
||||
#3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554
|
||||
#4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548
|
||||
#5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554
|
||||
#6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548
|
||||
#7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554
|
||||
#8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548
|
||||
#9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554
|
||||
#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548
|
||||
#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554
|
||||
#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548
|
||||
#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554
|
||||
#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548
|
||||
#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554
|
||||
#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548
|
||||
#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554
|
||||
#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548
|
||||
#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554
|
||||
#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548
|
||||
#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554
|
||||
#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548
|
||||
#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554
|
||||
#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548
|
||||
#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554
|
||||
#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617
|
||||
#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952
|
||||
#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090
|
||||
|
||||
Signed-off-by: runsisi <runsisi@hust.edu.cn>
|
||||
|
||||
(Cherry-picked commit: 7bb1f64b972586d86d82fcb23de4b979eab0ddfe)
|
||||
|
||||
Resolves: RHEL-15821
|
||||
---
|
||||
src/install/dracut-install.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
||||
index 6025bd67..997d62d3 100644
|
||||
--- a/src/install/dracut-install.c
|
||||
+++ b/src/install/dracut-install.c
|
||||
@@ -1522,7 +1522,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
|
||||
if (check_hashmap(items_failed, path))
|
||||
return -1;
|
||||
|
||||
- if (check_hashmap(items, path)) {
|
||||
+ if (check_hashmap(items, &path[kerneldirlen])) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
From 3cb0f01a1e8a05dd4c6412907f5e9a398b2ace2c Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Fri, 31 Aug 2018 13:06:34 +0200
|
||||
Subject: [PATCH] Revert "use cp --reflink=auto"
|
||||
|
||||
This reverts commit 8cd8820547257299a33b2d1e3ecf7c6241a569b2.
|
||||
Resolves: #1623990
|
||||
---
|
||||
50-dracut.install | 2 +-
|
||||
51-dracut-rescue-postinst.sh | 2 +-
|
||||
51-dracut-rescue.install | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/50-dracut.install b/50-dracut.install
|
||||
index 64e3549f..ec59dcb3 100755
|
||||
--- a/50-dracut.install
|
||||
+++ b/50-dracut.install
|
||||
@@ -25,7 +25,7 @@ case "$COMMAND" in
|
||||
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
|
||||
# we found an initrd at the same place as the kernel
|
||||
# use this and don't generate a new one
|
||||
- cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
|
||||
+ cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
|
||||
&& chown root:root "$BOOT_DIR_ABS/$INITRD" \
|
||||
&& chmod 0600 "$BOOT_DIR_ABS/$INITRD" \
|
||||
&& exit 0
|
||||
diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh
|
||||
index 67f5b717..23158552 100755
|
||||
--- a/51-dracut-rescue-postinst.sh
|
||||
+++ b/51-dracut-rescue-postinst.sh
|
||||
@@ -57,7 +57,7 @@ if [[ ! -f $INITRDFILE ]]; then
|
||||
fi
|
||||
|
||||
if [[ ! -f $NEW_KERNEL_IMAGE ]]; then
|
||||
- cp --reflink=auto "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
||||
+ cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
||||
((ret+=$?))
|
||||
fi
|
||||
|
||||
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
|
||||
index 6ddafdb6..426ddee5 100755
|
||||
--- a/51-dracut-rescue.install
|
||||
+++ b/51-dracut-rescue.install
|
||||
@@ -93,7 +93,7 @@ case "$COMMAND" in
|
||||
|
||||
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
|
||||
|
||||
- if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
|
||||
+ if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
|
||||
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From 2e5265c80e03112c75888a31c170963e913070ed Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 14 Aug 2018 14:04:02 +0200
|
||||
Subject: [PATCH] spec: return old provides
|
||||
|
||||
---
|
||||
dracut.spec | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dracut.spec b/dracut.spec
|
||||
index 155868ce..553280c3 100644
|
||||
--- a/dracut.spec
|
||||
+++ b/dracut.spec
|
||||
@@ -65,6 +65,13 @@ Provides: dracut-fips = %{version}-%{release}
|
||||
Obsoletes: dracut-fips-aesni <= 047
|
||||
Provides: dracut-fips-aesni = %{version}-%{release}
|
||||
|
||||
+Obsoletes: dracut-kernel < 005
|
||||
+Provides: dracut-kernel = %{version}-%{release}
|
||||
+
|
||||
+Obsoletes: dracut < 030
|
||||
+Obsoletes: dracut-norescue < 030
|
||||
+Provides: dracut-norescue = %{version}-%{release}
|
||||
+
|
||||
Requires: bash >= 4
|
||||
Requires: coreutils
|
||||
Requires: cpio
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
From 44c9d019d88df05f69f2112aeae34bdbff61cee6 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Sat, 29 Sep 2018 17:14:31 +0800
|
||||
Subject: [PATCH] dracut.spec: Fix error introduced by 70291ed
|
||||
|
||||
70291e0 ('dracut.spec: Add dracut-squash package') introduced a new
|
||||
dracut-squash package, but by accident it overrided some other package
|
||||
spec and the dependency name is wrong. This patch will fix it.
|
||||
---
|
||||
dracut.spec | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dracut.spec b/dracut.spec
|
||||
index 553280c3..de57703c 100644
|
||||
--- a/dracut.spec
|
||||
+++ b/dracut.spec
|
||||
@@ -188,7 +188,7 @@ This package contains tools to assemble the local initrd and host configuration.
|
||||
%package squash
|
||||
Summary: dracut module to build an initramfs with most files in a squashfs image
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
-Requires: squash-tools
|
||||
+Requires: squashfs-tools
|
||||
|
||||
%description squash
|
||||
This package provides a dracut module to build an initramfs, but store most files
|
||||
@@ -459,14 +459,14 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%doc %{_mandir}/man8/dracut-catimages.8*
|
||||
%endif
|
||||
|
||||
-%files squash
|
||||
-%{dracutlibdir}/modules.d/99squash
|
||||
-
|
||||
%{_bindir}/dracut-catimages
|
||||
%dir /boot/dracut
|
||||
%dir /var/lib/dracut
|
||||
%dir /var/lib/dracut/overlay
|
||||
|
||||
+%files squash
|
||||
+%{dracutlibdir}/modules.d/99squash
|
||||
+
|
||||
%files config-generic
|
||||
%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 3b9b20d237b3ec939b1bf9dd065c875fee54fe63 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Fri, 12 Oct 2018 13:07:13 +0800
|
||||
Subject: [PATCH] 40network: Don't include 40network by default
|
||||
|
||||
commit 7347391 ('network-legacy: split off from network module')
|
||||
splitted network function to network-legacy and removed check() function
|
||||
of 40network. This caused 40network to be included even if network is
|
||||
not needed.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
|
||||
Cherry-picked from: 83cbc06ab91288e2d931b4f36935bfdb79a99b0e
|
||||
Resolves: #1639088
|
||||
---
|
||||
modules.d/40network/module-setup.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||
index 57c0a45e..e8541636 100755
|
||||
--- a/modules.d/40network/module-setup.sh
|
||||
+++ b/modules.d/40network/module-setup.sh
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
+# called by dracut
|
||||
+check() {
|
||||
+ return 255
|
||||
+}
|
||||
+
|
||||
# called by dracut
|
||||
depends() {
|
||||
echo -n "kernel-network-modules "
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From b63e0c5040d9881f8c3c0bc09fc21c6588c8a26f Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Thu, 18 Oct 2018 17:05:22 +0800
|
||||
Subject: [PATCH] 99squash: Don't clean up squahfs on isolate
|
||||
|
||||
The only time we need to cleanup squahfs manually is on switch root, to
|
||||
release resource and memory. We've covered that by setting
|
||||
"Conflicts=initrd-switch-root.target" for squash cleanup service.
|
||||
On shutdown systemd will take care of squahfs mounts. But for other
|
||||
isolate, files in initramfs are most likely still required, so don't
|
||||
clean up squahfs. For example, kdump's emergency handler will isolate
|
||||
into its own target, if squahfs is cleaned up it will fail.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
|
||||
Cherry-picked from: b9af0fcd
|
||||
Resolves: #1641423
|
||||
---
|
||||
modules.d/99squash/squash-mnt-clear.service | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
|
||||
index 8dd17812..f8d5db46 100644
|
||||
--- a/modules.d/99squash/squash-mnt-clear.service
|
||||
+++ b/modules.d/99squash/squash-mnt-clear.service
|
||||
@@ -9,6 +9,7 @@ After=dracut-initqueue.service dracut-pre-pivot.service
|
||||
Before=initrd-cleanup.service
|
||||
ConditionPathExists=/squash/root
|
||||
Conflicts=initrd-switch-root.target
|
||||
+IgnoreOnIsolate=true
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 5541b0c46f02f678c698aa523db7a86dde82a947 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Thu, 25 Oct 2018 15:30:36 +0200
|
||||
Subject: [PATCH] dracut.install: call dracut with --force
|
||||
|
||||
The kernel-install is called even if you run make install.
|
||||
Since we don't call dracut with -f a second make install will fail
|
||||
because initrd with same version is already there.
|
||||
This makes kernel developers feel miserable.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1642402
|
||||
|
||||
Cherry-picked from: 48c283a2
|
||||
Resolves: #1642402
|
||||
---
|
||||
50-dracut.install | 2 +-
|
||||
51-dracut-rescue.install | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/50-dracut.install b/50-dracut.install
|
||||
index ec59dcb3..139ff82e 100755
|
||||
--- a/50-dracut.install
|
||||
+++ b/50-dracut.install
|
||||
@@ -49,7 +49,7 @@ case "$COMMAND" in
|
||||
break
|
||||
fi
|
||||
done
|
||||
- dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
||||
+ dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
||||
ret=$?
|
||||
;;
|
||||
remove)
|
||||
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
|
||||
index 426ddee5..0580062f 100755
|
||||
--- a/51-dracut-rescue.install
|
||||
+++ b/51-dracut-rescue.install
|
||||
@@ -98,7 +98,7 @@ case "$COMMAND" in
|
||||
fi
|
||||
|
||||
if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
|
||||
- dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
||||
+ dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
||||
((ret+=$?))
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From d8386b5d8fae2e45a27635c48ecab63abba10e39 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 24 Oct 2018 15:14:03 +0200
|
||||
Subject: [PATCH] Makefile: add srpm target
|
||||
|
||||
---
|
||||
Makefile | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 80623437..503d069f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -40,7 +40,7 @@ man8pages = dracut.8 \
|
||||
|
||||
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
||||
|
||||
-.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh
|
||||
+.PHONY: install clean archive rpm srpm testimage test all check AUTHORS doc dracut-version.sh
|
||||
|
||||
all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio
|
||||
|
||||
@@ -216,6 +216,17 @@ rpm: dracut-$(VERSION).tar.xz syncheck
|
||||
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
|
||||
( mv "$$rpmbuild"/{,$$(arch)/}*.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
||||
|
||||
+srpm: dracut-$(VERSION).tar.xz syncheck
|
||||
+ rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
|
||||
+ cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
|
||||
+ LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
|
||||
+ (cd "$$rpmbuild"; \
|
||||
+ [ -f $$src/lgpl-2.1.txt ] && cp $$src/lgpl-2.1.txt . || wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
|
||||
+ rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
|
||||
+ --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
|
||||
+ --define "_rpmdir $$PWD" -bs dracut.spec; ) && \
|
||||
+ ( mv "$$rpmbuild"/*.src.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
||||
+
|
||||
syncheck:
|
||||
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
|
||||
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 90054e4f1f2f64cb9a2b06b44b5a82b293c387dd Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Thu, 10 Jan 2019 18:08:32 +0100
|
||||
Subject: [PATCH] 95iscsi: decouple iscsi from sysinit.target
|
||||
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index 5c2073bb..ae1924cc 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -265,6 +265,23 @@ install() {
|
||||
echo "After=dracut-cmdline.service"
|
||||
echo "Before=dracut-initqueue.service"
|
||||
) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
|
||||
+
|
||||
+ # The iscsi deamon does not need to wait for any storage inside initrd
|
||||
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
|
||||
+ (
|
||||
+ echo "[Unit]"
|
||||
+ echo "DefaultDependencies=no"
|
||||
+ echo "Conflicts=shutdown.target"
|
||||
+ echo "Before=shutdown.target sockets.target"
|
||||
+ ) > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
|
||||
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsuio.socket.d"
|
||||
+ (
|
||||
+ echo "[Unit]"
|
||||
+ echo "DefaultDependencies=no"
|
||||
+ echo "Conflicts=shutdown.target"
|
||||
+ echo "Before=shutdown.target sockets.target"
|
||||
+ ) > "${initdir}/$systemdsystemunitdir/iscsuio.socket.d/dracut.conf"
|
||||
+
|
||||
fi
|
||||
inst_dir /var/lib/iscsi
|
||||
dracut_need_initqueue
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From e44c26f0fc6b29fb42cbc6d5ab57e34b07aa2ce1 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 15 Jan 2019 16:42:38 +0100
|
||||
Subject: [PATCH] 95iscsi: fix a typo in a name of iscsiuio
|
||||
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index ae1924cc..79af4a47 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -274,13 +274,13 @@ install() {
|
||||
echo "Conflicts=shutdown.target"
|
||||
echo "Before=shutdown.target sockets.target"
|
||||
) > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
|
||||
- mkdir -p "${initdir}/$systemdsystemunitdir/iscsuio.socket.d"
|
||||
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
|
||||
(
|
||||
echo "[Unit]"
|
||||
echo "DefaultDependencies=no"
|
||||
echo "Conflicts=shutdown.target"
|
||||
echo "Before=shutdown.target sockets.target"
|
||||
- ) > "${initdir}/$systemdsystemunitdir/iscsuio.socket.d/dracut.conf"
|
||||
+ ) > "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d/dracut.conf"
|
||||
|
||||
fi
|
||||
inst_dir /var/lib/iscsi
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From c787ad30ab5467c9f3c740a1cd7ed8b3198b9719 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 21 May 2019 17:58:38 +0200
|
||||
Subject: [PATCH] net-lib: strstr is not for globs
|
||||
|
||||
(cherry picked from commit 1a3dcc8b46c967445794e679280a3fb3b8e77ae0)
|
||||
|
||||
Resolves: #1712469
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 1e7f1b33..7b93f25e 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -463,7 +463,7 @@ ip_to_var() {
|
||||
# ip=<ipv4-address> means anaconda-style static config argument cluster
|
||||
autoconf="$1"
|
||||
|
||||
- if strstr "$autoconf" "*.*.*.*"; then
|
||||
+ if strglob "$autoconf" "*.*.*.*"; then
|
||||
# ip=<ipv4-address> means anaconda-style static config argument cluster:
|
||||
# ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu>
|
||||
# ksdevice={link|bootif|ibft|<MAC>|<ifname>}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
From 81b59fbbd6ebeee05b5d6869ae4f36bb9e486f72 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 8 Jan 2019 17:16:07 +0100
|
||||
Subject: [PATCH] 95iscsi: rd.iscsi.initiator should have priority over stored
|
||||
configuration
|
||||
|
||||
(cherry picked from commit 61afc704548cecc7f7d2fa3b5f1319e790cc5bee)
|
||||
|
||||
Resolves: #1664062
|
||||
---
|
||||
modules.d/95iscsi/parse-iscsiroot.sh | 15 +++++++--------
|
||||
1 file changed, 7 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||
index 7a64d888..f00a83bb 100755
|
||||
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
||||
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
||||
@@ -107,14 +107,13 @@ if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ] && ! [
|
||||
iscsi_initiator=$arg
|
||||
echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
||||
ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi
|
||||
- if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||
- mkdir -p /etc/iscsi
|
||||
- ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
- if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
- systemctl try-restart iscsid
|
||||
- # FIXME: iscsid is not yet ready, when the service is :-/
|
||||
- sleep 1
|
||||
- fi
|
||||
+ rm -f /etc/iscsi/initiatorname.iscsi
|
||||
+ mkdir -p /etc/iscsi
|
||||
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
+ if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
+ systemctl try-restart iscsid
|
||||
+ # FIXME: iscsid is not yet ready, when the service is :-/
|
||||
+ sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
From 9c54932f590fd7accadc780c6ee946a94286b7e6 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 14 May 2019 09:23:55 +0200
|
||||
Subject: [PATCH] fips: split loading the crypto modules and checking the
|
||||
kernel
|
||||
|
||||
In e54ab383 we moved the fips script to a later pahse of boot, since
|
||||
the /boot might not be available early on.
|
||||
|
||||
The problem is that systemd-cryptsetup* services could be run now
|
||||
started before the do_fips is executed and need the crypto modules
|
||||
to decrypted the devices.
|
||||
|
||||
So let's split the do_fips and load the module before udev does the
|
||||
trigger.
|
||||
---
|
||||
modules.d/01fips/fips-load-crypto.sh | 8 ++++++++
|
||||
modules.d/01fips/fips.sh | 19 +++++++++++--------
|
||||
modules.d/01fips/module-setup.sh | 1 +
|
||||
3 files changed, 20 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/01fips/fips-load-crypto.sh b/modules.d/01fips/fips-load-crypto.sh
|
||||
new file mode 100644
|
||||
index 00000000..82cbeee4
|
||||
--- /dev/null
|
||||
+++ b/modules.d/01fips/fips-load-crypto.sh
|
||||
@@ -0,0 +1,8 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
||||
+ rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
||||
+else
|
||||
+ . /sbin/fips.sh
|
||||
+ fips_load_crypto || die "FIPS integrity test failed"
|
||||
+fi
|
||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
||||
index 9bc089f2..beaa692b 100755
|
||||
--- a/modules.d/01fips/fips.sh
|
||||
+++ b/modules.d/01fips/fips.sh
|
||||
@@ -69,15 +69,8 @@ do_rhevh_check()
|
||||
return 0
|
||||
}
|
||||
|
||||
-do_fips()
|
||||
+fips_load_crypto()
|
||||
{
|
||||
- local _v
|
||||
- local _s
|
||||
- local _v
|
||||
- local _module
|
||||
-
|
||||
- KERNEL=$(uname -r)
|
||||
-
|
||||
FIPSMODULES=$(cat /etc/fipsmodules)
|
||||
|
||||
info "Loading and integrity checking all crypto modules"
|
||||
@@ -102,6 +95,16 @@ do_fips()
|
||||
info "Self testing crypto algorithms"
|
||||
modprobe tcrypt || return 1
|
||||
rmmod tcrypt
|
||||
+}
|
||||
+
|
||||
+do_fips()
|
||||
+{
|
||||
+ local _v
|
||||
+ local _s
|
||||
+ local _v
|
||||
+ local _module
|
||||
+
|
||||
+ KERNEL=$(uname -r)
|
||||
|
||||
info "Checking integrity of kernel"
|
||||
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index f3af4d90..18186d62 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -54,6 +54,7 @@ install() {
|
||||
local _dir
|
||||
inst_hook pre-trigger 01 "$moddir/fips-boot.sh"
|
||||
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
|
||||
+ 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
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
From a1435c3d535707f1d21aaf85e62175ff2bb1ad2b Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Thu, 14 Mar 2019 18:54:10 +0800
|
||||
Subject: [PATCH] fips: ensure fs module for /boot is installed
|
||||
|
||||
When using dracut with --hostonly and --no-hostonly-default-device,
|
||||
/boot will be inaccessible as dracut will most fs modules unless
|
||||
specified. But FIPS require /boot to be accessible, and it will try
|
||||
to mount it on boot. It will fail if corresponding fs module is missing.
|
||||
|
||||
For most case /boot will be a simple partition, include the fs module
|
||||
will be enough for FIPS to mount it. For other cases users have to pass
|
||||
extra parameters by themselves.
|
||||
|
||||
Suggested-by: Kenneth Dsouza <kdsouza@redhat.com>
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
---
|
||||
modules.d/01fips/module-setup.sh | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index 18186d62..89734a09 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -12,7 +12,7 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
- local _fipsmodules _mod
|
||||
+ local _fipsmodules _mod _bootfstype
|
||||
if [[ -f "${srcmods}/modules.fips" ]]; then
|
||||
_fipsmodules="$(cat "${srcmods}/modules.fips")"
|
||||
else
|
||||
@@ -47,6 +47,16 @@ installkernel() {
|
||||
echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf"
|
||||
fi
|
||||
done
|
||||
+
|
||||
+ # with hostonly_default_device fs module for /boot is not installed by default
|
||||
+ if [[ $hostonly ]] && [[ "$hostonly_default_device" == "no" ]]; then
|
||||
+ _bootfstype=$(find_mp_fstype /boot)
|
||||
+ if [[ -n "$_bootfstype" ]]; then
|
||||
+ hostonly='' instmods $_bootfstype
|
||||
+ else
|
||||
+ dwarning "Can't determine fs type for /boot, FIPS check may fail."
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From 7c35556da4c803bbb08c96e96262e598d5c42274 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 21 Aug 2018 13:14:44 +0200
|
||||
Subject: [PATCH] network: skip already enslaved interfaces
|
||||
|
||||
(cherry picked from commit f6e3b59e5ea6f52a25631557badc7f4dfabbd7ee)
|
||||
|
||||
Resolves: #1625042
|
||||
---
|
||||
modules.d/35network-legacy/ifup.sh | 6 +++++-
|
||||
modules.d/40network/net-lib.sh | 7 +++++++
|
||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
||||
index ea2a67ff..b4f5bf10 100755
|
||||
--- a/modules.d/35network-legacy/ifup.sh
|
||||
+++ b/modules.d/35network-legacy/ifup.sh
|
||||
@@ -408,7 +408,11 @@ for p in $(getargs ip=); do
|
||||
esac
|
||||
|
||||
# If this option isn't directed at our interface, skip it
|
||||
- [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue
|
||||
+ if [ -n "$dev" ]; then
|
||||
+ [ "$dev" != "$netif" ] && continue
|
||||
+ else
|
||||
+ iface_is_enslaved "$netif" && continue
|
||||
+ fi
|
||||
|
||||
# Store config for later use
|
||||
for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index 7b93f25e..f9569573 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -745,6 +745,13 @@ iface_has_link() {
|
||||
iface_has_carrier "$@"
|
||||
}
|
||||
|
||||
+iface_is_enslaved() {
|
||||
+ local _li
|
||||
+ _li=$(ip -o link show dev $1)
|
||||
+ strstr "$li" " master " || return 1
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
find_iface_with_link() {
|
||||
local iface_path="" iface=""
|
||||
for iface_path in /sys/class/net/*; do
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 4971a2c4eb4526cb88a5c9aff30c57527a746036 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 16 Jul 2019 08:27:01 +0100
|
||||
Subject: [PATCH] 01fips: add cfb cipher
|
||||
|
||||
Required by FIPS standard
|
||||
---
|
||||
modules.d/01fips/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||
index 89734a09..f011f15d 100755
|
||||
--- a/modules.d/01fips/module-setup.sh
|
||||
+++ b/modules.d/01fips/module-setup.sh
|
||||
@@ -24,7 +24,7 @@ installkernel() {
|
||||
_fipsmodules+="crc32c crct10dif ghash "
|
||||
|
||||
# Ciphers:
|
||||
- _fipsmodules+="cipher_null des3_ede aes "
|
||||
+ _fipsmodules+="cipher_null des3_ede aes cfb "
|
||||
|
||||
# Modes/templates:
|
||||
_fipsmodules+="ecb cbc ctr xts gcm ccm authenc hmac cmac "
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
From 31116110ff0090324a568ce2aba6519a860d66b3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
|
||||
Date: Thu, 11 Jul 2019 10:50:40 +0200
|
||||
Subject: [PATCH] rngd: new module running early during boot to help generating
|
||||
entropy when system's default entropy sources are poor (e.g. use of SSD disks
|
||||
or UEFI RNG not available)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On systems with low entropy at boot, the boot can take up to several
|
||||
hours, specially when NBDE is used (e.g. clevis) which makes use of
|
||||
the random number generator.
|
||||
|
||||
Enabling rngd service at boot early, because dracut-initqueue runs,
|
||||
enables to initialize the random number generator in a couple of seconds
|
||||
instead of minutes or hours.
|
||||
|
||||
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
|
||||
(cherry picked from commit adee5b97bc5418b6e357342bb3be20568668aa55)
|
||||
|
||||
Resolves: #1726617
|
||||
---
|
||||
modules.d/06rngd/module-setup.sh | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
modules.d/06rngd/rngd.service | 7 +++++++
|
||||
2 files changed, 46 insertions(+)
|
||||
|
||||
diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh
|
||||
new file mode 100644
|
||||
index 00000000..43d5c2d3
|
||||
--- /dev/null
|
||||
+++ b/modules.d/06rngd/module-setup.sh
|
||||
@@ -0,0 +1,39 @@
|
||||
+#!/bin/bash
|
||||
+# vim: set tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80:
|
||||
+#
|
||||
+# Copyright (c) 2019 Red Hat, Inc.
|
||||
+# Author: Renaud Métrich <rmetrich@redhat.com>
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation, either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program 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 General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#
|
||||
+
|
||||
+depends() {
|
||||
+ echo systemd
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+check() {
|
||||
+ # if there's no rngd binary, no go.
|
||||
+ require_binaries rngd || return 1
|
||||
+
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+install() {
|
||||
+ inst rngd
|
||||
+ inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service"
|
||||
+ mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
|
||||
+ ln -rfs "${initdir}${systemdsystemunitdir}/rngd.service" \
|
||||
+ "${initdir}${systemdsystemunitdir}/sysinit.target.wants/rngd.service"
|
||||
+}
|
||||
diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service
|
||||
new file mode 100644
|
||||
index 00000000..570fbedb
|
||||
--- /dev/null
|
||||
+++ b/modules.d/06rngd/rngd.service
|
||||
@@ -0,0 +1,7 @@
|
||||
+[Unit]
|
||||
+Description=Hardware RNG Entropy Gatherer Daemon
|
||||
+DefaultDependencies=no
|
||||
+Before=systemd-udevd.service
|
||||
+
|
||||
+[Service]
|
||||
+ExecStart=/usr/sbin/rngd -f
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From d86dfcd148e5d726f00b8a83eeadb11aa0017fba Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 22 Jul 2019 14:07:26 +0200
|
||||
Subject: [PATCH] dracut.spec: add 06rngd
|
||||
|
||||
---
|
||||
dracut.spec | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dracut.spec b/dracut.spec
|
||||
index de57703c..92c7f7bf 100644
|
||||
--- a/dracut.spec
|
||||
+++ b/dracut.spec
|
||||
@@ -346,6 +346,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
||||
%{dracutlibdir}/modules.d/03rescue
|
||||
%{dracutlibdir}/modules.d/04watchdog
|
||||
%{dracutlibdir}/modules.d/05busybox
|
||||
+%{dracutlibdir}/modules.d/06rngd
|
||||
%{dracutlibdir}/modules.d/10i18n
|
||||
%{dracutlibdir}/modules.d/30convertfs
|
||||
%{dracutlibdir}/modules.d/45url-lib
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From 927428e6a5e90b2214ee9edf15d4eb6c0fc5c203 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Mon, 11 Mar 2019 18:44:02 +0800
|
||||
Subject: [PATCH] squash: squash systemd binary and udevadm
|
||||
|
||||
systemd binary and udevadm are not needed to be outside the squash
|
||||
image. Some binaries are kept outside because they are required before
|
||||
mounting the image, or after umounting the image (when switching root),
|
||||
or they may block umounting the image. But we are using lazy umounting,
|
||||
so actually nothing will block the umount.
|
||||
|
||||
Keep more binaries outside the squash image won't hurt but cost extra
|
||||
memories, the idea of squash image is to save memory usage.
|
||||
|
||||
So, there is no reason to keep udevadm outside, that should be a debug
|
||||
left over. For systemd binary, it's running when switch root happens,
|
||||
But we have lazy umounted the image and overlay, once systemd process
|
||||
exec the new systemd in new root, everything will be cleared by kernel.
|
||||
|
||||
Also tidy up the comment make it less confussing.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
(cherry picked from commit e1e1f6e8e6747d8f32c065e267e0a57587818c9e)
|
||||
|
||||
Resolves: #1691705
|
||||
---
|
||||
dracut.sh | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index e683a9bc..a0158f22 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1772,9 +1772,11 @@ if dracut_module_included "squash"; then
|
||||
mv $initdir/$folder $squash_dir/$folder
|
||||
done
|
||||
|
||||
- # Reinstall required files, because we have moved some important folders to $squash_dir
|
||||
- inst_multiple "echo" "sh" "mount" "modprobe" "mkdir" \
|
||||
- "systemctl" "udevadm" "$systemdutildir/systemd"
|
||||
+ # Reinstall required files for the squash image setup script.
|
||||
+ # We have moved them inside the squashed image, but they need to be
|
||||
+ # accessible before mounting the image. Also install systemctl,
|
||||
+ # it's requires for switch-root, but we will umount the image before switch-root
|
||||
+ inst_multiple "echo" "sh" "mount" "modprobe" "mkdir" "systemctl"
|
||||
hostonly="" instmods "loop" "squashfs" "overlay"
|
||||
|
||||
for folder in "${squash_candidate[@]}"; do
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
From b6d52b504fc7eefc3f405f75463d9e818471ee99 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Mon, 11 Mar 2019 19:46:19 +0800
|
||||
Subject: [PATCH] squash: fix and simplify required_in_root
|
||||
|
||||
If required target is a symbol link, create the link then following the
|
||||
link. If it's a directory, create new directory, else just move it.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
(cherry picked from commit 11ce69e4bd9172cf54251ea62bb4a5ead1700fd6)
|
||||
|
||||
Resolves: #1691705
|
||||
---
|
||||
dracut.sh | 42 +++++++++++++++++++-----------------------
|
||||
1 file changed, 19 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index a0158f22..6de88b3e 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1811,30 +1811,26 @@ if dracut_module_included "squash"; then
|
||||
required_in_root $(dirname $file)
|
||||
fi
|
||||
|
||||
- if [[ -d $_sqsh_file ]]; then
|
||||
- if [[ -L $_sqsh_file ]]; then
|
||||
- cp --preserve=all -P $_sqsh_file $_init_file
|
||||
- else
|
||||
- mkdir $_init_file
|
||||
- fi
|
||||
+ if [[ -L $_sqsh_file ]]; then
|
||||
+ cp --preserve=all -P $_sqsh_file $_init_file
|
||||
+ _sqsh_file=$(realpath $_sqsh_file 2>/dev/null)
|
||||
+ if [[ -e $_sqsh_file ]] && [[ "$_sqsh_file" == "$squash_dir"* ]]; then
|
||||
+ # Relative symlink
|
||||
+ required_in_root ${_sqsh_file#$squash_dir/}
|
||||
+ return
|
||||
+ fi
|
||||
+ if [[ -e $squash_dir$_sqsh_file ]]; then
|
||||
+ # Absolute symlink
|
||||
+ required_in_root ${_sqsh_file#/}
|
||||
+ return
|
||||
+ fi
|
||||
+ required_in_root ${module_spec#$squash_dir/}
|
||||
else
|
||||
- if [[ -L $_sqsh_file ]]; then
|
||||
- cp --preserve=all -P $_sqsh_file $_init_file
|
||||
- _sqsh_file=$(realpath $_sqsh_file 2>/dev/null)
|
||||
- if [[ -e $_sqsh_file ]] && [[ "$_sqsh_file" == "$squash_dir"* ]]; then
|
||||
- # Relative symlink
|
||||
- required_in_root ${_sqsh_file#$squash_dir/}
|
||||
- return
|
||||
- fi
|
||||
- if [[ -e $squash_dir$_sqsh_file ]]; then
|
||||
- # Absolute symlink
|
||||
- required_in_root ${_sqsh_file#/}
|
||||
- return
|
||||
- fi
|
||||
- required_in_root ${module_spec#$squash_dir/}
|
||||
- else
|
||||
- mv $_sqsh_file $_init_file
|
||||
- fi
|
||||
+ if [[ -d $_sqsh_file ]]; then
|
||||
+ mkdir $_init_file
|
||||
+ else
|
||||
+ mv $_sqsh_file $_init_file
|
||||
+ fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
From 829ed8ef5cca250fac475ad6b0265c792c3af015 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Wed, 13 Mar 2019 17:36:53 +0800
|
||||
Subject: [PATCH] squash: also squash systemctl if switch-root is not needed
|
||||
|
||||
systemctl need to be accessible on switch-root, but we unmount the
|
||||
squash image on switch-root, so it will fail. systemctl depends on a lot
|
||||
of libraries, squash them can save more RAM. So allow modules
|
||||
(eg. kdump) to tell dracut that switch-root will be intercepted,
|
||||
then we don't need to take care of that.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
(cherry picked from commit 3ee0ca5eb74be5d1fbd0e6d643f6fff06234177f)
|
||||
|
||||
Resolves: #1691705
|
||||
---
|
||||
dracut-init.sh | 4 ++++
|
||||
dracut.sh | 40 ++++++++++++++++++++++------------------
|
||||
2 files changed, 26 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index 50d23e2d..b1ac9966 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -150,6 +150,10 @@ dracut_module_included() {
|
||||
[[ " $mods_to_load $modules_loaded " == *\ $*\ * ]]
|
||||
}
|
||||
|
||||
+dracut_no_switch_root() {
|
||||
+ >"$initdir/lib/dracut/no-switch-root"
|
||||
+}
|
||||
+
|
||||
if ! [[ $DRACUT_INSTALL ]]; then
|
||||
DRACUT_INSTALL=$(find_binary dracut-install)
|
||||
fi
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 6de88b3e..8144a16e 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1772,24 +1772,6 @@ if dracut_module_included "squash"; then
|
||||
mv $initdir/$folder $squash_dir/$folder
|
||||
done
|
||||
|
||||
- # Reinstall required files for the squash image setup script.
|
||||
- # We have moved them inside the squashed image, but they need to be
|
||||
- # accessible before mounting the image. Also install systemctl,
|
||||
- # it's requires for switch-root, but we will umount the image before switch-root
|
||||
- inst_multiple "echo" "sh" "mount" "modprobe" "mkdir" "systemctl"
|
||||
- hostonly="" instmods "loop" "squashfs" "overlay"
|
||||
-
|
||||
- for folder in "${squash_candidate[@]}"; do
|
||||
- # Remove duplicated files in squashfs image, save some more space
|
||||
- [[ ! -d $initdir/$folder/ ]] && continue
|
||||
- for file in $(find $initdir/$folder/ -not -type d);
|
||||
- do
|
||||
- if [[ -e $squash_dir${file#$initdir} ]]; then
|
||||
- mv $squash_dir${file#$initdir} $file
|
||||
- fi
|
||||
- done
|
||||
- done
|
||||
-
|
||||
# Move some files out side of the squash image, including:
|
||||
# - Files required to boot and mount the squashfs image
|
||||
# - Files need to be accessable without mounting the squash image
|
||||
@@ -1851,6 +1833,28 @@ if dracut_module_included "squash"; then
|
||||
ln -s squash/init.sh $initdir/init
|
||||
ln -s squash/shutdown.sh $initdir/shutdown
|
||||
|
||||
+ # Reinstall required files for the squash image setup script.
|
||||
+ # We have moved them inside the squashed image, but they need to be
|
||||
+ # accessible before mounting the image.
|
||||
+ inst_multiple "echo" "sh" "mount" "modprobe" "mkdir"
|
||||
+ hostonly="" instmods "loop" "squashfs" "overlay"
|
||||
+
|
||||
+ # Only keep systemctl outsite if we need switch root
|
||||
+ if [[ ! -f "$initdir/lib/dracut/no-switch-root" ]]; then
|
||||
+ inst "systemctl"
|
||||
+ fi
|
||||
+
|
||||
+ for folder in "${squash_candidate[@]}"; do
|
||||
+ # Remove duplicated files in squashfs image, save some more space
|
||||
+ [[ ! -d $initdir/$folder/ ]] && continue
|
||||
+ for file in $(find $initdir/$folder/ -not -type d);
|
||||
+ do
|
||||
+ if [[ -e $squash_dir${file#$initdir} ]]; then
|
||||
+ mv $squash_dir${file#$initdir} $file
|
||||
+ fi
|
||||
+ done
|
||||
+ done
|
||||
+
|
||||
mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
From 7ee74e539dba61c3765afe34426b085eff0de027 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Thu, 21 Feb 2019 13:18:37 +0800
|
||||
Subject: [PATCH] dracut: let module handling function accept optional path
|
||||
option
|
||||
|
||||
Let the caller pass in the module path instead of try to find the module
|
||||
path everytime. This helps optimize the overall runtime.
|
||||
|
||||
Test results (3 rounds) on Fedora 30 in KVM VM with 8 CPUs, 2G memory, HDD:
|
||||
|
||||
$ time ./dracut.sh --local --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode 'strict' -o 'plymouth dash resume ifcfg' --mount '/dev/mapper/fedora-root /sysroot xfs defaults' --no-hostonly-default-device -f initramfs.img
|
||||
Before the commit:
|
||||
real 0m11.782s | real 0m11.505s | real 0m11.958s
|
||||
user 0m9.169s | user 0m9.218s | user 0m9.327s
|
||||
sys 0m10.839s | sys 0m10.829s | sys 0m10.925s
|
||||
|
||||
After this commit:
|
||||
real 0m9.866s | real 0m9.580s | real 0m9.638s
|
||||
user 0m9.048s | user 0m9.142s | user 0m9.120s
|
||||
sys 0m7.411s | sys 0m7.775s | sys 0m7.745s
|
||||
|
||||
Test result of building a ordinary image:
|
||||
|
||||
$ time ./dracut.sh --local --quiet -f initramfs.img
|
||||
Before the commit:
|
||||
real 0m34.697s | real 0m34.371s | real 0m35.122s
|
||||
user 0m27.608s | user 0m27.524s | user 0m27.705s
|
||||
sys 0m22.341s | sys 0m22.032s | sys 0m22.246s
|
||||
|
||||
After the commit:
|
||||
real 0m31.914s | real 0m31.006 | real 0m31.289ss
|
||||
user 0m27.315s | user 0m27.324 | user 0m27.290ss
|
||||
sys 0m19.051s | sys 0m18.916 | sys 0m19.022ss
|
||||
|
||||
This will have an ~2s speed up.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
(cherry picked from commit 5916d31b24ad9eb21fd376929a96c459813315a1)
|
||||
|
||||
Cherry-picked from: 5916d31b
|
||||
Resolves: #1734047
|
||||
---
|
||||
dracut-init.sh | 4 ++++
|
||||
dracut.sh | 8 ++++----
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||
index b1ac9966..ab07cabf 100644
|
||||
--- a/dracut-init.sh
|
||||
+++ b/dracut-init.sh
|
||||
@@ -154,6 +154,10 @@ dracut_no_switch_root() {
|
||||
>"$initdir/lib/dracut/no-switch-root"
|
||||
}
|
||||
|
||||
+dracut_module_path() {
|
||||
+ echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; }
|
||||
+}
|
||||
+
|
||||
if ! [[ $DRACUT_INSTALL ]]; then
|
||||
DRACUT_INSTALL=$(find_binary dracut-install)
|
||||
fi
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 8144a16e..f270af76 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1373,7 +1373,7 @@ do_print_cmdline()
|
||||
for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
|
||||
_d_mod=${moddir##*/}; _d_mod=${_d_mod#[0-9][0-9]}
|
||||
[[ ${_mods_to_print[$_d_mod]} ]] || continue
|
||||
- module_cmdline "$_d_mod"
|
||||
+ module_cmdline "$_d_mod" "$moddir"
|
||||
done
|
||||
unset moddir
|
||||
}
|
||||
@@ -1454,14 +1454,14 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
|
||||
dinfo "*** Including module: $_d_mod ***"
|
||||
fi
|
||||
if [[ $kernel_only == yes ]]; then
|
||||
- module_installkernel "$_d_mod" || {
|
||||
+ module_installkernel "$_d_mod" "$moddir" || {
|
||||
dfatal "installkernel failed in module $_d_mod"
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
- module_install "$_d_mod"
|
||||
+ module_install "$_d_mod" "$moddir"
|
||||
if [[ $no_kernel != yes ]]; then
|
||||
- module_installkernel "$_d_mod" || {
|
||||
+ module_installkernel "$_d_mod" "$moddir" || {
|
||||
dfatal "installkernel failed in module $_d_mod"
|
||||
exit 1
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
From 17cd55169c3549d85ba3e4d7e0e81c496d1b2940 Mon Sep 17 00:00:00 2001
|
||||
From: Lianbo Jiang <lijiang@redhat.com>
|
||||
Date: Mon, 13 May 2019 16:09:25 +0800
|
||||
Subject: [PATCH] 99base: enable the initqueue in both 'dracut --add-device'
|
||||
and 'dracut --mount' cases.
|
||||
|
||||
The commit 9f3c31cd8d68 ("99base: enable initqueue if extra devices are added")
|
||||
only covers 'dracut --add-device' case, but it did not cover 'dracut --mount'
|
||||
case, which causes the kdump failure in the Amazon virtual machine.
|
||||
|
||||
Lets make sure that the initqueue is enabled in both cases in order to wake up
|
||||
the device in time.
|
||||
|
||||
Reported-by: Xiao Liang <xiliang@redhat.com>
|
||||
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
||||
(cherry picked from commit e0fc62f619ba55a96179382e22f7665e969c3d42)
|
||||
|
||||
Resolves: #1678094
|
||||
---
|
||||
modules.d/99base/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index 21523fc9..c9ead01d 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -93,7 +93,7 @@ install() {
|
||||
|
||||
## save host_devs which we need bring up
|
||||
if [[ $hostonly_cmdline == "yes" ]]; then
|
||||
- if [[ -n $add_device ]]; then
|
||||
+ if [[ -n "${host_devs[@]}" ]]; then
|
||||
dracut_need_initqueue
|
||||
fi
|
||||
if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 1851348709df5413a767faecdee908534baf0da1 Mon Sep 17 00:00:00 2001
|
||||
From: Kairui Song <kasong@redhat.com>
|
||||
Date: Wed, 12 Jun 2019 14:27:44 +0800
|
||||
Subject: [PATCH] 95fcoe: load 'libfcoe' module as a fallback
|
||||
|
||||
The kernel may only enable 'libfcoe' module. Some modules like bnx2fc
|
||||
provides FCoE but only depend on 'libfcoe'. Loading 'fcoe' module may
|
||||
fail but the kernel do support FCoE.
|
||||
|
||||
'libfcoe' will be installed as a dependency when installing block device
|
||||
drivers if it's required. So no need to install it in installkernel.
|
||||
|
||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
||||
(cherry picked from commit 65fe1af2eca7d0ed340520577ab861fcd695b34a)
|
||||
|
||||
Resolves: #1719645
|
||||
---
|
||||
modules.d/95fcoe/parse-fcoe.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
|
||||
index 75cca9a5..12701cdb 100755
|
||||
--- a/modules.d/95fcoe/parse-fcoe.sh
|
||||
+++ b/modules.d/95fcoe/parse-fcoe.sh
|
||||
@@ -18,7 +18,7 @@
|
||||
# If it's not set we don't continue
|
||||
[ -z "$fcoe" ] && return
|
||||
|
||||
-[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
|
||||
+[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || modprobe -b -a libfcoe || die "FCoE requested but kernel/initrd does not support FCoE"
|
||||
|
||||
initqueue --onetime modprobe -b -q bnx2fc
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
From 9b2497dffb8f699ce040cdbafa967f5fe02b57b6 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Fri, 2 Aug 2019 14:26:23 +0200
|
||||
Subject: [PATCH] 90kernel-modules-extra: don't resolve symlinks before instmod
|
||||
|
||||
When you install a third-party driver, you will probably end in a
|
||||
situation, where the module will be in a different directory and
|
||||
in $depmod_module_dir you will only have symlink. If we resolve the
|
||||
symlink before we pass the module path to instmod, the dracut-install
|
||||
will only include the module with its original path, but not the
|
||||
symlink. Hence the module can't be automatically loaded.
|
||||
|
||||
Dracut-install is clever enough to handle symlinks and will include both
|
||||
the symlink and the module to the initrd.
|
||||
|
||||
(cherry picked from commit d1afff43aea01c8d43817adf3ac4041dd4b9f022)
|
||||
|
||||
Resolves: #1720275
|
||||
---
|
||||
modules.d/90kernel-modules-extra/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules-extra/module-setup.sh b/modules.d/90kernel-modules-extra/module-setup.sh
|
||||
index c0a2b7f9..1706c822 100755
|
||||
--- a/modules.d/90kernel-modules-extra/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules-extra/module-setup.sh
|
||||
@@ -187,7 +187,7 @@ installkernel()
|
||||
printf "^%s\.ko(\.gz|\.bz2|\.xz)?:\n" "${pathlist[@]}" \
|
||||
| (LANG=C grep -E -o -f - -- "$depmod_modules_dep" || exit 0) \
|
||||
| tr -d ':' \
|
||||
- | (cd "$depmod_module_dir" || exit; xargs -r realpath -e --) \
|
||||
+ | (cd "$depmod_module_dir" || exit; xargs -r realpath -se --) \
|
||||
| instmods || return 1
|
||||
|
||||
return 0
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 3464297288b50a062e1094e57d46ad21e51b351b Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Tue, 6 Aug 2019 10:54:09 +0200
|
||||
Subject: [PATCH] net-lib: fix typo $li -> $_li
|
||||
|
||||
(cherry picked from commit cd97d8d2c0646b95aee47efd5eee39f29d617a67)
|
||||
|
||||
Resolves: #1625042
|
||||
---
|
||||
modules.d/40network/net-lib.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||||
index f9569573..ad78d225 100755
|
||||
--- a/modules.d/40network/net-lib.sh
|
||||
+++ b/modules.d/40network/net-lib.sh
|
||||
@@ -748,7 +748,7 @@ iface_has_link() {
|
||||
iface_is_enslaved() {
|
||||
local _li
|
||||
_li=$(ip -o link show dev $1)
|
||||
- strstr "$li" " master " || return 1
|
||||
+ strstr "$_li" " master " || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 95bbcaa8550534f03b332487ef3a2ed6650424fe Mon Sep 17 00:00:00 2001
|
||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||
Date: Wed, 21 Aug 2019 11:16:07 +0200
|
||||
Subject: [PATCH] git2spec: avoid malforming of SHA-1 hashes
|
||||
|
||||
When a SHA-1 hash of a specific commit is used as a tag, the regex
|
||||
shenanigans later in the script can (and will) corrupt it in certain
|
||||
cases.
|
||||
|
||||
e.g.:
|
||||
$ perl -e '
|
||||
$tag="6e8cd92261577230daa1098f7e05ec198c3c4281";
|
||||
$tag=~s/[^0-9]+?([0-9]+)/$1/;
|
||||
print("$tag\n");
|
||||
'
|
||||
68cd92261577230daa1098f7e05ec198c3c4281
|
||||
|
||||
(Notice the missing 'e')
|
||||
|
||||
Let's fix this by limiting the regex's scope to a non-SHA-1 tags only.
|
||||
---
|
||||
git2spec.pl | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/git2spec.pl b/git2spec.pl
|
||||
index 7853791e..9ddc3805 100755
|
||||
--- a/git2spec.pl
|
||||
+++ b/git2spec.pl
|
||||
@@ -37,7 +37,7 @@ $tag=`git describe --abbrev=0 --tags` if not defined $tag;
|
||||
chomp($tag);
|
||||
my @patches=&create_patches($tag, $pdir);
|
||||
my $num=$#patches + 2;
|
||||
-$tag=~s/[^0-9]+?([0-9]+)/$1/;
|
||||
+$tag=~s/[^0-9]+?([0-9]+)/$1/ if $tag !~ /\b[0-9a-f]{5,40}\b/;
|
||||
my $release="$num.git$datestr";
|
||||
$release="1" if $num == 1;
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From d3f542cc9d0135a408be7ba995b8adad80bcd606 Mon Sep 17 00:00:00 2001
|
||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||
Date: Wed, 21 Aug 2019 14:06:29 +0200
|
||||
Subject: [PATCH] travis: fetch only tags
|
||||
|
||||
The original `git pull` would try to pull & merge changes from the
|
||||
master branch, which breaks CI runs on PRs based on non-master branches
|
||||
---
|
||||
.travis.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.travis.yml b/.travis.yml
|
||||
index f913db57..efb0df1b 100644
|
||||
--- a/.travis.yml
|
||||
+++ b/.travis.yml
|
||||
@@ -29,7 +29,7 @@ before_script:
|
||||
sudo modprobe kvm-intel nested=1 || :
|
||||
sudo modprobe kvm-amd nested=1 || :
|
||||
dmesg | tail || :
|
||||
- - git pull --depth=100
|
||||
+ - git fetch --tags --unshallow
|
||||
- |
|
||||
git describe --abbrev=0 --tags || :
|
||||
git describe --tags || :
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
From e3b2b02c7f5b4e9f1d2a3cfe8749534959e29e3e Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Fri, 21 Jun 2019 18:39:48 +0200
|
||||
Subject: [PATCH] fs-lib: drop a bashism
|
||||
|
||||
Bash 5 apparently longer propagates variable assignments to local variables
|
||||
in front of function calls when in POSIX mode:
|
||||
|
||||
[lkundrak@demiurge ~]$ cat feh.sh
|
||||
print_VAR () {
|
||||
echo "$VAR";
|
||||
}
|
||||
|
||||
testfunc () {
|
||||
local VAR="OLD"
|
||||
VAR=NEW print_VAR
|
||||
}
|
||||
|
||||
testfunc
|
||||
[lkundrak@demiurge ~]$ bash4 --posix feh.sh
|
||||
NEW
|
||||
[lkundrak@demiurge ~]$ bash5 --posix feh.sh
|
||||
OLD
|
||||
[lkundrak@demiurge ~]$ bash5 feh.sh
|
||||
NEW
|
||||
[lkundrak@demiurge ~]$
|
||||
|
||||
It works the way it did in Bash 4 in non-POSIX mode, for external programs,
|
||||
or for non-local variables. Don't ask me why -- it's probably some
|
||||
compatibility thing for some sad old people.
|
||||
|
||||
However, this precisely happens when fsck_single() is calling into the
|
||||
fsck_drv_com(), assigned to _drv by fsck_able(). That ruins the
|
||||
TEST-70-BONDBRIDGETEAMVLAN test's server and probably more.
|
||||
|
||||
Let's pass the fsck driver binary via the function argument instead. It's
|
||||
less messy anyway.
|
||||
|
||||
(cherry picked from commit 43c8c4ce0471abbb8c0fc4b8be2515cebc636030)
|
||||
---
|
||||
modules.d/99fs-lib/fs-lib.sh | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
|
||||
index d39ca1b7..11e795d9 100755
|
||||
--- a/modules.d/99fs-lib/fs-lib.sh
|
||||
+++ b/modules.d/99fs-lib/fs-lib.sh
|
||||
@@ -44,22 +44,22 @@ fsck_able() {
|
||||
;;
|
||||
ext?)
|
||||
type e2fsck >/dev/null 2>&1 &&
|
||||
- _drv="_drv=e2fsck fsck_drv_com" &&
|
||||
+ _drv="fsck_drv_com e2fsck" &&
|
||||
return 0
|
||||
;;
|
||||
f2fs)
|
||||
type fsck.f2fs >/dev/null 2>&1 &&
|
||||
- _drv="_drv=fsck.f2fs fsck_drv_com" &&
|
||||
+ _drv="fsck_drv_com fsck.f2fs" &&
|
||||
return 0
|
||||
;;
|
||||
jfs)
|
||||
type jfs_fsck >/dev/null 2>&1 &&
|
||||
- _drv="_drv=jfs_fsck fsck_drv_com" &&
|
||||
+ _drv="fsck_drv_com jfs_fsck" &&
|
||||
return 0
|
||||
;;
|
||||
reiserfs)
|
||||
type reiserfsck >/dev/null 2>&1 &&
|
||||
- _drv="_drv=reiserfsck fsck_drv_com" &&
|
||||
+ _drv="fsck_drv_com reiserfsck" &&
|
||||
return 0
|
||||
;;
|
||||
btrfs)
|
||||
@@ -70,12 +70,12 @@ fsck_able() {
|
||||
;;
|
||||
nfs*)
|
||||
# nfs can be a nop, returning success
|
||||
- _drv="_drv=none :" &&
|
||||
+ _drv=":" &&
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
type fsck >/dev/null 2>&1 &&
|
||||
- _drv="_drv=fsck fsck_drv_std" &&
|
||||
+ _drv="fsck_drv_std fsck" &&
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
@@ -97,6 +97,7 @@ fsck_drv_btrfs() {
|
||||
|
||||
# common code for checkers that follow usual subset of options and return codes
|
||||
fsck_drv_com() {
|
||||
+ local _drv="$1"
|
||||
local _ret
|
||||
local _out
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
From e671c3a06a7e58461d4e9c9f3546cf6eac809300 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 4 Dec 2018 10:27:17 +0100
|
||||
Subject: [PATCH] 95iscsi/module-setup.sh: do not require 'hostname' anymore
|
||||
|
||||
(cherry picked from commit ebe1821635dd99f07c817179ee5358d27aab53c5)
|
||||
|
||||
[lkundrak@v3.sk: fixes TEST-30 that fails with: dracut: dracut module
|
||||
'iscsi' will not be installed, because command 'hostname' could not be
|
||||
found!]
|
||||
---
|
||||
modules.d/40network/netroot.sh | 2 +-
|
||||
modules.d/95iscsi/module-setup.sh | 4 ++--
|
||||
modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +-
|
||||
modules.d/99base/init.sh | 2 +-
|
||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh
|
||||
index 207364cd..654cfc72 100755
|
||||
--- a/modules.d/40network/netroot.sh
|
||||
+++ b/modules.d/40network/netroot.sh
|
||||
@@ -66,7 +66,7 @@ if [ -z "$2" ]; then
|
||||
|
||||
# Check: do we really know how to handle (net)root?
|
||||
[ -z "$root" ] && die "No or empty root= argument"
|
||||
- [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
+ [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'"
|
||||
|
||||
handler=${netroot%%:*}
|
||||
handler=${handler%%4}
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index 79af4a47..f6f3520d 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -4,7 +4,7 @@
|
||||
check() {
|
||||
local _rootdev
|
||||
# If our prerequisites are not met, fail anyways.
|
||||
- require_binaries hostname iscsi-iname iscsiadm iscsid || return 1
|
||||
+ require_binaries iscsi-iname iscsiadm iscsid || return 1
|
||||
|
||||
# If hostonly was requested, fail the check if we are not actually
|
||||
# booting from root.
|
||||
@@ -206,7 +206,7 @@ cmdline() {
|
||||
install() {
|
||||
inst_multiple -o iscsiuio
|
||||
inst_libdir_file 'libgcc_s.so*'
|
||||
- inst_multiple umount hostname iscsi-iname iscsiadm iscsid
|
||||
+ inst_multiple umount iscsi-iname iscsiadm iscsid
|
||||
|
||||
inst_multiple -o \
|
||||
$systemdsystemunitdir/iscsid.socket \
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
index bff9435a..89c52d13 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
@@ -76,7 +76,7 @@ case "${root}${root_unset}" in
|
||||
esac
|
||||
|
||||
[ -z "${root}${root_unset}" ] && die "Empty root= argument"
|
||||
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
+[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'"
|
||||
|
||||
export root rflags fstype netroot NEWROOT
|
||||
|
||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
||||
index e4f7cff1..3e20069f 100755
|
||||
--- a/modules.d/99base/init.sh
|
||||
+++ b/modules.d/99base/init.sh
|
||||
@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br
|
||||
source_hook cmdline
|
||||
|
||||
[ -z "$root" ] && die "No or empty root= argument"
|
||||
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
+[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'"
|
||||
|
||||
export root rflags fstype netroot NEWROOT
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 50192de38d756203a414405e2d7552e89b1c0423 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 4 Dec 2018 10:06:12 +0100
|
||||
Subject: [PATCH] test/test-functions: correctly move server.log
|
||||
|
||||
(cherry picked from commit 712f471ebfae70fd71c0c740e9a3e120464ca7e7)
|
||||
---
|
||||
test/test-functions | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/test-functions b/test/test-functions
|
||||
index a6254ec7..51b3df80 100644
|
||||
--- a/test/test-functions
|
||||
+++ b/test/test-functions
|
||||
@@ -80,7 +80,7 @@ while (($# > 0)); do
|
||||
ret=$?
|
||||
test_cleanup
|
||||
if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then
|
||||
- mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log
|
||||
+ mv "$TESTDIR"/server.log ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log
|
||||
fi
|
||||
rm -fr -- "$TESTDIR"
|
||||
rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From bf69beb6f3824b1ebed221c8255d1f5c9efd136a Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Wed, 26 Jun 2019 16:42:04 +0200
|
||||
Subject: [PATCH] test/TEST-17-LVM-THIN: fail setup if we run out of space in
|
||||
the thin pool
|
||||
|
||||
This condition is rather difficult to detect -- the writes will just remain
|
||||
queued and get lost on shutdown, resulting in a corrupt filesystem.
|
||||
|
||||
(cherry picked from commit 91c15babdf0215df59325f3086acfdf0ba247bfa)
|
||||
---
|
||||
test/TEST-17-LVM-THIN/create-root.sh | 5 +++--
|
||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh
|
||||
index 117d1341..0e52f879 100755
|
||||
--- a/test/TEST-17-LVM-THIN/create-root.sh
|
||||
+++ b/test/TEST-17-LVM-THIN/create-root.sh
|
||||
@@ -27,6 +27,7 @@ cp -a -t /sysroot /source/* && \
|
||||
umount /sysroot && \
|
||||
sleep 1 && \
|
||||
lvm lvchange -a n /dev/dracut/root && \
|
||||
-sleep 1 && \
|
||||
-echo "dracut-root-block-created" >/dev/sda1
|
||||
+sleep 1
|
||||
+dmsetup status |grep out_of_data_space || \
|
||||
+ echo "dracut-root-block-created" >/dev/sda1
|
||||
poweroff -f
|
||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
||||
index af349246..1b36a216 100755
|
||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
||||
@@ -56,7 +56,7 @@ test_setup() {
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
. $basedir/dracut-init.sh
|
||||
- inst_multiple sfdisk mke2fs poweroff cp umount
|
||||
+ inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup
|
||||
inst_hook initqueue 01 ./create-root.sh
|
||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
From 0f0b8c8f90cbcd56140e85b9997deda906c71118 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Tue, 25 Jun 2019 17:39:57 +0200
|
||||
Subject: [PATCH] test/TEST-14-IMSM: detect failure to compose the test setup
|
||||
root
|
||||
|
||||
The dracut-root-block-created line should not be created if we fail to copy
|
||||
in the required files to sysroot. Let's turn on -e to trap failures and
|
||||
poweroff on them, like some other tests do.
|
||||
|
||||
Also remove the &&. Not only it is unnecessary with -e, but defeats it.
|
||||
From bash(1):
|
||||
|
||||
The shell does not exit if the command that fails is [...] part of any
|
||||
command executed in a && or || list except the command following the
|
||||
final && or || [...]
|
||||
|
||||
(cherry picked from commit c27ed38bb2986d31b08257782ce2b24a80415c6c)
|
||||
---
|
||||
test/TEST-14-IMSM/create-root.sh | 23 +++++++++++++----------
|
||||
1 file changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh
|
||||
index f637ec88..a0324c6f 100755
|
||||
--- a/test/TEST-14-IMSM/create-root.sh
|
||||
+++ b/test/TEST-14-IMSM/create-root.sh
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
+
|
||||
+trap 'poweroff -f' EXIT
|
||||
+
|
||||
# don't let udev and this script step on eachother's toes
|
||||
for x in 61-dmraid-imsm.rules 64-md-raid.rules 65-md-incremental-imsm.rules 65-md-incremental.rules 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
|
||||
rm -f -- "/etc/udev/rules.d/$x"
|
||||
@@ -55,20 +58,20 @@ mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 \
|
||||
# wait for the array to finish initailizing, otherwise this sometimes fails
|
||||
# randomly.
|
||||
mdadm -W /dev/md0
|
||||
+set -e
|
||||
lvm pvcreate -ff -y /dev/md0
|
||||
-lvm vgcreate dracut /dev/md0 && \
|
||||
-lvm lvcreate -l 100%FREE -n root dracut && \
|
||||
-lvm vgchange -ay && \
|
||||
-mke2fs -L root /dev/dracut/root && \
|
||||
-mkdir -p /sysroot && \
|
||||
-mount /dev/dracut/root /sysroot && \
|
||||
-cp -a -t /sysroot /source/* && \
|
||||
-umount /sysroot && \
|
||||
-lvm lvchange -a n /dev/dracut/root && \
|
||||
+lvm vgcreate dracut /dev/md0
|
||||
+lvm lvcreate -l 100%FREE -n root dracut
|
||||
+lvm vgchange -ay
|
||||
+mke2fs -L root /dev/dracut/root
|
||||
+mkdir -p /sysroot
|
||||
+mount /dev/dracut/root /sysroot
|
||||
+cp -a -t /sysroot /source/*
|
||||
+umount /sysroot
|
||||
+lvm lvchange -a n /dev/dracut/root
|
||||
udevadm settle
|
||||
mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
|
||||
. /tmp/mduuid
|
||||
echo "MD_UUID=$MD_UUID"
|
||||
{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} > /dev/sda
|
||||
mdadm --wait-clean /dev/md0
|
||||
-poweroff -f
|
||||
|
|
@ -0,0 +1,346 @@
|
|||
From e35e43c1c28a8935660fe72650614e5dc1defb65 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Wed, 26 Jun 2019 11:47:21 +0200
|
||||
Subject: [PATCH] test: tell systemd to reboot on fatal errors
|
||||
|
||||
Otherwise systemd would freeze execution, causing the test to time out
|
||||
instead of failing fast.
|
||||
|
||||
(cherry picked from commit 7934c6f918de2e82d0df5da557c5792c4fb7b798)
|
||||
---
|
||||
test/TEST-01-BASIC/test.sh | 2 +-
|
||||
test/TEST-02-SYSTEMD/test.sh | 2 +-
|
||||
test/TEST-03-USR-MOUNT/test.sh | 2 +-
|
||||
test/TEST-04-FULL-SYSTEMD/test.sh | 2 +-
|
||||
test/TEST-10-RAID/test.sh | 2 +-
|
||||
test/TEST-11-LVM/test.sh | 2 +-
|
||||
test/TEST-12-RAID-DEG/test.sh | 2 +-
|
||||
test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++---
|
||||
test/TEST-14-IMSM/test.sh | 2 +-
|
||||
test/TEST-15-BTRFSRAID/test.sh | 2 +-
|
||||
test/TEST-16-DMSQUASH/test.sh | 2 +-
|
||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
||||
test/TEST-20-NFS/test.sh | 4 ++--
|
||||
test/TEST-30-ISCSI/test.sh | 4 ++--
|
||||
test/TEST-31-ISCSI-MULTI/test.sh | 4 ++--
|
||||
test/TEST-40-NBD/test.sh | 4 ++--
|
||||
test/TEST-50-MULTINIC/test.sh | 4 ++--
|
||||
test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 6 +++---
|
||||
18 files changed, 27 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
|
||||
index ed2ae5de..ca4a8288 100755
|
||||
--- a/test/TEST-01-BASIC/test.sh
|
||||
+++ b/test/TEST-01-BASIC/test.sh
|
||||
@@ -15,7 +15,7 @@ test_run() {
|
||||
-net none \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing || return 1
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1
|
||||
}
|
||||
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
|
||||
index 8c5eb168..848021e5 100755
|
||||
--- a/test/TEST-02-SYSTEMD/test.sh
|
||||
+++ b/test/TEST-02-SYSTEMD/test.sh
|
||||
@@ -11,7 +11,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1
|
||||
}
|
||||
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
|
||||
index 42c0da65..5d5ec8f8 100755
|
||||
--- a/test/TEST-03-USR-MOUNT/test.sh
|
||||
+++ b/test/TEST-03-USR-MOUNT/test.sh
|
||||
@@ -22,7 +22,7 @@ client_run() {
|
||||
-net none \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
|
||||
if (($? != 0)); then
|
||||
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
|
||||
index 97528e4f..f65f30f2 100755
|
||||
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
|
||||
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
|
||||
@@ -23,7 +23,7 @@ client_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
|
||||
if (($? != 0)); then
|
||||
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
|
||||
index 444126b2..0beb26c3 100755
|
||||
--- a/test/TEST-10-RAID/test.sh
|
||||
+++ b/test/TEST-10-RAID/test.sh
|
||||
@@ -13,7 +13,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1
|
||||
}
|
||||
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
|
||||
index 5c105e01..a907c4b1 100755
|
||||
--- a/test/TEST-11-LVM/test.sh
|
||||
+++ b/test/TEST-11-LVM/test.sh
|
||||
@@ -12,7 +12,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1
|
||||
}
|
||||
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
|
||||
index 4e381d84..c82cde1e 100755
|
||||
--- a/test/TEST-12-RAID-DEG/test.sh
|
||||
+++ b/test/TEST-12-RAID-DEG/test.sh
|
||||
@@ -20,7 +20,7 @@ client_run() {
|
||||
-drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \
|
||||
+ -append "panic=1 systemd.crash_reboot $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then
|
||||
echo "CLIENT TEST END: $@ [FAIL]"
|
||||
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
|
||||
index 76ec36b3..99324ce9 100755
|
||||
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
|
||||
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
|
||||
@@ -20,7 +20,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1
|
||||
echo "CLIENT TEST END: [OK]"
|
||||
@@ -34,7 +34,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1
|
||||
echo "CLIENT TEST END: [OK]"
|
||||
@@ -48,7 +48,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1
|
||||
echo "CLIENT TEST END: [OK]"
|
||||
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
|
||||
index 8ebc285a..ed60f052 100755
|
||||
--- a/test/TEST-14-IMSM/test.sh
|
||||
+++ b/test/TEST-14-IMSM/test.sh
|
||||
@@ -16,7 +16,7 @@ client_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then
|
||||
echo "CLIENT TEST END: $@ [FAIL]"
|
||||
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
|
||||
index 02cb4976..dda76672 100755
|
||||
--- a/test/TEST-15-BTRFSRAID/test.sh
|
||||
+++ b/test/TEST-15-BTRFSRAID/test.sh
|
||||
@@ -15,7 +15,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $MARKER_DISKIMAGE || return 1
|
||||
}
|
||||
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
|
||||
index 45d8c4c0..65d5bdbb 100755
|
||||
--- a/test/TEST-16-DMSQUASH/test.sh
|
||||
+++ b/test/TEST-16-DMSQUASH/test.sh
|
||||
@@ -23,7 +23,7 @@ test_run() {
|
||||
-nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd "$TESTDIR"/initramfs.testing
|
||||
|
||||
# mediacheck test with qemu GUI
|
||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
||||
index 1b36a216..c13e9063 100755
|
||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
||||
@@ -12,7 +12,7 @@ test_run() {
|
||||
-m 512M -smp 2 -nographic \
|
||||
-net none \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1
|
||||
}
|
||||
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
|
||||
index e942745a..4ad7fd77 100755
|
||||
--- a/test/TEST-20-NFS/test.sh
|
||||
+++ b/test/TEST-20-NFS/test.sh
|
||||
@@ -22,7 +22,7 @@ run_server() {
|
||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
||||
+ -append "panic=1 systemd.crash_reboot rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
||||
-initrd $TESTDIR/initramfs.server \
|
||||
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
||||
@@ -57,7 +57,7 @@ client_test() {
|
||||
-net socket,connect=127.0.0.1:12320 \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \
|
||||
+ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
|
||||
if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nfs-OK $TESTDIR/client.img; then
|
||||
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||
index f6cc56d5..d5a6ba58 100755
|
||||
--- a/test/TEST-30-ISCSI/test.sh
|
||||
+++ b/test/TEST-30-ISCSI/test.sh
|
||||
@@ -26,7 +26,7 @@ run_server() {
|
||||
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
|
||||
-net socket,listen=127.0.0.1:12330 \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
||||
-initrd $TESTDIR/initramfs.server \
|
||||
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
||||
@@ -51,7 +51,7 @@ run_client() {
|
||||
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
||||
-net socket,connect=127.0.0.1:12330 \
|
||||
-no-reboot \
|
||||
- -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
||||
+ -append "panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
||||
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
||||
diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh
|
||||
index 5c38249c..20db2451 100755
|
||||
--- a/test/TEST-31-ISCSI-MULTI/test.sh
|
||||
+++ b/test/TEST-31-ISCSI-MULTI/test.sh
|
||||
@@ -26,7 +26,7 @@ run_server() {
|
||||
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
|
||||
-net socket,listen=127.0.0.1:12331 \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
||||
-initrd $TESTDIR/initramfs.server \
|
||||
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
||||
@@ -51,7 +51,7 @@ run_client() {
|
||||
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
||||
-net socket,connect=127.0.0.1:12331 \
|
||||
-no-reboot \
|
||||
- -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
||||
+ -append "panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
||||
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
||||
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
|
||||
index 12736a15..19ec5b0e 100755
|
||||
--- a/test/TEST-40-NBD/test.sh
|
||||
+++ b/test/TEST-40-NBD/test.sh
|
||||
@@ -28,7 +28,7 @@ run_server() {
|
||||
${SERIAL:+-serial "$SERIAL"} \
|
||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
||||
-no-reboot \
|
||||
- -append "panic=1 root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \
|
||||
+ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \
|
||||
-initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1
|
||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
||||
|
||||
@@ -65,7 +65,7 @@ client_test() {
|
||||
-net nic,macaddr=$mac,model=e1000 \
|
||||
-net socket,connect=127.0.0.1:12340 \
|
||||
-no-reboot \
|
||||
- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \
|
||||
+ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \
|
||||
-initrd $TESTDIR/initramfs.testing
|
||||
|
||||
if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK $TESTDIR/flag.img; then
|
||||
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
|
||||
index 495a66f2..ff2961dc 100755
|
||||
--- a/test/TEST-50-MULTINIC/test.sh
|
||||
+++ b/test/TEST-50-MULTINIC/test.sh
|
||||
@@ -23,7 +23,7 @@ run_server() {
|
||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
||||
+ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
||||
-initrd "$TESTDIR"/initramfs.server \
|
||||
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
|
||||
|
||||
@@ -63,7 +63,7 @@ client_test() {
|
||||
-device e1000,netdev=n2,mac=52:54:00:12:34:99 \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \
|
||||
+ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \
|
||||
-initrd "$TESTDIR"/initramfs.testing
|
||||
|
||||
{ read OK; read IFACES; } < "$TESTDIR"/client.img
|
||||
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
||||
index 8c11a7d3..5618baee 100755
|
||||
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
||||
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
||||
@@ -31,7 +31,7 @@ run_server() {
|
||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
|
||||
+ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
|
||||
-initrd "$TESTDIR"/initramfs.server \
|
||||
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
|
||||
chmod 644 -- "$TESTDIR"/server.pid || return 1
|
||||
@@ -79,7 +79,7 @@ client_test() {
|
||||
$nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
||||
+ -append "panic=1 systemd.crash_reboot $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
||||
-initrd "$TESTDIR"/initramfs.testing
|
||||
else
|
||||
$testdir/run-qemu \
|
||||
@@ -95,7 +95,7 @@ client_test() {
|
||||
-net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \
|
||||
-watchdog i6300esb -watchdog-action poweroff \
|
||||
-no-reboot \
|
||||
- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
||||
+ -append "panic=1 systemd.crash_reboot $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
||||
-initrd "$TESTDIR"/initramfs.testing
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
From a34b1baa6ca45b420399ec4cefe3cfe225c14dcf Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Tue, 11 Jun 2019 09:56:13 +0200
|
||||
Subject: [PATCH] test/{10,12,13,14,17,30,31}: increase the disk sizes
|
||||
|
||||
On Fedora 30 the paritition sizes turn out to be too small again:
|
||||
|
||||
+ mkdir -p /sysroot
|
||||
+ mount /dev/dracut/root /sysroot
|
||||
+ cp -a -t /sysroot /source/bin /source/dev /source/etc /source/lib /source/lib64 /source/proc /source/root /source/sbin /source/sys /source/tmp /source/usr /source/var
|
||||
cp: error writing '/sysroot/usr/lib64/libkrb5.so.3.3': No space left on device
|
||||
cp: error writing '/sysroot/usr/lib64/libkrb5support.so.0.1': No space left on device
|
||||
|
||||
It turns out that there has been quite some size increase in some libraries,
|
||||
notably glibc, though not all -- some even shrunk, ruling out a toolchain
|
||||
problem. Here's are files over 1M we install on Fedora 30:
|
||||
|
||||
f29 f30
|
||||
2.7M => 6.4M /usr/lib64/{libc-2.28.so => libc-2.29.so}
|
||||
3.1M => 6.0M /usr/lib64/libcrypto.so.1.1.1c
|
||||
2.0M => 3.5M /usr/lib64/{libm-2.28.so => libm-2.29.so}
|
||||
2.9M => 2.8M /usr/lib/systemd/{libsystemd-shared-239.so => libsystemd-shared-241.so}
|
||||
1.7M => 2.5M /usr/lib64/libunistring.so.2.1.0
|
||||
2.3M => 2.4M /usr/lib64/bind9-export/libdns-export.so.1105.0.0
|
||||
1.2M => 2.1M /usr/bin/bash
|
||||
1.1M => 1.4M /usr/lib64/libkrb5.so.3.3
|
||||
1.2M => 1.4M /usr/lib64/libgcrypt.so.20.2.4
|
||||
612K => 1.1M /usr/lib64/libssl.so.1.1.1c
|
||||
|
||||
This increases the image sizes to accomodate for this. There's probably
|
||||
little else we can do.
|
||||
|
||||
(cherry picked from commit e318ba30fbd84d510a5bbb071d868e523d965869)
|
||||
---
|
||||
test/TEST-10-RAID/create-root.sh | 6 +++---
|
||||
test/TEST-10-RAID/test.sh | 2 +-
|
||||
test/TEST-12-RAID-DEG/test.sh | 6 +++---
|
||||
test/TEST-13-ENC-RAID-LVM/create-root.sh | 6 +++---
|
||||
test/TEST-13-ENC-RAID-LVM/test.sh | 2 +-
|
||||
test/TEST-14-IMSM/create-root.sh | 6 +++---
|
||||
test/TEST-14-IMSM/test.sh | 4 ++--
|
||||
test/TEST-17-LVM-THIN/create-root.sh | 8 ++++----
|
||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
||||
test/TEST-30-ISCSI/test.sh | 6 +++---
|
||||
test/TEST-31-ISCSI-MULTI/test.sh | 6 +++---
|
||||
11 files changed, 27 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh
|
||||
index 7b5f2a76..af4cac0d 100755
|
||||
--- a/test/TEST-10-RAID/create-root.sh
|
||||
+++ b/test/TEST-10-RAID/create-root.sh
|
||||
@@ -8,9 +8,9 @@ udevadm control --reload
|
||||
# save a partition at the beginning for future flagging purposes
|
||||
sfdisk /dev/sda <<EOF
|
||||
,4M
|
||||
-,25M
|
||||
-,25M
|
||||
-,25M
|
||||
+,41M
|
||||
+,41M
|
||||
+,41M
|
||||
EOF
|
||||
udevadm settle
|
||||
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4
|
||||
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
|
||||
index 0beb26c3..07179a29 100755
|
||||
--- a/test/TEST-10-RAID/test.sh
|
||||
+++ b/test/TEST-10-RAID/test.sh
|
||||
@@ -22,7 +22,7 @@ test_setup() {
|
||||
DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
|
||||
# Create the blank file to use as a root filesystem
|
||||
rm -f -- $DISKIMAGE
|
||||
- dd if=/dev/null of=$DISKIMAGE bs=1M seek=80
|
||||
+ dd if=/dev/null of=$DISKIMAGE bs=1M seek=128
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
|
||||
index c82cde1e..920baafd 100755
|
||||
--- a/test/TEST-12-RAID-DEG/test.sh
|
||||
+++ b/test/TEST-12-RAID-DEG/test.sh
|
||||
@@ -59,9 +59,9 @@ test_setup() {
|
||||
# Create the blank file to use as a root filesystem
|
||||
rm -f -- $TESTDIR/root.ext2
|
||||
dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=40
|
||||
- dd if=/dev/null of=$TESTDIR/disk1.img bs=1M seek=20
|
||||
- dd if=/dev/null of=$TESTDIR/disk2.img bs=1M seek=20
|
||||
- dd if=/dev/null of=$TESTDIR/disk3.img bs=1M seek=20
|
||||
+ dd if=/dev/null of=$TESTDIR/disk1.img bs=1M seek=35
|
||||
+ dd if=/dev/null of=$TESTDIR/disk2.img bs=1M seek=35
|
||||
+ dd if=/dev/null of=$TESTDIR/disk3.img bs=1M seek=35
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
||||
index 72bc765f..13e65838 100755
|
||||
--- a/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
||||
+++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
||||
@@ -9,9 +9,9 @@ udevadm control --reload
|
||||
# save a partition at the beginning for future flagging purposes
|
||||
sfdisk /dev/sda <<EOF
|
||||
,4M
|
||||
-,25M
|
||||
-,25M
|
||||
-,25M
|
||||
+,43M
|
||||
+,43M
|
||||
+,43M
|
||||
EOF
|
||||
udevadm settle
|
||||
printf test >keyfile
|
||||
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
|
||||
index 99324ce9..9ffe24b1 100755
|
||||
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
|
||||
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
|
||||
@@ -59,7 +59,7 @@ test_run() {
|
||||
test_setup() {
|
||||
# Create the blank file to use as a root filesystem
|
||||
rm -f -- $TESTDIR/root.ext2
|
||||
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80
|
||||
+ dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=134
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh
|
||||
index a0324c6f..0d10945b 100755
|
||||
--- a/test/TEST-14-IMSM/create-root.sh
|
||||
+++ b/test/TEST-14-IMSM/create-root.sh
|
||||
@@ -32,9 +32,9 @@ sfdisk -g /dev/mapper/isw*Test0
|
||||
# save a partition at the beginning for future flagging purposes
|
||||
sfdisk --no-reread /dev/mapper/isw*Test0 <<EOF
|
||||
,4M
|
||||
-,20M
|
||||
-,20M
|
||||
-,20M
|
||||
+,28M
|
||||
+,28M
|
||||
+,28M
|
||||
EOF
|
||||
|
||||
udevadm settle
|
||||
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
|
||||
index ed60f052..a3e52b53 100755
|
||||
--- a/test/TEST-14-IMSM/test.sh
|
||||
+++ b/test/TEST-14-IMSM/test.sh
|
||||
@@ -53,8 +53,8 @@ test_setup() {
|
||||
rm -f -- $TESTDIR/disk1
|
||||
rm -f -- $TESTDIR/disk2
|
||||
dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=1
|
||||
- dd if=/dev/null of=$TESTDIR/disk1 bs=1M seek=80
|
||||
- dd if=/dev/null of=$TESTDIR/disk2 bs=1M seek=80
|
||||
+ dd if=/dev/null of=$TESTDIR/disk1 bs=1M seek=104
|
||||
+ dd if=/dev/null of=$TESTDIR/disk2 bs=1M seek=104
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh
|
||||
index 0e52f879..6e09012e 100755
|
||||
--- a/test/TEST-17-LVM-THIN/create-root.sh
|
||||
+++ b/test/TEST-17-LVM-THIN/create-root.sh
|
||||
@@ -8,16 +8,16 @@ udevadm control --reload
|
||||
# save a partition at the beginning for future flagging purposes
|
||||
sfdisk /dev/sda <<EOF
|
||||
,4M
|
||||
-,25M
|
||||
-,25M
|
||||
-,25M
|
||||
+,29M
|
||||
+,29M
|
||||
+,29M
|
||||
EOF
|
||||
udevadm settle
|
||||
for i in sda2 sda3 sda4; do
|
||||
lvm pvcreate -ff -y /dev/$i ;
|
||||
done && \
|
||||
lvm vgcreate dracut /dev/sda[234] && \
|
||||
-lvm lvcreate -l 16 -T dracut/mythinpool && \
|
||||
+lvm lvcreate -l 17 -T dracut/mythinpool && \
|
||||
lvm lvcreate -V1G -T dracut/mythinpool -n root && \
|
||||
lvm vgchange -ay && \
|
||||
mke2fs /dev/dracut/root && \
|
||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
||||
index c13e9063..c7247c91 100755
|
||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
||||
@@ -19,7 +19,7 @@ test_run() {
|
||||
|
||||
test_setup() {
|
||||
# Create the blank file to use as a root filesystem
|
||||
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80
|
||||
+ dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=92
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
||||
index d5a6ba58..c126e3dd 100755
|
||||
--- a/test/TEST-30-ISCSI/test.sh
|
||||
+++ b/test/TEST-30-ISCSI/test.sh
|
||||
@@ -109,9 +109,9 @@ test_setup() {
|
||||
fi
|
||||
|
||||
# Create the blank file to use as a root filesystem
|
||||
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40
|
||||
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=40
|
||||
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=40
|
||||
+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45
|
||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45
|
||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh
|
||||
index 20db2451..122c69e3 100755
|
||||
--- a/test/TEST-31-ISCSI-MULTI/test.sh
|
||||
+++ b/test/TEST-31-ISCSI-MULTI/test.sh
|
||||
@@ -131,9 +131,9 @@ test_setup() {
|
||||
fi
|
||||
|
||||
# Create the blank file to use as a root filesystem
|
||||
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40
|
||||
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=40
|
||||
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=40
|
||||
+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45
|
||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45
|
||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From d9bf0c38be49199724abe1d18bc1c2686e6f0c88 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 27 Jun 2019 16:20:32 +0200
|
||||
Subject: [PATCH] travis: run TEST-14-IMSM on Fedora 29
|
||||
|
||||
Systemd in Fedora 30 is broken at the moment.
|
||||
Fix: https://github.com/systemd/systemd/pull/12872/
|
||||
|
||||
(cherry picked from commit 7a2503ab8cec9473ad6dacf4f48b17344219f3c0)
|
||||
---
|
||||
.travis.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.travis.yml b/.travis.yml
|
||||
index efb0df1b..de0af438 100644
|
||||
--- a/.travis.yml
|
||||
+++ b/.travis.yml
|
||||
@@ -19,7 +19,7 @@ env:
|
||||
- IMAGE=latest TESTS=10
|
||||
- IMAGE=latest TESTS=11
|
||||
- IMAGE=latest TESTS=13
|
||||
- - IMAGE=latest TESTS=14
|
||||
+ - IMAGE=29 TESTS=14
|
||||
- IMAGE=latest TESTS=15
|
||||
- IMAGE=latest TESTS=17
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From c60f4fc027272c221a887128070ac89547b6ecc3 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 27 Jun 2019 16:22:04 +0200
|
||||
Subject: [PATCH] travis: run TEST-13-ENC-RAID-LVM on Fedora 29
|
||||
|
||||
Systemd in Fedora 30 is broken at the moment.
|
||||
Fix: https://github.com/systemd/systemd/pull/12897
|
||||
|
||||
(cherry picked from commit 8238f41b34777c3c75b03a9b598d4b9e1c7bf911)
|
||||
---
|
||||
.travis.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.travis.yml b/.travis.yml
|
||||
index de0af438..364078cf 100644
|
||||
--- a/.travis.yml
|
||||
+++ b/.travis.yml
|
||||
@@ -18,7 +18,7 @@ env:
|
||||
- IMAGE=latest TESTS=04
|
||||
- IMAGE=latest TESTS=10
|
||||
- IMAGE=latest TESTS=11
|
||||
- - IMAGE=latest TESTS=13
|
||||
+ - IMAGE=29 TESTS=13
|
||||
- IMAGE=29 TESTS=14
|
||||
- IMAGE=latest TESTS=15
|
||||
- IMAGE=latest TESTS=17
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
From d8f0e52ac7d05c364ca24d2058c970e5e03f82ff Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Fri, 30 Aug 2019 16:16:51 +0200
|
||||
Subject: [PATCH] all: remove debugging leftovers
|
||||
|
||||
Accidentally folded into commit e671c3a06a7e5 ('95iscsi/module-setup.sh:
|
||||
do not require 'hostname' anymore').
|
||||
---
|
||||
modules.d/40network/netroot.sh | 2 +-
|
||||
modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +-
|
||||
modules.d/99base/init.sh | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh
|
||||
index 654cfc72..207364cd 100755
|
||||
--- a/modules.d/40network/netroot.sh
|
||||
+++ b/modules.d/40network/netroot.sh
|
||||
@@ -66,7 +66,7 @@ if [ -z "$2" ]; then
|
||||
|
||||
# Check: do we really know how to handle (net)root?
|
||||
[ -z "$root" ] && die "No or empty root= argument"
|
||||
- [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'"
|
||||
+ [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
|
||||
handler=${netroot%%:*}
|
||||
handler=${handler%%4}
|
||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
index 89c52d13..bff9435a 100755
|
||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
||||
@@ -76,7 +76,7 @@ case "${root}${root_unset}" in
|
||||
esac
|
||||
|
||||
[ -z "${root}${root_unset}" ] && die "Empty root= argument"
|
||||
-[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'"
|
||||
+[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
|
||||
export root rflags fstype netroot NEWROOT
|
||||
|
||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
||||
index 3e20069f..e4f7cff1 100755
|
||||
--- a/modules.d/99base/init.sh
|
||||
+++ b/modules.d/99base/init.sh
|
||||
@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br
|
||||
source_hook cmdline
|
||||
|
||||
[ -z "$root" ] && die "No or empty root= argument"
|
||||
-[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'"
|
||||
+[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
||||
|
||||
export root rflags fstype netroot NEWROOT
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 8eb08e55286e77f005246d1db1bfd2adf4a0e40b Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Tue, 27 Nov 2018 15:30:48 +0100
|
||||
Subject: [PATCH] network-manager: call the online hook for connected devices
|
||||
|
||||
Look for "connection-uuid" instead of "managed" to determine the devices
|
||||
that are actually activated with a connection and call the online hook.
|
||||
|
||||
This fixes the anaconda-net root mount, which utilizes the online hook.
|
||||
|
||||
(cherry picked from commit 79a17b0112995eb60c85c64d15070c52f213b28d)
|
||||
---
|
||||
modules.d/35network-manager/nm-run.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||
index f6defa99..0f943631 100755
|
||||
--- a/modules.d/35network-manager/nm-run.sh
|
||||
+++ b/modules.d/35network-manager/nm-run.sh
|
||||
@@ -9,8 +9,9 @@ fi
|
||||
for _i in /sys/class/net/*/
|
||||
do
|
||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
||||
- grep -q managed=true $state 2>/dev/null || continue
|
||||
+ grep -q connection-uuid= $state 2>/dev/null || continue
|
||||
ifname=$(basename $_i)
|
||||
sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
||||
+ source_hook initqueue/online $ifname
|
||||
/sbin/netroot $ifname
|
||||
done
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 34011ee53e745f74d70bc5b52dade6d4ef349e90 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 17 Jun 2019 10:07:38 +0200
|
||||
Subject: [PATCH] network-manager: remove useless use of basename
|
||||
|
||||
(cherry picked from commit 5e0f8c8a4ced36268d0077acafa1db2402776fa6)
|
||||
---
|
||||
modules.d/35network-manager/nm-run.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||
index 0f943631..5f4b38ca 100755
|
||||
--- a/modules.d/35network-manager/nm-run.sh
|
||||
+++ b/modules.d/35network-manager/nm-run.sh
|
||||
@@ -10,7 +10,7 @@ for _i in /sys/class/net/*/
|
||||
do
|
||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
||||
grep -q connection-uuid= $state 2>/dev/null || continue
|
||||
- ifname=$(basename $_i)
|
||||
+ ifname=${_i##*/}
|
||||
sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
||||
source_hook initqueue/online $ifname
|
||||
/sbin/netroot $ifname
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 94c75a2a827ff09ffac18454d5c4ba4756d721d6 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 27 May 2019 12:44:17 +0200
|
||||
Subject: [PATCH] network-manager: also read out next-server from NM state
|
||||
|
||||
(cherry picked from commit 4be95b67a73e7434f92a7d7c40955eae0b59717e)
|
||||
---
|
||||
modules.d/35network-manager/nm-run.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
||||
index 5f4b38ca..a539d5b2 100755
|
||||
--- a/modules.d/35network-manager/nm-run.sh
|
||||
+++ b/modules.d/35network-manager/nm-run.sh
|
||||
@@ -11,7 +11,7 @@ do
|
||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
||||
grep -q connection-uuid= $state 2>/dev/null || continue
|
||||
ifname=${_i##*/}
|
||||
- sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
||||
+ sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
||||
source_hook initqueue/online $ifname
|
||||
/sbin/netroot $ifname
|
||||
done
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From 68fefe6f9424d3f29e6da9133579c385e7b470b2 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 27 May 2019 12:43:59 +0200
|
||||
Subject: [PATCH] network-manager: generate configuration with netroot=
|
||||
|
||||
If the root is on network, let nm-initrd-generator create configuration
|
||||
even if none was explicitly specified on the command line.
|
||||
|
||||
Also do the same if /tmp/net.ifaces exists, because the anaconda plugin
|
||||
creates an empty file in that location in hopes that will make us
|
||||
configure the network.
|
||||
|
||||
(cherry picked from commit 381ab6b7cd2d35bf7f9da63b10c20f5ef6e61a8b)
|
||||
---
|
||||
modules.d/35network-manager/nm-config.sh | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
|
||||
index 1339ebe7..1efa737c 100755
|
||||
--- a/modules.d/35network-manager/nm-config.sh
|
||||
+++ b/modules.d/35network-manager/nm-config.sh
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
+if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
|
||||
+ echo rd.neednet >> /etc/cmdline.d/35-neednet.conf
|
||||
+fi
|
||||
+
|
||||
/usr/libexec/nm-initrd-generator -- $(getcmdline)
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From 53cece208a44c53ecc001cb8eb769f6fb9b3d1dc Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 27 May 2019 11:12:22 +0200
|
||||
Subject: [PATCH] network: parse root=dhcp also with network-manager module
|
||||
|
||||
Move the logic from network-legacy to common network code.
|
||||
|
||||
(cherry picked from commit 35efada5ecffd139660b4a89f4cc3d627752c91e)
|
||||
---
|
||||
modules.d/35network-legacy/module-setup.sh | 1 -
|
||||
modules.d/{35network-legacy => 40network}/dhcp-root.sh | 0
|
||||
modules.d/40network/module-setup.sh | 1 +
|
||||
3 files changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh
|
||||
index 71abda36..5a82e998 100755
|
||||
--- a/modules.d/35network-legacy/module-setup.sh
|
||||
+++ b/modules.d/35network-legacy/module-setup.sh
|
||||
@@ -36,7 +36,6 @@ install() {
|
||||
inst_simple -H "/etc/dhclient.conf"
|
||||
cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
|
||||
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
|
||||
- inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
||||
inst_hook cmdline 92 "$moddir/parse-ibft.sh"
|
||||
inst_hook cmdline 95 "$moddir/parse-vlan.sh"
|
||||
inst_hook cmdline 96 "$moddir/parse-bond.sh"
|
||||
diff --git a/modules.d/35network-legacy/dhcp-root.sh b/modules.d/40network/dhcp-root.sh
|
||||
similarity index 100%
|
||||
rename from modules.d/35network-legacy/dhcp-root.sh
|
||||
rename to modules.d/40network/dhcp-root.sh
|
||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||
index e8541636..8e2a74a3 100755
|
||||
--- a/modules.d/40network/module-setup.sh
|
||||
+++ b/modules.d/40network/module-setup.sh
|
||||
@@ -28,6 +28,7 @@ install() {
|
||||
inst_script "$moddir/netroot.sh" "/sbin/netroot"
|
||||
inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
|
||||
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
|
||||
+ inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
||||
|
||||
dracut_need_initqueue
|
||||
}
|
||||
|
|
@ -0,0 +1,620 @@
|
|||
From 4e10601254bb20891dc2919416d7151583678c3d Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 10 Jun 2019 16:04:18 +0200
|
||||
Subject: [PATCH] test: copy BONDBRIDGETEAMVLAN to IFCFG
|
||||
|
||||
The IFCFG test will make sure the network-legacy plugin keeps writing
|
||||
out correct ifcfg files.
|
||||
|
||||
This is a separate commit so that actual changes are visible in the
|
||||
following one.
|
||||
|
||||
(cherry picked from commit 70787ab61957741a05e4046bad49758c4e9bc1cc)
|
||||
---
|
||||
test/TEST-60-IFCFG/99-idesymlinks.rules | 8 +
|
||||
test/TEST-60-IFCFG/Makefile | 10 +
|
||||
test/TEST-60-IFCFG/client-init.sh | 22 +++
|
||||
test/TEST-60-IFCFG/dhcpd.conf | 27 +++
|
||||
test/TEST-60-IFCFG/exports | 1 +
|
||||
test/TEST-60-IFCFG/finished-false.sh | 2 +
|
||||
test/TEST-60-IFCFG/hard-off.sh | 3 +
|
||||
test/TEST-60-IFCFG/hosts | 5 +
|
||||
test/TEST-60-IFCFG/server-init.sh | 120 ++++++++++++
|
||||
test/TEST-60-IFCFG/test.sh | 336 ++++++++++++++++++++++++++++++++
|
||||
10 files changed, 534 insertions(+)
|
||||
|
||||
diff --git a/test/TEST-60-IFCFG/99-idesymlinks.rules b/test/TEST-60-IFCFG/99-idesymlinks.rules
|
||||
new file mode 100644
|
||||
index 00000000..d557790a
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/99-idesymlinks.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd"
|
||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}"
|
||||
diff --git a/test/TEST-60-IFCFG/Makefile b/test/TEST-60-IFCFG/Makefile
|
||||
new file mode 100644
|
||||
index 00000000..aad27059
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/Makefile
|
||||
@@ -0,0 +1,10 @@
|
||||
+all:
|
||||
+ @$(MAKE) -s --no-print-directory -C ../.. all
|
||||
+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all
|
||||
+setup:
|
||||
+ @$(MAKE) --no-print-directory -C ../.. all
|
||||
+ @basedir=../.. testdir=../ ./test.sh --setup
|
||||
+clean:
|
||||
+ @basedir=../.. testdir=../ ./test.sh --clean
|
||||
+run:
|
||||
+ @basedir=../.. testdir=../ ./test.sh --run
|
||||
diff --git a/test/TEST-60-IFCFG/client-init.sh b/test/TEST-60-IFCFG/client-init.sh
|
||||
new file mode 100755
|
||||
index 00000000..8c33ff0f
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/client-init.sh
|
||||
@@ -0,0 +1,22 @@
|
||||
+#!/bin/sh
|
||||
+exec >/dev/console 2>&1
|
||||
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
+strstr() { [ "${1#*$2*}" != "$1" ]; }
|
||||
+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
|
||||
+export TERM=linux
|
||||
+export PS1='initramfs-test:\w\$ '
|
||||
+stty sane
|
||||
+echo "made it to the rootfs! Powering down."
|
||||
+
|
||||
+(
|
||||
+ echo OK
|
||||
+ ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort
|
||||
+ for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do
|
||||
+ echo $i
|
||||
+ grep -v 'UUID=' $i
|
||||
+ done
|
||||
+ echo EOF
|
||||
+) > /dev/sda
|
||||
+
|
||||
+strstr "$CMDLINE" "rd.shell" && sh -i
|
||||
+poweroff -f
|
||||
diff --git a/test/TEST-60-IFCFG/dhcpd.conf b/test/TEST-60-IFCFG/dhcpd.conf
|
||||
new file mode 100644
|
||||
index 00000000..e26bd60b
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/dhcpd.conf
|
||||
@@ -0,0 +1,27 @@
|
||||
+ddns-update-style none;
|
||||
+
|
||||
+use-host-decl-names true;
|
||||
+
|
||||
+subnet 192.168.50.0 netmask 255.255.255.0 {
|
||||
+ option subnet-mask 255.255.255.0;
|
||||
+ option routers 192.168.50.1;
|
||||
+ next-server 192.168.50.1;
|
||||
+ server-identifier 192.168.50.1;
|
||||
+ option domain-name-servers 192.168.50.1;
|
||||
+ option domain-search "example.com";
|
||||
+ option domain-name "other.com";
|
||||
+ option root-path "nfs:192.168.50.1:/nfs/client";
|
||||
+ range 192.168.50.10 192.168.50.100;
|
||||
+}
|
||||
+
|
||||
+subnet 192.168.51.0 netmask 255.255.255.0 {
|
||||
+ option subnet-mask 255.255.255.0;
|
||||
+ option routers 192.168.51.1;
|
||||
+ next-server 192.168.51.1;
|
||||
+ server-identifier 192.168.51.1;
|
||||
+ option domain-name-servers 192.168.51.1;
|
||||
+ option domain-search "example.com";
|
||||
+ option domain-name "other.com";
|
||||
+ option root-path "nfs:192.168.51.1:/nfs/client";
|
||||
+ range 192.168.51.10 192.168.51.100;
|
||||
+}
|
||||
diff --git a/test/TEST-60-IFCFG/exports b/test/TEST-60-IFCFG/exports
|
||||
new file mode 100644
|
||||
index 00000000..ff5f29b1
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/exports
|
||||
@@ -0,0 +1 @@
|
||||
+/nfs/client 192.168.50.0/24(rw,insecure,no_subtree_check,no_root_squash)
|
||||
diff --git a/test/TEST-60-IFCFG/finished-false.sh b/test/TEST-60-IFCFG/finished-false.sh
|
||||
new file mode 100755
|
||||
index 00000000..ecdbef95
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/finished-false.sh
|
||||
@@ -0,0 +1,2 @@
|
||||
+#!/bin/sh
|
||||
+exit 1
|
||||
diff --git a/test/TEST-60-IFCFG/hard-off.sh b/test/TEST-60-IFCFG/hard-off.sh
|
||||
new file mode 100755
|
||||
index 00000000..12c3d5ac
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/hard-off.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/sh
|
||||
+getarg rd.shell || poweroff -f
|
||||
+getarg failme && poweroff -f
|
||||
diff --git a/test/TEST-60-IFCFG/hosts b/test/TEST-60-IFCFG/hosts
|
||||
new file mode 100644
|
||||
index 00000000..d02a4e9b
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/hosts
|
||||
@@ -0,0 +1,5 @@
|
||||
+127.0.0.1 localhost
|
||||
+192.168.50.1 server
|
||||
+192.168.50.100 client-if1
|
||||
+192.168.50.101 client-if2
|
||||
+192.168.50.102 client-if3
|
||||
diff --git a/test/TEST-60-IFCFG/server-init.sh b/test/TEST-60-IFCFG/server-init.sh
|
||||
new file mode 100755
|
||||
index 00000000..b9f01c9b
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/server-init.sh
|
||||
@@ -0,0 +1,120 @@
|
||||
+#!/bin/sh
|
||||
+exec </dev/console >/dev/console 2>&1
|
||||
+set -x
|
||||
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
+export TERM=linux
|
||||
+export PS1='nfstest-server:\w\$ '
|
||||
+stty sane
|
||||
+echo "made it to the rootfs!"
|
||||
+echo server > /proc/sys/kernel/hostname
|
||||
+
|
||||
+wait_for_if_link() {
|
||||
+ local cnt=0
|
||||
+ local li
|
||||
+ while [ $cnt -lt 600 ]; do
|
||||
+ li=$(ip -o link show dev $1 2>/dev/null)
|
||||
+ [ -n "$li" ] && return 0
|
||||
+ sleep 0.1
|
||||
+ cnt=$(($cnt+1))
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+wait_for_if_up() {
|
||||
+ local cnt=0
|
||||
+ local li
|
||||
+ while [ $cnt -lt 200 ]; do
|
||||
+ li=$(ip -o link show up dev $1)
|
||||
+ [ -n "$li" ] && return 0
|
||||
+ sleep 0.1
|
||||
+ cnt=$(($cnt+1))
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+wait_for_route_ok() {
|
||||
+ local cnt=0
|
||||
+ while [ $cnt -lt 200 ]; do
|
||||
+ li=$(ip route show)
|
||||
+ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0
|
||||
+ sleep 0.1
|
||||
+ cnt=$(($cnt+1))
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+linkup() {
|
||||
+ wait_for_if_link $1 2>/dev/null\
|
||||
+ && ip link set $1 up 2>/dev/null\
|
||||
+ && wait_for_if_up $1 2>/dev/null
|
||||
+}
|
||||
+
|
||||
+modprobe --all -b -q 8021q ipvlan macvlan
|
||||
+>/dev/watchdog
|
||||
+ip addr add 127.0.0.1/8 dev lo
|
||||
+linkup lo
|
||||
+ip link set dev eth0 name ens3
|
||||
+ip addr add 192.168.50.1/24 dev ens3
|
||||
+linkup ens3
|
||||
+>/dev/watchdog
|
||||
+ip link set dev eth1 name ens4
|
||||
+ip link add dev ens4.1 link ens4 type vlan id 1
|
||||
+ip link add dev ens4.2 link ens4 type vlan id 2
|
||||
+ip link add dev ens4.3 link ens4 type vlan id 3
|
||||
+ip link add dev ens4.4 link ens4 type vlan id 4
|
||||
+ip addr add 192.168.54.1/24 dev ens4.1
|
||||
+ip addr add 192.168.55.1/24 dev ens4.2
|
||||
+ip addr add 192.168.56.1/24 dev ens4.3
|
||||
+ip addr add 192.168.57.1/24 dev ens4.4
|
||||
+linkup ens4
|
||||
+ip link set dev ens4.1 up
|
||||
+ip link set dev ens4.2 up
|
||||
+ip link set dev ens4.3 up
|
||||
+ip link set dev ens4.4 up
|
||||
+ip link set dev eth2 name ens5
|
||||
+ip addr add 192.168.51.1/24 dev ens5
|
||||
+linkup ens5
|
||||
+ip link set dev eth3 name ens6
|
||||
+linkup ens6
|
||||
+>/dev/watchdog
|
||||
+modprobe af_packet
|
||||
+> /dev/watchdog
|
||||
+modprobe sunrpc
|
||||
+>/dev/watchdog
|
||||
+mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs
|
||||
+>/dev/watchdog
|
||||
+[ -x /sbin/portmap ] && portmap
|
||||
+>/dev/watchdog
|
||||
+mkdir -p /run/rpcbind
|
||||
+[ -x /sbin/rpcbind ] && rpcbind
|
||||
+>/dev/watchdog
|
||||
+modprobe nfsd
|
||||
+>/dev/watchdog
|
||||
+mount -t nfsd nfsd /proc/fs/nfsd
|
||||
+>/dev/watchdog
|
||||
+exportfs -r
|
||||
+>/dev/watchdog
|
||||
+rpc.nfsd
|
||||
+>/dev/watchdog
|
||||
+rpc.mountd
|
||||
+>/dev/watchdog
|
||||
+rpc.idmapd
|
||||
+>/dev/watchdog
|
||||
+exportfs -r
|
||||
+>/dev/watchdog
|
||||
+>/var/lib/dhcpd/dhcpd.leases
|
||||
+>/dev/watchdog
|
||||
+chmod 777 /var/lib/dhcpd/dhcpd.leases
|
||||
+>/dev/watchdog
|
||||
+dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ens3 ens5
|
||||
+#echo -n 'V' > /dev/watchdog
|
||||
+#sh -i
|
||||
+#tcpdump -i ens3
|
||||
+# Wait forever for the VM to die
|
||||
+echo "Serving NFS mounts"
|
||||
+while :; do
|
||||
+ sleep 10
|
||||
+ >/dev/watchdog
|
||||
+done
|
||||
+mount -n -o remount,ro /
|
||||
+poweroff -f
|
||||
diff --git a/test/TEST-60-IFCFG/test.sh b/test/TEST-60-IFCFG/test.sh
|
||||
new file mode 100755
|
||||
index 00000000..8c11a7d3
|
||||
--- /dev/null
|
||||
+++ b/test/TEST-60-IFCFG/test.sh
|
||||
@@ -0,0 +1,336 @@
|
||||
+#!/bin/bash
|
||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
+TEST_DESCRIPTION="root filesystem on NFS with bridging/bonding/vlan"
|
||||
+KVERSION=${KVERSION-$(uname -r)}
|
||||
+
|
||||
+# Uncomment this to debug failures
|
||||
+#DEBUGFAIL="rd.shell rd.break"
|
||||
+#DEBUGFAIL="rd.shell rd.break rd.debug"
|
||||
+#SERIAL="tcp:127.0.0.1:9999"
|
||||
+
|
||||
+run_server() {
|
||||
+ # Start server first
|
||||
+ echo "MULTINIC TEST SETUP: Starting DHCP/NFS server"
|
||||
+
|
||||
+ fsck -a "$TESTDIR"/server.ext3 || return 1
|
||||
+
|
||||
+ $testdir/run-qemu \
|
||||
+ -hda "$TESTDIR"/server.ext3 \
|
||||
+ -m 512M -smp 2 \
|
||||
+ -display none \
|
||||
+ -netdev socket,id=n0,listen=127.0.0.1:12370 \
|
||||
+ -netdev socket,id=n1,listen=127.0.0.1:12371 \
|
||||
+ -netdev socket,id=n2,listen=127.0.0.1:12372 \
|
||||
+ -netdev socket,id=n3,listen=127.0.0.1:12373 \
|
||||
+ -device e1000,netdev=n0,mac=52:54:01:12:34:56 \
|
||||
+ -device e1000,netdev=n1,mac=52:54:01:12:34:57 \
|
||||
+ -device e1000,netdev=n2,mac=52:54:01:12:34:58 \
|
||||
+ -device e1000,netdev=n3,mac=52:54:01:12:34:59 \
|
||||
+ ${SERIAL:+-serial "$SERIAL"} \
|
||||
+ ${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
||||
+ -watchdog i6300esb -watchdog-action poweroff \
|
||||
+ -no-reboot \
|
||||
+ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
|
||||
+ -initrd "$TESTDIR"/initramfs.server \
|
||||
+ -pidfile "$TESTDIR"/server.pid -daemonize || return 1
|
||||
+ chmod 644 -- "$TESTDIR"/server.pid || return 1
|
||||
+
|
||||
+ # Cleanup the terminal if we have one
|
||||
+ tty -s && stty sane
|
||||
+
|
||||
+ echo Sleeping 10 seconds to give the server a head start
|
||||
+ sleep 10
|
||||
+}
|
||||
+
|
||||
+client_test() {
|
||||
+ local test_name="$1"
|
||||
+ local do_vlan13="$2"
|
||||
+ local cmdline="$3"
|
||||
+ local check="$4"
|
||||
+ local CONF
|
||||
+
|
||||
+ echo "CLIENT TEST START: $test_name"
|
||||
+
|
||||
+ [ "$do_vlan13" != "yes" ] && unset do_vlan13
|
||||
+
|
||||
+ # Need this so kvm-qemu will boot (needs non-/dev/zero local disk)
|
||||
+ if ! dd if=/dev/zero of="$TESTDIR"/client.img bs=1M count=1; then
|
||||
+ echo "Unable to make client sda image" 1>&2
|
||||
+ return 1
|
||||
+ fi
|
||||
+ if [[ $do_vlan13 ]]; then
|
||||
+ nic1=" -netdev socket,connect=127.0.0.1:12371,id=n1"
|
||||
+ nic3=" -netdev socket,connect=127.0.0.1:12373,id=n3"
|
||||
+ else
|
||||
+ nic1=" -netdev hubport,id=n1,hubid=2"
|
||||
+ nic3=" -netdev hubport,id=n3,hubid=3"
|
||||
+ fi
|
||||
+
|
||||
+ if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then
|
||||
+ $testdir/run-qemu \
|
||||
+ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \
|
||||
+ -netdev socket,connect=127.0.0.1:12370,id=s1 \
|
||||
+ -netdev hubport,hubid=1,id=h1,netdev=s1 \
|
||||
+ -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \
|
||||
+ -netdev hubport,hubid=1,id=h3 -device e1000,mac=52:54:00:12:34:02,netdev=h3 \
|
||||
+ $nic1 -device e1000,mac=52:54:00:12:34:03,netdev=n1 \
|
||||
+ -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \
|
||||
+ $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \
|
||||
+ -watchdog i6300esb -watchdog-action poweroff \
|
||||
+ -no-reboot \
|
||||
+ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
||||
+ -initrd "$TESTDIR"/initramfs.testing
|
||||
+ else
|
||||
+ $testdir/run-qemu \
|
||||
+ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \
|
||||
+ -net socket,vlan=0,connect=127.0.0.1:12370 \
|
||||
+ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12371} \
|
||||
+ -net socket,vlan=2,connect=127.0.0.1:12372 \
|
||||
+ ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12373} \
|
||||
+ -net nic,vlan=0,macaddr=52:54:00:12:34:01,model=e1000 \
|
||||
+ -net nic,vlan=0,macaddr=52:54:00:12:34:02,model=e1000 \
|
||||
+ -net nic,vlan=1,macaddr=52:54:00:12:34:03,model=e1000 \
|
||||
+ -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \
|
||||
+ -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \
|
||||
+ -watchdog i6300esb -watchdog-action poweroff \
|
||||
+ -no-reboot \
|
||||
+ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
||||
+ -initrd "$TESTDIR"/initramfs.testing
|
||||
+ fi
|
||||
+
|
||||
+ {
|
||||
+ read OK
|
||||
+ if [[ "$OK" != "OK" ]]; then
|
||||
+ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
+ while read line; do
|
||||
+ [[ $line == END ]] && break
|
||||
+ CONF+="$line "
|
||||
+ done
|
||||
+ } < "$TESTDIR"/client.img || return 1
|
||||
+
|
||||
+ if [[ "$check" != "$CONF" ]]; then
|
||||
+ echo "Expected: '$check'"
|
||||
+ echo
|
||||
+ echo
|
||||
+ echo "Got: '$CONF'"
|
||||
+ echo "CLIENT TEST END: $test_name [FAILED - BAD CONF]"
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
+ echo "CLIENT TEST END: $test_name [OK]"
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+
|
||||
+test_run() {
|
||||
+ if ! run_server; then
|
||||
+ echo "Failed to start server" 1>&2
|
||||
+ return 1
|
||||
+ fi
|
||||
+ test_client || { kill_server; return 1; }
|
||||
+}
|
||||
+
|
||||
+test_client() {
|
||||
+ client_test "Multiple VLAN" \
|
||||
+ "yes" \
|
||||
+ "
|
||||
+vlan=vlan0001:ens5
|
||||
+vlan=vlan2:ens5
|
||||
+vlan=ens5.3:ens5
|
||||
+vlan=ens5.0004:ens5
|
||||
+ip=ens3:dhcp
|
||||
+ip=192.168.54.101::192.168.54.1:24:test:vlan0001:none
|
||||
+ip=192.168.55.102::192.168.55.1:24:test:vlan2:none
|
||||
+ip=192.168.56.103::192.168.56.1:24:test:ens5.3:none
|
||||
+ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none
|
||||
+rd.neednet=1
|
||||
+root=nfs:192.168.50.1:/nfs/client bootdev=ens3
|
||||
+" \
|
||||
+ 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \
|
||||
+ || return 1
|
||||
+
|
||||
+ client_test "Multiple Bonds" \
|
||||
+ "yes" \
|
||||
+ "
|
||||
+bond=bond0:ens4,ens5
|
||||
+bond=bond1:ens6,ens7
|
||||
+ip=bond0:dhcp
|
||||
+ip=bond1:dhcp
|
||||
+rd.neednet=1
|
||||
+root=nfs:192.168.50.1:/nfs/client bootdev=bond0
|
||||
+" \
|
||||
+ 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \
|
||||
+ || return 1
|
||||
+
|
||||
+ client_test "Multiple Bridges" \
|
||||
+ "no" \
|
||||
+ "
|
||||
+bridge=br0:ens4,ens5
|
||||
+bridge=br1:ens6,ens7
|
||||
+ip=br0:dhcp
|
||||
+ip=br1:dhcp
|
||||
+rd.neednet=1
|
||||
+root=nfs:192.168.50.1:/nfs/client bootdev=br0
|
||||
+" \
|
||||
+ 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \
|
||||
+ || return 1
|
||||
+
|
||||
+ kill_server
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+test_setup() {
|
||||
+ # Make server root
|
||||
+ dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120
|
||||
+ mke2fs -j -F -- "$TESTDIR"/server.ext3
|
||||
+ mkdir -- "$TESTDIR"/mnt
|
||||
+ mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
|
||||
+ kernel=$KVERSION
|
||||
+ (
|
||||
+ export initdir="$TESTDIR"/mnt
|
||||
+ . "$basedir"/dracut-init.sh
|
||||
+
|
||||
+ (
|
||||
+ cd "$initdir";
|
||||
+ mkdir -p -- dev sys proc run etc var/run tmp var/lib/{dhcpd,rpcbind}
|
||||
+ mkdir -p -- var/lib/nfs/{v4recovery,rpc_pipefs}
|
||||
+ chmod 777 -- var/lib/rpcbind var/lib/nfs
|
||||
+ )
|
||||
+
|
||||
+ for _f in modules.builtin.bin modules.builtin; do
|
||||
+ [[ $srcmods/$_f ]] && break
|
||||
+ done || {
|
||||
+ dfatal "No modules.builtin.bin and modules.builtin found!"
|
||||
+ return 1
|
||||
+ }
|
||||
+
|
||||
+ for _f in modules.builtin.bin modules.builtin modules.order; do
|
||||
+ [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f"
|
||||
+ done
|
||||
+
|
||||
+ inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
|
||||
+ dmesg mkdir cp ping exportfs \
|
||||
+ modprobe rpc.nfsd rpc.mountd showmount tcpdump \
|
||||
+ /etc/services sleep mount chmod
|
||||
+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
+ [ -f "${_terminfodir}"/l/linux ] && break
|
||||
+ done
|
||||
+ inst_multiple -o "${_terminfodir}"/l/linux
|
||||
+ type -P portmap >/dev/null && inst_multiple portmap
|
||||
+ type -P rpcbind >/dev/null && inst_multiple rpcbind
|
||||
+ [ -f /etc/netconfig ] && inst_multiple /etc/netconfig
|
||||
+ type -P dhcpd >/dev/null && inst_multiple dhcpd
|
||||
+ [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
||||
+ instmods nfsd sunrpc ipv6 lockd af_packet 8021q ipvlan macvlan
|
||||
+ inst_simple /etc/os-release
|
||||
+ inst ./server-init.sh /sbin/init
|
||||
+ inst ./hosts /etc/hosts
|
||||
+ inst ./exports /etc/exports
|
||||
+ inst ./dhcpd.conf /etc/dhcpd.conf
|
||||
+ inst_multiple /etc/nsswitch.conf /etc/rpc /etc/protocols
|
||||
+
|
||||
+ inst_multiple rpc.idmapd /etc/idmapd.conf
|
||||
+
|
||||
+ inst_libdir_file 'libnfsidmap_nsswitch.so*'
|
||||
+ inst_libdir_file 'libnfsidmap/*.so*'
|
||||
+ inst_libdir_file 'libnfsidmap*.so*'
|
||||
+
|
||||
+ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
|
||||
+ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
|
||||
+ _nsslibs=${_nsslibs#|}
|
||||
+ _nsslibs=${_nsslibs%|}
|
||||
+
|
||||
+ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
|
||||
+
|
||||
+ inst /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
+ inst /etc/passwd /etc/passwd
|
||||
+ inst /etc/group /etc/group
|
||||
+
|
||||
+ cp -a -- /etc/ld.so.conf* "$initdir"/etc
|
||||
+ ldconfig -r "$initdir"
|
||||
+ dracut_kernel_post
|
||||
+ )
|
||||
+
|
||||
+ # Make client root inside server root
|
||||
+ (
|
||||
+ export initdir="$TESTDIR"/mnt/nfs/client
|
||||
+ . "$basedir"/dracut-init.sh
|
||||
+ inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
||||
+ mount dmesg mkdir cp ping grep ls sort
|
||||
+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
+ [[ -f ${_terminfodir}/l/linux ]] && break
|
||||
+ done
|
||||
+ inst_multiple -o "${_terminfodir}"/l/linux
|
||||
+ inst_simple /etc/os-release
|
||||
+ inst ./client-init.sh /sbin/init
|
||||
+ (
|
||||
+ cd "$initdir"
|
||||
+ mkdir -p -- dev sys proc etc run
|
||||
+ mkdir -p -- var/lib/nfs/rpc_pipefs
|
||||
+ )
|
||||
+ inst /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
+ inst /etc/passwd /etc/passwd
|
||||
+ inst /etc/group /etc/group
|
||||
+
|
||||
+ inst_multiple rpc.idmapd /etc/idmapd.conf
|
||||
+ inst_libdir_file 'libnfsidmap_nsswitch.so*'
|
||||
+ inst_libdir_file 'libnfsidmap/*.so*'
|
||||
+ inst_libdir_file 'libnfsidmap*.so*'
|
||||
+
|
||||
+ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' -- /etc/nsswitch.conf \
|
||||
+ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
|
||||
+ _nsslibs=${_nsslibs#|}
|
||||
+ _nsslibs=${_nsslibs%|}
|
||||
+
|
||||
+ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
|
||||
+
|
||||
+ cp -a -- /etc/ld.so.conf* "$initdir"/etc
|
||||
+ ldconfig -r "$initdir"
|
||||
+ )
|
||||
+
|
||||
+ umount "$TESTDIR"/mnt
|
||||
+ rm -fr -- "$TESTDIR"/mnt
|
||||
+
|
||||
+ # Make an overlay with needed tools for the test harness
|
||||
+ (
|
||||
+ export initdir="$TESTDIR"/overlay
|
||||
+ . "$basedir"/dracut-init.sh
|
||||
+ inst_multiple poweroff shutdown
|
||||
+ inst_hook emergency 000 ./hard-off.sh
|
||||
+ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
||||
+ )
|
||||
+
|
||||
+ # Make server's dracut image
|
||||
+ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
|
||||
+ --no-early-microcode \
|
||||
+ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \
|
||||
+ -d "ipvlan macvlan af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \
|
||||
+ --no-hostonly-cmdline -N \
|
||||
+ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1
|
||||
+
|
||||
+ # Make client's dracut image
|
||||
+ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
|
||||
+ --no-early-microcode \
|
||||
+ -o "plymouth" \
|
||||
+ -a "debug" \
|
||||
+ -d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \
|
||||
+ --no-hostonly-cmdline -N \
|
||||
+ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
|
||||
+}
|
||||
+
|
||||
+kill_server() {
|
||||
+ if [[ -s "$TESTDIR"/server.pid ]]; then
|
||||
+ kill -TERM -- $(cat "$TESTDIR"/server.pid)
|
||||
+ rm -f -- "$TESTDIR"/server.pid
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+test_cleanup() {
|
||||
+ kill_server
|
||||
+}
|
||||
+
|
||||
+. "$testdir"/test-functions
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
From 3b89c398895abe5fc62e3c9240718310222925ef Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 10 Jun 2019 16:04:33 +0200
|
||||
Subject: [PATCH] test/IFCFG: make sure the network-legacy plugin is being used
|
||||
|
||||
If the network-manager plugin is used instead, it wouldn't write out
|
||||
ifcfg files and we wouldn't have anything to check.
|
||||
|
||||
While at that, also enable the test.
|
||||
|
||||
(cherry picked from commit 2b1b3bcdcb0ddaa18337f18da515adb6284df0ab)
|
||||
---
|
||||
.travis.yml | 1 +
|
||||
README.md | 1 +
|
||||
test/TEST-60-IFCFG/test.sh | 2 +-
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.travis.yml b/.travis.yml
|
||||
index 364078cf..37002e9a 100644
|
||||
--- a/.travis.yml
|
||||
+++ b/.travis.yml
|
||||
@@ -11,6 +11,7 @@ env:
|
||||
- IMAGE=latest TESTS=50
|
||||
- IMAGE=latest TESTS=30
|
||||
- IMAGE=latest TESTS=31
|
||||
+ - IMAGE=latest TESTS=60
|
||||
- IMAGE=latest TESTS=70
|
||||
- IMAGE=latest TESTS=99
|
||||
- IMAGE=latest TESTS=02
|
||||
diff --git a/README.md b/README.md
|
||||
index 36ae7e1b..530f1c1b 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -27,4 +27,5 @@ dracut is an initramfs infrastructure.
|
||||
- Test 31: [![Test 31](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/)
|
||||
- Test 40: [![Test 40](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/)
|
||||
- Test 50: [![Test 50](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/)
|
||||
+- Test 60: [![Test 60](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/)
|
||||
- Test 70: [![Test 70](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/)
|
||||
diff --git a/test/TEST-60-IFCFG/test.sh b/test/TEST-60-IFCFG/test.sh
|
||||
index 8c11a7d3..8e8bd982 100755
|
||||
--- a/test/TEST-60-IFCFG/test.sh
|
||||
+++ b/test/TEST-60-IFCFG/test.sh
|
||||
@@ -316,7 +316,7 @@ test_setup() {
|
||||
$basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
|
||||
--no-early-microcode \
|
||||
-o "plymouth" \
|
||||
- -a "debug" \
|
||||
+ -a "debug network-legacy" \
|
||||
-d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \
|
||||
--no-hostonly-cmdline -N \
|
||||
-f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
From 15ff303dde65e97ba224a9f2cc6275cbaafee52c Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 10 Jun 2019 16:05:23 +0200
|
||||
Subject: [PATCH] test/BONDBRIDGETEAMVLAN: don't assert against ifcfg files
|
||||
|
||||
The network-manager module writes keyfiles instead of ifcfg files. Just
|
||||
check whether the configuration got actually applied correctly.
|
||||
|
||||
(cherry picked from commit 9dfd73bcbd899d8da4bc680fa8b3326c47b939bd)
|
||||
---
|
||||
test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh | 6 +-----
|
||||
test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 12 ++++++------
|
||||
2 files changed, 7 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh
|
||||
index 8c33ff0f..083e0f59 100755
|
||||
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh
|
||||
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh
|
||||
@@ -10,11 +10,7 @@ echo "made it to the rootfs! Powering down."
|
||||
|
||||
(
|
||||
echo OK
|
||||
- ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort
|
||||
- for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do
|
||||
- echo $i
|
||||
- grep -v 'UUID=' $i
|
||||
- done
|
||||
+ ip -o -4 address show scope global |sed -n 's/^[^:]*: \([^ ]*\) *\(.*\) scope.*/\1 \2/p' |sort
|
||||
echo EOF
|
||||
) > /dev/sda
|
||||
|
||||
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
||||
index 5618baee..b6dd080c 100755
|
||||
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
||||
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
||||
@@ -112,8 +112,8 @@ client_test() {
|
||||
done
|
||||
} < "$TESTDIR"/client.img || return 1
|
||||
|
||||
- if [[ "$check" != "$CONF" ]]; then
|
||||
- echo "Expected: '$check'"
|
||||
+ if [[ ! "$CONF" =~ ^$check$ ]]; then
|
||||
+ echo "Expected: /^$check\$/"
|
||||
echo
|
||||
echo
|
||||
echo "Got: '$CONF'"
|
||||
@@ -150,7 +150,7 @@ ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none
|
||||
rd.neednet=1
|
||||
root=nfs:192.168.50.1:/nfs/client bootdev=ens3
|
||||
" \
|
||||
- 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \
|
||||
+ 'ens3 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 ens5\.0004 inet 192\.168\.57\.104/24 brd 192\.168\.57\.255 ens5\.3 inet 192\.168\.56\.103/24 brd 192\.168\.56\.255 vlan0001 inet 192\.168\.54\.101/24 brd 192\.168\.54\.255 vlan2 inet 192\.168\.55\.102/24 brd 192\.168\.55\.255 EOF ' \
|
||||
|| return 1
|
||||
|
||||
client_test "Multiple Bonds" \
|
||||
@@ -163,7 +163,7 @@ ip=bond1:dhcp
|
||||
rd.neednet=1
|
||||
root=nfs:192.168.50.1:/nfs/client bootdev=bond0
|
||||
" \
|
||||
- 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \
|
||||
+ 'bond0 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 bond1 inet 192\.168\.51\.[0-9]*/24 brd 192\.168\.51\.255 EOF ' \
|
||||
|| return 1
|
||||
|
||||
client_test "Multiple Bridges" \
|
||||
@@ -176,7 +176,7 @@ ip=br1:dhcp
|
||||
rd.neednet=1
|
||||
root=nfs:192.168.50.1:/nfs/client bootdev=br0
|
||||
" \
|
||||
- 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \
|
||||
+ 'br0 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 br1 inet 192\.168\.51\.[0-9]*/24 brd 192\.168\.51\.255 EOF ' \
|
||||
|| return 1
|
||||
|
||||
kill_server
|
||||
@@ -260,7 +260,7 @@ test_setup() {
|
||||
export initdir="$TESTDIR"/mnt/nfs/client
|
||||
. "$basedir"/dracut-init.sh
|
||||
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
||||
- mount dmesg mkdir cp ping grep ls sort
|
||||
+ mount dmesg mkdir cp ping grep ls sort sed
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
[[ -f ${_terminfodir}/l/linux ]] && break
|
||||
done
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From 96976e84e2c8544ab32026f05da8a35b9c48b2e5 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 10 Jun 2019 16:05:49 +0200
|
||||
Subject: [PATCH] test/MULTINIC: correctly note activated devices when using
|
||||
network-manager
|
||||
|
||||
The .did-setup files are not there. What is there is the NetworkManager
|
||||
connection files.
|
||||
|
||||
(cherry picked from commit 393fb1ac05ec3386a07d885e99985a647634803e)
|
||||
---
|
||||
test/TEST-50-MULTINIC/client-init.sh | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh
|
||||
index 529379f0..7099dcf3 100755
|
||||
--- a/test/TEST-50-MULTINIC/client-init.sh
|
||||
+++ b/test/TEST-50-MULTINIC/client-init.sh
|
||||
@@ -105,7 +105,17 @@ export TERM=linux
|
||||
export PS1='initramfs-test:\w\$ '
|
||||
stty sane
|
||||
echo "made it to the rootfs! Powering down."
|
||||
+for i in /sys/class/net/*/
|
||||
+do
|
||||
+ # booting with network-manager module
|
||||
+ state=/run/NetworkManager/devices/$(cat $i/ifindex)
|
||||
+ grep -q connection-uuid= $state 2>/dev/null || continue
|
||||
+ i=${i##*/}
|
||||
+ ip link show $i |grep -q master && continue
|
||||
+ IFACES+="$i "
|
||||
+done
|
||||
for i in /run/initramfs/net.*.did-setup; do
|
||||
+ # booting with network-legacy module
|
||||
[ -f "$i" ] || continue
|
||||
strglobin "$i" ":*:*:*:*:" && continue
|
||||
i=${i%.did-setup}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
From 08961eef2ad09e4ce38ee034baf4e8c2b3934cd1 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 3 Sep 2019 10:44:36 -0500
|
||||
Subject: [PATCH] modules.d: fix udev rules detection of multipath devices
|
||||
|
||||
Starting with the 0.7.7 release of the multipath tools, the multipath
|
||||
udev rules always set a value in ENV{DM_MULTIPATH_DEVICE_PATH} for any
|
||||
device that multipath scans. A value of 0 means that the device is not
|
||||
claimed by multipath, and a value of 1 means that it is. Because of
|
||||
this, udev rules that check ENV{DM_MULTIPATH_DEVICE_PATH}=="?*" will
|
||||
always return True, and act as if every scanned device is claimed by
|
||||
multipath. Checking ENV{DM_MULTIPATH_DEVICE_PATH}=="1" will work
|
||||
correctly for both the old and new versions of the multipath tools.
|
||||
---
|
||||
modules.d/90dm/59-persistent-storage-dm.rules | 2 +-
|
||||
modules.d/90dmraid/61-dmraid-imsm.rules | 2 +-
|
||||
modules.d/90lvm/64-lvm.rules | 2 +-
|
||||
modules.d/90mdraid/59-persistent-storage-md.rules | 2 +-
|
||||
modules.d/90mdraid/65-md-incremental-imsm.rules | 2 +-
|
||||
modules.d/95udev-rules/59-persistent-storage.rules | 2 +-
|
||||
modules.d/95udev-rules/61-persistent-storage.rules | 2 +-
|
||||
7 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90dm/59-persistent-storage-dm.rules b/modules.d/90dm/59-persistent-storage-dm.rules
|
||||
index 73b09376..2be11227 100644
|
||||
--- a/modules.d/90dm/59-persistent-storage-dm.rules
|
||||
+++ b/modules.d/90dm/59-persistent-storage-dm.rules
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM!="block", GOTO="dm_end"
|
||||
ACTION!="add|change", GOTO="dm_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
|
||||
|
||||
KERNEL!="dm-[0-9]*", GOTO="dm_end"
|
||||
ACTION=="add", GOTO="dm_end"
|
||||
diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules
|
||||
index 72267d3c..8a6b215e 100644
|
||||
--- a/modules.d/90dmraid/61-dmraid-imsm.rules
|
||||
+++ b/modules.d/90dmraid/61-dmraid-imsm.rules
|
||||
@@ -5,7 +5,7 @@
|
||||
SUBSYSTEM!="block", GOTO="dm_end"
|
||||
ACTION!="add|change", GOTO="dm_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
|
||||
|
||||
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end"
|
||||
|
||||
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
|
||||
index 3ce0c1f6..65f65249 100644
|
||||
--- a/modules.d/90lvm/64-lvm.rules
|
||||
+++ b/modules.d/90lvm/64-lvm.rules
|
||||
@@ -7,7 +7,7 @@
|
||||
SUBSYSTEM!="block", GOTO="lvm_end"
|
||||
ACTION!="add|change", GOTO="lvm_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
|
||||
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
|
||||
ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end"
|
||||
|
||||
diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules
|
||||
index 6ef858aa..96b10108 100644
|
||||
--- a/modules.d/90mdraid/59-persistent-storage-md.rules
|
||||
+++ b/modules.d/90mdraid/59-persistent-storage-md.rules
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM!="block", GOTO="md_end"
|
||||
ACTION!="add|change", GOTO="md_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
|
||||
|
||||
KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end"
|
||||
|
||||
diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules
|
||||
index d66dd012..52f5b195 100644
|
||||
--- a/modules.d/90mdraid/65-md-incremental-imsm.rules
|
||||
+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules
|
||||
@@ -9,7 +9,7 @@ KERNEL=="md*", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_end"
|
||||
KERNEL=="md*", ACTION!="change", GOTO="md_end"
|
||||
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
|
||||
|
||||
ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try"
|
||||
GOTO="md_end"
|
||||
diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules
|
||||
index 47ff6edd..8d8650f7 100644
|
||||
--- a/modules.d/95udev-rules/59-persistent-storage.rules
|
||||
+++ b/modules.d/95udev-rules/59-persistent-storage.rules
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM!="block", GOTO="ps_end"
|
||||
ACTION!="add|change", GOTO="ps_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="ps_end"
|
||||
|
||||
KERNEL=="cciss[0-9]*", IMPORT BLKID
|
||||
KERNEL=="nbd[0-9]*", IMPORT BLKID
|
||||
diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules
|
||||
index 37148b07..895ecebd 100644
|
||||
--- a/modules.d/95udev-rules/61-persistent-storage.rules
|
||||
+++ b/modules.d/95udev-rules/61-persistent-storage.rules
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM!="block", GOTO="pss_end"
|
||||
ACTION!="add|change", GOTO="pss_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end"
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="pss_end"
|
||||
|
||||
ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss"
|
||||
KERNEL=="cciss[0-9]*", GOTO="do_pss"
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From b59ae228851713f645751742136e34b854b0712a Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 10 Nov 2016 13:57:26 +0100
|
||||
Subject: [PATCH] test/test-rpms.txt: add list of rpms to install
|
||||
|
||||
(cherry picked from commit f432d367fc4fa7558761cb9bb4229e6c027bfa31)
|
||||
---
|
||||
test/test-rpms.txt | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
||||
new file mode 100644
|
||||
index 00000000..1723d8e9
|
||||
--- /dev/null
|
||||
+++ b/test/test-rpms.txt
|
||||
@@ -0,0 +1,26 @@
|
||||
+dash
|
||||
+bridge-utils
|
||||
+asciidoc
|
||||
+mdadm
|
||||
+lvm2
|
||||
+dmraid
|
||||
+cryptsetup
|
||||
+nfs-utils
|
||||
+nbd
|
||||
+dhcp-server
|
||||
+scsi-target-utils
|
||||
+iscsi-initiator-utils
|
||||
+net-tools
|
||||
+strace
|
||||
+syslinux
|
||||
+python-imgcreate
|
||||
+genisoimage
|
||||
+btrfs-progs
|
||||
+bridge-utils
|
||||
+kmod-devel
|
||||
+gcc
|
||||
+bzip2
|
||||
+xz
|
||||
+tar
|
||||
+wget
|
||||
+rpm-build
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From 4ef5cdc120bdbb348345c964a19affbb3ca1fa32 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 11 Nov 2016 11:40:58 +0100
|
||||
Subject: [PATCH] test/test-rpms.txt: add gzip
|
||||
|
||||
(cherry picked from commit 7b4173d698be5163da1e5b5b52bafd2facba4db5)
|
||||
---
|
||||
test/test-rpms.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
||||
index 1723d8e9..10596da7 100644
|
||||
--- a/test/test-rpms.txt
|
||||
+++ b/test/test-rpms.txt
|
||||
@@ -19,6 +19,7 @@ btrfs-progs
|
||||
bridge-utils
|
||||
kmod-devel
|
||||
gcc
|
||||
+gzip
|
||||
bzip2
|
||||
xz
|
||||
tar
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From fe44aa1b14f427245bdfb2026f2211a19b52f5e3 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 11 Nov 2016 12:34:00 +0100
|
||||
Subject: [PATCH] test-rpms.txt: add dhcp
|
||||
|
||||
(cherry picked from commit a081e072d894c91fcf037e267cb6793c4b0356c4)
|
||||
---
|
||||
test/test-rpms.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
||||
index 10596da7..95376bd2 100644
|
||||
--- a/test/test-rpms.txt
|
||||
+++ b/test/test-rpms.txt
|
||||
@@ -8,6 +8,7 @@ cryptsetup
|
||||
nfs-utils
|
||||
nbd
|
||||
dhcp-server
|
||||
+dhcp
|
||||
scsi-target-utils
|
||||
iscsi-initiator-utils
|
||||
net-tools
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
From 81babdedec8c6f7b23bbf0e3418126c4f9e5e15f Mon Sep 17 00:00:00 2001
|
||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||||
Date: Tue, 10 Sep 2019 16:46:55 +0200
|
||||
Subject: [PATCH] test-rpms.txt: add util-linux into the dependency list
|
||||
|
||||
---
|
||||
test/test-rpms.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
||||
index 95376bd2..02577c8a 100644
|
||||
--- a/test/test-rpms.txt
|
||||
+++ b/test/test-rpms.txt
|
||||
@@ -26,3 +26,4 @@ xz
|
||||
tar
|
||||
wget
|
||||
rpm-build
|
||||
+util-linux
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 7843bc52777683f6a4ef953d8dde7171ff3b911c Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Wed, 24 Jul 2019 16:45:19 +0200
|
||||
Subject: [PATCH] [RHEL] network: default to network-legacy even in presence of
|
||||
nm-initrd-generator
|
||||
|
||||
In RHEL 8.2, NetworkManager will ship with the nm-initrd-generator, but
|
||||
before the install bits fall into place we want to default to network-legacy.
|
||||
|
||||
This unblocks the enablement of the NetworkManager bits and is intended
|
||||
to be reverted later on.
|
||||
---
|
||||
modules.d/40network/module-setup.sh | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||
index 8e2a74a3..bf252eb7 100755
|
||||
--- a/modules.d/40network/module-setup.sh
|
||||
+++ b/modules.d/40network/module-setup.sh
|
||||
@@ -8,9 +8,9 @@ check() {
|
||||
# called by dracut
|
||||
depends() {
|
||||
echo -n "kernel-network-modules "
|
||||
- if ! dracut_module_included "network-legacy" && [ -x "/usr/libexec/nm-initrd-generator" ] ; then
|
||||
- echo "network-manager"
|
||||
- else
|
||||
+ # RHEL 8.1: Default to network-legacy unless the user chose
|
||||
+ # network-manager manually
|
||||
+ if ! dracut_module_included "network-manager" ; then
|
||||
echo "network-legacy"
|
||||
fi
|
||||
return 0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue