summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2004-04-10 20:42:56 +0000
committerMark Linimon <linimon@FreeBSD.org>2004-04-10 20:42:56 +0000
commitfd14a11569007f64f4dc5b24b24c7ea00cd9280f (patch)
treeef7796d0cff82afd315a14d7886a3eef1a073f75 /security
parent- Update to 1.2.4 (diff)
Adopt the standard nessus directory structure, reducing the number of
files in ${PREFIX}/etc/nessus. Move existing files to the right places. Bump PORTREVISION. (Also do a little bit of work on pkg-plist).
Diffstat (limited to 'security')
-rw-r--r--security/nessus-libnasl/Makefile5
-rw-r--r--security/nessus-libraries/Makefile5
-rw-r--r--security/nessus-plugins/Makefile5
-rw-r--r--security/nessus/Makefile8
-rw-r--r--security/nessus/pkg-plist15
-rw-r--r--security/nessus/scripts/move_nessus51
6 files changed, 66 insertions, 23 deletions
diff --git a/security/nessus-libnasl/Makefile b/security/nessus-libnasl/Makefile
index 4b6ed06445c9..05dcc347a231 100644
--- a/security/nessus-libnasl/Makefile
+++ b/security/nessus-libnasl/Makefile
@@ -7,7 +7,7 @@
PORTNAME= nessus-libnasl
PORTVERSION= 2.0.10a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -27,9 +27,6 @@ WRKSRC= ${WRKDIR}/libnasl
USE_BISON= YES
USE_LIBTOOL_VER=13
-CONFIGURE_ARGS= --sharedstatedir=${PREFIX}/etc/nessus/com \
- --localstatedir=${PREFIX}/etc/nessus/var
-
INSTALLS_SHLIB= YES
MAN1= nasl.1 nasl-config.1
diff --git a/security/nessus-libraries/Makefile b/security/nessus-libraries/Makefile
index 294565adef39..2dde701e50c1 100644
--- a/security/nessus-libraries/Makefile
+++ b/security/nessus-libraries/Makefile
@@ -10,7 +10,7 @@
PORTNAME= nessus-libraries
PORTVERSION= 2.0.10a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -28,8 +28,7 @@ WRKSRC= ${WRKDIR}/nessus-libraries
USE_BISON= YES
USE_LIBTOOL_VER=13
-CONFIGURE_ARGS= --enable-cipher --sharedstatedir=${PREFIX}/etc/nessus/com \
- --localstatedir=${PREFIX}/etc/nessus/var
+CONFIGURE_ARGS= --enable-cipher
.if defined(WITH_NESSUS_BPF_SHARE)
CONFIGURE_ARGS+= --enable-bpf-sharing
.endif
diff --git a/security/nessus-plugins/Makefile b/security/nessus-plugins/Makefile
index 0ad37be9f7c3..8bc7d4952178 100644
--- a/security/nessus-plugins/Makefile
+++ b/security/nessus-plugins/Makefile
@@ -7,7 +7,7 @@
PORTNAME= nessus-plugins
PORTVERSION= 2.0.10a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -30,8 +30,7 @@ DIST_SUBDIR= nessus
WRKSRC= ${WRKDIR}/nessus-plugins
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-fetchcmd=wget --sharedstatedir=${PREFIX}/etc/nessus/com \
- --localstatedir=${PREFIX}/etc/nessus/var
+CONFIGURE_ARGS= --with-fetchcmd=wget
MAN1= nessus-build.1
MAN8= nessus-update-plugins.8
diff --git a/security/nessus/Makefile b/security/nessus/Makefile
index e582c5cc1457..d4a8cf06f13e 100644
--- a/security/nessus/Makefile
+++ b/security/nessus/Makefile
@@ -7,7 +7,7 @@
PORTNAME= nessus
PORTVERSION= 2.0.10a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -37,14 +37,12 @@ PKGNAMESUFFIX= -gtk
CONFIGURE_ARGS+=--disable-gtk
.endif
-CONFIGURE_ARGS+= --sharedstatedir=${PREFIX}/etc/nessus/com \
- --localstatedir=${PREFIX}/etc/nessus/var
-
MAN1= nessus.1 nessus-mkrand.1 nessus-mkcert-client.1
MAN8= nessusd.8 nessus-adduser.8 nessus-mkcert.8 nessus-rmuser.8
post-install:
-.if ! exists(${PREFIX}/etc/nessus/var/CA/serverkey.pem)
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/move_nessus
+.if ! exists(${PREFIX}/var/CA/serverkey.pem)
.if ! defined(BATCH)
${PREFIX}/sbin/nessus-mkcert
.else
diff --git a/security/nessus/pkg-plist b/security/nessus/pkg-plist
index 909d0c198585..9decbbf7d783 100644
--- a/security/nessus/pkg-plist
+++ b/security/nessus/pkg-plist
@@ -14,14 +14,13 @@ sbin/nessus-adduser
sbin/nessus-mkcert
sbin/nessus-rmuser
sbin/nessusd
-@exec mkdir -p %D/etc/nessus/var/nessus/jobs
-@exec mkdir -p %D/etc/nessus/var/nessus/logs
-@exec mkdir -p %D/etc/nessus/var/nessus/users
-@unexec rmdir %D/etc/nessus/var/nessus/jobs 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var/nessus/logs 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var/nessus/users 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var/nessus 2>/dev/null || true
-@unexec rmdir %D/etc/nessus/var 2>/dev/null || true
+@exec mkdir -p %D/var/nessus/jobs
+@exec mkdir -p %D/var/nessus/logs
+@exec mkdir -p %D/var/nessus/users
+@unexec rmdir %D/var/nessus/jobs 2>/dev/null || true
+@unexec rmdir %D/var/nessus/logs 2>/dev/null || true
+@unexec rmdir %D/var/nessus/users 2>/dev/null || true
+@unexec rmdir %D/var/nessus 2>/dev/null || true
@unexec rmdir %D/etc/nessus 2>/dev/null || true
@exec mkdir -p %D/lib/nessus/plugins
@unexec rmdir %D/lib/nessus/plugins 2>/dev/null || true
diff --git a/security/nessus/scripts/move_nessus b/security/nessus/scripts/move_nessus
new file mode 100644
index 000000000000..0da5e8a62128
--- /dev/null
+++ b/security/nessus/scripts/move_nessus
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.1 2004-04-10 20:42:56 linimon Exp $
+#
+# set -x
+
+trap ' cleanup ' 0
+trap ' echo_signal; exit 1' 1 2 3 15
+
+cleanup() {
+ # No tmp file to remove up to now ;-)
+}
+
+echo_signal() {
+ echo "Got Signal -- aborting `basename $0`"
+}
+
+PATH=/bin:/usr/bin
+
+
+if [ -f $PREFIX/etc/nessus/nessusd.conf ]; then
+ mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
+ sed -e "s,/usr/local/etc/nessus/var,/usr/local/var,g" \
+ -e "s,/usr/local/etc/nessus/com,/usr/local/com,g" \
+ $PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
+fi
+if [ -d $PREFIX/etc/nessus/var/nessus/users ]; then
+ printf "\n\nMigrating nessus to default directory scheme\n"
+ printf "============================================\n\n"
+ cd $PREFIX/etc/nessus/var/nessus/users
+ for i in *; do
+ if [ $i != '*' ]; then
+ mv $i $PREFIX/var/nessus/users
+ printf "Moving nessus user %s\n" $i
+ fi
+ done
+ printf "\n"
+fi
+if [ ! -d $PREFIX/com/CA ]; then
+ if [ -d $PREFIX/etc/nessus/com/CA ]; then
+ if [ ! -d $PREFIX/com ]; then
+ mkdir -m 755 $PREFIX/com
+ fi
+ mv $PREFIX/etc/nessus/com/CA $PREFIX/com/CA
+ fi
+ if [ -d $PREFIX/etc/nessus/var/CA ]; then
+ if [ ! -d $PREFIX/var/CA ]; then
+ mv $PREFIX/etc/nessus/var/CA $PREFIX/var/CA
+ fi
+ fi
+fi