From b37741885c18dae927faaba08a7849ca21d35b7c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 19 Dec 2025 22:05:31 +0100 Subject: [PATCH 1/2] patch-git: Address issues identified in automated code review Resolves: RHEL-137213 RPM-Changelog: - RPM-Skip-Release: yes --- patch-git.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/patch-git.lua b/patch-git.lua index c975eb7..6d20c54 100644 --- a/patch-git.lua +++ b/patch-git.lua @@ -644,7 +644,7 @@ local function parse_commits() break end local l = string.match(line, remove_indent) - if not l then break + if not l then -- No longer the commit message. break end @@ -1681,9 +1681,7 @@ local function parse_commit_messages() -- A Patch-Git-Version commit on its own does not tell us how to -- interpret previous history. The first commit setting version/release -- must also set the patch-git version. - if patchgit_version - and patchgit_version and release_known and changelog_known - then + if patchgit_version and release_known and changelog_known then start_commit = i break end @@ -1717,14 +1715,16 @@ do Dec=12, } function git_date_to_rpm_date(s) - local wd, mon, d, y = string.match( - s, '^([A-z][a-z][a-z]) ([A-Z][a-z][a-z]) (%d+) %d%d:%d%d:%d%d (%d+)') - assert(y, s) - local m = assert(months[mon], s) - local rpmdate = string.format('%s %s %02d %04d', wd, mon, d, y) - local ymd = string.format('%04d-%02d-%02d', y, m, d) - return rpmdate, ymd + local wd, mon, d, y = string.match( + s, '^([A-Z][a-z][a-z]) ([A-Z][a-z][a-z]) (%d+) %d%d:%d%d:%d%d (%d+)') + assert(y, s) + local m = assert(months[mon], s) + local rpmdate = string.format('%s %s %02d %04d', wd, mon, d, y) + local ymd = string.format('%04d-%02d-%02d', y, m, d) + return rpmdate, ymd end + assert_eq({git_date_to_rpm_date('Fri Dec 5 14:39:48 2025 +0100')}, + {'Fri Dec 05 2025', '2025-12-05'}) end -- Tests for git_date_to_rpm_date. do @@ -2028,7 +2028,7 @@ else print('FAIL: term=' .. term .. ', status=' .. status) end end - if fail then + if failure then os.exit(1) end end From 41de17ba48c96b72900b9eb5cc40a848bc161cb0 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Fri, 19 Dec 2025 16:14:30 +0100 Subject: [PATCH 2/2] elf: Fix some test dependencies (RHEL-119438) Resolves: RHEL-119438 --- glibc-RHEL-119438-1.patch | 28 ++++++++++++++++++++++++++++ glibc-RHEL-119438-2.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 glibc-RHEL-119438-1.patch create mode 100644 glibc-RHEL-119438-2.patch diff --git a/glibc-RHEL-119438-1.patch b/glibc-RHEL-119438-1.patch new file mode 100644 index 0000000..bc4b43b --- /dev/null +++ b/glibc-RHEL-119438-1.patch @@ -0,0 +1,28 @@ +commit 39183f47d8bc9eda711c9797b18d69d7a02af91c +Author: Florian Weimer +Date: Wed Jan 8 16:55:31 2025 +0100 + + elf: Minimize library dependencies of tst-nolink-libc.c + + On 32-bit Arm, -fasynchronous-unwind-tables creates a reference + to the symbol __aeabi_unwind_cpp_pr0. Compile the tests without + this flag even if it is passed as part of CC, to avoid linker + failures. + +diff --git a/elf/Makefile b/elf/Makefile +index 576d28fdbe60e19b..13ef1205667abcd4 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -3275,8 +3275,10 @@ $(objpfx)tst-hash-collision3: $(objpfx)tst-hash-collision3-mod.so + # a port adds them to the tests variables. Neither test variant is + # linked against libc.so, but tst-nolink-libc-1 is linked against + # ld.so. The test is always run directly, not under the dynamic +-# linker. +-CFLAGS-tst-nolink-libc.c += $(no-stack-protector) ++# linker. It is necessary to minimize run-time dependencies, by ++# disabling stack protection and unwinding. ++CFLAGS-tst-nolink-libc.c += $(no-stack-protector) \ ++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables + $(objpfx)tst-nolink-libc-1: $(objpfx)tst-nolink-libc.o $(objpfx)ld.so + $(LINK.o) -nostdlib -nostartfiles -o $@ $< \ + -Wl,--dynamic-linker=$(objpfx)ld.so,--no-as-needed $(objpfx)ld.so diff --git a/glibc-RHEL-119438-2.patch b/glibc-RHEL-119438-2.patch new file mode 100644 index 0000000..7eb4adb --- /dev/null +++ b/glibc-RHEL-119438-2.patch @@ -0,0 +1,27 @@ +commit d30f41d2c9031b0540641af692e56002eab5599f +Author: Florian Weimer +Date: Thu Jun 26 11:38:00 2025 +0200 + + elf: Add missing DSO dependencies for tst-rtld-no-malloc-{audit,preload} + + Fixes commit c1560f3f75c0e892b5522c16f91b4e303f677094 + ("elf: Switch to main malloc after final ld.so self-relocation"). + + Reviewed-by: Frédéric Bérat + +diff --git a/elf/Makefile b/elf/Makefile +index 13ef1205667abcd4..cf54ea084489b9cf 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -3245,9 +3245,11 @@ $(objpfx)tst-dlopen-auditdup.out: \ + + # Reuse an audit module which provides ample debug logging. + tst-rtld-no-malloc-audit-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so ++$(objpfx)tst-rtld-no-malloc-audit.out: $(objpfx)tst-auditmod1.so + + # Any shared object should do. + tst-rtld-no-malloc-preload-ENV = LD_PRELOAD=$(objpfx)tst-auditmod1.so ++$(objpfx)tst-rtld-no-malloc-preload.out: $(objpfx)tst-auditmod1.so + + LDFLAGS-tst-hash-collision1-mod.so = -Wl,--hash-style=both + $(objpfx)tst-hash-collision1: $(objpfx)tst-hash-collision1-mod.so