From 71d7440127e9885eaa43f00427ce6120852d958f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 25 Feb 2018 07:06:32 +0100 Subject: [PATCH] ldconfig: make %ldconfig_post/%ldconfig_postun parameterized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If %ldconfig is not defined, then "%ldconfig_post/%ldconfig_postun foo" will expand to " foo" which is breaking packages. Also now it is possible to move %end into post/postun. Reported-by: Terje Røsten References: https://bugzilla.redhat.com/show_bug.cgi?id=1548331 Signed-off-by: Igor Gnatenko --- macros.ldconfig | 8 ++++---- redhat-rpm-config.spec | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/macros.ldconfig b/macros.ldconfig index a799154..2e491db 100644 --- a/macros.ldconfig +++ b/macros.ldconfig @@ -1,9 +1,9 @@ #%ldconfig /sbin/ldconfig -%ldconfig_post %{?ldconfig:%post -p %ldconfig} -%ldconfig_postun %{?ldconfig:%postun -p %ldconfig} +%ldconfig_post(n:) %{?ldconfig:%post -p %ldconfig %{?*} %{-n:-n %{-n*}}\ +%end} +%ldconfig_postun(n:) %{?ldconfig:%postun -p %ldconfig %{?*} %{-n:-n %{-n*}}\ +%end} %ldconfig_scriptlets(n:) %{?ldconfig:\ %ldconfig_post %{?*} %{-n:-n %{-n*}}\ -%end\ %ldconfig_postun %{?*} %{-n:-n %{-n*}}\ -%end\ } diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 74ac8ef..eab487b 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 102 +Version: 103 Release: 1%{?dist} # No version specified. License: GPL+ @@ -183,6 +183,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Sun Feb 25 2018 Igor Gnatenko - 103-1 +- Make %%ldconfig_post/%%ldconfig_postun parameterized + * Sat Feb 24 2018 Florian Weimer - 102-1 - Second step of -z now move: removal from GCC specs file (#1548397)