Update to 059 and fix some bugs in spec
This commit is contained in:
parent
b050142ea1
commit
9749f1e039
@ -1,37 +1,37 @@
|
|||||||
From 9d267e664c6f95a7b940c5706643b055623a39d7 Mon Sep 17 00:00:00 2001
|
From ad794fcc9c8e24592f1cca2580ff73b0b115900f Mon Sep 17 00:00:00 2001
|
||||||
From: Anakin Zhang <benjamin93@163.com>
|
From: Anakin Zhang <benjamin93@163.com>
|
||||||
Date: Thu, 2 Jul 2020 14:46:51 +0800
|
Date: Tue, 17 Jan 2023 14:34:40 +0800
|
||||||
Subject: [PATCH] add option to include file metadata in initramfs
|
Subject: [PATCH] add option to include file metadata in initramfs
|
||||||
|
|
||||||
Signed-off-by: Anakin Zhang <benjamin93@163.com>
|
Signed-off-by: Anakin Zhang <benjamin93@163.com>
|
||||||
---
|
---
|
||||||
dracut.sh | 13 ++++++++++---
|
dracut.sh | 16 +++++++++++++---
|
||||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
diff --git a/dracut.sh b/dracut.sh
|
||||||
index 60ac46f..bab91ca 100755
|
index bbb3469..d708cbf 100755
|
||||||
--- a/dracut.sh
|
--- a/dracut.sh
|
||||||
+++ b/dracut.sh
|
+++ b/dracut.sh
|
||||||
@@ -246,6 +246,9 @@ Creates initial ramdisk images for preloading modules
|
@@ -277,6 +277,9 @@ Creates initial ramdisk images for preloading modules
|
||||||
--kernel-image [FILE] location of the kernel image
|
-p, --parallel Use parallel processing if possible (currently only
|
||||||
--regenerate-all Regenerate all initramfs images at the default location
|
supported --regenerate-all)
|
||||||
for the kernel versions found on the system
|
images simultaneously.
|
||||||
+ -e, --file-metadata [TYPE]
|
+ -e, --file-metadata [TYPE]
|
||||||
+ Include file metadata in the initramfs. Specify "xattr"
|
+ Include file metadata in the initramfs. Specify "xattr"
|
||||||
+ to include file extended attributes.
|
+ to include file extended attributes.
|
||||||
--version Display version
|
--version Display version.
|
||||||
|
|
||||||
If [LIST] has multiple arguments, then you have to put these in quotes.
|
If [LIST] has multiple arguments, then you have to put these in quotes.
|
||||||
@@ -341,7 +344,7 @@ rearrange_params() {
|
@@ -372,7 +375,7 @@ rearrange_params() {
|
||||||
TEMP=$(
|
TEMP=$(
|
||||||
unset POSIXLY_CORRECT
|
unset POSIXLY_CORRECT
|
||||||
getopt \
|
getopt \
|
||||||
- -o "a:m:o:d:I:k:c:r:L:fvqlHhMN" \
|
- -o "a:m:o:d:I:k:c:r:L:fvqlHhMNp" \
|
||||||
+ -o "a:m:o:d:I:k:c:r:L:fvqlHhMNe:" \
|
+ -o "a:m:o:d:I:k:c:r:L:fvqlHhMNpe:" \
|
||||||
--long kver: \
|
--long kver: \
|
||||||
--long add: \
|
--long add: \
|
||||||
--long force-add: \
|
--long force-add: \
|
||||||
@@ -432,6 +435,7 @@ rearrange_params() {
|
@@ -467,6 +470,7 @@ rearrange_params() {
|
||||||
--long hostonly-i18n \
|
--long hostonly-i18n \
|
||||||
--long hostonly-nics: \
|
--long hostonly-nics: \
|
||||||
--long no-machineid \
|
--long no-machineid \
|
||||||
@ -39,16 +39,19 @@ index 60ac46f..bab91ca 100755
|
|||||||
--long version \
|
--long version \
|
||||||
-- "$@"
|
-- "$@"
|
||||||
)
|
)
|
||||||
@@ -800,6 +804,8 @@ while :; do
|
@@ -843,6 +847,11 @@ while :; do
|
||||||
--no-machineid)
|
--no-machineid)
|
||||||
machine_id_l="no"
|
machine_id_l="no"
|
||||||
;;
|
;;
|
||||||
+ -e|--file-metadata)
|
+ -e | --file-metadata)
|
||||||
+ file_metadata_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
|
+ file_metadata_l="$2";
|
||||||
|
+ PARMS_TO_STORE+=" '$2'"
|
||||||
|
+ shift
|
||||||
|
+ ;;
|
||||||
--version)
|
--version)
|
||||||
long_version
|
long_version
|
||||||
exit 1
|
exit 1
|
||||||
@@ -998,6 +1004,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
@@ -1079,6 +1088,7 @@ drivers_dir="${drivers_dir%%+(/)}"
|
||||||
[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
|
[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
|
||||||
[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
|
[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
|
||||||
[[ $machine_id_l ]] && machine_id="$machine_id_l"
|
[[ $machine_id_l ]] && machine_id="$machine_id_l"
|
||||||
@ -56,24 +59,24 @@ index 60ac46f..bab91ca 100755
|
|||||||
|
|
||||||
if ! [[ $outfile ]]; then
|
if ! [[ $outfile ]]; then
|
||||||
if [[ $machine_id != "no" ]]; then
|
if [[ $machine_id != "no" ]]; then
|
||||||
@@ -2324,7 +2331,7 @@ if [[ $create_early_cpio == yes ]]; then
|
@@ -2479,7 +2489,7 @@ if [[ $create_early_cpio == yes ]]; then
|
||||||
cd "$early_cpio_dir/d"
|
cd "$early_cpio_dir/d"
|
||||||
|
find . -print0 | sort -z \
|
||||||
|
| cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null \
|
||||||
|
- ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
||||||
|
+ ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
||||||
|
); then
|
||||||
|
dfatal "Creation of $outfile failed"
|
||||||
|
exit 1
|
||||||
|
@@ -2584,7 +2594,7 @@ else
|
||||||
|
umask 077
|
||||||
|
cd "$initdir"
|
||||||
find . -print0 | sort -z \
|
find . -print0 | sort -z \
|
||||||
| cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null \
|
- | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet \
|
||||||
- ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet \
|
||||||
+ ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
|
| $compress >> "${DRACUT_TMPDIR}/initramfs.img"
|
||||||
); then
|
); then
|
||||||
dfatal "dracut: creation of $outfile failed"
|
dfatal "Creation of $outfile failed"
|
||||||
exit 1
|
|
||||||
@@ -2382,7 +2389,7 @@ if ! (
|
|
||||||
umask 077
|
|
||||||
cd "$initdir"
|
|
||||||
find . -print0 | sort -z \
|
|
||||||
- | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet \
|
|
||||||
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc $file_metadata_opt -o --quiet \
|
|
||||||
| $compress >> "${DRACUT_TMPDIR}/initramfs.img"
|
|
||||||
); then
|
|
||||||
dfatal "dracut: creation of $outfile failed"
|
|
||||||
--
|
--
|
||||||
1.8.3.1
|
2.33.0
|
||||||
|
|
||||||
|
|||||||
@ -1,54 +0,0 @@
|
|||||||
From 1af46743195422aaebcde5c508a5dd479eff51ea Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Fri, 10 Dec 2021 12:51:26 -0600
|
|
||||||
Subject: [PATCH] feat(lvm): only run lvchange for LV that is seen on devices
|
|
||||||
|
|
||||||
Change the command listing LVs from lvscan to lvs, and list
|
|
||||||
only the LV names that are being activated. Before attempting
|
|
||||||
to activate an LV, check that that LV name appears in the
|
|
||||||
lvs command output. This avoids wasting time running an
|
|
||||||
lvchange command that we know will fail.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/lvm_scan.sh | 18 ++++++++++++++----
|
|
||||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
index bda265f..89f077a 100755
|
|
||||||
--- a/modules.d/90lvm/lvm_scan.sh
|
|
||||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
@@ -119,7 +119,7 @@ sub=${sub%%\(*}
|
|
||||||
# ignores locking failures (--ignorelockingfailure)
|
|
||||||
# disables hints (--nohints)
|
|
||||||
#
|
|
||||||
-# For lvscan and vgscan:
|
|
||||||
+# For lvs and vgscan:
|
|
||||||
# disable locking (--nolocking)
|
|
||||||
# disable hints (--nohints)
|
|
||||||
|
|
||||||
@@ -136,10 +136,20 @@ check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \
|
|
||||||
if [ -n "$LVS" ]; then
|
|
||||||
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
- lvm lvscan $scan_args 2>&1 | vinfo
|
|
||||||
+ LVSLIST=$(lvm lvs $scan_args --noheading -o lv_full_name,segtype $LVS)
|
|
||||||
+ info "$LVSLIST"
|
|
||||||
+
|
|
||||||
+ # Only attempt to activate an LV if it appears in the lvs output.
|
|
||||||
for LV in $LVS; do
|
|
||||||
- # shellcheck disable=SC2086
|
|
||||||
- lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo
|
|
||||||
+ if strstr "$LVSLIST" "$LV"; then
|
|
||||||
+ # This lvchange is expected to fail if all PVs used by
|
|
||||||
+ # the LV are not yet present. Premature/failed lvchange
|
|
||||||
+ # could be avoided by reporting if an LV is complete
|
|
||||||
+ # from the lvs command above and skipping this lvchange
|
|
||||||
+ # if the LV is not lised as complete.
|
|
||||||
+ # shellcheck disable=SC2086
|
|
||||||
+ lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo
|
|
||||||
+ fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
From c0a54f2993b1d3c2101202c274a41f925445d54b Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Wed, 8 Dec 2021 14:43:58 -0600
|
|
||||||
Subject: [PATCH] feat(lvm): update lvm command options
|
|
||||||
|
|
||||||
Drop checking for options that have been available for
|
|
||||||
at least ten years. This simplifies code maintenance.
|
|
||||||
|
|
||||||
Add the new --nohints option (when available) to disable
|
|
||||||
the use of hints which is not useful during startup.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/lvm_scan.sh | 41 ++++++++++++++++++++++-------------------
|
|
||||||
1 file changed, 22 insertions(+), 19 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
index 8038240..00143bf 100755
|
|
||||||
--- a/modules.d/90lvm/lvm_scan.sh
|
|
||||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
@@ -59,39 +59,42 @@ min=$2
|
|
||||||
sub=${3%% *}
|
|
||||||
sub=${sub%%\(*}
|
|
||||||
|
|
||||||
-lvm_ignorelockingfailure="--ignorelockingfailure"
|
|
||||||
-lvm_quirk_args="--ignorelockingfailure --ignoremonitoring"
|
|
||||||
-
|
|
||||||
-check_lvm_ver 2 2 57 "$maj" "$min" "$sub" \
|
|
||||||
- && lvm_quirk_args="$lvm_quirk_args --poll n"
|
|
||||||
-
|
|
||||||
-if check_lvm_ver 2 2 65 "$maj" "$min" "$sub"; then
|
|
||||||
- lvm_quirk_args=" --sysinit $extraargs"
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if check_lvm_ver 2 2 221 "$maj" "$min" "$sub"; then
|
|
||||||
- lvm_quirk_args=" $extraargs"
|
|
||||||
- unset lvm_ignorelockingfailure
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
+# For lvchange and vgchange use --sysinit which:
|
|
||||||
+# disables polling (--poll n)
|
|
||||||
+# ignores monitoring (--ignoremonitoring)
|
|
||||||
+# ignores locking failures (--ignorelockingfailure)
|
|
||||||
+# disables hints (--nohints)
|
|
||||||
+#
|
|
||||||
+# For lvscan and vgscan:
|
|
||||||
+# disable locking (--nolocking)
|
|
||||||
+# disable hints (--nohints)
|
|
||||||
+
|
|
||||||
+activate_args="--sysinit $extraargs"
|
|
||||||
unset extraargs
|
|
||||||
|
|
||||||
export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
|
||||||
|
|
||||||
+scan_args="--nolocking"
|
|
||||||
+
|
|
||||||
+check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \
|
|
||||||
+ && scan_args="$scan_args --nohints"
|
|
||||||
+
|
|
||||||
if [ -n "$LVS" ]; then
|
|
||||||
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
|
||||||
- lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo
|
|
||||||
+ # shellcheck disable=SC2086
|
|
||||||
+ lvm lvscan $scan_args 2>&1 | vinfo
|
|
||||||
for LV in $LVS; do
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
- lvm lvchange --yes -K -ay $lvm_quirk_args "$LV" 2>&1 | vinfo
|
|
||||||
+ lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$LVS" ] || [ -n "$VGS" ]; then
|
|
||||||
info "Scanning devices $lvmdevs for LVM volume groups $VGS"
|
|
||||||
- lvm vgscan $lvm_ignorelockingfailure 2>&1 | vinfo
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
- lvm vgchange -ay $lvm_quirk_args $VGS 2>&1 | vinfo
|
|
||||||
+ lvm vgscan $scan_args 2>&1 | vinfo
|
|
||||||
+ # shellcheck disable=SC2086
|
|
||||||
+ lvm vgchange -ay $activate_args $VGS 2>&1 | vinfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$lvmwritten" ]; then
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,141 +0,0 @@
|
|||||||
From 7ffc5e388bcce20785803825bdd260c3c854b34f Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Wed, 8 Dec 2021 15:16:03 -0600
|
|
||||||
Subject: [PATCH] feat(lvm): use generated filter when none is set
|
|
||||||
|
|
||||||
Previously, the lvm device filter generated by dracut
|
|
||||||
would not be used if any lvm.conf file existed in the
|
|
||||||
initrd. Change this so that the generated filter will
|
|
||||||
be used when the included lvm.conf has no filter set.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/lvm_scan.sh | 91 +++++++++++++++++++++++++++++++++++++--------
|
|
||||||
1 file changed, 75 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
index 00143bf..bda265f 100755
|
|
||||||
--- a/modules.d/90lvm/lvm_scan.sh
|
|
||||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
@@ -10,6 +10,7 @@ LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=)
|
|
||||||
|
|
||||||
# shellcheck disable=SC2174
|
|
||||||
[ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm
|
|
||||||
+[ -d /run/lvm ] || mkdir -m 0755 -p /run/lvm
|
|
||||||
# build a list of devices to scan
|
|
||||||
lvmdevs=$(
|
|
||||||
for f in /tmp/.lvm_scan-*; do
|
|
||||||
@@ -18,22 +19,6 @@ lvmdevs=$(
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
-if [ ! -e /etc/lvm/lvm.conf ]; then
|
|
||||||
- {
|
|
||||||
- echo 'devices {'
|
|
||||||
- printf ' filter = [ '
|
|
||||||
- for dev in $lvmdevs; do
|
|
||||||
- printf '"a|^/dev/%s$|", ' "$dev"
|
|
||||||
- done
|
|
||||||
- echo '"r/.*/" ]'
|
|
||||||
- echo '}'
|
|
||||||
-
|
|
||||||
- echo 'global {'
|
|
||||||
- echo '}'
|
|
||||||
- } > /etc/lvm/lvm.conf
|
|
||||||
- lvmwritten=1
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
check_lvm_ver() {
|
|
||||||
maj=$1
|
|
||||||
min=$2
|
|
||||||
@@ -47,6 +32,75 @@ check_lvm_ver() {
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
+no_lvm_conf_filter() {
|
|
||||||
+ if [ ! -e /etc/lvm/lvm.conf ]; then
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ if [ -e /run/lvm/initrd_no_filter ]; then
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ if [ -e /run/lvm/initrd_filter ]; then
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ if [ -e /run/lvm/initrd_global_filter ]; then
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ # Save lvm config results in /run to avoid running
|
|
||||||
+ # lvm config commands for every PV that's scanned.
|
|
||||||
+
|
|
||||||
+ filter=$(lvm config devices/filter | grep "$filter=")
|
|
||||||
+ if [ -n "$filter" ]; then
|
|
||||||
+ printf '%s\n' "$filter" > /run/lvm/initrd_filter
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ global_filter=$(lvm config devices/global_filter | grep "$global_filter=")
|
|
||||||
+ if [ -n "$global_filter" ]; then
|
|
||||||
+ printf '%s\n' "$global_filter" > /run/lvm/initrd_global_filter
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ # /etc/lvm/lvm.conf exists with no filter setting
|
|
||||||
+ true > /run/lvm/initrd_no_filter
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# If no lvm.conf exists, create a basic one with a global section.
|
|
||||||
+if [ ! -e /etc/lvm/lvm.conf ]; then
|
|
||||||
+ {
|
|
||||||
+ echo 'global {'
|
|
||||||
+ echo '}'
|
|
||||||
+ } > /etc/lvm/lvm.conf
|
|
||||||
+ lvmwritten=1
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+# Save the original lvm.conf before appending a filter setting.
|
|
||||||
+if [ ! -e /etc/lvm/lvm.conf.orig ]; then
|
|
||||||
+ cp /etc/lvm/lvm.conf /etc/lvm/lvm.conf.orig
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+# If the original lvm.conf does not contain a filter setting,
|
|
||||||
+# then generate a filter and append it to the original lvm.conf.
|
|
||||||
+# The filter is generated from the list PVs that have been seen
|
|
||||||
+# so far (each has been processed by the lvm udev rule.)
|
|
||||||
+if no_lvm_conf_filter; then
|
|
||||||
+ {
|
|
||||||
+ echo 'devices {'
|
|
||||||
+ printf ' filter = [ '
|
|
||||||
+ for dev in $lvmdevs; do
|
|
||||||
+ printf '"a|^/dev/%s$|", ' "$dev"
|
|
||||||
+ done
|
|
||||||
+ echo '"r/.*/" ]'
|
|
||||||
+ echo '}'
|
|
||||||
+ } > /etc/lvm/lvm.conf.filter
|
|
||||||
+ lvmfilter=1
|
|
||||||
+ cat /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf.filter > /etc/lvm/lvm.conf
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
# hopefully this output format will never change, e.g.:
|
|
||||||
# LVM version: 2.02.53(1) (2009-09-25)
|
|
||||||
OLDIFS=$IFS
|
|
||||||
@@ -99,8 +153,13 @@ fi
|
|
||||||
|
|
||||||
if [ "$lvmwritten" ]; then
|
|
||||||
rm -f -- /etc/lvm/lvm.conf
|
|
||||||
+elif [ "$lvmfilter" ]; then
|
|
||||||
+ # revert filter that was appended to existing lvm.conf
|
|
||||||
+ cp /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf
|
|
||||||
+ rm -f -- /etc/lvm/lvm.conf.filter
|
|
||||||
fi
|
|
||||||
unset lvmwritten
|
|
||||||
+unset lvmfilter
|
|
||||||
|
|
||||||
udevadm settle
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
From 97543cca48dfde849396f11c83f9c320e1b91c46 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Wed, 8 Dec 2021 14:14:27 -0600
|
|
||||||
Subject: [PATCH] fix(lvm): replace --partial option
|
|
||||||
|
|
||||||
The --partial option will activate a linear (or other) LV
|
|
||||||
without segments for missing devices, which is unlikely to
|
|
||||||
be useful. The intention was to activate raid LVs in a useful
|
|
||||||
form while missing devices, which is specified with the option
|
|
||||||
--activationmode degraded.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/64-lvm.rules | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
|
|
||||||
index 65f6524..ca718ce 100644
|
|
||||||
--- a/modules.d/90lvm/64-lvm.rules
|
|
||||||
+++ b/modules.d/90lvm/64-lvm.rules
|
|
||||||
@@ -15,7 +15,7 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] &&
|
|
||||||
GOTO="lvm_end"
|
|
||||||
|
|
||||||
RUN+="/sbin/initqueue --settled --onetime --unique /sbin/lvm_scan"
|
|
||||||
-RUN+="/sbin/initqueue --timeout --name 51-lvm_scan --onetime --unique /sbin/lvm_scan --partial"
|
|
||||||
+RUN+="/sbin/initqueue --timeout --name 51-lvm_scan --onetime --unique /sbin/lvm_scan --activationmode degraded"
|
|
||||||
RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k;'"
|
|
||||||
|
|
||||||
LABEL="lvm_end"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
From 164e5ebb1199ea3e3d641ce402d8257f0055a529 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Fri, 17 Dec 2021 12:14:51 -0600
|
|
||||||
Subject: [PATCH] fix(lvm): restore setting LVM_MD_PV_ACTIVATED
|
|
||||||
|
|
||||||
The 69-dm-lvm-metad.rules udev rule has been removed from
|
|
||||||
the initrd, because it's been dropped by recent upstream
|
|
||||||
lvm versions, and it never performed any primary function
|
|
||||||
within the initrd. But, it did have the job of setting
|
|
||||||
LVM_MD_PV_ACTIVATED=1 for active md devices used by PVs.
|
|
||||||
That step needs to be restored, and is now included in
|
|
||||||
64-lvm.rules.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/64-lvm.rules | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
|
|
||||||
index ca718ce..1ad4911 100644
|
|
||||||
--- a/modules.d/90lvm/64-lvm.rules
|
|
||||||
+++ b/modules.d/90lvm/64-lvm.rules
|
|
||||||
@@ -6,6 +6,14 @@
|
|
||||||
|
|
||||||
SUBSYSTEM!="block", GOTO="lvm_end"
|
|
||||||
ACTION!="add|change", GOTO="lvm_end"
|
|
||||||
+
|
|
||||||
+# If the md device is active (indicated by array_state), then set the flag
|
|
||||||
+# LVM_MD_PV_ACTIVATED=1 indicating that the md device for the PV is ready
|
|
||||||
+# to be used. The lvm udev rule running in root will check that this flag
|
|
||||||
+# is set before it will process the md device (it wants to avoid
|
|
||||||
+# processing an md device that exists but is not yet ready to be used.)
|
|
||||||
+KERNEL=="md[0-9]*", ACTION=="change", ENV{ID_FS_TYPE}=="LVM2_member", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1"
|
|
||||||
+
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
|
|
||||||
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
From 50e74668434d935db649b5690dc2158b0f87d91c Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Wed, 8 Dec 2021 14:11:13 -0600
|
|
||||||
Subject: [PATCH] revert(lvm): remove 69-dm-lvm-metad.rules
|
|
||||||
|
|
||||||
This udev rule runs pvscan to autoactivate VGs, which dracut
|
|
||||||
does not want to do, and previously disabled by editing the
|
|
||||||
rule file and commenting out lines.
|
|
||||||
|
|
||||||
This also stops /dev/disk/by-id/lvm-pv-uuid-* symlinks from
|
|
||||||
being created in the initrd.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/module-setup.sh | 15 +--------------
|
|
||||||
1 file changed, 1 insertion(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
||||||
index 0bb491f..25be013 100755
|
|
||||||
--- a/modules.d/90lvm/module-setup.sh
|
|
||||||
+++ b/modules.d/90lvm/module-setup.sh
|
|
||||||
@@ -78,20 +78,7 @@ install() {
|
|
||||||
unset LVM_SUPPRESS_FD_WARNINGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
- inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
|
|
||||||
-
|
|
||||||
- # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
|
|
||||||
- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then
|
|
||||||
- if grep -q SYSTEMD_WANTS "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules; then
|
|
||||||
- sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
|
|
||||||
- "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
|
|
||||||
- sed -i -e 's/^ENV{ID_MODEL}=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
|
|
||||||
- sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
|
|
||||||
- else
|
|
||||||
- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
|
|
||||||
- "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules
|
|
||||||
- fi
|
|
||||||
- fi
|
|
||||||
+ inst_rules 11-dm-lvm.rules
|
|
||||||
|
|
||||||
# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
|
|
||||||
# files, but provides the one below:
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
From f6f393f550625e3e1c968ef32d6d7bdd90f51d73 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Wed, 8 Dec 2021 14:07:42 -0600
|
|
||||||
Subject: [PATCH] revert(lvm): remove lvmetad config changes
|
|
||||||
|
|
||||||
Remove support for modifying use_lvmetad and locking_type
|
|
||||||
settings in lvm.conf for lvm versions 2.2.*. Recent lvm
|
|
||||||
versions (2.3.*) do not include lvmetad or locking_type.
|
|
||||||
This cleanup simplifies code maintenance.
|
|
||||||
|
|
||||||
To use the lvm module with older versions (2.2), a user
|
|
||||||
would need to ensure that lvmetad settings are disabled
|
|
||||||
in the initrd's lvm.conf rather than relying on the lvm
|
|
||||||
dracut mode to modify their lvm.conf.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/lvm_scan.sh | 3 ---
|
|
||||||
modules.d/90lvm/module-setup.sh | 14 --------------
|
|
||||||
2 files changed, 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
index 43601ad..8038240 100755
|
|
||||||
--- a/modules.d/90lvm/lvm_scan.sh
|
|
||||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
@@ -28,10 +28,7 @@ if [ ! -e /etc/lvm/lvm.conf ]; then
|
|
||||||
echo '"r/.*/" ]'
|
|
||||||
echo '}'
|
|
||||||
|
|
||||||
- # establish LVM locking
|
|
||||||
echo 'global {'
|
|
||||||
- echo ' locking_type = 4'
|
|
||||||
- echo ' use_lvmetad = 0'
|
|
||||||
echo '}'
|
|
||||||
} > /etc/lvm/lvm.conf
|
|
||||||
lvmwritten=1
|
|
||||||
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
||||||
index e1e6c58..0bb491f 100755
|
|
||||||
--- a/modules.d/90lvm/module-setup.sh
|
|
||||||
+++ b/modules.d/90lvm/module-setup.sh
|
|
||||||
@@ -61,10 +61,6 @@ install() {
|
|
||||||
if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then
|
|
||||||
if [[ -f $dracutsysrootdir/etc/lvm/lvm.conf ]]; then
|
|
||||||
inst_simple -H /etc/lvm/lvm.conf
|
|
||||||
- # FIXME: near-term hack to establish read-only locking;
|
|
||||||
- # use command-line lvm.conf editor once it is available
|
|
||||||
- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/etc/lvm/lvm.conf"
|
|
||||||
- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/etc/lvm/lvm.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LVM_SUPPRESS_FD_WARNINGS=1
|
|
||||||
@@ -82,16 +78,6 @@ install() {
|
|
||||||
unset LVM_SUPPRESS_FD_WARNINGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then
|
|
||||||
- mkdir -p "${initdir}/etc/lvm"
|
|
||||||
- {
|
|
||||||
- echo 'global {'
|
|
||||||
- echo 'locking_type = 4'
|
|
||||||
- echo 'use_lvmetad = 0'
|
|
||||||
- echo '}'
|
|
||||||
- } > "${initdir}/etc/lvm/lvm.conf"
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
|
|
||||||
|
|
||||||
# Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
From 1549d5e89818603e1aa6dd8a40981222f59f1548 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Wed, 8 Dec 2021 14:04:25 -0600
|
|
||||||
Subject: [PATCH] revert(lvm): remove snapshot feature
|
|
||||||
|
|
||||||
The feature of managing lvm snapshots has no known
|
|
||||||
recent usage. It is unknown if it works. The lvm
|
|
||||||
developers do not wish to maintain or support it.
|
|
||||||
---
|
|
||||||
modules.d/90lvm/lvm_scan.sh | 39 ++++-----------------------------------
|
|
||||||
1 file changed, 4 insertions(+), 35 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
index c42f97d..43601ad 100755
|
|
||||||
--- a/modules.d/90lvm/lvm_scan.sh
|
|
||||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
|
||||||
@@ -7,8 +7,6 @@ type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
||||||
|
|
||||||
VGS=$(getargs rd.lvm.vg -d rd_LVM_VG=)
|
|
||||||
LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=)
|
|
||||||
-SNAPSHOT=$(getargs rd.lvm.snapshot -d rd_LVM_SNAPSHOT=)
|
|
||||||
-SNAPSIZE=$(getargs rd.lvm.snapsize -d rd_LVM_SNAPSIZE=)
|
|
||||||
|
|
||||||
# shellcheck disable=SC2174
|
|
||||||
[ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm
|
|
||||||
@@ -31,17 +29,10 @@ if [ ! -e /etc/lvm/lvm.conf ]; then
|
|
||||||
echo '}'
|
|
||||||
|
|
||||||
# establish LVM locking
|
|
||||||
- if [ -n "$SNAPSHOT" ]; then
|
|
||||||
- echo 'global {'
|
|
||||||
- echo ' locking_type = 1'
|
|
||||||
- echo ' use_lvmetad = 0'
|
|
||||||
- echo '}'
|
|
||||||
- else
|
|
||||||
- echo 'global {'
|
|
||||||
- echo ' locking_type = 4'
|
|
||||||
- echo ' use_lvmetad = 0'
|
|
||||||
- echo '}'
|
|
||||||
- fi
|
|
||||||
+ echo 'global {'
|
|
||||||
+ echo ' locking_type = 4'
|
|
||||||
+ echo ' use_lvmetad = 0'
|
|
||||||
+ echo '}'
|
|
||||||
} > /etc/lvm/lvm.conf
|
|
||||||
lvmwritten=1
|
|
||||||
fi
|
|
||||||
@@ -90,28 +81,6 @@ unset extraargs
|
|
||||||
|
|
||||||
export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
|
||||||
|
|
||||||
-if [ -n "$SNAPSHOT" ]; then
|
|
||||||
- # HACK - this should probably be done elsewhere or turned into a function
|
|
||||||
- # Enable read-write LVM locking
|
|
||||||
- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 1/' /etc/lvm/lvm.conf
|
|
||||||
-
|
|
||||||
- # Expected SNAPSHOT format "<orig lv name>:<snap lv name>"
|
|
||||||
- ORIG_LV=${SNAPSHOT%%:*}
|
|
||||||
- SNAP_LV=${SNAPSHOT##*:}
|
|
||||||
-
|
|
||||||
- info "Removing existing LVM snapshot $SNAP_LV"
|
|
||||||
- lvm lvremove --force "$SNAP_LV" 2>&1 | vinfo
|
|
||||||
-
|
|
||||||
- # Determine snapshot size
|
|
||||||
- if [ -z "$SNAPSIZE" ]; then
|
|
||||||
- SNAPSIZE=$(lvm lvs --noheadings --units m --options lv_size "$ORIG_LV")
|
|
||||||
- info "No LVM snapshot size provided, using size of $ORIG_LV ($SNAPSIZE)"
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- info "Creating LVM snapshot $SNAP_LV ($SNAPSIZE)"
|
|
||||||
- lvm lvcreate -s -n "$SNAP_LV" -L "$SNAPSIZE" "$ORIG_LV" 2>&1 | vinfo
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
if [ -n "$LVS" ]; then
|
|
||||||
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
|
||||||
lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
dracut-059.tar.xz
Normal file
BIN
dracut-059.tar.xz
Normal file
Binary file not shown.
49
dracut.spec
49
dracut.spec
@ -8,8 +8,8 @@
|
|||||||
%global __requires_exclude pkg-config
|
%global __requires_exclude pkg-config
|
||||||
|
|
||||||
Name: dracut
|
Name: dracut
|
||||||
Version: 055
|
Version: 059
|
||||||
Release: 5
|
Release: 1
|
||||||
|
|
||||||
Summary: Initramfs generator using udev
|
Summary: Initramfs generator using udev
|
||||||
|
|
||||||
@ -30,15 +30,7 @@ Patch3: use-sleep-replace-check-sys-block.patch
|
|||||||
Patch4: add-option-to-include-file-metadata-in-initramfs.patch
|
Patch4: add-option-to-include-file-metadata-in-initramfs.patch
|
||||||
Patch5: revert-fix-systemd-networkd-make-systemd-networkd.patch
|
Patch5: revert-fix-systemd-networkd-make-systemd-networkd.patch
|
||||||
Patch6: make-network-legacy-instead-of-network-manager-the-network.patch
|
Patch6: make-network-legacy-instead-of-network-manager-the-network.patch
|
||||||
Patch7: backport-revert-lvm-remove-snapshot-feature.patch
|
Patch7: bring-back-51-dracut-rescue-postinst.sh.patch
|
||||||
Patch8: backport-revert-lvm-remove-lvmetad-config-changes.patch
|
|
||||||
Patch9: backport-revert-lvm-remove-69-dm-lvm-metad.rules.patch
|
|
||||||
Patch10: backport-fix-lvm-replace-partial-option.patch
|
|
||||||
Patch11: backport-feat-lvm-update-lvm-command-options.patch
|
|
||||||
Patch12: backport-feat-lvm-use-generated-filter-when-none-is-set.patch
|
|
||||||
Patch13: backport-feat-lvm-only-run-lvchange-for-LV-that-is-seen-on-de.patch
|
|
||||||
Patch14: backport-fix-lvm-restore-setting-LVM_MD_PV_ACTIVATED.patch
|
|
||||||
Patch15: backport-Bring-back-51-dracut-rescue-postinst.sh.patch
|
|
||||||
|
|
||||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
Source2: openEuler.conf.example
|
Source2: openEuler.conf.example
|
||||||
@ -199,6 +191,7 @@ usage.
|
|||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
cp %{SOURCE2} %_builddir/dracut-%{version}/dracut.conf.d/
|
cp %{SOURCE2} %_builddir/dracut-%{version}/dracut.conf.d/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --systemdsystemunitdir=%{_unitdir} \
|
%configure --systemdsystemunitdir=%{_unitdir} \
|
||||||
--bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
|
--bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
|
||||||
@ -236,6 +229,11 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00mksh
|
|||||||
# remove gentoo specific modules
|
# remove gentoo specific modules
|
||||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
|
||||||
|
|
||||||
|
# remove test modules
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80test-makeroot
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80test-root
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80test
|
||||||
|
|
||||||
%if %{defined _unitdir}
|
%if %{defined _unitdir}
|
||||||
# with systemd IMA and selinux modules do not make sense
|
# 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/96securityfs
|
||||||
@ -279,12 +277,14 @@ install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT%{dracutlibdir}
|
|||||||
rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
|
rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
|
||||||
echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
|
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
|
echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
||||||
|
|
||||||
|
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
|
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
|
install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
||||||
|
%else
|
||||||
|
rm -f 51-dracut-rescue-postinst.sh
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -323,9 +323,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
%{_mandir}/man8/dracut.8*
|
%{_mandir}/man8/dracut.8*
|
||||||
%{_mandir}/man8/*service.8*
|
%{_mandir}/man8/*service.8*
|
||||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
|
|
||||||
%{_mandir}/man1/lsinitrd.1*
|
%{_mandir}/man1/lsinitrd.1*
|
||||||
%endif
|
|
||||||
%{_mandir}/man7/dracut.kernel.7*
|
%{_mandir}/man7/dracut.kernel.7*
|
||||||
%{_mandir}/man7/dracut.cmdline.7*
|
%{_mandir}/man7/dracut.cmdline.7*
|
||||||
%{_mandir}/man7/dracut.modules.7*
|
%{_mandir}/man7/dracut.modules.7*
|
||||||
@ -350,9 +348,13 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%{dracutlibdir}/modules.d/01systemd-coredump
|
%{dracutlibdir}/modules.d/01systemd-coredump
|
||||||
%{dracutlibdir}/modules.d/01systemd-hostnamed
|
%{dracutlibdir}/modules.d/01systemd-hostnamed
|
||||||
%{dracutlibdir}/modules.d/01systemd-initrd
|
%{dracutlibdir}/modules.d/01systemd-initrd
|
||||||
|
%{dracutlibdir}/modules.d/01systemd-integritysetup
|
||||||
%{dracutlibdir}/modules.d/01systemd-journald
|
%{dracutlibdir}/modules.d/01systemd-journald
|
||||||
%{dracutlibdir}/modules.d/01systemd-ldconfig
|
%{dracutlibdir}/modules.d/01systemd-ldconfig
|
||||||
%{dracutlibdir}/modules.d/01systemd-modules-load
|
%{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-repart
|
||||||
%{dracutlibdir}/modules.d/01systemd-resolved
|
%{dracutlibdir}/modules.d/01systemd-resolved
|
||||||
%{dracutlibdir}/modules.d/01systemd-rfkill
|
%{dracutlibdir}/modules.d/01systemd-rfkill
|
||||||
@ -380,6 +382,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%{dracutlibdir}/modules.d/50plymouth
|
%{dracutlibdir}/modules.d/50plymouth
|
||||||
%{dracutlibdir}/modules.d/62bluetooth
|
%{dracutlibdir}/modules.d/62bluetooth
|
||||||
%{dracutlibdir}/modules.d/80lvmmerge
|
%{dracutlibdir}/modules.d/80lvmmerge
|
||||||
|
%{dracutlibdir}/modules.d/80lvmthinpool-monitor
|
||||||
%{dracutlibdir}/modules.d/90btrfs
|
%{dracutlibdir}/modules.d/90btrfs
|
||||||
%{dracutlibdir}/modules.d/90crypt
|
%{dracutlibdir}/modules.d/90crypt
|
||||||
%{dracutlibdir}/modules.d/90dm
|
%{dracutlibdir}/modules.d/90dm
|
||||||
@ -390,10 +393,14 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%{dracutlibdir}/modules.d/90mdraid
|
%{dracutlibdir}/modules.d/90mdraid
|
||||||
%{dracutlibdir}/modules.d/90multipath
|
%{dracutlibdir}/modules.d/90multipath
|
||||||
%{dracutlibdir}/modules.d/90nvdimm
|
%{dracutlibdir}/modules.d/90nvdimm
|
||||||
%{dracutlibdir}/modules.d/90qemu
|
%{dracutlibdir}/modules.d/90overlayfs
|
||||||
%{dracutlibdir}/modules.d/90ppcmac
|
%{dracutlibdir}/modules.d/90ppcmac
|
||||||
|
%{dracutlibdir}/modules.d/90qemu
|
||||||
%{dracutlibdir}/modules.d/91crypt-gpg
|
%{dracutlibdir}/modules.d/91crypt-gpg
|
||||||
%{dracutlibdir}/modules.d/91crypt-loop
|
%{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/91tpm2-tss
|
||||||
%{dracutlibdir}/modules.d/95debug
|
%{dracutlibdir}/modules.d/95debug
|
||||||
%{dracutlibdir}/modules.d/95fstab-sys
|
%{dracutlibdir}/modules.d/95fstab-sys
|
||||||
@ -404,6 +411,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%{dracutlibdir}/modules.d/95terminfo
|
%{dracutlibdir}/modules.d/95terminfo
|
||||||
%{dracutlibdir}/modules.d/95udev-rules
|
%{dracutlibdir}/modules.d/95udev-rules
|
||||||
%{dracutlibdir}/modules.d/95virtfs
|
%{dracutlibdir}/modules.d/95virtfs
|
||||||
|
%{dracutlibdir}/modules.d/95virtiofs
|
||||||
%ifarch s390 s390x
|
%ifarch s390 s390x
|
||||||
%{dracutlibdir}/modules.d/80cms
|
%{dracutlibdir}/modules.d/80cms
|
||||||
%{dracutlibdir}/modules.d/81cio_ignore
|
%{dracutlibdir}/modules.d/81cio_ignore
|
||||||
@ -436,6 +444,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%dir %{_sharedstatedir}/initramfs
|
%dir %{_sharedstatedir}/initramfs
|
||||||
%if %{defined _unitdir}
|
%if %{defined _unitdir}
|
||||||
%{_unitdir}/dracut-shutdown.service
|
%{_unitdir}/dracut-shutdown.service
|
||||||
|
%{_unitdir}/dracut-shutdown-onfailure.service
|
||||||
%{_unitdir}/sysinit.target.wants/dracut-shutdown.service
|
%{_unitdir}/sysinit.target.wants/dracut-shutdown.service
|
||||||
%{_unitdir}/dracut-cmdline.service
|
%{_unitdir}/dracut-cmdline.service
|
||||||
%{_unitdir}/dracut-initqueue.service
|
%{_unitdir}/dracut-initqueue.service
|
||||||
@ -451,14 +460,12 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%{_unitdir}/initrd.target.wants/dracut-pre-pivot.service
|
%{_unitdir}/initrd.target.wants/dracut-pre-pivot.service
|
||||||
%{_unitdir}/initrd.target.wants/dracut-pre-trigger.service
|
%{_unitdir}/initrd.target.wants/dracut-pre-trigger.service
|
||||||
%{_unitdir}/initrd.target.wants/dracut-pre-udev.service
|
%{_unitdir}/initrd.target.wants/dracut-pre-udev.service
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
|
||||||
%{_prefix}/lib/kernel/install.d/50-dracut.install
|
%{_prefix}/lib/kernel/install.d/50-dracut.install
|
||||||
%endif
|
|
||||||
|
|
||||||
%files network
|
%files network
|
||||||
%{dracutlibdir}/modules.d/01systemd-networkd
|
%{dracutlibdir}/modules.d/01systemd-networkd
|
||||||
|
%{dracutlibdir}/modules.d/35connman
|
||||||
%{dracutlibdir}/modules.d/35network-manager
|
%{dracutlibdir}/modules.d/35network-manager
|
||||||
%{dracutlibdir}/modules.d/35network-legacy
|
%{dracutlibdir}/modules.d/35network-legacy
|
||||||
%{dracutlibdir}/modules.d/35network-wicked
|
%{dracutlibdir}/modules.d/35network-wicked
|
||||||
@ -484,6 +491,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
%files live
|
%files live
|
||||||
%{dracutlibdir}/modules.d/99img-lib
|
%{dracutlibdir}/modules.d/99img-lib
|
||||||
%{dracutlibdir}/modules.d/90dmsquash-live
|
%{dracutlibdir}/modules.d/90dmsquash-live
|
||||||
|
%{dracutlibdir}/modules.d/90dmsquash-live-autooverlay
|
||||||
%{dracutlibdir}/modules.d/90dmsquash-live-ntfs
|
%{dracutlibdir}/modules.d/90dmsquash-live-ntfs
|
||||||
%{dracutlibdir}/modules.d/90livenet
|
%{dracutlibdir}/modules.d/90livenet
|
||||||
|
|
||||||
@ -505,12 +513,15 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|||||||
|
|
||||||
%files config-rescue
|
%files config-rescue
|
||||||
%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
||||||
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
|
||||||
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
||||||
|
%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel}
|
||||||
%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 28 2023 Jiayi Chen <chenjiayi22@huawei.com> - 059-1
|
||||||
|
- Update to 059 and fix some bugs in spec
|
||||||
|
|
||||||
* Thu Jul 28 2022 panxiaohe <panxh.life@foxmail.com> - 055-5
|
* Thu Jul 28 2022 panxiaohe <panxh.life@foxmail.com> - 055-5
|
||||||
- rebuild for upgrade
|
- rebuild for upgrade
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
From 9c3c197ce47bc45d0ea97bd3d4e05860c778df1b Mon Sep 17 00:00:00 2001
|
From 2dba7088c57691658d5dfa2b69ff77d266cae517 Mon Sep 17 00:00:00 2001
|
||||||
From: panxiaohe <panxiaohe@huawei.com>
|
From: panxiaohe <panxiaohe@huawei.com>
|
||||||
Date: Mon, 17 Jan 2022 19:53:41 +0800
|
Date: Tue, 17 Jan 2023 17:41:57 +0800
|
||||||
Subject: [PATCH] make network-legacy instead of network-manager the network
|
Subject: [PATCH] make network-legacy instead of network-manager the network
|
||||||
provider
|
provider
|
||||||
|
|
||||||
@ -9,18 +9,18 @@ Subject: [PATCH] make network-legacy instead of network-manager the network
|
|||||||
1 file changed, 2 deletions(-)
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||||
index cbb5b70..5396a49 100755
|
index 49b45f3..f498f3f 100755
|
||||||
--- a/modules.d/40network/module-setup.sh
|
--- a/modules.d/40network/module-setup.sh
|
||||||
+++ b/modules.d/40network/module-setup.sh
|
+++ b/modules.d/40network/module-setup.sh
|
||||||
@@ -19,8 +19,6 @@ depends() {
|
@@ -21,8 +21,6 @@ depends() {
|
||||||
if [ -z "$network_handler" ]; then
|
|
||||||
if [[ -x $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
|
|
||||||
network_handler="network-wicked"
|
network_handler="network-wicked"
|
||||||
- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then
|
elif [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then
|
||||||
|
network_handler="connman"
|
||||||
|
- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
|
||||||
- network_handler="network-manager"
|
- network_handler="network-manager"
|
||||||
else
|
else
|
||||||
network_handler="network-legacy"
|
network_handler="network-legacy"
|
||||||
fi
|
fi
|
||||||
--
|
--
|
||||||
1.8.3.1
|
2.33.0
|
||||||
|
|
||||||
|
|||||||
@ -1,21 +1,21 @@
|
|||||||
From 03d8f6a99e9fbc73836982c84fda9fb74be8cda9 Mon Sep 17 00:00:00 2001
|
From 594e8e187ab98f913c1abe60b7dd9c03c1bd3e9e Mon Sep 17 00:00:00 2001
|
||||||
From: openEuler Buildteam <buildteam@openeuler.org>
|
From: openEuler Buildteam <buildteam@openeuler.org>
|
||||||
Date: Wed, 25 Aug 2021 10:00:16 +0800
|
Date: Tue, 17 Jan 2023 17:22:09 +0800
|
||||||
Subject: [PATCH] revert "fix(systemd-networkd): make systemd-networkd a
|
Subject: [PATCH] revert "fix(systemd-networkd): make systemd-networkd a
|
||||||
proper network provider"
|
proper network provider"
|
||||||
|
|
||||||
This reverts commit ea779750c371102c04252b48f1b7d9c7ece7cf93 to make
|
This reverts commit ea779750c371102c04252b48f1b7d9c7ece7cf93 to make
|
||||||
network-legacy to be the network provider.
|
network-legacy to be the network provider.
|
||||||
---
|
---
|
||||||
modules.d/01systemd-networkd/module-setup.sh | 91 ++++++++++++----------------
|
modules.d/01systemd-networkd/module-setup.sh | 93 ++++++++------------
|
||||||
modules.d/40network/module-setup.sh | 4 +-
|
modules.d/40network/module-setup.sh | 4 +-
|
||||||
2 files changed, 39 insertions(+), 56 deletions(-)
|
2 files changed, 39 insertions(+), 58 deletions(-)
|
||||||
|
|
||||||
diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh
|
diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh
|
||||||
index 2f1ecb8..c0a970f 100755
|
index 27d9010..c0a970f 100755
|
||||||
--- a/modules.d/01systemd-networkd/module-setup.sh
|
--- a/modules.d/01systemd-networkd/module-setup.sh
|
||||||
+++ b/modules.d/01systemd-networkd/module-setup.sh
|
+++ b/modules.d/01systemd-networkd/module-setup.sh
|
||||||
@@ -1,79 +1,64 @@
|
@@ -1,81 +1,64 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
-# This file is part of dracut.
|
-# This file is part of dracut.
|
||||||
-# SPDX-License-Identifier: GPL-2.0-or-later
|
-# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
@ -63,18 +63,19 @@ index 2f1ecb8..c0a970f 100755
|
|||||||
"$systemdutildir"/systemd-networkd \
|
"$systemdutildir"/systemd-networkd \
|
||||||
- "$systemdutildir"/systemd-network-generator \
|
- "$systemdutildir"/systemd-network-generator \
|
||||||
"$systemdutildir"/systemd-networkd-wait-online \
|
"$systemdutildir"/systemd-networkd-wait-online \
|
||||||
- "$systemdutildir"/network/80-container-host0.network \
|
- "$systemdnetwork"/80-container-host0.network \
|
||||||
- "$systemdutildir"/network/80-container-ve.network \
|
- "$systemdnetwork"/80-container-ve.network \
|
||||||
- "$systemdutildir"/network/80-container-vz.network \
|
- "$systemdnetwork"/80-container-vz.network \
|
||||||
- "$systemdutildir"/network/80-vm-vt.network \
|
- "$systemdnetwork"/80-vm-vt.network \
|
||||||
- "$systemdutildir"/network/80-wifi-adhoc.network \
|
- "$systemdnetwork"/80-wifi-adhoc.network \
|
||||||
- "$systemdutildir"/network/99-default.link \
|
- "$systemdnetwork"/99-default.link \
|
||||||
+ "$systemdsystemunitdir"/systemd-networkd-wait-online.service \
|
+ "$systemdsystemunitdir"/systemd-networkd-wait-online.service \
|
||||||
"$systemdsystemunitdir"/systemd-networkd.service \
|
"$systemdsystemunitdir"/systemd-networkd.service \
|
||||||
"$systemdsystemunitdir"/systemd-networkd.socket \
|
"$systemdsystemunitdir"/systemd-networkd.socket \
|
||||||
- "$systemdsystemunitdir"/systemd-network-generator.service \
|
- "$systemdsystemunitdir"/systemd-network-generator.service \
|
||||||
- "$systemdsystemunitdir"/systemd-networkd-wait-online.service \
|
- "$systemdsystemunitdir"/systemd-networkd-wait-online.service \
|
||||||
- "$systemdsystemunitdir"/systemd-network-generator.service \
|
- "$systemdsystemunitdir"/systemd-network-generator.service \
|
||||||
|
- "$sysusers"/systemd-network.conf \
|
||||||
+ "$systemdutildir"/network/99-default.link \
|
+ "$systemdutildir"/network/99-default.link \
|
||||||
networkctl ip
|
networkctl ip
|
||||||
|
|
||||||
@ -122,33 +123,34 @@ index 2f1ecb8..c0a970f 100755
|
|||||||
- inst_multiple -H -o \
|
- inst_multiple -H -o \
|
||||||
- "$systemdutilconfdir"/networkd.conf \
|
- "$systemdutilconfdir"/networkd.conf \
|
||||||
- "$systemdutilconfdir/networkd.conf.d/*.conf" \
|
- "$systemdutilconfdir/networkd.conf.d/*.conf" \
|
||||||
- "$systemdutilconfdir/network/*" \
|
- "$systemdnetworkconfdir/*" \
|
||||||
- "$systemdsystemconfdir"/systemd-networkd.service \
|
- "$systemdsystemconfdir"/systemd-networkd.service \
|
||||||
- "$systemdsystemconfdir/systemd-networkd.service/*.conf" \
|
- "$systemdsystemconfdir/systemd-networkd.service/*.conf" \
|
||||||
- "$systemdsystemunitdir"/systemd-networkd.socket \
|
- "$systemdsystemconfdir"/systemd-networkd.socket \
|
||||||
- "$systemdsystemunitdir/systemd-networkd.socket/*.conf" \
|
- "$systemdsystemconfdir/systemd-networkd.socket/*.conf" \
|
||||||
- "$systemdsystemconfdir"/systemd-network-generator.service \
|
- "$systemdsystemconfdir"/systemd-network-generator.service \
|
||||||
- "$systemdsystemconfdir/systemd-network-generator.service/*.conf" \
|
- "$systemdsystemconfdir/systemd-network-generator.service/*.conf" \
|
||||||
- "$systemdsystemconfdir"/systemd-networkd-wait-online.service \
|
- "$systemdsystemconfdir"/systemd-networkd-wait-online.service \
|
||||||
- "$systemdsystemconfdir/systemd-networkd-wait-online.service/*.conf"
|
- "$systemdsystemconfdir/systemd-networkd-wait-online.service/*.conf" \
|
||||||
|
- "$sysusersconfdir"/systemd-network.conf
|
||||||
- fi
|
- fi
|
||||||
}
|
}
|
||||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||||
index 60824da..cbb5b70 100755
|
index 1ab13ef..49b45f3 100755
|
||||||
--- a/modules.d/40network/module-setup.sh
|
--- a/modules.d/40network/module-setup.sh
|
||||||
+++ b/modules.d/40network/module-setup.sh
|
+++ b/modules.d/40network/module-setup.sh
|
||||||
@@ -9,7 +9,7 @@ check() {
|
@@ -9,7 +9,7 @@ check() {
|
||||||
depends() {
|
depends() {
|
||||||
is_qemu_virtualized && echo -n "qemu-net "
|
is_qemu_virtualized && echo -n "qemu-net "
|
||||||
|
|
||||||
- for module in network-wicked network-manager network-legacy systemd-networkd; do
|
- for module in network-wicked connman network-manager network-legacy systemd-networkd; do
|
||||||
+ for module in network-wicked network-manager network-legacy; do
|
+ for module in network-wicked connman network-manager network-legacy; do
|
||||||
if dracut_module_included "$module"; then
|
if dracut_module_included "$module"; then
|
||||||
network_handler="$module"
|
network_handler="$module"
|
||||||
break
|
break
|
||||||
@@ -21,8 +21,6 @@ depends() {
|
@@ -23,8 +23,6 @@ depends() {
|
||||||
network_handler="network-wicked"
|
network_handler="connman"
|
||||||
elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then
|
elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
|
||||||
network_handler="network-manager"
|
network_handler="network-manager"
|
||||||
- elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
|
- elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
|
||||||
- network_handler="systemd-networkd"
|
- network_handler="systemd-networkd"
|
||||||
@ -156,5 +158,5 @@ index 60824da..cbb5b70 100755
|
|||||||
network_handler="network-legacy"
|
network_handler="network-legacy"
|
||||||
fi
|
fi
|
||||||
--
|
--
|
||||||
1.8.3.1
|
2.33.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user