From afc4f4a684c62c63642773f750ce248c52d76343 Mon Sep 17 00:00:00 2001 From: Petr Šabata Date: Apr 12 2018 11:04:31 +0000 Subject: Fix build flags injection (rhbz#1548123) Signed-off-by: Petr Šabata --- diff --git a/dbxtool-8-ccldflags.patch b/dbxtool-8-ccldflags.patch new file mode 100644 index 0000000..099f9a6 --- /dev/null +++ b/dbxtool-8-ccldflags.patch @@ -0,0 +1,45 @@ +From f229181c015f7353602e6b32e6ed61f9b47480ae Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= +Date: Thu, 12 Apr 2018 12:58:51 +0200 +Subject: [PATCH] Respect environment CCLDFLAGS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow passing custom flags for the linker. + +Signed-off-by: Petr Šabata +--- + Make.defaults | 2 +- + src/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Make.defaults b/Make.defaults +index 9bfa5b2..1030be9 100644 +--- a/Make.defaults ++++ b/Make.defaults +@@ -14,7 +14,7 @@ BUILDFLAGS = $(CFLAGS) -fPIC -fshort-wchar -fno-strict-aliasing \ + --param=ssp-buffer-size=4 -fexceptions + ASFLAGS = + LDFLAGS = -nostdlib +-CCLDFLAGS = -shared ++CCLDFLAGS += -shared + INSTALL = install + COMPILER ?= + +diff --git a/src/Makefile b/src/Makefile +index 1a6277a..669bfab 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -6,7 +6,7 @@ include $(TOPDIR)/Make.defaults + PKLIBS = efivar + LIBS = popt + LDFLAGS = +-CCLDFLAGS = $(foreach pklib,$(PKLIBS), $(shell pkg-config --libs-only-L $(pklib))) ++CCLDFLAGS += $(foreach pklib,$(PKLIBS), $(shell pkg-config --libs-only-L $(pklib))) + BUILDFLAGS += $(foreach pklib,$(PKLIBS), $(shell pkg-config --cflags $(pklib))) + + TARGETS = dbxtool +-- +2.17.0 + diff --git a/dbxtool.spec b/dbxtool.spec index 1a88372..4e297c0 100644 --- a/dbxtool.spec +++ b/dbxtool.spec @@ -1,6 +1,6 @@ Name: dbxtool Version: 8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Secure Boot DBX updater License: GPLv2 URL: https://github.com/vathpela/dbxtool @@ -11,6 +11,7 @@ Requires: efivar-libs >= 33-3 Requires(post): systemd Requires(preun):systemd Source0: https://github.com/vathpela/dbxtool/releases/download/dbxtool-%{version}/dbxtool-%{version}.tar.bz2 +Patch0000: %{name}-8-ccldflags.patch Patch0001: 0001-don-t-use-f-in-dbxtool.service.patch Patch0002: 0002-Make-quiet-exit-on-missing-PK-KEK-not-return-error-s.patch @@ -29,7 +30,7 @@ git config --unset user.email git config --unset user.name %build -make PREFIX=%{_prefix} LIBDIR=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" +make PREFIX=%{_prefix} LIBDIR=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" CCLDFLAGS="%{__global_ldflags}" %install rm -rf $RPM_BUILD_ROOT @@ -54,6 +55,9 @@ rm -f %{buildroot}/%{_docdir}/%{name}/COPYING %{_unitdir}/dbxtool.service %changelog +* Thu Apr 12 2018 Petr Šabata - 8-6 +- Fix build flags injection (rhbz#1548123) + * Tue Feb 27 2018 Peter Jones - 8-5 - Update efivar dep to be efivar-libs instead.