From 41afc0efe53f7db3b9ffcae36820778881d48208 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Aug 31 2012 14:31:37 +0000 Subject: use %_hardened_build macro from F-16 on instead of tweaking flags manually --- diff --git a/sane-backends.spec b/sane-backends.spec index 0ea7b3f..c9c499c 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -5,6 +5,10 @@ %global needs_multilib_quirk 1 #endif +%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 16 || 0%{?rhel} >= 7 +%global _hardened_build 1 +%endif + Summary: Scanner access software Name: sane-backends Version: 1.0.23 @@ -108,10 +112,12 @@ This package contains backend drivers to access digital cameras through SANE. %patch2 -p1 -b .SCX4500W %build +%if ! 0%{?_hardened_build} # use PIC/PIE because SANE-enabled software is likely to deal with data coming # from untrusted sources (client <-> saned via network) CFLAGS="-fPIC %optflags -fno-strict-aliasing" LDFLAGS="-pie" +%endif %configure \ --with-gphoto2=%{_prefix} \ --with-docdir=%{_docdir}/%{name}-%{version} \ @@ -184,6 +190,7 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/ * Fri Aug 31 2012 Nils Philippsen - 1.0.23-1 - version 1.0.23 - update udev patch, remove obsolete patches +- use %%_hardened_build macro from F-16 on instead of tweaking flags manually * Sat Jul 21 2012 Fedora Release Engineering - 1.0.22-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild