--- rpms/smeserver-spamassassin/sme10/smeserver-spamassassin.spec 2021/01/08 19:46:48 1.11 +++ rpms/smeserver-spamassassin/sme10/smeserver-spamassassin.spec 2021/04/07 21:24:36 1.25 @@ -1,16 +1,19 @@ -# $Id: smeserver-spamassassin.spec,v 1.10 2020/12/16 16:21:20 jcrisp Exp $ +# $Id: smeserver-spamassassin.spec,v 1.24 2021/04/07 21:16:20 jpp Exp $ Summary: SME Server - spamassassin anti-spam module %define name smeserver-spamassassin Name: %{name} %define version 2.7.0 -%define release 2 +%define release 10 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Networking/Daemons Source: %{name}-%{version}.tar.xz Patch0: smeserver-spamassassin-2.7.0-bz11166-update.patch +Patch1: smeserver-spamassassin-2.7.0-bz11361-spamd-fails.patch +Patch2: smeserver-spamassassin-2.7.0-bz11362-logging.patch +Patch3: smeserver-spamassassin-2.7.0-bz11375-remove-spamd.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot Requires: e-smith-email >= 4.13.0-38 @@ -29,6 +32,7 @@ Requires: e-smith-base >= 4.13.16 Requires: e-smith-qmail >= 1.9.0-09sme02 Requires: smeserver-clamav >= 2.7.0 Requires: perl-Razor-Agent +Requires: DCC Requires: pyzor Obsoletes: FuzzyOcr Obsoletes: e-smith-spamassassin @@ -41,7 +45,32 @@ AutoReqProv: no SME Server - spamassassin anti-spam module %changelog -* Fri Jan 08 2021 Jean-Philipe Pialasse 2.7.0-2.sme +* Wed Apr 07 2021 Jean-Philippe Pialasse 2.7.0-10.sme +- prevent noise in log at spamassassin call from qpsmtpd [SME: 11491] + +* Tue Mar 16 2021 Jean-Philippe Pialasse 2.7.0-9.sme +- clean rsyslog syntax for spamd [SME: 11422] + +* Tue Feb 23 2021 Jean-Philipe Pialasse 2.7.0-8.sme +- remove warning while trying to delete file when missing in post script [SME: 11375] + +* Sun Feb 21 2021 Jean-Philipe Pialasse 2.7.0-7.sme +- remove spamd reference as service use spamassassin.service [SME: 11375] + migrate spamd propertie SpamLearning to spamassassin + template for /etc/sysconfig/spamassassin, revert --allow-tell option + stop spamassassin spamd and delete /etc/systemd/system/spamassassin.service link if exists + +* Sun Feb 21 2021 Jean-Philipe Pialasse 2.7.0-6.sme +- fix typo [SME: 11361] + +* Thu Feb 18 2021 Jean-Philipe Pialasse 2.7.0-5.sme +- fix spamd unable to load [SME: 11361] +- redirect spamd loging to spamd.log instead of message [SME: 11362] + +* Wed Feb 17 2021 Jean-Philipe Pialasse 2.7.0-4.sme +- add requires DCC as we have built it [SME: 11065] + +* Fri Jan 08 2021 Jean-Philipe Pialasse 2.7.0-3.sme - fix smeserver-spamassassin-update event fix [SME: 11166] * Wed Dec 16 2020 John Crisp 2.7.0-1 @@ -452,6 +481,13 @@ SME Server - spamassassin anti-spam modu %prep %setup %patch0 -p1 +%patch1 -p1 +rm -rf root/etc/e-smith/templates/usr/ +rm -rf root//usr/lib/systemd/system/spamd.service.d +%patch2 -p1 +%patch3 -p1 +rm -rf root/etc/e-smith/db/configuration/defaults/spamd +mkdir -p root/var/service/qpsmtpd/.spamassassin %build perl createlinks @@ -467,11 +503,23 @@ rm -f %{name}-%{version}-%{release}-file --file /etc/cron.hourly/sa-restart 'attr(0755,root,root)' \ --dir /usr/lib/systemd/system/spamd.service.d 'attr(0755,root,root)' \ --dir /usr/lib/systemd/system/spamassassin.service.d 'attr(0755,root,root)' \ + --dir /var/service/qpsmtpd/.spamassassin 'attr(2750,spamd,spamd)' \ + |grep -v "/var/service/qpsmtpd$" \ + |grep -v "/var/service$" \ > %{name}-%{version}-%{release}-filelist %pre /sbin/e-smith/create-system-user spamd 1005 \ 'spamassassin daemon user' /var/spool/spamd /bin/false +#clean 10.0b1 bad choice +if [[ -L "/etc/systemd/system/spamassassin.service" ]]; then + unlink /etc/systemd/system/spamassassin.service; fi +if [[ -L "/usr/lib/systemd/system/spamassassin.service" ]]; then + /usr/bin/systemctl stop spamd.service + /usr/bin/systemctl stop spamassassin.service +fi + + %clean rm -rf $RPM_BUILD_ROOT @@ -479,7 +527,9 @@ rm -rf $RPM_BUILD_ROOT %post # Cleanup old files -rm -rf /var/lib/spamassassin/3.004000 2>/dev/null || true +if [[ -d /var/lib/spamassassin/3.004000 ]]; then + rm -rf /var/lib/spamassassin/3.004000 2>/dev/null || true +fi if [[ ! -d /var/lib/spamassassin/3.004004 ]]; then echo "Installing new spam databases - please be patient" @@ -493,5 +543,9 @@ if [[ ! -d /var/lib/spamassassin/3.00400 fi fi +if [[ -d /usr/lib/systemd/system/spamd.service.d ]]; then + rm -rf /usr/lib/systemd/system/spamd.service.d +fi + %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root)