From 1dbc6bcb1aeafde963bb2efbf6553b52c121903a5e1c4b54efb9193411629cd5 Mon Sep 17 00:00:00 2001 From: Lubos Kocman Date: Mon, 24 Nov 2025 18:02:55 +0100 Subject: [PATCH] - Add update-bootloader also into post and postun Requires - Drop update-bootloader --get as it returns 0 even if the variable is unset --- grub2-compat-ia32.changes | 11 +++++++++++ grub2-compat-ia32.spec | 18 +++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/grub2-compat-ia32.changes b/grub2-compat-ia32.changes index fdfff17..26e6884 100644 --- a/grub2-compat-ia32.changes +++ b/grub2-compat-ia32.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Nov 24 16:55:15 UTC 2025 - Lubos Kocman + +- Add update-bootloader also into post and postun Requires + +------------------------------------------------------------------- +Mon Aug 4 13:33:31 UTC 2025 - Lubos Kocman + +- Drop update-bootloader --get as it returns 0 + even if the variable is unset + ------------------------------------------------------------------- Thu Jun 26 00:14:04 UTC 2025 - Lubos Kocman diff --git a/grub2-compat-ia32.spec b/grub2-compat-ia32.spec index 4c29bf4..aea1453 100644 --- a/grub2-compat-ia32.spec +++ b/grub2-compat-ia32.spec @@ -1,7 +1,7 @@ # # spec file for package grub2-compat-ia32 # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,8 +23,14 @@ Summary: Enable IA32 emulation support in the kernel License: MIT URL: https://en.opensuse.org/GRUB#Enabling_32bit_x86_support_in_Kernel Source1: README.md + Requires: glibc-32bit Requires: update-bootloader +Requires(post): update-bootloader +Requires(postun): update-bootloader + +BuildRequires: update-bootloader + BuildArch: noarch ExclusiveArch: x86_64 @@ -45,17 +51,15 @@ cp -a %{SOURCE1} . %doc README.md %post -if ! %{_sbindir}/update-bootloader --get-option "ia32_emulation=1" &>/dev/null; then - %{_sbindir}/update-bootloader --add-option "ia32_emulation=1" || : -fi -%{_sbindir}/update-bootloader --config || : +%{_sbindir}/update-bootloader --add-option "ia32_emulation=1" +%{_sbindir}/update-bootloader --config echo "IA32 emulation has been enabled. Please reboot to apply changes." %postun # Only delete the option on uninstall, not upgrade if [ "$1" -eq 0 ]; then - %{_sbindir}/update-bootloader --del-option "ia32_emulation=1" || : - %{_sbindir}/update-bootloader --config || : + %{_sbindir}/update-bootloader --del-option "ia32_emulation=1" + %{_sbindir}/update-bootloader --config echo "IA32 emulation has been removed. Please reboot to apply changes." fi -- 2.51.1