public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schorm <mschorm@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/hawknl] rawhide: Fix annocheck 'bind-now' test failure for 'libNL.so.1.6.8'
Date: Wed, 15 Jul 2026 18:10:27 GMT	[thread overview]
Message-ID: <178413902737.1.12929443449435617838.rpms-hawknl-cebd81d06137@fedoraproject.org> (raw)

            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
 

                 reply	other threads:[~2026-07-15 18:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178413902737.1.12929443449435617838.rpms-hawknl-cebd81d06137@fedoraproject.org \
    --to=mschorm@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox