diff options
author | edwin <edwin@FreeBSD.org> | 2004-12-22 10:10:12 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-12-22 10:10:12 +0800 |
commit | 47788221e847c1e99dba231c1dde6883d76446c3 (patch) | |
tree | f1b1f6974ecbb0cd18df3d9142f52280d5623a88 /security/clamav | |
parent | 440d97547238af95b7bde0ce99cfb676d04427a2 (diff) | |
download | freebsd-ports-graphics-47788221e847c1e99dba231c1dde6883d76446c3.tar.gz freebsd-ports-graphics-47788221e847c1e99dba231c1dde6883d76446c3.tar.zst freebsd-ports-graphics-47788221e847c1e99dba231c1dde6883d76446c3.zip |
Fix ports: security/clamav and security/clamav-devel (change db
directory to /var/db/clamav and fix removal of db on deinstall)
For the sake of coherence, the ClamAV database should be
installed in /var/db/clamav, not /usr/local/share/clamav.
Also fixes the database removal on package deinstallation.
PR: ports/74172
Submitted by: Jean-Yves Lefort <jylefort@brutele.be>
Approved by: Rob Evers <rob@debank.tv>
Diffstat (limited to 'security/clamav')
-rw-r--r-- | security/clamav/Makefile | 13 | ||||
-rw-r--r-- | security/clamav/files/clamav-clamd.sh | 2 | ||||
-rw-r--r-- | security/clamav/files/clamav-freshclam.sh | 2 | ||||
-rw-r--r-- | security/clamav/files/clamav-milter.sh | 2 | ||||
-rw-r--r-- | security/clamav/pkg-install | 8 | ||||
-rw-r--r-- | security/clamav/pkg-plist | 6 |
6 files changed, 18 insertions, 15 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile index 871a4984787..83495835e79 100644 --- a/security/clamav/Makefile +++ b/security/clamav/Makefile @@ -7,7 +7,7 @@ PORTNAME= clamav PORTVERSION= ${DISTVERSION:C/([a-z])[a-z]*/.\1/g:S/-/./g} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= clamav @@ -39,7 +39,10 @@ PKGDEINSTALL= ${WRKDIR}/pkg-deinstall PORTDOCS= NEWS ChangeLog html -CONFIGURE_ARGS= --with-dbdir=${DATADIR} \ +DBDIR= /var/db/clamav +PLIST_SUB+= DBDIR=${DBDIR} + +CONFIGURE_ARGS= --with-dbdir=${DBDIR} \ --disable-clamuko \ --disable-clamav \ --enable-bigstack \ @@ -64,7 +67,7 @@ CLAMAV_CLAMD_SOCKET?= /var/run/clamav/clamd CLAMAV_MILTER_SOCKET?= /var/run/clamav/clmilter.sock SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \ - -e 's|%%DATADIR%%|${DATADIR}|g' \ + -e 's|%%DBDIR%%|${DBDIR}|g' \ -e 's|%%CLAMAVUSER%%|${CLAMAVUSER}|g' \ -e 's|%%CLAMAVGROUP%%|${CLAMAVGROUP}|g' \ -e 's|%%CLAMAV_CLAMD_SOCKET%%|${CLAMAV_CLAMD_SOCKET}|g' \ @@ -78,7 +81,7 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ -e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \ -e 's|^\#?(ScanMail)$$|\1|' \ -e 's|^\#?(NotifyClamd)$$|\1|' \ - -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \ + -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DBDIR}|' \ -e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \ -e 's|^\#?(FixStaleSocket)$$|\1|' @@ -149,7 +152,7 @@ post-install: ${DESTDIR}${RC_DIR}/clamav-clamd${RC_SUFX} @${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \ ${DESTDIR}${RC_DIR}/clamav-freshclam${RC_SUFX} - @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DATADIR} + @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DBDIR} .for c in clamd freshclam @[ -f ${DESTDIR}${PREFIX}/etc/${c}.conf ] || \ ${CP} ${DESTDIR}${PREFIX}/etc/${c}.conf.default ${DESTDIR}${PREFIX}/etc/${c}.conf diff --git a/security/clamav/files/clamav-clamd.sh b/security/clamav/files/clamav-clamd.sh index 453212555e2..ae1abb41681 100644 --- a/security/clamav/files/clamav-clamd.sh +++ b/security/clamav/files/clamav-clamd.sh @@ -23,7 +23,7 @@ rcvar=`set_rcvar` command=%%PREFIX%%/sbin/clamd pidfile=/var/run/clamav/clamd.pid -required_dirs=%%DATADIR%% +required_dirs=%%DBDIR%% required_files=%%PREFIX%%/etc/clamd.conf # read settings, set default values diff --git a/security/clamav/files/clamav-freshclam.sh b/security/clamav/files/clamav-freshclam.sh index 0018f202c22..35e6ea2b226 100644 --- a/security/clamav/files/clamav-freshclam.sh +++ b/security/clamav/files/clamav-freshclam.sh @@ -24,7 +24,7 @@ rcvar=`set_rcvar` command=%%PREFIX%%/bin/freshclam pidfile=/var/run/clamav/freshclam.pid command_args="--daemon" -required_dirs=%%DATADIR%% +required_dirs=%%DBDIR%% required_files=%%PREFIX%%/etc/freshclam.conf # read settings, set default values diff --git a/security/clamav/files/clamav-milter.sh b/security/clamav/files/clamav-milter.sh index 8af6441c645..bd09f7ec0ac 100644 --- a/security/clamav/files/clamav-milter.sh +++ b/security/clamav/files/clamav-milter.sh @@ -22,7 +22,7 @@ name=clamav_milter rcvar=`set_rcvar` command=%%PREFIX%%/sbin/clamav-milter -required_dirs=%%DATADIR%% +required_dirs=%%DBDIR%% required_files=%%PREFIX%%/etc/clamd.conf start_precmd=start_precmd diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install index 47b6f7c7fc5..697796086e3 100644 --- a/security/clamav/pkg-install +++ b/security/clamav/pkg-install @@ -11,7 +11,7 @@ GID=$UID CLAMRUN=$DESTDIR/var/run/clamav CLAMLOG=$DESTDIR/var/log/clamav -DATADIR=$DESTDIR%%DATADIR%% +DBDIR=$DESTDIR%%DBDIR%% if [ "$2" = "PRE-INSTALL" ]; then @@ -49,9 +49,9 @@ elif [ "$2" = "POST-INSTALL" ]; then chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1 fi - if [ ! -d "$DATADIR" ]; then - mkdir -p "$DATADIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$DATADIR" || exit 1 + if [ ! -d "$DBDIR" ]; then + mkdir -p "$DBDIR" || exit 1 + chown "$CLAMAVUSER:$CLAMAVGROUP" "$DBDIR" || exit 1 fi if [ -f "$DESTDIR$PREFIX/etc/clamav.conf" ]; then diff --git a/security/clamav/pkg-plist b/security/clamav/pkg-plist index 54ec2ab0df4..a9a4485f7b6 100644 --- a/security/clamav/pkg-plist +++ b/security/clamav/pkg-plist @@ -22,8 +22,8 @@ etc/clamd.conf.default @unexec if cmp -s %D/etc/freshclam.conf %D/etc/freshclam.conf.default; then rm -f %D/etc/freshclam.conf; fi etc/freshclam.conf.default @exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf -@unexec [ -s %D/%%DATADIR%%/daily.cvd ] || rm -f %D/%%DATADIR%%/daily.cvd || true -@unexec [ -s %D/%%DATADIR%%/main.cvd ] || rm -f %D/%%DATADIR%%/main.cvd || true -@dirrm %%DATADIR%% +@unexec [ ! -f %%DBDIR%%/daily.cvd ] || rm -f %%DBDIR%%/daily.cvd || true +@unexec [ ! -f %%DBDIR%%/main.cvd ] || rm -f %%DBDIR%%/main.cvd || true +@unexec rmdir %%DBDIR%% @unexec rmdir /var/run/clamav 2>/dev/null || true @unexec rmdir /var/log/clamav 2>/dev/null || true |