diff options
author | Eric Hameleers <alien@slackware.com> | 2006-11-07 10:14:33 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2006-11-07 10:14:33 +0000 |
commit | 5a1ad63eec3d6c1fa79328131910c0efe5a5a706 (patch) | |
tree | 51805c294f697bf52f19055b13a2149a337bde9e /clamav | |
parent | 39f3b52801000c415be212dd6a891c1464b9e367 (diff) | |
download | asb-5a1ad63eec3d6c1fa79328131910c0efe5a5a706.tar.gz asb-5a1ad63eec3d6c1fa79328131910c0efe5a5a706.tar.xz |
New release, fixed hardcoded DatabaseDirectory in the /etc/*.conf.new files,
and correctly create uid/gid and set ownerships using chroot in doinst.sh
Diffstat (limited to 'clamav')
-rwxr-xr-x | clamav/build/clamav.SlackBuild | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/clamav/build/clamav.SlackBuild b/clamav/build/clamav.SlackBuild index 26334d6c..4ae2dbd3 100755 --- a/clamav/build/clamav.SlackBuild +++ b/clamav/build/clamav.SlackBuild @@ -52,6 +52,12 @@ # * Rebuilt for the new release. # 0.88.5-1: 18/oct/2006 by Eric Hameleers # * Rebuilt for the new release. +# 0.88.6-1: 07/nov/2006 by Eric Hameleers +# * Rew release. Patched the default value of 'DatabaseDirectory' in +# the /etc/*.conf files to be '/usr/share/clamav', to reflect what +# this package uses instead of '/var/lib/clamav'. Also correctly +# creates clamav user/group and assigns ownership if the target +# root is not that of the running machine (using chroot). # # Run 'sh SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -63,7 +69,7 @@ # Set initial variables: PRGNAM=clamav -VERSION=${VERSION:-0.88.5} +VERSION=${VERSION:-0.88.6} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} @@ -280,17 +286,20 @@ config etc/freshclam.conf.new config etc/clamd.conf.new config etc/rc.d/rc.clamav.new +# Create log files +touch var/log/clamd.log +touch var/log/freshclam.log + +# Only way to create and use the correct uid and gid on the target system, +# is to use chroot: +chroot . <<EOR 2>/dev/null # Add the '${CLAMGRP}' group if it doesn't already exist: # Actually, the use of "amavis" group is for compatibility with amavisd-new. -chroot . /usr/sbin/groupadd ${CLAMGRP} 2> /dev/null +/usr/sbin/groupadd ${CLAMGRP} 2> /dev/null # Add the '${CLAMUSR}' user if it doesn't already exist: -chroot . /usr/sbin/useradd -c "ClamAV user" \\ +/usr/sbin/useradd -c "ClamAV user" \\ -g ${CLAMGRP} -s "/bin/false" ${CLAMUSR} 2> /dev/null -# Create log files -touch var/log/clamd.log -touch var/log/freshclam.log - # Restore the correct permissions chown ${CLAMUSR} usr/sbin/clamav-milter chmod 4700 usr/sbin/clamav-milter @@ -302,6 +311,7 @@ chown ${CLAMUSR}:${CLAMGRP} var/log/freshclam.log chmod 660 var/log/freshclam.log chown -R ${CLAMUSR}:${CLAMGRP} usr/share/clamav chmod -R 770 usr/share/clamav +EOR EOINS |