rpms/spamassassin/FC-4 spamassassin.spec,1.51,1.52
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu May 11 17:43:09 UTC 2006
Author: wtogami
Update of /cvs/dist/rpms/spamassassin/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv28389
Modified Files:
spamassassin.spec
Log Message:
Preserve timestamp and context of /etc/sysconfig/spamassassin (#178580)
Make it actually work...
Index: spamassassin.spec
===================================================================
RCS file: /cvs/dist/rpms/spamassassin/FC-4/spamassassin.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- spamassassin.spec 9 May 2006 17:03:05 -0000 1.51
+++ spamassassin.spec 11 May 2006 17:43:07 -0000 1.52
@@ -129,10 +129,13 @@
# -a and --auto-whitelist options were removed from 3.0.0
# prevent service startup failure
-perl -p -i -e 's/(["\s]-\w+)a/$1/ ; s/(["\s]-)a(\w+)/$1$2/ ; s/(["\s])-a\b/$1/' /etc/sysconfig/spamassassin
-perl -p -i -e 's/ --auto-whitelist//' /etc/sysconfig/spamassassin
-# restore SELinux context
-[ -a /sbin/restorecon ] && restorecon /etc/sysconfig/spamassassin
+TMPFILE=$(/bin/mktemp /etc/sysconfig/spamassassin.XXXXXX) || exit 1
+cp /etc/sysconfig/spamassassin $TMPFILE
+perl -p -i -e 's/(["\s]-\w+)a/$1/ ; s/(["\s]-)a(\w+)/$1$2/ ; s/(["\s])-a\b/$1/' $TMPFILE
+perl -p -i -e 's/ --auto-whitelist//' $TMPFILE
+# replace /etc/sysconfig/spamassassin only if it actually changed
+cmp /etc/sysconfig/spamassassin $TMPFILE || cp $TMPFILE /etc/sysconfig/spamassassin
+rm $TMPFILE
if [ -f /etc/spamassassin.cf ]; then
%{__mv} /etc/spamassassin.cf /etc/mail/spamassassin/migrated.cf
@@ -157,7 +160,7 @@
%changelog
* Tue May 09 2006 Warren Togami <wtogami at redhat.com> - 3.0.5-4
- Remove RCVD_IN_RSL (#191033)
-- preserve selinux context of /etc/sysconfig/spamassassin (#178580)
+- Preserve timestamp and context of /etc/sysconfig/spamassassin (#178580)
* Fri Jan 06 2006 Warren Togami <wtogami at redhat.com> - 3.0.5-3
- rebuild
More information about the fedora-cvs-commits
mailing list