diff --git a/b3e55bde30b8d34c7ed888794ef3f5e9f028b267.patch b/b3e55bde30b8d34c7ed888794ef3f5e9f028b267.patch new file mode 100644 index 0000000000000000000000000000000000000000..67854317bd47b932dcfa6ac1bccd169ba9386696 --- /dev/null +++ b/b3e55bde30b8d34c7ed888794ef3f5e9f028b267.patch @@ -0,0 +1,99 @@ +diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh +deleted file mode 100755 +index 67f5b7174..000000000 +--- a/51-dracut-rescue-postinst.sh ++++ /dev/null +@@ -1,68 +0,0 @@ +-#!/bin/bash +- +-export LANG=C +- +-KERNEL_VERSION="$1" +-KERNEL_IMAGE="$2" +- +-[[ -f /etc/os-release ]] && . /etc/os-release +- +-if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then +- systemd-machine-id-setup +-fi +- +-[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id +- +-[[ $MACHINE_ID ]] || exit 1 +-[[ -f $KERNEL_IMAGE ]] || exit 1 +- +-INITRDFILE="/boot/initramfs-0-rescue-${MACHINE_ID}.img" +-NEW_KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-0-rescue-${MACHINE_ID}" +- +-[[ -f $INITRDFILE ]] && [[ -f $NEW_KERNEL_IMAGE ]] && exit 0 +- +-dropindirs_sort() +-{ +- suffix=$1; shift +- args=("$@") +- files=$( +- while (( $# > 0 )); do +- for i in ${1}/*${suffix}; do +- [[ -f $i ]] && echo ${i##*/} +- done +- shift +- done | sort -Vu +- ) +- +- for f in $files; do +- for d in "${args[@]}"; do +- if [[ -f "$d/$f" ]]; then +- echo "$d/$f" +- continue 2 +- fi +- done +- done +-} +- +-# source our config dir +-for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do +- [[ -e $f ]] && . "$f" +-done +- +-[[ $dracut_rescue_image != "yes" ]] && exit 0 +- +-if [[ ! -f $INITRDFILE ]]; then +- dracut --no-hostonly -a "rescue" "$INITRDFILE" "$KERNEL_VERSION" +- ((ret+=$?)) +-fi +- +-if [[ ! -f $NEW_KERNEL_IMAGE ]]; then +- cp --reflink=auto "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE" +- ((ret+=$?)) +-fi +- +-new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$NEW_KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$NAME $VERSION_ID Rescue $MACHINE_ID" +- +-((ret+=$?)) +- +-exit $ret +diff --git a/dracut.spec b/dracut.spec +index b1a84eb6b..e89a98736 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -278,11 +278,6 @@ rm -f -- $RPM_BUILD_ROOT%{_mandir}/man1/lsinitrd.1* + 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 + +-%if 0%{?rhel} > 0 && 0%{?rhel} <= 8 +-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.md HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg +@@ -479,8 +474,5 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne + %files config-rescue + %{dracutlibdir}/dracut.conf.d/02-rescue.conf + %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install +-%if 0%{?rhel} > 0 && 0%{?rhel} <= 8 +-%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh +-%endif + + %changelog diff --git a/dracut.spec b/dracut.spec index a85222233131910388f3d23c3e58b39f36bc6365..ef880086cd7897376fae188801b0df01987490b4 100644 --- a/dracut.spec +++ b/dracut.spec @@ -9,7 +9,7 @@ Name: dracut Version: 050 -Release: 3 +Release: 4 Summary: Initramfs generator using udev @@ -38,6 +38,7 @@ Patch10: dracut-lib.sh-quote-variables-in-parameter-expansion.patch Patch11: dracut-90crypt-module-setup.sh-fix-force-on-multiple-lines.patch Patch12: Fix-test-in-lsinitrd.patch Patch13: add-option-to-include-file-metadata-in-initramfs.patch +Patch6000: b3e55bde30b8d34c7ed888794ef3f5e9f028b267.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt Source2: openEuler.conf.example @@ -488,6 +489,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* 20201214215849783810 patch-tracking 050-4 +- append patch file of upstream repository from to + * Thu Jul 23 2020 Liquor - 050-1 - Update to 050 @@ -516,4 +520,4 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - Delete redundant information * Thu Aug 29 2019 openEuler Buildteam - 049-1 -- Package init +- Package init \ No newline at end of file