From 6677def59b614f415cfc3a6f0884b14ba07938ce Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 29 Jan 2018 22:53:34 +0100 Subject: [PATCH] Add macros.ldconfig With https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets we try to remove ldconfig scriptlets, but it would make every package look horrible with all those conditionals. So let's just wrap ldconfig scriptlets into macro so it doesn't look that horrible and error-prone. Signed-off-by: Igor Gnatenko --- macros.ldconfig | 7 +++++++ redhat-rpm-config.spec | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 macros.ldconfig diff --git a/macros.ldconfig b/macros.ldconfig new file mode 100644 index 0000000..672d4c5 --- /dev/null +++ b/macros.ldconfig @@ -0,0 +1,7 @@ +%ldconfig /sbin/ldconfig +%ldconfig_post %{?ldconfig:%post -p %ldconfig} +%ldconfig_postun %{?ldconfig:%postun -p %ldconfig} +%ldconfig_scriptlets(n:) %{?ldconfig:\ +%ldconfig_post %{?*} %{-n:-n %{-n*}}\ +%ldconfig_postun %{?*} %{-n:-n %{-n*}}\ +} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b629d83..be15487 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: 69 +Version: 70 Release: 1%{?dist} # No version specified. License: GPL+ @@ -36,6 +36,7 @@ Source105: macros.valgrind-srpm Source150: macros.dwz Source151: macros.kmp Source152: macros.vpath +Source153: macros.ldconfig # Dependency generator scripts (deprecated) Source300: find-provides @@ -131,6 +132,7 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/kmod.prov %{_rpmconfigdir}/macros.d/macros.*-srpm %{_rpmconfigdir}/macros.d/macros.dwz +%{_rpmconfigdir}/macros.d/macros.ldconfig %{_rpmconfigdir}/macros.d/macros.vpath %files -n kernel-rpm-macros @@ -145,6 +147,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon Jan 29 2018 Igor Gnatenko - 70-1 +- Add macros.ldconfig + * Mon Jan 15 2018 Igor Gnatenko - 69-1 - Remove Requires: cmake-rpm-macros