Author: jfs Date: 2007-10-31 22:05:42 +0100 (Wed, 31 Oct 2007) New Revision: 488
Added: trunk/openvas-plugins/debian/openvas-plugins.config trunk/openvas-plugins/debian/openvas-plugins.dirs trunk/openvas-plugins/debian/openvas-plugins.postinst trunk/openvas-plugins/debian/openvas-plugins.postrm trunk/openvas-plugins/debian/openvas-plugins.preinst Removed: trunk/openvas-plugins/debian/nessus-plugins.config trunk/openvas-plugins/debian/nessus-plugins.dirs trunk/openvas-plugins/debian/nessus-plugins.postinst trunk/openvas-plugins/debian/nessus-plugins.postrm trunk/openvas-plugins/debian/nessus-plugins.preinst trunk/openvas-plugins/debian/nessus-plugins.templates Modified: trunk/openvas-plugins/debian/control trunk/openvas-plugins/debian/rules Log: Rebranding nessus -> OpenVAS Make sure that all contents are located in a location different to Nessus' plugins Modified: trunk/openvas-plugins/debian/control =================================================================== --- trunk/openvas-plugins/debian/control 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/control 2007-10-31 21:05:42 UTC (rev 488) @@ -2,14 +2,14 @@ Section: admin Priority: optional Maintainer: Javier Fernandez-Sanguino Pen~a <[EMAIL PROTECTED]> -Build-Depends: debhelper (>= 4.1.13), libnessus-dev (>= 1.2), nessus-dev (>= 1.2), libgmp3-dev, libz-dev, libpcap0.8-dev | libpcap-dev, nmap, libnet1-dev +Build-Depends: debhelper (>= 4.1.13), libopenvas-dev (>= 1.0), openvas-dev (>= 1.0), libgmp3-dev, libz-dev, libpcap0.8-dev | libpcap-dev, nmap, libnet1-dev Standards-Version: 3.6.1.1 Homepage: http://www.openvas.org Package: openvas-plugins Architecture: any Depends: ${shlibs:Depends}, debconf | debconf-2.0 -Recommends: wget, nessusd (>= 2.2.3), nmap, snmp +Recommends: wget, openvas-server (>= 1.0), nmap, snmp Description: OpenVAS vulnerability tests OpenVAS is a network security scanner. It makes possible to test the security of remote hosts in an attempt to find vulnerable spots that should be fixed. Deleted: trunk/openvas-plugins/debian/nessus-plugins.config =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.config 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/nessus-plugins.config 2007-10-31 21:05:42 UTC (rev 488) @@ -1,60 +0,0 @@ -#!/bin/sh -e -# Config script for nessus-plugins -# (c) 2003 Javier Fern�ndez-Sanguino -# Some ideas stolen from the geneweb package (and contributed by -# Christian Perrier) - -. /usr/share/debconf/confmodule -db_version 2.0 || [ $? -lt 30 ] -db_title "Nessus plugins" - - -find_updated_plugs () { - DIST_PLIST=`mktemp` - ORIG_PLIST=`mktemp` - cat $NESSUSPLIST | sort > $DIST_PLIST - find $PLUGINDIR -maxdepth 1 -type f | sort > $ORIG_PLIST - comm -13 $DIST_PLIST $ORIG_PLIST - rm -f $ORIG_PLIST $DIST_PLIST - return 0 -} - -PLUGINDIR=/var/lib/nessus/plugins/ -NESSUSPLIST=/var/lib/dpkg/info/nessus-plugins.list -MAX_ENTRIES=5 -[ -d $PLUGINDIR ] && ( [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ) && { -# We need to remove _all_ the plugins in the previous installation -# otherwise there might be stuff which we do not want - - newplugs="`find_updated_plugs`" - if [ -n "$newplugs" ] ; then - countnewplugs="`echo $newplugs |wc -l`" - else - countnewplugs=0 - fi - if [ -n "$newplugs" ] || [ "$1" = "reconfigure" ] ; then - -# I'm not convinced that there is any need to list all the plugins -# which are new here. This question could even be asked regardless -# of wether there are new plugins or not... (jfs) -# if [ $countnewplugs -gt $MAX_ENTRIES ] ; then - # List should be limited to, say, 5 entries at most to avoid - # filling up the screen -# newplugs="`echo $newplugs |head -$MAX_ENTRIES`" -# newplugs="$newplugs (...)" -# fi -# newplugs=`echo $newplugs | perl -pe 's/\n/, /g'` -# db_subst nessus-plugins/remove_unknown newplugs "$newplugs" || true - -# This will give an indication of the stuff that will be removed - db_subst nessus-plugins/remove_unknown countnewplugs "$countnewplugs" || true -# Ask the question - db_input medium nessus-plugins/remove_unknown || true - fi -} - -#DEBHELPER# - -db_go - -exit 0 Deleted: trunk/openvas-plugins/debian/nessus-plugins.dirs =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.dirs 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/nessus-plugins.dirs 2007-10-31 21:05:42 UTC (rev 488) @@ -1,3 +0,0 @@ -var/lib/nessus/.desc-plugins -var/lib/nessus/plugins -var/lib/nessus/plugins-factory Deleted: trunk/openvas-plugins/debian/nessus-plugins.postinst =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.postinst 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/nessus-plugins.postinst 2007-10-31 21:05:42 UTC (rev 488) @@ -1,48 +0,0 @@ -#!/bin/sh -e -# Postinst script for nessus-plugins -# (c) 2003 Javier Fern�ndez-Sanguino - -. /usr/share/debconf/confmodule -db_version 2.0 -test $DEBIAN_SCRIPT_DEBUG && set -v -x - - -# Note, This is far from optimal and might take some time to run. -# (and we have to do it again since we cannot preserve it through -# configure/postinst calls) -find_updated_plugs () { - DIST_PLIST=`mktemp` - ORIG_PLIST=`mktemp` - cat $NESSUSPLIST | sort > $DIST_PLIST - find $PLUGINDIR -maxdepth 1 -type f | sort > $ORIG_PLIST - comm -13 $DIST_PLIST $ORIG_PLIST - rm -f $ORIG_PLIST $DIST_PLIST - return 0 -} - -PLUGINDIR=/var/lib/nessus/plugins/ -NESSUSPLIST=/var/lib/dpkg/info/nessus-plugins.list -if [ "$1" = "configure" ] && [ -d $PLUGINDIR ]; then - db_get nessus-plugins/remove_unknown || true - REMOVE="$RET" - if [ "$REMOVE" = "true" ] ; then - newplugs="`find_updated_plugs`" - if [ -n "$newplugs" ] ; then - echo $newplugs | xargs -r rm -f - fi - fi -fi - -# Revert the change introduced in 2.0.10a-4, since -# now all plugins are in /var/ -if [ -d /var/lib/nessus/.desc-plugins ] && \ - [ -d /var/lib/nessus/plugins ] ; then - [ -L /var/lib/nessus/plugins/.desc ] && rm -f /var/lib/nessus/plugins/.desc - if [ ! -e /var/lib/nessus/plugins/.desc ]; then - mv /var/lib/nessus/.desc-plugins /var/lib/nessus/plugins/.desc - fi -fi - -#DEBHELPER# - -exit 0 Deleted: trunk/openvas-plugins/debian/nessus-plugins.postrm =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.postrm 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/nessus-plugins.postrm 2007-10-31 21:05:42 UTC (rev 488) @@ -1,32 +0,0 @@ -#!/bin/sh -e - -if [ "$1" = "purge" ] && [ -d /usr/lib/nessus/plugins ]; then - echo "" - echo "The /usr/lib/nessus/plugins directory still exists." - echo "This might be because you downloaded additional plugins into it" - echo "when using a previous Nessus version." - echo -n "Do you want to remove the full directory now? " - read ANSWER - case $ANSWER in - [yY]*) rm -rf /usr/lib/nessus/plugins ;; - esac -fi - -if [ "$1" = "purge" ] && [ -d /var/lib/nessus/plugins ]; then - echo "" - echo "The /var/lib/nessus/plugins directory still exists." - echo "This might be because you downloaded additional plugins into it." - if [ -d /var/lib/nessus/plugins/.desc ]; then - echo "Or because the nessusd package was not fully purged." - fi - echo "" - echo -n "Do you want to remove the full directory now? " - read ANSWER - case $ANSWER in - [yY]*) rm -rf /var/lib/nessus/plugins ;; - esac -fi - -#DEBHELPER# - -exit 0 Deleted: trunk/openvas-plugins/debian/nessus-plugins.preinst =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.preinst 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/nessus-plugins.preinst 2007-10-31 21:05:42 UTC (rev 488) @@ -1,39 +0,0 @@ -#!/bin/sh -e -# Preinst script for nessus-plugins -# (c) 2004 Javier Fern�ndez-Sanguino - -PLUGINDIR=/var/lib/nessus/ -OPLUGINDIR=/usr/lib/nessus/ - -# Basicly, check if there is anything - -[ ! -d $OPLUGINDIR ] && exit 0 - -echo -n "Moving plugins from $OPLUGINDIR to $PLUGINDIR..." -if [ ! -d $PLUGINDIR ] ; then - mkdir -p $PLUGINDIR - chown root:root $PLUGINDIR - chmod 0766 $PLUGINDIR -fi - -# Now, we don't care about descriptions, they will be regenerated -[ -d "$OPLUGINDIR/.desc" ] && rm -rf $OPLUGINDIR/.desc -[ ! -d "$PLUGINDIR/.desc" ] && mkdir $PLUGINDIR/.desc - -find $OPLUGINDIR -maxdepth 1 -mindepth 1 | -while read content; do - base=`basename $content` - if [ -e "$PLUGINDIR/$base" ]; then - cp -a "$OPLUGINDIR/$base" $PLUGINDIR - rm -rf "$OPLUGINDIR/$base" - else - mv "$OPLUGINDIR/$base" $PLUGINDIR - fi -done - - -echo ".done" - -#DEBHELPER# - -exit 0 Deleted: trunk/openvas-plugins/debian/nessus-plugins.templates =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.templates 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/nessus-plugins.templates 2007-10-31 21:05:42 UTC (rev 488) @@ -1,16 +0,0 @@ -Template: nessus-plugins/remove_unknown -Type: boolean -Default: false -_Description: Remove unknown Nessus plugins? - The /var/lib/nessus/plugins directory includes some unknown plugins. This - is probably because you downloaded additional plugins into it (e.g. by - running nessus-update-plugins). You currently have ${countnewplugs} - plugin(s) which are not provided by this package. - . - However, if you downloaded plugins for an older Nessus major - version (e.g. from 1.x) they might not work properly with newer - versions of Nessus, so it's sometimes advisable to remove them. - . - Note: This will apply to all your new installations/upgrades of this package - until you reconfigure it. You should say 'No' if you plan to - use nessus-update-plugins in the future. Copied: trunk/openvas-plugins/debian/openvas-plugins.config (from rev 475, trunk/openvas-plugins/debian/nessus-plugins.config) =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.config 2007-10-31 08:39:33 UTC (rev 475) +++ trunk/openvas-plugins/debian/openvas-plugins.config 2007-10-31 21:05:42 UTC (rev 488) @@ -0,0 +1,60 @@ +#!/bin/sh -e +# Config script for openvas-plugins +# (c) 2003-2007 Javier Fern�ndez-Sanguino <[EMAIL PROTECTED]> +# Some ideas stolen from the geneweb package (and contributed by +# Christian Perrier) + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] +db_title "OpenVAS plugins" + + +find_updated_plugs () { + DIST_PLIST=`mktemp` + ORIG_PLIST=`mktemp` + cat $OPENVASPLIST | sort > $DIST_PLIST + find $PLUGINDIR -maxdepth 1 -type f | sort > $ORIG_PLIST + comm -13 $DIST_PLIST $ORIG_PLIST + rm -f $ORIG_PLIST $DIST_PLIST + return 0 +} + +PLUGINDIR=/var/lib/openvas/plugins/ +OPENVASPLIST=/var/lib/dpkg/info/openvas-plugins.list +MAX_ENTRIES=5 +[ -d $PLUGINDIR ] && ( [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ) && { +# We need to remove _all_ the plugins in the previous installation +# otherwise there might be stuff which we do not want + + newplugs="`find_updated_plugs`" + if [ -n "$newplugs" ] ; then + countnewplugs="`echo $newplugs |wc -l`" + else + countnewplugs=0 + fi + if [ -n "$newplugs" ] || [ "$1" = "reconfigure" ] ; then + +# I'm not convinced that there is any need to list all the plugins +# which are new here. This question could even be asked regardless +# of wether there are new plugins or not... (jfs) +# if [ $countnewplugs -gt $MAX_ENTRIES ] ; then + # List should be limited to, say, 5 entries at most to avoid + # filling up the screen +# newplugs="`echo $newplugs |head -$MAX_ENTRIES`" +# newplugs="$newplugs (...)" +# fi +# newplugs=`echo $newplugs | perl -pe 's/\n/, /g'` +# db_subst openvas-plugins/remove_unknown newplugs "$newplugs" || true + +# This will give an indication of the stuff that will be removed + db_subst openvas-plugins/remove_unknown countnewplugs "$countnewplugs" || true +# Ask the question + db_input medium openvas-plugins/remove_unknown || true + fi +} + +#DEBHELPER# + +db_go + +exit 0 Copied: trunk/openvas-plugins/debian/openvas-plugins.dirs (from rev 475, trunk/openvas-plugins/debian/nessus-plugins.dirs) =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.dirs 2007-10-31 08:39:33 UTC (rev 475) +++ trunk/openvas-plugins/debian/openvas-plugins.dirs 2007-10-31 21:05:42 UTC (rev 488) @@ -0,0 +1,3 @@ +var/lib/openvas/.desc-plugins +var/lib/openvas/plugins +var/lib/openvas/plugins-factory Copied: trunk/openvas-plugins/debian/openvas-plugins.postinst (from rev 475, trunk/openvas-plugins/debian/nessus-plugins.postinst) =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.postinst 2007-10-31 08:39:33 UTC (rev 475) +++ trunk/openvas-plugins/debian/openvas-plugins.postinst 2007-10-31 21:05:42 UTC (rev 488) @@ -0,0 +1,48 @@ +#!/bin/sh -e +# Postinst script for openvas-plugins +# (c) 2003-2007 Javier Fern�ndez-Sanguino <[EMAIL PROTECTED]> + +. /usr/share/debconf/confmodule +db_version 2.0 +test $DEBIAN_SCRIPT_DEBUG && set -v -x + + +# Note, This is far from optimal and might take some time to run. +# (and we have to do it again since we cannot preserve it through +# configure/postinst calls) +find_updated_plugs () { + DIST_PLIST=`mktemp` + ORIG_PLIST=`mktemp` + cat $OPENVASPLIST | sort > $DIST_PLIST + find $PLUGINDIR -maxdepth 1 -type f | sort > $ORIG_PLIST + comm -13 $DIST_PLIST $ORIG_PLIST + rm -f $ORIG_PLIST $DIST_PLIST + return 0 +} + +PLUGINDIR=/var/lib/openvas/plugins/ +OPENVASPLIST=/var/lib/dpkg/info/openvas-plugins.list +if [ "$1" = "configure" ] && [ -d $PLUGINDIR ]; then + db_get openvas-plugins/remove_unknown || true + REMOVE="$RET" + if [ "$REMOVE" = "true" ] ; then + newplugs="`find_updated_plugs`" + if [ -n "$newplugs" ] ; then + echo $newplugs | xargs -r rm -f + fi + fi +fi + +# Revert the change introduced in 2.0.10a-4, since +# now all plugins are in /var/ +if [ -d /var/lib/openvas/.desc-plugins ] && \ + [ -d /var/lib/openvas/plugins ] ; then + [ -L /var/lib/openvas/plugins/.desc ] && rm -f /var/lib/openvas/plugins/.desc + if [ ! -e /var/lib/openvas/plugins/.desc ]; then + mv /var/lib/openvas/.desc-plugins /var/lib/openvas/plugins/.desc + fi +fi + +#DEBHELPER# + +exit 0 Copied: trunk/openvas-plugins/debian/openvas-plugins.postrm (from rev 475, trunk/openvas-plugins/debian/nessus-plugins.postrm) =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.postrm 2007-10-31 08:39:33 UTC (rev 475) +++ trunk/openvas-plugins/debian/openvas-plugins.postrm 2007-10-31 21:05:42 UTC (rev 488) @@ -0,0 +1,32 @@ +#!/bin/sh -e + +if [ "$1" = "purge" ] && [ -d /usr/lib/openvas/plugins ]; then + echo "" + echo "The /usr/lib/openvas/plugins directory still exists." + echo "This might be because you downloaded additional plugins into it" + echo "when using a previous Nessus version." + echo -n "Do you want to remove the full directory now? " + read ANSWER + case $ANSWER in + [yY]*) rm -rf /usr/lib/openvas/plugins ;; + esac +fi + +if [ "$1" = "purge" ] && [ -d /var/lib/openvas/plugins ]; then + echo "" + echo "The /var/lib/openvas/plugins directory still exists." + echo "This might be because you downloaded additional plugins into it." + if [ -d /var/lib/openvas/plugins/.desc ]; then + echo "Or because the openvasd package was not fully purged." + fi + echo "" + echo -n "Do you want to remove the full directory now? " + read ANSWER + case $ANSWER in + [yY]*) rm -rf /var/lib/openvas/plugins ;; + esac +fi + +#DEBHELPER# + +exit 0 Copied: trunk/openvas-plugins/debian/openvas-plugins.preinst (from rev 475, trunk/openvas-plugins/debian/nessus-plugins.preinst) =================================================================== --- trunk/openvas-plugins/debian/nessus-plugins.preinst 2007-10-31 08:39:33 UTC (rev 475) +++ trunk/openvas-plugins/debian/openvas-plugins.preinst 2007-10-31 21:05:42 UTC (rev 488) @@ -0,0 +1,39 @@ +#!/bin/sh -e +# Preinst script for openvas-plugins +# (c) 2004-2007 Javier Fern�ndez-Sanguino + +PLUGINDIR=/var/lib/openvas/ +OPLUGINDIR=/usr/lib/openvas/ + +# Basicly, check if there is anything + +[ ! -d $OPLUGINDIR ] && exit 0 + +echo -n "Moving plugins from $OPLUGINDIR to $PLUGINDIR..." +if [ ! -d $PLUGINDIR ] ; then + mkdir -p $PLUGINDIR + chown root:root $PLUGINDIR + chmod 0766 $PLUGINDIR +fi + +# Now, we don't care about descriptions, they will be regenerated +[ -d "$OPLUGINDIR/.desc" ] && rm -rf $OPLUGINDIR/.desc +[ ! -d "$PLUGINDIR/.desc" ] && mkdir $PLUGINDIR/.desc + +find $OPLUGINDIR -maxdepth 1 -mindepth 1 | +while read content; do + base=`basename $content` + if [ -e "$PLUGINDIR/$base" ]; then + cp -a "$OPLUGINDIR/$base" $PLUGINDIR + rm -rf "$OPLUGINDIR/$base" + else + mv "$OPLUGINDIR/$base" $PLUGINDIR + fi +done + + +echo ".done" + +#DEBHELPER# + +exit 0 Modified: trunk/openvas-plugins/debian/rules =================================================================== --- trunk/openvas-plugins/debian/rules 2007-10-31 21:05:09 UTC (rev 487) +++ trunk/openvas-plugins/debian/rules 2007-10-31 21:05:42 UTC (rev 488) @@ -2,9 +2,9 @@ # Derived from dh_make example. #export DH_VERBOSE=1 -export DH_COMPAT=4 +#export DH_COMPAT=4 -tmp := $(CURDIR)/debian/nessus-plugins +tmp := $(CURDIR)/debian/openvas-plugins CFLAGS := -g -Wall ifneq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" "" @@ -34,7 +34,7 @@ clean: dh_testdir dh_testroot - touch nessus.tmpl + touch openvas.tmpl [ ! -f Makefile ] || $(MAKE) distclean -rm -rf debian/extra dh_clean build-stamp @@ -60,14 +60,14 @@ ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" "" dh_strip strip --strip-unneeded --remove-section=.comment --remove-section=.note \ - $(tmp)/var/lib/nessus/plugins/*.nes + $(tmp)/var/lib/openvas/plugins/*.nes endif dh_compress dh_fixperms - chmod -x $(tmp)/var/lib/nessus/plugins/*.nes + chmod -x $(tmp)/var/lib/openvas/plugins/*.nes dh_installdeb - dpkg-shlibdeps -Tdebian/nessus-plugins.substvars \ - $(tmp)/var/lib/nessus/plugins/*.nes + dpkg-shlibdeps -Tdebian/openvas-plugins.substvars \ + $(tmp)/var/lib/openvas/plugins/*.nes dh_gencontrol dh_md5sums dh_builddeb
_______________________________________________ Openvas-commits mailing list [email protected] http://lists.wald.intevation.org/mailman/listinfo/openvas-commits
