Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package shim for openSUSE:Factory checked in at 2026-11-13 20:12:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/shim (Old) and /work/SRC/openSUSE:Factory/.shim.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "shim" Fri Nov 13 20:12:21 2026 rev:143 rq:1396647 version:16.1 Changes: -------- --- /work/SRC/openSUSE:Factory/shim/shim.changes 2026-10-13 17:43:17.298143023 +0200 +++ /work/SRC/openSUSE:Factory/.shim.new.1251/shim.changes 2026-11-13 20:12:26.724707614 +0100 @@ -1,0 +2,154 @@ +Fri Nov 6 08:18:42 UTC 2026 - Joey Lee <[email protected]> + +- Add shim-Make.defaults-Support-overriding-preprocessor-define.patch + + Append $(EXTRA_DEFINES) to CFLAGS. This provides a clean mechanism for + build scripts to pass extra preprocessor directives, such as tailoring + the debug directory path: + + make EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L"/usr/lib/debug/..."' + + This patch is sent to upstream for reviewing. + + Link: https://github.com/rhboot/shim/pull/837 +- Replace DEBUGDIR via EXTRA_DEFINES: + EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L\"/usr/lib/debug/usr/share/efi/$(ARCH)/\"' +- Add shim-Allow-overriding-FALLBACK-and-MOK_MANAGER-filen.patch + Guard the definitions of FALLBACK and MOK_MANAGER with #ifndef checks. + Fall back to the upstream default filenames when these macros are not + defined externally. This allows downstream build systems to override the + target binary filenames at compile time (e.g., via EXTRA_DEFINES) while + preserving existing default behavior. +- Replace FALLBACK and MOK_MANAGER filenames via EXTRA_DEFINES: + EXTRA_DEFINES='-DFALLBACK=L\"fallback.efi\" -DMOK_MANAGER=L\"MokManager.efi\"' + - Use extra_defines[] to collect all EXTRA_DEFINES. +- Add shim-Allow-overriding-debug-symbol-filenames-via-preproce.patch + Introduce SHIM_DEBUG_FILE and FB_DEBUG_FILE macros in shim.c and + fallback.c, respectively. Fall back to the default filenames when these + macros are not defined externally. This allows build systems to override + the debug symbol filenames at compile time (e.g., via EXTRA_DEFINES) + while preserving the default behavior. +- Replace FB_DEBUG_FILE and SHIM_DEBUG_FILE filenames via EXTRA_DEFINES: + EXTRA_DEFINES='-DFB_DEBUG_FILE=L\"fallback.debug\" -DSHIM_DEBUG_FILE=L\"shim.debug\"' + +------------------------------------------------------------------- +Wed Nov 4 05:44:03 UTC 2026 - Joey Lee <[email protected]> + +- Replace remove_build_id.patch with shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch + + The root cause of build-id change is when building shim from different + directory paths (or renamed source trees), the generated ELF/PE binaries + produce differing --build-id values and SHA-1 checksums. + + So I replace the remove_build_id.patch with + shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch. + I have sent the patch to upstream: + + Makefile: normalize DWARF paths to fix build-id reproducibility - #838#838 + https://github.com/rhboot/shim/pull/838 + + Link: https://github.com/rhboot/shim/pull/838 + +------------------------------------------------------------------- +Wed Nov 4 05:09:46 UTC 2026 - Joey Lee <[email protected]> + +- Add more information for upstreamming shim-disable-export-vendor-dbx.patch + + I have sent a patch for pushing the change in + shim-disable-export-vendor-dbx.patch with a build option to upstream. + + Link: https://github.com/rhboot/shim/pull/779 + +------------------------------------------------------------------- +Fri Oct 30 16:44:02 UTC 2026 - Joey Lee <[email protected]> + +- shim.spec: Removed downstream shim-arch-independent-names.patch + + For reducing downstream patches in SUSE shim, removed + shim-arch-independent-names.patch from shim.spec. + + The shim-arch-independent-names.patch includes two parts: + - Renamed the names of fallback and MokManager for removing + architecture string: + - fb<EFI_ARCH>.efi to fallback.efi + - mm<EFI_ARCH>.efi to MokManager.efi + - Renamed the filename of symbol files for printing out message + of debug_hook: + - fb<EFI_ARCH>.efi.debug to fallback.efi.debug + - shim<EFI_ARCH>.efi.debug to shim.efi.debug + + For the first part, the output *.efi filename can be set when + building fallback/MokManger by make command since long time ago. + So the code can be removed. + + For the second part, I sent a patch to shim upstream to support + overriding preprocessor defines via EXTRA_DEFINES and FB_DEBUG_FILE + /SHIM_DEBUG_FILE. After the patch be merged, we can use EXTRA_DEFINES + to override the symbol filenames. + + To avoid confusion, I removed symlinks for compatibility with + original debug filenames (shim.efi.debug and fallback.efi.debug) + because we can use EXTRA_DEFINES to override the filenames in + debug_hook in the future. + + Link: https://github.com/rhboot/shim/pull/837 + +------------------------------------------------------------------- +Thu Oct 29 15:25:10 UTC 2026 - Joey Lee <[email protected]> + +- shim.spec: Removed downstream shim-change-debug-file-path.patch + For reducing downstream patches in SUSE shim, removed + shim-change-debug-file-path.patch from shim.spec. + + The shim-change-debug-file-path.patch includes two parts: + - Modified DDEBUGDIR meets SUSE's directory rule: + DDEBUGDIR=/usr/lib/debug/usr/share/efi/$(ARCH)/ + - Renamed the filename of symbol files for printing out message + of debug_hook: + - fallback.efi.debug -> fallback.debug + - shim.efi.debug -> shim.debug + + For the first part, I sent a patch to shim upstream to support + overriding preprocessor defines via EXTRA_DEFINES. After the + patch be merged, we can use EXTRA_DEFINES to override DDEBUGDIR. + + For the second part, I created symlinks for compatibility with + original shim debug filenames. e.g. Link shim.efi.debug to shim.debug + + Link: https://github.com/rhboot/shim/pull/837 + +------------------------------------------------------------------- +Thu Oct 29 03:37:10 UTC 2026 - Joey Lee <[email protected]> + +- shim.spec: Add ENABLE_CODESIGN_EKU=1 when buliding MokManger + Add ENABLE_CODESIGN_EKU=1 when buliding MokManager to avoid + using the non-ENABLE_CODESIGN_EKU binaries in the subsequent + shim building process. + +------------------------------------------------------------------- +Tue Oct 20 09:03:49 UTC 2026 - Joey Lee <[email protected]> + +- shim-install: separate the logic of grabbing OS_ID + When the GRUB_DISTRIBUTOR can be grab by /etc/default/grub. The + logic of grabbing OS_ID from os-release will be ignored. + For example: SL-Micro 6.1 has GRUB_DISTRIBUTOR="SL Micro" in + /etc/default/grub. + We always need OS_ID for subsequent processing logic. So this + patch separate the logic of grabbing OS_ID. (bsc#1285863#c14) + +------------------------------------------------------------------- +Mon Oct 19 12:07:19 UTC 2026 - Joey Lee <[email protected]> + +- shim-install: refactory the logic of update_boot for fixing two issues + Refactory the logic of update_boot for updating EFI default boot path + in shim-install and fixed two issues: + - The fallback efi NOT be copied to the default efi boot path for SLE + (bsc#1285863) + - This issue causes by the a shim-install patch be merged to SLE shim: + 661ad2944d2a ("shim-install: Do not update fallback on sl-micro when + the fallback is not in efi default boot path") + - The encrypted SL-Micro uses 'removable=yes' for TPM key unsealing. But + the original logic did NOT copy MokManager to EFI default boot path. + (bsc#1285863#c11) + +------------------------------------------------------------------- Old: ---- remove_build_id.patch shim-arch-independent-names.patch shim-change-debug-file-path.patch New: ---- shim-Allow-overriding-FALLBACK-and-MOK_MANAGER-filen.patch shim-Allow-overriding-debug-symbol-filenames-via-preproce.patch shim-Make.defaults-Support-overriding-preprocessor-define.patch shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch ----------(Old B)---------- Old: - Replace remove_build_id.patch with shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch Old: - shim.spec: Removed downstream shim-arch-independent-names.patch Old: - shim.spec: Removed downstream shim-change-debug-file-path.patch For reducing downstream patches in SUSE shim, removed ----------(Old E)---------- ----------(New B)---------- New: EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L\"/usr/lib/debug/usr/share/efi/$(ARCH)/\"' - Add shim-Allow-overriding-FALLBACK-and-MOK_MANAGER-filen.patch Guard the definitions of FALLBACK and MOK_MANAGER with #ifndef checks. New: - Use extra_defines[] to collect all EXTRA_DEFINES. - Add shim-Allow-overriding-debug-symbol-filenames-via-preproce.patch Introduce SHIM_DEBUG_FILE and FB_DEBUG_FILE macros in shim.c and New: - Add shim-Make.defaults-Support-overriding-preprocessor-define.patch New: - Replace remove_build_id.patch with shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ shim.spec ++++++ --- /var/tmp/diff_new_pack.CZGV9n/_old 2026-11-13 20:12:29.544826989 +0100 +++ /var/tmp/diff_new_pack.CZGV9n/_new 2026-11-13 20:12:29.559827624 +0100 @@ -103,16 +103,16 @@ Source61: revoked-SLES-UEFI-SIGN-Certificate-2022-05.crt ### Source99: SIGNATURE_UPDATE.txt -# PATCH-FIX-SUSE shim-arch-independent-names.patch [email protected] -- Use the Arch-independent names -Patch1: shim-arch-independent-names.patch -# PATCH-FIX-OPENSUSE shim-change-debug-file-path.patch [email protected] -- Change the default debug file path -Patch2: shim-change-debug-file-path.patch -# PATCH-FIX-SUSE remove_build_id.patch -- Remove the build ID to make the binary reproducible when building with AArch64 container -Patch3: remove_build_id.patch # PATCH-FIX-SUSE shim-disable-export-vendor-dbx.patch bsc#1185261 [email protected] -- Disable exporting vendor-dbx to MokListXRT Patch4: shim-disable-export-vendor-dbx.patch # PATCH-FIX-SUSE shim-objcopy-target.patch -- for binutils >= 2.47 Patch5: shim-objcopy-target.patch +# Makefile: normalize DWARF paths to fix build-id reproducibility - #838 +Patch6: shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch +# Make.defaults: Support overriding preprocessor defines via EXTRA_DEFINES - #837 +Patch7: shim-Make.defaults-Support-overriding-preprocessor-define.patch +Patch8: shim-Allow-overriding-FALLBACK-and-MOK_MANAGER-filen.patch +Patch9: shim-Allow-overriding-debug-symbol-filenames-via-preproce.patch BuildRequires: gcc%{gcc_version} BuildRequires: dos2unix BuildRequires: efitools @@ -206,11 +206,21 @@ bash %{_sourcedir}/generate-vendor-dbx.sh %{_sourcedir}/revoked-*.crt ls -al *.esl +extra_defines=( + '-UDEBUGDIR' + '-DDEBUGDIR=L\"/usr/lib/debug/usr/share/efi/$(ARCH)/\"' + '-DFALLBACK=L\"\\\\fallback.efi\"' + '-DMOK_MANAGER=L\"\\\\MokManager.efi\"' + '-DFB_DEBUG_FILE=L\"fallback.debug\"' + '-DSHIM_DEBUG_FILE=L\"shim.debug\"' +) + # first, build MokManager and fallback as they don't depend on a # specific certificate -make CC=%{cc_compiler} RELEASE=0 \ +make CC=%{cc_compiler} RELEASE=0 ENABLE_CODESIGN_EKU=1 \ MMSTEM=MokManager FBSTEM=fallback \ POST_PROCESS_PE_FLAGS=-n \ + EXTRA_DEFINES="${extra_defines[*]}" \ MokManager.efi.debug fallback.efi.debug \ MokManager.efi fallback.efi # make sure all object files gets rebuilt @@ -280,6 +290,7 @@ VENDOR_CERT_FILE=shim-$suffix.der ENABLE_HTTPBOOT=1 \ DEFAULT_LOADER="\\\\\\\\grub.efi" \ VENDOR_DBX_FILE=$vendor_dbx \ + EXTRA_DEFINES="${extra_defines[*]}" \ shim.efi.debug shim.efi # # assert correct certificate embedded @@ -311,6 +322,7 @@ VENDOR_CERT_FILE=shim-$suffix.der ENABLE_HTTPBOOT=1 \ DEFAULT_LOADER="\\\\\\\\grub.efi" \ VENDOR_DBX_FILE=$vendor_dbx \ + EXTRA_DEFINES="${extra_defines[*]}" \ POST_PROCESS_PE_FLAGS=-n \ shim.nx.efi.debug shim.nx.efi # ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.CZGV9n/_old 2026-11-13 20:12:29.850839942 +0100 +++ /var/tmp/diff_new_pack.CZGV9n/_new 2026-11-13 20:12:29.868840705 +0100 @@ -1,7 +1,7 @@ -mtime: 1791262138 -commit: 4267692a179420665346fc0f7290e67c2781da0611fa359f835c9aa7418d29ab +mtime: 1794275725 +commit: d2961baddef2242cf9d1b02c5dee1890c5147528b8ecaeefd3ed1d6fe224489d url: https://src.opensuse.org/devel-factory/shim -revision: 4267692a179420665346fc0f7290e67c2781da0611fa359f835c9aa7418d29ab +revision: d2961baddef2242cf9d1b02c5dee1890c5147528b8ecaeefd3ed1d6fe224489d trackingbranch: main projectscmsync: https://src.opensuse.org/devel-factory/_ObsPrj.git ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-11-10 02:55:25.000000000 +0100 @@ -0,0 +1 @@ +.osc ++++++ shim-Allow-overriding-FALLBACK-and-MOK_MANAGER-filen.patch ++++++ >From 17a44c1b9ddfb1ff0e9f9372c29f106918d70e0e Mon Sep 17 00:00:00 2001 From: Chun-Yi Lee <[email protected]> Date: Fri, 6 Nov 2026 15:48:36 +0800 Subject: [PATCH] shim: Allow overriding FALLBACK and MOK_MANAGER filenames at compile time Currently, the fallback and MokManager binary paths in shim are hardcoded to "fb<EFI_ARCH>.efi" and "mm<EFI_ARCH>.efi" via the FALLBACK and MOK_MANAGER macros. Downstream distributions or specific bootloader setups may rename or install these binaries under different filenames (for instance, standardized names like "fallback.efi" and "MokManager.efi", or names tailored to distribution-specific filesystem layouts). Because these macros are unconditionally defined in the source header/file, build environments cannot adjust the target binaries at build time without patching the source tree. Guard the definitions of FALLBACK and MOK_MANAGER with #ifndef checks. Fall back to the upstream default filenames when these macros are not defined externally. This allows downstream build systems to override the target binary filenames at compile time (e.g., via EXTRA_DEFINES) while preserving existing default behavior. This patch is sent to upstream for reviewing. Link: https://github.com/rhboot/shim/pull/837 Signed-off-by: Chun-Yi Lee <[email protected]> --- shim.h | 4 ++++ 1 file changed, 4 insertions(+) Index: shim-16.1/shim.h =================================================================== --- shim-16.1.orig/shim.h +++ shim-16.1/shim.h @@ -133,8 +133,12 @@ #define DEBUGSRC L"/usr/src/debug/shim-" VERSIONSTR "." EFI_ARCH #endif +#ifndef FALLBACK #define FALLBACK L"\\fb" EFI_ARCH L".efi" +#endif +#ifndef MOK_MANAGER #define MOK_MANAGER L"\\mm" EFI_ARCH L".efi" +#endif #if defined(VENDOR_DB_FILE) # define vendor_authorized vendor_db ++++++ shim-Allow-overriding-debug-symbol-filenames-via-preproce.patch ++++++ >From 5205fac9b11236f5bfd1cd47c78425a23c086135 Mon Sep 17 00:00:00 2001 From: Chun-Yi Lee <[email protected]> Date: Fri, 30 Oct 2026 17:43:36 +0800 Subject: [PATCH] Allow overriding debug symbol filenames via preprocessor macros Currently, the debug symbol filenames printed by debug_hook() in shim and fallback are hardcoded to "shim<EFI_ARCH>.efi.debug" and "fb<EFI_ARCH>.efi.debug". Downstream distributions or custom build environments may install or package debug symbol files under standardized filenames (e.g., "shim.debug" or "fallback.debug") to align with distro-wide debuginfo packaging policies. Because the filenames are hardcoded directly in the C source files, build systems cannot adjust the printed GDB add-symbol-file paths to match distribution-specific naming schemes. Introduce SHIM_DEBUG_FILE and FB_DEBUG_FILE macros in shim.c and fallback.c, respectively. Fall back to the default filenames when these macros are not defined externally. This allows build systems to override the debug symbol filenames at compile time (e.g., via EXTRA_DEFINES) while preserving the default behavior. This patch is sent to upstream for reviewing. Link: https://github.com/rhboot/shim/pull/837 Signed-off-by: Chun-Yi Lee <[email protected]> --- BUILDING | 2 +- fallback.c | 9 ++++++--- shim.c | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) Index: shim-16.1/BUILDING =================================================================== --- shim-16.1.orig/BUILDING +++ shim-16.1/BUILDING @@ -80,7 +80,7 @@ Variables you could set to customize the without overriding the internal DEFINES set by the build system. For example, to customize the embedded debug directory path: - make EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L\"/usr/lib/debug/usr/share/efi/$(ARCH)/\"' + make EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L\"/usr/lib/debug/usr/share/efi/$(ARCH)/\" -DSHIM_DEBUG_FILE=L\"shim.debug\"' Vendor SBAT data: It will sometimes be requested by reviewers that a build includes extra Index: shim-16.1/fallback.c =================================================================== --- shim-16.1.orig/fallback.c +++ shim-16.1/fallback.c @@ -7,6 +7,10 @@ #define NO_REBOOT L"FB_NO_REBOOT" +#ifndef FB_DEBUG_FILE +#define FB_DEBUG_FILE L"fb" EFI_ARCH L".efi.debug" +#endif + EFI_LOADED_IMAGE *this_image = NULL; int @@ -1087,9 +1091,8 @@ debug_hook(void) return; x = 1; - console_print(L"add-symbol-file "DEBUGDIR - L"fb" EFI_ARCH L".efi.debug %p -s .data %p\n", - &_etext, &_edata); + console_print(L"add-symbol-file " DEBUGDIR FB_DEBUG_FILE + L" %p -s .data %p\n", &_etext, &_edata); } EFI_STATUS Index: shim-16.1/shim.c =================================================================== --- shim-16.1.orig/shim.c +++ shim-16.1/shim.c @@ -18,6 +18,10 @@ #include <stdint.h> +#ifndef SHIM_DEBUG_FILE +#define SHIM_DEBUG_FILE L"shim" EFI_ARCH L".efi.debug" +#endif + static EFI_SYSTEM_TABLE *systab; static EFI_HANDLE global_image_handle; static EFI_LOADED_IMAGE *shim_li; @@ -1079,9 +1083,8 @@ debug_hook(void) FreePool(data); - console_print(L"add-symbol-file "DEBUGDIR - L"shim" EFI_ARCH L".efi.debug 0x%08x -s .data 0x%08x\n", - &_text, &_data); + console_print(L"add-symbol-file "DEBUGDIR SHIM_DEBUG_FILE + L" 0x%08x -s .data 0x%08x\n", &_text, &_data); console_print(L"Pausing for debugger attachment.\n"); console_print(L"To disable this, remove the EFI variable %s-%g .\n", ++++++ shim-Make.defaults-Support-overriding-preprocessor-define.patch ++++++ >From eed4adeecd79f9bcd6f68af33905894f74d81f17 Mon Sep 17 00:00:00 2001 From: Chun-Yi Lee <[email protected]> Date: Thu, 29 Oct 2026 22:55:58 +0800 Subject: [PATCH] Make.defaults: Support overriding preprocessor defines via EXTRA_DEFINES Currently, CFLAGS accumulates various internal build options and ends with $(DEFINES). When downstream packagers need to supplement or override specific preprocessor macros without disrupting the build defaults, there is no dedicated interface to do so. Overriding DEFINES directly on the make command line is too intrusive, as it wipes out all default definitions set by Make.defaults. Append $(EXTRA_DEFINES) to CFLAGS. This provides a clean mechanism for build scripts to pass extra preprocessor directives, such as tailoring the debug directory path: make EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L"/usr/lib/debug/..."' This patch is sent to upstream for reviewing. Link: https://github.com/rhboot/shim/pull/837 Signed-off-by: Chun-Yi Lee <[email protected]> --- BUILDING | 6 ++++++ Make.defaults | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) Index: shim-16.1/BUILDING =================================================================== --- shim-16.1.orig/BUILDING +++ shim-16.1/BUILDING @@ -75,6 +75,12 @@ Variables you could set to customize the - ENABLE_CODESIGN_EKU This changes the certificate validation logic to require Extended Key Usage 1.3.6.1.5.5.7.3.3 ("Code Signing"). +- EXTRA_DEFINES + This allows you to append additional C preprocessor macros to CFLAGS + without overriding the internal DEFINES set by the build system. + For example, to customize the embedded debug directory path: + + make EXTRA_DEFINES='-UDEBUGDIR -DDEBUGDIR=L\"/usr/lib/debug/usr/share/efi/$(ARCH)/\"' Vendor SBAT data: It will sometimes be requested by reviewers that a build includes extra Index: shim-16.1/Make.defaults =================================================================== --- shim-16.1.orig/Make.defaults +++ shim-16.1/Make.defaults @@ -138,7 +138,8 @@ CFLAGS = $(FEATUREFLAGS) \ $(ARCH_CFLAGS) \ $(WERRFLAGS) \ $(INCLUDES) \ - $(DEFINES) + $(DEFINES) \ + $(EXTRA_DEFINES) POST_PROCESS_PE_FLAGS = ++++++ shim-Makefile-normalize-DWARF-paths-to-fix-build-id-repro.patch ++++++ >From 69a53b85fa8f2edff58371368d3bf056023f3ad9 Mon Sep 17 00:00:00 2001 From: Chun-Yi Lee <[email protected]> Date: Tue, 3 Nov 2026 18:45:26 +0800 Subject: [PATCH] Makefile: normalize DWARF paths to fix build-id reproducibility When building shim from different directory paths (or renamed source trees), the generated ELF/PE binaries produce differing --build-id values and SHA-1 checksums, preventing reproducible builds. While commit/macro settings previously added -fmacro-prefix-map, this flag only rewrites C preprocessor macros (such as __FILE__) and does not affect DWARF debug sections. Consequently, the compilation directory (DW_AT_comp_dir) and file path tables in DWARF debug sections (.debug_info, .debug_line) continue to record the host's absolute working directory path. Fix this by: 1. Probing and passing -fdebug-prefix-map='$(TOPDIR)=.' in Make.defaults so that all shim object files rewrite the source root to relative paths in DWARF metadata. 2. Explicitly passing CFLAGS="-fdebug-prefix-map=$(TOPDIR)=." when invoking the gnu-efi submodule in Makefile, ensuring the bundled gnu-efi objects and static libraries are also normalized. With these changes, DW_AT_comp_dir consistently points to relative paths, ensuring bit-for-bit identical object files and consistent build-id hashes regardless of the parent build directory. Link: https://github.com/rhboot/shim/pull/838 Signed-off-by: Chun-Yi Lee <[email protected]> --- Make.defaults | 1 + Makefile | 1 + 2 files changed, 2 insertions(+) Index: shim-16.1/Make.defaults =================================================================== --- shim-16.1.orig/Make.defaults +++ shim-16.1/Make.defaults @@ -112,6 +112,7 @@ override DEFAULT_FEATUREFLAGS = \ -ggdb -gdwarf-4 -gstrict-dwarf \ -ffreestanding \ $(shell $(CC) -fmacro-prefix-map=./=./ -E -x c /dev/null >/dev/null 2>&1 && echo -fmacro-prefix-map='$(TOPDIR)/=$(DEBUGSRC)') \ + $(shell $(CC) -fdebug-prefix-map=./=./ -E -x c /dev/null >/dev/null 2>&1 && echo -fdebug-prefix-map='$(TOPDIR)=.') \ -fno-stack-protector \ -fno-strict-aliasing \ -fpic \ Index: shim-16.1/Makefile =================================================================== --- shim-16.1.orig/Makefile +++ shim-16.1/Makefile @@ -166,9 +166,9 @@ MokManager.o: $(MOK_SOURCES) $(MMSONAME): $(MOK_OBJS) $(LIBS) $(LD) -o $@ $(LDFLAGS) $^ $(EFI_LIBS) lib/lib.a -gnu-efi/$(ARCH_GNUEFI)/gnuefi/libgnuefi.a gnu-efi/$(ARCH_GNUEFI)/lib/libefi.a: CFLAGS+=-DGNU_EFI_USE_EXTERNAL_STDARG gnu-efi/$(ARCH_GNUEFI)/gnuefi/libgnuefi.a gnu-efi/$(ARCH_GNUEFI)/lib/libefi.a: mkdir -p gnu-efi/lib gnu-efi/gnuefi + CFLAGS="-DGNU_EFI_USE_EXTERNAL_STDARG -fdebug-prefix-map=$(TOPDIR)/=." \ $(MAKE) -C gnu-efi \ COMPILER="$(COMPILER)" \ CCC_CC="$(COMPILER)" \ ++++++ shim-disable-export-vendor-dbx.patch ++++++ --- /var/tmp/diff_new_pack.CZGV9n/_old 2026-11-13 20:12:30.943886211 +0100 +++ /var/tmp/diff_new_pack.CZGV9n/_new 2026-11-13 20:12:30.954886676 +0100 @@ -10,8 +10,13 @@ anything, so we just stop exporting vendor-dbx to MokListXRT to avoid the potential hassles. +Joey Lee: +I have sent a patch for pushing this change with a build option +to upstream. (3) + (*1) https://bugzilla.suse.com/show_bug.cgi?id=1185261 (*2) https://github.com/rhboot/shim/pull/369#issuecomment-855275115 +(*3) https://github.com/rhboot/shim/pull/779 Signed-off-by: Gary Lin <[email protected]> --- ++++++ shim-install ++++++ --- /var/tmp/diff_new_pack.CZGV9n/_old 2026-11-13 20:12:31.050890740 +0100 +++ /var/tmp/diff_new_pack.CZGV9n/_new 2026-11-13 20:12:31.058891079 +0100 @@ -23,7 +23,8 @@ self="`basename $0`" grub_cfg="/boot/grub2/grub.cfg" update_boot=no -check_fallback=no +update_boot_fallback=no +update_boot_fallback_when_exist=no def_grub_efi="${source_dir}/grub.efi" def_boot_efi= @@ -92,6 +93,10 @@ if [ x"${GRUB_DISTRIBUTOR}" = x ] && [ -f "${sysconfdir}/os-release" ] ; then . "${sysconfdir}/os-release" GRUB_DISTRIBUTOR="${NAME} ${VERSION}" +fi + +if [ -f "${sysconfdir}/os-release" ] ; then + . "${sysconfdir}/os-release" OS_ID="${ID}" fi @@ -353,22 +358,27 @@ exit 1; fi -if test "$removable" = "no" -a -f "$efibootdir/$def_boot_efi"; then - if test -n "$ca_string" && (grep -q "$ca_string" "$efibootdir/$def_boot_efi"); then +# NOT removable: Only update if bootx64.efi doesn't exist (new install) +# OR if it exists and contains SUSE's CA string (SUSE-owned default boot path) +if test "$removable" = "no"; then + if test ! -f "$efibootdir/$def_boot_efi" || \ + { test -n "$ca_string" && grep -q "$ca_string" "$efibootdir/$def_boot_efi"; }; then update_boot=yes + update_boot_fallback=yes # We should only update fallback.efi if it is already present. If it is # not present, we should not create one because it will break the # images created as removable target (e.g. SL-Micro selfinstall image). # Remember the purpose here is to update sle distro loaders and also loaders # in fallback path if they are found to be SUSE owned, but that should not # instroduce unexpected behavior change from removable to non-removable. - # Some firmware may only support removable boot path. - if [ "$OS_ID" = "sl-micro" ]; then - check_fallback=yes - fi + # Some firmware may only support removable boot path. (bsc#1270036) + if [ "$OS_ID" = "sl-micro" ]; then + update_boot_fallback_when_exist=yes + fi fi -else +elif test "$removable" = "yes"; then update_boot=yes + update_boot_fallback=no fi if test "$clean" = "yes"; then @@ -428,17 +438,22 @@ # Copy default shim to bootx64.efi/bootaa64.efi # firmware only support one bootx64.efi, so do not copy bootx64.non-nx.efi as a fallback cp "$source_shim_efi" "${efibootdir}/${def_boot_efi}" - if test "$removable" = "no"; then - if test ${check_fallback} = "yes" && - test -f "${efibootdir}/fallback.efi"; then - cp "${source_dir}/fallback.efi" "${efibootdir}" + if test "$update_boot_fallback" = "yes"; then + # Some causes need to check fallback file before copy it + if test "$update_boot_fallback_when_exist" = "yes"; then + if test -f "${efibootdir}/fallback.efi"; then + cp "${source_dir}/fallback.efi" "${efibootdir}/" + fi + else + cp "${source_dir}/fallback.efi" "${efibootdir}/" fi - # bsc#1175626, bsc#1175656 Since shim 15, loading MokManager becomes - # mandatory if a MOK request exists. Copy MokManager to \EFI\boot so - # that boot*.efi can load MokManager to process the request instead - # of shutting down the system immediately. - cp "${source_dir}/MokManager.efi" "${efibootdir}" fi + # bsc#1175626, bsc#1175656 Since shim 15, loading MokManager becomes + # mandatory if a MOK request exists. Copy MokManager to \EFI\boot so + # that boot*.efi can load MokManager to process the request instead + # of shutting down the system immediately. + # Please also reference: bsc#1285863#11 + cp "${source_dir}/MokManager.efi" "${efibootdir}" fi
