Replace posttrans sysinit scriptlet with a triggerpostun one (#636787) Fix and cleanup the setup-nsssysinit.sh script (#636792, #636801)
This commit is contained in:
parent
125ad15fa4
commit
c7e7247590
16
nss.spec
16
nss.spec
@ -6,7 +6,7 @@
|
|||||||
Summary: Network Security Services
|
Summary: Network Security Services
|
||||||
Name: nss
|
Name: nss
|
||||||
Version: 3.12.7
|
Version: 3.12.7
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||||
URL: http://www.mozilla.org/projects/security/pki/nss/
|
URL: http://www.mozilla.org/projects/security/pki/nss/
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -372,11 +372,11 @@ rm -rf $RPM_BUILD_ROOT/%{_includedir}/nss3/nsslowhash.h
|
|||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
# Prevent disabling of nss-sysinit on nss package upgrade. Reverses
|
# Reverse unwanted disabling of sysinit by faulty preun sysinit scriplet
|
||||||
# nss-sysinit disabling caused by faulty preun sysinit scriplet from
|
# from previous versions of nss.spec
|
||||||
# previous versions of nss.spec. It should be eventually removed.
|
%triggerpostun -n nss-sysinit -- nss-sysinit < 3.12.8-3
|
||||||
%posttrans sysinit
|
/usr/bin/setup-nsssysinit.sh on
|
||||||
[ -e /etc/pki/nssdb/pkcs11.txt ] && /usr/bin/setup-nsssysinit.sh on
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -490,6 +490,10 @@ rm -rf $RPM_BUILD_ROOT/%{_includedir}/nss3/nsslowhash.h
|
|||||||
%{_libdir}/libnssckfw.a
|
%{_libdir}/libnssckfw.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 29 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-8
|
||||||
|
- Replace posttrans sysinit scriptlet with a triggerpostun one (#636787)
|
||||||
|
- Fix and cleanup the setup-nsssysinit.sh script (#636792, #636801)
|
||||||
|
|
||||||
* Tue Sep 28 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-7
|
* Tue Sep 28 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-7
|
||||||
- Prevent of nss-sysinit disabling on package upgrade (#636787)
|
- Prevent of nss-sysinit disabling on package upgrade (#636787)
|
||||||
- Create pkcs11.txt with correct permissions regardless of umask (#636792)
|
- Create pkcs11.txt with correct permissions regardless of umask (#636792)
|
||||||
|
@ -18,7 +18,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
# validate
|
# validate
|
||||||
if test $# -eq 0; then
|
if [ $# -eq 0 ]; then
|
||||||
usage 1 1>&2
|
usage 1 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -30,13 +30,18 @@ if [ ! -f $p11conf ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
on="1"
|
# check if nsssysinit is currently enabled or disabled
|
||||||
|
sysinit_enabled()
|
||||||
|
{
|
||||||
|
grep -q '^library=libnsssysinit' ${p11conf}
|
||||||
|
}
|
||||||
|
|
||||||
|
umask 022
|
||||||
case "$1" in
|
case "$1" in
|
||||||
on | ON )
|
on | ON )
|
||||||
if [ `grep '^library=libnsssysinit' ${p11conf}` ]; then
|
if sysinit_enabled; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
umask 022
|
|
||||||
cat ${p11conf} | \
|
cat ${p11conf} | \
|
||||||
sed -e 's/^library=$/library=libnsssysinit.so/' \
|
sed -e 's/^library=$/library=libnsssysinit.so/' \
|
||||||
-e '/^NSS/s/\(Flags=internal\)\(,[^m]\)/\1,moduleDBOnly\2/' > \
|
-e '/^NSS/s/\(Flags=internal\)\(,[^m]\)/\1,moduleDBOnly\2/' > \
|
||||||
@ -44,10 +49,9 @@ case "$1" in
|
|||||||
mv ${p11conf}.on ${p11conf}
|
mv ${p11conf}.on ${p11conf}
|
||||||
;;
|
;;
|
||||||
off | OFF )
|
off | OFF )
|
||||||
if [ ! `grep "^library=libnsssysinit" ${p11conf}` ]; then
|
if ! sysinit_enabled; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
umask 022
|
|
||||||
cat ${p11conf} | \
|
cat ${p11conf} | \
|
||||||
sed -e 's/^library=libnsssysinit.so/library=/' \
|
sed -e 's/^library=libnsssysinit.so/library=/' \
|
||||||
-e '/^NSS/s/Flags=internal,moduleDBOnly/Flags=internal/' > \
|
-e '/^NSS/s/Flags=internal,moduleDBOnly/Flags=internal/' > \
|
||||||
@ -55,7 +59,8 @@ case "$1" in
|
|||||||
mv ${p11conf}.off ${p11conf}
|
mv ${p11conf}.off ${p11conf}
|
||||||
;;
|
;;
|
||||||
status )
|
status )
|
||||||
grep -q '^library=libnsssysinit' ${p11conf} && echo 'ON' || echo OFF
|
echo -n 'NSS sysinit is '
|
||||||
|
sysinit_enabled && echo 'enabled' || echo 'disabled'
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
usage 1 1>&2
|
usage 1 1>&2
|
||||||
|
Loading…
Reference in New Issue
Block a user