From 7edd880e5fa5ba91abd67de2ad64dbcb24f851cb Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 27 Mar 2025 13:08:26 +0000 Subject: [PATCH] import CS dracut-105-4.el10 --- .dracut.metadata | 1 - .gitignore | 2 +- ...ll.d-correctly-install-pre-genned-im.patch | 238 ++++ ...all-do-nothing-when-KERNEL_INSTALL_I.patch | 72 ++ ...ll-do-not-generate-an-initrd-when-on.patch | 39 + ...ume-always-include-the-resume-module.patch | 51 + ...ect-ownership-and-permissions-for-st.patch | 39 + ....sh-give-force-add-precedence-over-o.patch | 44 + ...h-look-for-initrd-in-usr-lib-modules.patch | 38 + ...-include-fips-module-unconditionally.patch | 28 + ...password-do-not-half-install-systemd.patch | 39 + 0010-fix-pcsc-add-libpcsclite_real.so.patch | 37 + ...escue-make-rescue-always-no-hostonly.patch | 30 + ...x-dracut-install-initize-fts-pointer.patch | 26 + 0013-feat-add-openssl-module.patch | 1021 ++++++++++++++++ ...fix-openssl-harden-ossl-build-CFLAGS.patch | 26 + ...-copy-executables-for-the-test-suite.patch | 85 ++ ...e-create-hmac-file-for-rescue-kernel.patch | 35 + SOURCES/0001.patch | 53 - SOURCES/0002.patch | 28 - SOURCES/0003.patch | 44 - SOURCES/0004.patch | 34 - SOURCES/0005.patch | 34 - SOURCES/0006.patch | 46 - SOURCES/0007.patch | 41 - SOURCES/0008.patch | 38 - SOURCES/0009.patch | 30 - SOURCES/0010.patch | 26 - SOURCES/0011.patch | 40 - SOURCES/0012.patch | 86 -- SOURCES/0013.patch | 51 - SOURCES/0014.patch | 49 - SOURCES/0015.patch | 24 - SOURCES/0016.patch | 86 -- SOURCES/0017.patch | 22 - SOURCES/0018.patch | 49 - SOURCES/0019.patch | 71 -- SOURCES/0020.patch | 94 -- SOURCES/0021.patch | 94 -- SOURCES/0022.patch | 36 - SOURCES/0023.patch | 34 - SOURCES/0024.patch | 36 - SOURCES/0025.patch | 26 - SOURCES/0026.patch | 38 - SOURCES/0027.patch | 25 - SOURCES/0028.patch | 98 -- SOURCES/0029.patch | 79 -- SOURCES/0030.patch | 24 - SOURCES/0031.patch | 43 - SOURCES/0032.patch | 66 -- SOURCES/0033.patch | 346 ------ SOURCES/0034.patch | 229 ---- SOURCES/0035.patch | 27 - SOURCES/0036.patch | 27 - SOURCES/0037.patch | 53 - SOURCES/0038.patch | 31 - SOURCES/0039.patch | 24 - SOURCES/0040.patch | 24 - SOURCES/0041.patch | 30 - SOURCES/0042.patch | 43 - SOURCES/0043.patch | 620 ---------- SOURCES/0044.patch | 53 - SOURCES/0045.patch | 83 -- SOURCES/0046.patch | 37 - SOURCES/0047.patch | 115 -- SOURCES/0048.patch | 43 - SOURCES/0049.patch | 23 - SOURCES/0050.patch | 23 - SOURCES/0051.patch | 19 - SOURCES/0052.patch | 33 - SOURCES/0053.patch | 32 - SOURCES/0054.patch | 33 - SOURCES/0055.patch | 26 - SOURCES/0056.patch | 34 - SOURCES/0057.patch | 25 - SOURCES/0058.patch | 44 - SOURCES/0059.patch | 58 - SOURCES/0060.patch | 31 - SOURCES/0061.patch | 31 - SOURCES/0062.patch | 26 - SOURCES/0063.patch | 31 - SOURCES/0064.patch | 39 - SOURCES/0065.patch | 32 - SOURCES/0066.patch | 36 - SOURCES/0067.patch | 45 - SOURCES/0068.patch | 37 - SOURCES/0069.patch | 59 - SOURCES/0070.patch | 38 - SOURCES/0071.patch | 47 - SOURCES/0072.patch | 49 - SOURCES/0073.patch | 32 - SOURCES/0074.patch | 33 - SOURCES/0075.patch | 426 ------- SOURCES/0076.patch | 320 ----- SOURCES/0077.patch | 35 - SOURCES/0078.patch | 108 -- SOURCES/0079.patch | 30 - SOURCES/0080.patch | 93 -- SOURCES/0081.patch | 63 - SOURCES/0082.patch | 33 - SOURCES/0083.patch | 37 - SOURCES/0084.patch | 42 - SOURCES/0085.patch | 72 -- SOURCES/0086.patch | 79 -- SOURCES/0087.patch | 82 -- SOURCES/0088.patch | 34 - SOURCES/0089.patch | 25 - SOURCES/0090.patch | 79 -- SOURCES/0091.patch | 50 - SOURCES/0092.patch | 55 - SOURCES/0093.patch | 43 - SOURCES/0094.patch | 28 - SOURCES/0095.patch | 31 - SOURCES/0096.patch | 167 --- SOURCES/0097.patch | 104 -- SOURCES/0098.patch | 66 -- SOURCES/0099.patch | 43 - SOURCES/0100.patch | 33 - SOURCES/0101.patch | 29 - SOURCES/0102.patch | 25 - SOURCES/0103.patch | 26 - SOURCES/0104.patch | 29 - SOURCES/0105.patch | 25 - SOURCES/0106.patch | 30 - SOURCES/0107.patch | 32 - SOURCES/0108.patch | 225 ---- SOURCES/0109.patch | 26 - SOURCES/0110.patch | 39 - SOURCES/0111.patch | 39 - SOURCES/0112.patch | 34 - SOURCES/0113.patch | 37 - SOURCES/0114.patch | 27 - SOURCES/0115.patch | 47 - SOURCES/0116.patch | 29 - SOURCES/0117.patch | 39 - SOURCES/0118.patch | 36 - SOURCES/0119.patch | 27 - SOURCES/0120.patch | 87 -- SOURCES/0121.patch | 42 - SOURCES/0122.patch | 252 ---- SOURCES/0123.patch | 71 -- SOURCES/0124.patch | 161 --- SOURCES/0125.patch | 28 - SOURCES/0126.patch | 30 - SOURCES/0127.patch | 100 -- SOURCES/0128.patch | 35 - SOURCES/0129.patch | 26 - SOURCES/0130.patch | 46 - SOURCES/0131.patch | 31 - SOURCES/0132.patch | 30 - SOURCES/0133.patch | 27 - SOURCES/0134.patch | 43 - SOURCES/0135.patch | 116 -- SOURCES/0136.patch | 60 - SOURCES/0137.patch | 26 - SOURCES/0138.patch | 33 - SOURCES/0139.patch | 74 -- SOURCES/0140.patch | 36 - SOURCES/0141.patch | 52 - SOURCES/0142.patch | 36 - SOURCES/0143.patch | 89 -- SOURCES/0144.patch | 48 - SOURCES/0145.patch | 43 - SOURCES/0146.patch | 63 - SOURCES/0147.patch | 170 --- SOURCES/0148.patch | 35 - SOURCES/0149.patch | 32 - SOURCES/0150.patch | 55 - SOURCES/0151.patch | 24 - SOURCES/0152.patch | 75 -- SOURCES/0153.patch | 33 - SOURCES/0154.patch | 36 - SOURCES/0155.patch | 56 - SOURCES/0156.patch | 159 --- SOURCES/0157.patch | 141 --- SOURCES/0158.patch | 58 - SOURCES/0159.patch | 35 - SOURCES/0160.patch | 29 - SOURCES/0161.patch | 42 - SOURCES/0162.patch | 154 --- SOURCES/0163.patch | 23 - SOURCES/0164.patch | 30 - SOURCES/0165.patch | 30 - SOURCES/0166.patch | 28 - SOURCES/0167.patch | 154 --- SOURCES/0168.patch | 37 - SOURCES/0169.patch | 52 - SOURCES/0170.patch | 64 - SOURCES/0171.patch | 78 -- SOURCES/0172.patch | 67 -- SOURCES/0173.patch | 53 - SOURCES/0174.patch | 286 ----- SOURCES/0175.patch | 80 -- SOURCES/0176.patch | 51 - SOURCES/0177.patch | 31 - SOURCES/0178.patch | 16 - SOURCES/0179.patch | 64 - SOURCES/0180.patch | 36 - SOURCES/0181.patch | 32 - SOURCES/0182.patch | 85 -- SOURCES/0183.patch | 35 - SOURCES/0184.patch | 76 -- SOURCES/0185.patch | 67 -- SOURCES/0186.patch | 143 --- SOURCES/0187.patch | 31 - SOURCES/0188.patch | 32 - SOURCES/0189.patch | 41 - SOURCES/0190.patch | 59 - SOURCES/0191.patch | 243 ---- SOURCES/0192.patch | 78 -- SOURCES/0193.patch | 57 - SOURCES/0194.patch | 24 - SOURCES/0195.patch | 27 - SOURCES/0196.patch | 68 -- SOURCES/0197.patch | 54 - SOURCES/0198.patch | 34 - SOURCES/0199.patch | 37 - SOURCES/0200.patch | 85 -- SOURCES/0201.patch | 34 - SOURCES/0202.patch | 34 - SOURCES/0203.patch | 26 - SOURCES/0204.patch | 55 - SOURCES/0205.patch | 29 - SOURCES/0206.patch | 140 --- SOURCES/0207.patch | 90 -- SOURCES/0208.patch | 55 - SOURCES/0209.patch | 66 -- SOURCES/0210.patch | 39 - SOURCES/0211.patch | 24 - SOURCES/0212.patch | 39 - SOURCES/0213.patch | 42 - SOURCES/0214.patch | 55 - SOURCES/0215.patch | 77 -- SOURCES/0216.patch | 44 - SOURCES/0217.patch | 38 - SOURCES/0218.patch | 27 - SOURCES/0219.patch | 101 -- SOURCES/0220.patch | 32 - SOURCES/0221.patch | 26 - SOURCES/0222.patch | 48 - SOURCES/0223.patch | 56 - SOURCES/0224.patch | 43 - SOURCES/0225.patch | 60 - SOURCES/0226.patch | 85 -- SOURCES/0227.patch | 55 - SOURCES/0228.patch | 33 - SOURCES/0229.patch | 28 - SOURCES/0230.patch | 57 - SOURCES/0231.patch | 50 - SOURCES/0232.patch | 41 - SPECS/dracut.spec => dracut.spec | 1042 ++++++----------- SOURCES/lgpl-2.1.txt => lgpl-2.1.txt | 0 sources | 1 + 253 files changed, 2227 insertions(+), 14828 deletions(-) delete mode 100644 .dracut.metadata create mode 100644 0001-revert-fix-install.d-correctly-install-pre-genned-im.patch create mode 100644 0002-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch create mode 100644 0003-fix-kernel-install-do-not-generate-an-initrd-when-on.patch create mode 100644 0004-fix-resume-always-include-the-resume-module.patch create mode 100644 0005-fix-nfs-set-correct-ownership-and-permissions-for-st.patch create mode 100644 0006-feat-dracut-init.sh-give-force-add-precedence-over-o.patch create mode 100644 0007-feat-lsinitrd.sh-look-for-initrd-in-usr-lib-modules.patch create mode 100644 0008-feat-fips-include-fips-module-unconditionally.patch create mode 100644 0009-fix-systemd-ask-password-do-not-half-install-systemd.patch create mode 100644 0010-fix-pcsc-add-libpcsclite_real.so.patch create mode 100644 0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch create mode 100644 0012-fix-dracut-install-initize-fts-pointer.patch create mode 100644 0013-feat-add-openssl-module.patch create mode 100644 0014-fix-openssl-harden-ossl-build-CFLAGS.patch create mode 100644 0015-fix-ossl-copy-executables-for-the-test-suite.patch create mode 100644 0016-fix-rescue-create-hmac-file-for-rescue-kernel.patch delete mode 100644 SOURCES/0001.patch delete mode 100644 SOURCES/0002.patch delete mode 100644 SOURCES/0003.patch delete mode 100644 SOURCES/0004.patch delete mode 100644 SOURCES/0005.patch delete mode 100644 SOURCES/0006.patch delete mode 100644 SOURCES/0007.patch delete mode 100644 SOURCES/0008.patch delete mode 100644 SOURCES/0009.patch delete mode 100644 SOURCES/0010.patch delete mode 100644 SOURCES/0011.patch delete mode 100644 SOURCES/0012.patch delete mode 100644 SOURCES/0013.patch delete mode 100644 SOURCES/0014.patch delete mode 100644 SOURCES/0015.patch delete mode 100644 SOURCES/0016.patch delete mode 100644 SOURCES/0017.patch delete mode 100644 SOURCES/0018.patch delete mode 100644 SOURCES/0019.patch delete mode 100644 SOURCES/0020.patch delete mode 100644 SOURCES/0021.patch delete mode 100644 SOURCES/0022.patch delete mode 100644 SOURCES/0023.patch delete mode 100644 SOURCES/0024.patch delete mode 100644 SOURCES/0025.patch delete mode 100644 SOURCES/0026.patch delete mode 100644 SOURCES/0027.patch delete mode 100644 SOURCES/0028.patch delete mode 100644 SOURCES/0029.patch delete mode 100644 SOURCES/0030.patch delete mode 100644 SOURCES/0031.patch delete mode 100644 SOURCES/0032.patch delete mode 100644 SOURCES/0033.patch delete mode 100644 SOURCES/0034.patch delete mode 100644 SOURCES/0035.patch delete mode 100644 SOURCES/0036.patch delete mode 100644 SOURCES/0037.patch delete mode 100644 SOURCES/0038.patch delete mode 100644 SOURCES/0039.patch delete mode 100644 SOURCES/0040.patch delete mode 100644 SOURCES/0041.patch delete mode 100644 SOURCES/0042.patch delete mode 100644 SOURCES/0043.patch delete mode 100644 SOURCES/0044.patch delete mode 100644 SOURCES/0045.patch delete mode 100644 SOURCES/0046.patch delete mode 100644 SOURCES/0047.patch delete mode 100644 SOURCES/0048.patch delete mode 100644 SOURCES/0049.patch delete mode 100644 SOURCES/0050.patch delete mode 100644 SOURCES/0051.patch delete mode 100644 SOURCES/0052.patch delete mode 100644 SOURCES/0053.patch delete mode 100644 SOURCES/0054.patch delete mode 100644 SOURCES/0055.patch delete mode 100644 SOURCES/0056.patch delete mode 100644 SOURCES/0057.patch delete mode 100644 SOURCES/0058.patch delete mode 100644 SOURCES/0059.patch delete mode 100644 SOURCES/0060.patch delete mode 100644 SOURCES/0061.patch delete mode 100644 SOURCES/0062.patch delete mode 100644 SOURCES/0063.patch delete mode 100644 SOURCES/0064.patch delete mode 100644 SOURCES/0065.patch delete mode 100644 SOURCES/0066.patch delete mode 100644 SOURCES/0067.patch delete mode 100644 SOURCES/0068.patch delete mode 100644 SOURCES/0069.patch delete mode 100644 SOURCES/0070.patch delete mode 100644 SOURCES/0071.patch delete mode 100644 SOURCES/0072.patch delete mode 100644 SOURCES/0073.patch delete mode 100644 SOURCES/0074.patch delete mode 100644 SOURCES/0075.patch delete mode 100644 SOURCES/0076.patch delete mode 100644 SOURCES/0077.patch delete mode 100644 SOURCES/0078.patch delete mode 100644 SOURCES/0079.patch delete mode 100644 SOURCES/0080.patch delete mode 100644 SOURCES/0081.patch delete mode 100644 SOURCES/0082.patch delete mode 100644 SOURCES/0083.patch delete mode 100644 SOURCES/0084.patch delete mode 100644 SOURCES/0085.patch delete mode 100644 SOURCES/0086.patch delete mode 100644 SOURCES/0087.patch delete mode 100644 SOURCES/0088.patch delete mode 100644 SOURCES/0089.patch delete mode 100644 SOURCES/0090.patch delete mode 100644 SOURCES/0091.patch delete mode 100644 SOURCES/0092.patch delete mode 100644 SOURCES/0093.patch delete mode 100644 SOURCES/0094.patch delete mode 100644 SOURCES/0095.patch delete mode 100644 SOURCES/0096.patch delete mode 100644 SOURCES/0097.patch delete mode 100644 SOURCES/0098.patch delete mode 100644 SOURCES/0099.patch delete mode 100644 SOURCES/0100.patch delete mode 100644 SOURCES/0101.patch delete mode 100644 SOURCES/0102.patch delete mode 100644 SOURCES/0103.patch delete mode 100644 SOURCES/0104.patch delete mode 100644 SOURCES/0105.patch delete mode 100644 SOURCES/0106.patch delete mode 100644 SOURCES/0107.patch delete mode 100644 SOURCES/0108.patch delete mode 100644 SOURCES/0109.patch delete mode 100644 SOURCES/0110.patch delete mode 100644 SOURCES/0111.patch delete mode 100644 SOURCES/0112.patch delete mode 100644 SOURCES/0113.patch delete mode 100644 SOURCES/0114.patch delete mode 100644 SOURCES/0115.patch delete mode 100644 SOURCES/0116.patch delete mode 100644 SOURCES/0117.patch delete mode 100644 SOURCES/0118.patch delete mode 100644 SOURCES/0119.patch delete mode 100644 SOURCES/0120.patch delete mode 100644 SOURCES/0121.patch delete mode 100644 SOURCES/0122.patch delete mode 100644 SOURCES/0123.patch delete mode 100644 SOURCES/0124.patch delete mode 100644 SOURCES/0125.patch delete mode 100644 SOURCES/0126.patch delete mode 100644 SOURCES/0127.patch delete mode 100644 SOURCES/0128.patch delete mode 100644 SOURCES/0129.patch delete mode 100644 SOURCES/0130.patch delete mode 100644 SOURCES/0131.patch delete mode 100644 SOURCES/0132.patch delete mode 100644 SOURCES/0133.patch delete mode 100644 SOURCES/0134.patch delete mode 100644 SOURCES/0135.patch delete mode 100644 SOURCES/0136.patch delete mode 100644 SOURCES/0137.patch delete mode 100644 SOURCES/0138.patch delete mode 100644 SOURCES/0139.patch delete mode 100644 SOURCES/0140.patch delete mode 100644 SOURCES/0141.patch delete mode 100644 SOURCES/0142.patch delete mode 100644 SOURCES/0143.patch delete mode 100644 SOURCES/0144.patch delete mode 100644 SOURCES/0145.patch delete mode 100644 SOURCES/0146.patch delete mode 100644 SOURCES/0147.patch delete mode 100644 SOURCES/0148.patch delete mode 100644 SOURCES/0149.patch delete mode 100644 SOURCES/0150.patch delete mode 100644 SOURCES/0151.patch delete mode 100644 SOURCES/0152.patch delete mode 100644 SOURCES/0153.patch delete mode 100644 SOURCES/0154.patch delete mode 100644 SOURCES/0155.patch delete mode 100644 SOURCES/0156.patch delete mode 100644 SOURCES/0157.patch delete mode 100644 SOURCES/0158.patch delete mode 100644 SOURCES/0159.patch delete mode 100644 SOURCES/0160.patch delete mode 100644 SOURCES/0161.patch delete mode 100644 SOURCES/0162.patch delete mode 100644 SOURCES/0163.patch delete mode 100644 SOURCES/0164.patch delete mode 100644 SOURCES/0165.patch delete mode 100644 SOURCES/0166.patch delete mode 100644 SOURCES/0167.patch delete mode 100644 SOURCES/0168.patch delete mode 100644 SOURCES/0169.patch delete mode 100644 SOURCES/0170.patch delete mode 100644 SOURCES/0171.patch delete mode 100644 SOURCES/0172.patch delete mode 100644 SOURCES/0173.patch delete mode 100644 SOURCES/0174.patch delete mode 100644 SOURCES/0175.patch delete mode 100644 SOURCES/0176.patch delete mode 100644 SOURCES/0177.patch delete mode 100644 SOURCES/0178.patch delete mode 100644 SOURCES/0179.patch delete mode 100644 SOURCES/0180.patch delete mode 100644 SOURCES/0181.patch delete mode 100644 SOURCES/0182.patch delete mode 100644 SOURCES/0183.patch delete mode 100644 SOURCES/0184.patch delete mode 100644 SOURCES/0185.patch delete mode 100644 SOURCES/0186.patch delete mode 100644 SOURCES/0187.patch delete mode 100644 SOURCES/0188.patch delete mode 100644 SOURCES/0189.patch delete mode 100644 SOURCES/0190.patch delete mode 100644 SOURCES/0191.patch delete mode 100644 SOURCES/0192.patch delete mode 100644 SOURCES/0193.patch delete mode 100644 SOURCES/0194.patch delete mode 100644 SOURCES/0195.patch delete mode 100644 SOURCES/0196.patch delete mode 100644 SOURCES/0197.patch delete mode 100644 SOURCES/0198.patch delete mode 100644 SOURCES/0199.patch delete mode 100644 SOURCES/0200.patch delete mode 100644 SOURCES/0201.patch delete mode 100644 SOURCES/0202.patch delete mode 100644 SOURCES/0203.patch delete mode 100644 SOURCES/0204.patch delete mode 100644 SOURCES/0205.patch delete mode 100644 SOURCES/0206.patch delete mode 100644 SOURCES/0207.patch delete mode 100644 SOURCES/0208.patch delete mode 100644 SOURCES/0209.patch delete mode 100644 SOURCES/0210.patch delete mode 100644 SOURCES/0211.patch delete mode 100644 SOURCES/0212.patch delete mode 100644 SOURCES/0213.patch delete mode 100644 SOURCES/0214.patch delete mode 100644 SOURCES/0215.patch delete mode 100644 SOURCES/0216.patch delete mode 100644 SOURCES/0217.patch delete mode 100644 SOURCES/0218.patch delete mode 100644 SOURCES/0219.patch delete mode 100644 SOURCES/0220.patch delete mode 100644 SOURCES/0221.patch delete mode 100644 SOURCES/0222.patch delete mode 100644 SOURCES/0223.patch delete mode 100644 SOURCES/0224.patch delete mode 100644 SOURCES/0225.patch delete mode 100644 SOURCES/0226.patch delete mode 100644 SOURCES/0227.patch delete mode 100644 SOURCES/0228.patch delete mode 100644 SOURCES/0229.patch delete mode 100644 SOURCES/0230.patch delete mode 100644 SOURCES/0231.patch delete mode 100644 SOURCES/0232.patch rename SPECS/dracut.spec => dracut.spec (68%) rename SOURCES/lgpl-2.1.txt => lgpl-2.1.txt (100%) create mode 100644 sources diff --git a/.dracut.metadata b/.dracut.metadata deleted file mode 100644 index 2b5b1f4..0000000 --- a/.dracut.metadata +++ /dev/null @@ -1 +0,0 @@ -62ab5e53c734ad6ec77ebf0580383e8b6de96d16 SOURCES/dracut-049.tar.xz diff --git a/.gitignore b/.gitignore index 7c9fc36..bd9c980 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dracut-049.tar.xz +105.tar.gz diff --git a/0001-revert-fix-install.d-correctly-install-pre-genned-im.patch b/0001-revert-fix-install.d-correctly-install-pre-genned-im.patch new file mode 100644 index 0000000..c7039ad --- /dev/null +++ b/0001-revert-fix-install.d-correctly-install-pre-genned-im.patch @@ -0,0 +1,238 @@ +From 07151e560561b415f7e016362ab1d180b13f33fb Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Wed, 12 Jun 2024 06:30:42 +0200 +Subject: [PATCH 01/13] revert: "fix(install.d): correctly install pre-genned + image and die if no args" + +revert: "fix(install.d): simplify and use what kernel-install gives us" + +This reverts commits: + d40155385d060f8d8608fa8a4931e2e42ddc3a8f + 8388ad149c698c951089606352fdb0cdcaaf40c9 + +https://github.com/dracut-ng/dracut-ng/issues/334 + +This is temporary, until the `20-grub.install` will be able to handle initrd +from kernel staging area. +--- + install.d/50-dracut.install | 152 ++++++++++++++++++----------- + install.d/51-dracut-rescue.install | 22 +---- + 2 files changed, 97 insertions(+), 77 deletions(-) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index 14f87721..441414ac 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -1,13 +1,13 @@ + #!/bin/bash + +-COMMAND="${1:?}" +-KERNEL_VERSION="${2:?}" +-#shellcheck disable=SC2034 ++COMMAND="$1" ++KERNEL_VERSION="$2" + BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" + +-# If the initrd was provided on the kernel command line, we shouldn't generate our own. +-if [[ "$COMMAND" != "add" || "$#" -gt 4 ]]; then ++# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. ++# So, let's skip to create initrd. ++if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then + exit 0 + fi + +@@ -16,64 +16,102 @@ if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then + exit 0 + fi + +-if [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" = "dracut" ]]; then +- # We are the initrd generator +- IMAGE="initrd" +- UEFI_OPTS="--no-uefi" ++# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess. ++if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then ++ BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" ++ if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then ++ # No uki generator preference set or we have been chosen ++ IMAGE="uki.efi" ++ UEFI_OPTS="--uefi" ++ elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then ++ # We aren't the uki generator, but we have been requested to make the initrd ++ IMAGE="initrd" ++ UEFI_OPTS="--no-uefi" ++ else ++ exit 0 ++ fi ++elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then ++ BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" ++ if [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then ++ IMAGE="initrd" ++ UEFI_OPTS="--no-uefi" ++ else ++ exit 0 ++ fi + else +- exit 0 ++ # No layout information, use users --uefi/--no-uefi preference ++ UEFI_OPTS="" ++ if [[ -d $BOOT_DIR_ABS ]]; then ++ IMAGE="initrd" ++ else ++ BOOT_DIR_ABS="/boot" ++ IMAGE="initramfs-${KERNEL_VERSION}.img" ++ fi + fi + +-if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then +- # We are chosen to generate the UKI as well as initrd +- IMAGE="uki.efi" +- UEFI_OPTS="--uefi" +-fi ++ret=0 + +-if [[ -f ${KERNEL_IMAGE%/*}/$IMAGE ]]; then +- # we found an initrd or uki.efi at the same place as the kernel +- # use this and don't generate a new one +- [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \ +- "There is an $IMAGE image at the same place as the kernel, skipping generating a new one" +- cp --reflink=auto "${KERNEL_IMAGE%/*}/$IMAGE" "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ +- && chown root:root "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ +- && chmod 0600 "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \ +- && exit 0 +-fi ++case "$COMMAND" in ++ add) ++ if [[ $IMAGE == "uki.efi" ]]; then ++ IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi ++ else ++ IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd ++ fi ++ if [[ -f ${IMAGE_PREGENERATED} ]]; then ++ # we found an initrd or uki.efi at the same place as the kernel ++ # use this and don't generate a new one ++ [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \ ++ "There is an ${IMAGE} image at the same place as the kernel, skipping generating a new one" ++ cp --reflink=auto "$IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$IMAGE" \ ++ && chown root:root "$BOOT_DIR_ABS/$IMAGE" \ ++ && chmod 0600 "$BOOT_DIR_ABS/$IMAGE" \ ++ && exit 0 ++ fi + +-if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then +- if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then +- read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline" +- fi +-elif [[ -f /etc/kernel/cmdline ]]; then +- read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline +-elif [[ -f /usr/lib/kernel/cmdline ]]; then +- read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline +-else +- declare -a BOOT_OPTIONS ++ if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then ++ if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then ++ read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline" ++ fi ++ elif [[ -f /etc/kernel/cmdline ]]; then ++ read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline ++ elif [[ -f /usr/lib/kernel/cmdline ]]; then ++ read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline ++ else ++ declare -a BOOT_OPTIONS + +- read -r -d '' -a line < /proc/cmdline +- for i in "${line[@]}"; do +- [[ ${i#initrd=*} != "$i" ]] && continue +- BOOT_OPTIONS+=("$i") +- done +-fi ++ read -r -d '' -a line < /proc/cmdline ++ for i in "${line[@]}"; do ++ [[ ${i#initrd=*} != "$i" ]] && continue ++ BOOT_OPTIONS+=("$i") ++ done ++ fi + +-unset noimageifnotneeded ++ unset noimageifnotneeded + +-for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do +- # shellcheck disable=SC1001 +- if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then +- noimageifnotneeded="yes" +- break +- fi +-done ++ for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do ++ # shellcheck disable=SC1001 ++ if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then ++ noimageifnotneeded="yes" ++ break ++ fi ++ done ++ ++ # shellcheck disable=SC2046 ++ dracut -f \ ++ ${noimageifnotneeded:+--noimageifnotneeded} \ ++ $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ ++ $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \ ++ "$UEFI_OPTS" \ ++ --kver "$KERNEL_VERSION" \ ++ "$BOOT_DIR_ABS/$IMAGE" ++ ret=$? ++ ;; ++ ++ remove) ++ rm -f -- "$BOOT_DIR_ABS/$IMAGE" ++ ret=$? ++ ;; ++esac + +-# shellcheck disable=SC2046 +-dracut -f \ +- ${noimageifnotneeded:+--noimageifnotneeded} \ +- $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ +- $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \ +- "$UEFI_OPTS" \ +- --kver "$KERNEL_VERSION" \ +- "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" || exit 1 ++exit $ret +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index 4ec9e3c5..9312e242 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -2,29 +2,11 @@ + + export LANG=C + +-COMMAND="${1:?}" +-KERNEL_VERSION="${2:?}" ++COMMAND="$1" ++KERNEL_VERSION="$2" + BOOT_DIR_ABS="${3%/*}/0-rescue" + KERNEL_IMAGE="$4" + +-# If the initrd was provided on the kernel command line, we shouldn't generate our own. +-if [[ "$COMMAND" = "add" && "$#" -gt 4 ]]; then +- exit 0 +-fi +- +-# Do not attempt to create initramfs if the supplied image is already a UKI +-if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then +- exit 0 +-fi +- +-if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then +- # Rescue images currently not compatible with UKIs +- exit 0 +-elif [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]]; then +- # We are not the initrd generator +- exit 0 +-fi +- + dropindirs_sort() { + suffix=$1 + shift +-- +2.47.1 + diff --git a/0002-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch b/0002-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch new file mode 100644 index 0000000..bd86841 --- /dev/null +++ b/0002-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch @@ -0,0 +1,72 @@ +From e8c6d93a1fe7ea255754bfb93fad8daad62a85ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Jan 2022 18:08:42 +0100 +Subject: [PATCH 02/13] feat(kernel-install): do nothing when + $KERNEL_INSTALL_INITRD_GENERATOR says so + +dracut may be installed without being actually used. This is very common in +binary distros where a package may be pulled in through dependencies, even +though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR +is being added in systemd's kernel-install to select which of the possibly many +initrd generation mechanisms will be used. + +For backwards compat, if it not set, continue as before. But if set to +something else, skip our kernel-install plugins. + +(Cherry-picked commit f47bcdd7342ca0d46b889e712a1c7446e18434bc from PR#1825) +--- + install.d/50-dracut.install | 9 ++++++++- + install.d/51-dracut-rescue.install | 6 ++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index 441414ac..3f961b11 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -6,11 +6,17 @@ BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" + + # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. +-# So, let's skip to create initrd. ++# In this case, do not create the initrd. + if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then + exit 0 + fi + ++# Skip this plugin if we're using a different generator. If nothing is specified, ++# assume we're wanted since we're installed. ++if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then ++ exit 0 ++fi ++ + # Do not attempt to create initramfs if the supplied image is already a UKI + if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then + exit 0 +@@ -38,6 +44,7 @@ elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; t + else + exit 0 + fi ++ + else + # No layout information, use users --uefi/--no-uefi preference + UEFI_OPTS="" +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index 9312e242..decee283 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -7,6 +7,12 @@ KERNEL_VERSION="$2" + BOOT_DIR_ABS="${3%/*}/0-rescue" + KERNEL_IMAGE="$4" + ++# Skip this plugin if we're using a different generator. If nothing is specified, ++# assume we're wanted since we're installed. ++if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then ++ exit 0 ++fi ++ + dropindirs_sort() { + suffix=$1 + shift +-- +2.47.1 + diff --git a/0003-fix-kernel-install-do-not-generate-an-initrd-when-on.patch b/0003-fix-kernel-install-do-not-generate-an-initrd-when-on.patch new file mode 100644 index 0000000..07b59e2 --- /dev/null +++ b/0003-fix-kernel-install-do-not-generate-an-initrd-when-on.patch @@ -0,0 +1,39 @@ +From 430b1b06e60de78c28ed6e70982a30f41585b219 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 18 Jan 2022 18:58:58 +0100 +Subject: [PATCH 03/13] fix(kernel-install): do not generate an initrd when one + was specified + +According to the synopsis, kernel-install can be called with an +already-prepared initrd. In that case, no initrd should be generated by dracut. + +(Cherry-picked commit 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 from PR#1825) +--- + install.d/50-dracut.install | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install +index 3f961b11..076b4f5e 100755 +--- a/install.d/50-dracut.install ++++ b/install.d/50-dracut.install +@@ -4,6 +4,7 @@ COMMAND="$1" + KERNEL_VERSION="$2" + BOOT_DIR_ABS="$3" + KERNEL_IMAGE="$4" ++INITRD_OPTIONS_SHIFT=4 + + # If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory. + # In this case, do not create the initrd. +@@ -60,6 +61,9 @@ ret=0 + + case "$COMMAND" in + add) ++ # If the initrd was provided on the kernel command line, we shouldn't generate our own. ++ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0 ++ + if [[ $IMAGE == "uki.efi" ]]; then + IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi + else +-- +2.47.1 + diff --git a/0004-fix-resume-always-include-the-resume-module.patch b/0004-fix-resume-always-include-the-resume-module.patch new file mode 100644 index 0000000..1971f7f --- /dev/null +++ b/0004-fix-resume-always-include-the-resume-module.patch @@ -0,0 +1,51 @@ +From 67654956c27c159e29701a2b9fd9430d372a9f91 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Thu, 8 Aug 2024 00:21:12 +0200 +Subject: [PATCH 04/13] fix(resume): always include the resume module + +as we can't determine with certainity that it won't be needed. + +rhel-only + +Resolves: RHEL-53350 + +(commit messages from squashed commits:) + +fix(resume): do not include resume if swap is on netdevice + +Additional fix, restoring previous behavior identical to RHEL-9. + +rhel-only + +Resolves: RHEL-53350 +--- + modules.d/95resume/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh +index d419566e..785f681a 100755 +--- a/modules.d/95resume/module-setup.sh ++++ b/modules.d/95resume/module-setup.sh +@@ -1,7 +1,9 @@ + #!/bin/bash + + # called by dracut ++# shellcheck disable=SC2317 + check() { ++ + swap_on_netdevice() { + local _dev + for _dev in "${swap_devs[@]}"; do +@@ -18,6 +20,9 @@ check() { + # hibernation support requested on kernel command line + return 0 + else ++ # always include resume module when not on netdevice ++ return 0 ++ + # resume= not set on kernel command line + if [[ -f /sys/power/resume ]]; then + if [[ "$(< /sys/power/resume)" == "0:0" ]]; then +-- +2.47.1 + diff --git a/0005-fix-nfs-set-correct-ownership-and-permissions-for-st.patch b/0005-fix-nfs-set-correct-ownership-and-permissions-for-st.patch new file mode 100644 index 0000000..76b7bc3 --- /dev/null +++ b/0005-fix-nfs-set-correct-ownership-and-permissions-for-st.patch @@ -0,0 +1,39 @@ +From 3e33ee5ce614059c9e4a81e8003df5142f1312c5 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 19 Jul 2021 11:27:28 +0200 +Subject: [PATCH 05/13] fix(nfs): set correct ownership and permissions for + statd directory + +The directory ownership for the statd directory should be +rpcuser:rpcuser. + +(cherry picked from commit ed5ab5787177f2be8a620a8d2d63a9ad26fbf149 from PR#583) + +Resolves: RHEL-53361 +--- + 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 c6fdd506..e36cd144 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 +-- +2.47.1 + diff --git a/0006-feat-dracut-init.sh-give-force-add-precedence-over-o.patch b/0006-feat-dracut-init.sh-give-force-add-precedence-over-o.patch new file mode 100644 index 0000000..fa0394a --- /dev/null +++ b/0006-feat-dracut-init.sh-give-force-add-precedence-over-o.patch @@ -0,0 +1,44 @@ +From 7fea469146481fdf30e6f2c933fa85426b6a2927 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Sat, 17 Aug 2024 01:43:50 +0200 +Subject: [PATCH 06/13] feat(dracut-init.sh): give --force-add precedence over + --omit + +This gives precedence of force_add_dracutmodules to omit_dracutmodules, +as there is not other way to override omit_dracutmodules list, and users +would expect it to be overriden from command line. + +Ref: https://github.com/dracut-ng/dracut-ng/pull/569 + +This way, `--add` retains it behaviour, and `--force-add` gains additional +functionality in non-hostonly mode. The module may still be skipped +if the module check returns 1, but it should throw error (as I'd expect +for `--force-add`). + +(cherry picked commit a669346f48cbb3278c51ba5e95b1b91f9bfdee0a from PR#584) + +Resolves: RHEL-53791 +--- + dracut-init.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dracut-init.sh b/dracut-init.sh +index 1ce0d7ed..d78d3cd0 100755 +--- a/dracut-init.sh ++++ b/dracut-init.sh +@@ -935,8 +935,10 @@ check_module() { + [[ $2 ]] || mods_checked_as_dep+=" $_mod " + + if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then +- ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!" +- return 1 ++ if [[ " $force_add_dracutmodules " != *\ $_mod\ * ]]; then ++ ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!" ++ return 1 ++ fi + fi + + if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then +-- +2.47.1 + diff --git a/0007-feat-lsinitrd.sh-look-for-initrd-in-usr-lib-modules.patch b/0007-feat-lsinitrd.sh-look-for-initrd-in-usr-lib-modules.patch new file mode 100644 index 0000000..e649f05 --- /dev/null +++ b/0007-feat-lsinitrd.sh-look-for-initrd-in-usr-lib-modules.patch @@ -0,0 +1,38 @@ +From 9e9193f6da0348eb476c3aff6d066292b10cefe1 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Fri, 16 Aug 2024 20:40:15 +0200 +Subject: [PATCH 07/13] feat(lsinitrd.sh): look for initrd in /usr/lib/modules/ + +Introduce new path for lsinitrd.sh to look into: + +/usr/lib/modules/$kver/initramfs.img + +Which is valid on all ostree-based systems, and also other image based +systems with pre-generated initramfs. + +Ref: https://issues.redhat.com/browse/RHEL-35890 +(cherry picked from commit 22ae6ecaf9ecdb9db3e79aa9a72d527e7436c282) + +Resolves: RHEL-54650 +--- + lsinitrd.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lsinitrd.sh b/lsinitrd.sh +index ac49b5d7..f8696e68 100755 +--- a/lsinitrd.sh ++++ b/lsinitrd.sh +@@ -125,6 +125,10 @@ find_initrd_for_kernel_version() { + echo "/lib/modules/${kernel_version}/initrd" + elif [[ -f /lib/modules/${kernel_version}/initramfs.img ]]; then + echo "/lib/modules/${kernel_version}/initramfs.img" ++ elif [[ -f /usr/lib/modules/${kernel_version}/initrd ]]; then ++ echo "/usr/lib/modules/${kernel_version}/initrd" ++ elif [[ -f /usr/lib/modules/${kernel_version}/initramfs.img ]]; then ++ echo "/usr/lib/modules/${kernel_version}/initramfs.img" + elif [[ -f /boot/initramfs-${kernel_version}.img ]]; then + echo "/boot/initramfs-${kernel_version}.img" + else +-- +2.47.1 + diff --git a/0008-feat-fips-include-fips-module-unconditionally.patch b/0008-feat-fips-include-fips-module-unconditionally.patch new file mode 100644 index 0000000..f597926 --- /dev/null +++ b/0008-feat-fips-include-fips-module-unconditionally.patch @@ -0,0 +1,28 @@ +From c41f441214a98284475f0965973c3541bd158df7 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 19 Aug 2024 09:41:27 +0200 +Subject: [PATCH 08/13] feat(fips): include fips module unconditionally + +rhel-only + +Resolves: RHEL-39404 +--- + 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 a497ac5c..e3b7ca33 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -2,7 +2,7 @@ + + # called by dracut + check() { +- return 255 ++ return 0 + } + + # called by dracut +-- +2.47.1 + diff --git a/0009-fix-systemd-ask-password-do-not-half-install-systemd.patch b/0009-fix-systemd-ask-password-do-not-half-install-systemd.patch new file mode 100644 index 0000000..183ffb8 --- /dev/null +++ b/0009-fix-systemd-ask-password-do-not-half-install-systemd.patch @@ -0,0 +1,39 @@ +From 8002a6125bf3f36144a92643ea02ad3abfa5d6d8 Mon Sep 17 00:00:00 2001 +From: Jo Zzsi +Date: Sun, 12 Jan 2025 20:01:09 -0500 +Subject: [PATCH 09/13] fix(systemd-ask-password): do not half-install + systemd-ask-password-wall + +Do not install the path unit when the service unit is not installed +for systemd-ask-password-wall. + +Fixes the following warning on the CI: + +[FAILED] Failed to start Forward Password Requests to Wall Directory Watch. +See 'systemctl status systemd-ask-password-wall.path' for details. +... +systemd[1]: systemd-ask-password-wall.path: Refusing to start, unit systemd-ask-password-wall.service to trigger not loaded. +systemd[1]: Failed to start Forward Password Requests to Wall Directory Watch. + +(cherry picked from commit 4ddc0053e869eb37b7c3d4e08876a687e1a995ae) + +Related: RHEL-65204 +--- + modules.d/01systemd-ask-password/module-setup.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/modules.d/01systemd-ask-password/module-setup.sh b/modules.d/01systemd-ask-password/module-setup.sh +index 40774ab9..8b09b69f 100755 +--- a/modules.d/01systemd-ask-password/module-setup.sh ++++ b/modules.d/01systemd-ask-password/module-setup.sh +@@ -43,7 +43,6 @@ install() { + inst_multiple -o \ + "$systemdsystemunitdir"/systemd-ask-password-console.path \ + "$systemdsystemunitdir"/systemd-ask-password-console.service \ +- "$systemdsystemunitdir"/multi-user.target.wants/systemd-ask-password-wall.path \ + "$systemdsystemunitdir"/sysinit.target.wants/systemd-ask-password-console.path \ + systemd-ask-password \ + systemd-tty-ask-password-agent +-- +2.47.1 + diff --git a/0010-fix-pcsc-add-libpcsclite_real.so.patch b/0010-fix-pcsc-add-libpcsclite_real.so.patch new file mode 100644 index 0000000..7204023 --- /dev/null +++ b/0010-fix-pcsc-add-libpcsclite_real.so.patch @@ -0,0 +1,37 @@ +From 8f3b92db19bf4654d7346a1532928fcf172c09e6 Mon Sep 17 00:00:00 2001 +From: Manuel Fombuena +Date: Thu, 31 Oct 2024 12:01:46 +0000 +Subject: [PATCH 10/13] fix(pcsc): add libpcsclite_real.so.* + +systemd-cryptsetup requires libpcsclite_real.so.1 + +Without it you get the following error: + +systemd-cryptsetup[697]: loading "libpcsclite_real.so.1" failed: libpcsclite_real.so.1: cannot open shared object file: No such file or directory + +Signed-off-by: Manuel Fombuena + +(cherry picked from commit bfa00c2a03b07efae5a826aa881317acea9a4ec6) + +Related: RHEL-65204 +--- + modules.d/91pcsc/module-setup.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/91pcsc/module-setup.sh b/modules.d/91pcsc/module-setup.sh +index 26b463d4..5ae1272b 100755 +--- a/modules.d/91pcsc/module-setup.sh ++++ b/modules.d/91pcsc/module-setup.sh +@@ -51,7 +51,8 @@ install() { + {"tls/$_arch/",tls/,"$_arch/",}"pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist" \ + {"tls/$_arch/",tls/,"$_arch/",}"pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so" \ + {"tls/$_arch/",tls/,"$_arch/",}"pcsc/drivers/serial/libccidtwin.so" \ +- {"tls/$_arch/",tls/,"$_arch/",}"libpcsclite.so.*" ++ {"tls/$_arch/",tls/,"$_arch/",}"libpcsclite.so.*" \ ++ {"tls/$_arch/",tls/,"$_arch/",}"libpcsclite_real.so.*" + + # Install the hosts local user configurations if enabled. + if [[ $hostonly ]]; then +-- +2.47.1 + diff --git a/0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch b/0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch new file mode 100644 index 0000000..0e78c6b --- /dev/null +++ b/0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch @@ -0,0 +1,30 @@ +From ad4549b5e8fb66ee33126ba01bbb24f4801a3936 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Wed, 29 Jan 2025 20:25:03 +0100 +Subject: [PATCH 11/13] revert: "fix(rescue): make rescue always no-hostonly" + +This partly reverts commit 224c00914bfb4ba1dee48e094ebb137facfd5947. + +Related: RHEL-65204 +--- + install.d/51-dracut-rescue.install | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index decee283..1be9b882 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -119,8 +119,8 @@ case "$COMMAND" in + + if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then + # shellcheck disable=SC2046 +- dracut -f \ +- --add-confdir rescue \ ++ dracut -f --no-hostonly --no-uefi \ ++ -a "rescue" \ + $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \ + --kver "$KERNEL_VERSION" \ + "$BOOT_DIR_ABS/$INITRD" +-- +2.47.1 + diff --git a/0012-fix-dracut-install-initize-fts-pointer.patch b/0012-fix-dracut-install-initize-fts-pointer.patch new file mode 100644 index 0000000..69e080c --- /dev/null +++ b/0012-fix-dracut-install-initize-fts-pointer.patch @@ -0,0 +1,26 @@ +From 2c33b7315571dd0fd8240111018ce474fc45f667 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Thu, 13 Feb 2025 22:18:06 +0100 +Subject: [PATCH 12/13] fix(dracut-install): initize fts pointer + +Related: RHEL-65204 +--- + 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 96bc2eb6..3cd4e5cb 100644 +--- a/src/install/dracut-install.c ++++ b/src/install/dracut-install.c +@@ -1681,7 +1681,7 @@ static void find_suppliers_for_sys_node(Hashmap *suppliers, const char *node_pat + + static void find_suppliers(struct kmod_ctx *ctx) + { +- _cleanup_fts_close_ FTS *fts; ++ _cleanup_fts_close_ FTS *fts = NULL; + char *paths[] = { "/sys/devices/platform", NULL }; + fts = fts_open(paths, FTS_NOSTAT | FTS_PHYSICAL, NULL); + +-- +2.47.1 + diff --git a/0013-feat-add-openssl-module.patch b/0013-feat-add-openssl-module.patch new file mode 100644 index 0000000..99bf06b --- /dev/null +++ b/0013-feat-add-openssl-module.patch @@ -0,0 +1,1021 @@ +From 73122f8b3430e8ecab30a5c261391081f8289d31 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 20 Jan 2025 14:16:38 +0100 +Subject: [PATCH 13/13] feat: add openssl module + +Resolves: RHEL-76323 +--- + Makefile | 15 +- + modules.d/01fips/module-setup.sh | 4 + + modules.d/99openssl/module-setup.sh | 31 ++ + modules.d/99openssl/openssl-check.sh | 29 ++ + src/ossl/Makefile | 35 +++ + src/ossl/src/ossl-config.c | 144 +++++++++ + src/ossl/src/ossl-files.c | 280 ++++++++++++++++++ + src/ossl/tests/config/escapes.cnf | 11 + + src/ossl/tests/config/escapes.cnf.expected | 12 + + src/ossl/tests/config/included-file.noncnf | 2 + + .../tests/config/includes.1.d/includes1.cnf | 2 + + .../tests/config/includes.1.d/includes1.conf | 2 + + .../tests/config/includes.1.d/nonconf.bak | 2 + + src/ossl/tests/config/includes.2.d/main.cnf | 4 + + .../includes.2.d/subincludes.d/subconf.cnf | 2 + + src/ossl/tests/config/includes.cnf | 6 + + src/ossl/tests/config/includes.cnf.expected | 12 + + .../leading-and-trailing-whitespace.cnf | 6 + + ...ading-and-trailing-whitespace.cnf.expected | 7 + + src/ossl/tests/config/order.cnf | 21 ++ + src/ossl/tests/config/order.cnf.expected | 16 + + src/ossl/tests/config/variables.cnf | 33 +++ + src/ossl/tests/config/variables.cnf.expected | 27 ++ + src/ossl/tests/files/engines.cnf | 22 ++ + src/ossl/tests/files/engines.cnf.expected | 4 + + src/ossl/tests/files/providers.cnf | 31 ++ + src/ossl/tests/files/providers.cnf.expected | 4 + + 27 files changed, 763 insertions(+), 1 deletion(-) + create mode 100755 modules.d/99openssl/module-setup.sh + create mode 100755 modules.d/99openssl/openssl-check.sh + create mode 100644 src/ossl/Makefile + create mode 100644 src/ossl/src/ossl-config.c + create mode 100644 src/ossl/src/ossl-files.c + create mode 100644 src/ossl/tests/config/escapes.cnf + create mode 100644 src/ossl/tests/config/escapes.cnf.expected + create mode 100644 src/ossl/tests/config/included-file.noncnf + create mode 100644 src/ossl/tests/config/includes.1.d/includes1.cnf + create mode 100644 src/ossl/tests/config/includes.1.d/includes1.conf + create mode 100644 src/ossl/tests/config/includes.1.d/nonconf.bak + create mode 100644 src/ossl/tests/config/includes.2.d/main.cnf + create mode 100644 src/ossl/tests/config/includes.2.d/subincludes.d/subconf.cnf + create mode 100644 src/ossl/tests/config/includes.cnf + create mode 100644 src/ossl/tests/config/includes.cnf.expected + create mode 100644 src/ossl/tests/config/leading-and-trailing-whitespace.cnf + create mode 100644 src/ossl/tests/config/leading-and-trailing-whitespace.cnf.expected + create mode 100644 src/ossl/tests/config/order.cnf + create mode 100644 src/ossl/tests/config/order.cnf.expected + create mode 100644 src/ossl/tests/config/variables.cnf + create mode 100644 src/ossl/tests/config/variables.cnf.expected + create mode 100644 src/ossl/tests/files/engines.cnf + create mode 100644 src/ossl/tests/files/engines.cnf.expected + create mode 100644 src/ossl/tests/files/providers.cnf + create mode 100644 src/ossl/tests/files/providers.cnf.expected + +diff --git a/Makefile b/Makefile +index bcb2bc8f..4bc88561 100644 +--- a/Makefile ++++ b/Makefile +@@ -50,7 +50,7 @@ manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages) + + .PHONY: install clean archive testimage test all check AUTHORS CONTRIBUTORS doc + +-all: dracut.pc dracut-install src/skipcpio/skipcpio dracut-util ++all: dracut.pc dracut-install src/skipcpio/skipcpio dracut-util ossl-config ossl-files + + %.o : %.c + $(CC) -c $(CFLAGS) $(CPPFLAGS) $(KMOD_CFLAGS) $< -o $@ +@@ -88,6 +88,12 @@ util/util: $(UTIL_OBJECTS) + dracut-util: src/util/util + cp -a $< $@ + ++ossl: src/ossl/Makefile ++ $(MAKE) -C src/ossl ++ ++ossl-config: ossl ++ossl-files: ossl ++ + .PHONY: indent-c + indent-c: + astyle -n --quiet --options=.astylerc $(wildcard *.[ch] */*.[ch] src/*/*.[ch]) +@@ -208,6 +214,12 @@ endif + if [ -f dracut-util ]; then \ + install -m 0755 dracut-util $(DESTDIR)$(pkglibdir)/dracut-util; \ + fi ++ if [ -f src/ossl/src/ossl-config ]; then \ ++ install -m 0755 src/ossl/src/ossl-config $(DESTDIR)$(pkglibdir)/ossl-config; \ ++ fi ++ if [ -f src/ossl/src/ossl-files ]; then \ ++ install -m 0755 src/ossl/src/ossl-files $(DESTDIR)$(pkglibdir)/ossl-files; \ ++ fi + ifeq ($(enable_dracut_cpio),yes) + install -m 0755 dracut-cpio $(DESTDIR)$(pkglibdir)/dracut-cpio + endif +@@ -234,6 +246,7 @@ clean: + $(RM) dracut.pc + $(RM) dracut-cpio src/dracut-cpio/target/release/dracut-cpio* + $(MAKE) -C test clean ++ $(MAKE) -C src/ossl clean + + syncheck: + @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ +diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh +index e3b7ca33..206f0456 100755 +--- a/modules.d/01fips/module-setup.sh ++++ b/modules.d/01fips/module-setup.sh +@@ -5,6 +5,10 @@ check() { + return 0 + } + ++depends() { ++ echo openssl ++} ++ + # called by dracut + installkernel() { + local _fipsmodules _mod _bootfstype +diff --git a/modules.d/99openssl/module-setup.sh b/modules.d/99openssl/module-setup.sh +new file mode 100755 +index 00000000..8614f254 +--- /dev/null ++++ b/modules.d/99openssl/module-setup.sh +@@ -0,0 +1,31 @@ ++#!/bin/bash ++ ++check() { ++ return 255 ++} ++ ++install() { ++ ++ local ossl_files openssl_cnf initrd_openssl_cnf ++ ++ ossl_files="${dracutbasedir}/ossl-files" ++ ++ openssl_cnf="$($ossl_files --config)" ++ ++ initrd_openssl_cnf="${initdir}/${openssl_cnf}" ++ ++ if [[ ! -r $openssl_cnf ]]; then ++ dfatal "'$ossl_files --config' does not return a path!!" ++ exit 1 ++ fi ++ ++ # ossl-files gives us one line per file ++ # shellcheck disable=SC2046 ++ inst_multiple -o \ ++ /etc/crypto-policies/back-ends/opensslcnf.config \ ++ $($ossl_files --engines --providers) ++ ++ mkdir -p "${initrd_openssl_cnf%/*}" ++ ++ "${dracutbasedir}/ossl-config" > "${initrd_openssl_cnf}" ++} +diff --git a/modules.d/99openssl/openssl-check.sh b/modules.d/99openssl/openssl-check.sh +new file mode 100755 +index 00000000..67951f45 +--- /dev/null ++++ b/modules.d/99openssl/openssl-check.sh +@@ -0,0 +1,29 @@ ++#!/bin/sh ++ ++eok() { ++ ++ { ++ [ "$1" -eq 0 ] && echo OK || echo FAIL ++ ++ echo ++ ++ } 2> /dev/null ++} ++ ++echo ++ ++set -x ++ ++openssl list -providers ++ ++eok "$?" ++ ++#openssl s_client -connect “$dns_server_ip:$dns_server_port” -servername “$dns_server_name” "$$TEST.1" && \ ++ OPENSSL_CONF="$$TEST.1" src/ossl-config >"$$TEST.2" && \ ++ diff -u "$$TEST.expected" "$$TEST.1" && \ ++ diff -u <(sed 1d "$$TEST.1") <(sed 1d "$$TEST.2") && \ ++ echo "PASS" || (echo "FAIL"; exit 1); \ ++ done ++ ++ @for TEST in $(TESTS_FILES); do \ ++ echo "Test $$TEST..."; \ ++ OPENSSL_CONF="$$TEST" src/ossl-files --engines --providers >"$$TEST.1" && \ ++ diff -u "$$TEST.expected" "$$TEST.1" && \ ++ echo "PASS" || (echo "FAIL"; exit 1); \ ++ done +diff --git a/src/ossl/src/ossl-config.c b/src/ossl/src/ossl-config.c +new file mode 100644 +index 00000000..4324341c +--- /dev/null ++++ b/src/ossl/src/ossl-config.c +@@ -0,0 +1,144 @@ ++// cc -std=c99 -Wall -Werror -Wno-error=deprecated-declarations -pedantic -D_XOPEN_SOURCE=600 -o ossl-config ossl-config.c -lcrypto ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L ++# define FALLTHROUGH [[fallthrough]] ++#elif (defined(__GNUC__) && __GNUC__ >= 7) || (defined(__clang__) && __clang_major__ >= 12) ++# define FALLTHROUGH __attribute__((fallthrough)) ++#else ++# define FALLTHROUGH ((void) 0) ++#endif ++ ++#define cleanup(type) \ ++ __attribute__((cleanup(type##_ptr_free))) ++ ++#define cleanupfunc(type, func) \ ++ static void type##_ptr_free(type **ptr) { \ ++ func(*ptr); \ ++ *ptr = NULL; \ ++ } ++ ++typedef STACK_OF(OPENSSL_CSTRING) ossl_sk_cstring_t; ++ ++cleanupfunc(char, OPENSSL_free) ++cleanupfunc(CONF, NCONF_free) ++cleanupfunc(ossl_sk_cstring_t, sk_OPENSSL_CSTRING_free) ++ ++/** ++ * Print the given value to stdout escaped for the OpenSSL configuration file ++ * format. ++ */ ++static void print_escaped_value(const char *value) { ++ for (const char *p = value; *p; p++) { ++ switch (*p) { ++ case '"': ++ case '\'': ++ case '#': ++ case '\\': ++ case '$': ++ putchar('\\'); ++ putchar(*p); ++ break; ++ case '\n': ++ fputs("\\n", stdout); ++ break; ++ case '\r': ++ fputs("\\r", stdout); ++ break; ++ case '\b': ++ fputs("\\b", stdout); ++ break; ++ case '\t': ++ fputs("\\t", stdout); ++ break; ++ case ' ': ++ if (p == value || p[1] == '\0') { ++ /* Quote spaces if they are the first or last char of the ++ * value. We could quote the entire string (and it would ++ * certainly produce nicer output), but in quoted strings ++ * the escape sequences for \n, \r, \t, and \b do not work. ++ * To make sure we're producing correct results we'd thus ++ * have to selectively not use those in quoted strings and ++ * close and re-open the quotes if they appear, which is ++ * more trouble than adding the quotes just around the ++ * first and last leading and trailing space. */ ++ fputs("\" \"", stdout); ++ break; ++ } ++ FALLTHROUGH; ++ default: ++ putchar(*p); ++ break; ++ } ++ } ++} ++ ++/** ++ * Print all values in in the configuration section identified by section_name to stdout. ++ */ ++static void print_section(const CONF *cnf, OPENSSL_CSTRING section_name) { ++ STACK_OF(CONF_VALUE) *values = NCONF_get_section(cnf, section_name); ++ for (int idx = 0; idx < sk_CONF_VALUE_num(values); idx++) { ++ CONF_VALUE *value = sk_CONF_VALUE_value(values, idx); ++ printf("%s = ", value->name); ++ print_escaped_value(value->value); ++ putchar('\n'); ++ } ++} ++ ++/** ++ * Parse the default OpenSSL configuration file (or the one specified in the ++ * OPENSSL_CONF environment variable) and write it back to stdout in ++ * a canonical format with all includes and variables expanded. ++ */ ++int main(int argc, char *argv[]) { ++ char *configfile cleanup(char) = CONF_get1_default_config_file(); ++ if (configfile == NULL) { ++ ERR_print_errors_fp(stderr); ++ exit(EXIT_FAILURE); ++ } ++ ++ CONF *cnf cleanup(CONF) = NCONF_new(NULL); ++ if (cnf == NULL) { ++ ERR_print_errors_fp(stderr); ++ exit(EXIT_FAILURE); ++ } ++ ++ long eline = 0; ++ if (NCONF_load(cnf, configfile, &eline) == 0) { ++ fprintf(stderr, "Error on line %ld of configuration file\n", eline); ++ ERR_print_errors_fp(stderr); ++ exit(EXIT_FAILURE); ++ } ++ ++ STACK_OF(OPENSSL_CSTRING) *sections cleanup(ossl_sk_cstring_t) = NCONF_get_section_names(cnf); ++ if (sections == NULL) { ++ ERR_print_errors_fp(stderr); ++ exit(EXIT_FAILURE); ++ } ++ ++ printf("# This configuration file was linarized and expanded from %s\n", configfile); ++ ++ int default_section_idx = sk_OPENSSL_CSTRING_find(sections, "default"); ++ if (default_section_idx != -1) { ++ print_section(cnf, "default"); ++ } ++ for (int idx = 0; idx < sk_OPENSSL_CSTRING_num(sections); idx++) { ++ if (idx == default_section_idx) { ++ continue; ++ } ++ OPENSSL_CSTRING section_name = sk_OPENSSL_CSTRING_value(sections, idx); ++ printf("\n[%s]\n", section_name); ++ print_section(cnf, section_name); ++ } ++ ++ return EXIT_SUCCESS; ++} +diff --git a/src/ossl/src/ossl-files.c b/src/ossl/src/ossl-files.c +new file mode 100644 +index 00000000..4f252800 +--- /dev/null ++++ b/src/ossl/src/ossl-files.c +@@ -0,0 +1,280 @@ ++// cc -std=c99 -Wall -Werror -Wno-error=deprecated-declarations -pedantic -D_XOPEN_SOURCE=600 -o ossl-files ossl-files.c -lcrypto ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#define cleanup(type) \ ++ __attribute__((cleanup(type##_ptr_free))) ++ ++#define cleanupfunc(type, func) \ ++ static void type##_ptr_free(type **ptr) { \ ++ func(*ptr); \ ++ *ptr = NULL; \ ++ } ++ ++typedef STACK_OF(OPENSSL_CSTRING) ossl_sk_cstring_t; ++ ++cleanupfunc(char, OPENSSL_free) ++cleanupfunc(CONF, NCONF_free) ++ ++typedef enum flag { ++ CONFIG_FILE = 1, ++ ENGINES, ++ PROVIDERS, ++ PKCS11_MODULES, ++} flag_t; ++ ++static const OPENSSL_CSTRING get_option(STACK_OF(CONF_VALUE) *section, const OPENSSL_CSTRING name) { ++ for (size_t idx = 0; idx < sk_CONF_VALUE_num(section); ++idx) { ++ const CONF_VALUE *value = sk_CONF_VALUE_value(section, idx); ++ if (strcmp(name, value->name) == 0) { ++ return value->value; ++ } ++ } ++ ++ return NULL; ++} ++ ++/** ++ * Locate a section in the OpenSSL configuration file given its path ++ * components, separated by dots. ++ * ++ * Returns the STACK_OF(CONF_VALUE) that represents the section, if it exists ++ * and NULL otherwise. ++ */ ++static STACK_OF(CONF_VALUE) *locate_section(const CONF* cnf, const OPENSSL_CSTRING path) { ++ STACK_OF(CONF_VALUE) *sect = NCONF_get_section(cnf, "default"); ++ if (sect == NULL) ++ return NULL; ++ ++ char *pathbuf cleanup(char) = OPENSSL_strdup(path); ++ char *curpath = pathbuf; ++ while (curpath) { ++ char *split = strchr(curpath, '.'); ++ char *nextpath = NULL; ++ ++ if (split != NULL) { ++ *split = '\0'; ++ nextpath = split + 1; ++ } ++ ++ const OPENSSL_CSTRING next_section_name = get_option(sect, curpath); ++ if (next_section_name == NULL) ++ return NULL; ++ ++ sect = NCONF_get_section(cnf, next_section_name); ++ if (sect == NULL) ++ return NULL; ++ ++ curpath = nextpath; ++ } ++ ++ return sect; ++} ++ ++static void list_providers(const CONF *cnf) { ++ const char *modulesdir = OPENSSL_info(OPENSSL_INFO_MODULES_DIR); ++ ++ { ++ struct stat st; ++ size_t pathlen = strlen(modulesdir) + 1 /* "/" */ + strlen("fips.so") + 1; ++ char pathbuf[pathlen]; ++ ++ snprintf(pathbuf, pathlen, "%s/fips.so", modulesdir); ++ pathbuf[pathlen - 1] = '\0'; ++ ++ if (stat(pathbuf, &st) == 0) { ++ /* Print the path to the FIPS provider if it exists on disk, ++ * regardless of whether it is enabled or not. This is because some ++ * distributions (like Fedora and RHEL) auto-enable the FIPS ++ * provider if the kernel command line contains fips=1. */ ++ puts(pathbuf); ++ } ++ } ++ ++ STACK_OF(CONF_VALUE) *providers_sect = locate_section(cnf, "openssl_conf.providers"); ++ if (providers_sect == NULL) ++ return; ++ ++ for (size_t idx = 0; idx < sk_CONF_VALUE_num(providers_sect); ++idx) { ++ const CONF_VALUE *value = sk_CONF_VALUE_value(providers_sect, idx); ++ /* The section name in the providers section is typically the basename ++ * of the loadable module, unless the section for this provider ++ * contains a 'module' option. */ ++ const OPENSSL_CSTRING provider_name = value->name; ++ const OPENSSL_CSTRING section_name = value->value; ++ ++ if (strcmp(provider_name, "default") == 0 ++ || strcmp(provider_name, "base") == 0 ++ || strcmp(provider_name, "fips") == 0) { ++ /* This is either a builtin provider, which does not exist on disk, ++ * or it was handled earlier. */ ++ continue; ++ } ++ ++ STACK_OF(CONF_VALUE) *section = NCONF_get_section(cnf, section_name); ++ if (section == NULL) { ++ printf("%s/%s.so\n", modulesdir, provider_name); ++ } else { ++ OPENSSL_CSTRING module_path = get_option(section, "module"); ++ if (module_path) { ++ if (*module_path == '/') { ++ puts(module_path); ++ } else { ++ printf("%s/%s\n", modulesdir, module_path); ++ } ++ } else { ++ printf("%s/%s.so\n", modulesdir, provider_name); ++ } ++ } ++ } ++} ++ ++static void list_engines(const CONF *cnf) { ++ const char *enginesdir = OPENSSL_info(OPENSSL_INFO_ENGINES_DIR); ++ ++ STACK_OF(CONF_VALUE) *engines_sect = locate_section(cnf, "openssl_conf.engines"); ++ if (engines_sect == NULL) ++ return; ++ ++ for (size_t idx = 0; idx < sk_CONF_VALUE_num(engines_sect); ++idx) { ++ const CONF_VALUE *value = sk_CONF_VALUE_value(engines_sect, idx); ++ const OPENSSL_CSTRING section_name = value->value; ++ ++ STACK_OF(CONF_VALUE) *section = NCONF_get_section(cnf, section_name); ++ if (section == NULL) ++ continue; ++ OPENSSL_CSTRING dynamic_path = get_option(section, "dynamic_path"); ++ if (dynamic_path == NULL) ++ continue; ++ ++ if (*dynamic_path == '/') { ++ puts(dynamic_path); ++ } else { ++ printf("%s/%s\n", enginesdir, dynamic_path); ++ } ++ } ++} ++ ++ ++/** ++ * Parse the default OpenSSL configuration file (or the one specified in the ++ * OPENSSL_CONF environment variable) and write it back to stdout in ++ * a canonical format with all includes and variables expanded. ++ */ ++int main(int argc, char *argv[]) { ++ struct option long_options[] = { ++ {"config", no_argument, NULL, CONFIG_FILE}, ++ {"engines", no_argument, NULL, ENGINES}, ++ {"providers", no_argument, NULL, PROVIDERS}, ++ {"help", no_argument, NULL, 'h'}, ++ {NULL, 0, NULL, 0}, ++ }; ++ int chosen_options[sizeof(long_options) / sizeof(*long_options) - 2] = {0}; ++ ++ for (size_t idx = 0; idx < sizeof(chosen_options) / sizeof(*chosen_options); idx++) { ++ long_options[idx].flag = &chosen_options[idx]; ++ } ++ ++ int c; ++ char *configfile cleanup(char) = NULL; ++ while (1) { ++ c = getopt_long(argc, argv, "", long_options, NULL); ++ switch (c) { ++ case -1: ++ // end of options ++ goto options_parsed; ++ break; ++ case 0: ++ /* option detected, we use flags to react, so no need for ++ * custom code here. */ ++ break; ++ case 'h': ++ // --help output requested ++ fprintf(stderr, "Usage: %s OPTIONS\n\n", argv[0]); ++ fputs( ++ "OPTIONS are:\n" ++ " --config\n" ++ " Print the path of the OpenSSL configuration file on\n" ++ " this system\n" ++ " --engines\n" ++ " Print the path of any OpenSSL ENGINEs configured in\n" ++ " the configuration file\n" ++ " --providers\n" ++ " Print the path of any OpenSSL providers configured in\n" ++ " the configuration file\n" ++ " --help\n" ++ " Print this help output\n", ++ stderr ++ ); ++ return EXIT_FAILURE; ++ break; ++ case '?': ++ case ':': ++ // error, getopt(3) already printed a message ++ return EXIT_FAILURE; ++ break; ++ default: ++ fprintf(stderr, "getopt(3) returned unexpected character code 0%o\n", c); ++ return EXIT_FAILURE; ++ break; ++ } ++ } ++options_parsed: ++ ++ configfile = CONF_get1_default_config_file(); ++ if (configfile == NULL) { ++ ERR_print_errors_fp(stderr); ++ return EXIT_FAILURE; ++ } ++ ++ CONF *cnf cleanup(CONF) = NCONF_new(NULL); ++ if (cnf == NULL) { ++ ERR_print_errors_fp(stderr); ++ return EXIT_FAILURE; ++ } ++ ++ long eline = 0; ++ if (NCONF_load(cnf, configfile, &eline) == 0) { ++ fprintf(stderr, "Error on line %ld of configuration file\n", eline); ++ ERR_print_errors_fp(stderr); ++ return EXIT_FAILURE; ++ } ++ ++ bool any_chosen = false; ++ for (size_t idx = 0; idx < sizeof(chosen_options) / sizeof(*chosen_options); idx++) { ++ if (chosen_options[idx] != 0) { ++ any_chosen = true; ++ } ++ switch (chosen_options[idx]) { ++ case CONFIG_FILE: ++ puts(configfile); ++ break; ++ case ENGINES: ++ list_engines(cnf); ++ break; ++ case PROVIDERS: ++ list_providers(cnf); ++ break; ++ case PKCS11_MODULES: ++ break; ++ } ++ } ++ ++ if (!any_chosen) { ++ fprintf(stderr, "No options were provided, so no output was produced. See --help for instructions.\n"); ++ return EXIT_FAILURE; ++ } ++ ++ return EXIT_SUCCESS; ++} +diff --git a/src/ossl/tests/config/escapes.cnf b/src/ossl/tests/config/escapes.cnf +new file mode 100644 +index 00000000..9fe2fbc8 +--- /dev/null ++++ b/src/ossl/tests/config/escapes.cnf +@@ -0,0 +1,11 @@ ++openssl_conf = openssl_init ++ ++[test] ++0.recipient = "/C=FI/O=Insta # Demo/CN=Insta Demo CA" ++1.recipient = /C=FI/O=Insta \n Demo/CN=Insta Demo CA ++2.recipient = /C=FI/O=Insta \b Demo/CN=Insta Demo CA ++3.recipient = /C=FI/O=Insta \r Demo/CN=Insta Demo CA ++4.recipient = /C=FI/O=Insta \t Demo/CN=Insta Demo CA ++5.recipient = "/C=FI/O=Insta ' Demo/CN=Insta Demo CA" ++6.recipient = '/C=FI/O=Insta " Demo/CN=Insta Demo CA' ++7.recipient = /C=FI/O=Insta \\ Demo/CN=Insta Demo CA +diff --git a/src/ossl/tests/config/escapes.cnf.expected b/src/ossl/tests/config/escapes.cnf.expected +new file mode 100644 +index 00000000..eff959fc +--- /dev/null ++++ b/src/ossl/tests/config/escapes.cnf.expected +@@ -0,0 +1,12 @@ ++# This configuration file was linarized and expanded from tests/config/escapes.cnf ++openssl_conf = openssl_init ++ ++[test] ++0.recipient = /C=FI/O=Insta \# Demo/CN=Insta Demo CA ++1.recipient = /C=FI/O=Insta \n Demo/CN=Insta Demo CA ++2.recipient = /C=FI/O=Insta \b Demo/CN=Insta Demo CA ++3.recipient = /C=FI/O=Insta \r Demo/CN=Insta Demo CA ++4.recipient = /C=FI/O=Insta \t Demo/CN=Insta Demo CA ++5.recipient = /C=FI/O=Insta \' Demo/CN=Insta Demo CA ++6.recipient = /C=FI/O=Insta \" Demo/CN=Insta Demo CA ++7.recipient = /C=FI/O=Insta \\ Demo/CN=Insta Demo CA +diff --git a/src/ossl/tests/config/included-file.noncnf b/src/ossl/tests/config/included-file.noncnf +new file mode 100644 +index 00000000..51089f51 +--- /dev/null ++++ b/src/ossl/tests/config/included-file.noncnf +@@ -0,0 +1,2 @@ ++[included-file] ++present = true +diff --git a/src/ossl/tests/config/includes.1.d/includes1.cnf b/src/ossl/tests/config/includes.1.d/includes1.cnf +new file mode 100644 +index 00000000..44c17ecd +--- /dev/null ++++ b/src/ossl/tests/config/includes.1.d/includes1.cnf +@@ -0,0 +1,2 @@ ++[includes1] ++cnf-file = present +diff --git a/src/ossl/tests/config/includes.1.d/includes1.conf b/src/ossl/tests/config/includes.1.d/includes1.conf +new file mode 100644 +index 00000000..c6e3c0c6 +--- /dev/null ++++ b/src/ossl/tests/config/includes.1.d/includes1.conf +@@ -0,0 +1,2 @@ ++[includes1] ++conf-file = present +diff --git a/src/ossl/tests/config/includes.1.d/nonconf.bak b/src/ossl/tests/config/includes.1.d/nonconf.bak +new file mode 100644 +index 00000000..f5835c63 +--- /dev/null ++++ b/src/ossl/tests/config/includes.1.d/nonconf.bak +@@ -0,0 +1,2 @@ ++[includes1] ++nonconf = not present +diff --git a/src/ossl/tests/config/includes.2.d/main.cnf b/src/ossl/tests/config/includes.2.d/main.cnf +new file mode 100644 +index 00000000..a9141010 +--- /dev/null ++++ b/src/ossl/tests/config/includes.2.d/main.cnf +@@ -0,0 +1,4 @@ ++[includes2] ++main = present ++ ++.include tests/config/include.2.d/subincludes.d +diff --git a/src/ossl/tests/config/includes.2.d/subincludes.d/subconf.cnf b/src/ossl/tests/config/includes.2.d/subincludes.d/subconf.cnf +new file mode 100644 +index 00000000..9cbf6c7e +--- /dev/null ++++ b/src/ossl/tests/config/includes.2.d/subincludes.d/subconf.cnf +@@ -0,0 +1,2 @@ ++[includes2] ++subconf = absent +diff --git a/src/ossl/tests/config/includes.cnf b/src/ossl/tests/config/includes.cnf +new file mode 100644 +index 00000000..fd243487 +--- /dev/null ++++ b/src/ossl/tests/config/includes.cnf +@@ -0,0 +1,6 @@ ++openssl_conf = openssl_init ++ ++.include = tests/config/includes.1.d ++.include tests/config/includes.2.d ++.include tests/config/nonexistant.d ++.include tests/config/included-file.noncnf +diff --git a/src/ossl/tests/config/includes.cnf.expected b/src/ossl/tests/config/includes.cnf.expected +new file mode 100644 +index 00000000..519729f1 +--- /dev/null ++++ b/src/ossl/tests/config/includes.cnf.expected +@@ -0,0 +1,12 @@ ++# This configuration file was linarized and expanded from tests/config/includes.cnf ++openssl_conf = openssl_init ++ ++[included-file] ++present = true ++ ++[includes1] ++cnf-file = present ++conf-file = present ++ ++[includes2] ++main = present +diff --git a/src/ossl/tests/config/leading-and-trailing-whitespace.cnf b/src/ossl/tests/config/leading-and-trailing-whitespace.cnf +new file mode 100644 +index 00000000..2801bd72 +--- /dev/null ++++ b/src/ossl/tests/config/leading-and-trailing-whitespace.cnf +@@ -0,0 +1,6 @@ ++openssl_conf = openssl_init ++ ++[test] ++0.recipient = " /C=FI/O=Insta Demo/CN=Insta Demo CA" ++1.recipient = "/C=FI/O=Insta Demo/CN=Insta Demo CA " ++2.recipient = " /C=FI/O=Insta Demo/CN=Insta Demo CA " +diff --git a/src/ossl/tests/config/leading-and-trailing-whitespace.cnf.expected b/src/ossl/tests/config/leading-and-trailing-whitespace.cnf.expected +new file mode 100644 +index 00000000..3dd985cc +--- /dev/null ++++ b/src/ossl/tests/config/leading-and-trailing-whitespace.cnf.expected +@@ -0,0 +1,7 @@ ++# This configuration file was linarized and expanded from tests/config/leading-and-trailing-whitespace.cnf ++openssl_conf = openssl_init ++ ++[test] ++0.recipient = " "/C=FI/O=Insta Demo/CN=Insta Demo CA ++1.recipient = /C=FI/O=Insta Demo/CN=Insta Demo CA" " ++2.recipient = " "/C=FI/O=Insta Demo/CN=Insta Demo CA" " +diff --git a/src/ossl/tests/config/order.cnf b/src/ossl/tests/config/order.cnf +new file mode 100644 +index 00000000..89662a1a +--- /dev/null ++++ b/src/ossl/tests/config/order.cnf +@@ -0,0 +1,21 @@ ++# vim:ft=conf ++openssl_conf = openssl_init ++ ++[def] ++# Sections are alphabetically ordered ++0.recipient = 0 ++ ++[abc] ++# Order within sections is preserved, even if it isn't sorted ++7.recipient = 7 ++6.recipient = 6 ++4.recipient = 4 ++3.recipient = 3 ++5.recipient = 5 ++2.recipient = 2 ++1.recipient = 1 ++0.recipient = 0 ++ ++[default] ++# The default section is consolidated and always printed first ++aaatest = value +diff --git a/src/ossl/tests/config/order.cnf.expected b/src/ossl/tests/config/order.cnf.expected +new file mode 100644 +index 00000000..50a62c90 +--- /dev/null ++++ b/src/ossl/tests/config/order.cnf.expected +@@ -0,0 +1,16 @@ ++# This configuration file was linarized and expanded from tests/config/order.cnf ++openssl_conf = openssl_init ++aaatest = value ++ ++[abc] ++7.recipient = 7 ++6.recipient = 6 ++4.recipient = 4 ++3.recipient = 3 ++5.recipient = 5 ++2.recipient = 2 ++1.recipient = 1 ++0.recipient = 0 ++ ++[def] ++0.recipient = 0 +diff --git a/src/ossl/tests/config/variables.cnf b/src/ossl/tests/config/variables.cnf +new file mode 100644 +index 00000000..04916116 +--- /dev/null ++++ b/src/ossl/tests/config/variables.cnf +@@ -0,0 +1,33 @@ ++# vim:ft=conf ++openssl_conf = openssl_init ++ ++default_var = ABC ++nested = "\${default_var}" ++ ++[othersection] ++ ++[test] ++# These should expand to ABC read from the default section ++0.recipient = ${default_var} ++1.recipient = $default_var ++2.recipient = $(default_var) ++# These should expand to DEF as the other section was explicitly referenced ++3.recipient = ${othersection::default_var} ++4.recipient = $othersection::default_var ++5.recipient = $(othersection::default_var) ++ ++[test2] ++default_var = GHI ++# These should expand to GHI since the local section is always searched first ++0.recipient = ${default_var} ++1.recipient = $default_var ++ ++[test3] ++.pragma dollarid:on ++# Out of these, the first should contain the literal "$default_var", the others should expand ++0.recipient = literal$default_var ++1.recipient = expanded${default_var} ++2.recipient = expanded$(default_var) ++ ++[test4] ++recipient = literal$nested +diff --git a/src/ossl/tests/config/variables.cnf.expected b/src/ossl/tests/config/variables.cnf.expected +new file mode 100644 +index 00000000..a2bccf23 +--- /dev/null ++++ b/src/ossl/tests/config/variables.cnf.expected +@@ -0,0 +1,27 @@ ++# This configuration file was linarized and expanded from tests/config/variables.cnf ++openssl_conf = openssl_init ++default_var = ABC ++nested = \${default_var} ++ ++[othersection] ++ ++[test] ++0.recipient = ABC ++1.recipient = ABC ++2.recipient = ABC ++3.recipient = ABC ++4.recipient = ABC ++5.recipient = ABC ++ ++[test2] ++default_var = GHI ++0.recipient = GHI ++1.recipient = GHI ++ ++[test3] ++0.recipient = literal\$default_var ++1.recipient = expandedABC ++2.recipient = expandedABC ++ ++[test4] ++recipient = literal\$nested +diff --git a/src/ossl/tests/files/engines.cnf b/src/ossl/tests/files/engines.cnf +new file mode 100644 +index 00000000..5ca8be01 +--- /dev/null ++++ b/src/ossl/tests/files/engines.cnf +@@ -0,0 +1,22 @@ ++openssl_conf = openssl_init ++ ++[openssl_init] ++engines = engines_sect ++ ++[engines_sect] ++afalg = afalg_sect ++loader_attic = loader_attic_sect ++pkcs11 = pkcs11_sect ++ ++[afalg_sect] ++dynamic_path = afalg.so ++ ++[loader_attic_sect] ++dynamic_path = /usr/lib64/engines-3/loader_attic.so ++init = 1 ++ ++[pkcs11_sect] ++engine_id = pkcs11 ++dynamic_path = /usr/lib64/engines-3/libpkcs11.so ++MODULE_PATH = opensc-pkcs11.so ++init = 1 +diff --git a/src/ossl/tests/files/engines.cnf.expected b/src/ossl/tests/files/engines.cnf.expected +new file mode 100644 +index 00000000..2d60cc52 +--- /dev/null ++++ b/src/ossl/tests/files/engines.cnf.expected +@@ -0,0 +1,4 @@ ++/usr/lib64/engines-3/afalg.so ++/usr/lib64/engines-3/loader_attic.so ++/usr/lib64/engines-3/libpkcs11.so ++/usr/lib64/ossl-modules/fips.so +diff --git a/src/ossl/tests/files/providers.cnf b/src/ossl/tests/files/providers.cnf +new file mode 100644 +index 00000000..fee4c826 +--- /dev/null ++++ b/src/ossl/tests/files/providers.cnf +@@ -0,0 +1,31 @@ ++openssl_conf = openssl_init ++ ++[openssl_init] ++providers = providers_sect ++ ++[providers_sect] ++default = default_sect ++fips = fips_sect ++legacy = legacy_sect ++base = base_sect ++pkcs11 = pkcs11_sect ++oqs = oqs_sect ++ ++[default_sect] ++activate = 1 ++ ++[fips_sect] ++activate = 1 ++ ++[legacy_sect] ++activate = 1 ++ ++[base_sect] ++activate = 1 ++ ++[pkcs11_sect] ++activate = 1 ++ ++[oqs_sect] ++activate = 1 ++module = /usr/lib64/ossl-modules/oqsprovider.so.0.6.0 +diff --git a/src/ossl/tests/files/providers.cnf.expected b/src/ossl/tests/files/providers.cnf.expected +new file mode 100644 +index 00000000..23b1b7de +--- /dev/null ++++ b/src/ossl/tests/files/providers.cnf.expected +@@ -0,0 +1,4 @@ ++/usr/lib64/ossl-modules/fips.so ++/usr/lib64/ossl-modules/legacy.so ++/usr/lib64/ossl-modules/pkcs11.so ++/usr/lib64/ossl-modules/oqsprovider.so.0.6.0 +-- +2.47.1 + diff --git a/0014-fix-openssl-harden-ossl-build-CFLAGS.patch b/0014-fix-openssl-harden-ossl-build-CFLAGS.patch new file mode 100644 index 0000000..17c051e --- /dev/null +++ b/0014-fix-openssl-harden-ossl-build-CFLAGS.patch @@ -0,0 +1,26 @@ +From a5e477c67c45b4439249ab92590f7b67dab4f7df Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 17 Feb 2025 06:58:26 +0100 +Subject: [PATCH 14/14] fix(openssl): harden ossl build CFLAGS + +Related: RHEL-76323 +--- + src/ossl/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ossl/Makefile b/src/ossl/Makefile +index 17b418c2..200dcbb5 100644 +--- a/src/ossl/Makefile ++++ b/src/ossl/Makefile +@@ -1,7 +1,7 @@ + .PHONY: all clean tests + + CFLAGS ?= -std=c99 -Wall -Werror -pedantic -D_XOPEN_SOURCE=600 +-CRYPTO_FLAGS = -lcrypto ++CRYPTO_FLAGS = -lcrypto -Wl,-pie -Wl,-z,now + TARGETS = src/ossl-config src/ossl-files + + TESTS_CONFIG = $(wildcard tests/config/*.cnf) +-- +2.47.1 + diff --git a/0015-fix-ossl-copy-executables-for-the-test-suite.patch b/0015-fix-ossl-copy-executables-for-the-test-suite.patch new file mode 100644 index 0000000..e33b93b --- /dev/null +++ b/0015-fix-ossl-copy-executables-for-the-test-suite.patch @@ -0,0 +1,85 @@ +From d4b71c7fc24ba1245a86c41f904b05a18cbe3e15 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 17 Feb 2025 17:31:35 +0100 +Subject: [PATCH 15/15] fix(ossl): copy executables for the test suite + +and also fix CFLAGS in case of std=c99. + +Related: RHEL-76323 +--- + Makefile | 20 ++++++++++++-------- + src/ossl/Makefile | 2 +- + 2 files changed, 13 insertions(+), 9 deletions(-) + +diff --git a/Makefile b/Makefile +index 4bc88561..51095b0a 100644 +--- a/Makefile ++++ b/Makefile +@@ -88,11 +88,14 @@ util/util: $(UTIL_OBJECTS) + dracut-util: src/util/util + cp -a $< $@ + +-ossl: src/ossl/Makefile ++ossl: + $(MAKE) -C src/ossl + + ossl-config: ossl ++ cp -a src/ossl/src/ossl-config $@ ++ + ossl-files: ossl ++ cp -a src/ossl/src/ossl-files $@ + + .PHONY: indent-c + indent-c: +@@ -205,20 +208,20 @@ endif + $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \ + done \ + fi +- if [ -f src/install/dracut-install ]; then \ ++ if [ -r src/install/dracut-install ]; then \ + install -m 0755 src/install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ + fi +- if [ -f src/skipcpio/skipcpio ]; then \ ++ if [ -r src/skipcpio/skipcpio ]; then \ + install -m 0755 src/skipcpio/skipcpio $(DESTDIR)$(pkglibdir)/skipcpio; \ + fi +- if [ -f dracut-util ]; then \ ++ if [ -r dracut-util ]; then \ + install -m 0755 dracut-util $(DESTDIR)$(pkglibdir)/dracut-util; \ + fi +- if [ -f src/ossl/src/ossl-config ]; then \ +- install -m 0755 src/ossl/src/ossl-config $(DESTDIR)$(pkglibdir)/ossl-config; \ ++ if [ -r ossl-config ]; then \ ++ install -m 0755 ossl-config $(DESTDIR)$(pkglibdir)/ossl-config; \ + fi +- if [ -f src/ossl/src/ossl-files ]; then \ +- install -m 0755 src/ossl/src/ossl-files $(DESTDIR)$(pkglibdir)/ossl-files; \ ++ if [ -r ossl-files ]; then \ ++ install -m 0755 ossl-files $(DESTDIR)$(pkglibdir)/ossl-files; \ + fi + ifeq ($(enable_dracut_cpio),yes) + install -m 0755 dracut-cpio $(DESTDIR)$(pkglibdir)/dracut-cpio +@@ -245,6 +248,7 @@ clean: + $(RM) $(manpages) + $(RM) dracut.pc + $(RM) dracut-cpio src/dracut-cpio/target/release/dracut-cpio* ++ $(RM) ossl-files ossl-config + $(MAKE) -C test clean + $(MAKE) -C src/ossl clean + +diff --git a/src/ossl/Makefile b/src/ossl/Makefile +index 200dcbb5..43e7b464 100644 +--- a/src/ossl/Makefile ++++ b/src/ossl/Makefile +@@ -1,7 +1,7 @@ + .PHONY: all clean tests + + CFLAGS ?= -std=c99 -Wall -Werror -pedantic -D_XOPEN_SOURCE=600 +-CRYPTO_FLAGS = -lcrypto -Wl,-pie -Wl,-z,now ++CRYPTO_FLAGS = -lcrypto -Wl,-pie -Wl,-z,now -fPIE + TARGETS = src/ossl-config src/ossl-files + + TESTS_CONFIG = $(wildcard tests/config/*.cnf) +-- +2.47.1 + diff --git a/0016-fix-rescue-create-hmac-file-for-rescue-kernel.patch b/0016-fix-rescue-create-hmac-file-for-rescue-kernel.patch new file mode 100644 index 0000000..47a3d67 --- /dev/null +++ b/0016-fix-rescue-create-hmac-file-for-rescue-kernel.patch @@ -0,0 +1,35 @@ +From 687582799c466e215229336ad6cf6dd3e050c326 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Thu, 6 Mar 2025 14:23:27 +0100 +Subject: [PATCH 16/16] fix(rescue): create hmac file for rescue kernel + +Resolves: RHEL-59543 +--- + install.d/51-dracut-rescue.install | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index 1be9b882..030f45ba 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -117,6 +117,17 @@ case "$COMMAND" in + echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2 + fi + ++ HMAC=".${KERNEL}.hmac" ++ ++ KERNEL_DIR="${KERNEL_IMAGE%/*}" ++ KERNEL_FILE="${KERNEL_IMAGE##*/}" ++ ++ HMAC_FILE="${KERNEL_DIR}/.${KERNEL_FILE}.hmac" ++ ++ if ! sed -E "s/([0-9a-f]+)(\s+).*$/\1\2${KERNEL}/" "$HMAC_FILE" > "$BOOT_DIR_ABS/$HMAC"; then ++ echo "Can't create '$BOOT_DIR_ABS/$HMAC' from '$HMAC_FILE'!" >&2 ++ fi ++ + if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then + # shellcheck disable=SC2046 + dracut -f --no-hostonly --no-uefi \ +-- +2.48.1 + diff --git a/SOURCES/0001.patch b/SOURCES/0001.patch deleted file mode 100644 index 909aec1..0000000 --- a/SOURCES/0001.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 3cb0f01a1e8a05dd4c6412907f5e9a398b2ace2c Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - - diff --git a/SOURCES/0002.patch b/SOURCES/0002.patch deleted file mode 100644 index 0d63bf8..0000000 --- a/SOURCES/0002.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2e5265c80e03112c75888a31c170963e913070ed Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - diff --git a/SOURCES/0003.patch b/SOURCES/0003.patch deleted file mode 100644 index c385522..0000000 --- a/SOURCES/0003.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 44c9d019d88df05f69f2112aeae34bdbff61cee6 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 - - diff --git a/SOURCES/0004.patch b/SOURCES/0004.patch deleted file mode 100644 index 3aff94b..0000000 --- a/SOURCES/0004.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 3b9b20d237b3ec939b1bf9dd065c875fee54fe63 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 - -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 " - diff --git a/SOURCES/0005.patch b/SOURCES/0005.patch deleted file mode 100644 index 1ff4258..0000000 --- a/SOURCES/0005.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b63e0c5040d9881f8c3c0bc09fc21c6588c8a26f Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 - -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 - diff --git a/SOURCES/0006.patch b/SOURCES/0006.patch deleted file mode 100644 index e03762e..0000000 --- a/SOURCES/0006.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5541b0c46f02f678c698aa523db7a86dde82a947 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - - diff --git a/SOURCES/0007.patch b/SOURCES/0007.patch deleted file mode 100644 index ac24ddf..0000000 --- a/SOURCES/0007.patch +++ /dev/null @@ -1,41 +0,0 @@ -From d8386b5d8fae2e45a27635c48ecab63abba10e39 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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; \ - diff --git a/SOURCES/0008.patch b/SOURCES/0008.patch deleted file mode 100644 index 003e514..0000000 --- a/SOURCES/0008.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 90054e4f1f2f64cb9a2b06b44b5a82b293c387dd Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - diff --git a/SOURCES/0009.patch b/SOURCES/0009.patch deleted file mode 100644 index c93daeb..0000000 --- a/SOURCES/0009.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e44c26f0fc6b29fb42cbc6d5ab57e34b07aa2ce1 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - diff --git a/SOURCES/0010.patch b/SOURCES/0010.patch deleted file mode 100644 index 59fca50..0000000 --- a/SOURCES/0010.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c787ad30ab5467c9f3c740a1cd7ed8b3198b9719 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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= means anaconda-style static config argument cluster - autoconf="$1" - -- if strstr "$autoconf" "*.*.*.*"; then -+ if strglob "$autoconf" "*.*.*.*"; then - # ip= means anaconda-style static config argument cluster: - # ip= gateway= netmask= hostname= mtu= - # ksdevice={link|bootif|ibft||} - diff --git a/SOURCES/0011.patch b/SOURCES/0011.patch deleted file mode 100644 index 190a00d..0000000 --- a/SOURCES/0011.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 81b59fbbd6ebeee05b5d6869ae4f36bb9e486f72 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - - diff --git a/SOURCES/0012.patch b/SOURCES/0012.patch deleted file mode 100644 index 92e1758..0000000 --- a/SOURCES/0012.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 9c54932f590fd7accadc780c6ee946a94286b7e6 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - diff --git a/SOURCES/0013.patch b/SOURCES/0013.patch deleted file mode 100644 index b15e070..0000000 --- a/SOURCES/0013.patch +++ /dev/null @@ -1,51 +0,0 @@ -From a1435c3d535707f1d21aaf85e62175ff2bb1ad2b Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 -Signed-off-by: Kairui Song ---- - 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 - diff --git a/SOURCES/0014.patch b/SOURCES/0014.patch deleted file mode 100644 index 4247482..0000000 --- a/SOURCES/0014.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7c35556da4c803bbb08c96e96262e598d5c42274 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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 - diff --git a/SOURCES/0015.patch b/SOURCES/0015.patch deleted file mode 100644 index f79f1e7..0000000 --- a/SOURCES/0015.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 4971a2c4eb4526cb88a5c9aff30c57527a746036 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 " - diff --git a/SOURCES/0016.patch b/SOURCES/0016.patch deleted file mode 100644 index 57aed12..0000000 --- a/SOURCES/0016.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 31116110ff0090324a568ce2aba6519a860d66b3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -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 -(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 -+# -+# 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 . -+# -+ -+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 - diff --git a/SOURCES/0017.patch b/SOURCES/0017.patch deleted file mode 100644 index 899efb3..0000000 --- a/SOURCES/0017.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d86dfcd148e5d726f00b8a83eeadb11aa0017fba Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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 - diff --git a/SOURCES/0018.patch b/SOURCES/0018.patch deleted file mode 100644 index 8e21561..0000000 --- a/SOURCES/0018.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 927428e6a5e90b2214ee9edf15d4eb6c0fc5c203 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 -(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 - diff --git a/SOURCES/0019.patch b/SOURCES/0019.patch deleted file mode 100644 index 6b7cac8..0000000 --- a/SOURCES/0019.patch +++ /dev/null @@ -1,71 +0,0 @@ -From b6d52b504fc7eefc3f405f75463d9e818471ee99 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 -(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 - } - - diff --git a/SOURCES/0020.patch b/SOURCES/0020.patch deleted file mode 100644 index 64dfdff..0000000 --- a/SOURCES/0020.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 829ed8ef5cca250fac475ad6b0265c792c3af015 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 -(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 - diff --git a/SOURCES/0021.patch b/SOURCES/0021.patch deleted file mode 100644 index ed54a76..0000000 --- a/SOURCES/0021.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 7ee74e539dba61c3765afe34426b085eff0de027 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 -(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 - } - diff --git a/SOURCES/0022.patch b/SOURCES/0022.patch deleted file mode 100644 index 4bcd5e4..0000000 --- a/SOURCES/0022.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 17cd55169c3549d85ba3e4d7e0e81c496d1b2940 Mon Sep 17 00:00:00 2001 -From: Lianbo Jiang -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 -Signed-off-by: Lianbo Jiang -(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 - diff --git a/SOURCES/0023.patch b/SOURCES/0023.patch deleted file mode 100644 index e0d31d5..0000000 --- a/SOURCES/0023.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 1851348709df5413a767faecdee908534baf0da1 Mon Sep 17 00:00:00 2001 -From: Kairui Song -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 -(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 - - diff --git a/SOURCES/0024.patch b/SOURCES/0024.patch deleted file mode 100644 index 28b2e15..0000000 --- a/SOURCES/0024.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9b2497dffb8f699ce040cdbafa967f5fe02b57b6 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - diff --git a/SOURCES/0025.patch b/SOURCES/0025.patch deleted file mode 100644 index 664f9be..0000000 --- a/SOURCES/0025.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3464297288b50a062e1094e57d46ad21e51b351b Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -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 - } - - diff --git a/SOURCES/0026.patch b/SOURCES/0026.patch deleted file mode 100644 index 2c2c621..0000000 --- a/SOURCES/0026.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 95bbcaa8550534f03b332487ef3a2ed6650424fe Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -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; - - diff --git a/SOURCES/0027.patch b/SOURCES/0027.patch deleted file mode 100644 index cf5627e..0000000 --- a/SOURCES/0027.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d3f542cc9d0135a408be7ba995b8adad80bcd606 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -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 || : - diff --git a/SOURCES/0028.patch b/SOURCES/0028.patch deleted file mode 100644 index 0203f97..0000000 --- a/SOURCES/0028.patch +++ /dev/null @@ -1,98 +0,0 @@ -From e3b2b02c7f5b4e9f1d2a3cfe8749534959e29e3e Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - - diff --git a/SOURCES/0029.patch b/SOURCES/0029.patch deleted file mode 100644 index b80d988..0000000 --- a/SOURCES/0029.patch +++ /dev/null @@ -1,79 +0,0 @@ -From e671c3a06a7e58461d4e9c9f3546cf6eac809300 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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 - - diff --git a/SOURCES/0030.patch b/SOURCES/0030.patch deleted file mode 100644 index f0a13c5..0000000 --- a/SOURCES/0030.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 50192de38d756203a414405e2d7552e89b1c0423 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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} - diff --git a/SOURCES/0031.patch b/SOURCES/0031.patch deleted file mode 100644 index b0741b9..0000000 --- a/SOURCES/0031.patch +++ /dev/null @@ -1,43 +0,0 @@ -From bf69beb6f3824b1ebed221c8255d1f5c9efd136a Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0032.patch b/SOURCES/0032.patch deleted file mode 100644 index b849baf..0000000 --- a/SOURCES/0032.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 0f0b8c8f90cbcd56140e85b9997deda906c71118 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0033.patch b/SOURCES/0033.patch deleted file mode 100644 index e45f147..0000000 --- a/SOURCES/0033.patch +++ /dev/null @@ -1,346 +0,0 @@ -From e35e43c1c28a8935660fe72650614e5dc1defb65 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - - diff --git a/SOURCES/0034.patch b/SOURCES/0034.patch deleted file mode 100644 index f9f8d59..0000000 --- a/SOURCES/0034.patch +++ /dev/null @@ -1,229 +0,0 @@ -From a34b1baa6ca45b420399ec4cefe3cfe225c14dcf Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 <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 < -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 - - diff --git a/SOURCES/0036.patch b/SOURCES/0036.patch deleted file mode 100644 index 4e3f921..0000000 --- a/SOURCES/0036.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c60f4fc027272c221a887128070ac89547b6ecc3 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0037.patch b/SOURCES/0037.patch deleted file mode 100644 index 5d067a6..0000000 --- a/SOURCES/0037.patch +++ /dev/null @@ -1,53 +0,0 @@ -From d8f0e52ac7d05c364ca24d2058c970e5e03f82ff Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - - diff --git a/SOURCES/0038.patch b/SOURCES/0038.patch deleted file mode 100644 index 43acb72..0000000 --- a/SOURCES/0038.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8eb08e55286e77f005246d1db1bfd2adf4a0e40b Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0039.patch b/SOURCES/0039.patch deleted file mode 100644 index df4625b..0000000 --- a/SOURCES/0039.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 34011ee53e745f74d70bc5b52dade6d4ef349e90 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0040.patch b/SOURCES/0040.patch deleted file mode 100644 index e2fa551..0000000 --- a/SOURCES/0040.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 94c75a2a827ff09ffac18454d5c4ba4756d721d6 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0041.patch b/SOURCES/0041.patch deleted file mode 100644 index 52083c3..0000000 --- a/SOURCES/0041.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 68fefe6f9424d3f29e6da9133579c385e7b470b2 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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) - diff --git a/SOURCES/0042.patch b/SOURCES/0042.patch deleted file mode 100644 index 3bf3074..0000000 --- a/SOURCES/0042.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 53cece208a44c53ecc001cb8eb769f6fb9b3d1dc Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - } - diff --git a/SOURCES/0043.patch b/SOURCES/0043.patch deleted file mode 100644 index b59dc53..0000000 --- a/SOURCES/0043.patch +++ /dev/null @@ -1,620 +0,0 @@ -From 4e10601254bb20891dc2919416d7151583678c3d Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 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 - diff --git a/SOURCES/0044.patch b/SOURCES/0044.patch deleted file mode 100644 index b2c4f7f..0000000 --- a/SOURCES/0044.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 3b89c398895abe5fc62e3c9240718310222925ef Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0045.patch b/SOURCES/0045.patch deleted file mode 100644 index 2c2ccca..0000000 --- a/SOURCES/0045.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 15ff303dde65e97ba224a9f2cc6275cbaafee52c Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0046.patch b/SOURCES/0046.patch deleted file mode 100644 index 0a30c85..0000000 --- a/SOURCES/0046.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 96976e84e2c8544ab32026f05da8a35b9c48b2e5 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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} - diff --git a/SOURCES/0047.patch b/SOURCES/0047.patch deleted file mode 100644 index e30ed6a..0000000 --- a/SOURCES/0047.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 08961eef2ad09e4ce38ee034baf4e8c2b3934cd1 Mon Sep 17 00:00:00 2001 -From: Benjamin Marzinski -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" - diff --git a/SOURCES/0048.patch b/SOURCES/0048.patch deleted file mode 100644 index 1dd087a..0000000 --- a/SOURCES/0048.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b59ae228851713f645751742136e34b854b0712a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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 - diff --git a/SOURCES/0049.patch b/SOURCES/0049.patch deleted file mode 100644 index e23f5fd..0000000 --- a/SOURCES/0049.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 4ef5cdc120bdbb348345c964a19affbb3ca1fa32 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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 - diff --git a/SOURCES/0050.patch b/SOURCES/0050.patch deleted file mode 100644 index 413d8b7..0000000 --- a/SOURCES/0050.patch +++ /dev/null @@ -1,23 +0,0 @@ -From fe44aa1b14f427245bdfb2026f2211a19b52f5e3 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -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 - diff --git a/SOURCES/0051.patch b/SOURCES/0051.patch deleted file mode 100644 index 158b434..0000000 --- a/SOURCES/0051.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 81babdedec8c6f7b23bbf0e3418126c4f9e5e15f Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -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 - diff --git a/SOURCES/0052.patch b/SOURCES/0052.patch deleted file mode 100644 index 5a338e0..0000000 --- a/SOURCES/0052.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7843bc52777683f6a4ef953d8dde7171ff3b911c Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 - diff --git a/SOURCES/0053.patch b/SOURCES/0053.patch deleted file mode 100644 index ef9e265..0000000 --- a/SOURCES/0053.patch +++ /dev/null @@ -1,32 +0,0 @@ -From dcbc74b01bfb360eecadb8e59480472b86fe63d0 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 09:35:41 -0400 -Subject: [PATCH] 01fips: fix HMAC file path resolution - -There is a small regression in #343: when handling the 'separate boot -partition' case, we're checking for the kernel image in the wrong -location: `BOOT_IMAGE` is the `/boot`-relative path to the kernel image, -so `/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}` expands to e.g. -`/boot/mysubdir1/mysubdir2/mysubdir1/mysubdir2/vmlinuz...`. - -We should be using `BOOT_IMAGE_NAME` here instead (and in fact, the next -if-statement does this correctly, so it might've just been accidentally -left out of #343). ---- - modules.d/01fips/fips.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index beaa692b..c3dbcf74 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -118,7 +118,7 @@ do_fips() - - if [ -z "$BOOT_IMAGE_NAME" ]; then - BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" -- elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then -+ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then - #if /boot is not a separate partition BOOT_IMAGE might start with /boot - BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"} - #on some achitectures BOOT_IMAGE does not contain path to kernel - diff --git a/SOURCES/0054.patch b/SOURCES/0054.patch deleted file mode 100644 index 489c715..0000000 --- a/SOURCES/0054.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 14310ca42f06c2156ab5cefd05dbaa47ae3b054d Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 16:47:34 -0400 -Subject: [PATCH] 01fips: run sha512hmac from directory HMAC file directory - -That way, the HMAC file can contain a relative path instead of an -absolute one. The issue is that right now the kernel RPM bakes the -`/boot/vmlinuz-${kver}` path into the HMAC file which poses an issue for -rpm-ostree systems (and any other system where the kernel isn't simply -in the top-level `/boot`. - -For now, we're hacking around this in rpm-ostree: -https://github.com/coreos/rpm-ostree/pull/1934 - -Though I'd like to propose the same change in the kernel spec file. ---- - modules.d/01fips/fips.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index c3dbcf74..893143d0 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -135,7 +135,7 @@ do_fips() - return 1 - fi - -- sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 -+ (cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1 - fi - - info "All initrd crypto checks done" - diff --git a/SOURCES/0055.patch b/SOURCES/0055.patch deleted file mode 100644 index 2d59629..0000000 --- a/SOURCES/0055.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 89dcbbe92f008f6c4ebccfedf09d32bab4a575e5 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 16:53:00 -0400 -Subject: [PATCH] 01fips: add / in BOOT_IMAGE_HMAC filename for clarity - -It's already the case the `BOOT_IMAGE_PATH` today, in the non-empty -case, includes a trailing `/`, but let's add it to the path we build -here too to make it more obvious. ---- - modules.d/01fips/fips.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 893143d0..de2755b0 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -129,7 +129,7 @@ do_fips() - fi - fi - -- BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}.${BOOT_IMAGE_NAME}.hmac" -+ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac" - if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then - warn "${BOOT_IMAGE_HMAC} does not exist" - return 1 - diff --git a/SOURCES/0056.patch b/SOURCES/0056.patch deleted file mode 100644 index 90ac5a9..0000000 --- a/SOURCES/0056.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 9e8f172dc01f7e013bb5d302ef6c90e2dc6b30c8 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 29 Oct 2019 16:54:10 -0400 -Subject: [PATCH] 01fips: trim off GRUB boot device from BOOT_IMAGE - -E.g. in RHCOS, the `BOOT_IMAGE` from the cmdline is: - -(hd0,gpt1)/ostree/rhcos-e493371e5ee8407889029ec979955a2b86fd7e3cae5a0591b9db1cd248d966e8/vmlinuz-4.18.0-146.el8.x86_64 - -Which of course is a GRUB thing, not an actual pathname we'll be able to -resolve. In fact, we can simply scrap it off from the variable. Our code -is already able to handle both cases: whether the device refers to a -separate boot partition, or just the root filesystem with a regular -`/boot` directory. ---- - modules.d/01fips/fips.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index de2755b0..559952ca 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -113,6 +113,10 @@ do_fips() - do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 - else - BOOT_IMAGE="$(getarg BOOT_IMAGE)" -+ -+ # Trim off any leading GRUB boot device (e.g. ($root) ) -+ BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')" -+ - BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}" - BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}" - - diff --git a/SOURCES/0057.patch b/SOURCES/0057.patch deleted file mode 100644 index 0729b82..0000000 --- a/SOURCES/0057.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 346e57c1b6af4e2cfdbaae64941f2f3b8454a944 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 29 Nov 2019 13:29:23 +0100 -Subject: [PATCH] always include sg module - -RHEL-only -Resolves:#1579763 ---- - modules.d/00systemd/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 1ed4b34f..ed177826 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -18,7 +18,7 @@ depends() { - } - - installkernel() { -- hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256 -+ hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256 sg - instmods -s efivarfs - } - - diff --git a/SOURCES/0058.patch b/SOURCES/0058.patch deleted file mode 100644 index 728e07b..0000000 --- a/SOURCES/0058.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 8061a432844d1f780d9b18144def0faef0145c0c Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 7 Oct 2019 16:48:09 +0200 -Subject: [PATCH] net-lib: check if addr exists before checking for dad state - -Before we check if dad is done we should first make sure, -that there is a link local address where we do the check. - -Due to this issue, on ipv6 only setups sometimes dhclient started -asking for ip address, before the link local address was present -and failed immediately. - -(cherry picked from commit daa49cc2216d6387541ef36e8427081f6b02f224) - -Resolves: #1765014 ---- - modules.d/40network/net-lib.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index ad78d225..dcb53804 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -653,7 +653,8 @@ wait_for_ipv6_dad_link() { - timeout=$(($timeout*10)) - - while [ $cnt -lt $timeout ]; do -- [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ -+ [ -n "$(ip -6 addr show dev "$1" scope link)" ] \ -+ && [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ - && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ - && return 0 - [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ -@@ -671,7 +672,8 @@ wait_for_ipv6_dad() { - timeout=$(($timeout*10)) - - while [ $cnt -lt $timeout ]; do -- [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ -+ [ -n "$(ip -6 addr show dev "$1")" ] \ -+ && [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ - && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ - && return 0 - [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ - diff --git a/SOURCES/0059.patch b/SOURCES/0059.patch deleted file mode 100644 index 625a662..0000000 --- a/SOURCES/0059.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 2caaf8b9ba5b95983154bd641f0f493ff1562cc0 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 6 Aug 2019 15:39:31 +0800 -Subject: [PATCH] 99squash: Only start the cleaner on switch-root - -Currently it starts the cleaner early and do the clean up job if switch -root is called. It's better to just start the service only on switch -root to avoid any risk of service dependency failure and make is -simpler. - -Signed-off-by: Kairui Song -(cherry picked from commit 5d88809319049eb06e3472dcd11cca9c4557d8c2) - -Resolves: #1678248 ---- - modules.d/99squash/module-setup.sh | 3 ++- - modules.d/99squash/squash-mnt-clear.service | 11 ++++------- - 2 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 935fd721..e7e9ed8e 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -25,5 +25,6 @@ install() { - inst $moddir/init.sh /squash/init.sh - - inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service" -- ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd.target.wants/squash-mnt-clear.service" -+ mkdir -p "$initdir$systemdsystemunitdir/initrd-switch-root.target.wants" -+ ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd-switch-root.target.wants/squash-mnt-clear.service" - } -diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service -index f8d5db46..84441f60 100644 ---- a/modules.d/99squash/squash-mnt-clear.service -+++ b/modules.d/99squash/squash-mnt-clear.service -@@ -4,17 +4,14 @@ - [Unit] - Description=Cleanup squashfs mounts when switch root - DefaultDependencies=no --After=initrd.target --After=dracut-initqueue.service dracut-pre-pivot.service --Before=initrd-cleanup.service -+Before=initrd-switch-root.service -+After=initrd-switch-root.target - ConditionPathExists=/squash/root --Conflicts=initrd-switch-root.target --IgnoreOnIsolate=true - - [Service] - Type=oneshot --RemainAfterExit=yes -+RemainAfterExit=no - StandardInput=null - StandardOutput=syslog+console - StandardError=syslog+console --ExecStop=/squash/clear-squash.sh -+ExecStart=/squash/clear-squash.sh - diff --git a/SOURCES/0060.patch b/SOURCES/0060.patch deleted file mode 100644 index 1160079..0000000 --- a/SOURCES/0060.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ab679e91396a21489999c0acc9243415cb3235db Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Tue, 7 Jan 2020 20:53:53 +0000 -Subject: [PATCH] modules/network-manager: Install `ip` - -We don't need `ip` but having it is *really* useful for people debugging -in an emergency shell. - -(cherry picked from commit 7fea85ce5f313445a260b5eb7bd7466217479d99) - -Resolves: #1784358 ---- - modules.d/35network-manager/module-setup.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh -index 62aba3c6..d6d0f9ce 100755 ---- a/modules.d/35network-manager/module-setup.sh -+++ b/modules.d/35network-manager/module-setup.sh -@@ -26,7 +26,9 @@ install() { - - _nm_version=$(NetworkManager --version) - -- inst_multiple sed grep -+ # We don't need `ip` but having it is *really* useful for people debugging -+ # in an emergency shell. -+ inst_multiple ip sed grep - - inst NetworkManager - inst /usr/libexec/nm-initrd-generator - diff --git a/SOURCES/0061.patch b/SOURCES/0061.patch deleted file mode 100644 index efbe84d..0000000 --- a/SOURCES/0061.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7164155795f3f257cd119846de0b2a802a6a52c5 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 9 Jan 2020 10:49:52 +0100 -Subject: [PATCH] network-legacy/ifup: dhclient should be started in oneshot - mode - -since we handle the retries explicitly via rd.net.dhcp.retry - -Without -1 if user sets ip=dhcp6 and there is no dhcp on the network, -dhclient seems to wait indefinitely, ignoring rd.net.timeout.dhcp - -(cherry picked from commit 2181c80c91f05bfae5e50de2f502e363b0219bae) - -Resolves: #1787620 ---- - modules.d/35network-legacy/ifup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index b4f5bf10..bfb57ad5 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -52,6 +52,7 @@ do_dhcp() { - dhclient "$@" \ - ${_timeout:+-timeout $_timeout} \ - -q \ -+ -1 \ - -cf /etc/dhclient.conf \ - -pf /tmp/dhclient.$netif.pid \ - -lf /tmp/dhclient.$netif.lease \ - diff --git a/SOURCES/0062.patch b/SOURCES/0062.patch deleted file mode 100644 index f082cac..0000000 --- a/SOURCES/0062.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d20eb7b7b2a50f29ac02bd6b6d80113d495849ed Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Wed, 8 Jan 2020 16:20:29 +0100 -Subject: [PATCH] network-legacy/ifup: fix typo when calling dhclient --timeout - -(cherry picked from commit 212043f94dde1693d777e933945138747537f12f) - -Resolves: #1787620 ---- - modules.d/35network-legacy/ifup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index bfb57ad5..16b950be 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -50,7 +50,7 @@ do_dhcp() { - while [ $_COUNT -lt $_DHCPRETRY ]; do - info "Starting dhcp for interface $netif" - dhclient "$@" \ -- ${_timeout:+-timeout $_timeout} \ -+ ${_timeout:+--timeout $_timeout} \ - -q \ - -1 \ - -cf /etc/dhclient.conf \ - diff --git a/SOURCES/0063.patch b/SOURCES/0063.patch deleted file mode 100644 index 54fb550..0000000 --- a/SOURCES/0063.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 46a8b8e9e7f150c2a17d4adeacb25ccf003ec425 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Tue, 21 Jan 2020 17:57:31 -0500 -Subject: [PATCH] network-legacy/ifup: nuke pid and lease files if dhclient - failed - -Otherwise we won't retry dhclient again on that interface. In -FCOS/RHCOS, we want to bake in `ip=dhcp,dhcp6` so we automatically try -getting a DHCPv6 lease if DHCPv4 failed. - -Related: https://bugzilla.redhat.com/show_bug.cgi?id=1793591 -(cherry picked from commit d0de58f23252a9da4a8badd71777e7c8418fa4b7) ---- - modules.d/35network-legacy/ifup.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index 16b950be..dd18d70b 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -62,6 +62,9 @@ do_dhcp() { - [ $_COUNT -lt $_DHCPRETRY ] && sleep 1 - done - warn "dhcp for interface $netif failed" -+ # nuke those files since we failed; we might retry dhcp again if it's e.g. -+ # `ip=dhcp,dhcp6` and we check for the PID file at the top -+ rm -f /tmp/dhclient.$netif.{pid,lease} - return 1 - } - - diff --git a/SOURCES/0064.patch b/SOURCES/0064.patch deleted file mode 100644 index 807d03f..0000000 --- a/SOURCES/0064.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 86d48f5c45d2d2c19cb575fa377763c069e57b8a Mon Sep 17 00:00:00 2001 -From: Ondrej Dubaj -Date: Thu, 29 Aug 2019 14:31:06 +0200 -Subject: [PATCH] added debug-shell to initrd in systemd version >= 240 - ---- - dracut.spec | 2 +- - modules.d/00systemd/module-setup.sh | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/dracut.spec b/dracut.spec -index 92c7f7bf..0f7eb4bf 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -88,7 +88,7 @@ Recommends: hardlink - Recommends: pigz - Recommends: kpartx - Requires: util-linux >= 2.21 --Requires: systemd >= 219 -+Requires: systemd >= 239-23 - Requires: systemd-udev >= 219 - Requires: procps-ng - %else -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index ed177826..e4a3f323 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -31,6 +31,10 @@ install() { - exit 1 - fi - -+ inst_multiple -o \ -+ $systemdutildir/system-generators/systemd-debug-generator \ -+ $systemdsystemunitdir/debug-shell.service -+ - inst_multiple -o \ - $systemdutildir/systemd \ - $systemdutildir/systemd-coredump \ - diff --git a/SOURCES/0065.patch b/SOURCES/0065.patch deleted file mode 100644 index 9796dec..0000000 --- a/SOURCES/0065.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 543b1cff3c84af062da4d27ba81a9d394f44e4b6 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 11 Feb 2020 14:14:20 +0100 -Subject: [PATCH] dhclient-script: ipv6 uses different variables for - nameservers - -new_domain_name_servers and new_domain_search is only provided vit IPv4 - -see: https://src.fedoraproject.org/rpms/dhcp/blob/HEAD/f/dhclient-script#_148 -(cherry picked from commit 962310483f473dbc8d71d70ba464d273b9808d31) - -Resolves: #1795276 ---- - modules.d/35network-legacy/dhclient-script.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh -index fc6ed0a3..f1a60005 100755 ---- a/modules.d/35network-legacy/dhclient-script.sh -+++ b/modules.d/35network-legacy/dhclient-script.sh -@@ -75,8 +75,8 @@ setup_interface() { - - setup_interface6() { - domain=$new_domain_name -- search=$(printf -- "$new_domain_search") -- namesrv=$new_domain_name_servers -+ search=$(printf -- "$new_dhcp6_domain_search") -+ namesrv=$new_dhcp6_name_servers - hostname=$new_host_name - [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time - [ -n "$new_max_life" ] && lease_time=$new_max_life - diff --git a/SOURCES/0066.patch b/SOURCES/0066.patch deleted file mode 100644 index 6d9c266..0000000 --- a/SOURCES/0066.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3468310486d0da8d2a6c6bdcddc598b7b8ce5587 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 4 Feb 2020 14:18:01 +0100 -Subject: [PATCH] Revert "wait for IPv6 RA if using none/static IPv6 - assignment" - -This reverts commit c603419030136570b5944dc4620f62d07b9e82bb. - -wait_for_ipv6_dad_link is only called from dhclient script, -so the original intent "wait for IPv6 RA if using none/static IPv6 assignment" -does not seem to be correct. - -Anyway, this brings an issue on isolated networks, where you don't -have any routes outside. dhclient-script hangs on this check -and after it times out, dhclient is able to set the address normally. - -(cherry picked from commit 76f6566fd777e0ee20416061ecb795e8daef33e1) - -Resolves: #1795276 ---- - modules.d/40network/net-lib.sh | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index dcb53804..0f3ca6a8 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -655,7 +655,6 @@ wait_for_ipv6_dad_link() { - while [ $cnt -lt $timeout ]; do - [ -n "$(ip -6 addr show dev "$1" scope link)" ] \ - && [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ -- && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ - && return 0 - [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ - && return 1 - diff --git a/SOURCES/0067.patch b/SOURCES/0067.patch deleted file mode 100644 index ccf1829..0000000 --- a/SOURCES/0067.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7b14ab060e50d0035e4c0b1979d49234aa8896b0 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 10 Feb 2020 14:03:30 +0100 -Subject: [PATCH] 40network: bump rd.net.timeout.carrier to 10 seconds - -On some devices kernel currently takes 5.2 seconds to detect carrier, -so let's make the default in dracut bit more sensible. - -See also https://bugzilla.redhat.com/show_bug.cgi?id=1772010 - -(cherry picked from commit 579fbb9fc4205dc216b9642238739d898d2ed02d) - -Resolves: #1798761 ---- - dracut.cmdline.7.asc | 2 +- - modules.d/40network/net-lib.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 3cee5a00..ab9a24ad 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -645,7 +645,7 @@ NFS - Wait until IPv6 automatic addresses are assigned. Default is 40 seconds. - - **rd.net.timeout.carrier=**____:: -- Wait until carrier is recognized. Default is 5 seconds. -+ Wait until carrier is recognized. Default is 10 seconds. - - CIFS - ~~~ -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 0f3ca6a8..6babcccf 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -717,7 +717,7 @@ iface_has_carrier() { - interface="/sys/class/net/$interface" - [ -d "$interface" ] || return 2 - local timeout="$(getargs rd.net.timeout.carrier=)" -- timeout=${timeout:-5} -+ timeout=${timeout:-10} - timeout=$(($timeout*10)) - - linkup "$1" - diff --git a/SOURCES/0068.patch b/SOURCES/0068.patch deleted file mode 100644 index 810417a..0000000 --- a/SOURCES/0068.patch +++ /dev/null @@ -1,37 +0,0 @@ -From fa15223b70c04de0fdbd209a4bb1cb74876f7cfb Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Wed, 19 Feb 2020 11:11:32 -0500 -Subject: [PATCH] network-legacy/ifup: drop redundant if-statement - -No need to check that `$ret` is 0, we're already running inside an -if-statement block which checks this. - -(cherry picked from commit 7795fde44c54bfe753cc07999a4c2f9dd7e2820d) - -Resolves: #1807395 ---- - modules.d/35network-legacy/ifup.sh | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index dd18d70b..eb7d2eb4 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -457,12 +457,10 @@ for p in $(getargs ip=); do - dhcp|on|any|dhcp6) - ;; - *) -- if [ $ret -eq 0 ]; then -- setup_net $netif -- source_hook initqueue/online $netif -- if [ -z "$manualup" ]; then -- /sbin/netroot $netif -- fi -+ setup_net $netif -+ source_hook initqueue/online $netif -+ if [ -z "$manualup" ]; then -+ /sbin/netroot $netif - fi - ;; - esac - diff --git a/SOURCES/0069.patch b/SOURCES/0069.patch deleted file mode 100644 index d39d324..0000000 --- a/SOURCES/0069.patch +++ /dev/null @@ -1,59 +0,0 @@ -From d6d50a239eebf9da13a0d7892df00a0e725ef9d6 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Wed, 19 Feb 2020 10:44:24 -0500 -Subject: [PATCH] network-legacy/ifup: fix ip=dhcp,dhcp6 setup_net logic - -Previously, we were doing `setup_net` from `ifup` for any setup that -wasn't DHCP, since those are already taken care of by `dhclient-script`. - -The issue is that the case-statement we use to detect this doesn't catch -options like `ip=dhcp,dhcp6`. - -Fix this by reworking the logic here to just check if a -`setup_net_$netif.sh` hook exists. If so, then we know that `setup_net` -will be called for this interface later. - -This was causing issues in RHCOS which now ships with `ip=dhcp,dhcp6` to -support IPv6 environments[1]. The code here would make us do `setup_net` -pre-emptively which IIUC would then cause the initqueue to finish -earlier even if we had more udev netif events to process. - -[1] https://github.com/coreos/coreos-assembler/pull/1067 - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1803926 -(cherry picked from commit 4985aa8c6e89451996e659a39fec7646e9e25f76) - -Cherry-picked from: 4985aa8c6e89451996e659a39fec7646e9e25f76 -Resolves: #1807395 ---- - modules.d/35network-legacy/ifup.sh | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index eb7d2eb4..61838741 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -453,17 +453,16 @@ for p in $(getargs ip=); do - > /tmp/net.$(cat /sys/class/net/${netif}/address).up - fi - -- case $autoconf in -- dhcp|on|any|dhcp6) -- ;; -- *) -+ # and finally, finish interface set up if there isn't already a script -+ # to do so (which is the case in the dhcp path) -+ if [ ! -e $hookdir/initqueue/setup_net_$netif.sh ]; then - setup_net $netif - source_hook initqueue/online $netif - if [ -z "$manualup" ]; then - /sbin/netroot $netif - fi -- ;; -- esac -+ fi -+ - exit $ret - fi - done - diff --git a/SOURCES/0070.patch b/SOURCES/0070.patch deleted file mode 100644 index a6c2bba..0000000 --- a/SOURCES/0070.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 07e7e84ebea1d76aeaa77d097b34503ec3c8f2e1 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Wed, 30 Oct 2019 19:25:51 +0100 -Subject: [PATCH] network-manager: fix getting of ifname from the sysfs path - -commit 5e0f8c8a4ced ('network-manager: remove useless use of basename') -somewhat carelessly didn't take into account that $_i has a slash at -the end which made the result of the ## substitution be just an empty -string. - -The slash was put to the end of /sys/class/net/*/ to make sure we're only -iterating directories, but it's not strictly necessary. In an unlikely case -something else than a directory appears in /sys/class/net/, we'll already deal -with it gracefully. Remove it. - -This fixes the TEST-30-ISCSI test. - -(cherry picked from commit 687e17aa7f2f40d21717be9a04302c749e139d4a) - -Resolves: #1826061 ---- - 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 a539d5b2..b33e0992 100755 ---- a/modules.d/35network-manager/nm-run.sh -+++ b/modules.d/35network-manager/nm-run.sh -@@ -6,7 +6,7 @@ else - /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon - fi - --for _i in /sys/class/net/*/ -+for _i in /sys/class/net/* - do - state=/run/NetworkManager/devices/$(cat $_i/ifindex) - grep -q connection-uuid= $state 2>/dev/null || continue - diff --git a/SOURCES/0071.patch b/SOURCES/0071.patch deleted file mode 100644 index 5fdf588..0000000 --- a/SOURCES/0071.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 02c096d138cc8c788daf5fae75408059cbc7e283 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Mon, 2 Dec 2019 02:19:51 +0100 -Subject: [PATCH] network-manager: don't run NetworkManager when there are no - connections - -NetworkManager would unnecessarily bring up the devices, colliding with -further attempts to rename the devices. - -This is arguably a NetworkManager bug and should eventually be fixed there. -Running NetworkManager without the connection is unnecessary regardless. - -(cherry picked from commit 5965710e018989b02a56e8d190b71740ca3b5463) - -Resolves: #1826061 ---- - modules.d/35network-manager/nm-run.sh | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh -index b33e0992..4079b735 100755 ---- a/modules.d/35network-manager/nm-run.sh -+++ b/modules.d/35network-manager/nm-run.sh -@@ -1,10 +1,17 @@ - #!/bin/sh - --if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then -- /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace --else -- /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon --fi -+for i in /usr/lib/NetworkManager/system-connections/* \ -+ /run/NetworkManager/system-connections/* \ -+ /etc/NetworkManager/system-connections/* \ -+ /etc/sysconfig/network-scripts/ifcfg-*; do -+ [ -f "$i" ] || continue -+ if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then -+ /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace -+ else -+ /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon -+ fi -+ break -+done - - for _i in /sys/class/net/* - do - diff --git a/SOURCES/0072.patch b/SOURCES/0072.patch deleted file mode 100644 index 0299ccc..0000000 --- a/SOURCES/0072.patch +++ /dev/null @@ -1,49 +0,0 @@ -From b692dbc7f2c6a3fb4fa587d9d63b80e4626dafae Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 11 Mar 2020 09:40:50 +0100 -Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when - needed - -The network-manager command line hook must install a -initqueue/finished hook to ensure that nm-run.sh is executed when -there are network connections to activate. - -Fixes: #694 -(cherry picked from commit 3dcaa97ca4dcfa8092252a22df62c60941e59ce3) - -Resolves: #1826061 ---- - modules.d/35network-manager/nm-config.sh | 11 +++++++++++ - modules.d/35network-manager/nm-run.sh | 2 ++ - 2 files changed, 13 insertions(+) - -diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh -index 1efa737c..39a1c8bd 100755 ---- a/modules.d/35network-manager/nm-config.sh -+++ b/modules.d/35network-manager/nm-config.sh -@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then - fi - - /usr/libexec/nm-initrd-generator -- $(getcmdline) -+ -+if getargbool 0 rd.neednet; then -+ for i in /usr/lib/NetworkManager/system-connections/* \ -+ /run/NetworkManager/system-connections/* \ -+ /etc/NetworkManager/system-connections/* \ -+ /etc/sysconfig/network-scripts/ifcfg-*; do -+ [ -f "$i" ] || continue -+ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh -+ break -+ done -+fi -diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh -index 4079b735..fc5280a1 100755 ---- a/modules.d/35network-manager/nm-run.sh -+++ b/modules.d/35network-manager/nm-run.sh -@@ -22,3 +22,5 @@ do - source_hook initqueue/online $ifname - /sbin/netroot $ifname - done -+ -+> /tmp/nm.done - diff --git a/SOURCES/0073.patch b/SOURCES/0073.patch deleted file mode 100644 index ed97628..0000000 --- a/SOURCES/0073.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1ade0d247fda747ed33632a7746f9278b74feaa8 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 23 Mar 2020 22:57:35 +0100 -Subject: [PATCH] network-manager: install libnss DNS and mDNS plugins - -Install libnss_dns.so and libnss_mdns4_minimal.so plugins for the Name -Service Switch (NSS) functionality of glibc so that name resolution -through /etc/resolv.conf and mDNS works in the initrd. - -Fixes: #772 - -Cherry-picked from: 87bffc36e72c121024df033e1a78799456c73523 -Resolves: #1826061 ---- - modules.d/35network-manager/module-setup.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh -index d6d0f9ce..8fc3114d 100755 ---- a/modules.d/35network-manager/module-setup.sh -+++ b/modules.d/35network-manager/module-setup.sh -@@ -51,4 +51,9 @@ install() { - if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then - inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so" - fi -+ -+ _arch=${DRACUT_ARCH:-$(uname -m)} -+ -+ inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ -+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" - } - diff --git a/SOURCES/0074.patch b/SOURCES/0074.patch deleted file mode 100644 index 2181942..0000000 --- a/SOURCES/0074.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0945c8070e436eef908a1f88c946df6c27d3bc41 Mon Sep 17 00:00:00 2001 -From: Peter Georg -Date: Tue, 21 Apr 2020 21:34:38 +0200 -Subject: [PATCH] Always pull in machinery to read ifcfg files - -So far machinery is only pulled in if the user has not yet included any -ifcfg files. - -(cherry picked from commit faea4e4ddb10f697590b80f8f17181341c537262) - -Resolves: #1826061 ---- - modules.d/35network-manager/module-setup.sh | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh -index 8fc3114d..ad2a1534 100755 ---- a/modules.d/35network-manager/module-setup.sh -+++ b/modules.d/35network-manager/module-setup.sh -@@ -47,10 +47,8 @@ install() { - fi - - # We don't install the ifcfg files from the host automatically. -- # But if the user chooses to include them, we pull in the machinery to read them. -- if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then -- inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so" -- fi -+ # But the user might choose to include them, so we pull in the machinery to read them. -+ inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so" - - _arch=${DRACUT_ARCH:-$(uname -m)} - - diff --git a/SOURCES/0075.patch b/SOURCES/0075.patch deleted file mode 100644 index ba6445c..0000000 --- a/SOURCES/0075.patch +++ /dev/null @@ -1,426 +0,0 @@ -From cf74193cc37f2ace1197b1e6ebacc6fe542767c8 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 8 Apr 2020 16:39:52 +0800 -Subject: [PATCH] Remove memtrace-ko and rd.memdebug=4 support in dracut - -This feature could be off loaded to memstrack, which have better -accurecy, better performance, and have more detailed tracing features. - -Also simplify make_trace_mem a bit. - -And currently rd.memdebug=4 is unstable, fails from time to time. - -(cherry picked from commit 49c4172f4eef6e2015615e132b199a7ec0699ffc) - -Resolves: #1829528 ---- - dracut.cmdline.7.asc | 4 +- - modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +- - modules.d/98dracut-systemd/dracut-pre-mount.sh | 2 +- - modules.d/98dracut-systemd/dracut-pre-pivot.sh | 2 +- - modules.d/98dracut-systemd/dracut-pre-trigger.sh | 2 +- - modules.d/99base/dracut-lib.sh | 44 +----- - modules.d/99base/init.sh | 8 +- - modules.d/99base/memtrace-ko.sh | 191 ----------------------- - modules.d/99base/module-setup.sh | 1 - - 9 files changed, 18 insertions(+), 238 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index ab9a24ad..0dc58d1a 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -187,9 +187,9 @@ It should be attached to any report about dracut problems. - _/run/initramfs/init.log_. - If "quiet" is set, it also logs to the console. - --**rd.memdebug=[0-4]**:: -+**rd.memdebug=[0-3]**:: - Print memory usage info at various points, set the verbose level from 0 to 4. --+ -++ - Higher level means more debugging output: - + - ---- -diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh -index bff9435a..6c6ee026 100755 ---- a/modules.d/98dracut-systemd/dracut-cmdline.sh -+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh -@@ -42,7 +42,7 @@ export root - export rflags - export fstype - --make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' '4+:komem' -+make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' - # run scriptlets to parse the command line - getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" - source_hook cmdline -diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.sh b/modules.d/98dracut-systemd/dracut-pre-mount.sh -index a3b9d291..ae511286 100755 ---- a/modules.d/98dracut-systemd/dracut-pre-mount.sh -+++ b/modules.d/98dracut-systemd/dracut-pre-mount.sh -@@ -8,7 +8,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - - source_conf /etc/conf.d - --make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' -+make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' - # pre pivot scripts are sourced just before we doing cleanup and switch over - # to the new root. - getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" -diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh -index dc9a2504..96e6f8ca 100755 ---- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh -+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh -@@ -8,7 +8,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - - source_conf /etc/conf.d - --make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' -+make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' - # pre pivot scripts are sourced just before we doing cleanup and switch over - # to the new root. - getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" -diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.sh b/modules.d/98dracut-systemd/dracut-pre-trigger.sh -index 7cd821ed..a1a33960 100755 ---- a/modules.d/98dracut-systemd/dracut-pre-trigger.sh -+++ b/modules.d/98dracut-systemd/dracut-pre-trigger.sh -@@ -8,7 +8,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - - source_conf /etc/conf.d - --make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' -+make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' - - source_hook pre-trigger - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index f71e757c..502c7568 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -1220,50 +1220,25 @@ are_lists_eq() { - - setmemdebug() { - if [ -z "$DEBUG_MEM_LEVEL" ]; then -- export DEBUG_MEM_LEVEL=$(getargnum 0 0 4 rd.memdebug) -+ export DEBUG_MEM_LEVEL=$(getargnum 0 0 3 rd.memdebug) - fi - } - - setmemdebug - --cleanup_trace_mem() --{ -- # tracekomem based on kernel trace needs cleanup after use. -- if [ "$DEBUG_MEM_LEVEL" -eq 4 ]; then -- tracekomem --cleanup -- fi --} -- --# parameters: msg [trace_level:trace]... --make_trace_mem() --{ -- local msg -- msg="$1" -- shift -- if [ -n "$DEBUG_MEM_LEVEL" ] && [ "$DEBUG_MEM_LEVEL" -gt 0 ]; then -- make_trace show_memstats $DEBUG_MEM_LEVEL "[debug_mem]" "$msg" "$@" >&2 -- fi --} -- - # parameters: func log_level prefix msg [trace_level:trace]... --make_trace() -+make_trace_mem() - { -- local func log_level prefix msg msg_printed -+ local log_level prefix msg msg_printed - local trace trace_level trace_in_higher_levels insert_trace - -- func=$1 -- shift -- -- log_level=$1 -- shift -- -- prefix=$1 -- shift -- - msg=$1 - shift - -- if [ -z "$log_level" ]; then -+ prefix='[debug_mem]' -+ log_level=$DEBUG_MEM_LEVEL -+ -+ if [ -z "$log_level" ] || [ "$log_level" -le 0 ]; then - return - fi - -@@ -1296,7 +1271,7 @@ make_trace() - echo "$prefix $msg" - msg_printed=1 - fi -- $func $trace -+ show_memstats $trace - fi - shift - done -@@ -1318,9 +1293,6 @@ show_memstats() - iomem) - cat /proc/iomem - ;; -- komem) -- tracekomem -- ;; - esac - } - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index e4f7cff1..2c0ccd66 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -131,7 +131,7 @@ if ! getargbool 1 'rd.hostonly'; then - fi - - # run scriptlets to parse the command line --make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' '4+:komem' -+make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' - getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" - source_hook cmdline - -@@ -160,7 +160,7 @@ fi - - udevproperty "hookdir=$hookdir" - --make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' -+make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-trigger' -d 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" - source_hook pre-trigger - -@@ -230,7 +230,7 @@ unset RDRETRY - - # pre-mount happens before we try to mount the root filesystem, - # and happens once. --make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' -+make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" - source_hook pre-mount - -@@ -266,7 +266,7 @@ done - - # pre pivot scripts are sourced just before we doing cleanup and switch over - # to the new root. --make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' '4+:komem' -+make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" - source_hook pre-pivot - -diff --git a/modules.d/99base/memtrace-ko.sh b/modules.d/99base/memtrace-ko.sh -deleted file mode 100755 -index ee035e15..00000000 ---- a/modules.d/99base/memtrace-ko.sh -+++ /dev/null -@@ -1,191 +0,0 @@ --#!/bin/sh -- --# Try to find out kernel modules with large total memory allocation during loading. --# For large slab allocation, it will fall into buddy, also not trace "mm_page_free" --# considering large free is quite rare for module_init, thus saving tons of events --# to avoid trace data overwritten. --# --# Therefore, tracing "mm_page_alloc"alone should be enough for the purpose. -- --# "sys/kernel/tracing" has the priority if exists. --get_trace_base() { -- # trace access through debugfs would be obsolete if "/sys/kernel/tracing" is available. -- if [ -d "/sys/kernel/tracing" ]; then -- echo "/sys/kernel" -- else -- echo "/sys/kernel/debug" -- fi --} -- --# We want to enable these trace events. --get_want_events() { -- echo "module:module_put module:module_load kmem:mm_page_alloc" --} -- --get_event_filter() { -- echo "comm == systemd-udevd || comm == modprobe || comm == insmod" --} -- --is_trace_ready() { -- local trace_base want_events current_events -- -- trace_base=$(get_trace_base) -- ! [ -f "$trace_base/tracing/trace" ] && return 1 -- -- [ "$(cat $trace_base/tracing/tracing_on)" -eq 0 ] && return 1 -- -- # Also check if trace events were properly setup. -- want_events=$(get_want_events) -- current_events=$(echo $(cat $trace_base/tracing/set_event)) -- [ "$current_events" != "$want_events" ] && return 1 -- -- return 0 --} -- --prepare_trace() { -- local trace_base -- -- trace_base=$(get_trace_base) -- # old debugfs interface case. -- if ! [ -d "$trace_base/tracing" ]; then -- mount none -t debugfs $trace_base -- # new tracefs interface case. -- elif ! [ -f "$trace_base/tracing/trace" ]; then -- mount none -t tracefs "$trace_base/tracing" -- fi -- -- if ! [ -f "$trace_base/tracing/trace" ]; then -- echo "WARN: Mount trace failed for kernel module memory analyzing." -- return 1 -- fi -- -- # Active all the wanted trace events. -- echo "$(get_want_events)" > $trace_base/tracing/set_event -- -- # There are three kinds of known applications for module loading: -- # "systemd-udevd", "modprobe" and "insmod". -- # Set them as the global events filter. -- # NOTE: Some kernel may not support this format of filter, anyway -- # the operation will fail and it doesn't matter. -- echo "$(get_event_filter)" > $trace_base/tracing/events/kmem/filter 2>&1 -- echo "$(get_event_filter)" > $trace_base/tracing/events/module/filter 2>&1 -- -- # Set the number of comm-pid if supported. -- if [ -f "$trace_base/tracing/saved_cmdlines_size" ]; then -- # Thanks to filters, 4096 is big enough(also well supported). -- echo 4096 > $trace_base/tracing/saved_cmdlines_size -- fi -- -- # Enable and clear trace data for the first time. -- echo 1 > $trace_base/tracing/tracing_on -- echo > $trace_base/tracing/trace -- echo "Prepare trace success." -- return 0 --} -- --order_to_pages() --{ -- local pages=1 -- local order=$1 -- -- while [ "$order" != 0 ]; do -- order=$((order-1)) -- pages=$(($pages*2)) -- done -- -- echo $pages --} -- --parse_trace_data() { -- local module_name tmp_eval pages -- -- cat "$(get_trace_base)/tracing/trace" | while read pid cpu flags ts function args -- do -- # Skip comment lines -- if [ "$pid" = "#" ]; then -- continue -- fi -- -- pid=${pid##*-} -- function=${function%:} -- if [ "$function" = "module_load" ]; then -- # One module is being loaded, save the task pid for tracking. -- # Remove the trailing after whitespace, there may be the module flags. -- module_name=${args%% *} -- # Mark current_module to track the task. -- eval current_module_$pid="$module_name" -- tmp_eval=$(eval echo '${module_loaded_'${module_name}'}') -- if [ -n "$tmp_eval" ]; then -- echo "WARN: \"$module_name\" was loaded multiple times!" -- fi -- eval unset module_loaded_$module_name -- eval nr_alloc_pages_$module_name=0 -- continue -- fi -- -- module_name=$(eval echo '${current_module_'${pid}'}') -- if [ -z "$module_name" ]; then -- continue -- fi -- -- # Once we get here, the task is being tracked(is loading a module). -- if [ "$function" = "module_put" ]; then -- # Mark the module as loaded when the first module_put event happens after module_load. -- tmp_eval=$(eval echo '${nr_alloc_pages_'${module_name}'}') -- echo "$tmp_eval pages consumed by \"$module_name\"" -- eval module_loaded_$module_name=1 -- # Module loading finished, so untrack the task. -- eval unset current_module_$pid -- eval unset nr_alloc_pages_$module_name -- continue -- fi -- -- if [ "$function" = "mm_page_alloc" ]; then -- # Get order first, then convert to actual pages. -- pages=$(echo $args | sed -e 's/.*order=\([0-9]*\) .*/\1/') -- pages=$(order_to_pages "$pages") -- tmp_eval=$(eval echo '${nr_alloc_pages_'${module_name}'}') -- eval nr_alloc_pages_$module_name="$(($tmp_eval+$pages))" -- fi -- done --} -- --cleanup_trace() { -- local trace_base -- -- if is_trace_ready; then -- trace_base=$(get_trace_base) -- echo 0 > $trace_base/tracing/tracing_on -- echo > $trace_base/tracing/trace -- echo > $trace_base/tracing/set_event -- echo 0 > $trace_base/tracing/events/kmem/filter -- echo 0 > $trace_base/tracing/events/module/filter -- fi --} -- --show_usage() { -- echo "Find out kernel modules with large memory consumption during loading based on trace." -- echo "Usage:" -- echo "1) run it first to setup trace." -- echo "2) run again to parse the trace data if any." -- echo "3) run with \"--cleanup\" option to cleanup trace after use." --} -- --if [ "$1" = "--help" ]; then -- show_usage -- exit 0 --fi -- --if [ "$1" = "--cleanup" ]; then -- cleanup_trace -- exit 0 --fi -- --if is_trace_ready ; then -- echo "tracekomem - Rough memory consumption by loading kernel modules (larger value with better accuracy)" -- parse_trace_data --else -- prepare_trace --fi -- --exit $? -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index c9ead01d..3578643c 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -35,7 +35,6 @@ install() { - inst_script "$moddir/initqueue.sh" "/sbin/initqueue" - inst_script "$moddir/loginit.sh" "/sbin/loginit" - inst_script "$moddir/rdsosreport.sh" "/sbin/rdsosreport" -- inst_script "$moddir/memtrace-ko.sh" "/sbin/tracekomem" - - [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib - mkdir -m 0755 -p ${initdir}/lib/dracut - diff --git a/SOURCES/0076.patch b/SOURCES/0076.patch deleted file mode 100644 index 755c8a6..0000000 --- a/SOURCES/0076.patch +++ /dev/null @@ -1,320 +0,0 @@ -From adacd8101e7558930e4499c21006eaa14629c234 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 8 Apr 2020 20:09:38 +0800 -Subject: [PATCH] Add 99memstrack module - -memstrack is a new tool to track the overall memory usage and -allocation, which can help off load the improve the builtin module -memory tracing function in dracut. - -With this change, the rd.memdebug=4 behavior is similiar with before, -but the report is defered to pre-pivot, so the memory usage info -during the whole initramfs run is traced. And the ourput format is -changed a bit: - - dracut-pre-pivot[519]: ======== Report format module_summary: ======== - dracut-pre-pivot[519]: Module squashfs using 10.4MB (2658 pages), peak allocation 10.4MB (2671 pages) - dracut-pre-pivot[519]: Module qxl using 3.4MB (865 pages), peak allocation 3.4MB (880 pages) - dracut-pre-pivot[519]: Module crc32c_intel using 2.0MB (519 pages), peak allocation 3.0MB (769 pages) - dracut-pre-pivot[519]: Module serio_raw using 2.0MB (505 pages), peak allocation 3.6MB (918 pages) - dracut-pre-pivot[519]: Module virtio_console using 1.6MB (416 pages), peak allocation 1.6MB (419 pages) - ... snip ... - dracut-pre-pivot[519]: ======== Report format module_summary END ======== - -It now contains more detail and also includes the peak usage which could -be more helpful. - -And now it have a rd.memdebug=5, which will print more detail about -the stack trace of the top memory user, also printed on pri-pivot: - - dracut-pre-pivot[519]: ======== Report format module_top: ======== - dracut-pre-pivot[519]: Top stack usage of module squashfs: - dracut-pre-pivot[519]: (null) Pages: 2658 (peak: 2671) - dracut-pre-pivot[519]: (null) Pages: 2658 (peak: 2671) - dracut-pre-pivot[519]: async_page_fault (0xffffffff81a01149) Pages: 1448 (peak: 1461) - dracut-pre-pivot[519]: do_async_page_fault (0xffffffff8105c509) Pages: 1448 (peak: 1461) - dracut-pre-pivot[519]: do_page_fault (0xffffffff8106296a) Pages: 1448 (peak: 1461) - dracut-pre-pivot[519]: do_user_addr_fault (0xffffffff810626bd) Pages: 1448 (peak: 1461) - dracut-pre-pivot[519]: handle_mm_fault (0xffffffff812940c4) Pages: 1448 (peak: 1461) - dracut-pre-pivot[519]: __handle_mm_fault (0xffffffff81293627) Pages: 1195 (peak: 1208) - dracut-pre-pivot[519]: __do_fault (0xffffffff8128b07e) Pages: 1195 (peak: 1208) - dracut-pre-pivot[519]: filemap_fault (0xffffffff8124c0b9) Pages: 1195 (peak: 1208) - dracut-pre-pivot[519]: __do_page_cache_readahead (0xffffffff812585da) Pages: 1063 (peak: 1076) - dracut-pre-pivot[519]: read_pages (0xffffffff812583c2) Pages: 1063 (peak: 1076) - dracut-pre-pivot[519]: squashfs_readpage squashfs (0xffffffffc0022073) Pages: 1039 (peak: 1052) - dracut-pre-pivot[519]: squashfs_readpage_block squashfs (0xffffffffc0024334) Pages: 744 (peak: 744) - dracut-pre-pivot[519]: squashfs_copy_cache squashfs (0xffffffffc0021a3f) Pages: 744 (peak: 744) - dracut-pre-pivot[519]: pagecache_get_page (0xffffffff8124abf7) Pages: 744 (peak: 744) - dracut-pre-pivot[519]: __page_cache_alloc (0xffffffff81247df6) Pages: 744 (peak: 744) - dracut-pre-pivot[519]: alloc_pages_current (0xffffffff812cdca7) Pages: 744 (peak: 744) - dracut-pre-pivot[519]: __alloc_pages_nodemask (0xffffffff812b3107) Pages: 744 (peak: 744) - dracut-pre-pivot[519]: __alloc_pages_nodemask (0xffffffff812b3107) Pages: 1488 (peak: 1488) - dracut-pre-pivot[519]: Top stack usage of module qxl: - dracut-pre-pivot[519]: (null) Pages: 865 (peak: 880) - dracut-pre-pivot[519]: entry_SYSCALL_64_after_hwframe (0xffffffff81a0008c) Pages: 855 (peak: 858) - dracut-pre-pivot[519]: do_syscall_64 (0xffffffff81002a5a) Pages: 855 (peak: 858) - dracut-pre-pivot[519]: __x64_sys_finit_module (0xffffffff8117ccea) Pages: 811 (peak: 811) - dracut-pre-pivot[519]: __do_sys_finit_module (0xffffffff8117cc6e) Pages: 811 (peak: 811) - dracut-pre-pivot[519]: load_module (0xffffffff8117c6be) Pages: 802 (peak: 802) - dracut-pre-pivot[519]: do_init_module (0xffffffff81179e72) Pages: 802 (peak: 802) - dracut-pre-pivot[519]: do_one_initcall (0xffffffff81000d5a) Pages: 802 (peak: 802) - dracut-pre-pivot[519]: serio_raw_poll serio_raw (0xffffffffc0200054) Pages: 802 (peak: 802) - dracut-pre-pivot[519]: __pci_register_driver (0xffffffff81557804) Pages: 802 (peak: 802) - dracut-pre-pivot[519]: driver_register (0xffffffff8167ed24) Pages: 802 (peak: 802) - dracut-pre-pivot[519]: bus_add_driver (0xffffffff8167cbb2) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: driver_attach (0xffffffff8167d28e) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: bus_for_each_dev (0xffffffff8167b62c) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: __driver_attach (0xffffffff8167e18f) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: device_driver_attach (0xffffffff8167e0ed) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: driver_probe_device (0xffffffff8167de6c) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: really_probe (0xffffffff8167d9c9) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: pci_device_probe (0xffffffff81559627) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: local_pci_probe (0xffffffff81557f98) Pages: 801 (peak: 801) - dracut-pre-pivot[519]: qxl_pci_probe qxl (0xffffffffc01f0387) Pages: 773 (peak: 773) - dracut-pre-pivot[519]: drm_fbdev_generic_setup drm_kms_helper (0xffffffffc01b30c5) Pages: 773 (peak: 773) - dracut-pre-pivot[519]: drm_fbdev_client_hotplug drm_kms_helper (0xffffffffc01b2656) Pages: 773 (peak: 773) - dracut-pre-pivot[519]: __drm_fb_helper_initial_config_and_unlock drm_kms_helper (0xffffffffc01b1a28) Pages: 770 (peak: 770) - dracut-pre-pivot[519]: drm_fb_helper_generic_probe drm_kms_helper (0xffffffffc01b2fa5) Pages: 770 (peak: 770) - dracut-pre-pivot[519]: vzalloc (0xffffffff812aa39c) Pages: 770 (peak: 770) - dracut-pre-pivot[519]: __vmalloc_node_range (0xffffffff812aa200) Pages: 768 (peak: 768) - ... snip ... - ======== Report format module_top END ======== - -This could be very helpful for debuging memory usage issues. - -(cherry picked from commit 7dd8a2f4d351ce8975c0af122732a2a12697c8cc) - -Resolves: #1829528 ---- - dracut.cmdline.7.asc | 16 +++++--- - dracut.spec | 2 + - modules.d/99base/dracut-lib.sh | 2 +- - modules.d/99memstrack/memstrack-report.sh | 23 +++++++++++ - modules.d/99memstrack/memstrack-start.sh | 68 +++++++++++++++++++++++++++++++ - modules.d/99memstrack/memstrack.service | 13 ++++++ - modules.d/99memstrack/module-setup.sh | 27 ++++++++++++ - 7 files changed, 144 insertions(+), 7 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 0dc58d1a..7f31fbae 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -187,8 +187,8 @@ It should be attached to any report about dracut problems. - _/run/initramfs/init.log_. - If "quiet" is set, it also logs to the console. - --**rd.memdebug=[0-3]**:: -- Print memory usage info at various points, set the verbose level from 0 to 4. -+**rd.memdebug=[0-5]**:: -+ Print memory usage info at various points, set the verbose level from 0 to 5. - + - Higher level means more debugging output: - + -@@ -197,10 +197,14 @@ It should be attached to any report about dracut problems. - 1 - partial /proc/meminfo - 2 - /proc/meminfo - 3 - /proc/meminfo + /proc/slabinfo -- 4 - /proc/meminfo + /proc/slabinfo + tracekomem -- NOTE: tracekomem is a shell script utilizing kernel trace to track -- the rough total memory consumption of kernel modules during -- loading. It may override other trace configurations. -+ 4 - /proc/meminfo + /proc/slabinfo + memstrack summary -+ NOTE: memstrack is a memory tracing tool that tracks the total memory -+ consumption, and peak memory consumption of each kernel modules -+ and userspace progress during the whole initramfs runtime, report -+ is genereted and the end of initramsfs run. -+ 5 - /proc/meminfo + /proc/slabinfo + memstrack (with top memory stacktrace) -+ NOTE: memstrack (with top memory stacktrace) will print top memory -+ allocation stack traces during the whole initramfs runtime. - ---- - - **rd.break**:: -diff --git a/dracut.spec b/dracut.spec -index 0f7eb4bf..c82c24f6 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -84,6 +84,7 @@ Requires: xz - Requires: gzip - - %if 0%{?fedora} || 0%{?rhel} -+Recommends: memstrack - Recommends: hardlink - Recommends: pigz - Recommends: kpartx -@@ -399,6 +400,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - %{dracutlibdir}/modules.d/98syslog - %{dracutlibdir}/modules.d/98usrmount - %{dracutlibdir}/modules.d/99base -+%{dracutlibdir}/modules.d/99memstrack - %{dracutlibdir}/modules.d/99fs-lib - %{dracutlibdir}/modules.d/99shutdown - %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 502c7568..56dd63ef 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -1220,7 +1220,7 @@ are_lists_eq() { - - setmemdebug() { - if [ -z "$DEBUG_MEM_LEVEL" ]; then -- export DEBUG_MEM_LEVEL=$(getargnum 0 0 3 rd.memdebug) -+ export DEBUG_MEM_LEVEL=$(getargnum 0 0 5 rd.memdebug) - fi - } - -diff --git a/modules.d/99memstrack/memstrack-report.sh b/modules.d/99memstrack/memstrack-report.sh -new file mode 100755 -index 00000000..241e8621 ---- /dev/null -+++ b/modules.d/99memstrack/memstrack-report.sh -@@ -0,0 +1,23 @@ -+#!/usr/bin/env bash -+. /lib/dracut-lib.sh -+ -+if ! [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then -+ exit 0 -+fi -+ -+if type -P systemctl >/dev/null; then -+ systemctl stop memstrack.service -+else -+ get_pid_of_tracer () { -+ local _user _pid _rest -+ read _user _pid _rest <<< $(ps aux | grep [m]emstrack | head -1) -+ echo $_pid -+ } -+ -+ kill -s INT $(get_pid_of_tracer) -+ while [[ -n $(get_pid_of_tracer) ]]; do -+ sleep 1 -+ done -+fi -+ -+cat /.memstrack -diff --git a/modules.d/99memstrack/memstrack-start.sh b/modules.d/99memstrack/memstrack-start.sh -new file mode 100755 -index 00000000..5aa73efe ---- /dev/null -+++ b/modules.d/99memstrack/memstrack-start.sh -@@ -0,0 +1,68 @@ -+#!/bin/sh -+# Mount kernel debug fs so debug tools can work. -+# memdebug=4 and memdebug=5 requires debug fs to be mounted. -+# And there is no need to umount it. -+ -+type getargnum >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ -+# "sys/kernel/tracing" has the priority if exists. -+get_trace_base() { -+ # trace access through debugfs would be obsolete if "/sys/kernel/tracing" is available. -+ if [ -d "/sys/kernel/tracing" ]; then -+ echo "/sys/kernel" -+ else -+ echo "/sys/kernel/debug" -+ fi -+} -+ -+is_debugfs_ready() { -+ [ -f "$(get_trace_base)/tracing/trace" ] -+} -+ -+prepare_debugfs() { -+ local trace_base -+ -+ trace_base=$(get_trace_base) -+ # old debugfs interface case. -+ if ! [ -d "$trace_base/tracing" ]; then -+ mount none -t debugfs $trace_base -+ # new tracefs interface case. -+ elif ! [ -f "$trace_base/tracing/trace" ]; then -+ mount none -t tracefs "$trace_base/tracing" -+ fi -+ -+ if ! [ -f "$trace_base/tracing/trace" ]; then -+ echo "WARN: failed to mount debugfs" -+ return 1 -+ fi -+} -+ -+if ! is_debugfs_ready ; then -+ prepare_debugfs -+fi -+ -+if [ -n "$DEBUG_MEM_LEVEL" ]; then -+ if [ "$DEBUG_MEM_LEVEL" -ge 5 ]; then -+ echo "memstrack - will report kernel module memory usage summary and top allocation stack" -+ memstrack --report module_summary,module_top --notui --throttle 80 -o /.memstrack & -+ elif [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then -+ echo "memstrack - will report memory usage summary" -+ memstrack --report module_summary --notui --throttle 80 -o /.memstrack & -+ else -+ exit 0; -+ fi -+fi -+ -+PID=$! -+RET=$? -+ -+if [ $RET -ne 0 ]; then -+ echo "Failed to start memstrack, exit status: $RET" -+ exit $RET -+fi -+ -+# Wait a second for memstrack to setup everything, avoid missing any event -+sleep 1 -+ -+echo $PID > /run/memstrack.pid -+disown -diff --git a/modules.d/99memstrack/memstrack.service b/modules.d/99memstrack/memstrack.service -new file mode 100644 -index 00000000..6b47adef ---- /dev/null -+++ b/modules.d/99memstrack/memstrack.service -@@ -0,0 +1,13 @@ -+[Unit] -+Description=Memstrack Anylazing Service -+DefaultDependencies=no -+Before=dracut-cmdline.service systemd-udevd.service local-fs-pre.target -+IgnoreOnIsolate=true -+ -+[Service] -+Type=simple -+ExecStart=/bin/memstrack-start -+PIDFile=/run/memstrack.pid -+StandardInput=null -+StandardOutput=syslog+console -+StandardError=syslog+console -diff --git a/modules.d/99memstrack/module-setup.sh b/modules.d/99memstrack/module-setup.sh -new file mode 100755 -index 00000000..d5bacb4d ---- /dev/null -+++ b/modules.d/99memstrack/module-setup.sh -@@ -0,0 +1,27 @@ -+#!/usr/bin/bash -+ -+check() { -+ if type -P memstrack >/dev/null; then -+ dinfo "memstrack is available" -+ return 0 -+ fi -+ -+ dinfo "memstrack is not available" -+ dinfo "If you need to use rd.memdebug>=4, please install memstrack" -+ -+ return 1 -+} -+ -+depends() { -+ return 0 -+} -+ -+install() { -+ inst "/bin/memstrack" "/bin/memstrack" -+ -+ inst "$moddir/memstrack-start.sh" "/bin/memstrack-start" -+ inst_hook cleanup 99 "$moddir/memstrack-report.sh" -+ -+ inst "$moddir/memstrack.service" "$systemdsystemunitdir/memstrack.service" -+ systemctl -q --root "$initdir" add-wants initrd.target memstrack.service -+} - diff --git a/SOURCES/0077.patch b/SOURCES/0077.patch deleted file mode 100644 index b61275e..0000000 --- a/SOURCES/0077.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8b3033c92a073f9e63074ffcdb1af6e69d99105c Mon Sep 17 00:00:00 2001 -From: Attila Bruncsak -Date: Fri, 14 Dec 2018 15:57:33 +0100 -Subject: [PATCH] the strip command should avoid changing the file modification - time - -(cherry picked from commit 7e944c77c0e05f2cc28e11227b465525c5131772) - -Resolves: #1776659 ---- - dracut.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index f270af76..223261d6 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1663,14 +1663,14 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then - dinfo "*** Stripping files ***" - find "$initdir" -type f \ - -executable -not -path '*/lib/modules/*.ko' -print0 \ -- | xargs -r -0 $strip_cmd -g 2>/dev/null -+ | xargs -r -0 $strip_cmd -g -p 2>/dev/null - - # strip kernel modules, but do not touch signed modules - find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \ - | while read -r -d $'\0' f || [ -n "$f" ]; do - SIG=$(tail -c 28 "$f" | tr -d '\000') - [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; } -- done | xargs -r -0 $strip_cmd -g -+ done | xargs -r -0 $strip_cmd -g -p - - dinfo "*** Stripping files done ***" - fi - diff --git a/SOURCES/0078.patch b/SOURCES/0078.patch deleted file mode 100644 index b50250b..0000000 --- a/SOURCES/0078.patch +++ /dev/null @@ -1,108 +0,0 @@ -From cbebaacfd05c55fddd11b3090983a2be1d2b48d3 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 17 Jul 2019 17:10:36 +0800 -Subject: [PATCH] dracut.sh: Adjust squash and strip order - -Previously with squash module, some binaries will be reinstalled, but -stripping happens before that so new installed binaries is not stripped. -So adjust the squash and strip order, ensure new installed binaries are -stripped just the same way with the old binaries. - -Also split squash into two stage to make the split easier, move the -squash temp dir into initdir so stripping will cover that too, -and print more usefule message. - -Signed-off-by: Kairui Song -(cherry picked from commit 6a74c03b4a8472fb090015b32e652edfeadb5a10) - -Resolves: #1776659 ---- - dracut.sh | 43 +++++++++++++++++++++++++------------------ - 1 file changed, 25 insertions(+), 18 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 223261d6..310646e3 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1659,21 +1659,6 @@ for d in $(ldconfig_paths); do - rmdir -p --ignore-fail-on-non-empty "$initdir/$d" >/dev/null 2>&1 - done - --if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then -- dinfo "*** Stripping files ***" -- find "$initdir" -type f \ -- -executable -not -path '*/lib/modules/*.ko' -print0 \ -- | xargs -r -0 $strip_cmd -g -p 2>/dev/null -- -- # strip kernel modules, but do not touch signed modules -- find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \ -- | while read -r -d $'\0' f || [ -n "$f" ]; do -- SIG=$(tail -c 28 "$f" | tr -d '\000') -- [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; } -- done | xargs -r -0 $strip_cmd -g -p -- -- dinfo "*** Stripping files done ***" --fi - if [[ $early_microcode = yes ]]; then - dinfo "*** Generating early-microcode cpio image ***" - ucode_dir=(amd-ucode intel-ucode) -@@ -1745,9 +1730,8 @@ if [[ $hostonly_cmdline == "yes" ]] ; then - fi - fi - --dinfo "*** Creating image file '$outfile' ***" -- - if dracut_module_included "squash"; then -+ dinfo "*** Install squash loader ***" - if ! check_kernel_config CONFIG_SQUASHFS; then - dfatal "CONFIG_SQUASHFS have to be enabled for dracut squash module to work" - exit 1 -@@ -1761,7 +1745,7 @@ if dracut_module_included "squash"; then - exit 1 - fi - -- readonly squash_dir="${DRACUT_TMPDIR}/squashfs" -+ readonly squash_dir="$initdir/squash/root" - readonly squash_img=$initdir/squash/root.img - - # Currently only move "usr" "etc" to squashdir -@@ -1854,15 +1838,38 @@ if dracut_module_included "squash"; then - fi - done - done -+fi - -+if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then -+ dinfo "*** Stripping files ***" -+ find "$initdir" -type f \ -+ -executable -not -path '*/lib/modules/*.ko' -print0 \ -+ | xargs -r -0 $strip_cmd -g -p 2>/dev/null -+ -+ # strip kernel modules, but do not touch signed modules -+ find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \ -+ | while read -r -d $'\0' f || [ -n "$f" ]; do -+ SIG=$(tail -c 28 "$f" | tr -d '\000') -+ [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; } -+ done | xargs -r -0 $strip_cmd -g -p -+ dinfo "*** Stripping files done ***" -+fi -+ -+if dracut_module_included "squash"; then -+ dinfo "*** Squashing the files inside the initramfs ***" - mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null - - if [[ $? != 0 ]]; then - dfatal "dracut: Failed making squash image" - exit 1 - fi -+ -+ rm -rf $squash_dir -+ dinfo "*** Squashing the files inside the initramfs done ***" - fi - -+dinfo "*** Creating image file '$outfile' ***" -+ - if [[ $uefi = yes ]]; then - readonly uefi_outdir="$DRACUT_TMPDIR/uefi" - mkdir "$uefi_outdir" - diff --git a/SOURCES/0079.patch b/SOURCES/0079.patch deleted file mode 100644 index 116dc2b..0000000 --- a/SOURCES/0079.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b36c1ff083499c2cf1d1dbb7fe1663a2dd0683cc Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 25 Sep 2019 13:47:40 +0800 -Subject: [PATCH] Fine tune mksquashfs options for squash module - -Drop some unneeded metadata in the squash image, and print the error -message if something went wrong. - -Signed-off-by: Kairui Song -(cherry picked from commit 89bc1aa324bcdda3723247218a697171c5a3de6f) - -Resolves: #1776659 ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 310646e3..487add57 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1857,7 +1857,7 @@ fi - - if dracut_module_included "squash"; then - dinfo "*** Squashing the files inside the initramfs ***" -- mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null -+ mksquashfs $squash_dir $squash_img -no-xattrs -no-exports -noappend -always-use-fragments -comp xz -Xdict-size 100% -no-progress 1> /dev/null - - if [[ $? != 0 ]]; then - dfatal "dracut: Failed making squash image" - diff --git a/SOURCES/0080.patch b/SOURCES/0080.patch deleted file mode 100644 index f7fd767..0000000 --- a/SOURCES/0080.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 90d96c4f6a44d895f8999da8c4721a04612e6379 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 29 Oct 2019 16:29:14 +0800 -Subject: [PATCH] 90kernel-modules: don't install any block driver if not - needed - -If hostonly mode is in use, and there isn't any block device included -as hostonly device, then the initramfs won't need any block driver. - -Eg. for kdump built image, there could be only one nfs mount point, -or the initramfs may only execute some network operation then reboot. - -In such case, skip block driver installation to save space and time. - -Signed-off-by: Kairui Song -(cherry picked from commit f4ad2e5c8964b6c7b50420299a0096bade6a40bd) - -Resolves: #1776659 ---- - modules.d/90kernel-modules/module-setup.sh | 32 +++++++++++++++++++++++------- - 1 file changed, 25 insertions(+), 7 deletions(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 3dfceff0..c91ba10c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -2,6 +2,8 @@ - - # 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' -+ - find_kernel_modules_external () { - local _OLDIFS - local external_pattern="^/" -@@ -16,11 +18,25 @@ installkernel() { - done < "$srcmods/modules.dep" - IFS=$_OLDIFS - } -- 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' -+ -+ is_block_dev() { -+ [ -e /sys/dev/block/$1 ] && return 0 -+ return 1 -+ } -+ -+ install_block_modules () { -+ hostonly='' instmods sr_mod sd_mod scsi_dh ata_piix -+ instmods \ -+ scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ -+ =ide nvme vmd nfit \ -+ virtio_blk -+ -+ dracut_instmods -o -s "${_blockfuncs}" "=drivers" -+ } - - if [[ -z $drivers ]]; then - hostonly='' instmods \ -- sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ -+ hid_generic unix \ - ehci-hcd ehci-pci ehci-platform \ - ohci-hcd ohci-pci \ - uhci-hcd \ -@@ -38,10 +54,10 @@ installkernel() { - ${NULL} - - instmods \ -- yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ -+ yenta_socket \ - atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ -- virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ -- "=drivers/pcmcia" =ide nvme vmd nfit -+ virtio virtio_ring virtio_pci virtio_scsi \ -+ "=drivers/pcmcia" - - if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then - # arm/aarch64 specific modules -@@ -72,10 +88,12 @@ installkernel() { - ${NULL} - fi - -- dracut_instmods -o -s "${_blockfuncs}" "=drivers" -- - find_kernel_modules_external | instmods - -+ if ! [[ $hostonly ]] || for_each_host_dev_and_slaves is_block_dev; then -+ install_block_modules -+ fi -+ - # if not on hostonly mode, install all known filesystems, - # if the required list is not set via the filesystems variable - if ! [[ $hostonly ]]; then - diff --git a/SOURCES/0081.patch b/SOURCES/0081.patch deleted file mode 100644 index 3d3edb1..0000000 --- a/SOURCES/0081.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 9eb855e073c077966a011146484b9b9596857361 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Thu, 5 Mar 2020 18:44:45 +0800 -Subject: [PATCH] 95znet: Add a rd.znet_ifname= option - -qeth device may have a different IP for each boot, so the rd.ifname= -option will no longer work. So for znet device, introduce a -rd.znet_ifname= options, to subchannel id instead of MAC address as the -identifier and rename the interface. - -Signed-off-by: Kairui Song -(cherry picked from commit 872eb69936bd849eec6d1974dd6569f23a7ad3db) - -Resolves: #1811977 ---- - dracut.cmdline.7.asc | 5 +++++ - modules.d/95znet/parse-ccw.sh | 18 ++++++++++++++++++ - 2 files changed, 23 insertions(+) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 7f31fbae..4a7c2517 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -829,6 +829,11 @@ ZNET - RHEL/Fedora with ccw_init, which is called from udev for certain - devices on z-series. - rd.znet can be specified multiple times on the kernel command line. -+ -+**rd.znet_ifname=**____:____:: -+ Assign network device name (i.e. "bootnet") to the NIC -+ corresponds to the subchannels. This is useful when dracut's default -+ "ifname=" doesn't work due to device having a changing MAC address. - + - [listing] - .Example -diff --git a/modules.d/95znet/parse-ccw.sh b/modules.d/95znet/parse-ccw.sh -index 7d40a1aa..59b588f3 100755 ---- a/modules.d/95znet/parse-ccw.sh -+++ b/modules.d/95znet/parse-ccw.sh -@@ -4,4 +4,22 @@ for ccw_arg in $(getargs rd.ccw -d 'rd_CCW=') $(getargs rd.znet -d 'rd_ZNET='); - echo $ccw_arg >> /etc/ccw.conf - done - -+for ifname in $(getargs rd.znet_ifname); do -+ IFS=: read ifname_if ifname_subchannels _rest <<< "$ifname" -+ if [ -z "$ifname_if" ] || [ -z "$ifname_subchannels" ] || [ -n "$_rest" ]; then -+ warn "Invalid arguments for rd.znet_ifname=" -+ else -+ { -+ ifname_subchannels=${ifname_subchannels//,/|} -+ -+ echo 'ACTION!="add|change", GOTO="ccw_ifname_end"' -+ echo 'ATTR{type}!="1", GOTO="ccw_ifname_end"' -+ echo 'SUBSYSTEM!="net", GOTO="ccw_ifname_end"' -+ echo "SUBSYSTEMS==\"ccwgroup\", KERNELS==\"$ifname_subchannels\", DRIVERS==\"?*\" NAME=\"$ifname_if\"" -+ echo 'LABEL="ccw_ifname_end"' -+ -+ } > /etc/udev/rules.d/81-ccw-ifname.rules -+ fi -+done -+ - znet_cio_free - diff --git a/SOURCES/0082.patch b/SOURCES/0082.patch deleted file mode 100644 index 57c726e..0000000 --- a/SOURCES/0082.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 4f43dd89a1f9c21f66d6b460c0ad1b271ee40492 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 25 May 2020 11:59:31 +0200 -Subject: [PATCH] Revert "[RHEL] network: default to network-legacy even in - presence of nm-initrd-generator" - -This reverts commit 7843bc52777683f6a4ef953d8dde7171ff3b911c. - -This will cause that NM will be used in initrd on systems where it is installed. - -Resolves: #1839706 ---- - 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 bf252eb7..8e2a74a3 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 " -- # RHEL 8.1: Default to network-legacy unless the user chose -- # network-manager manually -- if ! dracut_module_included "network-manager" ; then -+ if ! dracut_module_included "network-legacy" && [ -x "/usr/libexec/nm-initrd-generator" ] ; then -+ echo "network-manager" -+ else - echo "network-legacy" - fi - return 0 - diff --git a/SOURCES/0083.patch b/SOURCES/0083.patch deleted file mode 100644 index d33965e..0000000 --- a/SOURCES/0083.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 34ef33adfbb0b44ba6143f4ced206f948d814f86 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 27 May 2020 22:07:37 +0800 -Subject: [PATCH] 99memstrack: hook script should not call exit - -With memstrack module, rd.break may not work because the hook scripts -are sourced, not executed, so the exit call will make pre-pivot queue -exit early. See 98dracut-systemd/dracut-pre-pivot.sh, everything after -"source_hook cleanup" will be ignored. - -Replace with return instead. - -Credits go to Lukas Nykryn who helped discover and -debug this issue. - -Signed-off-by: Kairui Song -(cherry picked from commit 424f01e2a0ac0b329e68eb63048cf0d6d9c74d37) - -Resolves: #1829528 ---- - modules.d/99memstrack/memstrack-report.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99memstrack/memstrack-report.sh b/modules.d/99memstrack/memstrack-report.sh -index 241e8621..3de55bd1 100755 ---- a/modules.d/99memstrack/memstrack-report.sh -+++ b/modules.d/99memstrack/memstrack-report.sh -@@ -2,7 +2,7 @@ - . /lib/dracut-lib.sh - - if ! [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then -- exit 0 -+ return 0 - fi - - if type -P systemctl >/dev/null; then - diff --git a/SOURCES/0084.patch b/SOURCES/0084.patch deleted file mode 100644 index 62e0cb1..0000000 --- a/SOURCES/0084.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f47136bada397328d0a6f36a81138699c793fe92 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 27 May 2020 21:59:55 +0800 -Subject: [PATCH] Remove cleanup_trace_mem calls - -In commit 49c4172 all shell based memory tracing functions are removed, -there are some left over. Remove them as well. - -Signed-off-by: Kairui Song -(cherry picked from commit 2a611328652388b809a379403ceec126cb55819f) - -Resolves: #1829528 ---- - modules.d/98dracut-systemd/dracut-pre-pivot.sh | 1 - - modules.d/99base/init.sh | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh -index 96e6f8ca..cc70e3c3 100755 ---- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh -+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh -@@ -14,7 +14,6 @@ make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' - getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" - source_hook pre-pivot - --cleanup_trace_mem - # pre pivot cleanup scripts are sourced just before we switch over to the new root. - getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" - source_hook cleanup -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 2c0ccd66..a5633936 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -271,7 +271,6 @@ getarg 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-piv - source_hook pre-pivot - - make_trace_mem "hook cleanup" '1:shortmem' '2+:mem' '3+:slab' --cleanup_trace_mem - # pre pivot cleanup scripts are sourced just before we switch over to the new root. - getarg 'rd.break=cleanup' -d 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" - source_hook cleanup - diff --git a/SOURCES/0085.patch b/SOURCES/0085.patch deleted file mode 100644 index 48c3511..0000000 --- a/SOURCES/0085.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 689454c727c2730b6aa89ee4c4b7676900e07f78 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Fri, 12 Apr 2019 16:26:59 +0200 -Subject: [PATCH] Do not require non-empty kernel cmdline - -When booting with Fedora-Server-dvd-x86_64-30-20190411.n.0.iso, -/proc/cmdline is empty (libvirt, qemu host with bios, not sure if that -matters), after installation to disk, anaconda would "crash" in kernel-core -%posttrans, after calling kernel-install, because dracut would fail -with -> Could not determine the kernel command line parameters. -> Please specify the kernel command line in /etc/kernel/cmdline! - -I guess it's legitimate, even if unusual, to have no cmdline parameters. -Two changes are done in this patch: -1. do not fail if the cmdline is empty. -2. if /usr/lib/kernel/cmdline or /etc/kernel/cmdline are present, but - empty, ignore /proc/cmdline. If there's explicit configuration to - have empty cmdline, don't ignore it. - -(cherry picked from commit 38b4f4b21c3c6107d7a562fcb432237464440b91) - -Resolves: #1746069 ---- - 50-dracut.install | 4 +--- - 51-dracut-rescue.install | 10 +--------- - 2 files changed, 2 insertions(+), 12 deletions(-) - -diff --git a/50-dracut.install b/50-dracut.install -index 139ff82e..b897db84 100755 ---- a/50-dracut.install -+++ b/50-dracut.install -@@ -35,9 +35,7 @@ case "$COMMAND" in - read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline - elif [[ -f /usr/lib/kernel/cmdline ]]; then - read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline -- fi -- -- if ! [[ ${BOOT_OPTIONS[*]} ]]; then -+ else - read -r -d '' -a BOOT_OPTIONS < /proc/cmdline - fi - -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 0580062f..5ac34ef3 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -47,9 +47,7 @@ if [[ -f /etc/kernel/cmdline ]]; then - read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline - elif [[ -f /usr/lib/kernel/cmdline ]]; then - read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline --fi -- --if ! [[ "${BOOT_OPTIONS[@]}" ]]; then -+else - read -r -d '' -a line < /proc/cmdline - for i in "${line[@]}"; do - [[ "${i#initrd=*}" != "$i" ]] && continue -@@ -57,12 +55,6 @@ if ! [[ "${BOOT_OPTIONS[@]}" ]]; then - done - fi - --if ! [[ ${BOOT_OPTIONS[*]} ]]; then -- echo "Could not determine the kernel command line parameters." >&2 -- echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2 -- exit 1 --fi -- - if [[ -d "${BOOT_DIR_ABS%/*}" ]]; then - BOOT_DIR="/${MACHINE_ID}/0-rescue" - BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR} - diff --git a/SOURCES/0086.patch b/SOURCES/0086.patch deleted file mode 100644 index 884e7a5..0000000 --- a/SOURCES/0086.patch +++ /dev/null @@ -1,79 +0,0 @@ -From fc05c818dd862de2b6771dabe242bc9d26aa2160 Mon Sep 17 00:00:00 2001 -From: Jan Synacek -Date: Thu, 11 Jun 2020 11:29:41 +0200 -Subject: [PATCH] Adapt to the new udevadm version output - -See https://bugzilla.redhat.com/show_bug.cgi?id=1804252. - -RHEL-only - -Resolves: #1846034 ---- - dracut-init.sh | 2 +- - modules.d/01fips/fips.sh | 2 +- - modules.d/99base/dracut-lib.sh | 4 ++-- - modules.d/99base/init.sh | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index ab07cabf..032c38c2 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -444,7 +444,7 @@ inst_rules_wildcard() { - } - - prepare_udev_rules() { -- [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version) -+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; }) - - for f in "$@"; do - f="${initdir}/etc/udev/rules.d/$f" -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 559952ca..03da6861 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -27,7 +27,7 @@ mount_boot() - - if ! [ -e "$boot" ]; then - udevadm trigger --action=add >/dev/null 2>&1 -- [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) -+ [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; }) - i=0 - while ! [ -e $boot ]; do - if [ $UDEVVERSION -ge 143 ]; then -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 56dd63ef..96dd55ad 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -531,7 +531,7 @@ incol2() { - } - - udevsettle() { -- [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version) -+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; }) - - if [ $UDEVVERSION -ge 143 ]; then - udevadm settle --exit-if-exists=$hookdir/initqueue/work $settle_exit_if_exists -@@ -541,7 +541,7 @@ udevsettle() { - } - - udevproperty() { -- [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version) -+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; }) - - if [ $UDEVVERSION -ge 143 ]; then - for i in "$@"; do udevadm control --property=$i; done -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index a5633936..732a7f46 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -92,7 +92,7 @@ fi - - trap "emergency_shell Signal caught!" 0 - --export UDEVVERSION=$(udevadm --version) -+export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; }) - if [ $UDEVVERSION -gt 166 ]; then - # newer versions of udev use /run/udev/rules.d - export UDEVRULESD=/run/udev/rules.d - diff --git a/SOURCES/0087.patch b/SOURCES/0087.patch deleted file mode 100644 index bc029da..0000000 --- a/SOURCES/0087.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 3067edf07449e1dbc2dae0776da9426274b34cba Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 24 Jun 2020 13:06:05 +0200 -Subject: [PATCH] network-manager: move connection generation to a lib file - -Move the connection generation code to a library file so that it can -be reused from other places. - -(cherry picked from commit 6e1e87cd2567801b10b2b4f716436c48688408bf) - -Resolves: #1847518 ---- - modules.d/35network-manager/module-setup.sh | 1 + - modules.d/35network-manager/nm-config.sh | 15 +++------------ - modules.d/35network-manager/nm-lib.sh | 20 ++++++++++++++++++++ - 3 files changed, 24 insertions(+), 12 deletions(-) - -diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh -index ad2a1534..ed2f399e 100755 ---- a/modules.d/35network-manager/module-setup.sh -+++ b/modules.d/35network-manager/module-setup.sh -@@ -37,6 +37,7 @@ install() { - inst_hook initqueue/settled 99 "$moddir/nm-run.sh" - inst_rules 85-nm-unmanaged.rules - inst_libdir_file "NetworkManager/$_nm_version/libnm-device-plugin-team.so" -+ inst_simple "$moddir/nm-lib.sh" "/lib/nm-lib.sh" - - if [[ -x "$initdir/usr/sbin/dhclient" ]]; then - inst /usr/libexec/nm-dhcp-helper -diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh -index 39a1c8bd..2b9df020 100755 ---- a/modules.d/35network-manager/nm-config.sh -+++ b/modules.d/35network-manager/nm-config.sh -@@ -1,18 +1,9 @@ - #!/bin/sh - -+type nm_generate_connections >/dev/null 2>&1 || . /lib/nm-lib.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) -- --if getargbool 0 rd.neednet; then -- for i in /usr/lib/NetworkManager/system-connections/* \ -- /run/NetworkManager/system-connections/* \ -- /etc/NetworkManager/system-connections/* \ -- /etc/sysconfig/network-scripts/ifcfg-*; do -- [ -f "$i" ] || continue -- echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh -- break -- done --fi -+nm_generate_connections -diff --git a/modules.d/35network-manager/nm-lib.sh b/modules.d/35network-manager/nm-lib.sh -new file mode 100644 -index 00000000..fe053cfa ---- /dev/null -+++ b/modules.d/35network-manager/nm-lib.sh -@@ -0,0 +1,20 @@ -+#!/bin/bash -+ -+type getcmdline >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ -+nm_generate_connections() -+{ -+ rm -f /run/NetworkManager/system-connections/* -+ /usr/libexec/nm-initrd-generator -- $(getcmdline) -+ -+ if getargbool 0 rd.neednet; then -+ for i in /usr/lib/NetworkManager/system-connections/* \ -+ /run/NetworkManager/system-connections/* \ -+ /etc/NetworkManager/system-connections/* \ -+ /etc/sysconfig/network-scripts/ifcfg-*; do -+ [ -f "$i" ] || continue -+ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh -+ break -+ done -+ fi -+} - diff --git a/SOURCES/0088.patch b/SOURCES/0088.patch deleted file mode 100644 index 0bc04d2..0000000 --- a/SOURCES/0088.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7143750cf2e37f9c14ec47a8170b9186136874d7 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 24 Jun 2020 13:09:04 +0200 -Subject: [PATCH] cms: regenerate NetworkManager connections - -After changing the kernel command line, the cmsifup script calls ifup -to activate the interface. However, ifup is only available in the -network-legacy module; when using the network-manager module, we -should regenerate connections according to the command line; then -later NM will be run and will activate the device. - -(cherry picked from commit 5c3d0a96473ac339fa2d1b25213b8f301c1cfd0d) - -Resolves: #1847518 ---- - modules.d/80cms/cmsifup.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh -index 902df8d8..77c18452 100755 ---- a/modules.d/80cms/cmsifup.sh -+++ b/modules.d/80cms/cmsifup.sh -@@ -35,4 +35,9 @@ fi - IFACES="$IFACES $DEVICE" - echo "$IFACES" >> /tmp/net.ifaces - --exec ifup "$DEVICE" -+if [ -x /usr/libexec/nm-initrd-generator ]; then -+ type nm_generate_connections >/dev/null 2>&1 || . /lib/nm-lib.sh -+ nm_generate_connections -+else -+ exec ifup "$DEVICE" -+fi - diff --git a/SOURCES/0089.patch b/SOURCES/0089.patch deleted file mode 100644 index 497a94c..0000000 --- a/SOURCES/0089.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6c0071bc72dbbdd2a958277618a9b2c64c6ee460 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 2 Jul 2020 14:33:20 +0200 -Subject: [PATCH] spec: don't use NM on existing installations - -Resolves: #1839706 ---- - dracut.spec | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/dracut.spec b/dracut.spec -index c82c24f6..a8076c18 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -481,4 +481,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - %{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh - %endif - -+%triggerin network -- dracut-network < 049-83.git20200525 -+echo '# Since rhel-8.3 dracut moved to use NetworkManager -+# On existing installations we want to preserve the old scripts -+add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf -+ - %changelog - diff --git a/SOURCES/0090.patch b/SOURCES/0090.patch deleted file mode 100644 index e9ac5b7..0000000 --- a/SOURCES/0090.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 73242b75af92bc86c26cfbe2954b7ecb9aaaf765 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 4 Dec 2018 10:02:45 +0100 -Subject: [PATCH] install/dracut-install.c: install module dependencies of - dependencies - -(cherry picked from commit c38f9e980c1ee03151dd1c6602907c6228b78d30) - -Resolves: #1846343 ---- - install/dracut-install.c | 28 +++++++++++++++++++++++++--- - 1 file changed, 25 insertions(+), 3 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 88bca1d4..253ae194 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -84,6 +84,11 @@ static bool arg_mod_filter_noname = false; - static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst); - - -+static inline void kmod_module_unrefp(struct kmod_module **p) { -+ if (*p) -+ kmod_module_unref(*p); -+} -+#define _cleanup_kmod_module_unref_ _cleanup_(kmod_module_unrefp) - - static inline void kmod_module_unref_listp(struct kmod_list **p) { - if (*p) -@@ -1234,28 +1239,45 @@ static bool check_module_path(const char *path) - static int install_dependent_modules(struct kmod_list *modlist) - { - struct kmod_list *itr; -- struct kmod_module *mod; - const char *path = NULL; - const char *name = NULL; - int ret = 0; - - kmod_list_foreach(itr, modlist) { -+ _cleanup_kmod_module_unref_ struct kmod_module *mod = NULL; - mod = kmod_module_get_module(itr); - path = kmod_module_get_path(mod); - -+ if (check_hashmap(items_failed, path)) -+ return -1; -+ -+ if (check_hashmap(items, path)) { -+ continue; -+ } -+ - name = kmod_module_get_name(mod); -+ - if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) { -- kmod_module_unref(mod); - continue; - } -+ - ret = dracut_install(path, &path[kerneldirlen], false, false, true); - if (ret == 0) { -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modpre = NULL; -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modpost = NULL; - log_debug("dracut_install '%s' '%s' OK", path, &path[kerneldirlen]); - install_firmware(mod); -+ modlist = kmod_module_get_dependencies(mod); -+ ret = install_dependent_modules(modlist); -+ if (ret == 0) { -+ ret = kmod_module_get_softdeps(mod, &modpre, &modpost); -+ if (ret == 0) -+ ret = install_dependent_modules(modpre); -+ } - } else { - log_error("dracut_install '%s' '%s' ERROR", path, &path[kerneldirlen]); - } -- kmod_module_unref(mod); - } - - return ret; - diff --git a/SOURCES/0091.patch b/SOURCES/0091.patch deleted file mode 100644 index ab3411e..0000000 --- a/SOURCES/0091.patch +++ /dev/null @@ -1,50 +0,0 @@ -From e4e1ab4e129fa17c5e90a2144e15096b0267c22a Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 2 Jul 2020 09:08:03 +0200 -Subject: [PATCH] install: also install post weak dependencies of kernel - modules - -(cherry picked from commit 6dafdda4a6bdb8721133e4267553c5d86564f9e8) - -Resolves: #1846343 ---- - install/dracut-install.c | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 253ae194..51f79422 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -1272,9 +1272,13 @@ static int install_dependent_modules(struct kmod_list *modlist) - ret = install_dependent_modules(modlist); - if (ret == 0) { - ret = kmod_module_get_softdeps(mod, &modpre, &modpost); -- if (ret == 0) -- ret = install_dependent_modules(modpre); -- } -+ if (ret == 0) { -+ int r; -+ ret = install_dependent_modules(modpre); -+ r = install_dependent_modules(modpost); -+ ret = ret ? : r; -+ } -+ } - } else { - log_error("dracut_install '%s' '%s' ERROR", path, &path[kerneldirlen]); - } -@@ -1335,8 +1339,12 @@ static int install_module(struct kmod_module *mod) - - if (ret == 0) { - ret = kmod_module_get_softdeps(mod, &modpre, &modpost); -- if (ret == 0) -- ret = install_dependent_modules(modpre); -+ if (ret == 0) { -+ int r; -+ ret = install_dependent_modules(modpre); -+ r = install_dependent_modules(modpost); -+ ret = ret ? : r; -+ } - } - - return ret; - diff --git a/SOURCES/0092.patch b/SOURCES/0092.patch deleted file mode 100644 index d88db81..0000000 --- a/SOURCES/0092.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 818746166fec7c1e572ef12618edadc0535d4663 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 9 Jun 2020 03:03:18 +0800 -Subject: [PATCH] dracut.sh: Move the library workaround after squash - -Ensure the workaround is also valid when dracut-squash module is used - -Signed-off-by: Kairui Song -(cherry picked from commit de3cb0e3214c3fbab3a94e705445b4d1c2bf0dff) - -Cherry-picked from: de3cb0e3214c3fbab3a94e705445b4d1c2bf0dff -Resolves: #1841077 ---- - dracut.sh | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 487add57..4c5176a1 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1578,15 +1578,6 @@ if [[ $kernel_only != yes ]]; then - # Now we are done with lazy resolving, always install dependencies - unset DRACUT_RESOLVE_LAZY - export DRACUT_RESOLVE_DEPS=1 -- -- # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so -- for _dir in $libdirs; do -- for _f in "$_dir/libpthread.so"*; do -- [[ -e "$_f" ]] || continue -- inst_libdir_file "libgcc_s.so*" -- break 2 -- done -- done - fi - - for ((i=0; i < ${#include_src[@]}; i++)); do -@@ -1840,6 +1831,17 @@ if dracut_module_included "squash"; then - done - fi - -+if [[ $kernel_only != yes ]]; then -+ # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so -+ for _dir in $libdirs; do -+ for _f in "$dracutsysrootdir$_dir/libpthread.so"*; do -+ [[ -e "$_f" ]] || continue -+ inst_libdir_file "libgcc_s.so*" -+ break 2 -+ done -+ done -+fi -+ - if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then - dinfo "*** Stripping files ***" - find "$initdir" -type f \ - diff --git a/SOURCES/0093.patch b/SOURCES/0093.patch deleted file mode 100644 index a3db552..0000000 --- a/SOURCES/0093.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d8c0b10b15940d88a28acbcf93354e4da0babb8d Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 10 Jun 2020 15:57:20 +0800 -Subject: [PATCH] dracut.sh: FIPS workaround for openssl-libs on Fedora/RHEL - -On Fedora/RHEL, libcryto will verify both itself and libssl on start, if -libssl is missing, FIPS self test will fail. However libssl is not a -dependency of libcryto so dracut will not install it, unless some other -binary or library pulls it in. Systemd requires libssl, so in most cases -it just worked, but could fail in some corner cases where systemd is not -used. - -Signed-off-by: Kairui Song -(cherry picked from commit 5a4c3469338410b6aea9452994b4b0af1ba59be7) - -Resolves: #1841077 ---- - dracut.sh | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 4c5176a1..86e95449 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1840,6 +1840,17 @@ if [[ $kernel_only != yes ]]; then - break 2 - done - done -+ -+ # FIPS workaround for Fedora/RHEL: libcrypto needs libssl when FIPS is enabled -+ if [[ $DRACUT_FIPS_MODE ]]; then -+ for _dir in $libdirs; do -+ for _f in "$dracutsysrootdir$_dir/libcrypto.so"*; do -+ [[ -e "$_f" ]] || continue -+ inst_libdir_file -o "libssl.so*" -+ break 2 -+ done -+ done -+ fi - fi - - if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then - diff --git a/SOURCES/0094.patch b/SOURCES/0094.patch deleted file mode 100644 index fae2e92..0000000 --- a/SOURCES/0094.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 41739f232f3f353d45206ceee89ef0bc1c544f31 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 3 Aug 2020 16:51:54 +0800 -Subject: [PATCH] 90kernel-modules: add pci_hyperv - -Install pci_hyperv for SR-IOV devices on hyperv machines. - -(cherry picked from commit f7ad1479f277ddffcc501bd08919a4a4a6facc26) - -Resolves: #1854001 ---- - 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 c91ba10c..86852038 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -56,7 +56,7 @@ installkernel() { - instmods \ - yenta_socket \ - atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ -- virtio virtio_ring virtio_pci virtio_scsi \ -+ virtio virtio_ring virtio_pci virtio_scsi pci_hyperv \ - "=drivers/pcmcia" - - if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then - diff --git a/SOURCES/0095.patch b/SOURCES/0095.patch deleted file mode 100644 index ccc063b..0000000 --- a/SOURCES/0095.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 6616132de5ec2991e0b55eca6e9d12e50f7be293 Mon Sep 17 00:00:00 2001 -From: Doan Tran Cong Danh -Date: Fri, 8 Nov 2019 10:53:41 +0700 -Subject: [PATCH] multipath: require kpartx binary - -multipath requires kpartx to activate device mapper. -But kpartx is only a recommend dependency. - -Check for kpartx's existent first. - -Signed-off-by: Doan Tran Cong Danh -(cherry picked from commit cf31ed2ae687d9898cafc11ec6e4f478e806ad38) - -Resolves: #1888779 ---- - modules.d/90multipath/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index f825c00c..2b9a3166 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -29,6 +29,7 @@ check() { - - # if there's no multipath binary, no go. - require_binaries multipath || return 1 -+ require_binaries kpartx || return 1 - - return 0 - } - diff --git a/SOURCES/0096.patch b/SOURCES/0096.patch deleted file mode 100644 index 5948403..0000000 --- a/SOURCES/0096.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 59d51f92475f1b4dc81b1e6f5537f63876952c39 Mon Sep 17 00:00:00 2001 -From: Jan Macku -Date: Fri, 8 Nov 2019 16:24:13 +0100 -Subject: [PATCH] Replace ln with systemctl - -(cherry picked from commit 70b19acf941c0bf41b2c69c761124425910c0653) - -Cherry-picked from: 70b19acf941c0bf41b2c69c761124425910c0653 -Resolves: #1888779 ---- - modules.d/00systemd/module-setup.sh | 6 ++---- - modules.d/02systemd-networkd/module-setup.sh | 8 ++++---- - modules.d/06rngd/module-setup.sh | 5 ++--- - modules.d/90multipath/module-setup.sh | 3 +-- - modules.d/90stratis/module-setup.sh | 3 +-- - modules.d/95iscsi/module-setup.sh | 8 +++----- - modules.d/98dracut-systemd/module-setup.sh | 3 +-- - modules.d/99squash/module-setup.sh | 3 +-- - 8 files changed, 15 insertions(+), 24 deletions(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index e4a3f323..4ab2a896 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -225,9 +225,7 @@ install() { - systemd-ask-password-console.service \ - systemd-ask-password-plymouth.service \ - ; do -- mkdir -p "${initdir}${systemdsystemunitdir}/${i}.wants" -- ln_r "${systemdsystemunitdir}/systemd-vconsole-setup.service" \ -- "${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service" -+ systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service - done - - mkdir -p "$initdir/etc/systemd" -@@ -239,6 +237,6 @@ install() { - echo "RateLimitBurst=0" - } >> "$initdir/etc/systemd/journald.conf" - -- ln_r "${systemdsystemunitdir}/multi-user.target" "${systemdsystemunitdir}/default.target" -+ systemctl -q --root "$initdir" set-default multi-user.target - } - -diff --git a/modules.d/02systemd-networkd/module-setup.sh b/modules.d/02systemd-networkd/module-setup.sh -index b86751ea..8b87923f 100755 ---- a/modules.d/02systemd-networkd/module-setup.sh -+++ b/modules.d/02systemd-networkd/module-setup.sh -@@ -61,11 +61,11 @@ install() { - - for i in \ - systemd-networkd-wait-online.service \ -- systemd-networkd.service \ -- systemd-networkd.socket --# systemd-timesyncd.service -+ systemd-networkd.service \ -+ systemd-networkd.socket -+# systemd-timesyncd.service - do -- systemctl --root "$initdir" enable "$i" -+ systemctl -q --root "$initdir" enable "$i" - done - } - -diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh -index 43d5c2d3..354bd0bb 100644 ---- a/modules.d/06rngd/module-setup.sh -+++ b/modules.d/06rngd/module-setup.sh -@@ -33,7 +33,6 @@ check() { - 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" -+ -+ systemctl -q --root "$initdir" add-wants sysinit.target rngd.service - } -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 2b9a3166..8a032c86 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -110,8 +110,7 @@ install() { - - if dracut_module_included "systemd"; then - inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" -- mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants" -- ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/multipathd.service" -+ systemctl -q --root "$initdir" enable multipathd.service - else - inst_hook pre-trigger 02 "$moddir/multipathd.sh" - inst_hook cleanup 02 "$moddir/multipathd-stop.sh" -diff --git a/modules.d/90stratis/module-setup.sh b/modules.d/90stratis/module-setup.sh -index 29f0765b..943f572e 100755 ---- a/modules.d/90stratis/module-setup.sh -+++ b/modules.d/90stratis/module-setup.sh -@@ -24,8 +24,7 @@ install() { - - if dracut_module_included "systemd"; then - inst_simple "${moddir}/stratisd-init.service" "${systemdsystemunitdir}/stratisd-init.service" -- mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants" -- ln -rfs "${initdir}${systemdsystemunitdir}/stratisd-init.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/stratisd-init.service" -+ systemctl -q --root "$initdir" enable stratisd-init.service - else - inst_hook cmdline 25 "$moddir/stratisd-start.sh" - inst_hook cleanup 25 "$moddir/stratisd-stop.sh" -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index f6f3520d..47a92e94 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -242,20 +242,18 @@ install() { - $systemdsystemunitdir/iscsiuio.socket \ - iscsiadm iscsid - -- mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants" - for i in \ - iscsid.socket \ - iscsiuio.socket \ - ; do -- ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}" -+ systemctl -q --root "$initdir" enable "$i" - done -- -- mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants" -+ - for i in \ - iscsid.service \ - iscsiuio.service \ - ; do -- ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}" -+ systemctl -q --root "$initdir" add-wants basic.target "$i" - done - - # Make sure iscsid is started after dracut-cmdline and ready for the initqueue -diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh -index 900162c3..1387433a 100755 ---- a/modules.d/98dracut-systemd/module-setup.sh -+++ b/modules.d/98dracut-systemd/module-setup.sh -@@ -43,7 +43,6 @@ install() { - - inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator - -- mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants" - for i in \ - dracut-cmdline.service \ - dracut-cmdline-ask.service \ -@@ -55,7 +54,7 @@ install() { - dracut-pre-udev.service \ - ; do - inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}" -- ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}" -+ systemctl -q --root "$initdir" add-wants initrd.target "$i" - done - - inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index e7e9ed8e..7aa0b447 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -25,6 +25,5 @@ install() { - inst $moddir/init.sh /squash/init.sh - - inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service" -- mkdir -p "$initdir$systemdsystemunitdir/initrd-switch-root.target.wants" -- ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd-switch-root.target.wants/squash-mnt-clear.service" -+ systemctl -q --root "$initdir" add-wants initrd-switch-root.target squash-mnt-clear.service - } - diff --git a/SOURCES/0097.patch b/SOURCES/0097.patch deleted file mode 100644 index f3c00ad..0000000 --- a/SOURCES/0097.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 603f33e28cfad45c4bf9ade8e3ff3b9014b5bd4d Mon Sep 17 00:00:00 2001 -From: Ben Howard -Date: Fri, 3 Apr 2020 13:32:44 -0600 -Subject: [PATCH] multipath: add automatic configuration for multipath - -Add support for 'rd.multipath=default' for using the default -configuration on boot. The intended purpose for this is to help support -ostree-based image boots from multipathed devices (such as Fedora and -Red Hat CoreOS). - -(cherry picked from commit b8a92b715677d52dbc2b27a710b9816fd8b9a63b) - -Resolves: #1888779 ---- - dracut.cmdline.7.asc | 3 +++ - modules.d/90multipath/module-setup.sh | 7 +++++-- - modules.d/90multipath/multipathd-configure.service | 19 +++++++++++++++++++ - modules.d/90multipath/multipathd.sh | 5 +++++ - 4 files changed, 32 insertions(+), 2 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 4a7c2517..19b5cc87 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -406,6 +406,9 @@ MULTIPATH - **rd.multipath=0**:: - disable multipath detection - -+**rd.multipath=default**:: -+ use default multipath settings -+ - FIPS - ~~~~ - **rd.fips**:: -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 8a032c86..a7f250f3 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -83,11 +83,12 @@ install() { - dmsetup \ - kpartx \ - mpath_wait \ -+ mpathconf \ -+ mpathpersist \ - multipath \ - multipathd \ -- mpathpersist \ -- xdrgetuid \ - xdrgetprio \ -+ xdrgetuid \ - /etc/xdrdevices.conf \ - /etc/multipath.conf \ - /etc/multipath/* \ -@@ -109,7 +110,9 @@ install() { - fi - - if dracut_module_included "systemd"; then -+ inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" - inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service" -+ systemctl -q --root "$initdir" enable multipathd-configure.service - systemctl -q --root "$initdir" enable multipathd.service - else - inst_hook pre-trigger 02 "$moddir/multipathd.sh" -diff --git a/modules.d/90multipath/multipathd-configure.service b/modules.d/90multipath/multipathd-configure.service -new file mode 100644 -index 00000000..de690615 ---- /dev/null -+++ b/modules.d/90multipath/multipathd-configure.service -@@ -0,0 +1,19 @@ -+[Unit] -+Description=Device-Mapper Multipath Default Configuration -+Before=iscsi.service iscsid.service lvm2-activation-early.service -+Wants=systemd-udev-trigger.service systemd-udev-settle.service local-fs-pre.target -+After=systemd-udev-trigger.service systemd-udev-settle.service -+Before=local-fs-pre.target multipathd.service -+DefaultDependencies=no -+Conflicts=shutdown.target -+ -+ConditionKernelCommandLine=rd.multipath=default -+ConditionPathExists=!/etc/multipath.conf -+ -+[Service] -+Type=oneshot -+ExecStartPre=-/usr/bin/mkdir -p /etc/multipath/multipath.conf.d -+ExecStart=/usr/sbin/mpathconf --enable -+ -+[Install] -+WantedBy=sysinit.target -diff --git a/modules.d/90multipath/multipathd.sh b/modules.d/90multipath/multipathd.sh -index 2c2dcc85..936c5dc7 100755 ---- a/modules.d/90multipath/multipathd.sh -+++ b/modules.d/90multipath/multipathd.sh -@@ -1,5 +1,10 @@ - #!/bin/sh - -+if [ "$(getarg rd.multipath)x" == "default" ] && [ ! -e /etc/multipath.conf ]; then -+ mkdir -p /etc/multipath/multipath.conf.d -+ mpathconf --enable -+fi -+ - if getargbool 1 rd.multipath -d -n rd_NO_MULTIPATH && [ -e /etc/multipath.conf ]; then - modprobe dm-multipath - multipathd -B || multipathd - diff --git a/SOURCES/0098.patch b/SOURCES/0098.patch deleted file mode 100644 index fa8c6f2..0000000 --- a/SOURCES/0098.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 1e7a27bd5f463409392d34816a10bf108ee896c6 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Fri, 9 Oct 2020 19:44:35 -0400 -Subject: [PATCH] 98dracut-systemd: don't wait for root device if remote - cryptsetup active - -This is a plain and simple hack around dependency issues between dracut -and systemd. - -When using Tang-pinned LUKS root devices, we want to rely on -`systemd-cryptsetup@.service` to unlock it. However, that service only -runs `After=remote-fs-pre.target`, while `dracut-initqueue.service` has -`Before=remote-fs-pre.target` (which makes sense because we don't want -to attempt networked root devices before networking is up). - -However, the rootfs-generator here wants to make sure that the root -device exists *before* exiting the initqueue via an initqueue/finished -"devexists" hook. This will never work though because by design -`systemd-cryptsetup@.service`, which unlocks the root device, won't run -until after we exit. - -So we have a dependency cycle: - - initqueue -> devexists hook -> root device -> - systemd-cryptsetup@.service -> remote-fs-pre.target -> initqueue - -There's no clean way to break this. The root issue is that there's no -way right now to split sequencing of systemd services across the -initqueue/online and initqueue/finished events because it's all bundled -in a single service. (The deeper root issue of course is that we have -two init systems. :) ). - -Here we do a tactical fix: if there's a `systemd-cryptsetup@.service` -instance, let's assume it's for the root device and skip waiting for it -to show up if it depends on `remote-fs-pre.target`. - -(cherry picked from commit 512c51d2677dd1637cc203e3676fefb50a3d73d0) - -Resolves: #1897384 ---- - modules.d/98dracut-systemd/rootfs-generator.sh | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/modules.d/98dracut-systemd/rootfs-generator.sh b/modules.d/98dracut-systemd/rootfs-generator.sh -index 4ae693bb..bb376c0f 100755 ---- a/modules.d/98dracut-systemd/rootfs-generator.sh -+++ b/modules.d/98dracut-systemd/rootfs-generator.sh -@@ -13,8 +13,15 @@ generator_wait_for_dev() - - if ! [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ]; then - -- printf '[ -e "%s" ]\n' $1 \ -- >> "$hookdir/initqueue/finished/devexists-${_name}.sh" -+ # If a LUKS device needs unlocking via systemd in the initrd, assume -+ # it's for the root device. In that case, don't block on it if it's -+ # after remote-fs-pre.target since the initqueue is ordered before it so -+ # it will never actually show up (think Tang-pinned rootfs). -+ cat > "$hookdir/initqueue/finished/devexists-${_name}.sh" << EOF -+if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then -+ [ -e "$1" ] -+fi -+EOF - { - printf '[ -e "%s" ] || ' $1 - printf 'warn "\"%s\" does not exist"\n' $1 - diff --git a/SOURCES/0099.patch b/SOURCES/0099.patch deleted file mode 100644 index 317e3a6..0000000 --- a/SOURCES/0099.patch +++ /dev/null @@ -1,43 +0,0 @@ -From aa4cf6df94dd3a858144040138d970a57c701a8d Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Thu, 12 Nov 2020 11:27:39 -0500 -Subject: [PATCH] 90crypt: pull in remote-cryptsetup.target enablement - -This should've been part of #964. As mentioned there, the -`initrd-cryptsetup.target` approach was reverted in the end, and we went -back to relying in `remote-cryptsetup.target`: - -https://github.com/systemd/systemd/pull/17467 - -So we do need to ship the enablement symlink for it. - -(cherry picked from commit a23a4680e7d04d1016e9d5e4b53b1e65f1ca98aa) - -Resolves: #1897384 ---- - modules.d/90crypt/module-setup.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 1ec59096..a26b6dff 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -120,6 +120,8 @@ install() { - inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" - - if dracut_module_included "systemd"; then -+ # the cryptsetup targets are already pulled in by 00systemd, but not -+ # the enablement symlinks - inst_multiple -o \ - $systemdutildir/system-generators/systemd-cryptsetup-generator \ - $systemdutildir/systemd-cryptsetup \ -@@ -127,6 +129,8 @@ install() { - $systemdsystemunitdir/systemd-ask-password-console.service \ - $systemdsystemunitdir/cryptsetup.target \ - $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \ -+ $systemdsystemunitdir/remote-cryptsetup.target \ -+ $systemdsystemunitdir/initrd-root-device.target.wants/remote-cryptsetup.target \ - systemd-ask-password systemd-tty-ask-password-agent - inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator - fi - diff --git a/SOURCES/0100.patch b/SOURCES/0100.patch deleted file mode 100644 index 80c2999..0000000 --- a/SOURCES/0100.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 045aa82701ecdebf8482b25dc0abf1b3b7cc3ce5 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 30 Nov 2020 11:04:42 +0100 -Subject: [PATCH] fix backport of 70b19acf - -The patch was missing an important hunk of the original diff which -converted another `ln_r` to `systemctl set-default`. Without it, the -initrd would try to boot `multi-user.target` instead of `initrd.target`. -The reason is that `systemctl set-default` modifies `/etc` while `ln_r` -modifies `/usr`. And so the `set-default multi-user.target` in 00systemd -takes priority over the `ln_r initrd.target` in `01systemd-initrd`. - -Thanks Jonathan Lebon for spotting this. - -Resolves: #1888779 ---- - modules.d/01systemd-initrd/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01systemd-initrd/module-setup.sh b/modules.d/01systemd-initrd/module-setup.sh -index cb8a8fa6..a42e220a 100755 ---- a/modules.d/01systemd-initrd/module-setup.sh -+++ b/modules.d/01systemd-initrd/module-setup.sh -@@ -36,7 +36,7 @@ install() { - $systemdsystemunitdir/initrd-udevadm-cleanup-db.service \ - $systemdsystemunitdir/initrd-parse-etc.service - -- ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target" -+ systemctl -q --root "$initdir" set-default initrd.target - - local VERSION="" - local PRETTY_NAME="" - diff --git a/SOURCES/0101.patch b/SOURCES/0101.patch deleted file mode 100644 index 27ad4a6..0000000 --- a/SOURCES/0101.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 08ef5f0da71b84f606c2a75bd0574b206b997fc3 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 27 Nov 2020 09:32:20 +0100 -Subject: [PATCH] multipathd: fix the comparison - -From shellcheck: -/usr/lib/dracut/modules.d/90multipath/multipathd.sh:3:32: warning[SC2039]: In POSIX sh, == in place of = is undefined. -/usr/lib/dracut/modules.d/90multipath/multipathd.sh:3:32: warning[SC2193]: The arguments to this comparison can never be equal. - -(cherry picked from commit 7c2521091f30d7c14caaf96850208afa2fe1d811) - -Resolves: #1888779 ---- - modules.d/90multipath/multipathd.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90multipath/multipathd.sh b/modules.d/90multipath/multipathd.sh -index 936c5dc7..b0183ffe 100755 ---- a/modules.d/90multipath/multipathd.sh -+++ b/modules.d/90multipath/multipathd.sh -@@ -1,6 +1,6 @@ - #!/bin/sh - --if [ "$(getarg rd.multipath)x" == "default" ] && [ ! -e /etc/multipath.conf ]; then -+if [ "$(getarg rd.multipath)" = "default" ] && [ ! -e /etc/multipath.conf ]; then - mkdir -p /etc/multipath/multipath.conf.d - mpathconf --enable - fi - diff --git a/SOURCES/0102.patch b/SOURCES/0102.patch deleted file mode 100644 index ad63926..0000000 --- a/SOURCES/0102.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ab6377eebef8e811dd3fd6d43e2af14dbada75d9 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 15 Dec 2020 14:04:24 +0100 -Subject: [PATCH] dracut-systemd: create the initrd.target.wants directory - -kexec-tools depends on the existence of this directory in RHEL8 - -Resolves: #1888779 ---- - modules.d/98dracut-systemd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh -index 1387433a..9a0f476c 100755 ---- a/modules.d/98dracut-systemd/module-setup.sh -+++ b/modules.d/98dracut-systemd/module-setup.sh -@@ -43,6 +43,7 @@ install() { - - inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator - -+ mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants" - for i in \ - dracut-cmdline.service \ - dracut-cmdline-ask.service \ - diff --git a/SOURCES/0103.patch b/SOURCES/0103.patch deleted file mode 100644 index cdce751..0000000 --- a/SOURCES/0103.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b0e5702c64f83449d62e83d70d0bb806c6abdc9a Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 4 Aug 2020 14:16:19 +0200 -Subject: [PATCH] match the whole string - -(cherry picked from commit ae83919a7a07b5c90cae8ce8b1349efc212a7aee) - -Resolves: #1552619 ---- - modules.d/95zfcp/parse-zfcp.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh -index 6e1514fd..fb4d9c9e 100755 ---- a/modules.d/95zfcp/parse-zfcp.sh -+++ b/modules.d/95zfcp/parse-zfcp.sh -@@ -3,7 +3,7 @@ - getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf - - for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do -- echo $zfcp_arg | grep '0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\},0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}' >/dev/null -+ echo $zfcp_arg | grep '^0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\},0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}$' >/dev/null - test $? -ne 0 && die "For argument 'rd.zfcp=$zfcp_arg'\nSorry, invalid format." - ( - IFS="," - diff --git a/SOURCES/0104.patch b/SOURCES/0104.patch deleted file mode 100644 index ac55496..0000000 --- a/SOURCES/0104.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b76aac712f822e75951b10f516c99c573b89e4fe Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 4 Aug 2020 14:18:54 +0200 -Subject: [PATCH] match simplified rd.zfcp format too - -The simplified format was introduced by commit -c8aa1d949aecaf146b0a0e1ce269f69e6048dc5a . - -(cherry picked from commit d9e27b091717a1ce1c58cc911d9d7b5ec3ed901e) - -Resolves: #1552619 ---- - modules.d/95zfcp/parse-zfcp.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh -index fb4d9c9e..5aa6add8 100755 ---- a/modules.d/95zfcp/parse-zfcp.sh -+++ b/modules.d/95zfcp/parse-zfcp.sh -@@ -3,7 +3,7 @@ - getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf - - for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do -- echo $zfcp_arg | grep '^0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\},0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}$' >/dev/null -+ echo $zfcp_arg | grep '^0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\}\(,0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}\)\?$' >/dev/null - test $? -ne 0 && die "For argument 'rd.zfcp=$zfcp_arg'\nSorry, invalid format." - ( - IFS="," - diff --git a/SOURCES/0105.patch b/SOURCES/0105.patch deleted file mode 100644 index dfd8c62..0000000 --- a/SOURCES/0105.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 27921953a7508209deece59d74e5a957a247278d Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 20 Nov 2020 10:33:56 +0100 -Subject: [PATCH] base: hardcode rhel red - -RHEL-only -Resolves: #1650258 ---- - 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 3578643c..d10aa6a2 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -74,7 +74,7 @@ install() { - VERSION+="dracut-$DRACUT_VERSION" - PRETTY_NAME+="dracut-$DRACUT_VERSION (Initramfs)" - VERSION_ID=$DRACUT_VERSION -- ANSI_COLOR="0;34" -+ ANSI_COLOR="0;31" - - [ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p ${initdir}/usr/lib - { - diff --git a/SOURCES/0106.patch b/SOURCES/0106.patch deleted file mode 100644 index 689d00a..0000000 --- a/SOURCES/0106.patch +++ /dev/null @@ -1,30 +0,0 @@ -From dc6438116746147e55c624a58116cc7f9f254c8a Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 7 Feb 2019 16:09:43 +0100 -Subject: [PATCH] 95iscsi: - /sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not - exist - -cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory -/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 90: [: -eq: unary operator expected - -(cherry picked from commit 94eccd15c533f9e10cb0ccdec7e8a42c29bbc8d0) - -Resolves: #1552619 ---- - modules.d/95iscsi/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 47a92e94..dc63ef46 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -86,6 +86,7 @@ install_iscsiroot() { - iscsi_host=${host##*/} - - for flash in ${host}/flashnode_sess-* ; do -+ [ ! -e "$flash/is_boot_target" ] && continue - is_boot=$(cat $flash/is_boot_target) - if [ $is_boot -eq 1 ] ; then - # qla4xxx flashnode session; skip iBFT discovery - diff --git a/SOURCES/0107.patch b/SOURCES/0107.patch deleted file mode 100644 index d8abb6d..0000000 --- a/SOURCES/0107.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ba1a065c528bd5774c61a3c286e9a7ed7cc467e8 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 21 Mar 2019 14:40:33 +0100 -Subject: [PATCH] iscsi: fix error messages with iSCSI root - -Fixes these error messages during intird build: - -cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory -/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 91: [: -eq: unary operator expected -cat: '/sys/devices/platform/host3/flashnode_sess-*/is_boot_target': No such file or directory -/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 91: [: -eq: unary operator expected - -(cherry picked from commit 78efd6988ec6b39ea80ba8e432d7df1abe1c081f) - -Resolves: #1552619 ---- - modules.d/95iscsi/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index dc63ef46..618d1dc2 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -86,6 +86,7 @@ install_iscsiroot() { - iscsi_host=${host##*/} - - for flash in ${host}/flashnode_sess-* ; do -+ [ -f "$flash" ] || continue - [ ! -e "$flash/is_boot_target" ] && continue - is_boot=$(cat $flash/is_boot_target) - if [ $is_boot -eq 1 ] ; then - diff --git a/SOURCES/0108.patch b/SOURCES/0108.patch deleted file mode 100644 index dc9c2c8..0000000 --- a/SOURCES/0108.patch +++ /dev/null @@ -1,225 +0,0 @@ -From 0954a69e884e99af5082f93e2de30fa8dfdba83e Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Mon, 25 Nov 2019 11:33:42 +0100 -Subject: [PATCH] 95nvmf: add module for NVMe-oF - -Add a module for booting from NVMe-oF devices. - -Signed-off-by: Hannes Reinecke -(cherry picked from commit 2f03d69f9dfdc0c905c4d9cb69ee93a5256123cb) - -Resolves: #1731601 ---- - dracut.spec | 1 + - modules.d/95nvmf/module-setup.sh | 88 +++++++++++++++++++++++ - modules.d/95nvmf/parse-nvmf-boot-connections.sh | 95 +++++++++++++++++++++++++ - 3 files changed, 184 insertions(+) - -diff --git a/dracut.spec b/dracut.spec -index a8076c18..3db5c0cf 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -370,6 +370,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - %{dracutlibdir}/modules.d/95debug - %{dracutlibdir}/modules.d/95fstab-sys - %{dracutlibdir}/modules.d/95lunmask -+%{dracutlibdir}/modules.d/95nvmf - %{dracutlibdir}/modules.d/95resume - %{dracutlibdir}/modules.d/95rootfs-block - %{dracutlibdir}/modules.d/95terminfo -diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh -new file mode 100755 -index 00000000..db43ec01 ---- /dev/null -+++ b/modules.d/95nvmf/module-setup.sh -@@ -0,0 +1,88 @@ -+#!/bin/bash -+ -+# called by dracut -+check() { -+ require_binaries nvme || return 1 -+ [ -f /etc/nvme/hostnqn ] || return 255 -+ [ -f /etc/nvme/hostid ] || return 255 -+ -+ is_nvme_fc() { -+ local _dev=$1 -+ local traddr -+ -+ [[ -L "/sys/dev/block/$_dev" ]] || return 0 -+ cd -P "/sys/dev/block/$_dev" || return 0 -+ if [ -f partition ] ; then -+ cd .. -+ fi -+ for d in device/nvme* ; do -+ [ -L "$d" ] || continue -+ if readlink "$d" | grep -q nvme-fabrics ; then -+ traddr=$(cat "$d"/address) -+ break -+ fi -+ done -+ [[ "${traddr#traddr=nn-}" != "$traddr" ]] -+ } -+ -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ pushd . >/dev/null -+ for_each_host_dev_and_slaves is_nvme_fc -+ local _is_nvme_fc=$? -+ popd >/dev/null -+ [[ $_is_nvme_fc == 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 -+ fi -+ } -+ return 0 -+} -+ -+# called by dracut -+depends() { -+ echo bash rootfs-block -+ return 0 -+} -+ -+# called by dracut -+installkernel() { -+ instmods nvme_fc lpfc qla2xxx -+} -+ -+# called by dracut -+cmdline() { -+ local _hostnqn -+ local _hostid -+ if [ -f /etc/nvme/hostnqn ] ; then -+ _hostnqn=$(cat /etc/nvme/hostnqn) -+ echo -n " nvmf.hostnqn=${_hostnqn}" -+ fi -+ if [ -f /etc/nvme/hostid ] ; then -+ _hostid=$(cat /etc/nvme/hostid) -+ echo -n " nvmf.hostid=${_hostid}" -+ fi -+ echo "" -+} -+ -+# called by dracut -+install() { -+ if [[ $hostonly_cmdline == "yes" ]]; then -+ local _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_multiple nvme -+ inst_multiple -o \ -+ "$systemdsystemunitdir/nvm*-connect@.service" \ -+ "$systemdsystemunitdir/nvm*-connect.target" -+ inst_hook cmdline 99 "$moddir/parse-nvmf-boot-connections.sh" -+ inst_simple "/etc/nvme/discovery.conf" -+ inst_rules /usr/lib/udev/rules.d/70-nvm*-autoconnect.rules -+ inst_rules /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules -+ dracut_need_initqueue -+} -diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -new file mode 100755 -index 00000000..0d16b871 ---- /dev/null -+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -@@ -0,0 +1,95 @@ -+#!/bin/sh -+# -+# Supported formats: -+# nvmf.hostnqn= -+# nvmf.hostid= -+# nvmf.discover=::: -+# -+# Examples: -+# nvmf.hostnqn=nqn.2014-08.org.nvmexpress:uuid:37303738-3034-584d-5137-333230423843 -+# nvmf.discover=rdma:192.168.1.3::4420 -+# nvmf.discover=fc:auto -+# -+# Note: FC does autodiscovery, so typically there is no need to -+# specify any discover parameters for FC. -+# -+ -+parse_nvmf_discover() { -+ OLDIFS="$IFS" -+ IFS=: -+ trtype="none" -+ traddr="none" -+ hosttraddr="none" -+ trsvcid=4420 -+ -+ set $1 -+ IFS="$OLDIFS" -+ -+ case $# in -+ 2) -+ trtype=$1 -+ traddr=$2 -+ ;; -+ 3) -+ trtype=$1 -+ traddr=$2 -+ hosttraddr=$3 -+ ;; -+ 4) -+ trtype=$1 -+ traddr=$2 -+ hosttraddr=$3 -+ trsvcid=$4 -+ ;; -+ *) -+ warn "Invalid arguments for nvmf.discover=$1" -+ return 1 -+ ;; -+ esac -+ if [ -z "$traddr" ] ; then -+ warn "traddr is mandatory for $trtype" -+ return 1; -+ fi -+ [ -z "$hosttraddr" ] && hosttraddr="none" -+ [ -z "$trsvcid" ] && trsvcid="none" -+ if [ "$trtype" = "fc" ] ; then -+ if [ -z "$hosttraddr" ] ; then -+ warn "host traddr is mandatory for fc" -+ return 1 -+ fi -+ elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ] ; then -+ warn "unsupported transport $trtype" -+ return 1 -+ elif [ -z "$trsvcid" ] ; then -+ trsvcid=4420 -+ fi -+ echo "--transport=$trtype --traddr=$traddr --host-traddr=$hosttraddr --trsvcid=$trsvcid" >> /etc/nvme/discovery.conf -+} -+ -+if ! getargbool 0 rd.nonvmf ; then -+ info "rd.nonvmf=0: skipping nvmf" -+ return 0 -+fi -+ -+nvmf_hostnqn=$(getarg nvmf.hostnqn=) -+if [ -n "$nvmf_hostnqn" ] ; then -+ echo "$nvmf_hostnqn" > /etc/nvme/hostnqn -+fi -+nvmf_hostid=$(getarg nvmf.hostid=) -+if [ -n "$nvmf_hostid" ] ; then -+ echo "$nvmf_hostid" > /etc/nvme/hostid -+fi -+ -+for d in $(getargs nvmf.discover=); do -+ parse_nvmf_discover "$d" -+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 --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all -+else -+ /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery -+fi - diff --git a/SOURCES/0109.patch b/SOURCES/0109.patch deleted file mode 100644 index c176606..0000000 --- a/SOURCES/0109.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 605b45361ff9336bb9ac2526b5f7d50e7e33e99f Mon Sep 17 00:00:00 2001 -From: Jan Macku -Date: Fri, 1 Nov 2019 14:58:56 +0100 -Subject: [PATCH] Write dns values passed by ip argument to ifcfg-* files - -(cherry picked from commit cb86c560b0da465e06c18df12308cb3f30fa4803) - -Resolves: #1767100 ---- - modules.d/45ifcfg/write-ifcfg.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index 3bf847a5..abd111fc 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -270,7 +270,7 @@ for netup in /tmp/net.*.did-setup ; do - done - fi - i=1 -- for ns in $(getargs nameserver); do -+ for ns in $(getargs nameserver) $dns1 $dns2; do - echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif - i=$((i+1)) - done - diff --git a/SOURCES/0110.patch b/SOURCES/0110.patch deleted file mode 100644 index df8aa9c..0000000 --- a/SOURCES/0110.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 96c6e40774a78f2509aab1260d0f6aaa3b413597 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Thu, 13 Feb 2020 11:37:13 +0100 -Subject: [PATCH] dracut.sh: added help for --regenerate-all - -(cherry picked from commit cdc9cd0e41615d5f5f5af7887991a311cf5c4c7a) - -Resolves: #1802522 ---- - dracut.sh | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 86e95449..e70dab16 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -182,8 +182,8 @@ Creates initial ramdisk images for preloading modules - --mount "[DEV] [MP] [FSTYPE] [FSOPTS]" - Mount device [DEV] on mountpoint [MP] with filesystem - [FSTYPE] and options [FSOPTS] in the initramfs -- --mount "[MP]" Same as above, but [DEV], [FSTYPE] and [FSOPTS] are -- determined by looking at the current mounts. -+ --mount "[MP]" Same as above, but [DEV], [FSTYPE] and [FSOPTS] are -+ determined by looking at the current mounts. - --add-device "[DEV]" Bring up [DEV] in initramfs - -i, --include [SOURCE] [TARGET] - Include the files in the SOURCE directory into the -@@ -234,7 +234,9 @@ Creates initial ramdisk images for preloading modules - --uefi Create an UEFI executable with the kernel cmdline and - kernel combined - --uefi-stub [FILE] Use the UEFI stub [FILE] to create an UEFI executable -- --kernel-image [FILE] location of the kernel image -+ --kernel-image [FILE] Location of the kernel image -+ --regenerate-all Regenerate all initramfs images at the default location -+ for the kernel versions found on the system - - If [LIST] has multiple arguments, then you have to put these in quotes. - - diff --git a/SOURCES/0111.patch b/SOURCES/0111.patch deleted file mode 100644 index d78b2ca..0000000 --- a/SOURCES/0111.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 8658cfd92b50197dd4f4d3b6d136950fe007ffc0 Mon Sep 17 00:00:00 2001 -From: Frank Deng -Date: Sat, 15 Jun 2019 13:35:42 -0700 -Subject: [PATCH] 35network-legacy: fix classless static route parsing - -(cherry picked from commit 11e1f680656177cfbba4e06f08b6707f4a812bc0) - -Resolves: #1811042 ---- - modules.d/35network-legacy/dhclient-script.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh -index f1a60005..44633b30 100755 ---- a/modules.d/35network-legacy/dhclient-script.sh -+++ b/modules.d/35network-legacy/dhclient-script.sh -@@ -126,9 +126,11 @@ parse_option_121() { - elif [ $mask -gt 8 ]; then - destination="$1.$2.0.0/$mask" - shift; shift -- else -+ elif [ $mask -gt 0 ]; then - destination="$1.0.0.0/$mask" - shift -+ else -+ destination="0.0.0.0/$mask" - fi - - # Read the gateway -@@ -138,7 +140,7 @@ parse_option_121() { - # Multicast routing on Linux - # - If you set a next-hop address for a multicast group, this breaks with Cisco switches - # - If you simply leave it link-local and attach it to an interface, it works fine. -- if [ $multicast -eq 1 ]; then -+ if [ $multicast -eq 1 -o "$gateway" = "0.0.0.0" ]; then - temp_result="$destination dev $interface" - else - temp_result="$destination via $gateway dev $interface" - diff --git a/SOURCES/0112.patch b/SOURCES/0112.patch deleted file mode 100644 index 9ca9806..0000000 --- a/SOURCES/0112.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 33f3c41793b8c22ae4c7158f7480b38d4eed3a73 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 10 Mar 2020 15:18:37 +0100 -Subject: [PATCH] network: fix glob matching ipv6 addresses - -In this case we want to cover three cases -1) ip_address:ip_address -2) number:macaddress -3) :macaddress - -We consider something an IPv6 address if it starts with number and -contains ":", but IPv6 addresses are in hexa. - -(cherry picked from commit 7069132ec7e94a3274aa1b3b3b6e339066118a4d) - -Resolves: #1812046 ---- - 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 6babcccf..fc914b30 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -508,7 +508,7 @@ ip_to_var() { - [ -n "$6" ] && dev=$6 - [ -n "$7" ] && autoconf=$7 - case "$8" in -- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) -+ [0-9a-fA-F]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) - dns1="$8" - [ -n "$9" ] && dns2="$9" - ;; - diff --git a/SOURCES/0113.patch b/SOURCES/0113.patch deleted file mode 100644 index 0d38d96..0000000 --- a/SOURCES/0113.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f9c068e999cc76eaa318cc0773ef9133ea986131 Mon Sep 17 00:00:00 2001 -From: Sebastian Mitterle -Date: Thu, 19 Mar 2020 12:12:50 +0100 -Subject: [PATCH] dasd: only install /etc/dasd.conf if present - -`dasd.conf` needn't be present on system even if modules have been loaded. - -Check if file exists to avoid error message during kernel update -```bash -dracut-install: ERROR: installing '/etc/dasd.conf' -dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.YvVRx5/initramfs -H /etc/dasd.conf -``` - -(cherry picked from commit defb1611c771d9f05780aebb101baefde2f66874) - -Resolves: #1815043 ---- - modules.d/95dasd/module-setup.sh | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95dasd/module-setup.sh b/modules.d/95dasd/module-setup.sh -index 0da61309..ec33a9e0 100755 ---- a/modules.d/95dasd/module-setup.sh -+++ b/modules.d/95dasd/module-setup.sh -@@ -18,8 +18,9 @@ depends() { - install() { - inst_hook cmdline 30 "$moddir/parse-dasd.sh" - inst_multiple dasdinfo dasdconf.sh normalize_dasd_arg -- if [[ $hostonly ]]; then -- inst -H /etc/dasd.conf -+ conf=/etc/dasd.conf -+ if [[ $hostonly && -f $conf ]] ; then -+ inst -H $conf - fi - inst_rules 56-dasd.rules - inst_rules 59-dasd.rules - diff --git a/SOURCES/0114.patch b/SOURCES/0114.patch deleted file mode 100644 index e9742e0..0000000 --- a/SOURCES/0114.patch +++ /dev/null @@ -1,27 +0,0 @@ -From af492162772a6ed26fbc8223012348ae4ad000e5 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Fri, 13 Nov 2020 10:45:59 +0100 -Subject: [PATCH] 90multipath: install kpartx's 11-dm-parts.rules - -This makes /dev/disk/by-uuid links point to the right device. - -(cherry picked from commit 0f89c0dff6b96c9ca09b48a2890399b145f38bdb) - -Resolves: #1849021 ---- - modules.d/90multipath/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index a7f250f3..1844a035 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -125,6 +125,6 @@ install() { - inst_rules 40-multipath.rules 56-multipath.rules \ - 62-multipath.rules 65-multipath.rules \ - 66-kpartx.rules 67-kpartx-compat.rules \ -- 11-dm-mpath.rules -+ 11-dm-mpath.rules 11-dm-parts.rules - } - - diff --git a/SOURCES/0115.patch b/SOURCES/0115.patch deleted file mode 100644 index b0b33a4..0000000 --- a/SOURCES/0115.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8680b657da61ce533f1c91e79eadd3c46f9e98d0 Mon Sep 17 00:00:00 2001 -From: "Eugene S. Sobolev" -Date: Fri, 14 Feb 2020 11:49:06 +0300 -Subject: [PATCH] network/net-lib.sh: Configure all iBFT interfaces - -Added boolean command line option rd.iscsi.mp - -(cherry picked from commit c7ee6b3dbb8dfad61aa337b2ecf7e4eaeddc4b4b) - -Resolves: #1851984 ---- - dracut.cmdline.7.asc | 3 +++ - modules.d/40network/net-lib.sh | 6 ++++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 19b5cc87..9003c430 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -764,6 +764,9 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30 - **rd.iscsi.ibft** **rd.iscsi.ibft=1**: - Turn on iBFT autoconfiguration for the interfaces - -+**rd.iscsi.mp** **rd.iscsi.mp=1**: -+ Configure all iBFT interfaces, not only used for booting (multipath) -+ - **rd.iscsi.waitnet=0**: - Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets. - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index fc914b30..f0c1c041 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -251,8 +251,10 @@ ibft_to_cmdline() { - [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a) - # Skip invalid interfaces - (( $flags & 1 )) || continue -- # Skip interfaces not used for booting -- (( $flags & 2 )) || continue -+ # Skip interfaces not used for booting unless using multipath -+ if ! getargbool 0 rd.iscsi.mp ; then -+ (( $flags & 2 )) || continue -+ fi - [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) - [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) - [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) - diff --git a/SOURCES/0116.patch b/SOURCES/0116.patch deleted file mode 100644 index 4c94398..0000000 --- a/SOURCES/0116.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b14ba27a3cdc7a71ded3c4b424129ffd61d7be85 Mon Sep 17 00:00:00 2001 -From: Denis Volkov -Date: Tue, 4 Aug 2020 19:51:27 +0500 -Subject: [PATCH] Change the order of NFS servers during the boot NFS server - provided by DHCP in next-server option has higher priority than DHCP-server - itself - -(cherry picked from commit 09a691af3b63543fe58faa02661f785b907a78a6) - -Resolves: #1859513 ---- - modules.d/95nfs/nfs-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh -index 1ba4f5ff..95844f58 100755 ---- a/modules.d/95nfs/nfs-lib.sh -+++ b/modules.d/95nfs/nfs-lib.sh -@@ -112,8 +112,8 @@ nfsroot_from_dhcp() { - [ -n "$new_root_path" ] && nfsroot_to_var "$nfs:$new_root_path" - [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s - [ -z "$server" ] && server=$srv -- [ -z "$server" ] && server=$new_dhcp_server_identifier - [ -z "$server" ] && server=$new_next_server -+ [ -z "$server" ] && server=$new_dhcp_server_identifier - [ -z "$server" ] && server=${new_root_path%%:*} - } - - diff --git a/SOURCES/0117.patch b/SOURCES/0117.patch deleted file mode 100644 index eedef89..0000000 --- a/SOURCES/0117.patch +++ /dev/null @@ -1,39 +0,0 @@ -From cfa57e264efa138e99257fbfbe18449150a96c4d Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 14 Feb 2019 20:18:04 +0100 -Subject: [PATCH] install: string_hash_func should not be fed with NULL - -If kmod_module_get_path returns NULL, we should skip that entry, -the hash function does not like NULL pointers. - -(cherry picked from commit fc141f22869bad2e5409d1cc555c1a42ea738343) - -Resolves: #1868525 ---- - install/dracut-install.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 51f79422..f8ec9a59 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -1248,6 +1248,9 @@ static int install_dependent_modules(struct kmod_list *modlist) - mod = kmod_module_get_module(itr); - path = kmod_module_get_path(mod); - -+ if (path == NULL) -+ continue; -+ - if (check_hashmap(items_failed, path)) - return -1; - -@@ -1257,7 +1260,7 @@ static int install_dependent_modules(struct kmod_list *modlist) - - name = kmod_module_get_name(mod); - -- if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) { -+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) { - continue; - } - - diff --git a/SOURCES/0118.patch b/SOURCES/0118.patch deleted file mode 100644 index 4588a96..0000000 --- a/SOURCES/0118.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 561339d4d04c5481a3239017d714f035fc5bc55a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= - -Date: Tue, 3 Mar 2020 21:20:34 +0100 -Subject: [PATCH] Consider also drm_dev_register when looking for gpu driver - -DRM drivers are filtered for drm_crtc_init symbol, -but not all drivers use it. Especially, cirrus driver -doesn't use it since Linux 5.2. - -The practical result is text plymouth theme instead of graphical when in qemu. - -Fix it by looking also for drm_dev_register symbol. -Suggested by @haraldh -Fixes #712 - -(cherry picked from commit ebeed55c073eeaf78b738fe2c91bb6327a2c3bfe) - -Resolves: #1874506 ---- - 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 23545e34..a1711c00 100755 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -40,6 +40,6 @@ installkernel() { - fi - done - else -- dracut_instmods -o -s "drm_crtc_init" "=drivers/gpu/drm" "=drivers/staging" -+ dracut_instmods -o -s "drm_crtc_init|drm_dev_register" "=drivers/gpu/drm" "=drivers/staging" - fi - } - diff --git a/SOURCES/0119.patch b/SOURCES/0119.patch deleted file mode 100644 index 42c2aef..0000000 --- a/SOURCES/0119.patch +++ /dev/null @@ -1,27 +0,0 @@ -From add76751a1bc290088ca650cbec0be3696beb8d6 Mon Sep 17 00:00:00 2001 -From: GuoChuang -Date: Mon, 24 Aug 2020 14:03:48 +0800 -Subject: [PATCH] fix graphics startup failure with the rhgb paramter in - CentOS8.2 - -(cherry picked from commit d76e9ad5d7b16edb3c544ed3888640bea0efbf72) - -Resolves: #1874506 ---- - 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 a1711c00..b4ead7f2 100755 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -33,7 +33,7 @@ installkernel() { - if [[ $hostonly ]]; then - for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do - [[ -e $i ]] || continue -- if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then -+ if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<$i); then - if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then - hostonly='' instmods amdkfd - fi - diff --git a/SOURCES/0120.patch b/SOURCES/0120.patch deleted file mode 100644 index 5df7f53..0000000 --- a/SOURCES/0120.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e7f4acb6f7f902715277048be7cdba49c61189dd Mon Sep 17 00:00:00 2001 -From: Rumbaut Thomas -Date: Fri, 23 Oct 2020 12:38:04 +0200 -Subject: [PATCH] Configure the runner for team interfaces - -https://bugzilla.redhat.com/show_bug.cgi?id=1881463 -(cherry picked from commit e4483e5917b59918260ff0f0345abbea4a537f12) - -Resolves: #1881463 ---- - dracut.cmdline.7.asc | 6 +++++- - modules.d/35network-legacy/parse-team.sh | 18 +++++++++++++----- - 2 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 9003c430..e220defb 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -593,9 +593,13 @@ interface name. Better name it "bootnet" or "bluesocket". - Bond without parameters assumes - bond=bond0:eth0,eth1:mode=balance-rr - --**team=**____:____:: -+**team=**____:____[:____]:: - Setup team device on top of . - is a comma-separated list of physical (ethernet) interfaces. -+ is the runner type to be used (see *teamd.conf*(5)); defaults to -+ activebackup. -+ Team without parameters assumes -+ team=team0:eth0,eth1:activebackup - - **bridge=**____:____:: - Setup bridge with . is a comma-separated -diff --git a/modules.d/35network-legacy/parse-team.sh b/modules.d/35network-legacy/parse-team.sh -index a6eef18e..03fbcf20 100755 ---- a/modules.d/35network-legacy/parse-team.sh -+++ b/modules.d/35network-legacy/parse-team.sh -@@ -1,9 +1,12 @@ - #!/bin/sh - # - # Format: --# team=: -+# team=:[:] - # - # teamslaves is a comma-separated list of physical (ethernet) interfaces -+# teamrunner is the runner type to be used (see teamd.conf(5)); defaults to activebackup -+# -+# team without parameters assumes team=team0:eth0,eth1:activebackup - # - - parseteam() { -@@ -15,8 +18,11 @@ parseteam() { - done - - case $# in -- 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; -- *) die "team= requires two parameters" ;; -+ 0) teammaster=team0; teamslaves="eth0 eth1"; teamrunner="activebackup" ;; -+ 1) teammaster=$1; teamslaves="eth0 eth1"; teamrunner="activebackup" ;; -+ 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " "); teamrunner="activebackup" ;; -+ 3) teammaster=$1; teamslaves=$(str_replace "$2" "," " "); teamrunner=$3 ;; -+ *) die "team= requires zero to three parameters" ;; - esac - return 0 - } -@@ -26,16 +32,18 @@ for team in $(getargs team); do - - unset teammaster - unset teamslaves -+ unset teamrunner - - parseteam "$team" || continue - - echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info - echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info -+ echo "teamrunner=\"$teamrunner\"" >> /tmp/team.${teammaster}.info - - if ! [ -e /etc/teamd/${teammaster}.conf ]; then -- warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup." -+ warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using $teamrunner." - mkdir -p /etc/teamd -- printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf" -+ printf -- "%s" "{\"runner\": {\"name\": \"$teamrunner\"}, \"link_watch\": {\"name\": \"ethtool\"}}" > "/tmp/${teammaster}.conf" - fi - done - - diff --git a/SOURCES/0121.patch b/SOURCES/0121.patch deleted file mode 100644 index 0939a89..0000000 --- a/SOURCES/0121.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b75ab376748ee698763610769601bd81296bd060 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Thu, 7 May 2020 07:48:12 +0200 -Subject: [PATCH] network-manager: set kernel hostname from the command line - -Since commit ff70adf873ef ("initrd: save hostname to a file in /run"), -the initrd generator of NetworkManager parses the hostname from 'ip=' -options of the kernel command line and writes it to -/run/NetworkManager/initrd/hostname. - -When that file exists, set the kernel hostname. - -In presence of multiple hostnames in the command line, the last one -wins. Hostnames from command line always have precedence over ones -received through DHCP. This is a bit different from the legacy network -module that gives higher precedence to the hostname (from DHCP or -command line) of the last interface that is brought up, which depends -on the udev order. - -(cherry picked from commit eb770a4a207b2e9e3080068c1df22b69ed44d4b5) - -Resolves: #1881974 ---- - modules.d/35network-manager/nm-run.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh -index fc5280a1..61752384 100755 ---- a/modules.d/35network-manager/nm-run.sh -+++ b/modules.d/35network-manager/nm-run.sh -@@ -10,6 +10,10 @@ for i in /usr/lib/NetworkManager/system-connections/* \ - else - /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon - fi -+ -+ if [ -s /run/NetworkManager/initrd/hostname ]; then -+ cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname -+ fi - break - done - - diff --git a/SOURCES/0122.patch b/SOURCES/0122.patch deleted file mode 100644 index cad4c92..0000000 --- a/SOURCES/0122.patch +++ /dev/null @@ -1,252 +0,0 @@ -From f9883b51b1fafd30a91e9efda3260067a8f87ea5 Mon Sep 17 00:00:00 2001 -From: Enzo Matsumiya -Date: Mon, 3 Aug 2020 11:21:36 -0300 -Subject: [PATCH] 95nvmf: add NVMe over TCP support - -Add support to boot from an NVMe over TCP device. - -Example of supported command line formats: - -nvme.discover=tcp:192.168.1.3::4420 -nvme.discover=tcp:192.168.1.3 # will use 4420 as default svcid - -- Create is_nvmf() function to handle all fabrics types -- Fix parse_nvmf_discover() to correctly use the default values -- Auxiliary function to validate an IP connection -- Fix inverted result for getargbool when reading "rd.nonvmf" command line parameter - -Requires rd.neednet=1 -Requires adding/replacing STARTMODE in /etc/sysconfig/network/ifcfg-ethX to "nfsroot" -to avoid shutdown hanging in initiator - -Signed-off-by: Enzo Matsumiya -(cherry picked from commit 019610af266bcaef711715266bc0ca4be1044150) - -Resolves: #1885417 ---- - modules.d/95nvmf/module-setup.sh | 25 ++++--- - modules.d/95nvmf/parse-nvmf-boot-connections.sh | 97 ++++++++++++++++++------- - 2 files changed, 84 insertions(+), 38 deletions(-) - -diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh -index db43ec01..418b5e0c 100755 ---- a/modules.d/95nvmf/module-setup.sh -+++ b/modules.d/95nvmf/module-setup.sh -@@ -6,9 +6,9 @@ check() { - [ -f /etc/nvme/hostnqn ] || return 255 - [ -f /etc/nvme/hostid ] || return 255 - -- is_nvme_fc() { -+ is_nvmf() { - local _dev=$1 -- local traddr -+ local trtype - - [[ -L "/sys/dev/block/$_dev" ]] || return 0 - cd -P "/sys/dev/block/$_dev" || return 0 -@@ -18,19 +18,19 @@ check() { - for d in device/nvme* ; do - [ -L "$d" ] || continue - if readlink "$d" | grep -q nvme-fabrics ; then -- traddr=$(cat "$d"/address) -- break -- fi -- done -- [[ "${traddr#traddr=nn-}" != "$traddr" ]] -+ trtype=$(cat "$d"/transport) -+ break -+ fi -+ done -+ [[ "$trtype" == "fc" ]] || [[ "$trtype" == "tcp" ]] || [[ "$trtype" == "rdma" ]] - } - - [[ $hostonly ]] || [[ $mount_needs ]] && { - pushd . >/dev/null -- for_each_host_dev_and_slaves is_nvme_fc -- local _is_nvme_fc=$? -+ for_each_host_dev_and_slaves is_nvmf -+ local _is_nvmf=$? - popd >/dev/null -- [[ $_is_nvme_fc == 0 ]] || return 255 -+ [[ $_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" -@@ -43,13 +43,14 @@ check() { - - # called by dracut - depends() { -- echo bash rootfs-block -+ echo bash rootfs-block network - return 0 - } - - # called by dracut - installkernel() { - instmods nvme_fc lpfc qla2xxx -+ hostonly="" instmods nvme_tcp nvme_fabrics - } - - # called by dracut -@@ -76,6 +77,8 @@ install() { - inst_simple "/etc/nvme/hostnqn" - inst_simple "/etc/nvme/hostid" - -+ inst_multiple ip sed -+ - inst_multiple nvme - inst_multiple -o \ - "$systemdsystemunitdir/nvm*-connect@.service" \ -diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -index 0d16b871..61c6dec1 100755 ---- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh -+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -@@ -8,69 +8,102 @@ - # Examples: - # nvmf.hostnqn=nqn.2014-08.org.nvmexpress:uuid:37303738-3034-584d-5137-333230423843 - # nvmf.discover=rdma:192.168.1.3::4420 -+# nvme.discover=tcp:192.168.1.3::4420 -+# nvme.discover=tcp:192.168.1.3 - # nvmf.discover=fc:auto - # - # Note: FC does autodiscovery, so typically there is no need to - # specify any discover parameters for FC. - # - -+type is_ip >/dev/null 2>&1 || . /lib/net-lib.sh -+ -+if getargbool 0 rd.nonvmf ; then -+ warn "rd.nonvmf=0: skipping nvmf" -+ return 0 -+fi -+ -+initqueue --onetime modprobe --all -b -q nvme nvme_tcp nvme_core nvme_fabrics -+ -+traddr="none" -+trtype="none" -+hosttraddr="none" -+trsvcid=4420 -+ -+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 to $local_address | 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() { - OLDIFS="$IFS" - IFS=: -- trtype="none" -- traddr="none" -- hosttraddr="none" -- trsvcid=4420 -- - set $1 - IFS="$OLDIFS" - - case $# in - 2) -- trtype=$1 -- traddr=$2 -+ [ -n "$1" ] && trtype=$1 -+ [ -n "$2" ] && traddr=$2 - ;; - 3) -- trtype=$1 -- traddr=$2 -- hosttraddr=$3 -+ [ -n "$1" ] && trtype=$1 -+ [ -n "$2" ] && traddr=$2 -+ [ -n "$3" ] && hosttraddr=$3 - ;; - 4) -- trtype=$1 -- traddr=$2 -- hosttraddr=$3 -- trsvcid=$4 -+ [ -n "$1" ] && trtype=$1 -+ [ -n "$2" ] && traddr=$2 -+ [ -n "$3" ] && hosttraddr=$3 -+ [ -n "$4" ] && trsvcid=$4 - ;; - *) - warn "Invalid arguments for nvmf.discover=$1" - return 1 - ;; - esac -- if [ -z "$traddr" ] ; then -+ if [ "$traddr" = "none" ] ; then - warn "traddr is mandatory for $trtype" - return 1; - fi -- [ -z "$hosttraddr" ] && hosttraddr="none" -- [ -z "$trsvcid" ] && trsvcid="none" - if [ "$trtype" = "fc" ] ; then -- if [ -z "$hosttraddr" ] ; then -+ if [ "$hosttraddr" = "none" ] ; then - warn "host traddr is mandatory for fc" - return 1 - fi - elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ] ; then - warn "unsupported transport $trtype" - return 1 -- elif [ -z "$trsvcid" ] ; then -- trsvcid=4420 -+ fi -+ if [ "$trtype" = "tcp" ]; then -+ validate_ip_conn - fi - echo "--transport=$trtype --traddr=$traddr --host-traddr=$hosttraddr --trsvcid=$trsvcid" >> /etc/nvme/discovery.conf - } - --if ! getargbool 0 rd.nonvmf ; then -- info "rd.nonvmf=0: skipping nvmf" -- return 0 --fi -- - nvmf_hostnqn=$(getarg nvmf.hostnqn=) - if [ -n "$nvmf_hostnqn" ] ; then - echo "$nvmf_hostnqn" > /etc/nvme/hostnqn -@@ -89,7 +122,17 @@ done - [ -f "/etc/nvme/hostid" ] || exit 0 - - if [ -f "/etc/nvme/discovery.conf" ] ; then -- /sbin/initqueue --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all -+ if [ "$trtype" = "tcp" ] ; then -+ /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all -+ > /tmp/net.$ifname.did-setup -+ else -+ /sbin/initqueue --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all -+ fi - else -- /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery -+ if [ "$trtype" = "tcp" ] ; then -+ /sbin/initqueue --settled --onetime --unique /usr/sbin/nvme connect-all -t tcp -a $traddr -s $trsvcid -+ > /tmp/net.$ifname.did-setup -+ else -+ /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery -+ fi - fi - diff --git a/SOURCES/0123.patch b/SOURCES/0123.patch deleted file mode 100644 index 99df739..0000000 --- a/SOURCES/0123.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 231c6e831262246af33696132c1be7c009477a96 Mon Sep 17 00:00:00 2001 -From: Patrick Talbert -Date: Fri, 30 Nov 2018 09:28:09 +0100 -Subject: [PATCH] 95fcoe: Add the rd.nofcoe option to disable the FCoE module - from the command line - -Images built with the fcoe module will always run the lldpad -service as part of their pre-trigger scripts if the network -is active. This prevents network installations in -environments where, for security reasons, LLDPDU frames -cause a switchport shutdown. - -Add a new rd.nofcoe option to cause dracut to skip the -lldpad.sh script and the entire 95-fcoe module. - -Signed-off-by: Patrick Talbert -(cherry picked from commit 7c6d2ad916bd536dc2f082fd96ef837a5031e497) - -Resolves: #1885621 ---- - dracut.cmdline.7.asc | 3 +++ - modules.d/95fcoe/lldpad.sh | 5 +++++ - modules.d/95fcoe/parse-fcoe.sh | 5 +++++ - 3 files changed, 13 insertions(+) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index e220defb..bf745575 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -779,6 +779,9 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30 - - FCoE - ~~~~ -+**rd.nofcoe=0**:: -+ disable FCoE and lldpad -+ - **fcoe=**____:__{dcb|nodcb}__:__{fabric|vn2vn}__:: - Try to connect to a FCoE SAN through the NIC specified by __ or - __ or EDD settings. The second argument specifies if DCB -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -index d06a3bd8..c32feeed 100755 ---- a/modules.d/95fcoe/lldpad.sh -+++ b/modules.d/95fcoe/lldpad.sh -@@ -1,5 +1,10 @@ - #!/bin/bash - -+if ! getargbool 0 rd.nofcoe ; then -+ info "rd.nofcoe=0: skipping lldpad activation" -+ exit 0 -+fi -+ - # Note lldpad will stay running after switchroot, the system initscripts - # are to kill it and start a new lldpad to take over. Data is transfered - # between the 2 using a shm segment -diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh -index 12701cdb..7a6ff755 100755 ---- a/modules.d/95fcoe/parse-fcoe.sh -+++ b/modules.d/95fcoe/parse-fcoe.sh -@@ -13,6 +13,11 @@ - # fcoe=eth0:nodcb:vn2vn - # fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric - -+if ! getargbool 0 rd.nofcoe ; then -+ info "rd.nofcoe=0: skipping fcoe" -+ exit 0 -+fi -+ - [ -z "$fcoe" ] && fcoe=$(getarg fcoe=) - - # If it's not set we don't continue - diff --git a/SOURCES/0124.patch b/SOURCES/0124.patch deleted file mode 100644 index 328652e..0000000 --- a/SOURCES/0124.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 4e1d7a423253d4e3476b003fc2e17c2ac44bd8ca Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Thu, 10 Sep 2020 02:18:02 +0800 -Subject: [PATCH] 04watchdog: split the watchdog module install - -In some cases, user only want to include the watchdog module, not the -wdctl or any other userspace helper. For example, systemd have a -RebootWatchdogSec option that use watchdog to prevent reboot hangs. And -it can help prevent machines hangs when reboot directly within the -initramfs stage. So split the module installation to a standlone module. - -Also when watchdog-module get included, install driver for all loaded -watchdog instaed of only install driver for active watchdog. Both -watchdog and watchdog-module return 255 in check(), so it's enabled only -when manually included, the watchdog may get configured/activated later. - -Signed-off-by: Kairui Song -(cherry picked from commit 39d90012a652fa4d9d2534d0168ddad8cacec248) - -Resolves: #1890039 ---- - modules.d/04watchdog-modules/module-setup.sh | 61 ++++++++++++++++++++++++++++ - modules.d/04watchdog/module-setup.sh | 50 +---------------------- - 2 files changed, 63 insertions(+), 48 deletions(-) - -diff --git a/modules.d/04watchdog-modules/module-setup.sh b/modules.d/04watchdog-modules/module-setup.sh -new file mode 100755 -index 00000000..5fbd769b ---- /dev/null -+++ b/modules.d/04watchdog-modules/module-setup.sh -@@ -0,0 +1,61 @@ -+#!/bin/bash -+ -+# called by dracut -+check() { -+ return 255 -+} -+ -+# called by dracut -+depends() { -+ return 0 -+} -+ -+# called by dracut -+install() { -+ return 0 -+} -+ -+installkernel() { -+ local -A _drivers -+ local _alldrivers _wdtdrv _wdtppath _dir -+ [[ -d /sys/class/watchdog/ ]] || return -+ for _dir in /sys/class/watchdog/*; do -+ [[ -d "$_dir" ]] || continue -+ [[ -f "$_dir/state" ]] || continue -+ # device/modalias will return driver of this device -+ _wdtdrv=$(< "$_dir/device/modalias") -+ # There can be more than one module represented by same -+ # modalias. Currently load all of them. -+ # TODO: Need to find a way to avoid any unwanted module -+ # represented by modalias -+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) -+ if [[ $_wdtdrv ]]; then -+ instmods $_wdtdrv -+ for i in $_wdtdrv; do -+ _drivers[$i]=1 -+ done -+ fi -+ # however in some cases, we also need to check that if there is -+ # a specific driver for the parent bus/device. In such cases -+ # we also need to enable driver for parent bus/device. -+ _wdtppath=$(readlink -f "$_dir/device") -+ while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do -+ _wdtppath=$(readlink -f "$_wdtppath/..") -+ [[ -f "$_wdtppath/modalias" ]] || continue -+ -+ _wdtdrv=$(< "$_wdtppath/modalias") -+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) -+ if [[ $_wdtdrv ]]; then -+ instmods $_wdtdrv -+ for i in $_wdtdrv; do -+ _drivers[$i]=1 -+ done -+ fi -+ done -+ done -+ # ensure that watchdog module is loaded as early as possible -+ _alldrivers="${!_drivers[*]}" -+ [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf -+ -+ return 0 -+} -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 7566d651..15bcd897 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -7,7 +7,7 @@ check() { - - # called by dracut - depends() { -- return 0 -+ return "watchdog-modules" - } - - # called by dracut -@@ -27,53 +27,7 @@ install() { - inst_hook cleanup 00 "$moddir/watchdog.sh" - inst_hook cleanup 99 "$moddir/watchdog.sh" - fi -+ - inst_hook emergency 02 "$moddir/watchdog-stop.sh" - inst_multiple -o wdctl - } -- --installkernel() { -- local -A _drivers -- local _alldrivers _active _wdtdrv _wdtppath _dir -- [[ -d /sys/class/watchdog/ ]] || return -- for _dir in /sys/class/watchdog/*; do -- [[ -d "$_dir" ]] || continue -- [[ -f "$_dir/state" ]] || continue -- _active=$(< "$_dir/state") -- ! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue -- # device/modalias will return driver of this device -- _wdtdrv=$(< "$_dir/device/modalias") -- # There can be more than one module represented by same -- # modalias. Currently load all of them. -- # TODO: Need to find a way to avoid any unwanted module -- # represented by modalias -- _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) -- if [[ $_wdtdrv ]]; then -- instmods $_wdtdrv -- for i in $_wdtdrv; do -- _drivers[$i]=1 -- done -- fi -- # however in some cases, we also need to check that if there is -- # a specific driver for the parent bus/device. In such cases -- # we also need to enable driver for parent bus/device. -- _wdtppath=$(readlink -f "$_dir/device") -- while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do -- _wdtppath=$(readlink -f "$_wdtppath/..") -- [[ -f "$_wdtppath/modalias" ]] || continue -- -- _wdtdrv=$(< "$_wdtppath/modalias") -- _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) -- if [[ $_wdtdrv ]]; then -- instmods $_wdtdrv -- for i in $_wdtdrv; do -- _drivers[$i]=1 -- done -- fi -- done -- done -- # ensure that watchdog module is loaded as early as possible -- _alldrivers="${!_drivers[*]}" -- [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf -- -- return 0 --} - diff --git a/SOURCES/0125.patch b/SOURCES/0125.patch deleted file mode 100644 index e296067..0000000 --- a/SOURCES/0125.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d1861df7552e2679ab48e5573ac23f4f1553f0e2 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Sun, 20 Sep 2020 09:44:08 +0200 -Subject: [PATCH] dracut.spec: include the 04watchdog-modules module - -Include the 04watchdog-modules module that was added in 39d90012a652 -("04watchdog: split the watchdog module install"). - -(cherry picked from commit f3e328a7fd30c7109a3af188e84e621770bb6b85) - -Resolves: #1890039 ---- - dracut.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.spec b/dracut.spec -index 3db5c0cf..b371118e 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/03modsign - %{dracutlibdir}/modules.d/03rescue - %{dracutlibdir}/modules.d/04watchdog -+%{dracutlibdir}/modules.d/04watchdog-modules - %{dracutlibdir}/modules.d/05busybox - %{dracutlibdir}/modules.d/06rngd - %{dracutlibdir}/modules.d/10i18n - diff --git a/SOURCES/0126.patch b/SOURCES/0126.patch deleted file mode 100644 index ee7c494..0000000 --- a/SOURCES/0126.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8300849e5d8825c6b60dec682eec4767701e95ac Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 16 Nov 2020 15:24:14 +0800 -Subject: [PATCH] 95fcoe: ensure needed modules are installed - -If fcoe module is loaded, the initramfs will always try load libfcoe -and bnx2fc, so also ensure they are installed if needed. - -Signed-off-by: Kairui Song -(cherry picked from commit 4339d47cf810d8a79f20cf2b86d15af7ec859052) - -Resolves: #1898814 ---- - modules.d/95fcoe/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh -index 63f45b52..c2224ec1 100755 ---- a/modules.d/95fcoe/module-setup.sh -+++ b/modules.d/95fcoe/module-setup.sh -@@ -23,7 +23,7 @@ depends() { - - # called by dracut - installkernel() { -- instmods fcoe 8021q edd -+ instmods fcoe libfcoe 8021q edd bnx2fc - } - - get_vlan_parent() { - diff --git a/SOURCES/0127.patch b/SOURCES/0127.patch deleted file mode 100644 index b78842f..0000000 --- a/SOURCES/0127.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 3085acbec79b3649ac906529778f86a14f330e62 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 21 Oct 2020 16:18:07 +0800 -Subject: [PATCH] Add a --hostonly-nics option - -Currently when network is enabled, dracut will install all network -drivers that are currently loaded, but some time only one NIC is needed -for the initramfs. - -So for strict hostonly mode, add a --hostonly-nics option, user can -provide a list of NICs to be enabled, and only needed drivers for -specifed NICs will be installed so save space. - -Signed-off-by: Kairui Song -(cherry picked from commit 1e92f7285d42fbd3bc01f534f9bd646f6fdd9504) - -Cherry-picked from: 1e92f7285d42fbd3bc01f534f9bd646f6fdd9504 -Resolves: #1890041 - -Cherry-picked from: c69961b403c1c83bb4717e1df1470e71cd0245d1 -Resolves: #1890041 ---- - dracut.sh | 6 ++++++ - modules.d/90kernel-network-modules/module-setup.sh | 18 +++++++++++++++--- - 2 files changed, 21 insertions(+), 3 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index e70dab16..01abe7a4 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -173,6 +173,8 @@ Creates initial ramdisk images for preloading modules - --hostonly-i18n Install only needed keyboard and font files according - to the host configuration (default). - --no-hostonly-i18n Install all keyboard and font files available. -+ --hostonly-nics [LIST] -+ Only enable listed NICs in the initramfs. - --persistent-policy [POLICY] - Use [POLICY] to address disks and partitions. - POLICY can be any directory name found in /dev/disk. -@@ -400,6 +402,7 @@ rearrange_params() - --long kernel-image: \ - --long no-hostonly-i18n \ - --long hostonly-i18n \ -+ --long hostonly-nics: \ - --long no-machineid \ - -- "$@") - -@@ -561,6 +564,8 @@ while :; do - hostonly_cmdline_l="yes" ;; - --hostonly-i18n) - i18n_install_all_l="no" ;; -+ --hostonly-nics) -+ hostonly_nics_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;; - --no-hostonly-i18n) - i18n_install_all_l="yes" ;; - --no-hostonly-cmdline) -@@ -720,6 +725,7 @@ unset NPATH - (( ${#fstab_lines_l[@]} )) && fstab_lines+=( "${fstab_lines_l[@]}" ) - (( ${#install_items_l[@]} )) && install_items+=" ${install_items_l[@]} " - (( ${#install_optional_items_l[@]} )) && install_optional_items+=" ${install_optional_items_l[@]} " -+(( ${#hostonly_nics_l[@]} )) && hostonly_nics+=" ${hostonly_nics_l[@]} " - - # these options override the stuff in the config file - (( ${#dracutmodules_l[@]} )) && dracutmodules="${dracutmodules_l[@]}" -diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh -index 600ef112..f36d31f7 100755 ---- a/modules.d/90kernel-network-modules/module-setup.sh -+++ b/modules.d/90kernel-network-modules/module-setup.sh -@@ -14,15 +14,27 @@ depends() { - installkernel() { - # Include wired net drivers, excluding wireless - local _arch=$(uname -m) -- local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open' -+ local _net_symbols='eth_type_trans|register_virtio_device|usbnet_open' - local _unwanted_drivers='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/' -+ local _net_drivers - - if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then -- _s390drivers="=drivers/s390/net" -+ dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_symbols" "=drivers/s390/net" - fi - -- dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"} -+ if [[ $hostonly_mode == 'strict' ]] && [[ $hostonly_nics ]]; then -+ for _nic in $hostonly_nics; do -+ _net_drivers=$(get_dev_module /sys/class/net/$_nic) -+ if ! [[ $_net_drivers ]]; then -+ derror "--hostonly-nics contains invalid NIC '$_nic'" -+ continue -+ fi -+ hostonly="" instmods $_net_drivers -+ done -+ return 0 -+ fi - -+ dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_symbols" "=drivers/net" - #instmods() will take care of hostonly - instmods \ - =drivers/net/phy \ - diff --git a/SOURCES/0128.patch b/SOURCES/0128.patch deleted file mode 100644 index 1fd6c24..0000000 --- a/SOURCES/0128.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 2dbd11b81dae28a5c6291a56175c06665b615d66 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Thu, 1 Oct 2020 14:08:38 +0200 -Subject: [PATCH] dracut-install: ignore bogus preload libs - -If there are any nonexistent libraries listed in /etc/ld.so.preload, ldd -prints error messages like: - -ERROR: ld.so: object '/usr/lib64/libfoo.so.1' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. - -This causes resolve_deps() to return error, which leads to symlinks -(like usr/bin/awk) not being copied into the initrd. - -(cherry picked from commit 4916dfc2b94dca0e84eb7dc58a9266d02c416b4a) - -Resolves: #1884149 ---- - install/dracut-install.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index f8ec9a59..baf6dcff 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -481,6 +481,9 @@ static int resolve_deps(const char *src) - if (strstr(buf, "cannot read header")) - break; - -+ if (strstr(buf, "cannot be preloaded")) -+ break; -+ - if (strstr(buf, destrootdir)) - break; - - diff --git a/SOURCES/0129.patch b/SOURCES/0129.patch deleted file mode 100644 index 873d410..0000000 --- a/SOURCES/0129.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e03445a5e40bb8d6de3d401495e8645a6c1db04c Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 7 Jan 2021 11:57:56 +0100 -Subject: [PATCH] 00systemd: when putting systemd-vconsole-setup.service as a - dependency ignore missing services - -rhel-only -Resolves: #1906301 ---- - modules.d/00systemd/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 4ab2a896..1f0b5dad 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -225,7 +225,7 @@ install() { - systemd-ask-password-console.service \ - systemd-ask-password-plymouth.service \ - ; do -- systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service -+ systemctl -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service 2>/dev/null - done - - mkdir -p "$initdir/etc/systemd" - diff --git a/SOURCES/0130.patch b/SOURCES/0130.patch deleted file mode 100644 index 09f5e1b..0000000 --- a/SOURCES/0130.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0e43b934b98e40efeed0781e8bdf9f805d8d7217 Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Tue, 5 May 2020 19:11:18 +0200 -Subject: [PATCH] 51-dracut-rescue.install: Don't use BLS fragment shipped by - kernel package - -For the GRUB and zipl bootloaders the BLS fragment that is shipped by the -kernel package is used, so the same fragment is used for the rescue entry. - -But there are cases where this BLS fragment is not suitable. For example, -if the boot directory is on a btrfs subvolume the path in the linux and -initrd fiels need to be adjusted with the real path. Otherwise GRUB won't -be able to read them. - -The GRUB and zipl kernel-install plugins already take care of this before -installing the BLS fragments, so just copy the installed fragment that has -the updated paths instead of using the BLS shipped by the kernel package. - -Resolves: rhbz#1827882 - -Signed-off-by: Javier Martinez Canillas -(cherry picked from commit ff366790a6e30175f243d54c2922a8c781030ede) - -Resolves: #1894026 ---- - 51-dracut-rescue.install | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 5ac34ef3..47eb8e7d 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -104,7 +104,11 @@ case "$COMMAND" in - echo "initrd $BOOT_DIR/initrd" - } > $LOADER_ENTRY - else -- cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY -+ if [[ -e "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" ]]; then -+ cp -aT "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" $LOADER_ENTRY -+ else -+ cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY -+ fi - sed -i 's/'$KERNEL_VERSION'/0-rescue-'${MACHINE_ID}'/' $LOADER_ENTRY - fi - - diff --git a/SOURCES/0131.patch b/SOURCES/0131.patch deleted file mode 100644 index c7946e6..0000000 --- a/SOURCES/0131.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1651c3074f596b80478473a126c02c27398429dd Mon Sep 17 00:00:00 2001 -From: Daniel Molkentin -Date: Thu, 18 Jul 2019 11:29:29 +0200 -Subject: [PATCH] 95fcoe: Fix startup when fcoe module is included - -The parse-fcoe.sh hook is sourced, and hence must not contain -exit 0 calls. Otherwise, the cmdline sequence will be interupted, -and no error will be reported to systemd. Use return instead. - -Reference: boo#1136977 -(cherry picked from commit 4f194276417237168f5bc929ba847a23b6a4c77f) - -Resolves: #1914957 ---- - 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 7a6ff755..8bb55c6e 100755 ---- a/modules.d/95fcoe/parse-fcoe.sh -+++ b/modules.d/95fcoe/parse-fcoe.sh -@@ -15,7 +15,7 @@ - - if ! getargbool 0 rd.nofcoe ; then - info "rd.nofcoe=0: skipping fcoe" -- exit 0 -+ return 0 - fi - - [ -z "$fcoe" ] && fcoe=$(getarg fcoe=) - diff --git a/SOURCES/0132.patch b/SOURCES/0132.patch deleted file mode 100644 index 0b9121d..0000000 --- a/SOURCES/0132.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e96bab3e688b7fc9b6f5e6b90c6d1ea4d517bc4a Mon Sep 17 00:00:00 2001 -From: Radek Vykydal -Date: Tue, 10 Mar 2020 10:48:21 +0100 -Subject: [PATCH] Fix pre-trigger stage by replacing exit with return in - lldpad.sh - -Using exit makes the pre-trigger stage finish after running 03-lldpad.sh -pre-trigger hook. - -(cherry picked from commit 7fb8f939a52a904b1860e303a6a7fe69ba0d2ceb) - -Resolves: #1914957 ---- - modules.d/95fcoe/lldpad.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -index c32feeed..444c943e 100755 ---- a/modules.d/95fcoe/lldpad.sh -+++ b/modules.d/95fcoe/lldpad.sh -@@ -2,7 +2,7 @@ - - if ! getargbool 0 rd.nofcoe ; then - info "rd.nofcoe=0: skipping lldpad activation" -- exit 0 -+ return 0 - fi - - # Note lldpad will stay running after switchroot, the system initscripts - diff --git a/SOURCES/0133.patch b/SOURCES/0133.patch deleted file mode 100644 index 650cad4..0000000 --- a/SOURCES/0133.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6297e8accadcddcdd390f4e0583f9bde29f3758e Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Thu, 7 Nov 2019 14:03:23 +0100 -Subject: [PATCH] spec: dracut-network is happy with either NM or dhclient - -(cherry picked from commit e8638076857621b28eb4dc36cdd49a94992835b7) - -Resolves: #1916174 ---- - dracut.spec | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dracut.spec b/dracut.spec -index b371118e..fa3e4b99 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -125,7 +125,8 @@ Requires: %{name} = %{version}-%{release} - %endif - Requires: iputils - Requires: iproute --Requires: dhclient -+Requires: (NetworkManager >= 1.20 or dhclient) -+Suggests: NetworkManager - Obsoletes: dracut-generic < 008 - Provides: dracut-generic = %{version}-%{release} - - diff --git a/SOURCES/0134.patch b/SOURCES/0134.patch deleted file mode 100644 index 4f01b11..0000000 --- a/SOURCES/0134.patch +++ /dev/null @@ -1,43 +0,0 @@ -From db5fda123c2960e99cb29399bdedbd56d672c72d Mon Sep 17 00:00:00 2001 -From: Thomas Blume -Date: Mon, 24 Feb 2020 12:11:25 +0100 -Subject: [PATCH] 95fcoe: default rd.nofcoe to false - -rd.nofcoe should default to false, e.g. fcoe should be enabled unless -overwritten from the command line. -The same applies for lldapd.sh. - -(cherry picked from commit 8446c8f9deefcc6c47d96a128b1e9b23d8855a96) - -Resolves: #1885621 ---- - modules.d/95fcoe/lldpad.sh | 2 +- - modules.d/95fcoe/parse-fcoe.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -index 444c943e..7faa2e19 100755 ---- a/modules.d/95fcoe/lldpad.sh -+++ b/modules.d/95fcoe/lldpad.sh -@@ -1,6 +1,6 @@ - #!/bin/bash - --if ! getargbool 0 rd.nofcoe ; then -+if getargbool 0 rd.nofcoe ; then - info "rd.nofcoe=0: skipping lldpad activation" - return 0 - fi -diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh -index 8bb55c6e..86f4331e 100755 ---- a/modules.d/95fcoe/parse-fcoe.sh -+++ b/modules.d/95fcoe/parse-fcoe.sh -@@ -13,7 +13,7 @@ - # fcoe=eth0:nodcb:vn2vn - # fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric - --if ! getargbool 0 rd.nofcoe ; then -+if getargbool 0 rd.nofcoe ; then - info "rd.nofcoe=0: skipping fcoe" - return 0 - fi - diff --git a/SOURCES/0135.patch b/SOURCES/0135.patch deleted file mode 100644 index 62d09ba..0000000 --- a/SOURCES/0135.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 2fe454f21b6b3890b02f52810a662530ec019968 Mon Sep 17 00:00:00 2001 -From: mulhern -Date: Wed, 19 Aug 2020 11:11:14 -0400 -Subject: [PATCH] Remove stratis module - -It is obsolete. An approach which does not start the daemon is being worked -on. - -Signed-off-by: mulhern -(cherry picked from commit fe761330e5db60f19f0ab2d937ea71a5b2438656) - -Cherry-picked from: fe761330e5db60f19f0ab2d937ea71a5b2438656 -Resolves: #1950572 ---- - dracut.spec | 1 - - modules.d/90stratis/module-setup.sh | 33 ------------------------------- - modules.d/90stratis/stratisd-init.service | 15 -------------- - modules.d/90stratis/stratisd-start.sh | 3 --- - modules.d/90stratis/stratisd-stop.sh | 6 ------ - 5 files changed, 58 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index fa3e4b99..dcaafa61 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -365,7 +365,6 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - %{dracutlibdir}/modules.d/90lvm - %{dracutlibdir}/modules.d/90mdraid - %{dracutlibdir}/modules.d/90multipath --%{dracutlibdir}/modules.d/90stratis - %{dracutlibdir}/modules.d/90qemu - %{dracutlibdir}/modules.d/91crypt-gpg - %{dracutlibdir}/modules.d/91crypt-loop -diff --git a/modules.d/90stratis/module-setup.sh b/modules.d/90stratis/module-setup.sh -deleted file mode 100755 -index 943f572e..00000000 ---- a/modules.d/90stratis/module-setup.sh -+++ /dev/null -@@ -1,33 +0,0 @@ --#!/bin/bash -- --# called by dracut --check() { -- require_binaries stratisd-init thin_check thin_repair mkfs.xfs xfs_admin xfs_growfs || return 1 -- return 255 --} -- --# called by dracut --depends() { -- echo dm -- return 0 --} -- --# called by dracut --installkernel() { -- instmods xfs --} -- --# called by dracut --install() { -- -- inst_multiple stratisd-init thin_check thin_repair mkfs.xfs xfs_admin xfs_growfs -- -- if dracut_module_included "systemd"; then -- inst_simple "${moddir}/stratisd-init.service" "${systemdsystemunitdir}/stratisd-init.service" -- systemctl -q --root "$initdir" enable stratisd-init.service -- else -- inst_hook cmdline 25 "$moddir/stratisd-start.sh" -- inst_hook cleanup 25 "$moddir/stratisd-stop.sh" -- fi --} -- -diff --git a/modules.d/90stratis/stratisd-init.service b/modules.d/90stratis/stratisd-init.service -deleted file mode 100644 -index 318e8c27..00000000 ---- a/modules.d/90stratis/stratisd-init.service -+++ /dev/null -@@ -1,15 +0,0 @@ --[Unit] --Description=A daemon that manages a pool of block devices to create flexible file systems --Documentation=man:stratisd(8) --Before=local-fs-pre.target --DefaultDependencies=no -- --[Service] --Type=simple --ExecStart=/sbin/stratisd-init --debug --KillSignal=SIGINT --StandardOutput=syslog --StandardError=syslog -- --[Install] --WantedBy=sysinit.target -diff --git a/modules.d/90stratis/stratisd-start.sh b/modules.d/90stratis/stratisd-start.sh -deleted file mode 100755 -index afcd81fd..00000000 ---- a/modules.d/90stratis/stratisd-start.sh -+++ /dev/null -@@ -1,3 +0,0 @@ --#!/bin/sh -- --stratisd-init --debug > /dev/kmsg 2>&1 & -\ No newline at end of file -diff --git a/modules.d/90stratis/stratisd-stop.sh b/modules.d/90stratis/stratisd-stop.sh -deleted file mode 100755 -index f394a843..00000000 ---- a/modules.d/90stratis/stratisd-stop.sh -+++ /dev/null -@@ -1,6 +0,0 @@ --#!/bin/sh -- --[ -f /lib/dracut-lib.sh ] && . /lib/dracut-lib.sh -- --pid=$(pidof stratisd-init) --[ -n "$pid" ] && kill ${pid} - diff --git a/SOURCES/0136.patch b/SOURCES/0136.patch deleted file mode 100644 index 91f4f33..0000000 --- a/SOURCES/0136.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 7c6839180cd616cebaeefd0cb05b60d022388277 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 26 Nov 2020 11:29:45 -0800 -Subject: [PATCH] Drop 51-dracut-rescue-postinst.sh entirely - -It is only installed on RHEL 8+, but as noted in the first commit -that tried to do this - 0bb9a683 - we already have branches for -all RHEL releases, so there's no point keeping such a conditional -on the master branch. After 0bb9a683, 51-dracut-rescue-postinst.sh -was re-added because Fedora 30 needed it, with a FIXME saying to -remove it after F30 was released. But instead of that happening, it -got changed to a conditional to install it on Fedora <= 30 or RHEL -<= 8 in 9e68789d and the FIXME was removed, then in 9eb1d1ed that -conditional was simplified to only refer to RHEL, so we wound up -with this situation. - -Note the last two commits were never ported to the RHEL-8 branch, -so it's broken, I will send a separate PR for that. - -Signed-off-by: Adam Williamson - -Cherry-picked from: b3e55bde30b8d34c7ed888794ef3f5e9f028b267 -Resolves: #1771517 ---- - dracut.spec | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index dcaafa61..c8783699 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -277,15 +277,9 @@ rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd - rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd - %endif - --%if 0%{?fedora} || 0%{?rhel} - echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf - echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf - --# FIXME: remove after F30 --mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d --install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh --%endif -- - %files - %if %{with doc} - %doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg -@@ -477,11 +471,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - - %files config-rescue - %{dracutlibdir}/dracut.conf.d/02-rescue.conf --%if 0%{?fedora} || 0%{?rhel} - %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install --# FIXME: remove after F30 --%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh --%endif - - %triggerin network -- dracut-network < 049-83.git20200525 - echo '# Since rhel-8.3 dracut moved to use NetworkManager - diff --git a/SOURCES/0137.patch b/SOURCES/0137.patch deleted file mode 100644 index 4e7190e..0000000 --- a/SOURCES/0137.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 862c5a97a69d61ff9122072d8c7bb2e828086650 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Wed, 5 May 2021 16:05:17 +0200 -Subject: [PATCH] fix(fips): add dh and ecdh ciphers - -(cherry picked from commit 543b8014fc10fc6a92ba83db0dfc994fc1d2129b) - -Resolves: #1775692 ---- - 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 f011f15d..8800a49e 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 cfb " -+ _fipsmodules+="cipher_null des3_ede aes cfb dh ecdh " - - # Modes/templates: - _fipsmodules+="ecb cbc ctr xts gcm ccm authenc hmac cmac " - diff --git a/SOURCES/0138.patch b/SOURCES/0138.patch deleted file mode 100644 index 9d012fb..0000000 --- a/SOURCES/0138.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 68826ecc8d1b0605cd69a4f679c0cd4de4e12b18 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 9 Feb 2021 16:46:07 +0100 -Subject: [PATCH] 35network-legacy: discard pointless RTNETLINK message - -This command prints - - RTNETLINK answers: Network is unreachable - -to stderr if IP is not assigned yet, but that's the thing we are -checking for, so there's no point in showing the message. - -(cherry picked from commit c46ed697a20798c09ead362443691d810e122996) - -Resolves: #1879597 ---- - modules.d/35network-legacy/ifup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index 61838741..bd560379 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -106,7 +106,7 @@ do_static() { - return 1 - fi - -- ip route get "$ip" | { -+ ip route get "$ip" 2>/dev/null | { - read a rest - if [ "$a" = "local" ]; then - warn "Not assigning $ip to interface $netif, cause it is already assigned!" - diff --git a/SOURCES/0139.patch b/SOURCES/0139.patch deleted file mode 100644 index 639d751..0000000 --- a/SOURCES/0139.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 809423a5731e4433f3fa08e97ddf152e49cd00bf Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Fri, 13 Nov 2020 18:08:47 +0800 -Subject: [PATCH] 95fcoe: don't install if there is no FCoE hostonly devices - -When in hostonly mode, 95fcoe module will still be installed even there -is no FCoE hostonly device. So use the new block_is_fcoe helper to check -for hostonly device in hostonly mode, avoid installing unneccessary module. - -Signed-off-by: Kairui Song -(cherry picked from commit 8c8af8a2cd728e917be8465c79b12149e6877aef) - -Resolves: #1899456 ---- - modules.d/95fcoe-uefi/module-setup.sh | 17 +++++------------ - modules.d/95fcoe/module-setup.sh | 11 +++++------ - 2 files changed, 10 insertions(+), 18 deletions(-) - -diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh -index a464df5a..9e5719df 100755 ---- a/modules.d/95fcoe-uefi/module-setup.sh -+++ b/modules.d/95fcoe-uefi/module-setup.sh -@@ -2,22 +2,15 @@ - - # called by dracut - check() { -- local _fcoe_ctlr -- [[ $hostonly ]] || [[ $mount_needs ]] && { -- for c in /sys/bus/fcoe/devices/ctlr_* ; do -- [ -L $c ] || continue -- _fcoe_ctlr=$c -- done -- [ -z "$_fcoe_ctlr" ] && return 255 -+ is_fcoe() { -+ block_is_fcoe $1 || return 1 - } -+ - [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for_each_host_dev_and_slaves is_fcoe || return 255 - [ -d /sys/firmware/efi ] || return 255 -- for c in /sys/bus/fcoe/devices/ctlr_* ; do -- [ -L $c ] || continue -- fcoe_ctlr=$c -- done -- [ -z "$fcoe_ctlr" ] && return 255 - } -+ - require_binaries dcbtool fipvlan lldpad ip readlink || return 1 - return 0 - } -diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh -index c2224ec1..f5df705b 100755 ---- a/modules.d/95fcoe/module-setup.sh -+++ b/modules.d/95fcoe/module-setup.sh -@@ -2,13 +2,12 @@ - - # called by dracut - check() { -- local _fcoe_ctlr -+ is_fcoe() { -+ block_is_fcoe $1 || return 1 -+ } -+ - [[ $hostonly ]] || [[ $mount_needs ]] && { -- for c in /sys/bus/fcoe/devices/ctlr_* ; do -- [ -L $c ] || continue -- _fcoe_ctlr=$c -- done -- [ -z "$_fcoe_ctlr" ] && return 255 -+ for_each_host_dev_and_slaves is_fcoe || return 255 - } - - require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 - diff --git a/SOURCES/0140.patch b/SOURCES/0140.patch deleted file mode 100644 index d28c7b6..0000000 --- a/SOURCES/0140.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7a6dfe638d1ef92dfe830094db6b09cb0956c189 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 19 Jul 2021 11:27:28 +0200 -Subject: [PATCH] 95nfs: set correct ownership and permissions for statd - directory - -The directory ownership for the statd directory should be -rpcuser:rpcuser. - -Fixes: 5840c466 95nfs: /var/lib/nfs/statd/sm is /var/lib/nfs/sm on SUSE - -Resolves: #1924950 ---- - modules.d/95nfs/module-setup.sh | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 2ca75d07..ac6d1761 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -104,7 +104,13 @@ install() { - inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh" - mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" - mkdir -m 0770 -p "$initdir/var/lib/rpcbind" -- mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" -+ [ -d "$dracutsysrootdir/var/lib/nfs/statd/sm" ] && \ -+ mkdir -m 0700 -p "$initdir/var/lib/nfs/statd" && \ -+ mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" && \ -+ chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/statd" -+ [ -d "$dracutsysrootdir/var/lib/nfs/sm" ] && \ -+ mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" && -+ chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/sm" - - # Rather than copy the passwd file in, just set a user for rpcbind - # We'll save the state and restart the daemon from the root anyway - diff --git a/SOURCES/0141.patch b/SOURCES/0141.patch deleted file mode 100644 index a79a87d..0000000 --- a/SOURCES/0141.patch +++ /dev/null @@ -1,52 +0,0 @@ -From eaba11eff1156f7a0324a1aa46e43396c7ec3628 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Mon, 1 Mar 2021 17:43:10 +0100 -Subject: [PATCH] fix(dracut.sh): harden dracut against GZIP environment - variable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When a GZIP environment variable is set, this leads to various breakage: - -In case 'pigz' is installed and GZIP is defined as a path, e.g. -/usr/local/bin/gzip, then dracut will fail with the following message: - - " - pigz: abort: cannot provide files in GZIP environment variable - " - -In case 'pigz' isn't installed and regular 'gzip' is used and GZIP is -defined as a path, e.g. /usr/local/bin/gzip, then the path will be -zipped and dracut will fail for no obvious reason. Trying again, dracut -will then fail with following message: - - " - gzip: /usr/local/bin/gzip.gz already exists; not overwritten - " - -In any case, GZIP environment should be unset to avoid breakage or -unwanted behaviour. This variable is anyway obsolescent, from gzip(1) -manpage. - -Signed-off-by: Renaud Métrich -(cherry picked from commit d8e47e201af4646e2a82e11220ea9c993bd2ed48) - -Resolves: #1933773 ---- - dracut.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.sh b/dracut.sh -index 01abe7a4..4340e646 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -24,6 +24,7 @@ - # store for logging - - unset BASH_ENV -+unset GZIP - - # Verify bash version, current minimum is 4 - if (( BASH_VERSINFO[0] < 4 )); then - diff --git a/SOURCES/0142.patch b/SOURCES/0142.patch deleted file mode 100644 index 86cb3b2..0000000 --- a/SOURCES/0142.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3789ef258ecced4b91139b10e71dc787e48519e7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 23 Apr 2021 11:11:27 +0200 -Subject: [PATCH] fix(multipath): stop multipath before udev db cleanup - -All device-mapper based devices, including device-mapper-multipath, -do reuse the udev db from the initramfs after switching to the root fs. - -Therefore device-mapper devices have to be correctly initialized before -the udev daemon is stopped, to have the correct entries in the udev db. - -See also https://bugzilla.redhat.com/show_bug.cgi?id=1949076 - -(cherry picked from commit 3c244c7ca3555b526883dc20104c469b39085cbe) - -Resolves: #1949076 ---- - modules.d/90multipath/multipathd.service | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service -index 646c7c14..b544de21 100644 ---- a/modules.d/90multipath/multipathd.service -+++ b/modules.d/90multipath/multipathd.service -@@ -4,8 +4,10 @@ Before=iscsi.service iscsid.service lvm2-activation-early.service - Wants=systemd-udev-trigger.service systemd-udev-settle.service local-fs-pre.target - After=systemd-udev-trigger.service systemd-udev-settle.service - Before=local-fs-pre.target -+Before=initrd-cleanup.service - DefaultDependencies=no - Conflicts=shutdown.target -+Conflicts=initrd-cleanup.service - ConditionKernelCommandLine=!nompath - ConditionKernelCommandLine=!rd.multipath=0 - ConditionKernelCommandLine=!rd_NO_MULTIPATH - diff --git a/SOURCES/0143.patch b/SOURCES/0143.patch deleted file mode 100644 index a680621..0000000 --- a/SOURCES/0143.patch +++ /dev/null @@ -1,89 +0,0 @@ -From f03ee48fab36a9fe55082f15111771b698081598 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Wed, 5 May 2021 15:46:08 +0200 -Subject: [PATCH] fix(dracut-functions): implement a cache for get_maj_min -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On systems with a large number of devices, usually multipath devices, -dracut can spend a lot of time stat'ing the devices to collect the -major/minor numbers, leading to huge slowness rebuilding the initramfs -when stat'ing devices is slow (seen with oracleasm file systems in -particular). -This commit implements a basic cache stored in a file under -DRACUT_TMPDIR storing the major:minor corresponding to the specified -device. - -Reproducer: create N loopback devices used as a LVM extension to volume -group hosting the root file system - - # LVMVG="rhel" - # NDEVICES=200 - # mkdir devices; for i in $(seq 1 $NDEVICES); do - truncate -s 10m devices/$i; losetup loop$i devices/$i - done - # vgextend $LVMVG $(/bin/ls -1 /dev/loop[0-9]*) - -With standard code (tested with RHEL8.3 dracut): - - # dracut -f --debug /tmp/initramfs.img $(uname -r) >/tmp/debug 2>&1 - # grep -c "stat -L -c" /tmp/debug - 2440 - -With this code: - - # dracut -f --debug /tmp/initramfs.img $(uname -r) >/tmp/debug_optim 2>&1 - # grep -c "stat -L -c" /tmp/debug_optim - 205 - -Signed-off-by: Renaud Métrich -(cherry picked from commit c3bb9d18dceed7db6d16f9c2a7f682c5934099d7) - -Cherry-picked from: c3bb9d18dceed7db6d16f9c2a7f682c5934099d7 -Resolves: #1957622 ---- - dracut-functions.sh | 10 +++++++--- - dracut.sh | 4 ++++ - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 1431dd18..a221967c 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -199,12 +199,16 @@ get_fs_env() { - # $ get_maj_min /dev/sda2 - # 8:2 - get_maj_min() { -- local _maj _min _majmin -+ local _majmin -+ out="$(grep -m1 -oP "^$1 \K\S+$" "${get_maj_min_cache_file:?}")" -+ if [ -z "$out" ]; then - _majmin="$(stat -L -c '%t:%T' "$1" 2>/dev/null)" -- printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))" -+ out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")" -+ echo "$1 $out" >> "${get_maj_min_cache_file:?}" -+ fi -+ echo -n "$out" - } - -- - # get_devpath_block - # get the DEVPATH in /sys of a block device - get_devpath_block() { -diff --git a/dracut.sh b/dracut.sh -index 4340e646..f8e68ccb 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -901,6 +901,10 @@ readonly DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)" - exit 1 - } - -+# Cache file used to optimize get_maj_min() -+declare -x -r get_maj_min_cache_file="${DRACUT_TMPDIR}/majmin_cache" -+: > "$get_maj_min_cache_file" -+ - # clean up after ourselves no matter how we die. - trap ' - ret=$?; - diff --git a/SOURCES/0144.patch b/SOURCES/0144.patch deleted file mode 100644 index 8bbb105..0000000 --- a/SOURCES/0144.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 6ed9cff05fb1015fe50951c93430052004d22b01 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 21 May 2021 12:19:32 +0200 -Subject: [PATCH] fix(dracut-functions): get_maj_min without - get_maj_min_cache_file set - -If `get_maj_min_cache_file` is unset `get_maj_min()` would error out. - -Fix it to work without a cache file set. - -(cherry picked from commit a277a5fc7acc0a9e8d853f09671495f9d27645c1) - -Cherry-picked from: a277a5fc7acc0a9e8d853f09671495f9d27645c1 -Resolves: #1957622 ---- - dracut-functions.sh | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index a221967c..eb2ce748 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -200,13 +200,20 @@ get_fs_env() { - # 8:2 - get_maj_min() { - local _majmin -- out="$(grep -m1 -oP "^$1 \K\S+$" "${get_maj_min_cache_file:?}")" -- if [ -z "$out" ]; then -+ local _out -+ -+ if [[ $get_maj_min_cache_file ]]; then -+ _out="$(grep -m1 -oP "^$1 \K\S+$" "$get_maj_min_cache_file")" -+ fi -+ -+ if ! [[ "$_out" ]]; then - _majmin="$(stat -L -c '%t:%T' "$1" 2>/dev/null)" - out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")" -- echo "$1 $out" >> "${get_maj_min_cache_file:?}" -+ if [[ $get_maj_min_cache_file ]]; then -+ echo "$1 $_out" >> "$get_maj_min_cache_file" -+ fi - fi -- echo -n "$out" -+ echo -n "$_out" - } - - # get_devpath_block - diff --git a/SOURCES/0145.patch b/SOURCES/0145.patch deleted file mode 100644 index bec6dae..0000000 --- a/SOURCES/0145.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 21b746743c146c94235c93611519db6d47c8c0c1 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 18 Feb 2021 11:01:31 +0100 -Subject: [PATCH] fix(fcoe): rd.nofcoe=0 should disable fcoe - -8446c8f9 Changed the default behavior, but also flipped meaning of 0/1. -Right now rd.nofcoe=0 enables fcoe, which is the opposite what manpage -says. - -(cherry picked from commit 805b46c2a81e04d69fc3af912942568516d05ee7) - -Resolves: #1929201 ---- - modules.d/95fcoe/lldpad.sh | 2 +- - modules.d/95fcoe/parse-fcoe.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -index 7faa2e19..6b1844b0 100755 ---- a/modules.d/95fcoe/lldpad.sh -+++ b/modules.d/95fcoe/lldpad.sh -@@ -1,6 +1,6 @@ - #!/bin/bash - --if getargbool 0 rd.nofcoe ; then -+if ! getargbool 1 rd.nofcoe ; then - info "rd.nofcoe=0: skipping lldpad activation" - return 0 - fi -diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh -index 86f4331e..5553602f 100755 ---- a/modules.d/95fcoe/parse-fcoe.sh -+++ b/modules.d/95fcoe/parse-fcoe.sh -@@ -13,7 +13,7 @@ - # fcoe=eth0:nodcb:vn2vn - # fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric - --if getargbool 0 rd.nofcoe ; then -+if ! getargbool 1 rd.nofcoe ; then - info "rd.nofcoe=0: skipping fcoe" - return 0 - fi - diff --git a/SOURCES/0146.patch b/SOURCES/0146.patch deleted file mode 100644 index 14c5981..0000000 --- a/SOURCES/0146.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c588aea59c9a2441596b84722c6c32449676f07d Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 18 Feb 2021 11:23:41 +0100 -Subject: [PATCH] fix(fcoe): rename rd.nofcoe to rd.fcoe - -The current name of this bool is kinda stupid. Based on the manpage -setting it to 0 turns off fcoe, which means that nofcoe=1 should mean -that it is on. - -Let's just do the same thing as with rd.lvm=0, rd.luks=0,.... - -(cherry picked from commit 6f7823bce65dd4b52497dbb94892b637fd06471a) - -Resolves: #1929201 ---- - dracut.cmdline.7.asc | 2 +- - modules.d/95fcoe/lldpad.sh | 4 ++-- - modules.d/95fcoe/parse-fcoe.sh | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index bf745575..327f85de 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -779,7 +779,7 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30 - - FCoE - ~~~~ --**rd.nofcoe=0**:: -+**rd.fcoe=0**:: - disable FCoE and lldpad - - **fcoe=**____:__{dcb|nodcb}__:__{fabric|vn2vn}__:: -diff --git a/modules.d/95fcoe/lldpad.sh b/modules.d/95fcoe/lldpad.sh -index 6b1844b0..c860035f 100755 ---- a/modules.d/95fcoe/lldpad.sh -+++ b/modules.d/95fcoe/lldpad.sh -@@ -1,7 +1,7 @@ - #!/bin/bash - --if ! getargbool 1 rd.nofcoe ; then -- info "rd.nofcoe=0: skipping lldpad activation" -+if ! getargbool 1 rd.fcoe -d -n rd.nofcoe ; then -+ info "rd.fcoe=0: skipping lldpad activation" - return 0 - fi - -diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh -index 5553602f..0a8067f5 100755 ---- a/modules.d/95fcoe/parse-fcoe.sh -+++ b/modules.d/95fcoe/parse-fcoe.sh -@@ -13,8 +13,8 @@ - # fcoe=eth0:nodcb:vn2vn - # fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric - --if ! getargbool 1 rd.nofcoe ; then -- info "rd.nofcoe=0: skipping fcoe" -+if ! getargbool 1 rd.fcoe -d -n rd.nofcoe ; then -+ info "rd.fcoe=0: skipping fcoe" - return 0 - fi - - diff --git a/SOURCES/0147.patch b/SOURCES/0147.patch deleted file mode 100644 index a11b66a..0000000 --- a/SOURCES/0147.patch +++ /dev/null @@ -1,170 +0,0 @@ -From dc316701f752f5197a6a926a9a401688ffdb9bca Mon Sep 17 00:00:00 2001 -From: Mariusz Tkaczyk -Date: Thu, 26 Nov 2020 13:04:44 +0100 -Subject: [PATCH] fix(mdraid): remove offroot - -offroot is deprecated and can be safety removed. - -Signed-off-by: Mariusz Tkaczyk -(cherry picked from commit 30e49d51751c695be85782cfc162de2a63db471c) - -Resolves: #1958899 ---- - modules.d/90mdraid/65-md-incremental-imsm.rules | 2 +- - modules.d/90mdraid/md-shutdown.sh | 5 ++--- - modules.d/90mdraid/mdraid-cleanup.sh | 7 +++---- - modules.d/90mdraid/mdraid-waitclean.sh | 7 +++---- - modules.d/90mdraid/mdraid_start.sh | 10 +++------- - modules.d/90mdraid/parse-md.sh | 2 -- - 6 files changed, 12 insertions(+), 21 deletions(-) - -diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules -index 52f5b195..6697f159 100644 ---- a/modules.d/90mdraid/65-md-incremental-imsm.rules -+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules -@@ -39,6 +39,6 @@ RUN+="/sbin/initqueue --timeout --name 50-mdraid_start --onetime --unique /sbin/ - # - LABEL="md_incremental" - --RUN+="/sbin/mdadm $env{rd_MD_OFFROOT} -I $env{DEVNAME}" -+RUN+="/sbin/mdadm -I $env{DEVNAME}" - - LABEL="md_end" -diff --git a/modules.d/90mdraid/md-shutdown.sh b/modules.d/90mdraid/md-shutdown.sh -index 400bb003..40c82570 100755 ---- a/modules.d/90mdraid/md-shutdown.sh -+++ b/modules.d/90mdraid/md-shutdown.sh -@@ -3,12 +3,11 @@ - _do_md_shutdown() { - local ret - local final=$1 -- local _offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) - info "Waiting for mdraid devices to be clean." -- mdadm $_offroot -vv --wait-clean --scan| vinfo -+ mdadm -vv --wait-clean --scan| vinfo - ret=$? - info "Disassembling mdraid devices." -- mdadm $_offroot -vv --stop --scan | vinfo -+ mdadm -vv --stop --scan | vinfo - ret=$(($ret+$?)) - if [ "x$final" != "x" ]; then - info "/proc/mdstat:" -diff --git a/modules.d/90mdraid/mdraid-cleanup.sh b/modules.d/90mdraid/mdraid-cleanup.sh -index 565449a5..007e581b 100755 ---- a/modules.d/90mdraid/mdraid-cleanup.sh -+++ b/modules.d/90mdraid/mdraid-cleanup.sh -@@ -2,7 +2,6 @@ - - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - --_offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) - containers="" - for md in /dev/md[0-9_]*; do - [ -b "$md" ] || continue -@@ -12,11 +11,11 @@ for md in /dev/md[0-9_]*; do - containers="$containers $md" - continue - fi -- mdadm $_offroot -S "$md" >/dev/null 2>&1 -+ mdadm -S "$md" >/dev/null 2>&1 - done - - for md in $containers; do -- mdadm $_offroot -S "$md" >/dev/null 2>&1 -+ mdadm -S "$md" >/dev/null 2>&1 - done - --unset containers udevinfo _offroot -+unset containers udevinfo -diff --git a/modules.d/90mdraid/mdraid-waitclean.sh b/modules.d/90mdraid/mdraid-waitclean.sh -index 5c901982..0a7480f7 100755 ---- a/modules.d/90mdraid/mdraid-waitclean.sh -+++ b/modules.d/90mdraid/mdraid-waitclean.sh -@@ -1,7 +1,6 @@ - #!/bin/sh - - if getargbool 0 rd.md.waitclean; then -- _offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - containers="" - for md in /dev/md[0-9_]*; do -@@ -13,13 +12,13 @@ if getargbool 0 rd.md.waitclean; then - continue - fi - info "Waiting for $md to become clean" -- mdadm $_offroot -W "$md" >/dev/null 2>&1 -+ mdadm -W "$md" >/dev/null 2>&1 - done - - for md in $containers; do - info "Waiting for $md to become clean" -- mdadm $_offroot -W "$md" >/dev/null 2>&1 -+ mdadm -W "$md" >/dev/null 2>&1 - done - -- unset containers udevinfo _offroot -+ unset containers udevinfo - fi -diff --git a/modules.d/90mdraid/mdraid_start.sh b/modules.d/90mdraid/mdraid_start.sh -index 77e843d7..ed8d8dfe 100755 ---- a/modules.d/90mdraid/mdraid_start.sh -+++ b/modules.d/90mdraid/mdraid_start.sh -@@ -7,7 +7,6 @@ _md_start() { - local _path_s - local _path_d - local _md="$1" -- local _offroot="$2" - - _udevinfo="$(udevadm info --query=env --name="${_md}")" - strstr "$_udevinfo" "MD_LEVEL=container" && continue -@@ -19,7 +18,7 @@ _md_start() { - # inactive ? - [ "$(cat "$_path_s")" != "inactive" ] && continue - -- mdadm $_offroot -R "${_md}" 2>&1 | vinfo -+ mdadm -R "${_md}" 2>&1 | vinfo - - # still inactive ? - [ "$(cat "$_path_s")" = "inactive" ] && continue -@@ -30,14 +29,11 @@ _md_start() { - } - - _md_force_run() { -- local _offroot - local _md - local _UUID - local _MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) - [ -n "$_MD_UUID" ] || getargbool 0 rd.auto || return - -- _offroot=$(strstr "$(mdadm --help-options 2>&1)" offroot && echo --offroot) -- - if [ -n "$_MD_UUID" ]; then - _MD_UUID=$(str_replace "$_MD_UUID" "-" "") - _MD_UUID=$(str_replace "$_MD_UUID" ":" "") -@@ -58,13 +54,13 @@ _md_force_run() { - # check if we should handle this device - strstr " $_MD_UUID " " $_UUID " || continue - -- _md_start "${_md}" "${_offroot}" -+ _md_start "${_md}" - done - else - # try to force-run anything not running yet - for _md in /dev/md[0-9_]*; do - [ -b "$_md" ] || continue -- _md_start "${_md}" "${_offroot}" -+ _md_start "${_md}" - done - fi - } -diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh -index 4d9baa52..2cce9769 100755 ---- a/modules.d/90mdraid/parse-md.sh -+++ b/modules.d/90mdraid/parse-md.sh -@@ -60,5 +60,3 @@ if ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF -n noddfmd -n nodmraid; then - info "no MD RAID for SNIA ddf raids" - udevproperty rd_NO_MDDDF=1 - fi -- --strstr "$(mdadm --help-options 2>&1)" offroot && udevproperty rd_MD_OFFROOT=--offroot - diff --git a/SOURCES/0148.patch b/SOURCES/0148.patch deleted file mode 100644 index 36848c6..0000000 --- a/SOURCES/0148.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5818f56e99aecca0664f779c29c569f116f907e4 Mon Sep 17 00:00:00 2001 -From: Mariusz Tkaczyk -Date: Thu, 26 Nov 2020 12:51:47 +0100 -Subject: [PATCH] fix(mdraid): add grow continue service - -During raid assembly mdadm will call mdadm-grow-continue.service if -reshape is in progress. -If service doesn't exist then it is done via fork and systemd will kill -it unconditionally after processing all events. - -Add proper service to allow systemd to manage reshape correctly. - -Signed-off-by: Mariusz Tkaczyk -(cherry picked from commit 29e269a5225ad8f658a8d7ef64d77d0c02f8e31d) - -Resolves: #1958899 ---- - modules.d/90mdraid/module-setup.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index 98a4ef5d..2e043041 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -136,6 +136,9 @@ install() { - if [ -e $systemdsystemunitdir/mdadm-last-resort@.timer ]; then - inst_simple $systemdsystemunitdir/mdadm-last-resort@.timer - fi -+ if [ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-grow-continue@.service ]; then -+ inst_simple $systemdsystemunitdir/mdadm-grow-continue@.service -+ fi - fi - inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh" - dracut_need_initqueue - diff --git a/SOURCES/0149.patch b/SOURCES/0149.patch deleted file mode 100644 index 5dc5c79..0000000 --- a/SOURCES/0149.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7b5182a572c03279b65f0c6abd434edd513e956d Mon Sep 17 00:00:00 2001 -From: Thomas Blume -Date: Fri, 7 Aug 2020 08:39:26 +0200 -Subject: [PATCH] net-lib.sh: support infiniband network mac addresses - -Infiniband MAC addresses have 20 octets. - -Reference: bsc#996146 -(cherry picked from commit 376ce85105121936666349aa5a777768d52516f7) - -Resolves: #1964538 ---- - modules.d/40network/net-lib.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index f0c1c041..128d6343 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -570,6 +570,11 @@ parse_ifname_opts() { - # udev requires MAC addresses to be lower case - ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/') - ;; -+ 21) -+ ifname_if=$1 -+ # udev requires MAC addresses to be lower case -+ ifname_mac=$(echo $2:$3:$4:$5:$6:$7:$8:$9:${10}:${11}:${12}:${13}:${14}:${15}:${16}:${17}:${18}:${19}:${20}:${21} | sed 'y/ABCDEF/abcdef/') -+ ;; - *) - die "Invalid arguments for ifname=" - ;; - diff --git a/SOURCES/0150.patch b/SOURCES/0150.patch deleted file mode 100644 index a8bd04d..0000000 --- a/SOURCES/0150.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 81f38303351391b054e28d91cb101756233d2b64 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Mon, 28 Sep 2020 13:39:07 +0200 -Subject: [PATCH] 95nvmf: add nvmf-autoconnect script - -Add a script to run FC autoconnect. - -Signed-off-by: Hannes Reinecke -(cherry picked from commit 0e2ef80993858992f6219b5162289568937a1fac) - -Cherry-picked from: 0e2ef80993858992f6219b5162289568937a1fac -Resolves: #1975707 ---- - modules.d/95nvmf/module-setup.sh | 2 ++ - modules.d/95nvmf/nvmf-autoconnect.sh | 5 +++++ - modules.d/95nvmf/parse-nvmf-boot-connections.sh | 2 +- - 3 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh -index 418b5e0c..3923451b 100755 ---- a/modules.d/95nvmf/module-setup.sh -+++ b/modules.d/95nvmf/module-setup.sh -@@ -79,6 +79,8 @@ install() { - - inst_multiple ip sed - -+ inst_script "${moddir}/nvmf-autoconnect.sh" /sbin/nvmf-autoconnect.sh -+ - inst_multiple nvme - inst_multiple -o \ - "$systemdsystemunitdir/nvm*-connect@.service" \ -diff --git a/modules.d/95nvmf/nvmf-autoconnect.sh b/modules.d/95nvmf/nvmf-autoconnect.sh -new file mode 100644 -index 00000000..c8f676a7 ---- /dev/null -+++ b/modules.d/95nvmf/nvmf-autoconnect.sh -@@ -0,0 +1,5 @@ -+#!/bin/bash -+ -+[ -f /sys/class/fc/fc_udev_device/nvme_discovery ] || exit 1 -+echo add > /sys/class/fc/fc_udev_device/nvme_discovery -+exit 0 -diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -index 61c6dec1..ceb52f1e 100755 ---- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh -+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh -@@ -133,6 +133,6 @@ else - /sbin/initqueue --settled --onetime --unique /usr/sbin/nvme connect-all -t tcp -a $traddr -s $trsvcid - > /tmp/net.$ifname.did-setup - else -- /sbin/initqueue --finished --unique --name nvme-fc-autoconnect echo 1 > /sys/class/fc/fc_udev_device/nvme_discovery -+ /sbin/initqueue --finished --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh - fi - fi - diff --git a/SOURCES/0151.patch b/SOURCES/0151.patch deleted file mode 100644 index d92a68f..0000000 --- a/SOURCES/0151.patch +++ /dev/null @@ -1,24 +0,0 @@ -From a1b8660316c7d0a541d9e4139df5c5efe2532365 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 29 Jul 2021 17:40:26 +0200 -Subject: [PATCH] dracut-functions: fix botched backport - -Resolves: #1957622 ---- - dracut-functions.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index eb2ce748..d75696fd 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -208,7 +208,7 @@ get_maj_min() { - - if ! [[ "$_out" ]]; then - _majmin="$(stat -L -c '%t:%T' "$1" 2>/dev/null)" -- out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")" -+ _out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")" - if [[ $get_maj_min_cache_file ]]; then - echo "$1 $_out" >> "$get_maj_min_cache_file" - fi - diff --git a/SOURCES/0152.patch b/SOURCES/0152.patch deleted file mode 100644 index f6f7f64..0000000 --- a/SOURCES/0152.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 20ea91703b98708579f3d531823ec56bcec2bf1a Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Fri, 9 Nov 2018 10:48:28 +0800 -Subject: [PATCH] squash: unsquash the root image instead of mounting it on - shutdown - -When building squash image, squash module forgot to install the new -shutdown.sh, and the shutdown hooks are always skipped on ordinary -shutdown if squash module is enabled. - -The new shutdown.sh will remount the squash image and then everything -will just work, but currently re-mounting the squash image on shutdown -may have selinux problem and make the system hang, and there is no -easy way to fix it. - -So skip fixing the shutdown.sh not being install problem, instead -just drop the new shutdown.sh, and unsquash the image on ordinary -shutdown, which is safer and should always work. - -Signed-off-by: Kairui Song -(cherry picked from commit a60af534132828fd46fa017291f7ed7cfeab1dc3) - -Resolves: #1959336 ---- - dracut-initramfs-restore.sh | 9 +++++++++ - dracut.sh | 2 -- - modules.d/99squash/shutdown.sh | 7 ------- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index 94794804..67fc88fa 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -40,4 +40,13 @@ else - exit 1 - fi - -+if [[ -d squash ]]; then -+ unsquashfs -no-xattrs -f -d . squash/root.img >/dev/null -+ if [ $? -ne 0 ]; then -+ echo "Squash module is enabled for this initramfs but failed to unpack squash/root.img" >&2 -+ rm -f -- /run/initramfs/shutdown -+ exit 1 -+ fi -+fi -+ - exit 0 -diff --git a/dracut.sh b/dracut.sh -index f8e68ccb..966350c5 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1817,9 +1817,7 @@ if dracut_module_included "squash"; then - done - - mv $initdir/init $initdir/init.stock -- mv $initdir/shutdown $initdir/shutdown.stock - 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 -diff --git a/modules.d/99squash/shutdown.sh b/modules.d/99squash/shutdown.sh -deleted file mode 100755 -index 535779f4..00000000 ---- a/modules.d/99squash/shutdown.sh -+++ /dev/null -@@ -1,7 +0,0 @@ --#!/bin/sh --/squash/setup-squash.sh -- --exec /shutdown.stock -- --echo "Something went wrong when trying to start original shutdown executable!" --exit 1 - diff --git a/SOURCES/0153.patch b/SOURCES/0153.patch deleted file mode 100644 index e45b8a4..0000000 --- a/SOURCES/0153.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 309c4b0a1756399d9bfd5576d904be63c0a9a8c8 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 25 Dec 2018 17:53:24 +0800 -Subject: [PATCH] 99squash: fail early if can't install require modules in - initramfs - -insmods will consider all arguments as optional modules by default, but -for squash module, all listed modules are required, if any of them is -missing the initramfs won't boot. So pass the '-c' argument to let instmos -know all those modules are mandatory, it will fail and give an error if -it failed to install any of those modules. - -(cherry picked from commit 90ac0a2d772ec0d4f90ea16fc5a31be10bdf205e) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 7aa0b447..72fa81f0 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -10,7 +10,7 @@ depends() { - } - - installkernel() { -- hostonly="" instmods squashfs loop overlay -+ hostonly="" instmods -c squashfs loop overlay - } - - install() { - diff --git a/SOURCES/0154.patch b/SOURCES/0154.patch deleted file mode 100644 index b7bedc8..0000000 --- a/SOURCES/0154.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 776ee36e59f6f2cb97f6cd2bca4c989b89a727d2 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 8 Jun 2020 15:31:56 +0800 -Subject: [PATCH] 99squash: Don't hardcode the squash sub directories - -Signed-off-by: Kairui Song -(cherry picked from commit 3a2beb037c822e1567f86b63ac24194bffeea991) - -Resolves: #1959336 ---- - modules.d/99squash/setup-squash.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/99squash/setup-squash.sh b/modules.d/99squash/setup-squash.sh -index d2740e7c..d0000b6f 100755 ---- a/modules.d/99squash/setup-squash.sh -+++ b/modules.d/99squash/setup-squash.sh -@@ -4,7 +4,6 @@ PATH=/bin:/sbin - SQUASH_IMG=/squash/root.img - SQUASH_MNT=/squash/root - SQUASH_MNT_REC=/squash/mounts --SQUASHED_MNT="usr etc" - - echo $SQUASH_MNT > $SQUASH_MNT_REC - -@@ -45,7 +44,8 @@ if [ $? != 0 ]; then - echo "Unable to mount squashed initramfs image" - fi - --for file in $SQUASHED_MNT; do -+for file in $SQUASH_MNT/*; do -+ file=${file#$SQUASH_MNT/} - lowerdir=$SQUASH_MNT/$file - workdir=/squash/overlay-work/$file - upperdir=/$file - diff --git a/SOURCES/0155.patch b/SOURCES/0155.patch deleted file mode 100644 index 25a88c6..0000000 --- a/SOURCES/0155.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a5b46f9fad27954206fe47dedcef350f77f244a0 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 8 Jun 2020 17:00:00 +0800 -Subject: [PATCH] 99squash: improve pre-requirements check - -Check for systemd-initrd and squashfs-tools in check() to fail early if -it won't work. - -Signed-off-by: Kairui Song -(cherry picked from commit cfd872392c59c96665c558899880d6b2980065bb) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 72fa81f0..6307377c 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -1,11 +1,21 @@ - #!/bin/bash - - check() { -+ if ! dracut_module_included "systemd-initrd"; then -+ derror "dracut-squash only supports systemd bases initramfs" -+ return 1 -+ fi -+ -+ if ! type -P mksquashfs >/dev/null || ! type -P unsquashfs >/dev/null ; then -+ derror "dracut-squash module requires squashfs-tools" -+ return 1 -+ fi -+ - return 255 - } - - depends() { -- echo "bash systemd systemd-initrd" -+ echo "bash systemd-initrd" - return 0 - } - -@@ -14,11 +24,6 @@ installkernel() { - } - - install() { -- if ! type -P mksquashfs >/dev/null || ! type -P unsquashfs >/dev/null ; then -- derror "squash module requires squashfs-tools to be installed." -- return 1 -- fi -- - inst_multiple kmod modprobe mount mkdir ln echo - inst $moddir/setup-squash.sh /squash/setup-squash.sh - inst $moddir/clear-squash.sh /squash/clear-squash.sh - diff --git a/SOURCES/0156.patch b/SOURCES/0156.patch deleted file mode 100644 index e507a39..0000000 --- a/SOURCES/0156.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 8272fd2f1b676abe22abaacfe7c1ebd24b56fcb6 Mon Sep 17 00:00:00 2001 -From: Pedro Monreal -Date: Thu, 8 Nov 2018 14:15:38 +0100 -Subject: [PATCH] Fixed some SUSE specific typos and outputs - -(cherry picked from commit f18d069d4664c148df8563139b358806ecfe6799) - -Resolves: #1959336 ---- - dracut.conf.5.asc | 2 +- - dracut.conf.d/suse.conf.example | 4 ++-- - dracut.sh | 4 ++-- - dracut.usage.asc | 6 +++--- - mkinitrd-suse.sh | 4 ++-- - modules.d/98dracut-systemd/dracut-shutdown.service.8.asc | 2 +- - modules.d/98syslog/README | 2 +- - modules.d/99base/dracut-lib.sh | 2 +- - 8 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc -index 1dfa28f6..081ed70c 100644 ---- a/dracut.conf.5.asc -+++ b/dracut.conf.5.asc -@@ -157,7 +157,7 @@ provide a valid _/etc/fstab_. - archive. This cpio archive gets glued (concatenated, uncompressed one - must be the first one) to the compressed cpio archive. The first, - uncompressed cpio archive is for data which the kernel must be able -- to access very early (and cannot make use of uncompress alogrithms yet) -+ to access very early (and cannot make use of uncompress algorithms yet) - like microcode or ACPI tables (default=no). - - *acpi_table_dir=*"____":: -diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example -index 37ffd72b..b5d962db 100644 ---- a/dracut.conf.d/suse.conf.example -+++ b/dracut.conf.d/suse.conf.example -@@ -1,6 +1,6 @@ --# SUSE specifc dracut settings -+# SUSE specific dracut settings - # --# SUSE by default always builds a as small as possible initrd for performance -+# SUSE by default always builds as small as possible initrd for performance - # and resource reasons. - # If you like to build a generic initrd which works on other platforms than - # on the one dracut/mkinitrd got called comment out below setting(s). -diff --git a/dracut.sh b/dracut.sh -index 966350c5..b9657dc6 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1679,7 +1679,7 @@ if [[ $early_microcode = yes ]]; then - for _fwdir in $fw_dir; do - if [[ -d $_fwdir && -d $_fwdir/$_fw ]]; then - _src="*" -- dinfo "*** Constructing ${ucode_dest[$idx]} ****" -+ dinfo "*** Constructing ${ucode_dest[$idx]} ***" - if [[ $hostonly ]]; then - _src=$(get_ucode_file) - [[ $_src ]] || break -@@ -1762,7 +1762,7 @@ if dracut_module_included "squash"; then - - # 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 -+ # - Files need to be accessible without mounting the squash image - required_in_root() { - local file=$1 - local _sqsh_file=$squash_dir/$file -diff --git a/dracut.usage.asc b/dracut.usage.asc -index 2b598ee6..0f219fc9 100644 ---- a/dracut.usage.asc -+++ b/dracut.usage.asc -@@ -83,7 +83,7 @@ on the command line: - === Adding Kernel Modules - If you need a special kernel module in the initramfs, which is not - automatically picked up by dracut, you have the use the --add-drivers option --on the command line or the drivers vaiable in the _/etc/dracut.conf_ -+on the command line or the drivers variable in the _/etc/dracut.conf_ - or _/etc/dracut.conf.d/myconf.conf_ configuration file (see *dracut.conf*(5)): - ---- - # dracut --add-drivers mymod initramfs-with-mymod.img -@@ -94,7 +94,7 @@ An initramfs generated without the "hostonly" mode, does not contain any system - configuration files (except for some special exceptions), so the configuration - has to be done on the kernel command line. With this flexibility, you can easily - boot from a changed root partition, without the need to recompile the initramfs --image. So, you could completly change your root partition (move it inside a md -+image. So, you could completely change your root partition (move it inside a md - raid with encryption and LVM on top), as long as you specify the correct - filesystem LABEL or UUID on the kernel command line for your root device, dracut - will find it and boot from it. -@@ -185,7 +185,7 @@ This turns off every automatic assembly of LVM, MD raids, DM raids and - crypto LUKS. - - Of course, you could also omit the dracut modules in the initramfs creation --process, but then you would lose the posibility to turn it on on demand. -+process, but then you would lose the possibility to turn it on on demand. - - - [[Injecting]] -diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh -index 20d85da1..b6af2b19 100755 ---- a/mkinitrd-suse.sh -+++ b/mkinitrd-suse.sh -@@ -1,6 +1,6 @@ - #!/bin/bash --norc - # --# mkinitrd compability wrapper for SUSE. -+# mkinitrd compatibility wrapper for SUSE. - # - # Copyright (c) 2013 SUSE Linux Products GmbH. All rights reserved. - # -@@ -62,7 +62,7 @@ usage () { - $cmd " /etc/sysconfig/kernel." - $cmd " -d root_device Root device. Defaults to the device from" - $cmd " which / is mounted. Overrides the rootdev" -- $cmd " enviroment variable if set." -+ $cmd " environment variable if set." - $cmd " -j device Journal device" - $cmd " -D interface Run dhcp on the specified interface." - $cmd " -I interface Configure the specified interface statically." -diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -index f4fbb618..ba80b187 100644 ---- a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -+++ b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -@@ -15,7 +15,7 @@ dracut-shutdown.service - DESCRIPTION - ----------- - This service unpacks the initramfs image to /run/initramfs. --systemd pivots into /run/initramfs at shutdown, so the root filesytem -+systemd pivots into /run/initramfs at shutdown, so the root filesystem - can be safely unmounted. - - The following steps are executed during a shutdown: -diff --git a/modules.d/98syslog/README b/modules.d/98syslog/README -index 30a819c0..9eb5adee 100644 ---- a/modules.d/98syslog/README -+++ b/modules.d/98syslog/README -@@ -11,7 +11,7 @@ Then if syslog is configured it is started and will forward all - kernel messages to the given syslog server. - - The syslog implementation is detected automatically by finding the --apropriate binary with the following order: -+appropriate binary with the following order: - rsyslogd - syslogd - syslog-ng -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 96dd55ad..89a1d69a 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -620,7 +620,7 @@ nfsroot_to_var() { - # prints: - # ENV{ID_FS_LABEL}="boot" - # --# TOOD: symlinks -+# TODO: symlinks - udevmatch() { - case "$1" in - UUID=????????-????-????-????-????????????|LABEL=*|PARTLABEL=*|PARTUUID=????????-????-????-????-????????????) - diff --git a/SOURCES/0157.patch b/SOURCES/0157.patch deleted file mode 100644 index 8205904..0000000 --- a/SOURCES/0157.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 9a6b40f023db3763694fb99a820f11017cc56811 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 9 Jun 2020 00:41:24 +0800 -Subject: [PATCH] 99squash: simplify the code - -The new dracutsysrootdir could be used to replace the shell function -required_in_root, so drop it and also simplify the code. - -Signed-off-by: Kairui Song -(cherry picked from commit 4159819fbb20fca8c0a80ddb17e211f481ec7717) - -Resolves: #1959336 ---- - dracut.sh | 89 ++++++++++++++------------------------------------------------- - 1 file changed, 20 insertions(+), 69 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index b9657dc6..176b2259 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1736,23 +1736,19 @@ fi - - if dracut_module_included "squash"; then - dinfo "*** Install squash loader ***" -- if ! check_kernel_config CONFIG_SQUASHFS; then -- dfatal "CONFIG_SQUASHFS have to be enabled for dracut squash module to work" -- exit 1 -- fi -- if ! check_kernel_config CONFIG_OVERLAY_FS; then -- dfatal "CONFIG_OVERLAY_FS have to be enabled for dracut squash module to work" -- exit 1 -- fi -- if ! check_kernel_config CONFIG_DEVTMPFS; then -- dfatal "CONFIG_DEVTMPFS have to be enabled for dracut squash module to work" -+ for config in \ -+ CONFIG_SQUASHFS \ -+ CONFIG_OVERLAY_FS \ -+ CONFIG_DEVTMPFS; -+ do -+ if ! check_kernel_config $config; then -+ dfatal "$config have to be enabled for dracut squash module to work" - exit 1 -- fi -+ fi -+ done - - readonly squash_dir="$initdir/squash/root" -- readonly squash_img=$initdir/squash/root.img -- -- # Currently only move "usr" "etc" to squashdir -+ readonly squash_img="$initdir/squash/root.img" - readonly squash_candidate=( "usr" "etc" ) - - mkdir -m 0755 -p $squash_dir -@@ -1763,57 +1759,15 @@ if dracut_module_included "squash"; then - # Move some files out side of the squash image, including: - # - Files required to boot and mount the squashfs image - # - Files need to be accessible without mounting the squash image -- required_in_root() { -- local file=$1 -- local _sqsh_file=$squash_dir/$file -- local _init_file=$initdir/$file -- -- if [[ -e $_init_file ]]; then -- return -- fi -- -- if [[ ! -e $_sqsh_file ]] && [[ ! -L $_sqsh_file ]]; then -- derror "$file is required to boot a squashed initramfs but it's not installed!" -- return -- fi -- -- if [[ ! -d $(dirname $_init_file) ]]; then -- required_in_root $(dirname $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 [[ -d $_sqsh_file ]]; then -- mkdir $_init_file -- else -- mv $_sqsh_file $_init_file -- fi -- fi -- } -- -- required_in_root etc/initrd-release -- -- for module_spec in $squash_dir/usr/lib/modules/*/modules.*; -- do -- required_in_root ${module_spec#$squash_dir/} -- done -- -- for dracut_spec in $squash_dir/usr/lib/dracut/*; -+ # - Initramfs marker -+ for file in \ -+ $squash_dir/usr/lib/modules/*/modules.* \ -+ $squash_dir/usr/lib/dracut/* \ -+ $squash_dir/etc/initrd-release - do -- required_in_root ${dracut_spec#$squash_dir/} -+ [[ -d $file ]] && continue -+ DRACUT_RESOLVE_DEPS=1 dracutsysrootdir=$squash_dir inst ${file#$squash_dir} -+ rm $file - done - - mv $initdir/init $initdir/init.stock -@@ -1824,17 +1778,14 @@ if dracut_module_included "squash"; then - # 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 - -+ # Remove duplicated files - 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 -+ for file in $(find $initdir/$folder/ -not -type d); do - if [[ -e $squash_dir${file#$initdir} ]]; then - mv $squash_dir${file#$initdir} $file - fi - diff --git a/SOURCES/0158.patch b/SOURCES/0158.patch deleted file mode 100644 index 478ba28..0000000 --- a/SOURCES/0158.patch +++ /dev/null @@ -1,58 +0,0 @@ -From debb3b29ca103e2dac8a3ccafe73f7f815b54979 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 12 Oct 2020 15:23:30 +0800 -Subject: [PATCH] 99squash: Check require module earlier, and properly - -Let 99squash fail earlier if required modules are not enabled or -missing, using the new added helper. - -Signed-off-by: Kairui Song -(cherry picked from commit 83c65fd3db9f5f3436cfe74ec67d2894dedda397) - -Resolves: #1959336 ---- - dracut.sh | 11 ----------- - modules.d/99squash/module-setup.sh | 7 +++++++ - 2 files changed, 7 insertions(+), 11 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 176b2259..2090d89f 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1736,17 +1736,6 @@ fi - - if dracut_module_included "squash"; then - dinfo "*** Install squash loader ***" -- for config in \ -- CONFIG_SQUASHFS \ -- CONFIG_OVERLAY_FS \ -- CONFIG_DEVTMPFS; -- do -- if ! check_kernel_config $config; then -- dfatal "$config have to be enabled for dracut squash module to work" -- exit 1 -- fi -- done -- - readonly squash_dir="$initdir/squash/root" - readonly squash_img="$initdir/squash/root.img" - readonly squash_candidate=( "usr" "etc" ) -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 6307377c..e2fe3dd4 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -11,6 +11,13 @@ check() { - return 1 - fi - -+ for i in squashfs loop overlay; do -+ if ! check_kernel_module $i; then -+ derror "dracut-squash module requires kernel module $i" -+ return 1 -+ fi -+ done -+ - return 255 - } - - diff --git a/SOURCES/0159.patch b/SOURCES/0159.patch deleted file mode 100644 index 9a0f339..0000000 --- a/SOURCES/0159.patch +++ /dev/null @@ -1,35 +0,0 @@ -From be22f63f7d7c62d88edb5a24dccfff2774094773 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= -Date: Tue, 19 Jan 2021 15:17:05 +0100 -Subject: [PATCH] fix(99squash): use kernel config instead of modprobe to check - modules -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Zoltán Böszörményi -(cherry picked from commit 911c2de9c34a2e96be3973954d368d3a14eb6785) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index e2fe3dd4..d3680d63 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -11,9 +11,9 @@ check() { - return 1 - fi - -- for i in squashfs loop overlay; do -- if ! check_kernel_module $i; then -- derror "dracut-squash module requires kernel module $i" -+ for i in CONFIG_SQUASHFS CONFIG_BLK_DEV_LOOP CONFIG_OVERLAY_FS ; do -+ if ! check_kernel_config $i; then -+ derror "dracut-squash module requires kernel configuration $i (y or m)" - return 1 - fi - done - diff --git a/SOURCES/0160.patch b/SOURCES/0160.patch deleted file mode 100644 index 2498efa..0000000 --- a/SOURCES/0160.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3c9656769d33db55f6a9390a0f6d2c0be14d85c8 Mon Sep 17 00:00:00 2001 -From: Thierry Vignaud -Date: Fri, 30 Nov 2018 15:41:05 +0100 -Subject: [PATCH] kill bogus comment - -should have been killed in commit 4a855e6bebed956c108865823bcc131ebea2841a - -(cherry picked from commit a6bc200c28ac841edd12211c96dad8516095a68d) - -Resolves: #1959336 ---- - modules.d/05busybox/module-setup.sh | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh -index 14d401c2..ecbd6a13 100755 ---- a/modules.d/05busybox/module-setup.sh -+++ b/modules.d/05busybox/module-setup.sh -@@ -22,9 +22,6 @@ install() { - _progs="$_progs $_i" - done - -- # FIXME: switch_root should be in the above list, but busybox version hangs -- # (using busybox-1.15.1-7.fc14.i686 at the time of writing) -- - for _i in $_progs; do - _path=$(find_binary "$_i") - [ -z "$_path" ] && continue - diff --git a/SOURCES/0161.patch b/SOURCES/0161.patch deleted file mode 100644 index b0fb6eb..0000000 --- a/SOURCES/0161.patch +++ /dev/null @@ -1,42 +0,0 @@ -From c2f193cc422eac475bbc17261413c83ff13172d4 Mon Sep 17 00:00:00 2001 -From: Alexander Tsoy -Date: Mon, 25 May 2020 17:49:20 +0300 -Subject: [PATCH] busybox: simplify listing of supported utilities - -'--list' option is supported since busybox-1.20.0, which was released -in 2010. - -(cherry picked from commit 50cc23ba32b0fda63eff7623b529dbeb4e6a38c6) - -Resolves: #1959336 ---- - modules.d/05busybox/module-setup.sh | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh -index ecbd6a13..5d88c5d1 100755 ---- a/modules.d/05busybox/module-setup.sh -+++ b/modules.d/05busybox/module-setup.sh -@@ -14,15 +14,16 @@ depends() { - - # called by dracut - install() { -- local _i _progs _path _busybox -+ local _i _path _busybox -+ local _progs=() - _busybox=$(type -P busybox) - inst $_busybox /usr/bin/busybox -- for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}') -- do -- _progs="$_progs $_i" -+ for _i in $($_busybox --list); do -+ [[ ${_i} == busybox ]] && continue -+ _progs+=("${_i}") - done - -- for _i in $_progs; do -+ for _i in "${_progs[@]}"; do - _path=$(find_binary "$_i") - [ -z "$_path" ] && continue - ln_r /usr/bin/busybox $_path - diff --git a/SOURCES/0162.patch b/SOURCES/0162.patch deleted file mode 100644 index 34c62b5..0000000 --- a/SOURCES/0162.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 47bc3efe3e3d2b97b4a47e9380c061db0bc368c6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= -Date: Sun, 7 Feb 2021 15:01:49 +0100 -Subject: [PATCH] fix: use find_binary -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use find_binary instead of type -P because the former works if -dracutsysrootdir is set. - -Signed-off-by: Zoltán Böszörményi -(cherry picked from commit 433a9ec0147e578b91b4c6e20629a0dbeb9d0725) - -Resolves: #1959336 ---- - modules.d/00systemd/module-setup.sh | 4 ++-- - modules.d/02caps/module-setup.sh | 2 +- - modules.d/05busybox/module-setup.sh | 2 +- - modules.d/50gensplash/module-setup.sh | 2 +- - modules.d/50plymouth/module-setup.sh | 2 +- - modules.d/90lvm/module-setup.sh | 2 +- - modules.d/98syslog/module-setup.sh | 6 +++--- - modules.d/99memstrack/module-setup.sh | 2 +- - modules.d/99squash/module-setup.sh | 2 +- - 9 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 1f0b5dad..38c244a2 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -209,8 +209,8 @@ install() { - ln_r $systemdutildir/systemd "/sbin/init" - - inst_binary true -- ln_r $(type -P true) "/usr/bin/loginctl" -- ln_r $(type -P true) "/bin/loginctl" -+ ln_r $(find_binary true) "/usr/bin/loginctl" -+ ln_r $(find_binary true) "/bin/loginctl" - inst_rules \ - 70-uaccess.rules \ - 71-seat.rules \ -diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh -index fb16526a..d1ce6cdc 100755 ---- a/modules.d/02caps/module-setup.sh -+++ b/modules.d/02caps/module-setup.sh -@@ -15,7 +15,7 @@ depends() { - install() { - if ! dracut_module_included "systemd"; then - inst_hook pre-pivot 00 "$moddir/caps.sh" -- inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh -+ inst $(find_binary capsh 2>/dev/null) /usr/sbin/capsh - # capsh wants bash and we need bash also - inst /bin/bash - else -diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh -index 5d88c5d1..20b36c16 100755 ---- a/modules.d/05busybox/module-setup.sh -+++ b/modules.d/05busybox/module-setup.sh -@@ -16,7 +16,7 @@ depends() { - install() { - local _i _path _busybox - local _progs=() -- _busybox=$(type -P busybox) -+ _busybox=$(find_binary busybox) - inst $_busybox /usr/bin/busybox - for _i in $($_busybox --list); do - [[ ${_i} == busybox ]] && continue -diff --git a/modules.d/50gensplash/module-setup.sh b/modules.d/50gensplash/module-setup.sh -index d2fccc26..d0aa4a78 100755 ---- a/modules.d/50gensplash/module-setup.sh -+++ b/modules.d/50gensplash/module-setup.sh -@@ -40,7 +40,7 @@ install() { - return ${_ret} - } - -- type -P splash_geninitramfs >/dev/null || return 1 -+ find_binary splash_geninitramfs >/dev/null || return 1 - - _opts='' - if [[ ${DRACUT_GENSPLASH_THEME} ]]; then -diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh -index b51913e8..0568d21c 100755 ---- a/modules.d/50plymouth/module-setup.sh -+++ b/modules.d/50plymouth/module-setup.sh -@@ -2,7 +2,7 @@ - - pkglib_dir() { - local _dirs="/usr/lib/plymouth /usr/libexec/plymouth/" -- if type -P dpkg-architecture &>/dev/null; then -+ if find_binary dpkg-architecture &>/dev/null; then - _dirs+=" /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth" - fi - for _dir in $_dirs; do -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index 6ca4ee44..fffcbe31 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -119,7 +119,7 @@ install() { - - inst_libdir_file "libdevmapper-event-lvm*.so" - -- if [[ $hostonly ]] && type -P lvs &>/dev/null; then -+ if [[ $hostonly ]] && find_binary lvs &>/dev/null; then - for dev in "${!host_fs_types[@]}"; do - [ -e /sys/block/${dev#/dev/}/dm/name ] || continue - dev=$(/dev/null; then -+ if find_binary rsyslogd >/dev/null; then - _installs="rsyslogd" - inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so rsyslog/imjournal.so -- elif type -P syslogd >/dev/null; then -+ elif find_binary syslogd >/dev/null; then - _installs="syslogd" -- elif type -P syslog-ng >/dev/null; then -+ elif find_binary syslog-ng >/dev/null; then - _installs="syslog-ng" - else - derror "Could not find any syslog binary although the syslogmodule" \ -diff --git a/modules.d/99memstrack/module-setup.sh b/modules.d/99memstrack/module-setup.sh -index d5bacb4d..e156290c 100755 ---- a/modules.d/99memstrack/module-setup.sh -+++ b/modules.d/99memstrack/module-setup.sh -@@ -1,7 +1,7 @@ - #!/usr/bin/bash - - check() { -- if type -P memstrack >/dev/null; then -+ if find_binary memstrack >/dev/null; then - dinfo "memstrack is available" - return 0 - fi -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index d3680d63..b183daf7 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -6,7 +6,7 @@ check() { - return 1 - fi - -- if ! type -P mksquashfs >/dev/null || ! type -P unsquashfs >/dev/null ; then -+ if ! find_binary mksquashfs >/dev/null || ! find_binary unsquashfs >/dev/null ; then - derror "dracut-squash module requires squashfs-tools" - return 1 - fi - diff --git a/SOURCES/0163.patch b/SOURCES/0163.patch deleted file mode 100644 index 2c58882..0000000 --- a/SOURCES/0163.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1fd68d6bf5a8752eec83ac19e29df6832ba3c48f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 11 Feb 2021 09:10:42 +0100 -Subject: [PATCH] fix: shellcheck for modules.d/99squash/setup-squash.sh - -(cherry picked from commit 836e2ffac6695201e334c8ef13488e2492b58db0) - -Resolves: #1959336 ---- - modules.d/99squash/setup-squash.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99squash/setup-squash.sh b/modules.d/99squash/setup-squash.sh -index d0000b6f..253e6101 100755 ---- a/modules.d/99squash/setup-squash.sh -+++ b/modules.d/99squash/setup-squash.sh -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - PATH=/bin:/sbin - - SQUASH_IMG=/squash/root.img - diff --git a/SOURCES/0164.patch b/SOURCES/0164.patch deleted file mode 100644 index ff6ae35..0000000 --- a/SOURCES/0164.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1fd29d8550d7d1573b2d2a60b41d6a5f3ca5003f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 12 Feb 2021 13:26:14 +0100 -Subject: [PATCH] fix: shellcheck for modules.d/99squash/clear-squash.sh - -(cherry picked from commit 73f5cc7c3754f9561abe948b4b080a84b34c7d1a) - -Resolves: #1959336 ---- - modules.d/99squash/clear-squash.sh | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/modules.d/99squash/clear-squash.sh b/modules.d/99squash/clear-squash.sh -index 34cb4cf5..1d626f98 100755 ---- a/modules.d/99squash/clear-squash.sh -+++ b/modules.d/99squash/clear-squash.sh -@@ -1,9 +1,6 @@ --#!/bin/sh -+#!/bin/bash - SQUASH_MNT_REC=/squash/mounts --SQUASH_MNTS=( ) - --while read mnt; do -- SQUASH_MNTS+=( "$mnt" ) --done <<< "$(cat $SQUASH_MNT_REC)" -+mapfile -t SQUASH_MNTS < $SQUASH_MNT_REC - --umount --lazy -- ${SQUASH_MNTS[@]} -+umount --lazy -- "${SQUASH_MNTS[@]}" - diff --git a/SOURCES/0165.patch b/SOURCES/0165.patch deleted file mode 100644 index dacb119..0000000 --- a/SOURCES/0165.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0ebfdeafe3d2b023bd52704c6f7a8a2082379da5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 12 Feb 2021 13:26:14 +0100 -Subject: [PATCH] fix: shellcheck for modules.d/99squash/module-setup.sh - -(cherry picked from commit 6510ab3f9d6ce555435cf57b716702b5b7663772) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index b183daf7..5b2435cc 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -32,9 +32,9 @@ installkernel() { - - install() { - inst_multiple kmod modprobe mount mkdir ln echo -- inst $moddir/setup-squash.sh /squash/setup-squash.sh -- inst $moddir/clear-squash.sh /squash/clear-squash.sh -- inst $moddir/init.sh /squash/init.sh -+ inst "$moddir"/setup-squash.sh /squash/setup-squash.sh -+ inst "$moddir"/clear-squash.sh /squash/clear-squash.sh -+ inst "$moddir"/init.sh /squash/init.sh - - inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service" - systemctl -q --root "$initdir" add-wants initrd-switch-root.target squash-mnt-clear.service - diff --git a/SOURCES/0166.patch b/SOURCES/0166.patch deleted file mode 100644 index 9def8ba..0000000 --- a/SOURCES/0166.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 58e04fa657c09322feaa195d465514a850acfcb7 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Fri, 4 Dec 2020 15:37:27 +0800 -Subject: [PATCH] fix(squash): this module shouldn't depend on bash - -Any other shell should just work. - -(cherry picked from commit c552c99ef8e5251e35242e0a3c09eafcd917b31a) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 5b2435cc..ba9d52ff 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -22,7 +22,7 @@ check() { - } - - depends() { -- echo "bash systemd-initrd" -+ echo "systemd-initrd" - return 0 - } - - diff --git a/SOURCES/0167.patch b/SOURCES/0167.patch deleted file mode 100644 index e2b9f3a..0000000 --- a/SOURCES/0167.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 3b3dea36edc66300b84bb3887f8a5be971be959a Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 15 Feb 2021 22:22:08 +0800 -Subject: [PATCH] refactor(squash): move the post install scripts into the - module-setup.sh - -No function change, just move the post install code to 99squash to clean -up dracut.sh. - -(cherry picked from commit 95ea16aa606912b7cc8f9942481c8a889b640c15) - -Cherry-picked from: 95ea16aa -Resolves: #1959336 ---- - dracut.sh | 44 ++------------------------------- - modules.d/99squash/init.sh | 2 +- - modules.d/99squash/module-setup.sh | 50 +++++++++++++++++++++++++++++++++++--- - 3 files changed, 50 insertions(+), 46 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 2090d89f..669bc6ce 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1735,51 +1735,11 @@ if [[ $hostonly_cmdline == "yes" ]] ; then - fi - - if dracut_module_included "squash"; then -- dinfo "*** Install squash loader ***" - readonly squash_dir="$initdir/squash/root" - readonly squash_img="$initdir/squash/root.img" -- readonly squash_candidate=( "usr" "etc" ) -- -- mkdir -m 0755 -p $squash_dir -- for folder in "${squash_candidate[@]}"; do -- mv $initdir/$folder $squash_dir/$folder -- done -- -- # Move some files out side of the squash image, including: -- # - Files required to boot and mount the squashfs image -- # - Files need to be accessible without mounting the squash image -- # - Initramfs marker -- for file in \ -- $squash_dir/usr/lib/modules/*/modules.* \ -- $squash_dir/usr/lib/dracut/* \ -- $squash_dir/etc/initrd-release -- do -- [[ -d $file ]] && continue -- DRACUT_RESOLVE_DEPS=1 dracutsysrootdir=$squash_dir inst ${file#$squash_dir} -- rm $file -- done - -- mv $initdir/init $initdir/init.stock -- ln -s squash/init.sh $initdir/init -- -- # 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 -- -- # Remove duplicated files -- for folder in "${squash_candidate[@]}"; do -- 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 -+ dinfo "*** Install squash loader ***" -+ DRACUT_SQUASH_POST_INST=1 module_install "squash" - fi - - if [[ $kernel_only != yes ]]; then -diff --git a/modules.d/99squash/init.sh b/modules.d/99squash/init.sh -index bca49db5..d8b2cbba 100755 ---- a/modules.d/99squash/init.sh -+++ b/modules.d/99squash/init.sh -@@ -1,7 +1,7 @@ - #!/bin/sh - /squash/setup-squash.sh - --exec /init.stock -+exec /init.orig - - echo "Something went wrong when trying to start original init executable!" - exit 1 -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index ba9d52ff..0acf7c3a 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -30,11 +30,55 @@ installkernel() { - hostonly="" instmods -c squashfs loop overlay - } - --install() { -- inst_multiple kmod modprobe mount mkdir ln echo -+installpost() { -+ local squash_candidate=( "usr" "etc" ) -+ -+ # shellcheck disable=SC2174 -+ mkdir -m 0755 -p "$squash_dir" -+ for folder in "${squash_candidate[@]}"; do -+ mv "$initdir/$folder" "$squash_dir/$folder" -+ done -+ -+ # Move some files out side of the squash image, including: -+ # - Files required to boot and mount the squashfs image -+ # - Files need to be accessible without mounting the squash image -+ # - Initramfs marker -+ for file in \ -+ "$squash_dir"/usr/lib/modules/*/modules.* \ -+ "$squash_dir"/usr/lib/dracut/* \ -+ "$squash_dir"/etc/initrd-release -+ do -+ [[ -f $file ]] || continue -+ DRACUT_RESOLVE_DEPS=1 dracutsysrootdir="$squash_dir" inst "${file#$squash_dir}" -+ rm "$file" -+ done -+ -+ # Install required files for the squash image setup script. -+ hostonly="" instmods "loop" "squashfs" "overlay" -+ inst_multiple modprobe mount mkdir ln echo - inst "$moddir"/setup-squash.sh /squash/setup-squash.sh - inst "$moddir"/clear-squash.sh /squash/clear-squash.sh -- inst "$moddir"/init.sh /squash/init.sh -+ -+ mv "$initdir"/init "$initdir"/init.orig -+ inst "$moddir"/init.sh "$initdir"/init -+ -+ # Keep systemctl outsite if we need switch root -+ if [[ ! -f "$initdir/lib/dracut/no-switch-root" ]]; then -+ inst "systemctl" -+ fi -+ -+ # Remove duplicated files -+ for folder in "${squash_candidate[@]}"; do -+ find "$initdir/$folder/" -not -type d \ -+ -exec bash -c 'mv -f "$squash_dir${1#$initdir}" "$1"' -- "{}" \; -+ done -+} -+ -+install() { -+ if [[ $DRACUT_SQUASH_POST_INST ]]; then -+ installpost -+ return -+ fi - - inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service" - systemctl -q --root "$initdir" add-wants initrd-switch-root.target squash-mnt-clear.service - diff --git a/SOURCES/0168.patch b/SOURCES/0168.patch deleted file mode 100644 index dee04cb..0000000 --- a/SOURCES/0168.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4a0aa64ecdcaf47e17e27c59e6ea4efc19359c00 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 23 Jul 2021 16:24:51 +0200 -Subject: [PATCH] fix: revise squash module checks - -Based on 16efdfa25c65c31acc97d91b7baf4f7bb4ea8510 ---- - modules.d/99squash/module-setup.sh | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 0acf7c3a..dd4f3ecf 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -1,19 +1,11 @@ - #!/bin/bash - - check() { -- if ! dracut_module_included "systemd-initrd"; then -- derror "dracut-squash only supports systemd bases initramfs" -- return 1 -- fi -- -- if ! find_binary mksquashfs >/dev/null || ! find_binary unsquashfs >/dev/null ; then -- derror "dracut-squash module requires squashfs-tools" -- return 1 -- fi -+ require_binaries mksquashfs unsquashfs || return 1 - - for i in CONFIG_SQUASHFS CONFIG_BLK_DEV_LOOP CONFIG_OVERLAY_FS ; do - if ! check_kernel_config $i; then -- derror "dracut-squash module requires kernel configuration $i (y or m)" -+ dinfo "dracut-squash module requires kernel configuration $i (y or m)" - return 1 - fi - done - diff --git a/SOURCES/0169.patch b/SOURCES/0169.patch deleted file mode 100644 index 5bc4b8c..0000000 --- a/SOURCES/0169.patch +++ /dev/null @@ -1,52 +0,0 @@ -From ba8f0e0502d3cda2f4222745eebed37f45a4c5a1 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Thu, 11 Feb 2021 00:39:17 +0800 -Subject: [PATCH] fix(squash): post install should be the last step before - stripping - -Ensure dracut squash module doesn't effect other steps, and stripping -can cover the new binaries installed by it. - -(cherry picked from commit 8c8aecdc63c9389038e78ee712d4809e49add5e1) - -Cherry-picked from: 8c8aecdc -Resolves: #1959336 ---- - dracut.sh | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 669bc6ce..1168fc16 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1734,14 +1734,6 @@ if [[ $hostonly_cmdline == "yes" ]] ; then - fi - fi - --if dracut_module_included "squash"; then -- readonly squash_dir="$initdir/squash/root" -- readonly squash_img="$initdir/squash/root.img" -- -- dinfo "*** Install squash loader ***" -- DRACUT_SQUASH_POST_INST=1 module_install "squash" --fi -- - if [[ $kernel_only != yes ]]; then - # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so - for _dir in $libdirs; do -@@ -1764,6 +1756,14 @@ if [[ $kernel_only != yes ]]; then - fi - fi - -+if dracut_module_included "squash"; then -+ readonly squash_dir="$initdir/squash/root" -+ readonly squash_img="$initdir/squash/root.img" -+ -+ dinfo "*** Install squash loader ***" -+ DRACUT_SQUASH_POST_INST=1 module_install "squash" -+fi -+ - if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then - dinfo "*** Stripping files ***" - find "$initdir" -type f \ - diff --git a/SOURCES/0170.patch b/SOURCES/0170.patch deleted file mode 100644 index 8b70846..0000000 --- a/SOURCES/0170.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 8c31ef8476d302d11bbad81644e82872bd1e86f3 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 15 Feb 2021 22:52:47 +0800 -Subject: [PATCH] refactor(squash): move all setup code to init-squash.sh - -Seperate of init.sh and setup-squash.sh is pointless, merge them into one. - -(cherry picked from commit f9f4264d038816990aa0a830b31e31d2e8b84cad) - -Resolves: #1959336 ---- - modules.d/99squash/{setup-squash.sh => init-squash.sh} | 5 +++++ - modules.d/99squash/init.sh | 7 ------- - modules.d/99squash/module-setup.sh | 5 ++--- - 3 files changed, 7 insertions(+), 10 deletions(-) - -diff --git a/modules.d/99squash/setup-squash.sh b/modules.d/99squash/init-squash.sh -similarity index 93% -rename from modules.d/99squash/setup-squash.sh -rename to modules.d/99squash/init-squash.sh -index 253e6101..449585f0 100755 ---- a/modules.d/99squash/setup-squash.sh -+++ b/modules.d/99squash/init-squash.sh -@@ -59,3 +59,8 @@ for file in $SQUASH_MNT/*; do - - echo $mntdir >> $SQUASH_MNT_REC - done -+ -+exec /init.orig -+ -+echo "Something went wrong when trying to exec original init!" -+exit 1 -diff --git a/modules.d/99squash/init.sh b/modules.d/99squash/init.sh -deleted file mode 100755 -index d8b2cbba..00000000 ---- a/modules.d/99squash/init.sh -+++ /dev/null -@@ -1,7 +0,0 @@ --#!/bin/sh --/squash/setup-squash.sh -- --exec /init.orig -- --echo "Something went wrong when trying to start original init executable!" --exit 1 -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index dd4f3ecf..c0eb4acd 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -48,11 +48,10 @@ installpost() { - # Install required files for the squash image setup script. - hostonly="" instmods "loop" "squashfs" "overlay" - inst_multiple modprobe mount mkdir ln echo -- inst "$moddir"/setup-squash.sh /squash/setup-squash.sh -- inst "$moddir"/clear-squash.sh /squash/clear-squash.sh - - mv "$initdir"/init "$initdir"/init.orig -- inst "$moddir"/init.sh "$initdir"/init -+ inst "$moddir"/init-squash.sh /init -+ inst "$moddir"/clear-squash.sh /squash/clear-squash.sh - - # Keep systemctl outsite if we need switch root - if [[ ! -f "$initdir/lib/dracut/no-switch-root" ]]; then - diff --git a/SOURCES/0171.patch b/SOURCES/0171.patch deleted file mode 100644 index 33b19a8..0000000 --- a/SOURCES/0171.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 39d06b934fd4bec88b0945b5277407d7b5510c22 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 15 Feb 2021 22:58:20 +0800 -Subject: [PATCH] feat(squash): install and depmod modules seperately - -Separately install the modules required for squash image setup. -These modules can be deleted after squash image setup to save -memory. - -Signed-off-by: Kairui Song -(cherry picked from commit 5a18b24a8b9c20c98f711963ce5407ceb2f3d57b) - -Cherry-picked from: 5a18b24a8b9c20c98f711963ce5407ceb2f3d57b -Resolves: #1959336 ---- - modules.d/99squash/init-squash.sh | 3 +++ - modules.d/99squash/module-setup.sh | 12 +++++------- - 2 files changed, 8 insertions(+), 7 deletions(-) - -diff --git a/modules.d/99squash/init-squash.sh b/modules.d/99squash/init-squash.sh -index 449585f0..ecb6cc58 100755 ---- a/modules.d/99squash/init-squash.sh -+++ b/modules.d/99squash/init-squash.sh -@@ -34,6 +34,9 @@ if [ $? != 0 ]; then - echo "Unable to setup overlay module" - fi - -+# These modules are no longer needed, delete to save memory -+rm -rf /usr/lib/modules/ -+ - [ ! -d "$SQUASH_MNT" ] && \ - mkdir -m 0755 -p $SQUASH_MNT - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index c0eb4acd..ad619176 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -18,10 +18,6 @@ depends() { - return 0 - } - --installkernel() { -- hostonly="" instmods -c squashfs loop overlay --} -- - installpost() { - local squash_candidate=( "usr" "etc" ) - -@@ -36,7 +32,6 @@ installpost() { - # - Files need to be accessible without mounting the squash image - # - Initramfs marker - for file in \ -- "$squash_dir"/usr/lib/modules/*/modules.* \ - "$squash_dir"/usr/lib/dracut/* \ - "$squash_dir"/etc/initrd-release - do -@@ -46,8 +41,7 @@ installpost() { - done - - # Install required files for the squash image setup script. -- hostonly="" instmods "loop" "squashfs" "overlay" -- inst_multiple modprobe mount mkdir ln echo -+ inst_multiple modprobe mount mkdir ln echo rm - - mv "$initdir"/init "$initdir"/init.orig - inst "$moddir"/init-squash.sh /init -@@ -63,6 +57,10 @@ installpost() { - find "$initdir/$folder/" -not -type d \ - -exec bash -c 'mv -f "$squash_dir${1#$initdir}" "$1"' -- "{}" \; - done -+ -+ # Install required modules for the squash image init script. -+ hostonly="" instmods "loop" "squashfs" "overlay" -+ dracut_kernel_post - } - - install() { - diff --git a/SOURCES/0172.patch b/SOURCES/0172.patch deleted file mode 100644 index a3f9c5f..0000000 --- a/SOURCES/0172.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 122da496446405e60a6eb5b037af263b5fd14378 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 15 Feb 2021 23:05:08 +0800 -Subject: [PATCH] refactor(squash): don't record mount points in text file - -The squasn mount points are recorded in text file so later clean up -script can umount them, this is not needed, the mount points are fixed -so just detect the umount by hardcoded pattern. - -(cherry picked from commit bdd194bb8c0427921b87b4dce16c05e18e0c2fb0) - -Resolves: #1959336 ---- - modules.d/99squash/clear-squash.sh | 10 +++++----- - modules.d/99squash/init-squash.sh | 8 -------- - 2 files changed, 5 insertions(+), 13 deletions(-) - -diff --git a/modules.d/99squash/clear-squash.sh b/modules.d/99squash/clear-squash.sh -index 1d626f98..4f357817 100755 ---- a/modules.d/99squash/clear-squash.sh -+++ b/modules.d/99squash/clear-squash.sh -@@ -1,6 +1,6 @@ - #!/bin/bash --SQUASH_MNT_REC=/squash/mounts -- --mapfile -t SQUASH_MNTS < $SQUASH_MNT_REC -- --umount --lazy -- "${SQUASH_MNTS[@]}" -+mnt="/squash/root" -+for dir in jsquash/root/*; do -+ mnt="$mnt ${dir#$SQUASH_MNT}" -+done -+umount --lazy -- $mnt -diff --git a/modules.d/99squash/init-squash.sh b/modules.d/99squash/init-squash.sh -index ecb6cc58..fee0105e 100755 ---- a/modules.d/99squash/init-squash.sh -+++ b/modules.d/99squash/init-squash.sh -@@ -3,9 +3,6 @@ PATH=/bin:/sbin - - SQUASH_IMG=/squash/root.img - SQUASH_MNT=/squash/root --SQUASH_MNT_REC=/squash/mounts -- --echo $SQUASH_MNT > $SQUASH_MNT_REC - - # Following mount points are neccessary for mounting a squash image - -@@ -34,9 +31,6 @@ if [ $? != 0 ]; then - echo "Unable to setup overlay module" - fi - --# These modules are no longer needed, delete to save memory --rm -rf /usr/lib/modules/ -- - [ ! -d "$SQUASH_MNT" ] && \ - mkdir -m 0755 -p $SQUASH_MNT - -@@ -59,8 +53,6 @@ for file in $SQUASH_MNT/*; do - - mount -t overlay overlay -o\ - lowerdir=$lowerdir,upperdir=$upperdir,workdir=$workdir $mntdir -- -- echo $mntdir >> $SQUASH_MNT_REC - done - - exec /init.orig - diff --git a/SOURCES/0173.patch b/SOURCES/0173.patch deleted file mode 100644 index 769ef03..0000000 --- a/SOURCES/0173.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0c2ac6b7503661948ead031f745736e35fef2e3f Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 26 Dec 2018 17:38:02 +0800 -Subject: [PATCH] lsinitrd: list squash content as well - -When the initramfs is built with squash module enabled, the content -inside squash image will be invisible from the lsinitrd tool. This -commit make lsinitrd detect and list the content of the squash image as -well to avoid possible confusion. - -Signed-off-by: Kairui Song -(cherry picked from commit 1ff306a3964840fc548188a8aa4862143b347e8a) - -Resolves: #1959336 ---- - lsinitrd.sh | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index a2fa4d7a..0b42b9a4 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -160,6 +160,21 @@ list_files() - echo "========================================================================" - } - -+list_squash_content() -+{ -+ SQUASH_IMG="squash/root.img" -+ SQUASH_TMPFILE="$(mktemp -t --suffix=.root.sqsh lsinitrd.XXXXXX)" -+ trap "rm -f '$SQUASH_TMPFILE'" EXIT -+ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- \ -+ $SQUASH_IMG > "$SQUASH_TMPFILE" 2>/dev/null -+ if [[ -s $SQUASH_TMPFILE ]]; then -+ echo "Squashed content ($SQUASH_IMG):" -+ echo "========================================================================" -+ unsquashfs -ll "$SQUASH_TMPFILE" | tail -n +4 -+ echo "========================================================================" -+ fi -+} -+ - unpack_files() - { - if (( ${#filenames[@]} > 0 )); then -@@ -287,6 +302,7 @@ else - echo - list_modules - list_files -+ list_squash_content - fi - fi - - diff --git a/SOURCES/0174.patch b/SOURCES/0174.patch deleted file mode 100644 index a6f257b..0000000 --- a/SOURCES/0174.patch +++ /dev/null @@ -1,286 +0,0 @@ -From 5e4bc6e2d6b6829c45f4e25cce4d81661b798587 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 29 Jul 2021 15:16:39 +0200 -Subject: [PATCH] refactor(squash): structure in a cleaner way - -Simplify the squash mount layout. Instead of overlay on each top -directory (/etc, /usr), just mount and switch_root into the squash -image, with a overlay on top of it. - -Also install the binaries and setup scripts separately, so the squash -setup code and the squash image content is independent of each other, -all squash setup script and binaries can be deleted safely upon -switch_root. - -With this change, previous squash clean up service and other tricky -implementations are all gone. - -This commit depends on systemd commits from: -https://github.com/systemd/systemd/pull/18124 - -Previouly systemd doesn't recognize non-ramfs initramfs, now this is -doable with SYSTEMD_IN_INITRD=lenient - -Signed-off-by: Kairui Song -(cherry picked from commit 8f7c332e488f88e5845a3c7954af7934c2f1e37b) - -Cherry-picked from: 8f7c332e -Resolves: #1959336 ---- - dracut-initramfs-restore.sh | 4 +- - dracut.sh | 4 +- - lsinitrd.sh | 6 +-- - modules.d/99squash/clear-squash.sh | 6 --- - modules.d/99squash/init-squash.sh | 70 ++++++++--------------------- - modules.d/99squash/module-setup.sh | 56 ++++++++--------------- - modules.d/99squash/squash-mnt-clear.service | 17 ------- - 7 files changed, 44 insertions(+), 119 deletions(-) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index 67fc88fa..74a952c4 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -41,9 +41,9 @@ else - fi - - if [[ -d squash ]]; then -- unsquashfs -no-xattrs -f -d . squash/root.img >/dev/null -+ unsquashfs -no-xattrs -f -d . squash-root.img >/dev/null - if [ $? -ne 0 ]; then -- echo "Squash module is enabled for this initramfs but failed to unpack squash/root.img" >&2 -+ echo "Squash module is enabled for this initramfs but failed to unpack squash-root.img" >&2 - rm -f -- /run/initramfs/shutdown - exit 1 - fi -diff --git a/dracut.sh b/dracut.sh -index 1168fc16..b403f401 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1758,8 +1758,8 @@ fi - - if dracut_module_included "squash"; then - readonly squash_dir="$initdir/squash/root" -- readonly squash_img="$initdir/squash/root.img" -- -+ readonly squash_img="$initdir/squash-root.img" -+ mkdir -p "$squash_dir" - dinfo "*** Install squash loader ***" - DRACUT_SQUASH_POST_INST=1 module_install "squash" - fi -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 0b42b9a4..04ce9e8b 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -162,9 +162,9 @@ list_files() - - list_squash_content() - { -- SQUASH_IMG="squash/root.img" -- SQUASH_TMPFILE="$(mktemp -t --suffix=.root.sqsh lsinitrd.XXXXXX)" -- trap "rm -f '$SQUASH_TMPFILE'" EXIT -+ SQUASH_IMG="squash-root.img" -+ SQUASH_TMPFILE="$TMPDIR/initrd.root.sqsh" -+ - $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- \ - $SQUASH_IMG > "$SQUASH_TMPFILE" 2>/dev/null - if [[ -s $SQUASH_TMPFILE ]]; then -diff --git a/modules.d/99squash/clear-squash.sh b/modules.d/99squash/clear-squash.sh -deleted file mode 100755 -index 4f357817..00000000 ---- a/modules.d/99squash/clear-squash.sh -+++ /dev/null -@@ -1,6 +0,0 @@ --#!/bin/bash --mnt="/squash/root" --for dir in jsquash/root/*; do -- mnt="$mnt ${dir#$SQUASH_MNT}" --done --umount --lazy -- $mnt -diff --git a/modules.d/99squash/init-squash.sh b/modules.d/99squash/init-squash.sh -index fee0105e..3de6f819 100755 ---- a/modules.d/99squash/init-squash.sh -+++ b/modules.d/99squash/init-squash.sh -@@ -1,61 +1,29 @@ --#!/bin/bash -+#!/bin/sh - PATH=/bin:/sbin - --SQUASH_IMG=/squash/root.img --SQUASH_MNT=/squash/root -+# Basic mounts for mounting a squash image -+mkdir /proc /sys /dev /run -+mount -t proc -o nosuid,noexec,nodev proc /proc -+mount -t sysfs -o nosuid,noexec,nodev sysfs /sys -+mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev -+mount -t tmpfs -o mode=755,nodev,nosuid,strictatime tmpfs /run - --# Following mount points are neccessary for mounting a squash image -- --[ ! -d /proc/self ] && \ -- mount -t proc -o nosuid,noexec,nodev proc /proc -- --[ ! -d /sys/kernel ] && \ -- mount -t sysfs -o nosuid,noexec,nodev sysfs /sys -- --[ ! -e /dev/loop-control ] && \ -- mount -t devtmpfs -o mode=0755,noexec,nosuid,strictatime devtmpfs /dev -- --# Need a loop device backend, overlayfs, and squashfs module -+# Load required modules - modprobe loop --if [ $? != 0 ]; then -- echo "Unable to setup loop module" --fi -- - modprobe squashfs --if [ $? != 0 ]; then -- echo "Unable to setup squashfs module" --fi -- - modprobe overlay --if [ $? != 0 ]; then -- echo "Unable to setup overlay module" --fi -- --[ ! -d "$SQUASH_MNT" ] && \ -- mkdir -m 0755 -p $SQUASH_MNT -- --# Mount the squashfs image --mount -t squashfs -o ro,loop $SQUASH_IMG $SQUASH_MNT -- --if [ $? != 0 ]; then -- echo "Unable to mount squashed initramfs image" --fi -- --for file in $SQUASH_MNT/*; do -- file=${file#$SQUASH_MNT/} -- lowerdir=$SQUASH_MNT/$file -- workdir=/squash/overlay-work/$file -- upperdir=/$file -- mntdir=/$file - -- mkdir -m 0755 -p $workdir -- mkdir -m 0755 -p $mntdir -+# Mount the squash image -+mount -t ramfs ramfs /squash -+mkdir -p /squash/root /squash/overlay/upper /squash/overlay/work -+mount -t squashfs -o ro,loop /squash-root.img /squash/root - -- mount -t overlay overlay -o\ -- lowerdir=$lowerdir,upperdir=$upperdir,workdir=$workdir $mntdir --done -+# Setup new root overlay -+mkdir /newroot -+mount -t overlay overlay -o lowerdir=/squash/root,upperdir=/squash/overlay/upper,workdir=/squash/overlay/work/ /newroot/ - --exec /init.orig -+# Move all mount points to new root to prepare chroot -+mount --move /squash /newroot/squash - --echo "Something went wrong when trying to exec original init!" --exit 1 -+# Jump to new root and clean setup files -+SYSTEMD_IN_INITRD=lenient exec switch_root /newroot /init -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index ad619176..50c92c31 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -19,56 +19,36 @@ depends() { - } - - installpost() { -- local squash_candidate=( "usr" "etc" ) -- -- # shellcheck disable=SC2174 -- mkdir -m 0755 -p "$squash_dir" -- for folder in "${squash_candidate[@]}"; do -- mv "$initdir/$folder" "$squash_dir/$folder" -+ # Move everything under $initdir except $squash_dir -+ # itself into squash image -+ for i in "$initdir"/*; do -+ [[ "$squash_dir" == "$i"/* ]] || mv "$i" "$squash_dir"/ - done - -- # Move some files out side of the squash image, including: -- # - Files required to boot and mount the squashfs image -- # - Files need to be accessible without mounting the squash image -- # - Initramfs marker -- for file in \ -- "$squash_dir"/usr/lib/dracut/* \ -- "$squash_dir"/etc/initrd-release -- do -+ # Create mount points for squash loader -+ mkdir -p "$initdir"/squash/ -+ mkdir -p "$squash_dir"/squash/ -+ -+ # Copy dracut spec files out side of the squash image -+ # so dracut rebuild and lsinitrd can work -+ for file in "$squash_dir"/usr/lib/dracut/*; do - [[ -f $file ]] || continue - DRACUT_RESOLVE_DEPS=1 dracutsysrootdir="$squash_dir" inst "${file#$squash_dir}" -- rm "$file" -- done -- -- # Install required files for the squash image setup script. -- inst_multiple modprobe mount mkdir ln echo rm -- -- mv "$initdir"/init "$initdir"/init.orig -- inst "$moddir"/init-squash.sh /init -- inst "$moddir"/clear-squash.sh /squash/clear-squash.sh -- -- # Keep systemctl outsite if we need switch root -- if [[ ! -f "$initdir/lib/dracut/no-switch-root" ]]; then -- inst "systemctl" -- fi -- -- # Remove duplicated files -- for folder in "${squash_candidate[@]}"; do -- find "$initdir/$folder/" -not -type d \ -- -exec bash -c 'mv -f "$squash_dir${1#$initdir}" "$1"' -- "{}" \; - done - -- # Install required modules for the squash image init script. -+ # Install required modules and binaries for the squash image init script. -+ DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root - hostonly="" instmods "loop" "squashfs" "overlay" - dracut_kernel_post -+ -+ # Install squash image init script. -+ ln -sfn /usr/bin "$initdir/bin" -+ ln -sfn /usr/sbin "$initdir/sbin" -+ inst_simple "$moddir"/init-squash.sh /init - } - - install() { - if [[ $DRACUT_SQUASH_POST_INST ]]; then - installpost -- return - fi -- -- inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service" -- systemctl -q --root "$initdir" add-wants initrd-switch-root.target squash-mnt-clear.service - } -diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service -deleted file mode 100644 -index 84441f60..00000000 ---- a/modules.d/99squash/squash-mnt-clear.service -+++ /dev/null -@@ -1,17 +0,0 @@ --# This file is part of dracut. --# -- --[Unit] --Description=Cleanup squashfs mounts when switch root --DefaultDependencies=no --Before=initrd-switch-root.service --After=initrd-switch-root.target --ConditionPathExists=/squash/root -- --[Service] --Type=oneshot --RemainAfterExit=no --StandardInput=null --StandardOutput=syslog+console --StandardError=syslog+console --ExecStart=/squash/clear-squash.sh - diff --git a/SOURCES/0175.patch b/SOURCES/0175.patch deleted file mode 100644 index 0e5629d..0000000 --- a/SOURCES/0175.patch +++ /dev/null @@ -1,80 +0,0 @@ -From f462176a19f463861fea7a26af6288403785eb9b Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 15 Feb 2021 14:04:05 +0800 -Subject: [PATCH] feat(squash): use busybox for early setup if available - -Use busybox can help reduce the size of early setup environment. - -With this change, everything is packed in the squash image, and -the setup files will be dropped once squash image setup is done, -so initramfs stage memory usage is reduced to the minimun, -and initramfs decompress is also faster. - -File layout of a squash initramfs looks like this: - -======================================================================== -drwxr-xr-x 1 root root 0 Feb 15 14:07 . --rwxr-xr-x 1 root root 946 Feb 15 14:07 init -lrwxrwxrwx 1 root root 7 Feb 15 14:07 lib -> usr/lib -drwxr-xr-x 1 root root 0 Feb 15 14:07 squash --rw-r--r-- 1 root root 91000832 Feb 15 14:07 squash-root.img -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr/bin --rwxr-xr-x 1 root root 1293688 Jul 27 2020 usr/bin/busybox -lrwxrwxrwx 1 root root 7 Feb 15 14:07 usr/bin/echo -> busybox -lrwxrwxrwx 1 root root 7 Feb 15 14:07 usr/bin/mkdir -> busybox -lrwxrwxrwx 1 root root 7 Feb 15 14:07 usr/bin/modprobe -> busybox -lrwxrwxrwx 1 root root 7 Feb 15 14:07 usr/bin/mount -> busybox -lrwxrwxrwx 1 root root 7 Feb 15 14:07 usr/bin/sh -> busybox -lrwxrwxrwx 1 root root 7 Feb 15 14:07 usr/bin/switch_root -> busybox -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr/lib -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr/lib/dracut --rw-r--r-- 1 root root 23 Feb 15 14:07 usr/lib/dracut/build-parameter.txt --rw-r--r-- 1 root root 31 Feb 15 14:07 usr/lib/dracut/dracut-051-93.git20210215.fc33 --rw-r--r-- 1 root root 358 Feb 15 14:07 usr/lib/dracut/modules.txt --rw-r--r-- 1 root root 0 Feb 15 14:07 usr/lib/dracut/need-initqueue -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr/lib/modules -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr/lib/modules/5.10.11-200.fc33.x86_64 -drwxr-xr-x 1 root root 0 Feb 15 14:07 usr/lib/modules/5.10.11-200.fc33.x86_64/kernel -<... kernel module misc files skipped ... > -======================================================================== - -(cherry picked from commit 90f269f6afe409925bad86f0bd7e9322ad9b4fb0) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 50c92c31..72cc83ad 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -19,6 +19,9 @@ depends() { - } - - installpost() { -+ local _busybox -+ _busybox=$(find_binary busybox) -+ - # Move everything under $initdir except $squash_dir - # itself into squash image - for i in "$initdir"/*; do -@@ -37,7 +40,15 @@ installpost() { - done - - # Install required modules and binaries for the squash image init script. -- DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root -+ if [[ $_busybox ]]; then -+ inst "$_busybox" /usr/bin/busybox -+ for _i in sh echo mount modprobe mkdir switch_root; do -+ ln_r /usr/bin/busybox /usr/bin/$_i -+ done -+ else -+ DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root -+ fi -+ - hostonly="" instmods "loop" "squashfs" "overlay" - dracut_kernel_post - - diff --git a/SOURCES/0176.patch b/SOURCES/0176.patch deleted file mode 100644 index 64970bb..0000000 --- a/SOURCES/0176.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 0a2f7b1779ddcac1c4e79aa58212c7ee528ac6e1 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 15 Feb 2021 23:15:26 +0800 -Subject: [PATCH] feat: squash module follow --compress option - -Try to make mksquashfs follow --compress option if squash module is -included, if not specified or invalid, fall back to use mksquashfs's -default compressor. - -(cherry picked from commit 5d05ffbd87bc27e27f517ebc3454d50729c687e6) - -Cherry-picked from: 5d05ffbd -Resolves: #1959336 ---- - dracut.sh | 17 ++++++++++++++--- - 1 file changed, 14 insertions(+), 3 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index b403f401..d9a66c5a 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1781,14 +1781,25 @@ fi - - if dracut_module_included "squash"; then - dinfo "*** Squashing the files inside the initramfs ***" -- mksquashfs $squash_dir $squash_img -no-xattrs -no-exports -noappend -always-use-fragments -comp xz -Xdict-size 100% -no-progress 1> /dev/null -+ declare squash_compress_arg -+ # shellcheck disable=SC2086 -+ if [[ $compress ]]; then -+ if ! mksquashfs /dev/null "$DRACUT_TMPDIR"/.squash-test.img -no-progress -comp $compress &>/dev/null; then -+ dwarn "mksquashfs doesn't support compressor '$compress', failing back to default compressor." -+ else -+ squash_compress_arg="$compress" -+ fi -+ fi - -- if [[ $? != 0 ]]; then -+ # shellcheck disable=SC2086 -+ if ! mksquashfs "$squash_dir" "$squash_img" \ -+ -no-xattrs -no-exports -noappend -no-recovery -always-use-fragments \ -+ -no-progress ${squash_compress_arg:+-comp $squash_compress_arg} 1> /dev/null; then - dfatal "dracut: Failed making squash image" - exit 1 - fi - -- rm -rf $squash_dir -+ rm -rf "$squash_dir" - dinfo "*** Squashing the files inside the initramfs done ***" - fi - - diff --git a/SOURCES/0177.patch b/SOURCES/0177.patch deleted file mode 100644 index 03d1ba1..0000000 --- a/SOURCES/0177.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 878384403378526535a737acfdbf4154f7af5f50 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 1 Feb 2021 01:49:54 +0800 -Subject: [PATCH] perf: disable initrd compression when squash module is - enabled - -With squash module, the initramfs is double compressed, which slow down -the build progress and doesn't shrink the size much. - -(cherry picked from commit 7c0bc0b2fd167da42035020dae49af94844f053c) - -Resolves: #1959336 ---- - dracut.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index d9a66c5a..bf79568c 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1801,6 +1801,9 @@ if dracut_module_included "squash"; then - - rm -rf "$squash_dir" - dinfo "*** Squashing the files inside the initramfs done ***" -+ -+ # Skip initramfs compress -+ compress="cat" - fi - - dinfo "*** Creating image file '$outfile' ***" - diff --git a/SOURCES/0178.patch b/SOURCES/0178.patch deleted file mode 100644 index aac1f21..0000000 --- a/SOURCES/0178.patch +++ /dev/null @@ -1,16 +0,0 @@ -From 9795be398d697d9b5346f4e398b1a5511830546b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 26 Mar 2021 10:29:35 +0100 -Subject: [PATCH] fix(squash): shellcheck for modules.d/99squash - -(cherry picked from commit cbef7cf3dac79f014200017e9b13e012f2a53f47) - -Resolves: #1959336 ---- - modules.d/99squash/.shchkdir | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - -diff --git a/modules.d/99squash/.shchkdir b/modules.d/99squash/.shchkdir -new file mode 100644 -index 00000000..e69de29b - diff --git a/SOURCES/0179.patch b/SOURCES/0179.patch deleted file mode 100644 index f42df18..0000000 --- a/SOURCES/0179.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 3f7410e7f3c08866c84e01ccfb423d7cff4eb5a3 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Wed, 7 Apr 2021 02:11:41 +0800 -Subject: [PATCH] fix(squash): don't mount the mount points if already mounted - -It is possible that user setup some early mount in the rootfs even -earlier, so just be more robust and cover that case too. - -Signed-off-by: Kairui Song -(cherry picked from commit 636d6df3134dde1dac72241937724bc59deb9303) - -Resolves: #1959336 ---- - modules.d/99squash/init-squash.sh | 17 +++++++++++------ - modules.d/99squash/module-setup.sh | 4 ++-- - 2 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/modules.d/99squash/init-squash.sh b/modules.d/99squash/init-squash.sh -index 3de6f819..59769f62 100755 ---- a/modules.d/99squash/init-squash.sh -+++ b/modules.d/99squash/init-squash.sh -@@ -1,12 +1,17 @@ - #!/bin/sh - PATH=/bin:/sbin - --# Basic mounts for mounting a squash image --mkdir /proc /sys /dev /run --mount -t proc -o nosuid,noexec,nodev proc /proc --mount -t sysfs -o nosuid,noexec,nodev sysfs /sys --mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev --mount -t tmpfs -o mode=755,nodev,nosuid,strictatime tmpfs /run -+[ -e /proc/self/mounts ] \ -+ || (mkdir -p /proc && mount -t proc -o nosuid,noexec,nodev proc /proc) -+ -+grep -q '^sysfs /sys sysfs' /proc/self/mounts \ -+ || (mkdir -p /sys && mount -t sysfs -o nosuid,noexec,nodev sysfs /sys) -+ -+grep -q '^devtmpfs /dev devtmpfs' /proc/self/mounts \ -+ || (mkdir -p /dev && mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev) -+ -+grep -q '^tmpfs /run tmpfs' /proc/self/mounts \ -+ || (mkdir -p /run && mount -t tmpfs -o mode=755,noexec,nosuid,strictatime tmpfs /run) - - # Load required modules - modprobe loop -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 72cc83ad..81a5b3f7 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -42,11 +42,11 @@ installpost() { - # Install required modules and binaries for the squash image init script. - if [[ $_busybox ]]; then - inst "$_busybox" /usr/bin/busybox -- for _i in sh echo mount modprobe mkdir switch_root; do -+ for _i in sh echo mount modprobe mkdir switch_root grep; do - ln_r /usr/bin/busybox /usr/bin/$_i - done - else -- DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root -+ DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep - fi - - hostonly="" instmods "loop" "squashfs" "overlay" - diff --git a/SOURCES/0180.patch b/SOURCES/0180.patch deleted file mode 100644 index e2c03d9..0000000 --- a/SOURCES/0180.patch +++ /dev/null @@ -1,36 +0,0 @@ -From faadc1cbcd1ca35393b75f93757a89621957453c Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 22 Jun 2021 21:49:20 +0800 -Subject: [PATCH] feat(squash): install umount util - -Also install umount binary, make it possible to cleanup squash overlay -mounts. This is useful for other tools reusing the dracut initramfs built -with squash module enabled. - -Signed-off-by: Kairui Song -(cherry picked from commit 563f543424c66bf38e6cbd3f489655d45ad9b5c5) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 81a5b3f7..9bb30b2e 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -42,11 +42,11 @@ installpost() { - # Install required modules and binaries for the squash image init script. - if [[ $_busybox ]]; then - inst "$_busybox" /usr/bin/busybox -- for _i in sh echo mount modprobe mkdir switch_root grep; do -+ for _i in sh echo mount modprobe mkdir switch_root grep umount; do - ln_r /usr/bin/busybox /usr/bin/$_i - done - else -- DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep -+ DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep umount - fi - - hostonly="" instmods "loop" "squashfs" "overlay" - diff --git a/SOURCES/0181.patch b/SOURCES/0181.patch deleted file mode 100644 index 300b387..0000000 --- a/SOURCES/0181.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 487d2686a78cfa52419b330fa2b62af715c4356b Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Thu, 10 Jun 2021 16:45:03 +0800 -Subject: [PATCH] fix(squash): create relative symlinks - -Don't use absolute path, or it may resolve to wrong files after unpack -the initramfs to a sub path on a running system. - -Signed-off-by: Kairui Song -(cherry picked from commit a2b6be44792b68218e3378a7d844b0f8527a4805) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 9bb30b2e..8c9982c0 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -53,8 +53,8 @@ installpost() { - dracut_kernel_post - - # Install squash image init script. -- ln -sfn /usr/bin "$initdir/bin" -- ln -sfn /usr/sbin "$initdir/sbin" -+ ln_r /usr/bin /bin -+ ln_r /usr/sbin /sbin - inst_simple "$moddir"/init-squash.sh /init - } - - diff --git a/SOURCES/0182.patch b/SOURCES/0182.patch deleted file mode 100644 index 87de433..0000000 --- a/SOURCES/0182.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f0f83da2c608202205f1092289a64de044ecc130 Mon Sep 17 00:00:00 2001 -From: Hari Bathini -Date: Fri, 11 Jun 2021 15:20:28 +0530 -Subject: [PATCH] fix(dracut.sh): handle '-i' option to include files beginning - with '.' -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -While including a directory using '--include' option, the file and -subdirectory names that begin with '.' are not included. Also, dracut -throws a warning message when a subdirectory is empty or only has -files or subdirectories that begin with '.'. - -For example, while trying to include /tmpdata directory with the -below tree: - - # tree -a /tmpdata - /tmpdata - ├── .anothertestdir - ├── testdir - │   └── .testsubdir - └── .testfile - -dracut throws the below warning message: - - # dracut --include /tmpdata /root - cp: cannot stat '/tmpdata/testdir/*': No such file or directory - # - -and this is how the included /tmpdata directory tree looks: - - # tree -a root - root - └── testdir - -No file or directory beginning with '.' is included & also, copying -/tmpdata/testdir reported "No such file or directory" warning. Using -'.' instead of '*' in the below command will fix the warning whether -the directory being copied is empty or only has files or directories -that begin with dot: - - $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/* - -Also, enable 'dotglob' temporarily to include files and directories -beginning with a `.' in the results of pathname expansion of source -directory being included. - -Signed-off-by: Hari Bathini -(cherry picked from commit f1138012c9dc44e6614466c0a8e929fc55e4a5dd) - -Cherry-picked from: f1138012 -Resolves: #1959336 ---- - dracut.sh | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index bf79568c..3fd31e21 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1606,6 +1606,8 @@ for ((i=0; i < ${#include_src[@]}; i++)); do - # check for preexisting symlinks, so we can cope with the - # symlinks to $prefix - # Objectname is a file or a directory -+ reset_dotglob="$(shopt -p dotglob)" -+ shopt -q -s dotglob - for objectname in "$src"/*; do - [[ -e "$objectname" || -h "$objectname" ]] || continue - if [[ -d "$objectname" ]]; then -@@ -1615,11 +1617,12 @@ for ((i=0; i < ${#include_src[@]}; i++)); do - mkdir -m 0755 -p "$object_destdir" - chmod --reference="$objectname" "$object_destdir" - fi -- $DRACUT_CP -t "$object_destdir" "$objectname"/* -+ $DRACUT_CP -t "$object_destdir" "$objectname"/. - else - $DRACUT_CP -t "$destdir" "$objectname" - fi - done -+ eval "$reset_dotglob" - fi - fi - done - diff --git a/SOURCES/0183.patch b/SOURCES/0183.patch deleted file mode 100644 index fcfb083..0000000 --- a/SOURCES/0183.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9fdbd56ecef7498d2d61fc7123b958add945f46b Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Sat, 12 Jun 2021 02:25:09 +0800 -Subject: [PATCH] fix(dracut.sh): handle symlinks appropriately while using - '-i' option - -[[ -d $symlink ]] will return true if the symlink points to a directory. -So the symlink will not be copied, instead a directory is created with -the symlink name and the content is copied. - -Signed-off-by: Kairui Song -(cherry picked from commit c7fbc0c8901917baf0d1f0822568e65c6ec00d18) - -Cherry-picked from: c7fbc0c8 -Resolves: #1959336 ---- - dracut.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 3fd31e21..fa14e3ce 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1609,8 +1609,8 @@ for ((i=0; i < ${#include_src[@]}; i++)); do - reset_dotglob="$(shopt -p dotglob)" - shopt -q -s dotglob - for objectname in "$src"/*; do -- [[ -e "$objectname" || -h "$objectname" ]] || continue -- if [[ -d "$objectname" ]]; then -+ [[ -e $objectname || -L $objectname ]] || continue -+ if [[ -d $objectname ]] && [[ ! -L $objectname ]]; then - # objectname is a directory, let's compute the final directory name - object_destdir=${destdir}/${objectname#$src/} - if ! [[ -e "$object_destdir" ]]; then - diff --git a/SOURCES/0184.patch b/SOURCES/0184.patch deleted file mode 100644 index 5fc34d5..0000000 --- a/SOURCES/0184.patch +++ /dev/null @@ -1,76 +0,0 @@ -From c6d8832f86bc2ef7fbab6f703479816dd6078902 Mon Sep 17 00:00:00 2001 -From: Pingfan Liu -Date: Fri, 9 Jul 2021 11:55:16 +0800 -Subject: [PATCH] fix(squash): keep ld cache under initdir - -When running kdump on PowerPC, the following bug is hit: -[ 0.391629] Freeing unused kernel memory: 5568K -[ 0.391634] This architecture does not have kernel memory protection. -/bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory -[ 0.392214] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 -[ 0.392214] -[ 0.392223] CPU: 6 PID: 1 Comm: init Not tainted 4.18.0-319.el8.ppc64le #1 -[ 0.392228] Call Trace: -[ 0.392234] [c00000000c703c10] [c000000008ecb94c] dump_stack+0xb0/0xf4 (unreliable) -[ 0.392243] [c00000000c703c50] [c000000008167324] panic+0x148/0x3c4 -[ 0.392249] [c00000000c703cf0] [c000000008170474] do_exit+0xcd4/0xd40 -[ 0.392255] [c00000000c703dc0] [c0000000081705b0] do_group_exit+0x60/0x110 -[ 0.392261] [c00000000c703e00] [c000000008170684] sys_exit_group+0x24/0x30 -[ 0.392268] [c00000000c703e20] [c00000000800b408] system_call+0x5c/0x70 - -This is due to the non-conventional library path: -ldd /bin/bash - linux-vdso64.so.1 (0x00007fffbdc90000) - libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007fffbda80000) - libdl.so.2 => /lib64/libdl.so.2 (0x00007fffbda50000) - libc.so.6 => /lib64/glibc-hwcaps/power9/libc-2.28.so (0x00007fffbd830000) - ^^^ - /lib64/ld64.so.2 (0x00007fffbdcb0000) - -ldd finds the path by libc.so.6 -> /usr/lib64/libc.so.6 -> -/usr/lib64/glibc-hwcaps/power9/libc-2.28.so and cache the result. So -when dracut_install, it only saw -'/usr/lib64/glibc-hwcaps/power9/libc-2.28.so' and blind to -'/usr/lib64/libc.so.6' - -In the final kdumpimg, the symlink /usr/lib64/libc.so.6 is not created, -hence ld.so can not find the /usr/lib64/glibc-hwcaps/power9/libc-2.28.so - -On the other hand, during the process of building kdumpimg, all of dynamic library info -have been cached in ld.so.cache. Hence this bug can be simplely resolved -by keeping ld cache under $initdir/etc. - -Signed-off-by: Pingfan Liu ---- -v3 -> v4: - use inst() instead of copy -v2 -> v3: - fix format by shfmt -s -w modules.d/99squash/module-setup.sh -v1 -> v2: - cp -r /etc/ld.so* instead of move, since after switch-root, initdir -can not be seen any longer - -(cherry picked from commit dc21638c3f0acbb54417f3bfb6294ad5514bf2db) - -Resolves: #1959336 ---- - modules.d/99squash/module-setup.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 8c9982c0..14790ce8 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -28,6 +28,11 @@ installpost() { - [[ "$squash_dir" == "$i"/* ]] || mv "$i" "$squash_dir"/ - done - -+ # initdir also needs ld.so.* to make ld.so work -+ inst /etc/ld.so.cache -+ inst /etc/ld.so.conf -+ inst_dir /etc/ld.so.conf.d/ -+ - # Create mount points for squash loader - mkdir -p "$initdir"/squash/ - mkdir -p "$squash_dir"/squash/ - diff --git a/SOURCES/0185.patch b/SOURCES/0185.patch deleted file mode 100644 index 589d702..0000000 --- a/SOURCES/0185.patch +++ /dev/null @@ -1,67 +0,0 @@ -From bc6b4ffd4e7babd34e207c2aa8bed7f0fd8bafcf Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Mon, 2 Aug 2021 12:42:09 +0200 -Subject: [PATCH] dracut-functions: backport block_is_* functions - -Based on 480aa9695f8c2e2b30c8f41ae8483140020d23db -RHEL-only - -Related: #1959336 ---- - dracut-functions.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 44 insertions(+) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index d75696fd..14e60a9c 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -718,3 +718,47 @@ btrfs_devs() { - printf -- "%s\n" "$_dev" - done - } -+ -+# block_is_nbd -+# Check whether $1 is an nbd device -+block_is_nbd() { -+ [[ -b /dev/block/$1 && $1 == 43:* ]] -+} -+ -+# block_is_iscsi -+# Check whether $1 is an nbd device -+block_is_iscsi() { -+ local _dir -+ local _dev=$1 -+ [[ -L "/sys/dev/block/$_dev" ]] || return -+ _dir="$(readlink -f "/sys/dev/block/$_dev")" || return -+ until [[ -d "$_dir/sys" || -d "$_dir/iscsi_session" ]]; do -+ _dir="$_dir/.." -+ done -+ [[ -d "$_dir/iscsi_session" ]] -+} -+ -+# block_is_fcoe -+# Check whether $1 is an FCoE device -+# Will not work for HBAs that hide the ethernet aspect -+# completely and present a pure FC device -+block_is_fcoe() { -+ local _dir -+ local _dev=$1 -+ [[ -L "/sys/dev/block/$_dev" ]] || return -+ _dir="$(readlink -f "/sys/dev/block/$_dev")" -+ until [[ -d "$_dir/sys" ]]; do -+ _dir="$_dir/.." -+ if [[ -d "$_dir/subsystem" ]]; then -+ subsystem=$(basename $(readlink $_dir/subsystem)) -+ [[ $subsystem == "fcoe" ]] && return 0 -+ fi -+ done -+ return 1 -+} -+ -+# block_is_netdevice -+# Check whether $1 is a net device -+block_is_netdevice() { -+ block_is_nbd "$1" || block_is_iscsi "$1" || block_is_fcoe "$1" -+} -\ No newline at end of file - diff --git a/SOURCES/0186.patch b/SOURCES/0186.patch deleted file mode 100644 index 7129181..0000000 --- a/SOURCES/0186.patch +++ /dev/null @@ -1,143 +0,0 @@ -From f24f363eb329f8ce4b2435fb5d14786c104dec99 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 2 Aug 2021 13:33:18 +0200 -Subject: [PATCH] fix(squash): fixes related to squash module rebase - -fix fro missing dracutsysrootdir -move the $compress args parsing to later part after mksquashfs, so mksquashfs can use $compress as the original parameter value - -Related:#1959336 ---- - dracut.sh | 94 +++++++++++++++++++------------------- - modules.d/99squash/module-setup.sh | 3 +- - 2 files changed, 49 insertions(+), 48 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index fa14e3ce..e559bb96 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -825,53 +825,6 @@ if [[ $_no_compress_l = "cat" ]]; then - compress="cat" - fi - --if ! [[ $compress ]]; then -- # check all known compressors, if none specified -- for i in pigz gzip lz4 lzop zstd lzma xz lbzip2 bzip2 cat; do -- command -v "$i" &>/dev/null || continue -- compress="$i" -- break -- done -- if [[ $compress = cat ]]; then -- printf "%s\n" "dracut: no compression tool available. Initramfs image is going to be big." >&2 -- fi --fi -- --# choose the right arguments for the compressor --case $compress in -- bzip2|lbzip2) -- if [[ "$compress" = lbzip2 ]] || command -v lbzip2 &>/dev/null; then -- compress="lbzip2 -9" -- else -- compress="bzip2 -9" -- fi -- ;; -- lzma) -- compress="lzma -9 -T0" -- ;; -- xz) -- compress="xz --check=crc32 --lzma2=dict=1MiB -T0" -- ;; -- gzip|pigz) -- if [[ "$compress" = pigz ]] || command -v pigz &>/dev/null; then -- compress="pigz -9 -n -T -R" -- elif command -v gzip &>/dev/null && gzip --help 2>&1 | grep -q rsyncable; then -- compress="gzip -n -9 --rsyncable" -- else -- compress="gzip -n -9" -- fi -- ;; -- lzo|lzop) -- compress="lzop -9" -- ;; -- lz4) -- compress="lz4 -l -9" -- ;; -- zstd) -- compress="zstd -15 -q -T0" -- ;; --esac -- - [[ $hostonly = yes ]] && hostonly="-h" - [[ $hostonly != "-h" ]] && unset hostonly - -@@ -1848,6 +1801,53 @@ if [[ $create_early_cpio = yes ]]; then - fi - fi - -+if ! [[ $compress ]]; then -+ # check all known compressors, if none specified -+ for i in pigz gzip lz4 lzop zstd lzma xz lbzip2 bzip2 cat; do -+ command -v "$i" &>/dev/null || continue -+ compress="$i" -+ break -+ done -+ if [[ $compress = cat ]]; then -+ printf "%s\n" "dracut: no compression tool available. Initramfs image is going to be big." >&2 -+ fi -+fi -+ -+# choose the right arguments for the compressor -+case $compress in -+ bzip2|lbzip2) -+ if [[ "$compress" = lbzip2 ]] || command -v lbzip2 &>/dev/null; then -+ compress="lbzip2 -9" -+ else -+ compress="bzip2 -9" -+ fi -+ ;; -+ lzma) -+ compress="lzma -9 -T0" -+ ;; -+ xz) -+ compress="xz --check=crc32 --lzma2=dict=1MiB -T0" -+ ;; -+ gzip|pigz) -+ if [[ "$compress" = pigz ]] || command -v pigz &>/dev/null; then -+ compress="pigz -9 -n -T -R" -+ elif command -v gzip &>/dev/null && gzip --help 2>&1 | grep -q rsyncable; then -+ compress="gzip -n -9 --rsyncable" -+ else -+ compress="gzip -n -9" -+ fi -+ ;; -+ lzo|lzop) -+ compress="lzop -9" -+ ;; -+ lz4) -+ compress="lz4 -l -9" -+ ;; -+ zstd) -+ compress="zstd -15 -q -T0" -+ ;; -+esac -+ - if ! ( - umask 077; cd "$initdir" - find . -print0 | sort -z \ -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 14790ce8..11964b97 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -39,9 +39,10 @@ installpost() { - - # Copy dracut spec files out side of the squash image - # so dracut rebuild and lsinitrd can work -+ mkdir -p "$initdir/usr/lib/dracut/" - for file in "$squash_dir"/usr/lib/dracut/*; do - [[ -f $file ]] || continue -- DRACUT_RESOLVE_DEPS=1 dracutsysrootdir="$squash_dir" inst "${file#$squash_dir}" -+ cp "$file" "$initdir/${file#$squash_dir}" - done - - # Install required modules and binaries for the squash image init script. - diff --git a/SOURCES/0187.patch b/SOURCES/0187.patch deleted file mode 100644 index dd18f9a..0000000 --- a/SOURCES/0187.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 094514ae8383e03d95869a98ba8858ad74da1f0d Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Fri, 30 Jul 2021 21:54:11 +0800 -Subject: [PATCH] fix(squash): remove tailing '/' when installing ld.so.conf.d - -This tailing '/' will result in following error: - -dracut-install: ERROR: installing '/etc/ld.so.conf.d/' -dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.kEFQLs/initramfs -d /etc/ld.so.conf.d/ - -Signed-off-by: Kairui Song - -Related:#1959336 ---- - modules.d/99squash/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 11964b97..7f5d365a 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -31,7 +31,7 @@ installpost() { - # initdir also needs ld.so.* to make ld.so work - inst /etc/ld.so.cache - inst /etc/ld.so.conf -- inst_dir /etc/ld.so.conf.d/ -+ inst_dir /etc/ld.so.conf.d - - # Create mount points for squash loader - mkdir -p "$initdir"/squash/ - diff --git a/SOURCES/0188.patch b/SOURCES/0188.patch deleted file mode 100644 index a418a83..0000000 --- a/SOURCES/0188.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 090aa276b8d4b5041472743ea7472a3a1d398a92 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Tue, 10 Aug 2021 17:37:08 +0800 -Subject: [PATCH] fix(lsinitrd): TMP_DIR doesn't exist in RHEL8 - -lsinitrd should create a seperate temp file for extracting squash image -when squash module is enabled. - -Signed-off-by: Kairui Song -(cherry picked from commit 52fcd3373f0cf715b3744f832643dc3170aefbf5) - -Resolves: #1991647 ---- - lsinitrd.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 04ce9e8b..85981e58 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -163,8 +163,8 @@ list_files() - list_squash_content() - { - SQUASH_IMG="squash-root.img" -- SQUASH_TMPFILE="$TMPDIR/initrd.root.sqsh" -- -+ SQUASH_TMPFILE="$(mktemp -t --suffix=.root.sqsh lsinitrd.XXXXXX)" -+ trap "rm -f '$SQUASH_TMPFILE'" EXIT - $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- \ - $SQUASH_IMG > "$SQUASH_TMPFILE" 2>/dev/null - if [[ -s $SQUASH_TMPFILE ]]; then - diff --git a/SOURCES/0189.patch b/SOURCES/0189.patch deleted file mode 100644 index 698c67b..0000000 --- a/SOURCES/0189.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 2ee3efdfa0c7f12c2f8446721937bfe713858854 Mon Sep 17 00:00:00 2001 -From: Kairui Song -Date: Mon, 9 Aug 2021 18:23:43 +0800 -Subject: [PATCH] fix(squash): apply FIPS and libpthread workaround - -There are some workarounds in dracut.sh for FIPS/libpthread covering -some hidden lib dependency issues. These workarounds didn't take effect -for the squash loader since the squash loader is installed -independently. So apply these workarounds again. - -Also skip the lib detection code, since these extra installed libs -are small, and squash loader contents are dropped after switch root, -won't be an issue to be always installed. And this makes the code -cleaner. - -Signed-off-by: Kairui Song -(cherry picked from commit 5ab18dee996f0eeb2b0bfe354570e1b1af46d025) - -Resolves: #1990847 ---- - modules.d/99squash/module-setup.sh | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index 7f5d365a..e73d3184 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -53,6 +53,12 @@ installpost() { - done - else - DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep umount -+ -+ # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so -+ inst_libdir_file -o "libgcc_s.so*" -+ -+ # FIPS workaround for Fedora/RHEL: libcrypto needs libssl when FIPS is enabled -+ [[ $DRACUT_FIPS_MODE ]] && inst_libdir_file -o "libssl.so*" - fi - - hostonly="" instmods "loop" "squashfs" "overlay" - diff --git a/SOURCES/0190.patch b/SOURCES/0190.patch deleted file mode 100644 index 395305c..0000000 --- a/SOURCES/0190.patch +++ /dev/null @@ -1,59 +0,0 @@ -From e6cb22f2d12dfe61abf32389fa7d8927105081e2 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Mon, 30 Aug 2021 10:02:22 +0200 -Subject: [PATCH] fix(install): extend hwcaps library handling to libraries - under glibc-hwcaps/ - -(cherry picked from commit 10ed204f873f454dcd15ffcc82dc3a1c781c1514) - -Resolves: #1983030 ---- - install/dracut-install.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index baf6dcff..4962316d 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -335,8 +335,8 @@ static int cp(const char *src, const char *dst) - static int library_install(const char *src, const char *lib) - { - _cleanup_free_ char *p = NULL; -- _cleanup_free_ char *pdir = NULL, *ppdir = NULL, *clib = NULL; -- char *q; -+ _cleanup_free_ char *pdir = NULL, *ppdir = NULL, *pppdir = NULL, *clib = NULL; -+ char *q, *clibdir; - int r, ret = 0; - - p = strdup(lib); -@@ -358,7 +358,8 @@ static int library_install(const char *src, const char *lib) - log_debug("Lib install: '%s'", p); - } - -- /* Also try to install the same library from one directory above. -+ /* Also try to install the same library from one directory above -+ * or from one directory above glibc-hwcaps. - This fixes the case, where only the HWCAP lib would be installed - # ldconfig -p|grep -F libc.so - libc.so.6 (libc6,64bit, hwcap: 0x0000001000000000, OS ABI: Linux 2.6.32) => /lib64/power6/libc.so.6 -@@ -379,10 +380,18 @@ static int library_install(const char *src, const char *lib) - return ret; - - ppdir = strdup(ppdir); -+ pppdir = dirname(ppdir); -+ if (!pppdir) -+ return ret; -+ -+ pppdir = strdup(pppdir); -+ if (!pppdir) -+ return ret; - - strcpy(p, lib); - -- clib = strjoin(ppdir, "/", basename(p), NULL); -+ clibdir = streq(basename(ppdir), "glibc-hwcaps") ? pppdir : ppdir; -+ clib = strjoin(clibdir, "/", basename(p), NULL); - if (dracut_install(clib, clib, false, false, true) == 0) - log_debug("Lib install: '%s'", clib); - /* also install lib.so for lib.so.* files */ - diff --git a/SOURCES/0191.patch b/SOURCES/0191.patch deleted file mode 100644 index 2368589..0000000 --- a/SOURCES/0191.patch +++ /dev/null @@ -1,243 +0,0 @@ -From e2c7b61f97465b26c598d655c8717403c0a73726 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Sat, 13 Nov 2021 16:35:23 +0100 -Subject: [PATCH] ci: introduce C8S based GHA CI - -Loosely based on the upstream dracut CI to make things simpler. - -rhel-only ---- - .github/workflows/container.yml | 52 +++++++++++++++++++++++++++++ - .github/workflows/integration.yml | 48 +++++++++++++++++++++++++++ - test/container/Dockerfile-CentOS-8-Stream | 54 +++++++++++++++++++++++++++++++ - tools/test-github.sh | 49 ++++++++++++++++++++++++++++ - 4 files changed, 203 insertions(+) - -diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml -new file mode 100644 -index 00000000..0a4c000f ---- /dev/null -+++ b/.github/workflows/container.yml -@@ -0,0 +1,52 @@ -+name: Container -+on: -+ schedule: -+ - cron: '30 11 * * *' -+ push: -+ branches: [ main ] -+ paths: -+ - 'test/container/**' -+ - '.github/workflows/container.yml' -+ pull_request: -+ branches: [ main ] -+ paths: -+ - 'test/container/**' -+ - '.github/workflows/container.yml' -+ -+permissions: -+ packages: write -+ contents: read -+ -+jobs: -+ push_to_registry: -+ name: Build and push containers image to GitHub Packages -+ runs-on: ubuntu-latest -+ concurrency: -+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.config.dockerfile }} -+ cancel-in-progress: true -+ strategy: -+ fail-fast: false -+ matrix: -+ config: -+ # Use a prefixed image name to not conflict with the "centos" -+ # image from redhat-plumbers/dracut-rhel9 -+ - { dockerfile: 'Dockerfile-CentOS-8-Stream', tag: 'rhel8_centos:stream8' } -+ steps: -+ - name: Check out the repo -+ uses: actions/checkout@v2 -+ - name: Set up Docker Buildx -+ uses: docker/setup-buildx-action@v1 -+# with: -+# buildkitd-flags: --debug -+ - name: Login to GitHub Container Registry -+ uses: docker/login-action@v1 -+ with: -+ registry: ghcr.io -+ username: ${{ github.repository_owner }} -+ password: ${{ secrets.GITHUB_TOKEN }} -+ - name: Build and Push Container -+ uses: docker/build-push-action@v2 -+ with: -+ file: test/container/${{ matrix.config.dockerfile }} -+ tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.config.tag }} -+ push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} -diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml -new file mode 100644 -index 00000000..80a856a2 ---- /dev/null -+++ b/.github/workflows/integration.yml -@@ -0,0 +1,48 @@ -+name: Integration Test -+ -+on: -+ pull_request: -+ branches: [ main ] -+ -+jobs: -+ centos-8-stream: -+ runs-on: ubuntu-latest -+ timeout-minutes: 45 -+ concurrency: -+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} -+ cancel-in-progress: true -+ strategy: -+ matrix: -+ container: [ -+ "rhel8_centos:stream8", -+ ] -+ # Disabled tests (due to dropped packages in RHEL/CentOS): -+ # 03, 04, 15: requires btrfs -+ # 14: requires dmraid -+ # 30, 31, 35, 36: requires scsi-target-utils -+ test: [ -+ "01", -+ "02", -+ "10", -+ "11", -+ "12", -+ "13", -+ "17", -+ "20", -+ #"21", needs backport (NFS + NM) -+ "40", -+ #"41", needws backport (NBD + NM) -+ "98", -+ ] -+ fail-fast: false -+ container: -+ image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }} -+ options: "--privileged -v /dev:/dev" -+ steps: -+ - name: "Checkout Repository" -+ uses: actions/checkout@v2 -+ with: -+ fetch-depth: 0 -+ -+ - name: "${{ matrix.container }} TEST-${{ matrix.test }}" -+ run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }} -diff --git a/test/container/Dockerfile-CentOS-8-Stream b/test/container/Dockerfile-CentOS-8-Stream -new file mode 100644 -index 00000000..0eda4a7e ---- /dev/null -+++ b/test/container/Dockerfile-CentOS-8-Stream -@@ -0,0 +1,54 @@ -+FROM quay.io/centos/centos:stream8 -+ -+MAINTAINER https://github.com/dracutdevs/dracut -+ -+ENV container docker -+LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE" -+ -+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh -+ -+# Install needed packages for the dracut CI container -+RUN dnf -y install epel-release && \ -+ dnf -y install --enablerepo powertools --enablerepo epel --setopt=install_weak_deps=False \ -+ qemu-kvm \ -+ NetworkManager \ -+ asciidoc \ -+ bash-completion \ -+ bzip2 \ -+ cryptsetup \ -+ dash \ -+ dbus-daemon \ -+ dhcp-client \ -+ dhcp-server \ -+ e2fsprogs \ -+ gcc \ -+ git \ -+ iproute \ -+ iputils \ -+ iscsi-initiator-utils \ -+ kbd \ -+ kernel \ -+ kmod-devel \ -+ lvm2 \ -+ make \ -+ mdadm \ -+ nfs-utils \ -+ pigz \ -+ python3-imgcreate \ -+ rpm-build \ -+ strace \ -+ sudo \ -+ tar \ -+ tcpdump \ -+ wget \ -+ which \ -+ xz \ -+ && dnf -y update && dnf clean all -+ -+# CentOS 8 ships only qemu-kvm, but it disables the KVM accel when it's not -+# available -+RUN ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-kvm && \ -+ ln -sv /usr/libexec/qemu-kvm /usr/bin/qemu-system-$(uname -m) -+ -+# Set default command -+CMD ["/usr/bin/bash"] -diff --git a/tools/test-github.sh b/tools/test-github.sh -new file mode 100755 -index 00000000..eab59dcc ---- /dev/null -+++ b/tools/test-github.sh -@@ -0,0 +1,49 @@ -+#!/bin/bash -+ -+set -ex -+ -+[[ -d ${0%/*} ]] && cd "${0%/*}"/../ -+ -+RUN_ID="$1" -+TESTS=$2 -+ -+./configure -+ -+NCPU=$(getconf _NPROCESSORS_ONLN) -+ -+if ! [[ $TESTS ]]; then -+ # GitHub workflows fetch a clone of the dracut repository which doesn't -+ # contain git tags, thus "breaking" the RPM build in certain situations -+ # i.e.: -+ # DRACUT_MAIN_VERSION in Makefile is defined as an output of `git describe`, -+ # which in full git clone returns a tag with a numeric version. However, -+ # without tags it returns SHA of the last commit, which later propagates into -+ # `Provides:` attribute of the built RPM and can break dependency tree when -+ # installed -+ [[ -d .git ]] && git fetch --tags && git describe --tags -+ make -j "$NCPU" all syncheck rpm logtee -+else -+ if [[ $TESTS == "99" ]]; then -+ [[ -d .git ]] && git fetch --tags && git describe --tags -+ make_docs=yes -+ else -+ make_docs=no -+ fi -+ -+ make -j "$NCPU" enable_documentation=$make_docs all logtee -+ -+ cd test -+ -+ # shellcheck disable=SC2012 -+ time LOGTEE_TIMEOUT_MS=590000 make \ -+ enable_documentation=$make_docs \ -+ KVERSION="$( -+ cd /lib/modules -+ ls -1 | tail -1 -+ )" \ -+ DRACUT_NO_XATTR=1 \ -+ TEST_RUN_ID="$RUN_ID" \ -+ ${TESTS:+TESTS="$TESTS"} \ -+ -k V=1 \ -+ check -+fi - diff --git a/SOURCES/0192.patch b/SOURCES/0192.patch deleted file mode 100644 index d4f31aa..0000000 --- a/SOURCES/0192.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 436135496469ec24be1fc6fbc03a39d2575c8686 Mon Sep 17 00:00:00 2001 -From: Frantisek Sumsal -Date: Sat, 13 Nov 2021 17:55:45 +0100 -Subject: [PATCH] ci: backport TEST-21-NFS-NM - -Loosely cherry-picked from a3f73298f287e75810d6784efa52e80af15da2bd. - -rhel-only ---- - .github/workflows/integration.yml | 3 +-- - test/TEST-20-NFS/test.sh | 14 +++++++++++--- - test/TEST-21-NFS-NM/Makefile | 12 ++++++++++++ - 3 files changed, 24 insertions(+), 5 deletions(-) - -diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml -index 80a856a2..9c7c8486 100644 ---- a/.github/workflows/integration.yml -+++ b/.github/workflows/integration.yml -@@ -29,9 +29,8 @@ jobs: - "13", - "17", - "20", -- #"21", needs backport (NFS + NM) -+ "21", - "40", -- #"41", needws backport (NBD + NM) - "98", - ] - fail-fast: false -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 4ad7fd77..320f9c3e 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -1,5 +1,13 @@ - #!/bin/bash --TEST_DESCRIPTION="root filesystem on NFS" -+if [[ $NM ]]; then -+ USE_NETWORK="network-manager" -+ OMIT_NETWORK="network-legacy" -+else -+ USE_NETWORK="network-legacy" -+ OMIT_NETWORK="network-manager" -+fi -+ -+TEST_DESCRIPTION="root filesystem on NFS with $USE_NETWORK" - - KVERSION=${KVERSION-$(uname -r)} - -@@ -353,8 +361,8 @@ test_setup() { - - # Make client's dracut image - $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -- -o "plymouth dash" \ -- -a "debug watchdog" \ -+ -o "plymouth dash ${OMIT_NETWORK}" \ -+ -a "debug watchdog ${USE_NETWORK}" \ - -d "af_packet piix ide-gd_mod ata_piix sd_mod e1000 nfs sunrpc i6300esb" \ - --no-hostonly-cmdline -N \ - -f $TESTDIR/initramfs.testing $KVERSION || return 1 -diff --git a/test/TEST-21-NFS-NM/Makefile b/test/TEST-21-NFS-NM/Makefile -new file mode 100644 -index 00000000..b19122a1 ---- /dev/null -+++ b/test/TEST-21-NFS-NM/Makefile -@@ -0,0 +1,12 @@ -+.PHONY: all setup clean run -+ -+BASETEST=../TEST-20-NFS -+ -+all: -+ @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) all -+setup: -+ @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) setup -+clean: -+ @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) clean -+run: -+ @$(MAKE) NM=1 -s --no-print-directory -C $(BASETEST) run - diff --git a/SOURCES/0193.patch b/SOURCES/0193.patch deleted file mode 100644 index 7137d69..0000000 --- a/SOURCES/0193.patch +++ /dev/null @@ -1,57 +0,0 @@ -From fd907a1b2b1f087afa2eccfa1686043e4dbb5ff6 Mon Sep 17 00:00:00 2001 -From: q66 -Date: Sat, 25 Jul 2020 17:28:16 +0200 -Subject: [PATCH] dracut.sh: fix early microcode detection logic - -This fixes two issues: - -1) on non-x86 systems in non-hostonly config this would cause - an annoying warning on every initramfs generation -2) on non-x86 systems in hostonly config this would result in - early microcode not getting disabled - -Resolves: rhbz#2022414 ---- - dracut.sh | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index e559bb96..952c57c8 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1070,19 +1070,26 @@ fi - - if [[ $early_microcode = yes ]]; then - if [[ $hostonly ]]; then -- [[ $(get_cpu_vendor) == "AMD" ]] \ -- && ! check_kernel_config CONFIG_MICROCODE_AMD \ -- && unset early_microcode -- [[ $(get_cpu_vendor) == "Intel" ]] \ -- && ! check_kernel_config CONFIG_MICROCODE_INTEL \ -- && unset early_microcode -+ if [[ $(get_cpu_vendor) == "AMD" ]]; then -+ check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode -+ elif [[ $(get_cpu_vendor) == "Intel" ]]; then -+ check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode -+ else -+ unset early_microcode -+ fi - else - ! check_kernel_config CONFIG_MICROCODE_AMD \ - && ! check_kernel_config CONFIG_MICROCODE_INTEL \ - && unset early_microcode - fi -- [[ $early_microcode != yes ]] \ -- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y" -+ # Do not complain on non-x86 architectures as it makes no sense -+ case $(uname -m) in -+ x86_64|i?86) -+ [[ $early_microcode != yes ]] \ -+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y" -+ ;; -+ *) ;; -+ esac - fi - - # Need to be able to have non-root users read stuff (rpcbind etc) - diff --git a/SOURCES/0194.patch b/SOURCES/0194.patch deleted file mode 100644 index 563777a..0000000 --- a/SOURCES/0194.patch +++ /dev/null @@ -1,24 +0,0 @@ -From ccd2823f5b75273445c7de36ff306fd23163f955 Mon Sep 17 00:00:00 2001 -From: Masahiro Matsuya -Date: Fri, 11 Jun 2021 10:40:04 +0900 -Subject: [PATCH] fix(url-lib): make pre-pivot hook separetely per nfs mount - -Resolves: rhbz#1967802 ---- - modules.d/45url-lib/url-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh -index 08c3ebb4..56d0d683 100755 ---- a/modules.d/45url-lib/url-lib.sh -+++ b/modules.d/45url-lib/url-lib.sh -@@ -143,7 +143,7 @@ nfs_fetch_url() { - local mntdir="$(mkuniqdir /run nfs_mnt)" - mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir" - # lazy unmount during pre-pivot hook -- inst_hook --hook pre-pivot --name 99url-lib-umount-nfs umount -l -- "$mntdir" -+ inst_hook --hook pre-pivot --name 99url-lib-umount-nfs-"$(basename "$mntdir")" umount -l -- "$mntdir" - fi - - if [ -z "$outloc" ]; then - diff --git a/SOURCES/0195.patch b/SOURCES/0195.patch deleted file mode 100644 index d9e6084..0000000 --- a/SOURCES/0195.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8a4e5b5988d716259ad5b684dc2814d265007cb5 Mon Sep 17 00:00:00 2001 -From: Peter Levine -Date: Mon, 1 Feb 2021 22:17:06 -0500 -Subject: [PATCH] fix(watchdog): replace return with echo - -(cherry picked from commit c35cbd2e561714207388af69820cee2743dbcbc3) - -Resolves: #1890039 ---- - modules.d/04watchdog/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 15bcd897..fdc62986 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -7,7 +7,8 @@ check() { - - # called by dracut - depends() { -- return "watchdog-modules" -+ echo watchdog-modules -+ return 0 - } - - # called by dracut - diff --git a/SOURCES/0196.patch b/SOURCES/0196.patch deleted file mode 100644 index 481d6f5..0000000 --- a/SOURCES/0196.patch +++ /dev/null @@ -1,68 +0,0 @@ -From c7b21c88d27aace097ce9bc1fc36f4b742858737 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Mon, 22 Nov 2021 16:40:39 +0100 -Subject: [PATCH] fix(network): add errors and warnings when network interface - does not exist - -End with error, or show a warning when nonexistent device is specified for network setup like -`ip=10.12.8.12::10.12.255.254:255.255.0.0:xk12:eth0:off`. - -I've added the error only for `write-ifcfg.sh`, as I think no such setup should be written. - -Resolves: #1712424 ---- - modules.d/35network-legacy/ifup.sh | 6 +++++- - modules.d/35network-legacy/parse-ip-opts.sh | 5 +++++ - modules.d/45ifcfg/write-ifcfg.sh | 5 +++++ - 3 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh -index bd560379..0e9a6928 100755 ---- a/modules.d/35network-legacy/ifup.sh -+++ b/modules.d/35network-legacy/ifup.sh -@@ -413,7 +413,11 @@ for p in $(getargs ip=); do - - # If this option isn't directed at our interface, skip it - if [ -n "$dev" ]; then -- [ "$dev" != "$netif" ] && continue -+ if [ "$dev" != "$netif" ]; then -+ [ ! -e "/sys/class/net/$dev" ] \ -+ && warn "Network interface '$dev' does not exist!" -+ continue -+ fi - else - iface_is_enslaved "$netif" && continue - fi -diff --git a/modules.d/35network-legacy/parse-ip-opts.sh b/modules.d/35network-legacy/parse-ip-opts.sh -index 10a2d19b..eea0988c 100755 ---- a/modules.d/35network-legacy/parse-ip-opts.sh -+++ b/modules.d/35network-legacy/parse-ip-opts.sh -@@ -96,6 +96,11 @@ for p in $(getargs ip=); do - fi - # IFACES list for later use - IFACES="$IFACES $dev" -+ -+ # Interface should exist -+ if [ ! -e "/sys/class/net/$dev" ]; then -+ warn "Network interface '$dev' does not exist" -+ fi - fi - - # Do we need to check for specific options? -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index abd111fc..7e767f15 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -100,6 +100,11 @@ interface_bind() { - local _netif="$1" - local _macaddr="$2" - -+ if [ ! -e "/sys/class/net/$_netif" ]; then -+ derror "Cannot find network interface '$_netif'!" -+ return 1 -+ fi -+ - # see, if we can bind it to some hw parms - if hw_bind "$_netif" "$_macaddr"; then - # only print out DEVICE, if it's user assigned - diff --git a/SOURCES/0197.patch b/SOURCES/0197.patch deleted file mode 100644 index 7781b40..0000000 --- a/SOURCES/0197.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0a6125bf834c5a1808e4898f46093bc2ab2fed05 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 23 Oct 2019 14:16:56 +0200 -Subject: [PATCH] dracut.sh: add check for invalid configuration files - -Emit a warning about possible misconfigured configuration files, where -the spaces around values are missing for +="" - -Better report a possible source of problems. We can fix annoying false -positives later. - -(cherry picked from commit dfe2247a43d6a216d9af533825c9a103e3b056cd) - -Resolves: #1946245 ---- - dracut.sh | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 952c57c8..702b2f78 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -277,6 +277,14 @@ read_arg() { - fi - } - -+check_conf_file() -+{ -+ if grep -H -e '^[^#]*[+]=\("[^ ]\|.*[^ ]"\)' "$@"; then -+ printf '\ndracut: WARNING: +=" ": should have surrounding white spaces!\n' >&2 -+ printf 'dracut: WARNING: This will lead to unwanted side effects! Please fix the configuration file.\n\n' >&2 -+ fi -+} -+ - dropindirs_sort() - { - local suffix=$1; shift -@@ -697,10 +705,14 @@ if [[ ! -d $confdir ]]; then - fi - - # source our config file --[[ -f $conffile ]] && . "$conffile" -+if [[ -f $conffile ]]; then -+ check_conf_file "$conffile" -+ . "$conffile" -+fi - - # source our config dir - for f in $(dropindirs_sort ".conf" "$confdir" "$dracutbasedir/dracut.conf.d"); do -+ check_conf_file "$f" - [[ -e $f ]] && . "$f" - done - - diff --git a/SOURCES/0198.patch b/SOURCES/0198.patch deleted file mode 100644 index 4231fb1..0000000 --- a/SOURCES/0198.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c99f396a5d456520b34c60f43c589ca39a301955 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Wed, 14 Nov 2018 13:19:27 +0100 -Subject: [PATCH] fips: removed false-positive 'FATAL: Module xxx not found' - error message when kernel provides a generic algo for module - -Resolves: rhbz#1996019 ---- - modules.d/01fips/fips.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 03da6861..1d57a889 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -77,7 +77,7 @@ fips_load_crypto() - mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak - for _module in $FIPSMODULES; do - if [ "$_module" != "tcrypt" ]; then -- if ! modprobe "${_module}"; then -+ if ! modprobe "${_module}" 2>/tmp/fips.modprobe_err; then - # check if kernel provides generic algo - _found=0 - while read _k _s _v || [ -n "$_k" ]; do -@@ -86,7 +86,7 @@ fips_load_crypto() - _found=1 - break - done &2 && return 1 - fi - fi - done - diff --git a/SOURCES/0199.patch b/SOURCES/0199.patch deleted file mode 100644 index 5863d26..0000000 --- a/SOURCES/0199.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 876196e809f4ffac055737921cfe273d8399b6e4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Tue, 16 Nov 2021 11:15:52 +0100 -Subject: [PATCH] fix(shutdown): be robust against forced shutdown - -When a forced shutdown is issued through sending a burst of Ctrl-Alt-Del -keys, systemd sends SIGTERM to all processes. This ends up killing -dracut-initramfs-restore as well, preventing the script from detecting -that the unpack of the initramfs is incomplete, which later causes a -crash to happen when "shutdown" tries to execute from the unpacked -initramfs. - -This fix makes sure dracut-initramfs-restore remains alive to detect -the unpack failed (because cpio was killed by systemd too). - -Resolves: rhbz#2023665 ---- - dracut-initramfs-restore.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh -index 74a952c4..708f98d7 100644 ---- a/dracut-initramfs-restore.sh -+++ b/dracut-initramfs-restore.sh -@@ -6,6 +6,11 @@ set -e - [ -e /run/initramfs/bin/sh ] && exit 0 - [ -e /run/initramfs/.need_shutdown ] || exit 0 - -+# SIGTERM signal is received upon forced shutdown: ignore the signal -+# We want to remain alive to be able to trap unpacking errors to avoid -+# switching root to an incompletely unpacked initramfs -+trap 'echo "Received SIGTERM signal, ignoring!" >&2' TERM -+ - KERNEL_VERSION="$(uname -r)" - - [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut - diff --git a/SOURCES/0200.patch b/SOURCES/0200.patch deleted file mode 100644 index dcd4cf2..0000000 --- a/SOURCES/0200.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f5ffe8bc95ee989ef39b7c149d268b5988f952a0 Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Thu, 17 Jun 2021 10:47:33 -0400 -Subject: [PATCH] fix(fips): handle s390x OSTree systems - -On s390x, the `BOOT_IMAGE` karg injected by the bootloader is not a path -to the kernel image, but rather an integer describing the index of the -menu entry selected. Because of the way the s390x bootloader works, -there is no information retained about e.g. the path of the kernel that -was loaded. - -This causes issues for the FIPS code which assumes that `BOOT_IMAGE` is -a path to the kernel image to derive the HMAC path. In non-OSTree -systems, this ends up working anyway, because the kernel is located at -the root of the boot partition. In OSTree systems, this is not the -case. However, OSTree systems use BLS configs, and they are named in -reverse order of precedence (i.e. menu ordering). So from the -`BOOT_IMAGE` integer, we can figure out which BLS entry was selected. - -Add some code to do just this on s390x. This isn't completely foolproof, -because it presumes that (1) BLS configs were used to populate the -bootloader (and that they were exactly in the same state they currently -are when `zipl` was run), and (2) there are no other menu entries -originating from outside the BLS configs. However, if these assumptions -are wrong we would simply fail the boot, which is currently what is -happening anyway. - -See also: -https://github.com/openshift/os/pull/546 -https://github.com/ibm-s390-linux/s390-tools/issues/78 - -Tested-by: Muhammad Adeel - -Resolves: rhbz#2007586 ---- - modules.d/01fips/fips.sh | 21 +++++++++++++++++++++ - modules.d/01fips/module-setup.sh | 2 +- - 2 files changed, 22 insertions(+), 1 deletion(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index 1d57a889..c57fd426 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -114,6 +114,27 @@ do_fips() - else - BOOT_IMAGE="$(getarg BOOT_IMAGE)" - -+ # On s390x, BOOT_IMAGE isn't a path but an integer representing the -+ # entry number selected. Let's try the root of /boot first, and -+ # otherwise fallback to trying to parse the BLS entries if it's a -+ # BLS-based system. -+ if [ "$(uname -m)" = s390x ]; then -+ if [ -e "/boot/vmlinuz-${KERNEL}" ]; then -+ BOOT_IMAGE="vmlinuz-${KERNEL}" -+ elif [ -d /boot/loader/entries ]; then -+ i=0 -+ for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do -+ ((i++)) -+ -+ if [ $i -eq ${BOOT_IMAGE:-0} ] && [ -r "$bls" ]; then -+ BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" -+ BOOT_IMAGE=${BOOT_IMAGE:1} -+ break -+ fi -+ done -+ fi -+ fi -+ - # Trim off any leading GRUB boot device (e.g. ($root) ) - BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')" - -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index 8800a49e..71bea53a 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -67,7 +67,7 @@ install() { - inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh" - inst_script "$moddir/fips.sh" /sbin/fips.sh - -- inst_multiple sha512hmac rmmod insmod mount uname umount -+ inst_multiple sha512hmac rmmod insmod mount uname umount grep sort - - inst_simple /etc/system-fips - [ -c ${initdir}/dev/random ] || mknod ${initdir}/dev/random c 1 8 \ - diff --git a/SOURCES/0201.patch b/SOURCES/0201.patch deleted file mode 100644 index 71b5da7..0000000 --- a/SOURCES/0201.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d7c2342fb26a52142ce1fb9b10b636565aba7780 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Mon, 2 May 2022 20:12:25 +0200 -Subject: [PATCH] fix(fips): start iterating from 0 over BOOT_IMAGE entries - -as the code contains a bug which sets default 0, but iterates from 1. -Correct approach is indexing from 0. - -https://github.com/redhat-plumbers/dracut-rhel8/pull/9 ---- - modules.d/01fips/fips.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh -index c57fd426..e8952489 100755 ---- a/modules.d/01fips/fips.sh -+++ b/modules.d/01fips/fips.sh -@@ -124,13 +124,13 @@ do_fips() - elif [ -d /boot/loader/entries ]; then - i=0 - for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do -- ((i++)) -- - if [ $i -eq ${BOOT_IMAGE:-0} ] && [ -r "$bls" ]; then - BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" - BOOT_IMAGE=${BOOT_IMAGE:1} - break - fi -+ -+ ((i++)) - done - fi - fi - diff --git a/SOURCES/0202.patch b/SOURCES/0202.patch deleted file mode 100644 index ba50de6..0000000 --- a/SOURCES/0202.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 4b9978afff2a8b084858c630032a3452bdca05c3 Mon Sep 17 00:00:00 2001 -From: Jan Macku -Date: Tue, 15 Feb 2022 16:09:38 +0100 -Subject: [PATCH] ci: Add Differential ShellCheck action - -Related: #2054725 ---- - .github/workflows/differential-shellcheck.yml | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml -new file mode 100644 -index 00000000..b8b10eaa ---- /dev/null -+++ b/.github/workflows/differential-shellcheck.yml -@@ -0,0 +1,17 @@ -+name: Differential ShellCheck -+on: -+ pull_request: -+ branches: [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@v1 - diff --git a/SOURCES/0203.patch b/SOURCES/0203.patch deleted file mode 100644 index 716aa8d..0000000 --- a/SOURCES/0203.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f7663f39ea7858e08597694da329c1c94e778060 Mon Sep 17 00:00:00 2001 -From: Jan Macku -Date: Thu, 23 Jun 2022 13:25:09 +0200 -Subject: [PATCH] (#2054725) ci: Use Differential ShellCheck action `v2` - -differential-shellcheck@v2 uses SARIF format that drastically -improves user experience. - -Related: #2054725 ---- - .github/workflows/differential-shellcheck.yml | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml -index b8b10eaa..55273b3d 100644 ---- a/.github/workflows/differential-shellcheck.yml -+++ b/.github/workflows/differential-shellcheck.yml -@@ -14,4 +14,6 @@ jobs: - fetch-depth: 0 - - - name: Differential ShellCheck -- uses: redhat-plumbers-in-action/differential-shellcheck@v1 -+ uses: redhat-plumbers-in-action/differential-shellcheck@v2 -+ with: -+ token: ${{ secrets.GITHUB_TOKEN }} - diff --git a/SOURCES/0204.patch b/SOURCES/0204.patch deleted file mode 100644 index 6d59607..0000000 --- a/SOURCES/0204.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 93b0bbd54736259792ca77746ac8a6440c3ccd39 Mon Sep 17 00:00:00 2001 -From: The Plumber <50238977+systemd-rhel-bot@users.noreply.github.com> -Date: Thu, 11 Aug 2022 09:49:54 +0200 -Subject: [PATCH] (#1933679) 95iscsi: Fix network setup - -* 95iscsi: Fix network setup code for iscsi - -- The network script and config could be in - "/etc/sysconfig/network-scripts", so try look for network config in - all possible path. - -- The regex used for sed is not working, so fix it too. - -- Make bootproto a local variable - -* Update modules.d/95iscsi/module-setup.sh - -Signed-off-by: Kairui Song -(cherry picked from commit 7b76fa924dfd20d3fd4433baa8292f0112282aac) - -Resolves: #1933679 ---- - modules.d/95iscsi/module-setup.sh | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 618d1dc2..5bb97df6 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -72,6 +72,7 @@ install_iscsiroot() { - local devpath=$1 - local scsi_path iscsi_lun session c d conn host flash - local iscsi_session iscsi_address iscsi_port iscsi_targetname iscsi_tpgt -+ local bootproto - - scsi_path=${devpath%%/block*} - [ "$scsi_path" = "$devpath" ] && return 1 -@@ -120,8 +121,14 @@ install_iscsiroot() { - local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p') - ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') - -- #follow ifcfg settings for boot protocol -- bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname) -+ # follow ifcfg settings for boot protocol -+ for _path in \ -+ "/etc/sysconfig/network-scripts/ifcfg-$ifname" \ -+ "/etc/sysconfig/network/ifcfg-$ifname" \ -+ ; do -+ [ -r "$_path" ] && bootproto=$(sed -n "s/BOOTPROTO='\?\([[:alpha:]]*6\?\)4\?/\1/p" "$_path") -+ done -+ - if [ $bootproto ]; then - printf 'ip=%s:%s ' ${ifname} ${bootproto} - else - diff --git a/SOURCES/0205.patch b/SOURCES/0205.patch deleted file mode 100644 index d569b84..0000000 --- a/SOURCES/0205.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4db9f93bde030993f2777a4dacfcb72cab387b43 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Mon, 14 Mar 2022 10:48:44 +0100 -Subject: [PATCH] fix(dracut-systemd): correct service dependencies - -dracut-systemd.service is not an early boot service, therefore it should -not use DefaultDependencies=no. This also fixes the service's ordering -dependencies, as in its current state it is missing -Before=shutdown.target umount.target - -Resolves: #1924587, #1717323 ---- - modules.d/98dracut-systemd/dracut-shutdown.service | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service b/modules.d/98dracut-systemd/dracut-shutdown.service -index 81043b2d..b7324586 100644 ---- a/modules.d/98dracut-systemd/dracut-shutdown.service -+++ b/modules.d/98dracut-systemd/dracut-shutdown.service -@@ -7,8 +7,6 @@ Description=Restore /run/initramfs on shutdown - Documentation=man:dracut-shutdown.service(8) - After=local-fs.target boot.mount boot.automount - Wants=local-fs.target --Conflicts=shutdown.target umount.target --DefaultDependencies=no - ConditionPathExists=!/run/initramfs/bin/sh - - [Service] - diff --git a/SOURCES/0206.patch b/SOURCES/0206.patch deleted file mode 100644 index 8340c91..0000000 --- a/SOURCES/0206.patch +++ /dev/null @@ -1,140 +0,0 @@ -From d5027d43ea3969426ba64423b3c0bb38491cc880 Mon Sep 17 00:00:00 2001 -From: Tao Liu -Date: Fri, 10 Jun 2022 16:39:31 +0800 -Subject: [PATCH] feat(lvm): add new module lvmthinpool-monitor - -Previously dracut didn't support the feature of lvm thinpool autoextend. - -The feature is useful to cases such as kdump, when vmcore to be saved to a -lvm thin volume. The thinpool should be able to autoextend, otherwise an -IO error will be caused and leaves an incomplete vmcore. - -There is lvm2-monitor.service and dmeventd avaliable, however -considering [1], it is not suitable for kdump and memory limited cases. - -This patch achieves the same by parallel looping a shell function in the -background, which calls lvextend periodically. If thredshold reaches, -autoextend it, if not then nothing happens. - -[1]: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/message/YF254ZO3PJ3U56P4OKHV3JNYP2PJUMYX/ - -Signed-off-by: Tao Liu - -Resolves: #2098502 ---- - dracut.spec | 1 + - modules.d/80lvmthinpool-monitor/module-setup.sh | 24 +++++++++++++ - .../start-thinpool-monitor.service | 14 ++++++++ - .../start-thinpool-monitor.sh | 41 ++++++++++++++++++++++ - 4 files changed, 80 insertions(+) - -diff --git a/dracut.spec b/dracut.spec -index c8783699..e1c22256 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -350,6 +350,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ - %{dracutlibdir}/modules.d/50drm - %{dracutlibdir}/modules.d/50plymouth - %{dracutlibdir}/modules.d/80lvmmerge -+%{dracutlibdir}/modules.d/80lvmthinpool-monitor - %{dracutlibdir}/modules.d/90btrfs - %{dracutlibdir}/modules.d/90crypt - %{dracutlibdir}/modules.d/90dm -diff --git a/modules.d/80lvmthinpool-monitor/module-setup.sh b/modules.d/80lvmthinpool-monitor/module-setup.sh -new file mode 100755 -index 00000000..ca015bdc ---- /dev/null -+++ b/modules.d/80lvmthinpool-monitor/module-setup.sh -@@ -0,0 +1,24 @@ -+#!/bin/bash -+ -+# called by dracut -+check() { -+ # No point trying to support lvm if the binaries are missing -+ require_binaries lvm sort tr awk || return 1 -+ -+ return 255 -+} -+ -+# called by dracut -+depends() { -+ echo lvm -+ return 0 -+} -+ -+# called by dracut -+install() { -+ inst_multiple sort tr awk -+ inst_script "$moddir/start-thinpool-monitor.sh" "/bin/start-thinpool-monitor" -+ -+ inst "$moddir/start-thinpool-monitor.service" "$systemdsystemunitdir/start-thinpool-monitor.service" -+ $SYSTEMCTL -q --root "$initdir" add-wants initrd.target start-thinpool-monitor.service -+} -diff --git a/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.service b/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.service -new file mode 100644 -index 00000000..97f5f1f4 ---- /dev/null -+++ b/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.service -@@ -0,0 +1,14 @@ -+[Unit] -+Description=Lvm thinpool monitor service -+Before=initrd.target -+After=initrd-fs.target -+Conflicts=shutdown.target emergency.target -+ -+[Service] -+Type=forking -+ExecStart=/bin/start-thinpool-monitor -+PIDFile=/run/thinpool-moni.pid -+StandardInput=null -+StandardOutput=journal+console -+StandardError=journal+console -+KillSignal=SIGHUP -diff --git a/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh b/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh -new file mode 100755 -index 00000000..75d8eada ---- /dev/null -+++ b/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh -@@ -0,0 +1,41 @@ -+#!/bin/sh -+ -+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh -+ -+LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=) -+ -+is_lvm2_thinp_device() { -+ _device_path=$1 -+ _lvm2_thin_device=$(lvm lvs -S 'lv_layout=sparse && lv_layout=thin' \ -+ --nosuffix --noheadings -o vg_name,lv_name "$_device_path" 2> /dev/null) -+ -+ [ -n "$_lvm2_thin_device" ] && return $? -+} -+ -+for LV in $LVS; do -+ if is_lvm2_thinp_device "/dev/$LV"; then -+ THIN_POOLS="$(lvm lvs -S 'lv_layout=sparse && lv_layout=thin' \ -+ --nosuffix --noheadings -o vg_name,pool_lv "$LV" \ -+ | awk '{printf("%s/%s",$1,$2);}') $THIN_POOLS" -+ fi -+done -+ -+THIN_POOLS=$(echo "$THIN_POOLS" | tr ' ' '\n' | sort -u | tr '\n' ' ') -+ -+if [ -n "$THIN_POOLS" ]; then -+ if [ -e "/etc/lvm/lvm.conf" ]; then -+ # Use 'monitoring=0' to override the value in lvm.conf, in case -+ # dmeventd monitoring been started after the calling. -+ CONFIG="activation {monitoring=0}" -+ else -+ CONFIG="activation {monitoring=0 thin_pool_autoextend_threshold=70 thin_pool_autoextend_percent=20}" -+ fi -+ -+ while true; do -+ for THIN_POOL in $THIN_POOLS; do -+ lvm lvextend --use-policies --config "$CONFIG" "$THIN_POOL" -+ done -+ sleep 5 -+ done & -+ echo $! > /run/thinpool-moni.pid -+fi - diff --git a/SOURCES/0207.patch b/SOURCES/0207.patch deleted file mode 100644 index 1ad6684..0000000 --- a/SOURCES/0207.patch +++ /dev/null @@ -1,90 +0,0 @@ -From ec2e4e70a1037b2df535e48ef7389b7b76b5a29a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Renaud=20M=C3=A9trich?= -Date: Thu, 13 Jan 2022 17:35:59 +0100 -Subject: [PATCH] fix(dracut-shutdown): add cleanup handler on failure - -It may happen that dracut-shutdown.service fails, for example on timeout -due to very low bandwidth. -In such case, for hardening purposes, a new dracut-shutdown-onfailure.service -unit doing dracut-shutdown.service cleanup needs to execute to make sure -switching root to an incomplete initramfs won't occur later. - -Resolves: #1924587 ---- - Makefile | 1 + - dracut.spec | 1 + - .../98dracut-systemd/dracut-shutdown-onfailure.service | 13 +++++++++++++ - modules.d/98dracut-systemd/dracut-shutdown.service | 1 + - modules.d/98dracut-systemd/dracut-shutdown.service.8.asc | 3 +++ - 5 files changed, 19 insertions(+) - -diff --git a/Makefile b/Makefile -index 503d069f..1c0f48ad 100644 ---- a/Makefile -+++ b/Makefile -@@ -142,6 +142,7 @@ ifneq ($(enable_documentation),no) - endif - if [ -n "$(systemdsystemunitdir)" ]; then \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ -+ ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown-onfailure.service; \ - ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \ - ln -s ../dracut-shutdown.service \ -diff --git a/dracut.spec b/dracut.spec -index e1c22256..90fa903a 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -404,6 +404,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ - %dir %{_sharedstatedir}/initramfs - %if %{defined _unitdir} - %{_unitdir}/dracut-shutdown.service -+%{_unitdir}/dracut-shutdown-onfailure.service - %{_unitdir}/sysinit.target.wants/dracut-shutdown.service - %{_unitdir}/dracut-cmdline.service - %{_unitdir}/dracut-initqueue.service -diff --git a/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service b/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service -new file mode 100644 -index 00000000..96de58c5 ---- /dev/null -+++ b/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service -@@ -0,0 +1,13 @@ -+# This file is part of dracut. -+# -+# See dracut.bootup(7) for details -+ -+[Unit] -+Description=Service executing upon dracut-shutdown failure to perform cleanup -+Documentation=man:dracut-shutdown.service(8) -+DefaultDependencies=no -+ -+[Service] -+Type=oneshot -+ExecStart=-/bin/rm /run/initramfs/shutdown -+StandardError=null -diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service b/modules.d/98dracut-systemd/dracut-shutdown.service -index b7324586..dd4cf81e 100644 ---- a/modules.d/98dracut-systemd/dracut-shutdown.service -+++ b/modules.d/98dracut-systemd/dracut-shutdown.service -@@ -8,6 +8,7 @@ Documentation=man:dracut-shutdown.service(8) - After=local-fs.target boot.mount boot.automount - Wants=local-fs.target - ConditionPathExists=!/run/initramfs/bin/sh -+OnFailure=dracut-shutdown-onfailure.service - - [Service] - RemainAfterExit=yes -diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -index ba80b187..21ec88ca 100644 ---- a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -+++ b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc -@@ -40,6 +40,9 @@ by injecting "rd.break=pre-shutdown rd.shell" or "rd.break=shutdown rd.shell". - # touch /run/initramfs/.need_shutdown - ---- - -+In case the unpack of the initramfs fails, dracut-shutdown-onfailure.service -+executes to make sure switch root doesn't happen, since it would result in -+switching to an incomplete initramfs. - - AUTHORS - ------- - diff --git a/SOURCES/0208.patch b/SOURCES/0208.patch deleted file mode 100644 index 867b10d..0000000 --- a/SOURCES/0208.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9914a76e5748beae9662a0e44b1674249b778424 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Mon, 15 Aug 2022 10:44:35 +0200 -Subject: [PATCH] ci: check out .shellcheckrc from upstream - -To avoid ShellCheck false positives. - -https://github.com/redhat-plumbers/dracut-rhel8/pull/18 - -rhel-only ---- - .shellcheckrc | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/.shellcheckrc b/.shellcheckrc -new file mode 100644 -index 00000000..ce5c883b ---- /dev/null -+++ b/.shellcheckrc -@@ -0,0 +1,34 @@ -+# SC2039: In POSIX sh, 'local' is undefined. -+# https://github.com/koalaman/shellcheck/wiki/SC2039 -+disable=SC2039 -+ -+# SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. -+# https://github.com/koalaman/shellcheck/wiki/SC2166 -+disable=SC2166 -+ -+# SC2154: Variable is referenced but not assigned -+# https://github.com/koalaman/shellcheck/wiki/SC2154 -+disable=SC2154 -+ -+# SC1091: Not following -+# https://github.com/koalaman/shellcheck/wiki/SC1091 -+disable=SC1091 -+ -+# SC2174: When used with -p, -m only applies to the deepest directory. -+# https://github.com/koalaman/shellcheck/wiki/SC2174 -+disable=SC2174 -+ -+# SC3043: In POSIX sh, 'local' is undefined. -+# https://github.com/koalaman/shellcheck/wiki/SC3043 -+# ... but dash supports it -+disable=SC3043 -+ -+# SC3013: In POSIX sh, -ef is undefined. -+# https://github.com/koalaman/shellcheck/wiki/SC3013 -+# ... but dash supports it -+disable=SC3013 -+ -+# SC3045: In POSIX sh, read -p is undefined. -+# https://github.com/koalaman/shellcheck/wiki/SC3045 -+# ... but dash supports it -+disable=SC3045 - diff --git a/SOURCES/0209.patch b/SOURCES/0209.patch deleted file mode 100644 index 263d09e..0000000 --- a/SOURCES/0209.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 7e148e3b6f922e5eb1dcb7fc3c1fed715004e2ab Mon Sep 17 00:00:00 2001 -From: Lee Duncan -Date: Mon, 25 Mar 2019 16:49:19 -0700 -Subject: [PATCH] Dracut: only login to one target at a time - -For handling the configuration where there are two -paths to an iscsi root target, each using a different -NIC. In such a case, the initramfs was trying to configure -the first NIC, then call iscsiroot to login to both targets, -which would fail for the 2nd target, since the path to the -2nd target was not yet configured. This would eventually -work after a timeout. But it's better to login to just -one target at a time. -This change makes the initramfs handle multiple paths to an -iscsi target better by logging into only one target at a time, -rather than trying to login to all targets when only one of -several NICs is up. - -This can be further optimized by using the initrd parameter -"rd.iscsi.testroute", which would skip iscsiadm login attempts -for targets to which no route exists. - -If the script is called again via the timeout initqueue, -we try "iscsiadm -L onboot" again, hoping that some targets -may now have become reachable. ---- - modules.d/95iscsi/iscsiroot.sh | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 4efc1d12..f3f88259 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -228,7 +228,7 @@ handle_netroot() - fi - [ -n "$iscsi_param" ] && for param in $iscsi_param; do EXTRA="$EXTRA --name=${param%=*} --value=${param#*=}"; done - -- iscsiadm -m node -T $target \ -+ CMD="iscsiadm -m node -T $target \ - ${iscsi_iface_name:+-I $iscsi_iface_name} \ - -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} \ - --op=update \ -@@ -238,14 +238,20 @@ handle_netroot() - ${iscsi_in_username:+--name=node.session.auth.username_in --value=$iscsi_in_username} \ - ${iscsi_in_password:+--name=node.session.auth.password_in --value=$iscsi_in_password} \ - $EXTRA \ -- $NULL -+ $NULL" -+ $CMD -+ if [ "$netif" != "timeout" ]; then -+ $CMD --login -+ fi - ;; - *) - ;; - esac - done - -- iscsiadm -m node -L onboot || : -+ if [ "$netif" = "timeout" ]; then -+ iscsiadm -m node -L onboot || : -+ fi - > $hookdir/initqueue/work - - netroot_enc=$(str_replace "$1" '/' '\2f') - diff --git a/SOURCES/0210.patch b/SOURCES/0210.patch deleted file mode 100644 index ba85405..0000000 --- a/SOURCES/0210.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 96fc660c9170fbea5ac80235ab7d0e7cfdbe243e Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 21 Mar 2019 16:27:04 +0100 -Subject: [PATCH] iscsi: don't continue waiting if the root device is present - -dracut waits for every iscsiroot connection to be established -before switching root. This is not necessary in multipath scenarios, -where a single path is usually sufficient to set up the root device, -and where users expect booting to succeed unless all paths are down. - -Don't wait for the iscsi portal to start if the root device has -already been found. ---- - modules.d/95iscsi/parse-iscsiroot.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh -index f00a83bb..8d6e3e8c 100755 ---- a/modules.d/95iscsi/parse-iscsiroot.sh -+++ b/modules.d/95iscsi/parse-iscsiroot.sh -@@ -84,7 +84,7 @@ if [ -n "$iscsi_firmware" ]; then - modprobe -b -q iscsi_boot_sysfs 2>/dev/null - modprobe -b -q iscsi_ibft - # if no ip= is given, but firmware -- echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh -+ echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh - initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT" - initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT" - initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'" -@@ -145,7 +145,7 @@ for nroot in $(getargs netroot); do - type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh - parse_iscsi_root "$nroot" || return 1 - netroot_enc=$(str_replace "$nroot" '/' '\2f') -- echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh -+ echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh - done - - # Done, all good! - diff --git a/SOURCES/0211.patch b/SOURCES/0211.patch deleted file mode 100644 index 59fe258..0000000 --- a/SOURCES/0211.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5e06ab6cc6398fb82b8cd1dbc8da9969d874bb75 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 21 Mar 2019 21:31:15 +0100 -Subject: [PATCH] network: stop waiting for interfaces if root device is - present - ---- - modules.d/35network-legacy/net-genrules.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/35network-legacy/net-genrules.sh b/modules.d/35network-legacy/net-genrules.sh -index e6035e5e..0d4ef27b 100755 ---- a/modules.d/35network-legacy/net-genrules.sh -+++ b/modules.d/35network-legacy/net-genrules.sh -@@ -96,7 +96,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh - - for iface in $IFACES; do - if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then -- echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh -+ echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh - fi - done - # Default: We don't know the interface to use, handle all - diff --git a/SOURCES/0212.patch b/SOURCES/0212.patch deleted file mode 100644 index d3dc6de..0000000 --- a/SOURCES/0212.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 032129d0eb47d08eff7bd8b4c82a835a8929e9d3 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 4 Apr 2019 15:29:04 +0200 -Subject: [PATCH] iscsiroot: parse_iscsi_root overwrites command line args - -iscsi_target_name, iscsi_target_ip, iscsi_target_port are -unconditionally overwritten by parse_iscsi_root. Don't set -them here, for code clarity. ---- - modules.d/95iscsi/iscsiroot.sh | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index f3f88259..45db89c1 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -92,12 +92,6 @@ handle_netroot() - # override conf settings by command line options - arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) - [ -n "$arg" ] && iscsi_initiator=$arg -- arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=) -- [ -n "$arg" ] && iscsi_target_name=$arg -- arg=$(getarg rd.iscsi.target.ip -d iscsi_target_ip) -- [ -n "$arg" ] && iscsi_target_ip=$arg -- arg=$(getarg rd.iscsi.target.port -d iscsi_target_port=) -- [ -n "$arg" ] && iscsi_target_port=$arg - arg=$(getarg rd.iscsi.target.group -d iscsi_target_group=) - [ -n "$arg" ] && iscsi_target_group=$arg - arg=$(getarg rd.iscsi.username -d iscsi_username=) -@@ -112,6 +106,8 @@ handle_netroot() - iscsi_param="$iscsi_param $p" - done - -+ # this sets iscsi_target_name and possibly overwrites most -+ # parameters read from the command line above - parse_iscsi_root "$1" || return 1 - - # Bail out early, if there is no route to the destination - diff --git a/SOURCES/0213.patch b/SOURCES/0213.patch deleted file mode 100644 index ae02bfa..0000000 --- a/SOURCES/0213.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a590dfb3670a68b9eebc3e0ea617c5cf192c51ae Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 4 Apr 2019 15:40:14 +0200 -Subject: [PATCH] iscsiroot: there's never more than one target per call - -iscsi_target_name is set by iscsi_root, and thus can't have -more than one member. This allows us to get rid of one bashism -in iscsiroot.sh. ---- - modules.d/95iscsi/iscsiroot.sh | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 45db89c1..a334b76e 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -213,10 +213,8 @@ handle_netroot() - targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/') - [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1 - -- for target in $iscsi_target_name; do -- case "$targets" in -- *$target*) -- EXTRA="" -+ for target in $targets; do -+ if [ "$target" = "$iscsi_target_name" ]; then - if [ -n "$iscsi_iface_name" ]; then - iscsiadm -m iface -I $iscsi_iface_name --op=new - EXTRA=" ${iscsi_netdev_name:+--name=iface.net_ifacename --value=$iscsi_netdev_name} " -@@ -239,10 +237,7 @@ handle_netroot() - if [ "$netif" != "timeout" ]; then - $CMD --login - fi -- ;; -- *) -- ;; -- esac -+ fi - done - - if [ "$netif" = "timeout" ]; then - diff --git a/SOURCES/0214.patch b/SOURCES/0214.patch deleted file mode 100644 index 5a5df3a..0000000 --- a/SOURCES/0214.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 261d278332e0af85a0311a75d7b81c6cf35e4816 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 4 Apr 2019 16:16:40 +0200 -Subject: [PATCH] iscsiroot: try targets only once - -In multipath scenarios, "iscsiadm -m node" may contain -several records with the same target. -There's no point in trying "iscsiadm --login" multiple -time for the same target, through the same portal. - -Moreover, warn if the desired target is not on the node -list. ---- - modules.d/95iscsi/iscsiroot.sh | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index a334b76e..e8e0b4b8 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -87,7 +87,7 @@ handle_netroot() - local iscsi_in_username iscsi_in_password - local iscsi_iface_name iscsi_netdev_name - local iscsi_param param -- local p -+ local p found - - # override conf settings by command line options - arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) -@@ -213,6 +213,7 @@ handle_netroot() - targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/') - [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1 - -+ found= - for target in $targets; do - if [ "$target" = "$iscsi_target_name" ]; then - if [ -n "$iscsi_iface_name" ]; then -@@ -237,11 +238,16 @@ handle_netroot() - if [ "$netif" != "timeout" ]; then - $CMD --login - fi -+ found=yes -+ break - fi - done - - if [ "$netif" = "timeout" ]; then - iscsiadm -m node -L onboot || : -+ elif [ "$found" != yes ]; then -+ warn "iSCSI target \"$iscsi_target_name\" not found on portal $iscsi_target_ip:$iscsi_target_port" -+ return 1 - fi - > $hookdir/initqueue/work - - diff --git a/SOURCES/0215.patch b/SOURCES/0215.patch deleted file mode 100644 index 496a7ac..0000000 --- a/SOURCES/0215.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 0df65c3c001fb5656838274b172c247c41dc0442 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Thu, 4 Apr 2019 17:12:07 +0200 -Subject: [PATCH] iscsiroot: remove bashisms - -According to the dracut README, module code to be run in -the initrd must be POSIX-compliant. Replace remaining -bashisms (as reported by checkbashisms) with POSIX compliant -code. - -The use of "type" is not strictly POSIX compliant, but it's -all over the place in dracut code. dash supports it, anyway. ---- - modules.d/95iscsi/iscsiroot.sh | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index e8e0b4b8..4ab0b6a0 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -54,11 +54,11 @@ handle_firmware() - if ! iscsiadm -m fw; then - warn "iscsiadm: Could not get list of targets from firmware." - else -- ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) -+ ifaces=$(set -- /sys/firmware/ibft/ethernet*; echo $#) - retry=$(cat /tmp/session-retry) - -- if [ $retry -lt ${#ifaces[*]} ]; then -- let retry++ -+ if [ $retry -lt $ifaces ]; then -+ retry=$((retry+1)) - echo $retry > /tmp/session-retry - return 1 - else -@@ -88,6 +88,7 @@ handle_netroot() - local iscsi_iface_name iscsi_netdev_name - local iscsi_param param - local p found -+ local login_retry_max_seen= - - # override conf settings by command line options - arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) -@@ -103,7 +104,9 @@ handle_netroot() - arg=$(getarg rd.iscsi.in.password -d iscsi_in_password=) - [ -n "$arg" ] && iscsi_in_password=$arg - for p in $(getargs rd.iscsi.param -d iscsi_param); do -- iscsi_param="$iscsi_param $p" -+ [ "${p%=*}" = node.session.initial_login_retry_max ] && \ -+ login_retry_max_seen=yes -+ iscsi_param="$iscsi_param $p" - done - - # this sets iscsi_target_name and possibly overwrites most -@@ -116,15 +119,12 @@ handle_netroot() - fi - - #limit iscsistart login retries -- case "$iscsi_param" in -- *node.session.initial_login_retry_max*) ;; -- *) -- retries=$(getargnum 3 0 10000 rd.iscsi.login_retry_max) -- if [ $retries -gt 0 ]; then -- iscsi_param="${iscsi_param% } node.session.initial_login_retry_max=$retries" -- fi -- ;; -- esac -+ if [ "$login_retry_max_seen" != yes ]; then -+ retries=$(getargnum 3 0 10000 rd.iscsi.login_retry_max) -+ if [ $retries -gt 0 ]; then -+ iscsi_param="${iscsi_param% } node.session.initial_login_retry_max=$retries" -+ fi -+ fi - - # XXX is this needed? - getarg ro && iscsirw=ro - diff --git a/SOURCES/0216.patch b/SOURCES/0216.patch deleted file mode 100644 index 3e51ddb..0000000 --- a/SOURCES/0216.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ee0bba8d350920b8beb4c0629262ec359983ad65 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Tue, 1 Oct 2019 12:02:04 +0200 -Subject: [PATCH] fixup "Dracut: only login to one target at a time" - -On SLE15-SP1 at least, iscsiadm doesn't support combining --op and --login": - -> # iscsiadm -m node -T iqn.2018-06.de.suse.zeus:01 --op=update --name=node.startup --value=onboot --login -> iscsiadm: Invalid parameters. Login/logout and op passed in - -This breaks iSCSI login in initrd, and thus, iSCSI boot. - -Fix it by not coalescing everything into a single iscsiadm command. -Fixes: a59b776bc215 ("Dracut: only login to one target at a time") -References: bsc#1152650 ---- - modules.d/95iscsi/iscsiroot.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 4ab0b6a0..6a12a108 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -225,8 +225,8 @@ handle_netroot() - - CMD="iscsiadm -m node -T $target \ - ${iscsi_iface_name:+-I $iscsi_iface_name} \ -- -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} \ -- --op=update \ -+ -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port}" -+ __op="--op=update \ - --name=node.startup --value=onboot \ - ${iscsi_username:+ --name=node.session.auth.username --value=$iscsi_username} \ - ${iscsi_password:+ --name=node.session.auth.password --value=$iscsi_password} \ -@@ -234,7 +234,7 @@ handle_netroot() - ${iscsi_in_password:+--name=node.session.auth.password_in --value=$iscsi_in_password} \ - $EXTRA \ - $NULL" -- $CMD -+ $CMD $__op - if [ "$netif" != "timeout" ]; then - $CMD --login - fi - diff --git a/SOURCES/0217.patch b/SOURCES/0217.patch deleted file mode 100644 index 43a2cf3..0000000 --- a/SOURCES/0217.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 934e69b64f4eff5df84d0d94a39aca1933bf3419 Mon Sep 17 00:00:00 2001 -From: Martin Wilck -Date: Fri, 27 Sep 2019 13:26:10 +0200 -Subject: [PATCH] 35network-legacy: only skip waiting for interfaces if netroot - is set - -Commmit 8a33e52e2f94 assumes that dracut's work is done if a root device -is found. This holds usually for booting computers, but it may be wrong -for other environments. - -Only short-cut the waiting if $netroot is also set. - -Fixes: 8a33e52e2f94 ("network: stop waiting for interfaces if root device is present") -References: bsc#1152006 - -Resolves: rhbz#2115199 ---- - modules.d/35network-legacy/net-genrules.sh | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/modules.d/35network-legacy/net-genrules.sh b/modules.d/35network-legacy/net-genrules.sh -index 0d4ef27b..d531bb56 100755 ---- a/modules.d/35network-legacy/net-genrules.sh -+++ b/modules.d/35network-legacy/net-genrules.sh -@@ -96,7 +96,11 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh - - for iface in $IFACES; do - if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then -- echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh -+ if [ -n "$netroot" ] && [ -n "$DRACUT_SYSTEMD" ]; then -+ echo "systemctl is-active initrd-root-device.target || [ -f /tmp/net.${iface}.did-setup ]" -+ else -+ echo "[ -f /tmp/net.${iface}.did-setup ]" -+ fi >$hookdir/initqueue/finished/wait-$iface.sh - fi - done - # Default: We don't know the interface to use, handle all - diff --git a/SOURCES/0218.patch b/SOURCES/0218.patch deleted file mode 100644 index c108c35..0000000 --- a/SOURCES/0218.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c14d276bc5dd17d881478bbce57d54e3c4ffb094 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Tue, 6 Dec 2022 20:35:52 +0100 -Subject: [PATCH] fix(80lvmthinpool-monitor): use systemsctl instead of - $SYSTEMCTL - -as the change is not backported to RHEL-8. - -rhel-only - -Resolves: #2141480 ---- - modules.d/80lvmthinpool-monitor/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/80lvmthinpool-monitor/module-setup.sh b/modules.d/80lvmthinpool-monitor/module-setup.sh -index ca015bdc..550f3f16 100755 ---- a/modules.d/80lvmthinpool-monitor/module-setup.sh -+++ b/modules.d/80lvmthinpool-monitor/module-setup.sh -@@ -20,5 +20,5 @@ install() { - inst_script "$moddir/start-thinpool-monitor.sh" "/bin/start-thinpool-monitor" - - inst "$moddir/start-thinpool-monitor.service" "$systemdsystemunitdir/start-thinpool-monitor.service" -- $SYSTEMCTL -q --root "$initdir" add-wants initrd.target start-thinpool-monitor.service -+ systemctl -q --root "$initdir" add-wants initrd.target start-thinpool-monitor.service - } - diff --git a/SOURCES/0219.patch b/SOURCES/0219.patch deleted file mode 100644 index 5bfca81..0000000 --- a/SOURCES/0219.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 3aca4acaea9569573d3d0e83c3c7998b56ea74c4 Mon Sep 17 00:00:00 2001 -From: Hari Bathini -Date: Tue, 12 Jul 2022 13:55:47 +0530 -Subject: [PATCH] fix(squash): build ld cache for squash loader - -Commit dc21638c3f0a fixes kdump kernel crash, due to non-conventional -library path in powerpc, by copying /etc/ld.so.cache under initdir. -While that works in general, it is vulnerable to failure because of -missing links, when the CPU is reconfigured to run in compatibility -mode of older CPU version. Avoid this by running ldconfig for squash -loader to create the necessary links & ld cache for it. Doing this -also saves a few kilobyes of space as the copied ld cache is bigger -in size than the one needed for squash loader environment. - -Fixes: dc21638c3f0a ("fix(squash): keep ld cache under initdir") -Cc: Pingfan Liu -Signed-off-by: Hari Bathini - -(Cherry-picked from f5e8250a06b5a53f6fd8e47ec976db933c91b3cd) - -Resolves: #2055026 ---- - dracut-init.sh | 14 ++++++++++++++ - dracut.sh | 11 +---------- - modules.d/99squash/module-setup.sh | 8 +++----- - 3 files changed, 18 insertions(+), 15 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index 032c38c2..5df2e583 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -443,6 +443,20 @@ inst_rules_wildcard() { - [[ $_found ]] || dinfo "Skipping udev rule: $_rule" - } - -+# make sure that library links are correct and up to date -+build_ld_cache() { -+ for f in "$dracutsysrootdir"/etc/ld.so.conf "$dracutsysrootdir"/etc/ld.so.conf.d/*; do -+ [[ -f $f ]] && inst_simple "${f#$dracutsysrootdir}" -+ done -+ if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then -+ if [[ $EUID == 0 ]]; then -+ derror "ldconfig exited ungracefully" -+ else -+ derror "ldconfig might need uid=0 (root) for chroot()" -+ fi -+ fi -+} -+ - prepare_udev_rules() { - [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; }) - -diff --git a/dracut.sh b/dracut.sh -index 702b2f78..57f51e91 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1601,16 +1601,7 @@ done - - if [[ $kernel_only != yes ]]; then - # make sure that library links are correct and up to date -- for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do -- [[ -f $f ]] && inst_simple "$f" -- done -- if ! ldconfig -r "$initdir"; then -- if [[ $EUID = 0 ]]; then -- derror "ldconfig exited ungracefully" -- else -- derror "ldconfig might need uid=0 (root) for chroot()" -- fi -- fi -+ build_ld_cache - fi - - if [[ $do_hardlink = yes ]] && command -v hardlink >/dev/null; then -diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh -index e73d3184..8a0923fb 100644 ---- a/modules.d/99squash/module-setup.sh -+++ b/modules.d/99squash/module-setup.sh -@@ -28,11 +28,6 @@ installpost() { - [[ "$squash_dir" == "$i"/* ]] || mv "$i" "$squash_dir"/ - done - -- # initdir also needs ld.so.* to make ld.so work -- inst /etc/ld.so.cache -- inst /etc/ld.so.conf -- inst_dir /etc/ld.so.conf.d -- - # Create mount points for squash loader - mkdir -p "$initdir"/squash/ - mkdir -p "$squash_dir"/squash/ -@@ -68,6 +63,9 @@ installpost() { - ln_r /usr/bin /bin - ln_r /usr/sbin /sbin - inst_simple "$moddir"/init-squash.sh /init -+ -+ # make sure that library links are correct and up to date for squash loader -+ build_ld_cache - } - - install() { - diff --git a/SOURCES/0220.patch b/SOURCES/0220.patch deleted file mode 100644 index fd53f20..0000000 --- a/SOURCES/0220.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 82a47345a8e7d54616481098b7b16de6e7fba83b Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 9 Aug 2021 09:01:32 +0200 -Subject: [PATCH] fix(network-manager): write DHCP filename option to dhcpopts - file - -Anaconda parses the 'filename' variable [1] set in /tmp/net.$netif.dhcpopts to -determine the name of the kickstart file to use. - -[1] https://github.com/rhinstaller/anaconda/blob/anaconda-35.21-1/dracut/fetch-kickstart-net.sh#L31-L34 - -(Cherry-picked from commit 1513505db452f9425ae1d25b9bb28c176d9c7ed9) - -Resolves: #1991449 ---- - 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 61752384..94c19545 100755 ---- a/modules.d/35network-manager/nm-run.sh -+++ b/modules.d/35network-manager/nm-run.sh -@@ -22,7 +22,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;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts -+ sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p;s/dhcp-bootfile/filename/p' <$state >/tmp/dhclient.$ifname.dhcpopts - source_hook initqueue/online $ifname - /sbin/netroot $ifname - done - diff --git a/SOURCES/0221.patch b/SOURCES/0221.patch deleted file mode 100644 index 13c2971..0000000 --- a/SOURCES/0221.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 7e401546ec38b3b5858136e93aeeffb93e496556 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 10 Jan 2023 10:43:50 +0100 -Subject: [PATCH] fix(dracut-init): use ldconfig directly instead of - DRACUT_LDCONFIG - -RHEL-only -Resolves: #2141480 ---- - dracut-init.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index 5df2e583..b6708288 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -448,7 +448,7 @@ build_ld_cache() { - for f in "$dracutsysrootdir"/etc/ld.so.conf "$dracutsysrootdir"/etc/ld.so.conf.d/*; do - [[ -f $f ]] && inst_simple "${f#$dracutsysrootdir}" - done -- if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then -+ if ! ldconfig -r "$initdir" -f /etc/ld.so.conf; then - if [[ $EUID == 0 ]]; then - derror "ldconfig exited ungracefully" - else - diff --git a/SOURCES/0222.patch b/SOURCES/0222.patch deleted file mode 100644 index 8674e63..0000000 --- a/SOURCES/0222.patch +++ /dev/null @@ -1,48 +0,0 @@ -From a7eaedb1679d871c213753fad872d65b23070240 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Thu, 19 Jan 2023 16:04:19 +0100 -Subject: [PATCH] fix(dracut-init.sh): backport common paths - -While backporting, some paths might be expected to be defined. -Backporting these paths as a preemptive measure (there's no test) -to avoid possible regressions when they're undefined. - -(Cherry-picked from a01204202b3014c0c761c93bc7de8bf35e6dc5ef -and 18d36fabf5ab20404e63ae56f166a5a53a874ba9) - -RHEL-only -Resolves: #2141480 ---- - dracut-init.sh | 4 ++++ - dracut.sh | 2 ++ - 2 files changed, 6 insertions(+) - -diff --git a/dracut-init.sh b/dracut-init.sh -index b6708288..50f9cf98 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -79,6 +79,10 @@ export srcmods - export hookdirs - } - -+DRACUT_LDD=${DRACUT_LDD:-ldd} -+DRACUT_TESTBIN=${DRACUT_TESTBIN:-/bin/sh} -+DRACUT_LDCONFIG=${DRACUT_LDCONFIG:-ldconfig} -+ - . $dracutbasedir/dracut-functions.sh - - # Detect lib paths -diff --git a/dracut.sh b/dracut.sh -index 57f51e91..f58559e8 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -730,6 +730,8 @@ done - export PATH="${NPATH#:}" - unset NPATH - -+export SYSTEMCTL=${SYSTEMCTL:-systemctl} -+ - # these options add to the stuff in the config file - (( ${#add_dracutmodules_l[@]} )) && add_dracutmodules+=" ${add_dracutmodules_l[@]} " - (( ${#force_add_dracutmodules_l[@]} )) && force_add_dracutmodules+=" ${force_add_dracutmodules_l[@]} " - diff --git a/SOURCES/0223.patch b/SOURCES/0223.patch deleted file mode 100644 index ed789ff..0000000 --- a/SOURCES/0223.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 8525d05be0896f5016e71d501d979ece02373ac1 Mon Sep 17 00:00:00 2001 -From: Lev Veyde -Date: Thu, 22 Apr 2021 01:11:55 +0300 -Subject: [PATCH] fix(img-lib): ignored null byte in input - -The system currently throws numerous nasty warning messages during -the boot, about ignored null bytes in input. - -This patch adds a filter to the dd command, to filter these null -bytes out, and thus to prevent these warning messages. - -Signed-off-by: Lev Veyde - -(Cherry-picked from commit: cf04e49512c244dae5d785869ebfb9c8f4710c7e) -Resolves: rhbz#1952400 ---- - modules.d/99img-lib/img-lib.sh | 2 +- - modules.d/99img-lib/module-setup.sh | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99img-lib/img-lib.sh b/modules.d/99img-lib/img-lib.sh -index f4774153..ada35ccb 100755 ---- a/modules.d/99img-lib/img-lib.sh -+++ b/modules.d/99img-lib/img-lib.sh -@@ -9,7 +9,7 @@ - det_archive() { - # NOTE: echo -e works in ash and bash, but not dash - local bz="BZh" xz="$(echo -e '\xfd7zXZ')" gz="$(echo -e '\x1f\x8b')" zs="$(echo -e '\x28\xB5\x2F\xFD')" -- local headerblock="$(dd ${1:+if=$1} bs=262 count=1 2>/dev/null)" -+ local headerblock="$(dd ${1:+if=$1} bs=262 count=1 2>/dev/null | tr -d '\0')" - case "$headerblock" in - $xz*) echo "xz" ;; - $gz*) echo "gzip" ;; -diff --git a/modules.d/99img-lib/module-setup.sh b/modules.d/99img-lib/module-setup.sh -index fe1eca1a..92c1d1dd 100755 ---- a/modules.d/99img-lib/module-setup.sh -+++ b/modules.d/99img-lib/module-setup.sh -@@ -3,7 +3,7 @@ - - # called by dracut - check() { -- require_binaries tar gzip dd bash || return 1 -+ require_binaries tar gzip dd bash tr || return 1 - return 255 - } - -@@ -14,7 +14,7 @@ depends() { - - # called by dracut - install() { -- inst_multiple tar gzip dd bash -+ inst_multiple tar gzip dd bash tr - # TODO: make this conditional on a cmdline flag / config option - inst_multiple -o cpio xz bzip2 zstd - inst_simple "$moddir/img-lib.sh" "/lib/img-lib.sh" - diff --git a/SOURCES/0224.patch b/SOURCES/0224.patch deleted file mode 100644 index e69f3c1..0000000 --- a/SOURCES/0224.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 26c332c9881db461e9af75015d8b7d46c877c39f Mon Sep 17 00:00:00 2001 -From: Coiby Xu -Date: Sun, 24 Apr 2022 10:52:33 +0800 -Subject: [PATCH] fix(kernel-network-modules): allow specifying empty - --hostonly-nics - -Commit 1e92f728 ("Add a --hostonly-nics option") allows only installing -the network drivers for specified NICs. But it doesn't allow an emtpy ---hostonly-nics. Specifying empty hostonly-nics is needed to address the -following use cases, - - drivers/s390/net is installed regardless of --hostonly-nics. There is - no need to repeat it. - - get_dev_module couldn't find the driver for a bond or a bridge - network interface so it's better for a module to install a bond - or bridge driver itself - - dracut kdump module wants to install the needed network drivers by - itself because it can't add the --hostonly-nics option to dracut when - itself is a dracut module - -This patch distinguishes between an empty --hostonly-nics and --hostonly-nics -not added so a user can pass an empty --hostonly-nics option. - -(Cherry-picked commit: 3cd4f1a3a793826708976414a33b5f61913f4a5e) - -Resolves: #2148318 ---- - modules.d/90kernel-network-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh -index f36d31f7..851bc31b 100755 ---- a/modules.d/90kernel-network-modules/module-setup.sh -+++ b/modules.d/90kernel-network-modules/module-setup.sh -@@ -22,7 +22,7 @@ installkernel() { - dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_symbols" "=drivers/s390/net" - fi - -- if [[ $hostonly_mode == 'strict' ]] && [[ $hostonly_nics ]]; then -+ if [[ $hostonly_mode == 'strict' ]] && [[ -n ${hostonly_nics+x} ]]; then - for _nic in $hostonly_nics; do - _net_drivers=$(get_dev_module /sys/class/net/$_nic) - if ! [[ $_net_drivers ]]; then - diff --git a/SOURCES/0225.patch b/SOURCES/0225.patch deleted file mode 100644 index 9116354..0000000 --- a/SOURCES/0225.patch +++ /dev/null @@ -1,60 +0,0 @@ -From d3d382cb0192c23abc448bd35b59502820a8b242 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Sun, 23 Jul 2023 19:44:17 +0200 -Subject: [PATCH] fix(rngd): install system service file - -as there's no reason to keep a copy; there shouldn't be any modifications. - -In case there are args stored in a separate file (Fedora and alike), -it needs to be supplied too, but without the option to change the user. - -(Cherry-picked commit: c47a44cb25c0892d9af6e66ee9d7cd2c3beca31f) - -Resolves: #2181543 ---- - modules.d/06rngd/module-setup.sh | 9 ++++++++- - modules.d/06rngd/rngd.service | 7 ------- - modules.d/06rngd/sysconfig | 1 + - 3 files changed, 9 insertions(+), 8 deletions(-) - -diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh -index 354bd0bb..7458e5dd 100644 ---- a/modules.d/06rngd/module-setup.sh -+++ b/modules.d/06rngd/module-setup.sh -@@ -32,7 +32,14 @@ check() { - - install() { - inst rngd -- inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service" -+ inst_simple "${systemdsystemunitdir}/rngd.service" -+ -+ if [ -r /etc/sysconfig/rngd ]; then -+ inst_simple "${moddir}/sysconfig" "/etc/sysconfig/rngd" -+ fi -+ -+ # make sure dependant libs are installed too -+ inst_libdir_file opensc-pkcs11.so - - systemctl -q --root "$initdir" add-wants sysinit.target rngd.service - } -diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service -deleted file mode 100644 -index 570fbedb..00000000 ---- a/modules.d/06rngd/rngd.service -+++ /dev/null -@@ -1,7 +0,0 @@ --[Unit] --Description=Hardware RNG Entropy Gatherer Daemon --DefaultDependencies=no --Before=systemd-udevd.service -- --[Service] --ExecStart=/usr/sbin/rngd -f -diff --git a/modules.d/06rngd/sysconfig b/modules.d/06rngd/sysconfig -new file mode 100644 -index 00000000..100e8deb ---- /dev/null -+++ b/modules.d/06rngd/sysconfig -@@ -0,0 +1 @@ -+RNGD_ARGS="--fill-watermark=0 -x pkcs11 -x nist -x qrypt" - diff --git a/SOURCES/0226.patch b/SOURCES/0226.patch deleted file mode 100644 index 1fc9be0..0000000 --- a/SOURCES/0226.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 62fb051db129a1cbb5645107933e961a57d8bef3 Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Tue, 25 Apr 2023 14:56:59 +0200 -Subject: [PATCH] feat(hwdb): install hwdb on demand when module is needed - -Adding a module to install hwdb. Further extensions might make only selected -part of hwdb installable, to save space. The module is not included by default. - -Including the module adds 2MB of compressed data (on Fedora, the file has 12MB). - -hwdb is needed in case of custom HW, like a keyboard/mouse or various interfaces. - -Original PR: https://github.com/dracutdevs/dracut/pull/1681 - -(Cherry-picked commit: 062e739d89543a38d4b3e2cab155912bc4bf9e56) - -Resolves: #1968118 ---- - dracut.sh | 6 ++++++ - dracut.spec | 1 + - modules.d/95hwdb/module-setup.sh | 26 ++++++++++++++++++++++++++ - 3 files changed, 33 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index f58559e8..869b90b0 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1302,6 +1302,12 @@ if ! [[ -d "$udevdir" ]]; then - [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev - fi - -+[[ -d $udevconfdir ]] \ -+ || udevconfdir="$(pkg-config udev --variable=udevconfdir 2>/dev/null)" -+if ! [[ -d "$udevconfdir" ]]; then -+ [[ -d /etc/udev ]] && udevconfdir=/etc/udev -+fi -+ - [[ -d $systemdutildir ]] \ - || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null) - -diff --git a/dracut.spec b/dracut.spec -index 90fa903a..a417f780 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -365,6 +365,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ - %{dracutlibdir}/modules.d/91crypt-loop - %{dracutlibdir}/modules.d/95debug - %{dracutlibdir}/modules.d/95fstab-sys -+%{dracutlibdir}/modules.d/95hwdb - %{dracutlibdir}/modules.d/95lunmask - %{dracutlibdir}/modules.d/95nvmf - %{dracutlibdir}/modules.d/95resume -diff --git a/modules.d/95hwdb/module-setup.sh b/modules.d/95hwdb/module-setup.sh -new file mode 100755 -index 00000000..16365377 ---- /dev/null -+++ b/modules.d/95hwdb/module-setup.sh -@@ -0,0 +1,26 @@ -+#!/bin/bash -+# This file is part of dracut. -+# SPDX-License-Identifier: GPL-2.0-or-later -+ -+check() { -+ return 255 -+} -+ -+# called by dracut -+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. -+ hwdb_bin="${udevdir}"/hwdb.bin -+ -+ if [[ ! -r "${hwdb_bin}" ]]; then -+ hwdb_bin="${udevconfdir}"/hwdb.bin -+ fi -+ -+ if [[ $hostonly ]]; then -+ inst_multiple -H "${hwdb_bin}" -+ else -+ inst_multiple "${hwdb_bin}" -+ fi -+} - diff --git a/SOURCES/0227.patch b/SOURCES/0227.patch deleted file mode 100644 index 7a9b2a4..0000000 --- a/SOURCES/0227.patch +++ /dev/null @@ -1,55 +0,0 @@ -From a6f8ccba4b55a1f3715a0fd3d8f611b954e443a5 Mon Sep 17 00:00:00 2001 -From: David Hildenbrand -Date: Thu, 18 Mar 2021 10:41:49 +0100 -Subject: [PATCH] feat(qemu): include the virtio_mem kernel module - -This adds support for virtio-mem devices, which provide a dynamic -amount of memory in a VM. Right now, the driver gets loaded and any -memory gets added to the system when loading the kernel module from disk. - -While not strictly required to boot, we want to be able to -1) add virito-mem provided memory to the system early while booting up -2) add virtio-mem provided memory even when booting without a disk -3) add virtio-mem devices without adding actual memory in kdump - environments such that we can query things like: - a) is a certain PFN currently plugged in the hypervisor and, therefore, - should actually be read when creating a system dump. (kexec-tools - prepares the vmcore header, like on x86-64) - b) which ranges of a virtio-mem device are currently plugged in the - hypervisor and, therefore, should be added to the dump. (vmcore header - gets prepared by the crashkernel, like on s390x) - Note that loading virtio-mem in kdump environments currently fails with - -EBUSY -- but there are plans to install proper hooks instead to support - especially a) in the near future. - -1) and 2) are only really effective when memory hotplug is configured to -automatically online all added system RAM in the kernel (and not late, -via udev rules): e.g., via "mhp_default_state=online" on the kernel -cmdline or via CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE in the kernel. - -Especially 2) and 3) require the module to be present inside the initial -ramdisk. The primary use case for including it in the initial ramdisk -is 3). - -Signed-off-by: David Hildenbrand -(cherry picked from commit f3dcb60619671f2d353caaa42d38207172c8b3ba) - -Cherry-picked from: f3dcb60619671f2d353caaa42d38207172c8b3ba -Resolves: #2228422 ---- - modules.d/90qemu/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh -index 7e5ea6a4..e89dafbb 100755 ---- a/modules.d/90qemu/module-setup.sh -+++ b/modules.d/90qemu/module-setup.sh -@@ -31,7 +31,7 @@ installkernel() { - hostonly='' instmods \ - ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ - virtio_blk virtio virtio_ring virtio_pci \ -- virtio_scsi virtio_console virtio_rng \ -+ virtio_scsi virtio_console virtio_rng virtio_mem \ - spapr-vscsi \ - qemu_fw_cfg - } diff --git a/SOURCES/0228.patch b/SOURCES/0228.patch deleted file mode 100644 index 89753da..0000000 --- a/SOURCES/0228.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9f4ce92bdf294cb69991c974ba440f286b43acd4 Mon Sep 17 00:00:00 2001 -From: Wenchao Hao -Date: Fri, 29 Apr 2022 14:09:02 +0800 -Subject: [PATCH] fix(iscsi): do not exit in handle_netroot() if discovery - failed - -User may specify multiple netroot in cmdline, failed to connect one netroot -do not mean all netroot are not accessible. So if one netroot failed, do -not exit the discovery and login flow. - -Signed-off-by: Wenchao Hao - -(Cherry-picked commit: 319dc7fe10585a19d1a051f8ad1ba0190f86ff1f) - -Resolves: RHEL-11779 ---- - modules.d/95iscsi/iscsiroot.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 6a12a108..029060e0 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -211,7 +211,7 @@ handle_netroot() - fi - - targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/') -- [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1 -+ [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && return 1 - - found= - for target in $targets; do - diff --git a/SOURCES/0229.patch b/SOURCES/0229.patch deleted file mode 100644 index 2d63074..0000000 --- a/SOURCES/0229.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 243dcc41710cb8475ec4188b39fca98258baac99 Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo -Date: Thu, 1 Sep 2022 11:47:09 +0200 -Subject: [PATCH] feat(systemd): install systemd-sysroot-fstab-check - -systemd-sysroot-fstab-check is a symlink to systemd-fstab-generator added in -systemd commit https://github.com/systemd/systemd/commit/cd7ad0cb - -(cherry picked from commit 23684e4a2bb024595ad63d9f49d83b4693537110) - -Resolves: RHEL-12408 ---- - modules.d/00systemd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 38c244a2..1e75afbc 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -47,6 +47,7 @@ install() { - $systemdutildir/systemd-sysctl \ - $systemdutildir/systemd-modules-load \ - $systemdutildir/systemd-vconsole-setup \ -+ $systemdutildir/systemd-sysroot-fstab-check \ - $systemdutildir/system-generators/systemd-fstab-generator \ - $systemdutildir/system-generators/systemd-gpt-auto-generator \ - \ - diff --git a/SOURCES/0230.patch b/SOURCES/0230.patch deleted file mode 100644 index 1c38768..0000000 --- a/SOURCES/0230.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 81b6ee891bae6b2b0271f8449f7fd698e278c40a Mon Sep 17 00:00:00 2001 -From: Pavel Valena -Date: Wed, 7 Jun 2023 22:12:45 +0200 -Subject: [PATCH] fix(fcoe-uefi): exit early on empty vlan - -Exit early in case get_fcoe_boot_vlan exits with error or just an empty string, -instead of producing invalid config entry. - -(Cherry-picked commit: 45fc8df1cf3fdf9726efda4d26c7cccb9e6aedd2) - -Resolves: RHEL-16551 ---- - modules.d/95fcoe-uefi/parse-uefifcoe.sh | 31 +++++++++++++++++-------------- - 1 file changed, 17 insertions(+), 14 deletions(-) - -diff --git a/modules.d/95fcoe-uefi/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh -index 87d49660..02fab138 100755 ---- a/modules.d/95fcoe-uefi/parse-uefifcoe.sh -+++ b/modules.d/95fcoe-uefi/parse-uefifcoe.sh -@@ -9,20 +9,23 @@ print_fcoe_uefi_conf() - local mac dev vlan - mac=$(get_fcoe_boot_mac "$1") - [ -z "$mac" ] && return 1 -- dev=$(set_ifname fcoe $mac) -- vlan=$(get_fcoe_boot_vlan "$1") -- if [ "$vlan" -ne "0" ]; then -- case "$vlan" in -- [0-9]*) -- printf "%s\n" "vlan=$dev.$vlan:$dev" -- dev="$dev.$vlan" -- ;; -- *) -- printf "%s\n" "vlan=$vlan:$dev" -- dev="$vlan" -- ;; -- esac -- fi -+ dev=$(set_ifname fcoe "$mac") -+ vlan=$(get_fcoe_boot_vlan "$1") || return 1 -+ case "$vlan" in -+ "0") ;; -+ -+ '') -+ return 1 -+ ;; -+ [0-9]*) -+ printf "%s\n" "vlan=$dev.$vlan:$dev" -+ dev="$dev.$vlan" -+ ;; -+ *) -+ printf "%s\n" "vlan=$vlan:$dev" -+ dev="$vlan" -+ ;; -+ esac - # fcoe=eth0:nodcb - printf "fcoe=%s\n" "$dev:nodcb" - return 0 diff --git a/SOURCES/0231.patch b/SOURCES/0231.patch deleted file mode 100644 index b0f490d..0000000 --- a/SOURCES/0231.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d28f91126a6d76503155e462b4e9f1a052f412ad Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo -Date: Mon, 14 Aug 2023 12:28:11 +0200 -Subject: [PATCH] fix(dracut.sh): remove microcode check based on - CONFIG_MICROCODE_[AMD|INTEL] - -`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since -https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore -this check is wrong and early microcode is always disabled. - -(Cherry-picked commit: 61b9cd16e049434597e398be61a47e0112382c5b) - -Resolves: RHEL-21023 ---- - dracut.sh | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 869b90b0..42e1650a 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1084,23 +1084,20 @@ fi - - if [[ $early_microcode = yes ]]; then - if [[ $hostonly ]]; then -- if [[ $(get_cpu_vendor) == "AMD" ]]; then -- check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode -- elif [[ $(get_cpu_vendor) == "Intel" ]]; then -- check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode -+ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then -+ check_kernel_config CONFIG_MICROCODE || unset early_microcode - else - unset early_microcode - fi - else -- ! check_kernel_config CONFIG_MICROCODE_AMD \ -- && ! check_kernel_config CONFIG_MICROCODE_INTEL \ -+ ! check_kernel_config CONFIG_MICROCODE \ - && unset early_microcode - fi - # Do not complain on non-x86 architectures as it makes no sense - case $(uname -m) in - x86_64|i?86) - [[ $early_microcode != yes ]] \ -- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y" -+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y" - ;; - *) ;; - esac - diff --git a/SOURCES/0232.patch b/SOURCES/0232.patch deleted file mode 100644 index e4d1081..0000000 --- a/SOURCES/0232.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 141a2ecf03efb77c0622dcc96b503e6344f63938 Mon Sep 17 00:00:00 2001 -From: Coiby Xu -Date: Wed, 14 Jul 2021 15:26:10 +0800 -Subject: [PATCH] fix(qeth_rules): check the existence of - /sys/devices/qeth/*/online beforehand - -On s390x KVM machines, the follow errors occurred, - $ kdumpctl rebuild - kdump: Rebuilding /boot/initramfs-4.18.0-321.el8.s390xkdump.img - /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory - /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory - -because s390x KVM uses virtual devices and /sys/devices/qeth/*/online -doesn't exist. Eliminate this error by checking the existence -beforehand. - -(Cherry-picked commit: 04fd4f0139c25e6f3846e759de15ac80ec807887) - -Resolves: RHEL-17239 ---- - modules.d/95qeth_rules/module-setup.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95qeth_rules/module-setup.sh b/modules.d/95qeth_rules/module-setup.sh -index d4d15118..1a067e90 100755 ---- a/modules.d/95qeth_rules/module-setup.sh -+++ b/modules.d/95qeth_rules/module-setup.sh -@@ -10,9 +10,10 @@ check() { - - [[ $hostonly ]] && { - for i in /sys/devices/qeth/*/online; do -- read _online < $i -- [ $_online -eq 1 ] && return 0 -- done -+ [ ! -f "$i" ] && continue -+ read -r _online < "$i" -+ [ "$_online" -eq 1 ] && return 0 -+ done - } - return 255 - } diff --git a/SPECS/dracut.spec b/dracut.spec similarity index 68% rename from SPECS/dracut.spec rename to dracut.spec index 671cf38..c3355c5 100644 --- a/SPECS/dracut.spec +++ b/dracut.spec @@ -5,306 +5,96 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 233.git20240115 Name: dracut -Version: 049 -Release: %{dist_free_release}%{?dist} +Version: 105 +Release: 4%{?dist} Summary: Initramfs generator using udev -%if 0%{?fedora} || 0%{?rhel} -Group: System Environment/Base -%endif -%if 0%{?suse_version} -Group: System/Base -%endif # The entire source code is GPLv2+ # except install/* which is LGPLv2+ -License: GPLv2+ and LGPLv2+ +# except util/* which is GPLv2 +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-only -URL: https://dracut.wiki.kernel.org/ +URL: https://github.com/dracut-ng/dracut-ng/wiki/ -# Source can be generated by -# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz -Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz -Patch1: 0001.patch -Patch2: 0002.patch -Patch3: 0003.patch -Patch4: 0004.patch -Patch5: 0005.patch -Patch6: 0006.patch -Patch7: 0007.patch -Patch8: 0008.patch -Patch9: 0009.patch -Patch10: 0010.patch -Patch11: 0011.patch -Patch12: 0012.patch -Patch13: 0013.patch -Patch14: 0014.patch -Patch15: 0015.patch -Patch16: 0016.patch -Patch17: 0017.patch -Patch18: 0018.patch -Patch19: 0019.patch -Patch20: 0020.patch -Patch21: 0021.patch -Patch22: 0022.patch -Patch23: 0023.patch -Patch24: 0024.patch -Patch25: 0025.patch -Patch26: 0026.patch -Patch27: 0027.patch -Patch28: 0028.patch -Patch29: 0029.patch -Patch30: 0030.patch -Patch31: 0031.patch -Patch32: 0032.patch -Patch33: 0033.patch -Patch34: 0034.patch -Patch35: 0035.patch -Patch36: 0036.patch -Patch37: 0037.patch -Patch38: 0038.patch -Patch39: 0039.patch -Patch40: 0040.patch -Patch41: 0041.patch -Patch42: 0042.patch -Patch43: 0043.patch -Patch44: 0044.patch -Patch45: 0045.patch -Patch46: 0046.patch -Patch47: 0047.patch -Patch48: 0048.patch -Patch49: 0049.patch -Patch50: 0050.patch -Patch51: 0051.patch -Patch52: 0052.patch -Patch53: 0053.patch -Patch54: 0054.patch -Patch55: 0055.patch -Patch56: 0056.patch -Patch57: 0057.patch -Patch58: 0058.patch -Patch59: 0059.patch -Patch60: 0060.patch -Patch61: 0061.patch -Patch62: 0062.patch -Patch63: 0063.patch -Patch64: 0064.patch -Patch65: 0065.patch -Patch66: 0066.patch -Patch67: 0067.patch -Patch68: 0068.patch -Patch69: 0069.patch -Patch70: 0070.patch -Patch71: 0071.patch -Patch72: 0072.patch -Patch73: 0073.patch -Patch74: 0074.patch -Patch75: 0075.patch -Patch76: 0076.patch -Patch77: 0077.patch -Patch78: 0078.patch -Patch79: 0079.patch -Patch80: 0080.patch -Patch81: 0081.patch -Patch82: 0082.patch -Patch83: 0083.patch -Patch84: 0084.patch -Patch85: 0085.patch -Patch86: 0086.patch -Patch87: 0087.patch -Patch88: 0088.patch -Patch89: 0089.patch -Patch90: 0090.patch -Patch91: 0091.patch -Patch92: 0092.patch -Patch93: 0093.patch -Patch94: 0094.patch -Patch95: 0095.patch -Patch96: 0096.patch -Patch97: 0097.patch -Patch98: 0098.patch -Patch99: 0099.patch -Patch100: 0100.patch -Patch101: 0101.patch -Patch102: 0102.patch -Patch103: 0103.patch -Patch104: 0104.patch -Patch105: 0105.patch -Patch106: 0106.patch -Patch107: 0107.patch -Patch108: 0108.patch -Patch109: 0109.patch -Patch110: 0110.patch -Patch111: 0111.patch -Patch112: 0112.patch -Patch113: 0113.patch -Patch114: 0114.patch -Patch115: 0115.patch -Patch116: 0116.patch -Patch117: 0117.patch -Patch118: 0118.patch -Patch119: 0119.patch -Patch120: 0120.patch -Patch121: 0121.patch -Patch122: 0122.patch -Patch123: 0123.patch -Patch124: 0124.patch -Patch125: 0125.patch -Patch126: 0126.patch -Patch127: 0127.patch -Patch128: 0128.patch -Patch129: 0129.patch -Patch130: 0130.patch -Patch131: 0131.patch -Patch132: 0132.patch -Patch133: 0133.patch -Patch134: 0134.patch -Patch135: 0135.patch -Patch136: 0136.patch -Patch137: 0137.patch -Patch138: 0138.patch -Patch139: 0139.patch -Patch140: 0140.patch -Patch141: 0141.patch -Patch142: 0142.patch -Patch143: 0143.patch -Patch144: 0144.patch -Patch145: 0145.patch -Patch146: 0146.patch -Patch147: 0147.patch -Patch148: 0148.patch -Patch149: 0149.patch -Patch150: 0150.patch -Patch151: 0151.patch -Patch152: 0152.patch -Patch153: 0153.patch -Patch154: 0154.patch -Patch155: 0155.patch -Patch156: 0156.patch -Patch157: 0157.patch -Patch158: 0158.patch -Patch159: 0159.patch -Patch160: 0160.patch -Patch161: 0161.patch -Patch162: 0162.patch -Patch163: 0163.patch -Patch164: 0164.patch -Patch165: 0165.patch -Patch166: 0166.patch -Patch167: 0167.patch -Patch168: 0168.patch -Patch169: 0169.patch -Patch170: 0170.patch -Patch171: 0171.patch -Patch172: 0172.patch -Patch173: 0173.patch -Patch174: 0174.patch -Patch175: 0175.patch -Patch176: 0176.patch -Patch177: 0177.patch -Patch178: 0178.patch -Patch179: 0179.patch -Patch180: 0180.patch -Patch181: 0181.patch -Patch182: 0182.patch -Patch183: 0183.patch -Patch184: 0184.patch -Patch185: 0185.patch -Patch186: 0186.patch -Patch187: 0187.patch -Patch188: 0188.patch -Patch189: 0189.patch -Patch190: 0190.patch -Patch191: 0191.patch -Patch192: 0192.patch -Patch193: 0193.patch -Patch194: 0194.patch -Patch195: 0195.patch -Patch196: 0196.patch -Patch197: 0197.patch -Patch198: 0198.patch -Patch199: 0199.patch -Patch200: 0200.patch -Patch201: 0201.patch -Patch202: 0202.patch -Patch203: 0203.patch -Patch204: 0204.patch -Patch205: 0205.patch -Patch206: 0206.patch -Patch207: 0207.patch -Patch208: 0208.patch -Patch209: 0209.patch -Patch210: 0210.patch -Patch211: 0211.patch -Patch212: 0212.patch -Patch213: 0213.patch -Patch214: 0214.patch -Patch215: 0215.patch -Patch216: 0216.patch -Patch217: 0217.patch -Patch218: 0218.patch -Patch219: 0219.patch -Patch220: 0220.patch -Patch221: 0221.patch -Patch222: 0222.patch -Patch223: 0223.patch -Patch224: 0224.patch -Patch225: 0225.patch -Patch226: 0226.patch -Patch227: 0227.patch -Patch228: 0228.patch -Patch229: 0229.patch -Patch230: 0230.patch -Patch231: 0231.patch -Patch232: 0232.patch +Source0: https://github.com/dracut-ng/dracut-ng/archive/refs/tags/%{version}.tar.gz Source1: https://www.gnu.org/licenses/lgpl-2.1.txt +# revert: "fix(install.d): correctly install pre-genned image and die if no args" +# Author: Pavel Valena +Patch1: 0001-revert-fix-install.d-correctly-install-pre-genned-im.patch +# feat(kernel-install): do nothing when $KERNEL_INSTALL_INITRD_GENERATOR says so +# Author: Zbigniew Jędrzejewski-Szmek +Patch2: 0002-feat-kernel-install-do-nothing-when-KERNEL_INSTALL_I.patch +# fix(kernel-install): do not generate an initrd when one was specified +# Author: Zbigniew Jędrzejewski-Szmek +Patch3: 0003-fix-kernel-install-do-not-generate-an-initrd-when-on.patch +# fix(resume): always include the resume module +# Author: Pavel Valena +Patch4: 0004-fix-resume-always-include-the-resume-module.patch +# fix(nfs): set correct ownership and permissions for statd directory +# Author: Lukas Nykryn +Patch5: 0005-fix-nfs-set-correct-ownership-and-permissions-for-st.patch +# feat(dracut-init.sh): give --force-add precedence over --omit +# Author: Pavel Valena +Patch6: 0006-feat-dracut-init.sh-give-force-add-precedence-over-o.patch +# feat(lsinitrd.sh): look for initrd in /usr/lib/modules/ +# Author: Pavel Valena +Patch7: 0007-feat-lsinitrd.sh-look-for-initrd-in-usr-lib-modules.patch +# feat(fips): include fips module unconditionally +# Author: Pavel Valena +Patch8: 0008-feat-fips-include-fips-module-unconditionally.patch +# fix(systemd-ask-password): do not half-install systemd-ask-password-wall +# Author: Jo Zzsi +Patch9: 0009-fix-systemd-ask-password-do-not-half-install-systemd.patch +# fix(pcsc): add libpcsclite_real.so.* +# Author: Manuel Fombuena +Patch10: 0010-fix-pcsc-add-libpcsclite_real.so.patch +# revert: "fix(rescue): make rescue always no-hostonly" +# Author: Pavel Valena +Patch11: 0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch +# fix(dracut-install): initize fts pointer +# Author: Pavel Valena +Patch12: 0012-fix-dracut-install-initize-fts-pointer.patch +# feat: add openssl module +# Author: Pavel Valena +Patch13: 0013-feat-add-openssl-module.patch +# fix(openssl): harden ossl build CFLAGS +# Author: Pavel Valena +Patch14: 0014-fix-openssl-harden-ossl-build-CFLAGS.patch +# fix(ossl): copy executables for the test suite +# Author: Pavel Valena +Patch15: 0015-fix-ossl-copy-executables-for-the-test-suite.patch +# fix(rescue): create hmac file for rescue kernel +# Author: Pavel Valena +Patch16: 0016-fix-rescue-create-hmac-file-for-rescue-kernel.patch + +# Please use source-git to work with this spec file: +# HowTo: https://packit.dev/source-git/work-with-source-git +# Source-git repository: https://github.com/redhat-plumbers/dracut-rhel10/ BuildRequires: bash -BuildRequires: git -BuildRequires: kmod-devel >= 23 +BuildRequires: git-core +BuildRequires: pkgconfig(libkmod) >= 23 BuildRequires: gcc -%if 0%{?fedora} || 0%{?rhel} BuildRequires: pkgconfig BuildRequires: systemd -%endif -%if 0%{?fedora} BuildRequires: bash-completion -%endif +BuildRequires: openssl-devel %if %{with doc} -%if 0%{?fedora} || 0%{?rhel} BuildRequires: docbook-style-xsl docbook-dtds libxslt -%endif - -%if 0%{?suse_version} -BuildRequires: docbook-xsl-stylesheets libxslt -%endif - BuildRequires: asciidoc %endif -%if 0%{?suse_version} > 9999 -Obsoletes: mkinitrd < 2.6.1 -Provides: mkinitrd = 2.6.1 -%endif - Obsoletes: dracut-fips <= 047 Provides: dracut-fips = %{version}-%{release} Obsoletes: dracut-fips-aesni <= 047 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 @@ -316,30 +106,21 @@ Requires: sed Requires: xz Requires: gzip -%if 0%{?fedora} || 0%{?rhel} Recommends: memstrack Recommends: hardlink Recommends: pigz Recommends: kpartx +Recommends: (tpm2-tools if tpm2-tss) Requires: util-linux >= 2.21 -Requires: systemd >= 239-23 +Requires: systemd >= 219 Requires: systemd-udev >= 219 Requires: procps-ng -%else -Requires: hardlink -Requires: gzip -Requires: kpartx -Requires: udev > 166 -Requires: util-linux-ng >= 2.21 -%endif -%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} Requires: libkcapi-hmaccalc -%endif %description dracut contains tools to create bootable initramfses for the Linux -kernel. Unlike previous implementations, dracut hard-codes as little +kernel. Unlike other implementations, dracut hard-codes as little as possible into the initramfs. dracut contains various modules which are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network @@ -347,18 +128,11 @@ package. %package network Summary: dracut modules to build a dracut initramfs with network support -%if 0%{?_module_build} -# In the module-build-service, we have pieces of dracut provided by different -# modules ("base-runtime" provides most functionality, but we need -# dracut-network in "installer". Since these two modules build with separate -# dist-tags, we need to reduce this strict requirement to ignore the dist-tag. -Requires: %{name} >= %{version}-%{dist_free_release} -%else Requires: %{name} = %{version}-%{release} -%endif Requires: iputils Requires: iproute -Requires: (NetworkManager >= 1.20 or dhclient) +Requires: jq +Requires: NetworkManager >= 1.20 Suggests: NetworkManager Obsoletes: dracut-generic < 008 Provides: dracut-generic = %{version}-%{release} @@ -378,15 +152,10 @@ initramfs with dracut, which drops capabilities. %package live Summary: dracut modules to build a dracut initramfs with live image capabilities -%if 0%{?_module_build} -# See the network subpackage comment. -Requires: %{name} >= %{version}-%{dist_free_release} -%else Requires: %{name} = %{version}-%{release} -%endif Requires: %{name}-network = %{version}-%{release} -Requires: tar gzip coreutils bash device-mapper curl -%if 0%{?fedora} +Requires: tar gzip coreutils bash device-mapper curl parted +%if ! 0%{?rhel} Requires: fuse ntfs-3g %endif @@ -423,7 +192,8 @@ 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: squashfs-tools +Requires: erofs-utils +Suggests: squashfs-tools %description squash This package provides a dracut module to build an initramfs, but store most files @@ -431,7 +201,7 @@ in a squashfs image, result in a smaller initramfs size and reduce runtime memor usage. %prep -%autosetup -n %{name}-%{version} -S git_am +%autosetup -n %{name}-ng-%{version} -S git_am cp %{SOURCE1} . %build @@ -443,36 +213,22 @@ cp %{SOURCE1} . %endif ${NULL} -make %{?_smp_mflags} +%make_build %install -make %{?_smp_mflags} install \ - DESTDIR=$RPM_BUILD_ROOT \ +%make_install %{?_smp_mflags} \ libdir=%{_prefix}/lib echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh -%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0 -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips -%endif - -%if %{defined _unitdir} -# for systemd, better use systemd-bootchart -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart -%endif - # we do not support dash in the initramfs rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash -# remove gentoo specific modules -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash +# 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 +# Remove obsolete module +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/35network-legacy %ifnarch s390 s390x # remove architecture specific modules @@ -481,51 +237,42 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/81cio_ignore rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/91zipl rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd_mod -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd_rules rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dcssblk -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95qeth_rules rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp -rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp_rules rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95znet %else rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock %endif +# we don't want example configs +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/dracut.conf.d + +# we don't ship tests +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/test +rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80test* + mkdir -p $RPM_BUILD_ROOT/boot/dracut mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs +mkdir -p $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d -%if 0%{?fedora} || 0%{?rhel} install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf rm -f $RPM_BUILD_ROOT%{_mandir}/man?/*suse* -%endif -%if 0%{?suse_version} -install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf -%endif - -%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999 -rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd -rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd -%endif echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf %files %if %{with doc} -%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg +%doc README.md docs/HACKING.md AUTHORS NEWS.md dracut.html docs/dracut.png docs/dracut.svg %endif -%{!?_licensedir:%global license %%doc} %license COPYING lgpl-2.1.txt %{_bindir}/dracut %{_datadir}/bash-completion/completions/dracut %{_datadir}/bash-completion/completions/lsinitrd -%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999 -%{_bindir}/mkinitrd %{_bindir}/lsinitrd -%endif %dir %{dracutlibdir} %dir %{dracutlibdir}/modules.d %{dracutlibdir}/dracut-functions.sh @@ -535,11 +282,12 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/dracut-logger.sh %{dracutlibdir}/dracut-initramfs-restore %{dracutlibdir}/dracut-install +%{dracutlibdir}/dracut-util +%{dracutlibdir}/ossl-config +%{dracutlibdir}/ossl-files %{dracutlibdir}/skipcpio %config(noreplace) %{_sysconfdir}/dracut.conf -%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} %{dracutlibdir}/dracut.conf.d/01-dist.conf -%endif %dir %{_sysconfdir}/dracut.conf.d %dir %{dracutlibdir}/dracut.conf.d %dir %{_datadir}/pkgconfig @@ -548,10 +296,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %if %{with doc} %{_mandir}/man8/dracut.8* %{_mandir}/man8/*service.8* -%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999 -%{_mandir}/man8/mkinitrd.8* %{_mandir}/man1/lsinitrd.1* -%endif %{_mandir}/man7/dracut.kernel.7* %{_mandir}/man7/dracut.cmdline.7* %{_mandir}/man7/dracut.modules.7* @@ -559,29 +304,55 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_mandir}/man5/dracut.conf.5* %endif -%if %{undefined _unitdir} -%{dracutlibdir}/modules.d/00bootchart -%endif %{dracutlibdir}/modules.d/00bash +%{dracutlibdir}/modules.d/00shell-interpreter %{dracutlibdir}/modules.d/00systemd +%{dracutlibdir}/modules.d/00systemd-network-management %ifnarch s390 s390x %{dracutlibdir}/modules.d/00warpclock %endif -%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} %{dracutlibdir}/modules.d/01fips -%endif +%{dracutlibdir}/modules.d/01fips-crypto-policies +%{dracutlibdir}/modules.d/01systemd-ac-power +%{dracutlibdir}/modules.d/01systemd-ask-password +%{dracutlibdir}/modules.d/01systemd-bsod +%{dracutlibdir}/modules.d/01systemd-coredump +%{dracutlibdir}/modules.d/01systemd-creds +%{dracutlibdir}/modules.d/01systemd-cryptsetup +%{dracutlibdir}/modules.d/01systemd-hostnamed %{dracutlibdir}/modules.d/01systemd-initrd +%{dracutlibdir}/modules.d/01systemd-integritysetup +%{dracutlibdir}/modules.d/01systemd-journald +%{dracutlibdir}/modules.d/01systemd-ldconfig +%{dracutlibdir}/modules.d/01systemd-modules-load +%{dracutlibdir}/modules.d/01systemd-pcrphase +%{dracutlibdir}/modules.d/01systemd-portabled +%{dracutlibdir}/modules.d/01systemd-pstore +%{dracutlibdir}/modules.d/01systemd-repart +%{dracutlibdir}/modules.d/01systemd-resolved +%{dracutlibdir}/modules.d/01systemd-sysext +%{dracutlibdir}/modules.d/01systemd-sysctl +%{dracutlibdir}/modules.d/01systemd-sysusers +%{dracutlibdir}/modules.d/01systemd-timedated +%{dracutlibdir}/modules.d/01systemd-timesyncd +%{dracutlibdir}/modules.d/01systemd-tmpfiles +%{dracutlibdir}/modules.d/01systemd-udevd +%{dracutlibdir}/modules.d/01systemd-veritysetup %{dracutlibdir}/modules.d/03modsign %{dracutlibdir}/modules.d/03rescue %{dracutlibdir}/modules.d/04watchdog %{dracutlibdir}/modules.d/04watchdog-modules -%{dracutlibdir}/modules.d/05busybox +%{dracutlibdir}/modules.d/06dbus-broker +%{dracutlibdir}/modules.d/06dbus-daemon %{dracutlibdir}/modules.d/06rngd +%{dracutlibdir}/modules.d/09dbus %{dracutlibdir}/modules.d/10i18n %{dracutlibdir}/modules.d/30convertfs +%{dracutlibdir}/modules.d/45net-lib %{dracutlibdir}/modules.d/45url-lib %{dracutlibdir}/modules.d/50drm %{dracutlibdir}/modules.d/50plymouth +%{dracutlibdir}/modules.d/62bluetooth %{dracutlibdir}/modules.d/80lvmmerge %{dracutlibdir}/modules.d/80lvmthinpool-monitor %{dracutlibdir}/modules.d/90btrfs @@ -593,36 +364,40 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/90lvm %{dracutlibdir}/modules.d/90mdraid %{dracutlibdir}/modules.d/90multipath +%{dracutlibdir}/modules.d/90nvdimm +%{dracutlibdir}/modules.d/90numlock +%{dracutlibdir}/modules.d/90overlayfs +%{dracutlibdir}/modules.d/90ppcmac +%{dracutlibdir}/modules.d/90pcmcia %{dracutlibdir}/modules.d/90qemu %{dracutlibdir}/modules.d/91crypt-gpg %{dracutlibdir}/modules.d/91crypt-loop +%{dracutlibdir}/modules.d/91fido2 +%{dracutlibdir}/modules.d/91pcsc +%{dracutlibdir}/modules.d/91pkcs11 +%{dracutlibdir}/modules.d/91tpm2-tss %{dracutlibdir}/modules.d/95debug %{dracutlibdir}/modules.d/95fstab-sys %{dracutlibdir}/modules.d/95hwdb %{dracutlibdir}/modules.d/95lunmask -%{dracutlibdir}/modules.d/95nvmf %{dracutlibdir}/modules.d/95resume %{dracutlibdir}/modules.d/95rootfs-block %{dracutlibdir}/modules.d/95terminfo %{dracutlibdir}/modules.d/95udev-rules %{dracutlibdir}/modules.d/95virtfs +%{dracutlibdir}/modules.d/95virtiofs %ifarch s390 s390x %{dracutlibdir}/modules.d/80cms %{dracutlibdir}/modules.d/81cio_ignore %{dracutlibdir}/modules.d/91zipl %{dracutlibdir}/modules.d/95dasd %{dracutlibdir}/modules.d/95dasd_mod -%{dracutlibdir}/modules.d/95dasd_rules %{dracutlibdir}/modules.d/95dcssblk -%{dracutlibdir}/modules.d/95qeth_rules %{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 @@ -631,8 +406,10 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/98syslog %{dracutlibdir}/modules.d/98usrmount %{dracutlibdir}/modules.d/99base +%{dracutlibdir}/modules.d/99busybox %{dracutlibdir}/modules.d/99memstrack %{dracutlibdir}/modules.d/99fs-lib +%{dracutlibdir}/modules.d/99openssl %{dracutlibdir}/modules.d/99shutdown %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log %dir %{_sharedstatedir}/initramfs @@ -654,18 +431,14 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_unitdir}/initrd.target.wants/dracut-pre-pivot.service %{_unitdir}/initrd.target.wants/dracut-pre-trigger.service %{_unitdir}/initrd.target.wants/dracut-pre-udev.service - %endif -%if 0%{?fedora} || 0%{?rhel} %{_prefix}/lib/kernel/install.d/50-dracut.install -%endif %files network -%{dracutlibdir}/modules.d/02systemd-networkd +%{dracutlibdir}/modules.d/01systemd-networkd +%{dracutlibdir}/modules.d/35connman %{dracutlibdir}/modules.d/35network-manager -%{dracutlibdir}/modules.d/35network-legacy %{dracutlibdir}/modules.d/40network -%{dracutlibdir}/modules.d/45ifcfg %{dracutlibdir}/modules.d/90kernel-network-modules %{dracutlibdir}/modules.d/90qemu-net %{dracutlibdir}/modules.d/95cifs @@ -674,6 +447,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 @@ -686,6 +460,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 @@ -701,6 +476,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %files squash %{dracutlibdir}/modules.d/99squash +%{dracutlibdir}/modules.d/99squash-lib +%{dracutlibdir}/modules.d/95squash-erofs +%{dracutlibdir}/modules.d/95squash-squashfs %files config-generic %{dracutlibdir}/dracut.conf.d/02-generic-image.conf @@ -709,374 +487,308 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/dracut.conf.d/02-rescue.conf %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install -%triggerin network -- dracut-network < 049-83.git20200525 -echo '# Since rhel-8.3 dracut moved to use NetworkManager -# On existing installations we want to preserve the old scripts -add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf - %changelog -* Mon Jan 15 2024 Pavel Valena - 049-233.git20240115 +* Thu Mar 06 2025 Pavel Valena - 105-4 +- fix(rescue): create hmac file for rescue kernel + +* Mon Feb 17 2025 Pavel Valena - 105-3 +- fix(ossl): copy executables for the test suite + +* Mon Feb 17 2025 Pavel Valena - 105-2 +- fix(openssl): harden ossl build CFLAGS + Related: RHEL-76323 + +* Mon Feb 17 2025 Pavel Valena - 105-1 +- build: upgrade to dracut 105 +- fix(systemd-ask-password): do not half-install systemd-ask-password-wall +- fix(pcsc): add libpcsclite_real.so.* +- revert: "fix(rescue): make rescue always no-hostonly" +- fix(dracut-install): initize fts pointer +- feat: add openssl module +- build: make erofs the default requirement for squash subpackage + Resolves: RHEL-65204,RHEL-68935,RHEL-76323 + +* Fri Nov 01 2024 Pavel Valena - 103-1 +- Update to dracut 103. +- feat(fips-crypto-policies): make c-p follow FIPS mode automatically +- fix(fips-crypto-policies): make it depend on fips dracut module + Resolves: RHEL-59678,RHEL-65204 + +* Tue Oct 29 2024 Troy Dawson - 102-4 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Wed Aug 28 2024 Pavel Valena - 102-3 +- revert(dracut-init.sh): add module to mods_to_load before checking dependencies +- fix(squash): remove cyclic dependency +- fix(dracut.sh): exit when installing the squash loader fails +- fix(squash-lib): harden against empty $initdir + Resolves: RHEL-43460 + +* Mon Aug 19 2024 Pavel Valena - 102-2 +- fix(nfs): set correct ownership and permissions for statd directory +- fix(resume): do not include resume if swap is on netdevice +- feat(dracut-init.sh): give --force-add precedence over --omit +- feat(lsinitrd.sh): look for initrd in /usr/lib/modules/ +- feat(fips): include fips module unconditionally +- fix(nfs): include also entries from /usr/lib/{passwd,group} +- fix(dracut-functions): avoid awk in get_maj_min() + Resolves: RHEL-39404,RHEL-47145,RHEL-53350,RHEL-53361,RHEL-53431,RHEL-53791,RHEL-54650 + +* Mon Jun 24 2024 Pavel Valena - 102-1 +- Update to dracut 102. + Resolves: RHEL-43460,RHEL-32237,RHEL-32506,RHEL-43460,RHEL-47145,RHEL-49744,RHEL-53350 + +* Mon Jun 24 2024 Troy Dawson - 101-2 +- Bump release for June 2024 mass rebuild + +* Thu May 16 2024 Pavel Valena - 101-1 +- Update to dracut 101. +- Remove network-legacy module. +- Additional fixes on top of rebase (see patches). + +* Sat Jan 27 2024 Manuel Fombuena - 059-21 +- fix(pkcs11): delete trailing dot on libcryptsetup-token-systemd-pkcs11.so +- fix(pcsc): add opensc load module file +- fix(pcsc): add --disable-polkit to pcscd.service + +* Wed Jan 24 2024 Fedora Release Engineering - 059-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 059-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Dec 08 2023 Dennis Gilmore - 059-18 +- Add Qualcomm IPC router to enable USB(Lenovo x13s) + +* Thu Nov 16 2023 Pavel Valena - 059-17 - fix(dracut.sh): remove microcode check based on -- fix(qeth_rules): check the existence of -* Thu Nov 16 2023 Pavel Valena - 049-231.git20231115 -- fix(iscsi): do not exit in handle_netroot() if discovery -- feat(systemd): install systemd-sysroot-fstab-check -- fix(fcoe-uefi): exit early on empty vlan +* Wed Nov 8 2023 Zbigniew Jedrzejewski-Szmek - 059-16 +- Backport patches to fix compatibility with systemd 255 -* Wed Aug 02 2023 Lukas Nykryn - 049-228.git20230802 -- feat(qemu): include the virtio_mem kernel module +* Sat Oct 28 2023 Adam Williamson - 059-15 +- Backport PR #2545 to fix media check failure visibility -* Tue Jul 25 2023 Pavel Valena - 049-227.git20230725 -- fix(rngd): install system service file -- feat(hwdb): install hwdb on demand when module is needed +* Thu Oct 05 2023 Adam Williamson - 059-14 +- Backport PR #2196 to fix boot with iso-scan feature -* Wed Jun 14 2023 Pavel Valena - 049-225.git20230614 -- fix(kernel-network-modules): allow specifying empty hostonly-nics - Resolves: #2148318 +* Wed Sep 20 2023 Pavel Valena - 059-13 +- fix(dracut.spec): add jq dependency to network subpackage -* Fri Mar 31 2023 Pavel Valena - 049-224.git20230330 -- fix(img-lib): ignored null byte in input +* Wed Aug 02 2023 Peter Robinson - 059-12 +- Include modules for IMA -* Thu Jan 19 2023 Pavel Valena - 049-223.git20230119 -- fix(dracut-init): use ldconfig directly instead of -- fix(dracut-init.sh): backport common paths +* Mon Jul 24 2023 Lukáš Nykrýn - 059-11 +- fix(dracut.sh): use dynamically uefi's sections offset -* Wed Dec 14 2022 Pavel Valena - 049-221.git20221214 -- fix(80lvmthinpool-monitor): use systemsctl instead of -- fix(squash): build ld cache for squash loader -- fix(network-manager): write DHCP filename option to dhcpopts +* Mon Jul 24 2023 Pavel Valena - 059-10 +- feat(nvmf): support for NVMeoF -* Thu Oct 20 2022 Pavel Valena - 049-218.git20221019 -- Dracut: only login to one target at a time -- iscsi: don't continue waiting if the root device is present -- network: stop waiting for interfaces if root device is -- iscsiroot: parse_iscsi_root overwrites command line args -- iscsiroot: there's never more than one target per call -- iscsiroot: try targets only once -- iscsiroot: remove bashisms -- fixup "Dracut: only login to one target at a time" -- 35network-legacy: only skip waiting for interfaces if netroot +* Wed Jul 19 2023 Fedora Release Engineering - 059-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Mon Aug 15 2022 Pavel Valena - 049-209.git20220815 -- fix(95iscsi): Fix network setup -- fix(dracut-systemd): correct service dependencies -- feat(lvm): add new module lvmthinpool-monitor -- fix(dracut-shutdown): add cleanup handler on failure +* Thu Jun 08 2023 Brian Masney - 059-8 +- Backport fix to add the interconnect drivers -* Wed May 11 2022 Pavel Valena - 049-202.git20220511 -- fix(fips): start iterating from 0 over BOOT_IMAGE entries +* Thu Apr 27 2023 Lukáš Zaoral - 059-7 +- migrate to SPDX license format -* Mon Jan 31 2022 Pavel Valena - 049-201.git20220131 -- ci: introduce C8S based GHA CI -- ci: backport TEST-21-NFS-NM -- dracut.sh: fix early microcode detection logic -- fix(url-lib): make pre-pivot hook separetely per nfs mount -- fix(watchdog): replace return with echo -- fix(network): add errors and warnings when network interface -- dracut.sh: add check for invalid configuration files -- fips: removed false-positive 'FATAL: Module xxx not found' -- fix(shutdown): be robust against forced shutdown -- fix(fips): handle s390x OSTree systems +* Thu Apr 27 2023 Michael Hofmann - 059-6 +- Backport fix to remove dependency on multipathd.socket -* Mon Sep 20 2021 Lukas Nykryn - 049-191.git20210920 -- fix(install): extend hwcaps library handling to libraries +* Tue Mar 14 2023 Dusty Mabe - 059-5 +- feat(network): include 98-default-mac-none.link if it exists -* Wed Aug 11 2021 Lukas Nykryn - 049-190.git20210811 -- fix(lsinitrd): TMP_DIR doesn't exist in RHEL8 -- fix(squash): apply FIPS and libpthread workaround +* Thu Mar 09 2023 Pavel Valena - 059-4 +- fix(dmsquash-live): restore compatibility with earlier releases +- Re-add overlayfs module (drop patch 1934) +- revert(network-manager): avoid restarting NetworkManager -* Mon Aug 02 2021 Lukas Nykryn - 049-188.git20210802 -- dracut-functions: fix botched backport -- squash: unsquash the root image instead of mounting it on -- 99squash: fail early if can't install require modules in -- 99squash: Don't hardcode the squash sub directories -- 99squash: improve pre-requirements check -- Fixed some SUSE specific typos and outputs -- 99squash: simplify the code -- 99squash: Check require module earlier, and properly -- fix(99squash): use kernel config instead of modprobe to check -- kill bogus comment -- busybox: simplify listing of supported utilities -- fix: use find_binary -- fix: shellcheck for modules.d/99squash/setup-squash.sh -- fix: shellcheck for modules.d/99squash/clear-squash.sh -- fix: shellcheck for modules.d/99squash/module-setup.sh -- fix(squash): this module shouldn't depend on bash -- refactor(squash): move the post install scripts into the -- fix: revise squash module checks -- fix(squash): post install should be the last step before -- refactor(squash): move all setup code to init-squash.sh -- feat(squash): install and depmod modules seperately -- refactor(squash): don't record mount points in text file -- lsinitrd: list squash content as well -- refactor(squash): structure in a cleaner way -- feat(squash): use busybox for early setup if available -- feat: squash module follow --compress option -- perf: disable initrd compression when squash module is -- fix(squash): shellcheck for modules.d/99squash -- fix(squash): don't mount the mount points if already mounted -- feat(squash): install umount util -- fix(squash): create relative symlinks -- fix(dracut.sh): handle '-i' option to include files beginning -- fix(dracut.sh): handle symlinks appropriately while using -- fix(squash): keep ld cache under initdir -- dracut-functions: backport block_is_* functions -- fix(squash): fixes related to squash module rebase -- fix(squash): remove tailing '/' when installing ld.so.conf.d +* Fri Feb 24 2023 Pavel Valena - 059-3 +- fix(dracut.sh): handle --kmoddir with trailing / -* Mon Jul 19 2021 Lukas Nykryn - 049-151.git20210719 -- Drop 51-dracut-rescue-postinst.sh entirely -- fix(fips): add dh and ecdh ciphers -- 35network-legacy: discard pointless RTNETLINK message -- 95fcoe: don't install if there is no FCoE hostonly devices -- 95nfs: set correct ownership and permissions for statd -- fix(dracut.sh): harden dracut against GZIP environment -- fix(multipath): stop multipath before udev db cleanup -- fix(dracut-functions): implement a cache for get_maj_min -- fix(dracut-functions): get_maj_min without -- fix(fcoe): rd.nofcoe=0 should disable fcoe -- fix(fcoe): rename rd.nofcoe to rd.fcoe -- fix(mdraid): remove offroot -- fix(mdraid): add grow continue service -- net-lib.sh: support infiniband network mac addresses -- 95nvmf: add nvmf-autoconnect script +* Tue Feb 21 2023 Pavel Valena - 059-2 +- Revert: PR#1934 add overlayfs module -* Mon Apr 26 2021 Lukas Nykryn - 049-136.git20210426 -- Remove stratis module +* Mon Feb 13 2023 Pavel Valena - 059-1 +- Update to 059 +- feat(dracut.sh): option to skip creating initrd +- feat(kernel-modules): driver support for macbook keyboards -* Thu Jan 21 2021 Lukas Nykryn - 049-135.git20210121 -- 95fcoe: default rd.nofcoe to false +* Thu Jan 19 2023 Fedora Release Engineering - 057-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild -* Thu Jan 14 2021 Lukas Nykryn - 049-134.git20210114 -- spec: dracut-network is happy with either NM or dhclient +* Sun Nov 13 2022 Davide Cavalca - 057-5 +- Backport fix to add sysctl to initramfs to handle modprobe files -* Tue Jan 12 2021 Lukas Nykryn - 049-133.git20210112 -- 95fcoe: Fix startup when fcoe module is included -- Fix pre-trigger stage by replacing exit with return in +* Sat Oct 15 2022 Neal Gompa - 057-4 +- Backport dmsquash-live-autooverlay module -* Thu Jan 07 2021 Lukas Nykryn - 049-131.git20210107 -- 00systemd: when putting systemd-vconsole-setup.service as a -- 51-dracut-rescue.install: Don't use BLS fragment shipped by +* Thu Aug 25 2022 Pavel Valena - 057-3 +- Re-add patch Never-enable-the-bluetooth-module-by-default-1521 +- Recommend tpm2-tools package, as it's required by crypt module -* Thu Jan 07 2021 Lukas Nykryn - 049-129.git20210107 -- Add a --hostonly-nics option -- dracut-install: ignore bogus preload libs +* Tue Aug 16 2022 Pavel Valena - 057-2 +- dmsquash-live-root: Run checkisomd5 on correct device -* Thu Jan 07 2021 Lukas Nykryn - 049-127.git20210107 -- match the whole string -- match simplified rd.zfcp format too -- base: hardcode rhel red -- 95iscsi: -- iscsi: fix error messages with iSCSI root -- 95nvmf: add module for NVMe-oF -- Write dns values passed by ip argument to ifcfg-* files -- dracut.sh: added help for --regenerate-all -- 35network-legacy: fix classless static route parsing -- network: fix glob matching ipv6 addresses -- dasd: only install /etc/dasd.conf if present -- 90multipath: install kpartx's 11-dm-parts.rules -- network/net-lib.sh: Configure all iBFT interfaces -- Change the order of NFS servers during the boot NFS server -- install: string_hash_func should not be fed with NULL -- Consider also drm_dev_register when looking for gpu driver -- fix graphics startup failure with the rhgb paramter in -- Configure the runner for team interfaces -- network-manager: set kernel hostname from the command line -- 95nvmf: add NVMe over TCP support -- 95fcoe: Add the rd.nofcoe option to disable the FCoE module -- 04watchdog: split the watchdog module install -- dracut.spec: include the 04watchdog-modules module -- 95fcoe: ensure needed modules are installed +* Thu Jul 21 2022 Fedora Release Engineering - 057-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild -* Tue Dec 15 2020 Lukas Nykryn - 049-103.git20201215 -- dracut-systemd: create the initrd.target.wants directory +* Mon Jul 18 2022 Pavel Valena - 057-1 +- Update to 057 -* Mon Nov 30 2020 Lukas Nykryn - 049-102.git20201130 -- multipathd: fix the comparison +* Tue Apr 19 2022 Kevin Fenzi - 056-2 +- Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes -* Mon Nov 30 2020 Lukas Nykryn - 049-101.git20201130 -- fix backport of 70b19acf +* Thu Mar 03 2022 Peter Robinson - 056-1 +- Update to 056 -* Fri Nov 20 2020 Lukas Nykryn - 049-100.git20201120 -- multipath: require kpartx binary -- Replace ln with systemctl -- multipath: add automatic configuration for multipath -- 98dracut-systemd: don't wait for root device if remote -- 90crypt: pull in remote-cryptsetup.target enablement +* Thu Jan 20 2022 Fedora Release Engineering - 055-8.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild -* Tue Aug 04 2020 Lukas Nykryn - 049-95.git20200804 -- 90kernel-modules: add pci_hyperv +* Mon Dec 20 2021 Hans de Goede - 055-8 +- Backport upstream changes for drm-privacy screen support in kernel >= 5.17 -* Thu Jul 09 2020 Lukas Nykryn - 049-94.git20200709 -- dracut.sh: Move the library workaround after squash -- dracut.sh: FIPS workaround for openssl-libs on Fedora/RHEL +* Thu Nov 4 2021 Jeremy Linton - 055-7 +- Backport Upstream: 15398458 fix(90kernel-modules): add isp1760 USB controller -* Thu Jul 02 2020 Lukas Nykryn - 049-92.git20200702 -- install/dracut-install.c: install module dependencies of -- install: also install post weak dependencies of kernel +* Tue Oct 26 2021 Olivier Lemasle - 055-6 +- Backport PR #1611 to fix network manager when console is not usable -* Thu Jul 02 2020 Lukas Nykryn - 049-90.git20200702 -- spec: don't use NM on existing installations +* Mon Oct 18 2021 Adam Williamson - 055-5 +- Backport PR #1584 to fix missing block drivers, boot in EC2 (#2010058) -* Thu Jun 25 2020 Lukas Nykryn - 049-89.git20200625 -- Adapt to the new udevadm version output -- network-manager: move connection generation to a lib file -- cms: regenerate NetworkManager connections +* Wed Oct 06 2021 Peter Robinson - 055-4 +- Add USB Type-C to fix display/input/storage attached via it (rhbz #1964218) -* Tue Jun 02 2020 Lukas Nykryn - 049-86.git20200602 -- Do not require non-empty kernel cmdline +* Wed Jul 21 2021 Fedora Release Engineering - 055-3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild -* Wed May 27 2020 Lukas Nykryn - 049-85.git20200527 -- 99memstrack: hook script should not call exit -- Remove cleanup_trace_mem calls +* Fri Jul 09 2021 Dusty Mabe - 055-3 +- Fixes for NM running via systemd+dbus in the initramfs +- Drop requirement on deprecated systemd-udev-settle -* Mon May 25 2020 Lukas Nykryn - 049-83.git20200525 -- Remove memtrace-ko and rd.memdebug=4 support in dracut -- Add 99memstrack module -- the strip command should avoid changing the file modification -- dracut.sh: Adjust squash and strip order -- Fine tune mksquashfs options for squash module -- 90kernel-modules: don't install any block driver if not -- 95znet: Add a rd.znet_ifname= option -- Revert "[RHEL] network: default to network-legacy even in +* Thu Jun 10 2021 Adam Williamson - 055-2 +- Never include bluetooth module by default (rhbz 1964879) (workaround) -* Wed Apr 22 2020 Lukas Nykryn - 049-75.git20200422 -- network-manager: fix getting of ifname from the sysfs path -- network-manager: don't run NetworkManager when there are no -- network-manager: ensure that nm-run.sh is executed when -- network-manager: install libnss DNS and mDNS plugins -- Always pull in machinery to read ifcfg files +* Thu May 27 2021 Harald Hoyer - 055-1 +- version 055 +- install the missing fsck utils -* Fri Feb 28 2020 Lukas Nykryn - 049-70.git20200228 -- network-legacy/ifup: fix ip=dhcp,dhcp6 setup_net logic +* Fri May 21 2021 Harald Hoyer - 054-12.git20210521 +- fix `get_maj_min` for kdump +- suppress hardlink output +- sane default --kerneldir for dracut-install +- squash: don't mount the mount points if already mounted -* Tue Feb 11 2020 Lukas Nykryn - 049-68.git20200211 -- Revert "wait for IPv6 RA if using none/static IPv6 assignment" -- dhclient-script: ipv6 uses different variables for nameservers -- 40network: bump rd.net.timeout.carrier to 10 seconds +* Tue May 18 2021 Harald Hoyer - 054-6.git20210518 +- fix for `str_replace: command not found` -* Wed Feb 05 2020 Lukas Nykryn - 049-65.git20200205 -- added debug-shell to initrd +* Mon May 17 2021 Harald Hoyer - 054-4.git20210517 +- version 054 -* Thu Jan 23 2020 Harald Hoyer - 049-64.git20200123 -- network-legacy/ifup: nuke pid and lease files if dhclient failed -Resolves: rhbz#1787620 +* Thu Apr 22 2021 Peter Robinson - 053-5 +- Backport: fix(90kernel-modules): add watchdog drivers for generic initrd (rhbz 1592148) -* Tue Jan 14 2020 Lukas Nykryn - 049-63.git20200114 -- network-legacy/ifup: fix typo when calling dhclient --timeout -- network-legacy/ifup: dhclient should be started in oneshot mode -- modules/network-manager: Install `ip` +* Mon Apr 19 2021 Dusty Mabe - 053-4 +- Backport: fix(dracut-logger.sh): double dash trigger unknown logger warnings during run +- Backport: fix(network-manager): nm-run.service: don't kill forked processes +- Backport: fix(network-manager): only run NetworkManager if rd.neednet=1 +- Backport: fix(network-manager): use /run/NetworkManager/initrd/neednet in initqueue -* Fri Nov 29 2019 Lukas Nykryn - 049-60.git20191129 -- 99squash: Only start the cleaner on switch-root -- net-lib: check if addr exists before checking for dad state -- always include sg module +* Mon Apr 19 2021 Adam Williamson - 053-3 +- Fix removal of key system files when kdump enabled (thanks kasong) (#1936781) -* Thu Oct 31 2019 Lukas Nykryn - 049-57.git20191031 -- various fixes to adapt to RHCOS and FCOS +* Thu Apr 08 2021 Adam Williamson - 053-2 +- Backport upstream change reported to fix boot on some encrypted LVM setups (#1946074) -* Tue Oct 01 2019 Lukas Nykryn - 049-53.git20191001 -- apply patches to allow enablement of nm-initrd-generator +* Tue Feb 23 2021 Harald Hoyer - 053-1 +- version 053 -* Fri Sep 06 2019 Lukas Nykryn - 049-27.git20190906 -- modules.d: fix udev rules detection of multipath devices +* Tue Jan 26 2021 Fedora Release Engineering - 051-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild -* Tue Aug 06 2019 Lukas Nykryn - 049-26.git20190806 -- net-lib: fix typo $li -> $_li +* Tue Dec 15 2020 Harald Hoyer - 051-1 +- version 051 -* Tue Aug 06 2019 Lukas Nykryn - 049-25.git20190806 -- 90kernel-modules-extra: don't resolve symlinks before instmod +* Tue Oct 06 2020 Harald Hoyer - 050-167.git20201006 +- git snapshot -* Fri Aug 02 2019 Lukas Nykryn - 049-24.git20190802 -- 95fcoe: load 'libfcoe' module as a fallback -- 99base: enable the initqueue in both 'dracut --add-device' and 'dracut --mount' cases -- dracut: let module handling function accept optional path option -- squash: also squash systemctl if switch-root is not needed -- squash: fix and simplify required_in_root -- squash: squash systemd binary and udevadm +* Fri Oct 02 2020 Harald Hoyer - 050-157.git20201002 +- git snapshot -* Thu Jul 25 2019 Lukas Nykryn - 049-18.git20190725 -- dracut.spec: add 06rngd +* Tue Sep 29 2020 Peter Robinson - 050-63.git20200529 +- Fixes for Arm GPUs in early boot -* Thu Jul 25 2019 Lukas Nykryn - 049-17.git20190725 -- 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) +* Fri Sep 25 2020 Peter Robinson - 050-62.git20200529 +- Fix for Rockchip devices -* Tue Jul 16 2019 Lukas Nykryn - 049-16.git20190716 -- 01fips: add cfb cipher +* Wed Aug 19 2020 Merlin Mathesius - 050-61.git20200529.3 +- Correct conditionals to drop 51-dracut-rescue-postinst.sh for Fedora and + recent RHEL releases -* Mon Jul 08 2019 Lukas Nykryn - 049-15.git20190708 -- network: skip already enslaved interfaces +* Mon Jul 27 2020 Fedora Release Engineering - 050-61.git20200529.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild -* Wed Jun 26 2019 Lukas Nykryn - 049-14.git20190626 -- fips: ensure fs module for /boot is installed +* Mon Jul 13 2020 Tom Stellard - 050-61.git20200529.1 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro -* Fri Jun 14 2019 Lukas Nykryn - 049-13.git20190614 -- fips: split loading the crypto modules and checking the kernel +* Fri May 29 2020 Harald Hoyer - 050-61.git20200529 +- git snapshot -* Mon Jun 03 2019 Lukas Nykryn - 049-12.git20190603 -- 95iscsi: rd.iscsi.initiator should have priority over stored configuration -- net-lib: strstr is not for globs +* Mon Mar 16 2020 Harald Hoyer - 050-26.git20200316 +- fixed `--tmpdir` mishandling -* Tue Jan 15 2019 Lukas Nykryn - 049-10.git20190115 -- 95iscsi: decouple iscsi from sysinit.target +* Fri Mar 13 2020 Harald Hoyer - 050-25.git20200313 +- network-manager: ensure that nm-run.sh is executed for rd.neednet -* Tue Oct 30 2018 Lukas Nykryn - 049-8.git20181030 -- dracut.install: call dracut with --force -- 99squash: Don't clean up squahfs on isolate +* Tue Mar 10 2020 Adam Williamson - 050-2 +- Backport fix for pre-trigger stage early exit from upstream (#1811070) -* Mon Oct 15 2018 Lukas Nykryn - 049-5.git20181015 -- 40network: Don't include 40network by default +* Wed Mar 04 2020 Harald Hoyer - 050-1 +- version 050 -* Tue Oct 09 2018 Lukas Nykryn - 049-4.git20181009 -- rebase to 049 +* Tue Jan 28 2020 Fedora Release Engineering - 049-27.git20181204.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild -* Tue Sep 04 2018 Lukas Nykryn - 048-37.git20180904 -- dmsquash-live/apply-live-updates: Test proper file link. +* Wed Jul 24 2019 Fedora Release Engineering - 049-27.git20181204.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild -* Mon Sep 03 2018 Dan Horák - 048-37.git20180831 -- apply the reflink patch +* Wed Jun 12 2019 Adam Williamson - 049-27.git20181204 +- Backport PR #578 to fix RHBZ #1719057 (installer boot bug) -* Wed Aug 29 2018 Lukas Nykryn - 048-36.git20180831 -- merge upstream master -- rever --reflink=auto usage +* Thu Feb 14 2019 Adam Williamson - 049-26.git20181204 +- Backport PR #541 to fix RHBZ #1676357 (crasher bug) -* Tue Aug 14 2018 Lukas Nykryn - 048-34.git20180814 -- TEST-50-MULTINIC/test.sh: fixed server startup -- kernel-network-modules: add vlan kernel modules -- test: fixed KVERSION and qemu backwards compatiblity -- TEST-70-BONDBRIDGETEAMVLAN: load vlan kernel modules -- test: also output server.log on failure -- TEST-50-MULTINIC: s/--device/-device -- enable parallel test suite -- TEST-31-ISCSI-MULTI: use different port than TEST-30 -- load modules earlier for iscsi via dhcp root-path -- test/{TEST-50-MULTINIC,TEST-70-BONDBRIDGETEAMVLAN}: use qemu-3.0 syntax -- multipath-shutdown: fix shell syntax -- dracut.spec: remove warpclock from z-series, not the other way round -- iscsi: remove $() where it does not fit -- mdraid: better handling of various UUID formats -- dracut-functions: fix the word splitting -- Add gpio and pinctrl drivers for arm*/aarch64 -- mdraid/parse-md.sh: also accept rd.md.uuid with ":" -- spec: sort modules -- spec: warpclock is not available on s390 or s390x -- dracut.spec: Remove needless use of defattr -- dracut.spec: add 00warpclock dracut module -- Bring back 51-dracut-rescue-postinst.sh -- lsinitrd: update help message and man page -- lsinitrd: optimize performance when handling multiple files -- lsinitrd: allow to only unpack certain files -- NEWS: forgot to update the latest version -- 00warpclock: Set correct timezone -- dracut-install: skip modules with empty path -- Record loaded kernel modules when hostonly mode is enabled -- modules.d/95fcoe/cleanup-fcoe.sh: chmod +x -- TEST-40-NBD: disable for now -- TEST-30-ISCSI: readd multiple target test +* Thu Jan 31 2019 Fedora Release Engineering - 049-25.git20181204.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Wed Jul 11 2018 Lukas Nykryn - 048-1.1 -- return some old provides +* Tue Dec 04 2018 Harald Hoyer - 049-25.git20181204 +- git snapshot + +* Wed Oct 24 2018 Harald Hoyer - 049-11.git20181024 +- git snapshot + +* Wed Oct 10 2018 Harald Hoyer - 049-4.git20181010 +- fixed spec file +- git snapshot + +* Mon Oct 08 2018 Harald Hoyer - 049-1 +- version 049 + +* Fri Sep 21 2018 Harald Hoyer - 048-99.git20180921 +- git snapshot + +* Thu Jul 26 2018 Harald Hoyer - 048-14.git20180726 +- bring back 51-dracut-rescue-postinst.sh + +* Wed Jul 18 2018 Harald Hoyer - 048-6.git20180718 +- git snapshot + +* Thu Jul 12 2018 Fedora Release Engineering - 048-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jul 06 2018 Harald Hoyer - 048-1 - version 048 diff --git a/SOURCES/lgpl-2.1.txt b/lgpl-2.1.txt similarity index 100% rename from SOURCES/lgpl-2.1.txt rename to lgpl-2.1.txt diff --git a/sources b/sources new file mode 100644 index 0000000..bc9a127 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (105.tar.gz) = 1608fb31d6a53905ea25a279586573db5fc7e084b4f6ff06e52065cbcb4ff503c2d51c0a282345844228232b1b590382b482a224183e0c4ee16c9c9e6932b275