Hello community, here is the log from the commit of package clamav for openSUSE:Factory checked in at 2014-03-30 07:58:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clamav (Old) and /work/SRC/openSUSE:Factory/.clamav.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "clamav" Changes: -------- --- /work/SRC/openSUSE:Factory/clamav/clamav.changes 2014-02-22 18:07:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.clamav.new/clamav.changes 2014-03-30 12:10:06.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Mar 13 15:41:18 UTC 2014 - boris@steki.net + +- initial systemd support unit files + +------------------------------------------------------------------- New: ---- service.clamav-milter service.clamd service.freshclam ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clamav.spec ++++++ --- /var/tmp/diff_new_pack.SZGPvX/_old 2014-03-30 12:10:08.000000000 +0200 +++ /var/tmp/diff_new_pack.SZGPvX/_new 2014-03-30 12:10:08.000000000 +0200 @@ -64,11 +64,17 @@ Source4: clamav-rpmlintrc Source5: clamav-rcmilter Source6: clamav-tmpfiles.conf +Source7: service.clamd +Source8: service.freshclam +Source9: service.clamav-milter Patch1: clamav-conf.patch Patch2: clamav-sles9.patch Patch3: clamav-gcc47.patch Patch4: clamav-fan-syscalls.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd +%endif %description ClamAV is an open source (GPL) antivirus engine designed for detecting @@ -152,6 +158,21 @@ mv freshclam.conf.sample freshclam.conf popd +# Systemd... +%if 0%{?suse_version} >= 1210 +install -d -m 0755 %buildroot/%{_unitdir} +install -m 0644 %{SOURCE7} %buildroot/%{_unitdir}/clamd.service +install -m 0644 %{SOURCE8} %buildroot/%{_unitdir}/freshclam.service +install -m 0644 %{SOURCE9} %buildroot/%{_unitdir}/clamav-milter.service +# this is broken if system does not have systemd so don't +# use it at all on systems without mandatory systemd +%if 0%{?suse_version} >= 1230 +for srvname in clamd freshclam clamav-milter;do + (export PATH=/sbin:/usr/sbin:$PATH ;ln -sf $(which service) %{buildroot}/%{_sbindir}/rc${srvname}) +done +%endif +%endif + %check # regression tests @@ -163,6 +184,12 @@ %defattr(-,root,root,-) %config(noreplace) %_sysconfdir/*.conf %config %attr(744,root,root)/etc/init.d/* +#systemd... +%if 0%{?suse_version} >= 1210 +%{_unitdir}/clamd.service +%{_unitdir}/freshclam.service +%{_unitdir}/clamav-milter.service +%endif %_tmpfilesdir %doc AUTHORS BUGS ChangeLog COPYING FAQ NEWS README UPGRADE %doc docs/*.pdf docs/html @@ -183,6 +210,9 @@ %_sbindir/usermod vscan -g vscan 2> /dev/null || : %post +%{fillup_and_insserv clamd} +%{fillup_and_insserv freshclam} +#%%{fillup_and_insserv clamav-filter} /sbin/ldconfig # merge config files on update test "0$1" -lt 2 && exit 0 @@ -199,14 +229,16 @@ fi fi done +%if 0%{?suse_version} >= 1210 systemd-tmpfiles --create %_tmpfilesdir/clamav.conf +%endif %preun -%stop_on_removal clamd freshclam +%stop_on_removal clamd freshclam clamav-milter %postun /sbin/ldconfig -%restart_on_update clamd freshclam +%restart_on_update clamd freshclam clamav-milter %insserv_cleanup %changelog ++++++ service.clamav-milter ++++++ [Unit] Description=Clamav antivirus milter daemon After=syslog.target network.target [Service] Type=forking ExecStart=/usr/sbin/clamav-milter ; it will switch to vscan user ;User=vscan ;Group=vscan ;PrivateTmp=yes [Install] WantedBy=multi-user.target ++++++ service.clamd ++++++ [Unit] Description=Clamav antivirus Deamon After=syslog.target network.target [Service] Type=forking ExecStart=/usr/sbin/clamd ;User=vscan ;Group=vscan ;PrivateTmp=yes [Install] WantedBy=multi-user.target ++++++ service.freshclam ++++++ [Unit] Description=Freshclam virus definitions downloader After=syslog.target network.target [Service] Type=forking ExecStart=/usr/bin/freshclam -d ;User=vscan ;Group=vscan ;PrivateTmp=yes [Install] WantedBy=multi-user.target -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org