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 <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-01-29 22:53:34 +01:00
parent 7a29d55964
commit 1591a6fbf8
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
2 changed files with 13 additions and 1 deletions

7
macros.ldconfig Normal file
View File

@ -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*}}\
}

View File

@ -6,7 +6,7 @@
Summary: Red Hat specific rpm configuration files Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config Name: redhat-rpm-config
Version: 88 Version: 89
Release: 1%{?dist} Release: 1%{?dist}
# No version specified. # No version specified.
License: GPL+ License: GPL+
@ -40,6 +40,7 @@ Source150: macros.dwz
Source151: macros.kmp Source151: macros.kmp
Source152: macros.vpath Source152: macros.vpath
Source153: macros.forge Source153: macros.forge
Source154: macros.ldconfig
# Dependency generator scripts (deprecated) # Dependency generator scripts (deprecated)
Source300: find-provides 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.*-srpm
%{_rpmconfigdir}/macros.d/macros.dwz %{_rpmconfigdir}/macros.d/macros.dwz
%{_rpmconfigdir}/macros.d/macros.forge %{_rpmconfigdir}/macros.d/macros.forge
%{_rpmconfigdir}/macros.d/macros.ldconfig
%{_rpmconfigdir}/macros.d/macros.vpath %{_rpmconfigdir}/macros.d/macros.vpath
%doc buildflags.md %doc buildflags.md
@ -166,6 +168,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov
%{_rpmconfigdir}/macros.d/macros.kmp %{_rpmconfigdir}/macros.d/macros.kmp
%changelog %changelog
* Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 89-1
- Add macros.ldconfig
* Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 88-1 * Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 88-1
- Create DSO symlinks automatically - Create DSO symlinks automatically