ports/53305: Cleaned up security/clamav port
Rob
rob at debank.tv
Sat Jun 14 00:10:19 UTC 2003
>Number: 53305
>Category: ports
>Synopsis: Cleaned up security/clamav port
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Jun 13 17:10:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Rob Evers
>Release: FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD haha.debank.tv 4.8-STABLE FreeBSD 4.8-STABLE #2: Sun Jun 8 23:25:20 CEST 2003 rob at haha.debank.tv:/usr/obj/usr/src/sys/HAHA i386
>Description:
Add mirror site
remove unnecsesary patches fo current
add/remove users when installing/removing
set permissions on virus database dir
No neeb to bump portrevision
>How-To-Repeat:
>Fix:
--- clamav.diff begins here ---
diff -r -u clamav/Makefile clamav2/Makefile
--- clamav/Makefile Wed Jun 11 18:58:37 2003
+++ clamav2/Makefile Sat Jun 14 01:45:11 2003
@@ -9,7 +9,9 @@
PORTVERSION= 0.54
PORTREVISION= 1
CATEGORIES= security
-MASTER_SITES= http://clamav.elektrapro.com/stable/
+MASTER_SITES= http://clamav.elektrapro.com/stable/ \
+ http://clamav.essentkabel.com/stable/
+
MAINTAINER= markun at onohara.to
COMMENT= Command line virus scanner written entirely in C
@@ -36,12 +38,13 @@
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500000
-EXTRA_PATCHES= ${FILESDIR}/patch5-*
-.endif
-
pre-install:
- @${ECHO} "==> Creating custom user to run clamav..."
-# ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${ECHO} "===> Creating custom user to run clamav..."
+ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @${ECHO} "===> Setting permissions..."
+ @${SETENV} PKG_PREFIX=${PREFIX} ${sh} \
+ ${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
.include <bsd.port.post.mk>
diff -r -u clamav/pkg-install clamav2/pkg-install
--- clamav/pkg-install Sun Jun 8 18:16:49 2003
+++ clamav2/pkg-install Sat Jun 14 00:20:52 2003
@@ -1,11 +1,9 @@
#!/bin/sh
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
+if [ "$2" = "PRE-INSTALL" ]; then
-USER?=clamav
-GROUP?=clamav
+USER=clamav
+GROUP=clamav
if ! pw groupshow "$GROUP" 2>/dev/null 1>&2; then
if pw groupadd $GROUP; then
@@ -27,4 +25,14 @@
exit 1
fi
fi
+fi
+
+if [ "$2" = "POST-INSTALL" ]; then
+ chown -R clamav:clamav ${PKG_PREFIX}/share/clamav
+fi
+
+if [ "$2" != "POST-INSTALL" ] && [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
exit 0
diff -r -u clamav/pkg-plist clamav2/pkg-plist
--- clamav/pkg-plist Sun Jun 8 18:16:49 2003
+++ clamav2/pkg-plist Sat Jun 14 01:42:58 2003
@@ -11,3 +11,4 @@
share/clamav/viruses.db
share/clamav/viruses.db2
@dirrm share/clamav
+ at unexec rmuser -y clamav
--- clamav.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list