Hello community,

here is the log from the commit of package spamassassin for openSUSE:Factory 
checked in at 2019-01-24 14:01:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spamassassin (Old)
 and      /work/SRC/openSUSE:Factory/.spamassassin.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spamassassin"

Thu Jan 24 14:01:47 2019 rev:76 rq:666474 version:unknown

Changes:
--------
--- /work/SRC/openSUSE:Factory/spamassassin/spamassassin.changes        
2018-10-01 08:14:23.474084451 +0200
+++ /work/SRC/openSUSE:Factory/.spamassassin.new.28833/spamassassin.changes     
2019-01-24 14:01:49.476160370 +0100
@@ -1,0 +2,11 @@
+Wed Jan 16 11:50:16 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Reduce boilerplate generated by %service_*.
+
+-------------------------------------------------------------------
+Wed Jan 16 09:43:23 UTC 2019 - Peter Varkoly <[email protected]>
+
+- bsc#1115411 spamassassin: migrate from cron to systemd timers 
+- Apply %license macro
+
+-------------------------------------------------------------------

Old:
----
  suse.cron-sa-update

New:
----
  sa-update.service
  sa-update.timer
  timed-sa-update

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ spamassassin.spec ++++++
--- /var/tmp/diff_new_pack.EnQEtX/_old  2019-01-24 14:01:50.476159230 +0100
+++ /var/tmp/diff_new_pack.EnQEtX/_new  2019-01-24 14:01:50.480159226 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package spamassassin
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -44,9 +44,11 @@
 Source10:       local.cf
 Source12:       sysconfig.spamd
 Source14:       sysconfig.spampd
-Source15:       suse.cron-sa-update
+Source15:       timed-sa-update
 Source16:       spamd.service
 Source17:       spampd.service
+Source18:       sa-update.service
+Source19:       sa-update.timer
 Patch1:         patch-PgSQL
 Patch2:         patch-URIDNSBL
 Patch3:         patch-SQL_ASCII_SORT
@@ -138,7 +140,6 @@
 Recommends:     perl(IO::Socket::SSL)
 Recommends:     perl(DBI)
 Recommends:     perl(Encode::Detect)
-Recommends:     cron
 Provides:       perl-spamassassin = %version
 Obsoletes:      perl-spamassassin < %version
 
@@ -214,9 +215,8 @@
 cp %{IXHASH}/iXhash2.cf %{buildroot}/etc/mail/spamassassin/iXhash2.cf
 #
 ## spamassassin stuff
-install -d %{buildroot}/etc/cron.daily/
-install -m 0755 %{S:15} %{buildroot}/etc/cron.daily/
 install -D -m0755 %{SPAMPD}/spampd.pl %{buildroot}/%{_sbindir}/spampd
+install -m 0755 %{S:15} %{buildroot}/%{_sbindir}/
 mv %{buildroot}/%{_bindir}/spamd %{buildroot}/%{_sbindir}/
 install -m 0644 %{S:10} %{buildroot}/etc/mail/spamassassin/local.cf
 ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcspamd
@@ -235,24 +235,22 @@
 mkdir -p %{buildroot}/%{_unitdir}
 install -D -m 644 %{S:16} %{buildroot}/%{_unitdir}
 install -D -m 644 %{S:17} %{buildroot}/%{_unitdir}
+install -D -m 644 %{S:18} %{buildroot}/%{_unitdir}
+install -D -m 644 %{S:19} %{buildroot}/%{_unitdir}
 
 %post
-%service_add_post spamd.service
-%service_add_post spampd.service
+%service_add_post spamd.service spampd.service sa-update.timer
 %{fillup_only -n spamd}
 %{fillup_only -n spampd}
 
 %pre
-%service_add_pre spamd.service
-%service_add_pre spampd.service
+%service_add_pre spamd.service spampd.service sa-update.timer
 
 %preun
-%service_del_preun spamd.service
-%service_del_preun spampd.service
+%service_del_preun spamd.service spampd.service sa-update.timer
 
 %postun
-%service_del_postun spamd.service
-%service_del_postun spampd.service
+%service_del_postun spamd.service spampd.service sa-update.timer
 
 %files
 %defattr(-,root,root)
@@ -264,15 +262,17 @@
 %{_fillupdir}/sysconfig.spampd
 %{_unitdir}/spamd.service
 %{_unitdir}/spampd.service
+%{_unitdir}/sa-update.service
+%{_unitdir}/sa-update.timer
 
 %files -n perl-Mail-SpamAssassin -f %{name}.files
 %defattr(-,root,root)
-%doc CREDITS Changes LICENSE MANIFEST* NOTICE PACKAGING README
+%license LICENSE 
+%doc CREDITS Changes MANIFEST* NOTICE PACKAGING README
 %doc TRADEMARK UPGRADE USAGE sample-nonspam.txt sample-spam.txt
 %doc ldap sql
 %dir /etc/mail
 %config(noreplace) /etc/mail/spamassassin
-%config(noreplace) /etc/cron.daily/suse.cron-sa-update
 %exclude /etc/mail/spamassassin/iXhash2.cf
 %dir /usr/share/spamassassin
 /usr/share/spamassassin/*

++++++ sa-update.service ++++++
[Unit]
Description=Update spamassassin
ConditionACPower=true

[Service]
Type=oneshot
ExecStart=/usr/sbin/timed-sa-update
++++++ sa-update.timer ++++++
[Unit]
Description=Daily update of spamassasin

[Timer]
OnCalendar=daily
AccuracySec=12h
Persistent=true

[Install]
WantedBy=timers.target
++++++ timed-sa-update ++++++
#!/bin/bash

#
# paranoia settings
#
umask 022

PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH

if [ -e /etc/sysconfig/spamd ]
then
        . /etc/sysconfig/spamd
fi

if [ "$SPAM_SA_UPDATE" = "yes" ]
then
        /usr/bin/sa-update &> /dev/null
        result=$?

        if [ "$SPAM_SA_COMPILE" = "yes" -a $result = 0 ] ; then
                /usr/bin/sa-compile &> /dev/null
        fi

        if [ "$SPAM_SPAMD_RESTART" = "yes" -a $result = 0 ] ; then
                /sbin/service spamd restart &> /dev/null
        fi

        if [ "$SPAM_AMAVISD_RESTART" = "yes" -a $result = 0 ] ; then
                /sbin/service amavis restart &> /dev/null
        fi

        if [ $result = 2 ] ; then
               echo "sa-update lint check failed" | \
                     logger -t suse.cron-sa-update
        fi

        if [ $result -ge 3 ] ; then
                echo "sa-update failed, exitcode $result" | \
                     logger -t suse.cron-sa-update
        fi
fi
exit 0

Reply via email to