public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/grub2] rawhide: spec: always exit with zero status on common posttrans scriptlet
@ 2026-06-18  8:04 Leo Sandoval
  0 siblings, 0 replies; only message in thread
From: Leo Sandoval @ 2026-06-18  8:04 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/grub2
            Branch : rawhide
            Commit : 7b051a1f0edb3417419477815e3cd838a86e19c9
            Author : Leo Sandoval <lsandova@redhat.com>
            Date   : 2026-06-17T10:31:22-06:00
            Stats  : +6/-4 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/grub2/c/7b051a1f0edb3417419477815e3cd838a86e19c9?branch=rawhide

            Log:
            spec: always exit with zero status on common posttrans scriptlet

The parent commit discovered a common posttrans issue when executing
the grub2-mkconfig, where internally it probes /boot/efi folder and fails
under some chroot (or similar) environments. This is not a critical
error so explicity return zero on this case through the common '||
true' script pattern.

Signed-off-by: Leo Sandoval <lsandova@redhat.com>

---
diff --git a/grub2.spec b/grub2.spec
index e6a71f2..8665d22 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -17,7 +17,7 @@
 Name:		grub2
 Epoch:		1
 Version:	2.12
-Release:	64%{?dist}
+Release:	65%{?dist}
 Summary:	Bootloader with support for Linux, Multiboot and more
 License:	GPL-3.0-or-later
 URL:		http://www.gnu.org/software/grub/
@@ -404,13 +404,13 @@ GRUB_DIR=/boot/grub2
 
 if test ! -f ${GRUB_DIR}/grub.cfg; then
     # there's no config in GRUB home, create one
-    grub2-mkconfig -o ${GRUB_DIR}/grub.cfg
+    grub2-mkconfig -o ${GRUB_DIR}/grub.cfg  || :
 else
     GRUB_CFG_MODE=$(stat --format="%a" ${GRUB_DIR}/grub.cfg)
     if ! test "${GRUB_CFG_MODE}" = "600"; then
         # when upgrading from <=2.06-126 to newer versions, the grub config stub
         # may have different mode than 0600, so set the latter if this is the case
-        chmod 0600 ${GRUB_DIR}/grub.cfg
+        chmod 0600 ${GRUB_DIR}/grub.cfg || :
     fi
 fi
 
@@ -627,7 +627,9 @@ fi
 %endif
 
 %changelog
-=======
+* Mon Jun 15 2026 Leo Sandoval <lsandova@redhat.com> - 2.12-65
+- spec: always exit with zero status on common posttrans scriptlet
+
 * Mon Jun 15 2026 Leo Sandoval <lsandova@redhat.com> - 2.12-64
 - spec: move all pending EFI logic from common to EFI package
 - Related: #2482790

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-18  8:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-18  8:04 [rpms/grub2] rawhide: spec: always exit with zero status on common posttrans scriptlet Leo Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox