- Add WITHOUT_NESSUS_GTK knob.
- Upgrade rc.d script to the rc-ng style; bump PORTREVISION for that. - Add CONFLICTS. PR: ports/69877 Submitted by: Udo Schweigert (maintainer)
This commit is contained in:
parent
ffcda60645
commit
d157fa040e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=116104
8 changed files with 88 additions and 40 deletions
|
@ -19,6 +19,8 @@ DISTNAME= libnasl-${PORTVERSION}
|
|||
MAINTAINER= udo.schweigert@siemens.com
|
||||
COMMENT= Nessus Attack Scripting Language
|
||||
|
||||
CONFLICTS= nessus-libnasl-devel-[0-9]*
|
||||
|
||||
LIB_DEPENDS= nessus.2:${PORTSDIR}/security/nessus-libraries
|
||||
|
||||
DIST_SUBDIR= nessus
|
||||
|
|
|
@ -22,6 +22,8 @@ DISTNAME= nessus-libraries-${PORTVERSION}
|
|||
MAINTAINER= udo.schweigert@siemens.com
|
||||
COMMENT= Libraries for Nessus, the security scanner
|
||||
|
||||
CONFLICTS= nessus-libraries-devel-[0-9]*
|
||||
|
||||
DIST_SUBDIR= nessus
|
||||
WRKSRC= ${WRKDIR}/nessus-libraries
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ DISTNAME= nessus-plugins-${PORTVERSION}
|
|||
MAINTAINER= udo.schweigert@siemens.com
|
||||
COMMENT= Plugins for Nessus, the security scanner
|
||||
|
||||
CONFLICTS= nessus-plugins-devel-[0-9]*
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/nessus/nessus-devel.h:${PORTSDIR}/security/nessus
|
||||
RUN_DEPENDS= ${LOCALBASE}/include/nessus/nessus-devel.h:${PORTSDIR}/security/nessus \
|
||||
nmap:${PORTSDIR}/security/nmap \
|
||||
|
|
|
@ -4,9 +4,13 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# If you want to only have the command-line client even if gtk is already
|
||||
# installed define:
|
||||
# WITHOUT_NESSUS_GTK
|
||||
|
||||
PORTNAME= nessus
|
||||
PORTVERSION= 2.0.12
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
|
||||
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
|
||||
|
@ -19,17 +23,25 @@ DISTNAME= nessus-core-${PORTVERSION}
|
|||
MAINTAINER= udo.schweigert@siemens.com
|
||||
COMMENT= A security scanner: looks for vulnerabilities in a given network
|
||||
|
||||
CONFLICTS= nessus-devel-[0-9]* nessus-devel-gtk-[0-9]* \
|
||||
nessus-devel-gtk2-[0-9]*
|
||||
LIB_DEPENDS= nasl.2:${PORTSDIR}/security/nessus-libnasl
|
||||
|
||||
DIST_SUBDIR= nessus
|
||||
WRKSRC= ${WRKDIR}/nessus-core
|
||||
|
||||
USE_LIBTOOL_VER=13
|
||||
WANT_GNOME= yes
|
||||
USE_REINPLACE= YES
|
||||
USE_RC_SUBR= YES
|
||||
.if !defined(WITHOUT_NESSUS_GTK)
|
||||
WANT_GNOME= yes
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if defined(WITHOUT_NESSUS_GTK)
|
||||
CONFIGURE_ARGS+=--disable-gtk
|
||||
.else
|
||||
.if ${HAVE_GNOME:Mgtk20}!=""
|
||||
USE_GNOME+= gtk20
|
||||
PKGNAMESUFFIX= -gtk2
|
||||
|
@ -39,17 +51,18 @@ PKGNAMESUFFIX= -gtk
|
|||
.else
|
||||
CONFIGURE_ARGS+=--disable-gtk
|
||||
.endif
|
||||
.endif
|
||||
|
||||
MAN1= nessus.1 nessus-mkrand.1 nessus-mkcert-client.1
|
||||
MAN8= nessusd.8 nessus-adduser.8 nessus-mkcert.8 nessus-rmuser.8
|
||||
|
||||
post-extract:
|
||||
@${CP} ${FILESDIR}/nessusd.sh ${WRKSRC}/nessusd.sh
|
||||
@${REINPLACE_CMD} -E -e 's|%%PREFIX%%|${PREFIX}|g' ${BUILD_WRKSRC}/nessusd.sh
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
|
||||
RC_SUBR=${RC_SUBR}
|
||||
|
||||
post-install:
|
||||
${INSTALL_SCRIPT} ${BUILD_WRKSRC}/nessusd.sh \
|
||||
${LOCALBASE}/etc/rc.d/nessusd.sh.sample
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/nessusd.sh > ${LOCALBASE}/etc/rc.d/nessusd.sh
|
||||
@${CHMOD} +x ${LOCALBASE}/etc/rc.d/nessusd.sh
|
||||
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/move_nessus
|
||||
.if ! exists(${PREFIX}/var/CA/serverkey.pem)
|
||||
.if ! defined(BATCH)
|
||||
|
@ -58,5 +71,6 @@ post-install:
|
|||
${PREFIX}/sbin/nessus-mkcert -q
|
||||
.endif
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,28 +1,37 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
#!/bin/sh
|
||||
|
||||
# Start or stop nessusd
|
||||
# $FreeBSD$
|
||||
|
||||
# PROVIDE: nessusd
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
#
|
||||
# NOTE for FreeBSD 5.0+:
|
||||
# If you want this script to start with the base rc scripts
|
||||
# move nessusd.sh to /etc/rc.d/nessusd
|
||||
|
||||
umask 022
|
||||
arg=${1:-start}
|
||||
prefix=%%PREFIX%%
|
||||
|
||||
nessusd_bin=%%PREFIX%%/sbin/nessusd
|
||||
nessus_arg="-D"
|
||||
kill_arg=nessusd
|
||||
# Define these nessusd_* variables in one of these files:
|
||||
# /etc/rc.conf
|
||||
# /etc/rc.conf.local
|
||||
# /etc/rc.conf.d/nessusd
|
||||
#
|
||||
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
||||
#
|
||||
[ -z "$nessusd_enable" ] && nessusd_enable="NO" # Disable nessusd
|
||||
#nessusd_program="${prefix}/sbin/nessusd" # Location of nessusd
|
||||
nessusd_flags="-D" # Flags to nessusd program
|
||||
|
||||
echo -n " nessusd"
|
||||
. %%RC_SUBR%%
|
||||
|
||||
case $arg in
|
||||
start)
|
||||
test -x $nessusd_bin || exit 1
|
||||
$nessusd_bin $nessus_arg
|
||||
;;
|
||||
stop)
|
||||
killall $kill_arg > /dev/null 2>&1
|
||||
;;
|
||||
restart)
|
||||
killall $kill_arg > /dev/null 2>&1
|
||||
test -x $nessusd_bin || exit 1
|
||||
$nessusd_bin $nessus_arg
|
||||
;;
|
||||
esac
|
||||
name="nessusd"
|
||||
rcvar=`set_rcvar`
|
||||
command="${prefix}/sbin/nessusd"
|
||||
pidfile="/usr/local/var/nessus/nessusd.pid"
|
||||
required_files="${prefix}/etc/nessus/nessusd.conf"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
|
10
security/nessus/pkg-message
Normal file
10
security/nessus/pkg-message
Normal file
|
@ -0,0 +1,10 @@
|
|||
***********************************
|
||||
* !!!!!!!!!!! WARNING !!!!!!!!!!! *
|
||||
***********************************
|
||||
Since 2.0.12_1, to run nessusd server from startup, add nessusd_enable="YES"
|
||||
in your /etc/rc.conf.
|
||||
|
||||
Available variables you add/set to /etc/rc.conf.
|
||||
- nessusd_enable (bool): Set to "NO" by default.
|
||||
Set it to "YES" to enable nessusd.
|
||||
- nessusd_flags (str): Set to "-D" by default.
|
|
@ -1,4 +1,4 @@
|
|||
etc/rc.d/nessusd.sh.sample
|
||||
etc/rc.d/nessusd.sh
|
||||
bin/nessus
|
||||
bin/nessus-mkcert-client
|
||||
bin/nessus-mkrand
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.1 2004-04-10 20:42:56 linimon Exp $
|
||||
# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.2 2004-08-13 13:36:02 vs Exp $
|
||||
#
|
||||
# set -x
|
||||
|
||||
|
@ -25,16 +25,21 @@ if [ -f $PREFIX/etc/nessus/nessusd.conf ]; then
|
|||
$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"
|
||||
rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null
|
||||
if [ $? -gt 0 ]; 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
|
||||
cd $PREFIX
|
||||
rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null
|
||||
printf "\n"
|
||||
fi
|
||||
fi
|
||||
if [ ! -d $PREFIX/com/CA ]; then
|
||||
if [ -d $PREFIX/etc/nessus/com/CA ]; then
|
||||
|
@ -49,3 +54,7 @@ if [ ! -d $PREFIX/com/CA ]; then
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
cd $PREFIX
|
||||
rmdir $PREFIX/etc/nessus/var > /dev/null 2>/dev/null
|
||||
rmdir $PREFIX/etc/nessus/com > /dev/null 2>/dev/null
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue