Preserve timestamp and context of /etc/sysconfig/spamassassin (#178580)
This commit is contained in:
parent
3d590bfc82
commit
e77373df4f
@ -6,7 +6,7 @@
|
|||||||
Summary: Spam filter for email which can be invoked from mail delivery agents.
|
Summary: Spam filter for email which can be invoked from mail delivery agents.
|
||||||
Name: spamassassin
|
Name: spamassassin
|
||||||
Version: 3.1.1
|
Version: 3.1.1
|
||||||
Release: 1.fc6
|
Release: 2.fc6
|
||||||
License: Apache License
|
License: Apache License
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
URL: http://spamassassin.apache.org/
|
URL: http://spamassassin.apache.org/
|
||||||
@ -125,8 +125,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
# -a and --auto-whitelist options were removed from 3.0.0
|
# -a and --auto-whitelist options were removed from 3.0.0
|
||||||
# prevent service startup failure
|
# 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
|
TMPFILE=$(/bin/mktemp /etc/sysconfig/spamassassin.XXXXXX) || exit 1
|
||||||
perl -p -i -e 's/ --auto-whitelist//' /etc/sysconfig/spamassassin
|
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
|
if [ -f /etc/spamassassin.cf ]; then
|
||||||
%{__mv} /etc/spamassassin.cf /etc/mail/spamassassin/migrated.cf
|
%{__mv} /etc/spamassassin.cf /etc/mail/spamassassin/migrated.cf
|
||||||
@ -149,6 +154,9 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 09 2006 Warren Togami <wtogami@redhat.com> - 3.0.5-4
|
||||||
|
- Preserve timestamp and context of /etc/sysconfig/spamassassin (#178580)
|
||||||
|
|
||||||
* Mon Mar 11 2006 Warren Togami <wtogami@redhat.com> - 3.1.1-1
|
* Mon Mar 11 2006 Warren Togami <wtogami@redhat.com> - 3.1.1-1
|
||||||
- 3.1.1
|
- 3.1.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user