OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 11-Nov-2003 16:16:12
Branch: HEAD Handle: 2003111115160902
Added files:
openpkg-src/nessus-tool fsl.nessus
Modified files:
openpkg-src/nessus-tool nessus-tool.spec rc.nessus
openpkg-web news.txt
Log:
Introduction of FSL, PR #202, and corrections to paths, install logic,
and comment style
Summary:
Revision Changes Path
1.1 +16 -0 openpkg-src/nessus-tool/fsl.nessus
1.11 +35 -4 openpkg-src/nessus-tool/nessus-tool.spec
1.2 +1 -1 openpkg-src/nessus-tool/rc.nessus
1.7361 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/nessus-tool/fsl.nessus
============================================================================
$ cvs diff -u -r0 -r1.1 fsl.nessus
--- /dev/null 2003-11-11 16:16:11.000000000 +0100
+++ fsl.nessus 2003-11-11 16:16:11.000000000 +0100
@@ -0,0 +1,16 @@
+##
+## fsl.nessus -- OSSP fsl configuration
+##
+
+ident (nessus)/.+ q{
+ prefix(
+ prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
+ )
+ -> {
+ debug: file(
+ path="@l_prefix@/var/nessus/logs/nessusd.log",
+ perm=0644, jitter=1, monitor=3600
+ )
+ }
+};
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/nessus-tool/nessus-tool.spec
============================================================================
$ cvs diff -u -r1.10 -r1.11 nessus-tool.spec
--- openpkg-src/nessus-tool/nessus-tool.spec 6 Nov 2003 19:56:22 -0000 1.10
+++ openpkg-src/nessus-tool/nessus-tool.spec 11 Nov 2003 15:16:11 -0000 1.11
@@ -33,7 +33,10 @@
Group: Security
License: GPL
Version: 2.0.9
-Release: 20031106
+Release: 20031111
+
+# package options
+%option with_fsl yes
# list of sources
Source0:
ftp://ftp.nessus.org/pub/nessus/nessus-%{version}/src/nessus-core-%{version}.tar.gz
@@ -42,6 +45,7 @@
Source3: nessusd.rules
Source4: nessusd.users
Source5: rc.nessus
+Source6: fsl.nessus
Patch0: nessus-tool.patch
# build information
@@ -51,6 +55,10 @@
PreReq: OpenPKG, openpkg >= 20030103, X11
BuildPreReq: nessus-libs, glib, gtk, openssl
PreReq: nessus-libs, glib, gtk, openssl
+%if "%{with_fsl}" == "yes"
+BuildPreReq: fsl >= 1.3.0
+PreReq: fsl >= 1.3.0
+%endif
AutoReq: no
AutoReqProv: no
@@ -71,7 +79,8 @@
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
+ LDFLAGS="%{l_fsl_ldflags}" \
+ LIBS="%{l_fsl_libs}" \
./configure \
--prefix=%{l_prefix} \
--localstatedir=%{l_prefix}/var \
@@ -99,7 +108,8 @@
CC="%{l_cc}" \
CFLAGS="-I${nessus_core}/tmp%{l_prefix}/include/nessus %{l_cflags -O}" \
CPPFLAGS="-I${nessus_core}/tmp%{l_prefix}/include/nessus %{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
+ LDFLAGS="%{l_fsl_ldflags}" \
+ LIBS="%{l_fsl_libs}" \
./configure \
--prefix=%{l_prefix} \
--enable-install="`%{l_shtool} echo -e %u`" \
@@ -132,7 +142,7 @@
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
# install default configuration
- %{l_shtool} install -c -m 644 \
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
%{SOURCE nessusd.conf} \
%{SOURCE nessusd.rules} \
%{SOURCE nessusd.users} \
@@ -140,9 +150,12 @@
# install run-command script
%{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
%{l_shtool} install -c -m 755 %{l_value -s -a} \
%{SOURCE rc.nessus} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ %{SOURCE fsl.nessus} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
@@ -156,6 +169,13 @@
rm -rf $RPM_BUILD_ROOT
%post
+ # after upgrade, restart service
+ if [ $1 -eq 2 ]; then
+ eval `%{l_rc} nessus status 2>/dev/null`
+ [ ".$nessus_active" = .yes ] && %{l_rc} nessus restart
+ fi
+
+ # on every install, announce certificate
if [ $1 -le 2 ]; then
if [ ! -f $RPM_INSTALL_PREFIX/var/nessus/CA/servercert.pem ]; then
( echo "For the SSL/TLS based remote client/server connections"
@@ -166,10 +186,21 @@
) | %{l_rpmtool} msg -b -t info
fi
fi
+
+ # on initial install, announce useradd
if [ $1 -eq 1 ]; then
( echo "Each Nessus user has to be created on the Nessus server"
echo "Run the following command to create an individual user:"
echo " \$ $RPM_INSTALL_PREFIX/sbin/nessus-adduser"
) | %{l_rpmtool} msg -b -t info
fi
+ exit 0
+
+%preun
+ # before erase, stop service and remove log files
+ if [ $1 -eq 0 ]; then
+ %{l_rc} nessus stop 2>/dev/null
+ rm -f $RPM_INSTALL_PREFIX/var/nessus/logs/*.log* >/dev/null 2>&1 || true
+ fi
+ exit 0
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/nessus-tool/rc.nessus
============================================================================
$ cvs diff -u -r1.1 -r1.2 rc.nessus
--- openpkg-src/nessus-tool/rc.nessus 3 Oct 2003 14:44:42 -0000 1.1
+++ openpkg-src/nessus-tool/rc.nessus 11 Nov 2003 15:16:11 -0000 1.2
@@ -56,5 +56,5 @@
-z ${nessus_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
-P "${nessus_log_prolog}" \
-E "${nessus_log_epilog} && rc nessus restart" \
- @l_prefix@/var/nessus/nessusd.log
+ @l_prefix@/var/nessus/logs/nessusd.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.7360 -r1.7361 news.txt
--- openpkg-web/news.txt 11 Nov 2003 07:49:29 -0000 1.7360
+++ openpkg-web/news.txt 11 Nov 2003 15:16:09 -0000 1.7361
@@ -1,3 +1,4 @@
+11-Nov-2003: Upgraded package: P<nessus-tool-2.0.9-20031111>
11-Nov-2003: Upgraded package: P<mutt15-1.5.5.1i-20031111>
10-Nov-2003: Upgraded package: P<mng-1.0.6-20031110>
10-Nov-2003: Upgraded package: P<vim-6.2.149-20031110>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]