aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-12-22 02:10:12 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-12-22 02:10:12 +0000
commitd056ef091b1f6a4748dad929adedb59e06d133a5 (patch)
tree75238359919ea1ebf1d73a9c78430a9659afdccc
parent9bff2a45d31f726f0721ab7f8d102a110d3ec0f0 (diff)
downloadports-d056ef091b1f6a4748dad929adedb59e06d133a5.tar.gz
ports-d056ef091b1f6a4748dad929adedb59e06d133a5.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>
Notes
Notes: svn path=/head/; revision=124772
-rw-r--r--UPDATING8
-rw-r--r--security/clamav-devel/Makefile11
-rw-r--r--security/clamav-devel/files/clamav-clamd.sh2
-rw-r--r--security/clamav-devel/files/clamav-freshclam.sh2
-rw-r--r--security/clamav-devel/files/clamav-milter.sh2
-rw-r--r--security/clamav-devel/pkg-install10
-rw-r--r--security/clamav-devel/pkg-plist6
-rw-r--r--security/clamav/Makefile13
-rw-r--r--security/clamav/files/clamav-clamd.sh2
-rw-r--r--security/clamav/files/clamav-freshclam.sh2
-rw-r--r--security/clamav/files/clamav-milter.sh2
-rw-r--r--security/clamav/pkg-install8
-rw-r--r--security/clamav/pkg-plist6
13 files changed, 44 insertions, 30 deletions
diff --git a/UPDATING b/UPDATING
index 5b83317fbbef..13215043260a 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,14 @@ You should get into the habit of checking this file for changes each
time you update your ports collection, before attempting any port
upgrades.
+20041222:
+ AFFECTS: users of security/clamav, security/clamav-devel
+ AUTHOR: jylefort@brutele.be
+
+ The ClamAV database path has changed from /usr/local/share/clamav to
+ /var/db/clamav. You should update the DatabaseDirectory keyword in
+ /usr/local/etc/clamd.conf and /usr/local/etc/freshclam.conf.
+
20041221
AFFECTS: users of security/gpgme03
AUTHOR: clement@FreeBSD.org
diff --git a/security/clamav-devel/Makefile b/security/clamav-devel/Makefile
index 69685207b697..16e02beac185 100644
--- a/security/clamav-devel/Makefile
+++ b/security/clamav-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= clamav
PORTVERSION= 20041213
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.clamav.net/snapshot/
PKGNAMESUFFIX= -devel
@@ -40,7 +41,9 @@ 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} \
--with-zlib=/usr \
--disable-zlib-vcheck \
--disable-clamuko \
@@ -66,7 +69,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' \
@@ -81,7 +84,7 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(ScanMail)$$|\1|' \
-e 's|^\#?(NotifyClamd)$$|\1|' \
-e 's|^\#?(Checks)$$|\#\1|' \
- -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
+ -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DBDIR}|' \
-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
-e 's|^\#?(FixStaleSocket)$$|\1|'
@@ -152,7 +155,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-devel/files/clamav-clamd.sh b/security/clamav-devel/files/clamav-clamd.sh
index 453212555e2f..ae1abb416814 100644
--- a/security/clamav-devel/files/clamav-clamd.sh
+++ b/security/clamav-devel/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-devel/files/clamav-freshclam.sh b/security/clamav-devel/files/clamav-freshclam.sh
index a4f710b2aa53..a17b236f5e5b 100644
--- a/security/clamav-devel/files/clamav-freshclam.sh
+++ b/security/clamav-devel/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-devel/files/clamav-milter.sh b/security/clamav-devel/files/clamav-milter.sh
index e3679e66ec26..572a7556c714 100644
--- a/security/clamav-devel/files/clamav-milter.sh
+++ b/security/clamav-devel/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-devel/pkg-install b/security/clamav-devel/pkg-install
index f783cb52303e..47c32f4de95a 100644
--- a/security/clamav-devel/pkg-install
+++ b/security/clamav-devel/pkg-install
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/security/clamav-devel/Attic/pkg-install,v 1.17 2004-11-04 22:49:52 pav Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/clamav-devel/Attic/pkg-install,v 1.18 2004-12-22 02:10:12 edwin Exp $
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
DESTDIR=${PKG_DESTDIR:-}
@@ -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-devel/pkg-plist b/security/clamav-devel/pkg-plist
index 559fc5ddc71d..a9a4485f7b61 100644
--- a/security/clamav-devel/pkg-plist
+++ b/security/clamav-devel/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
-@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
+@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
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 871a49847873..83495835e79c 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 453212555e2f..ae1abb416814 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 0018f202c22d..35e6ea2b226a 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 8af6441c6454..bd09f7ec0ac5 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 47b6f7c7fc5d..697796086e36 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 54ec2ab0df47..a9a4485f7b61 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