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 | |
parent | 440d97547238af95b7bde0ce99cfb676d04427a2 (diff) | |
download | freebsd-ports-gnome-47788221e847c1e99dba231c1dde6883d76446c3.tar.gz freebsd-ports-gnome-47788221e847c1e99dba231c1dde6883d76446c3.tar.zst freebsd-ports-gnome-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')
-rw-r--r-- | security/clamav-devel/Makefile | 11 | ||||
-rw-r--r-- | security/clamav-devel/files/clamav-clamd.sh | 2 | ||||
-rw-r--r-- | security/clamav-devel/files/clamav-freshclam.sh | 2 | ||||
-rw-r--r-- | security/clamav-devel/files/clamav-milter.sh | 2 | ||||
-rw-r--r-- | security/clamav-devel/pkg-install | 10 | ||||
-rw-r--r-- | security/clamav-devel/pkg-plist | 6 | ||||
-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 |
12 files changed, 36 insertions, 30 deletions
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 |