From d322a08712bf6d95ac327d375d55d713c53aa9e0 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Wed, 24 May 2017 19:04:21 +0000 Subject: [PATCH] Use standard trigger logic for krb5 snippet --- krb5.spec | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/krb5.spec b/krb5.spec index 03d0397..70103bf 100644 --- a/krb5.spec +++ b/krb5.spec @@ -18,7 +18,7 @@ Summary: The Kerberos network authentication system Name: krb5 Version: 1.15.1 # for prerelease, should be e.g., 0.3.beta2%{?dist} -Release: 8%{?dist} +Release: 9%{?dist} # - Maybe we should explode from the now-available-to-everybody tarball instead? # http://web.mit.edu/kerberos/dist/krb5/1.13/krb5-1.13.2-signed.tar # - The sources below are stored in a lookaside cache. Upload with @@ -514,19 +514,15 @@ rm -- "$RPM_BUILD_ROOT/%{_libdir}/krb5/plugins/preauth/test.so" %post libs -p /sbin/ldconfig -%triggerun libs -- krb5-libs -# At this point in time, rpm considers both packages "installed" and prints -# everything on the same line instead of something useful -old_ver=$(rpm -q --qf '%%{VERSION}\n' krb5-libs | sort -V | head -n 1 | tr -d '\n') +%triggerun libs -- krb5-libs < 1.15.1-5 +# Previously, there was logic to make this conditional in order to +# (effectively) allow for multiple triggers. However, RPM doesn't keep the +# database consistent during upgrades. +# +# When a second trigger is needed, this will be made unconditional. -old_rel=$(rpm -q --qf '%%{RELEASE}\n' krb5-libs | sort -V | head -n 1 | tr -d '\n') -old_rel=${old_rel%%.*} - -# add includedir /etc/krb5.conf.d to top of file -if [[ $old_ver < 1.15.1 || ( $old_ver = 1.15.1 && $old_rel < 5 ) ]]; then - if ! grep -q 'includedir /etc/krb5.conf.d' /etc/krb5.conf ; then - sed -i '1i # To opt out of the system crypto-policies configuration of krb5, remove the\n# symlink at /etc/krb5.conf.d/crypto-policies which will not be recreated.\nincludedir /etc/krb5.conf.d/\n' /etc/krb5.conf - fi +if ! grep -q 'includedir /etc/krb5.conf.d' /etc/krb5.conf ; then + sed -i '1i # To opt out of the system crypto-policies configuration of krb5, remove the\n# symlink at /etc/krb5.conf.d/crypto-policies which will not be recreated.\nincludedir /etc/krb5.conf.d/\n' /etc/krb5.conf fi exit 0 @@ -735,6 +731,9 @@ exit 0 %{_libdir}/libkadm5srv_mit.so.* %changelog +* Wed May 24 2017 Robbie Harwood - 1.15.1-9 +- Use standard trigger logic for krb5 snippet + * Fri Apr 28 2017 Robbie Harwood - 1.15.1-8 - Add kprop service env config file