Please do not reply directly to this email. All additional comments should be made in the comments box of this bug report.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178580
Summary: /etc/sysconfig/spamassasin is always modified Product: Fedora Core Version: devel Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: normal Component: spamassassin AssignedTo: wtogami@redhat.com ReportedBy: wtogami@redhat.com CC: fedora-perl-devel- list@redhat.com,felicity@kluge.net,jm@jmason.org,parkerm @pobox.com,reg+redhat@sidney.com,wtogami@redhat.com
QA discovered that /etc/sysconfig/spamassasin is being replaced during every package intallation or upgrade.
# -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
Since FC3 spamassassin.spec %post contained this to remove user added options during an upgrade from pre-3.0 SA that caused the new version to fail. QA discovered that this perl syntax actually creates another file and deletes the original file. This means that even if no change happens, the file has a different timestamp and selinux security context.
Impact: Not much, but it should be fixed some time in the future.
Fix: This probably involves testing before doing the modification in order to avoid an unnecessary replacement. In the replacement case chcon is needed in order to maintain the correct selinux context.
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
wtogami@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|/etc/sysconfig/spamassasin |/etc/sysconfig/spamassasin |loses selinux context |loses file context and | |timestamp
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
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
poelstra@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flag| |qa_ack+
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
fmoquete@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |181409 nThis| |
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
bugzilla@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RELEASE_PENDING |CLOSED Resolution| |ERRATA Fixed In Version| |RHSA-2006-0543
------- Additional Comments From bugzilla@redhat.com 2006-06-06 13:54 EST -------
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you.
http://rhn.redhat.com/errata/RHSA-2006-0543.html
perl-devel@lists.fedoraproject.org