public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hawknl] rawhide: Fix annocheck 'bind-now' test failure for 'libNL.so.1.6.8'
@ 2026-07-15 18:10 Michal Schorm
  0 siblings, 0 replies; only message in thread
From: Michal Schorm @ 2026-07-15 18:10 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/hawknl
            Branch : rawhide
            Commit : cebd81d06137739fef00f9a8d27e1cf9611c0d3b
            Author : Michal Schorm <mschorm@redhat.com>
            Date   : 2026-07-15T00:45:45+02:00
            Stats  : +11/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/hawknl/c/cebd81d06137739fef00f9a8d27e1cf9611c0d3b?branch=rawhide

            Log:
            Fix annocheck 'bind-now' test failure for 'libNL.so.1.6.8'

Inject '$(LDFLAGS)' into the shared library link command in
'src/makefile.linux' via sed in '%prep' (consistent with the
existing sed fixups for the same file), and pass
'LDFLAGS="%{build_ldflags}"' from '%build' to make.

This ensures '-Wl,-z,now' (from '%{build_ldflags}') reaches the
linker, enabling full RELRO / bind-now hardening.

Co-Authored-By: Claude AI <noreply@anthropic.com>

---
diff --git a/hawknl.spec b/hawknl.spec
index 4105826..b1fd1b9 100644
--- a/hawknl.spec
+++ b/hawknl.spec
@@ -1,6 +1,6 @@
 Name:           hawknl
 Version:        1.68
-Release:        39%{?dist}
+Release:        40%{?dist}
 Summary:        Game oriented network library
 License:        LGPL-2.0-or-later
 URL:            http://www.hawksoft.com/hawknl/
@@ -30,12 +30,16 @@ developing applications that use %{name}.
 # some fixups
 sed -i 's|ln -s $(LIBDIR)/$(OUTPUT)|ln -s $(OUTPUT)|g' src/makefile.linux
 sed -i 's|-soname,NL.so|-soname,libNL.so|' src/makefile.linux
+# Add $(LDFLAGS) to the link command so distribution linker flags
+# (e.g. '-Wl,-z,now' for bind-now hardening) reach the linker
+sed -i 's|$(LIBFLAGS) $(CFLAGS)|$(LIBFLAGS) $(LDFLAGS) $(CFLAGS)|' src/makefile.linux
 sed -i 's|\r||g' src/readme.txt src/nlchanges.txt
 
 
 %build
 make %{?_smp_mflags} -f makefile.linux \
-  OPTFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
+  OPTFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" \
+  LDFLAGS="%{build_ldflags}"
 
 
 %install
@@ -65,6 +69,11 @@ rm $RPM_BUILD_ROOT%{_libdir}/libNL.a $RPM_BUILD_ROOT%{_libdir}/NL.so \
 
 
 %changelog
+* Wed Jul 15 2026 Michal Schorm <mschorm@redhat.com> - 1.68-40
+- Inject '$(LDFLAGS)' into the shared library link command via sed in '%prep',
+  and pass 'LDFLAGS="%{build_ldflags}"' from '%build' to fix annocheck
+  'bind-now' test failure
+
 * Tue Jul 14 2026 Michal Schorm <mschorm@redhat.com> - 1.68-39
 - Fix the 'License' tag to use a valid SPDX expression
 

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

only message in thread, other threads:[~2026-07-15 18:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 18:10 [rpms/hawknl] rawhide: Fix annocheck 'bind-now' test failure for 'libNL.so.1.6.8' Michal Schorm

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