[arch-commits] Commit in clamav/trunk (6 files)

Gaetan Bisson bisson at archlinux.org
Wed Mar 28 23:18:14 UTC 2012


    Date: Wednesday, March 28, 2012 @ 19:18:13
  Author: bisson
Revision: 154472

implement FS#29151

Added:
  clamav/trunk/tmpfiles.d
Modified:
  clamav/trunk/PKGBUILD
  clamav/trunk/config.patch
  clamav/trunk/install
  clamav/trunk/logrotate
  clamav/trunk/rc.d

--------------+
 PKGBUILD     |   15 +++++++++------
 config.patch |    2 +-
 install      |    4 ++--
 logrotate    |    4 ++--
 rc.d         |    5 ++---
 tmpfiles.d   |    1 +
 6 files changed, 17 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-03-28 23:15:36 UTC (rev 154471)
+++ PKGBUILD	2012-03-28 23:18:13 UTC (rev 154472)
@@ -5,7 +5,7 @@
 
 pkgname=clamav
 pkgver=0.97.4
-pkgrel=1
+pkgrel=2
 pkgdesc='Anti-virus toolkit for Unix'
 url='http://www.clamav.net/'
 license=('GPL')
@@ -17,12 +17,14 @@
         'rc.d'
         'conf.d'
         'logrotate'
+        'tmpfiles.d'
         'config.patch')
 sha1sums=('56f90cf8a73acba8f97beca86b42c65c3923935d'
-          '50cfe02c97e4297a0efd25b23142408380305d30'
+          'c9d508c1e5972f0f849d8694c1872455fa9e74de'
           'cb116cdab49a810381a515cbcfb6a6c148547f07'
-          'be3310d2b41a68ce06e33c84ab68ffe59fdce104'
-          '701a61571788d10ff7af01597785835c6bfea918')
+          '7cace58743a36dae3e63e5e0c6cc73ea5ef9a6ee'
+          'a224ea9b4d0f4f196827347d54bed51e11c197ea'
+          '1c8ef193919b041135115170acd6313f008de808')
 
 install=install
 
@@ -44,15 +46,16 @@
 	cd "${srcdir}/${pkgname}-${pkgver}"
 	make DESTDIR="${pkgdir}" install
 
-	# make sure conf files get installed, because make install
+	# Make sure conf files get installed, because make install
 	# doesn't do that if clamav is already installed upon building.
 	install -D -m644 etc/clamd.conf "${pkgdir}/etc/clamav/clamd.conf"
 	install -D -m644 etc/freshclam.conf "${pkgdir}/etc/clamav/freshclam.conf"
 
+	install -D -m644 ../tmpfiles.d "${pkgdir}/usr/lib/tmpfiles.d/clamav.conf"
 	install -D -m644 ../logrotate "${pkgdir}/etc/logrotate.d/clamav"
 	install -D -m644 ../conf.d "${pkgdir}/etc/conf.d/clamav"
 	install -D -m755 ../rc.d "${pkgdir}/etc/rc.d/clamav"
 
-	# un-distribute databases to require freshclam
+	# Un-distribute databases to require freshclam.
 	rm "${pkgdir}"/var/lib/clamav/*.cvd
 }

Modified: config.patch
===================================================================
--- config.patch	2012-03-28 23:15:36 UTC (rev 154471)
+++ config.patch	2012-03-28 23:18:13 UTC (rev 154472)
@@ -9,7 +9,7 @@
 +LogTime yes
 @@ -61 +61 @@
 -#PidFile /var/run/clamd.pid
-+PidFile /var/run/clamav/clamd.pid
++PidFile /run/clamav/clamd.pid
 @@ -65 +65 @@
 -#TemporaryDirectory /var/tmp
 +TemporaryDirectory /tmp

Modified: install
===================================================================
--- install	2012-03-28 23:15:36 UTC (rev 154471)
+++ install	2012-03-28 23:18:13 UTC (rev 154472)
@@ -2,9 +2,9 @@
 	getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null
 	getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null
 
-	install -d /var/log/clamav
-	chown clamav:root /var/log/clamav
 	chown -R clamav:clamav /var/lib/clamav
+	install -o clamav -g clamav -d /run/clamav
+	install -o clamav -g clamav -d /var/log/clamav
 }
 
 post_remove() {

Modified: logrotate
===================================================================
--- logrotate	2012-03-28 23:15:36 UTC (rev 154471)
+++ logrotate	2012-03-28 23:18:13 UTC (rev 154472)
@@ -2,7 +2,7 @@
     create 644 clamav clamav
     sharedscripts
     postrotate
-            /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2>/dev/null` 2> /dev/null || true
-            /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2>/dev/null` 2> /dev/null || true
+            /bin/kill -HUP `cat /run/clamav/clamd.pid 2>/dev/null` 2> /dev/null || true
+            /bin/kill -HUP `cat /run/clamav/freshclam.pid 2>/dev/null` 2> /dev/null || true
     endscript
 }

Modified: rc.d
===================================================================
--- rc.d	2012-03-28 23:15:36 UTC (rev 154471)
+++ rc.d	2012-03-28 23:18:13 UTC (rev 154472)
@@ -3,8 +3,7 @@
 . /etc/rc.conf
 . /etc/rc.d/functions
 
-[[ -f /etc/conf.d/clamav ]] && . /etc/conf.d/clamav
-[[ -d /var/run/clamav ]] || install -d -o clamav -g root /var/run/clamav
+[[ -f /etc/conf.d/clamav ]] && source /etc/conf.d/clamav
 
 PID_FC=$(pidof -o %PPID /usr/bin/freshclam)
 PID_CD=$(pidof -o %PPID /usr/sbin/clamd)
@@ -24,7 +23,7 @@
 		sleep 1
 		if [[ $START_FRESHCLAM = yes ]]; then
 			stat_busy "Starting FreshClam"
-			[[ -z $PID_FC ]] && /usr/bin/freshclam -p /var/run/clamav/freshclam.pid -d $FRESHCLAM_OPTS
+			[[ -z $PID_FC ]] && /usr/bin/freshclam -p /run/clamav/freshclam.pid -d $FRESHCLAM_OPTS
 			if [[ $? -gt 0 ]]; then
 					stat_fail
 			else

Added: tmpfiles.d
===================================================================
--- tmpfiles.d	                        (rev 0)
+++ tmpfiles.d	2012-03-28 23:18:13 UTC (rev 154472)
@@ -0,0 +1 @@
+d /run/clamav 0755 clamav clamav




More information about the arch-commits mailing list