From 1591a6fbf80efef362314652ad1e54bd41b0d52c 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..856b974 --- /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 2b577d7..70281bb 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: 88 +Version: 89 Release: 1%{?dist} # No version specified. License: GPL+ @@ -40,6 +40,7 @@ Source150: macros.dwz Source151: macros.kmp Source152: macros.vpath Source153: macros.forge +Source154: macros.ldconfig # Dependency generator scripts (deprecated) Source300: find-provides @@ -151,6 +152,7 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.*-srpm %{_rpmconfigdir}/macros.d/macros.dwz %{_rpmconfigdir}/macros.d/macros.forge +%{_rpmconfigdir}/macros.d/macros.ldconfig %{_rpmconfigdir}/macros.d/macros.vpath %doc buildflags.md @@ -166,6 +168,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon Jan 29 2018 Igor Gnatenko - 89-1 +- Add macros.ldconfig + * Mon Jan 29 2018 Igor Gnatenko - 88-1 - Create DSO symlinks automatically