From e6fe460e84094c44adc872f8d56b69c1fc1b46b8 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 24 Jul 2013 16:20:05 -0600 Subject: [PATCH] Make docdirs unversioned on Fedora 20+ (#986871) - Hack around libtool issue for hardened build for now (#978949) --- ...-config-9.1.0-libtool-hardened-build.patch | 25 +++++++++++++++++++ ...rpm-config-9.1.0-unversioned-docdirs.patch | 12 +++++++++ redhat-rpm-config.spec | 21 +++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 redhat-rpm-config-9.1.0-libtool-hardened-build.patch create mode 100644 redhat-rpm-config-9.1.0-unversioned-docdirs.patch diff --git a/redhat-rpm-config-9.1.0-libtool-hardened-build.patch b/redhat-rpm-config-9.1.0-libtool-hardened-build.patch new file mode 100644 index 0000000..03e85b3 --- /dev/null +++ b/redhat-rpm-config-9.1.0-libtool-hardened-build.patch @@ -0,0 +1,25 @@ +--- redhat-rpm-config-9.1.0.orig/macros ++++ redhat-rpm-config-9.1.0/macros +@@ -28,7 +28,7 @@ + # ---- configure and makeinstall. + # + %_configure ./configure +-%configure \ ++%configure(--:-:ChnqV) \ + CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ + CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ + FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \ +@@ -52,7 +52,12 @@ + --localstatedir=%{_localstatedir} \\\ + --sharedstatedir=%{_sharedstatedir} \\\ + --mandir=%{_mandir} \\\ +- --infodir=%{_infodir} ++ --infodir=%{_infodir} \\\ ++ %{**} ; \ ++ [[ -f ./libtool && "x%{?%_hardened_ldflags}" != "x" ]] && \\\ ++ sed -i \\\ ++ -e 's! \\\\\\$compiler_flags !&%{?%_hardened_ldflags} !g' \\\ ++ ./libtool ; + + %makeinstall \ + %{__make} \\\ diff --git a/redhat-rpm-config-9.1.0-unversioned-docdirs.patch b/redhat-rpm-config-9.1.0-unversioned-docdirs.patch new file mode 100644 index 0000000..c0f630b --- /dev/null +++ b/redhat-rpm-config-9.1.0-unversioned-docdirs.patch @@ -0,0 +1,12 @@ +diff -Nur redhat-rpm-config-9.1.0.orig/macros redhat-rpm-config-9.1.0/macros +--- redhat-rpm-config-9.1.0.orig/macros 2013-07-24 14:45:29.972653928 -0600 ++++ redhat-rpm-config-9.1.0/macros 2013-07-24 14:46:14.419922188 -0600 +@@ -18,6 +18,8 @@ + %_mandir %{_prefix}/share/man + + %_defaultdocdir %{_prefix}/share/doc ++%_pkgdocdir %{_docdir}/%{name} ++%_docdir_fmt %%{NAME} + + %_fmoddir %{_libdir}/gfortran/modules + diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 9bd0ca3..470e76a 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config Version: 9.1.0 -Release: 49%{?dist} +Release: 50%{?dist} # No version specified. License: GPL+ Group: Development/System @@ -60,6 +60,16 @@ Patch22: redhat-rpm-config-9.1.0-ncpus-max.patch Patch23: redhat-rpm-config-9.1.0-stackprotector-strong.patch # https://bugzilla.redhat.com/show_bug.cgi?id=905573 Patch24: redhat-rpm-config-9.1.0-jar-repack-perms.patch +# Hacky fix for hardened build and libtool. +# Should be dropped as soon as libtool is fixed. +# https://bugzilla.redhat.com/show_bug.cgi?id=978949 +Patch25: redhat-rpm-config-9.1.0-libtool-hardened-build.patch +%if 0%{?fedora} >= 20 +# Drop versioning on docdirs in Fedora 20+ +# https://bugzilla.redhat.com/show_bug.cgi?id=986871 +Patch26: redhat-rpm-config-9.1.0-unversioned-docdirs.patch +%endif + BuildArch: noarch Requires: coreutils Requires: perl-srpm-macros @@ -98,6 +108,11 @@ Red Hat specific rpm configuration files. %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 +# Only make docs change in Fedora 20+ +%if 0%{?fedora} >= 20 +%patch26 -p1 +%endif %build @@ -119,6 +134,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_sysconfdir}/rpm/* %changelog +* Wed Jul 24 2013 Kevin Fenzi 9.1.0-50 +- Make docdirs unversioned on Fedora 20+ (#986871) +- Hack around libtool issue for hardened build for now (#978949) + * Wed Jul 17 2013 Petr Pisar - 9.1.0-49 - Perl 5.18 rebuild