Revert "Add fixes for systemd unit + kernel-install plugin (from master branch)."
This reverts commit b3999ac346
.
This commit is contained in:
parent
6a8bf28e78
commit
ee98742ce6
@ -8,7 +8,6 @@ Summary: Tools for virtual machine firmware volumes
|
|||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
URL: https://pypi.org/project/virt-firmware/
|
URL: https://pypi.org/project/virt-firmware/
|
||||||
Source0: virt-firmware-%{pypi_version}.tar.gz
|
Source0: virt-firmware-%{pypi_version}.tar.gz
|
||||||
Patch1: systemd-fixes.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -55,7 +54,7 @@ kernel-install plugin and systemd unit to manage automatic
|
|||||||
UKI (unified kernel image) updates.
|
UKI (unified kernel image) updates.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n virt-firmware-%{pypi_version} -p 1
|
%autosetup -n virt-firmware-%{pypi_version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
diff --git a/systemd/99-uki-uefi-setup.install b/systemd/99-uki-uefi-setup.install
|
|
||||||
index a2234e10f4d1..7d7fa47a4fa0 100755
|
|
||||||
--- a/systemd/99-uki-uefi-setup.install
|
|
||||||
+++ b/systemd/99-uki-uefi-setup.install
|
|
||||||
@@ -23,13 +23,22 @@ fi
|
|
||||||
UKI_FILE_BOOT="$UKI_DIR_BOOT/$ENTRY_TOKEN-$KERNEL_VERSION.efi"
|
|
||||||
UKI_FILE_ESP="$UKI_DIR_ESP/$ENTRY_TOKEN-$KERNEL_VERSION.efi"
|
|
||||||
|
|
||||||
+if [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ]; then
|
|
||||||
+ LOGLEVEL="--loglevel info"
|
|
||||||
+else
|
|
||||||
+ LOGLEVEL="--loglevel error"
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
case "$COMMAND" in
|
|
||||||
remove)
|
|
||||||
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
|
|
||||||
- echo "Removing $UKI_DIR_ESP/$ENTRY_TOKEN-$KERNEL_VERSION.efi from UEFI boot entries"
|
|
||||||
- for uki in "$UKI_DIR_ESP/$ENTRY_TOKEN-$KERNEL_VERSION.efi"; do
|
|
||||||
- [ -f "$uki" ] && kernel-bootcfg --remove-uki "$uki"
|
|
||||||
- done
|
|
||||||
+ echo "Removing $UKI_FILE_ESP from UEFI boot entries"
|
|
||||||
+ kernel-bootcfg $LOGLEVEL --remove-uki "$UKI_FILE_ESP"
|
|
||||||
+ if [ "$UKI_FILE_BOOT" != "$UKI_FILE_ESP" -a -f "$UKI_FILE_ESP" ]; then
|
|
||||||
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
|
|
||||||
+ echo "Removing $UKI_FILE_ESP from ESP"
|
|
||||||
+ rm -f "$UKI_FILE_ESP"
|
|
||||||
+ fi
|
|
||||||
;;
|
|
||||||
add)
|
|
||||||
[ "$KERNEL_INSTALL_LAYOUT" = "uki" ] || exit 0
|
|
||||||
@@ -40,18 +49,19 @@ case "$COMMAND" in
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
|
|
||||||
- echo "Adding $UKI_FILE_ESP to ESP and UEFI boot entries"
|
|
||||||
-
|
|
||||||
- # Copy the UKI to the ESP when $BOOT and ESP differ
|
|
||||||
- if [ ! -f "$UKI_FILE_ESP" ]; then
|
|
||||||
- install -D -m 0644 "$UKI_FILE_BOOT" "$UKI_FILE_ESP" || {
|
|
||||||
- echo "Error: could not copy '$UKI_FILE_BOOT' to '$UKI_FILE_ESP'." >&2
|
|
||||||
+ # Move the UKI to the ESP when $BOOT and ESP differ
|
|
||||||
+ if [ "$UKI_FILE_BOOT" != "$UKI_FILE_ESP" -a ! -f "$UKI_FILE_ESP" ]; then
|
|
||||||
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
|
|
||||||
+ echo "Moving $UKI_FILE_BOOT to ESP"
|
|
||||||
+ mv "$UKI_FILE_BOOT" "$UKI_FILE_ESP" || {
|
|
||||||
+ echo "Error: could not move '$UKI_FILE_BOOT' to '$UKI_FILE_ESP'." >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- kernel-bootcfg --add-uki "$UKI_FILE_ESP" --title "$KERNEL_VERSION" --once
|
|
||||||
+ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
|
|
||||||
+ echo "Adding $UKI_FILE_ESP to UEFI boot entries"
|
|
||||||
+ kernel-bootcfg $LOGLEVEL --add-uki "$UKI_FILE_ESP" --title "$KERNEL_VERSION" --once
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
diff --git a/systemd/kernel-bootcfg-boot-successful.service b/systemd/kernel-bootcfg-boot-successful.service
|
|
||||||
index 7bf851496982..b45a317daf96 100644
|
|
||||||
--- a/systemd/kernel-bootcfg-boot-successful.service
|
|
||||||
+++ b/systemd/kernel-bootcfg-boot-successful.service
|
|
||||||
@@ -2,8 +2,11 @@
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=UKI Successful Boot
|
|
||||||
-After=sysinit.target
|
|
||||||
-Before=systemd-user-sessions.service
|
|
||||||
+Requires=boot-complete.target
|
|
||||||
+After=local-fs.target boot-complete.target
|
|
||||||
+Conflicts=shutdown.target
|
|
||||||
+Before=shutdown.target
|
|
||||||
+ConditionFirmware=uefi
|
|
||||||
ConditionPathExists=!/etc/initrd-release
|
|
||||||
|
|
||||||
[Service]
|
|
Loading…
Reference in New Issue
Block a user