diff --git a/crda-ldflags.patch b/crda-ldflags.patch new file mode 100644 index 0000000..07cf6c3 --- /dev/null +++ b/crda-ldflags.patch @@ -0,0 +1,12 @@ +diff -up crda-3.18_2015.04.06/crda-3.18/Makefile.jx crda-3.18_2015.04.06/crda-3.18/Makefile +--- crda-3.18_2015.04.06/crda-3.18/Makefile.jx 2015-08-14 12:47:40.000000000 -0400 ++++ crda-3.18_2015.04.06/crda-3.18/Makefile 2015-08-14 12:49:48.640520841 -0400 +@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $( + + $(LIBREG): regdb.h reglib.h reglib.c + $(NQ) ' CC ' $@ +- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ ++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $(LDFLAGS) $^ + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' diff --git a/crda.spec b/crda.spec index e38c62e..8eb2923 100644 --- a/crda.spec +++ b/crda.spec @@ -3,7 +3,7 @@ Name: crda Version: %{crda_version}_%{regdb_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Regulatory compliance daemon for 802.11 wireless networking Group: System Environment/Base @@ -29,6 +29,8 @@ Source3: setregdomain.1 Patch0: regulatory-rules-setregdomain.patch # Do not call ldconfig in crda Makefile Patch1: crda-remove-ldconfig.patch +# Apply ldflags to libreg +Patch2: crda-ldflags.patch %description @@ -55,9 +57,10 @@ Header files to make use of libreg for accessing regulatory info. cd crda-%{crda_version} %patch1 -p1 -b .ldconfig-remove +%patch2 -p2 -b .ldflags %build -export CFLAGS="%{optflags}" +export CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" # Use our own signing key to generate regulatory.bin cd wireless-regdb-%{regdb_version} @@ -126,6 +129,9 @@ rm -rf %{buildroot} %changelog +* Fri Aug 14 2015 Adam Jackson 3.18_2015.04.06-3 +- Pass rpm's ldflags through to fix hardening + * Wed Jun 17 2015 Fedora Release Engineering - 3.18_2015.04.06-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild