Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
Summary: /etc/sysconfig/spamassasin loses file context and timestamp
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178580
------- Additional Comments From wtogami@redhat.com 2006-05-09 18:02 EST ------- Proposed fix to spamassassin.spec:
@@ -127,8 +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 +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