Package: openvas-plugins-dfsg Severity: wishlist Tags: patch Hi,
The dpatch patch management system has been deprecated for some time. The Lintian currently flags use of dpatch packages as an error. The new 3.0 packaging format is an improved version which, among other things, contains patch management built-in. For more information, see: http://wiki.debian.org/Projects/DebSrc3.0 I had some free time; see attached patch to migrate to new package format. Note that all files in debian/patches/* are canocalized to *.patch. Let me know if there is anything that needs adjusting or if it is ok to upload this version in a NMU in case you are working on other issues needing attention. Thanks, Jari
>From 05f8058a55293227fe9c9bd35acede40f0d6ef05 Mon Sep 17 00:00:00 2001 From: Jari Aalto <jari.aa...@cante.net> Date: Wed, 25 Apr 2012 10:06:05 +0300 Subject: [PATCH] format-3.0 Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto <jari.aa...@cante.net> --- debian/README.source | 4 - debian/changelog | 13 +++ debian/compat | 2 +- debian/control | 4 +- debian/openvas-plugins-base.postinst | 5 +- debian/openvas-plugins-base.postrm | 3 +- debian/openvas-plugins-dfsg.postinst | 5 +- debian/openvas-plugins-dfsg.postrm | 3 +- debian/openvas-plugins-dfsg.preinst | 7 +- debian/patches/00list | 4 - debian/patches/10-openvas-nvt-sync.patch | 122 ++++++++++++++++++++ ...ripts_update.dpatch => 25-scripts-update.patch} | 8 +- ...ude_plugins.dpatch => 30-include-plugins.patch} | 8 +- ...s-nvt_sync.dpatch => 40-openvas-nvt-sync.patch} | 8 +- ...audit_improve.dpatch => 90-audit-improve.patch} | 9 +- debian/patches/series | 5 + debian/rules | 14 +-- debian/source/format | 1 + openvas-nvt-sync | 116 ------------------- 19 files changed, 176 insertions(+), 165 deletions(-) mode change 100644 => 100755 debian/openvas-plugins-base.postinst mode change 100644 => 100755 debian/openvas-plugins-base.postrm mode change 100644 => 100755 debian/openvas-plugins-dfsg.postinst mode change 100644 => 100755 debian/openvas-plugins-dfsg.postrm mode change 100644 => 100755 debian/openvas-plugins-dfsg.preinst delete mode 100644 debian/patches/00list create mode 100644 debian/patches/10-openvas-nvt-sync.patch rename debian/patches/{25_scripts_update.dpatch => 25-scripts-update.patch} (97%) rename debian/patches/{30_include_plugins.dpatch => 30-include-plugins.patch} (99%) rename debian/patches/{40_openvas-nvt_sync.dpatch => 40-openvas-nvt-sync.patch} (94%) rename debian/patches/{100_audit_improve.dpatch => 90-audit-improve.patch} (96%) create mode 100644 debian/patches/series create mode 100644 debian/source/format delete mode 100644 openvas-nvt-sync diff --git a/debian/README.source b/debian/README.source index 2a45d12..204f375 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,6 +1,2 @@ The new original tarball can be created by removing the non-free plugins listed in audit/REMOVED-PLUGINS file and removing the packaging/subdirectory - -For the rest we use dpatch for patch handling inside our package(s). Please -see /usr/share/doc/dpatch/README.source.gz (if you have dpatch installed) for -documentation on how to use dpatch. diff --git a/debian/changelog b/debian/changelog index 2eaa793..8374e96 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +openvas-plugins-dfsg (1:20100705-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt". + * Update to Standards-Version to 3.9.3 and debhelper to 9. + * Add required build-arch and build-indep targets to rules file. + * patches + - (10): New; in-line changes to original sources. + - (90): Rename from 100 to make listing sort alphabetically. + * Fix maintainer-script-without-set-e (Lintian). + + -- Jari Aalto <jari.aa...@cante.net> Wed, 25 Apr 2012 10:04:14 +0300 + openvas-plugins-dfsg (1:20100705-2) unstable; urgency=low * Added Japanese po-debconf translation provided by Hideki Yamane diff --git a/debian/compat b/debian/compat index 7f8f011..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index 3668e6b..fce76ce 100644 --- a/debian/control +++ b/debian/control @@ -2,11 +2,11 @@ Source: openvas-plugins-dfsg Section: admin Priority: optional Maintainer: Javier Fernandez-Sanguino Pen~a <j...@debian.org> -Build-Depends: debhelper (>= 7), dpatch, libopenvas2-dev, openvas-server-dev (>= 1.0), libopenvasnasl2-dev, libgmp3-dev, libz-dev, libpcap-dev, libnet1-dev, libgnutls-dev, libglib2.0-dev +Build-Depends: debhelper (>= 9), libopenvas2-dev, openvas-server-dev (>= 1.0), libopenvasnasl2-dev, libgmp3-dev, libz-dev, libpcap-dev, libnet1-dev, libgnutls-dev, libglib2.0-dev Homepage: http://www.openvas.org/ Vcs-Browser: https://wald.intevation.org/plugins/scmsvn/viewcvs.php/trunk/openvas-packaging/openvas-plugins/debian/trunk/debian/?root=openvas Vcs-Svn: https://svn.wald.intevation.org/svn/openvas/trunk/openvas-packaging/openvas-plugins/debian/trunk/debian/ -Standards-Version: 3.8.3 +Standards-Version: 3.9.3 Package: openvas-plugins-dfsg Section: net diff --git a/debian/openvas-plugins-base.postinst b/debian/openvas-plugins-base.postinst old mode 100644 new mode 100755 index 1762ecc..4d572c6 --- a/debian/openvas-plugins-base.postinst +++ b/debian/openvas-plugins-base.postinst @@ -1,4 +1,7 @@ -#!/bin/sh -e +#!/bin/sh + +set -e + # Openvas-plugins-postinst script # If debconf is available, use it, this is necessary diff --git a/debian/openvas-plugins-base.postrm b/debian/openvas-plugins-base.postrm old mode 100644 new mode 100755 index a3dcb73..9a471c3 --- a/debian/openvas-plugins-base.postrm +++ b/debian/openvas-plugins-base.postrm @@ -1,5 +1,6 @@ -#!/bin/sh -e +#!/bin/sh +set -e case "$1" in diff --git a/debian/openvas-plugins-dfsg.postinst b/debian/openvas-plugins-dfsg.postinst old mode 100644 new mode 100755 index 1762ecc..4d572c6 --- a/debian/openvas-plugins-dfsg.postinst +++ b/debian/openvas-plugins-dfsg.postinst @@ -1,4 +1,7 @@ -#!/bin/sh -e +#!/bin/sh + +set -e + # Openvas-plugins-postinst script # If debconf is available, use it, this is necessary diff --git a/debian/openvas-plugins-dfsg.postrm b/debian/openvas-plugins-dfsg.postrm old mode 100644 new mode 100755 index c8e896a..994fa26 --- a/debian/openvas-plugins-dfsg.postrm +++ b/debian/openvas-plugins-dfsg.postrm @@ -1,5 +1,6 @@ -#!/bin/sh -e +#!/bin/sh +set -e case "$1" in diff --git a/debian/openvas-plugins-dfsg.preinst b/debian/openvas-plugins-dfsg.preinst old mode 100644 new mode 100755 index c66a797..7ce71da --- a/debian/openvas-plugins-dfsg.preinst +++ b/debian/openvas-plugins-dfsg.preinst @@ -1,6 +1,9 @@ -#!/bin/sh -e +#!/bin/sh + +set -e + # Preinst script for openvas-plugins -# (c) 2004-2007 Javier Fernández-Sanguino +# Copyriht (C) 2004-2007 Javier Fernández-Sanguino PLUGINDIR=/var/lib/openvas/plugins/ OPLUGINDIR=/usr/lib/openvas/plugins/ diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index a9240f7..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1,4 +0,0 @@ -25_scripts_update.dpatch -30_include_plugins.dpatch -40_openvas-nvt_sync.dpatch -100_audit_improve.dpatch diff --git a/debian/patches/10-openvas-nvt-sync.patch b/debian/patches/10-openvas-nvt-sync.patch new file mode 100644 index 0000000..e3edf97 --- /dev/null +++ b/debian/patches/10-openvas-nvt-sync.patch @@ -0,0 +1,122 @@ +diff --git a/openvas-nvt-sync b/openvas-nvt-sync +new file mode 100644 +index 0000000..b9e6704 +--- /dev/null ++++ b/openvas-nvt-sync +@@ -0,0 +1,116 @@ ++#!/bin/bash ++# ++# OpenVAS ++# $Id$ ++# Description: Synchronize with with NVT feed. ++# This shell script synchronizes the local set of ++# OpenVAS Network Vulerability Tests (NVTs) and ++# associated includefiles with a given upstream ++# feed of updated or new files. ++# ++# Authors: ++# Lukas Grunwald <l.grunw...@dn-systems.de> ++# Jan-Oliver Wagner <jan-oliver.wag...@intevation.de> ++# ++# Copyright DN-Systems Enterprise Internet Solutions GmbH 2007 ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License version 2, ++# as published by the Free Software Foundation ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++prefix=/usr ++exec_prefix=${prefix} ++sysconfdir=/etc ++libdir=/var/lib ++localstatedir=/var/run ++ ++# these locations should be correct if standard ./configure had ++# been applied. ++NVT_DIR="$libdir/openvas/plugins" ++ ++# The URL of the plugin feed ++FEED=rsync://rsync.openvas.org:/nvt-feed ++# An alternative syntax which might work if the above doesn't: ++#FEED=rs...@rsync.openvas.org::nvt-feed ++ ++findcmd() ++{ ++ CMD=$1 ++ SRCH=/usr/bin:/usr/ucb:/usr/sbin ++ SAVEIFS=$IFS ++ IFS=: ++ set $SRCH ++ IFS=$SAVEIFS ++ for dir ++ do ++ [ -x $dir/$CMD ] && { ++ echo $dir/$CMD ++ return ++ } ++ done ++} ++ ++chk_system_tools(){ ++echo "Searching for required system tools ..." ++ ++RSYNC=`findcmd rsync` ++MD5SUM=`findcmd md5sum` ++ ++if [ -z "$RSYNC" ]; then ++ echo "Error: RSYNC not found"; ++ exit -1 ++fi ++ ++if [ -z "$MD5SUM" ]; then ++ echo "Error: MD5SUM not found"; ++ exit -1 ++fi ++} ++ ++sync_nvts (){ ++ echo "Synchonizing NVTs via RSYNC ..." ++ ++ mkdir -p "$NVT_DIR" ++ eval "rsync -ltvrP \"$FEED\" \"$NVT_DIR\"" ++ if [ $? -ne 0 ] ; then ++ echo "Error: rsync failed. Your NVT collection might be broken now." ++ exit 1 ++ fi ++ eval "cd \"$NVT_DIR\" ; md5sum -c --status \"$NVT_DIR/md5sums\"" ++ if [ $? -ne 0 ] ; then ++ echo "Error: md5sums not correct. Your NVT collection might be broken now." ++ echo "Please try this for details: cd \"$NVT_DIR\" ; md5sum -c \"$NVT_DIR/md5sums\" | less" ++ exit 1 ++ fi ++ ++ echo "Synchronization successful." ++} ++ ++# TODO: This does only sometimes work (if proper start/stop daemon was used) ++# It should be made verbose and robust so that the user will know whether ++# openvasd was restarted successfully or whether a failure occured. ++restart_openvasd (){ ++ test -f /var/run/run/openvasd.pid && { ++ pid=`cat /var/run/run/openvasd.pid` ++ kill -1 $pid 2>/dev/null ++ } ++} ++ ++echo "OpenVAS NVT Sync $Release$" ++echo " " ++echo "Configured NVT Feed: $FEED" ++echo "Synchronized into: $NVT_DIR" ++echo " " ++ ++chk_system_tools ++sync_nvts ++restart_openvasd diff --git a/debian/patches/25_scripts_update.dpatch b/debian/patches/25-scripts-update.patch similarity index 97% rename from debian/patches/25_scripts_update.dpatch rename to debian/patches/25-scripts-update.patch index 37042bb..9d209b0 100644 --- a/debian/patches/25_scripts_update.dpatch +++ b/debian/patches/25-scripts-update.patch @@ -1,10 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 25_scripts_update.dpatch by <j...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Update tools based on latest content available +From: Javier Fernandez-Sanguino Peña <j...@debian.org> +Subject: Update tools based on latest content available -@DPATCH@ --- openvas-plugins-dfsg-1.0.7.orig/extra/describe-openvas-plugin +++ openvas-plugins-dfsg-1.0.7/extra/describe-openvas-plugin @@ -5,12 +5,12 @@ diff --git a/debian/patches/30_include_plugins.dpatch b/debian/patches/30-include-plugins.patch similarity index 99% rename from debian/patches/30_include_plugins.dpatch rename to debian/patches/30-include-plugins.patch index 53668c1..bab39e0 100644 --- a/debian/patches/30_include_plugins.dpatch +++ b/debian/patches/30-include-plugins.patch @@ -1,10 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 30_include_plugins.dpatch by <j...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. +From: Javier Fernandez-Sanguino Peña <j...@debian.org> +Subject: Adjust MANIFEST file for plugins -@DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' openvas-plugins-dfsg-20100705~/MANIFEST openvas-plugins-dfsg-20100705/MANIFEST --- openvas-plugins-dfsg-20100705~/MANIFEST 2010-07-06 02:42:05.000000000 +0200 +++ openvas-plugins-dfsg-20100705/MANIFEST 2010-07-06 02:42:11.000000000 +0200 diff --git a/debian/patches/40_openvas-nvt_sync.dpatch b/debian/patches/40-openvas-nvt-sync.patch similarity index 94% rename from debian/patches/40_openvas-nvt_sync.dpatch rename to debian/patches/40-openvas-nvt-sync.patch index 50b8f07..4aec543 100644 --- a/debian/patches/40_openvas-nvt_sync.dpatch +++ b/debian/patches/40-openvas-nvt-sync.patch @@ -1,10 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 40_openvas-nvt_sync.dpatch by <j...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. +From: Javier Fernandez-Sanguino Peña <j...@debian.org> +Subject: No description. -@DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' openvas-plugins-dfsg-20100705~/openvas-nvt-sync.in openvas-plugins-dfsg-20100705/openvas-nvt-sync.in --- openvas-plugins-dfsg-20100705~/openvas-nvt-sync.in 1970-01-01 01:00:00.000000000 +0100 +++ openvas-plugins-dfsg-20100705/openvas-nvt-sync.in 2010-07-06 02:08:15.000000000 +0200 diff --git a/debian/patches/100_audit_improve.dpatch b/debian/patches/90-audit-improve.patch similarity index 96% rename from debian/patches/100_audit_improve.dpatch rename to debian/patches/90-audit-improve.patch index 13d033f..55832a0 100644 --- a/debian/patches/100_audit_improve.dpatch +++ b/debian/patches/90-audit-improve.patch @@ -1,11 +1,6 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## diff-audit.dpatch by <j...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Improve scripts and information related to audit, add a new -## DP: script +From: Javier Fernandez-Sanguino Peña <j...@debian.org> +Subject: Improve scripts and information related to audit, add a new script -@DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' openvas-plugins-dfsg-20100320~/audit/REMOVED-PLUGINS openvas-plugins-dfsg-20100320/audit/REMOVED-PLUGINS --- openvas-plugins-dfsg-20100320~/audit/REMOVED-PLUGINS 2010-04-09 02:05:01.000000000 +0200 +++ openvas-plugins-dfsg-20100320/audit/REMOVED-PLUGINS 2010-04-09 02:05:07.000000000 +0200 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..24734fe --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,5 @@ +10-openvas-nvt-sync.patch +25-scripts-update.patch +30-include-plugins.patch +40-openvas-nvt-sync.patch +90-audit-improve.patch diff --git a/debian/rules b/debian/rules index 9536277..8f5c41f 100755 --- a/debian/rules +++ b/debian/rules @@ -2,9 +2,6 @@ # Derived from dh_make example. #export DH_VERBOSE=1 -#export DH_COMPAT=5 - -include /usr/share/dpatch/dpatch.make tmp := $(CURDIR)/debian/tmp @@ -15,6 +12,10 @@ else CFLAGS += -O2 endif + +build-arch: build +build-indep: build + build: build-stamp build-stamp: config.status dh_testdir @@ -26,13 +27,12 @@ build-stamp: config.status audit/exclude-list: ( cd audit && test -f exclude-list || sh exclude-plugins >exclude-list ) -config.status: configure patch-stamp +config.status: configure CFLAGS="$(CFLAGS)" ./configure --sysconfdir=/etc --prefix=/usr \ --mandir='$${prefix}/share/man' --localstatedir=/var/run \ --with-fetchcmd=wget --libdir=/var/lib -clean: clean-patched unpatch -clean-patched: patch-stamp +clean: dh_testdir dh_testroot touch openvas.tmpl @@ -40,7 +40,7 @@ clean-patched: patch-stamp [ ! -e plugins/make_world ] || chmod +x plugins/make_world [ ! -f Makefile ] || $(MAKE) distclean -rm -rf audit/exclude-list - dh_clean build-stamp patched + dh_clean build-stamped [ ! -f libtool ] || rm -f libtool [ ! -d bin/ ] || rm -rf bin/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/openvas-nvt-sync b/openvas-nvt-sync deleted file mode 100644 index b9e6704..0000000 --- a/openvas-nvt-sync +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash -# -# OpenVAS -# $Id$ -# Description: Synchronize with with NVT feed. -# This shell script synchronizes the local set of -# OpenVAS Network Vulerability Tests (NVTs) and -# associated includefiles with a given upstream -# feed of updated or new files. -# -# Authors: -# Lukas Grunwald <l.grunw...@dn-systems.de> -# Jan-Oliver Wagner <jan-oliver.wag...@intevation.de> -# -# Copyright DN-Systems Enterprise Internet Solutions GmbH 2007 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2, -# as published by the Free Software Foundation -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -prefix=/usr -exec_prefix=${prefix} -sysconfdir=/etc -libdir=/var/lib -localstatedir=/var/run - -# these locations should be correct if standard ./configure had -# been applied. -NVT_DIR="$libdir/openvas/plugins" - -# The URL of the plugin feed -FEED=rsync://rsync.openvas.org:/nvt-feed -# An alternative syntax which might work if the above doesn't: -#FEED=rs...@rsync.openvas.org::nvt-feed - -findcmd() -{ - CMD=$1 - SRCH=/usr/bin:/usr/ucb:/usr/sbin - SAVEIFS=$IFS - IFS=: - set $SRCH - IFS=$SAVEIFS - for dir - do - [ -x $dir/$CMD ] && { - echo $dir/$CMD - return - } - done -} - -chk_system_tools(){ -echo "Searching for required system tools ..." - -RSYNC=`findcmd rsync` -MD5SUM=`findcmd md5sum` - -if [ -z "$RSYNC" ]; then - echo "Error: RSYNC not found"; - exit -1 -fi - -if [ -z "$MD5SUM" ]; then - echo "Error: MD5SUM not found"; - exit -1 -fi -} - -sync_nvts (){ - echo "Synchonizing NVTs via RSYNC ..." - - mkdir -p "$NVT_DIR" - eval "rsync -ltvrP \"$FEED\" \"$NVT_DIR\"" - if [ $? -ne 0 ] ; then - echo "Error: rsync failed. Your NVT collection might be broken now." - exit 1 - fi - eval "cd \"$NVT_DIR\" ; md5sum -c --status \"$NVT_DIR/md5sums\"" - if [ $? -ne 0 ] ; then - echo "Error: md5sums not correct. Your NVT collection might be broken now." - echo "Please try this for details: cd \"$NVT_DIR\" ; md5sum -c \"$NVT_DIR/md5sums\" | less" - exit 1 - fi - - echo "Synchronization successful." -} - -# TODO: This does only sometimes work (if proper start/stop daemon was used) -# It should be made verbose and robust so that the user will know whether -# openvasd was restarted successfully or whether a failure occured. -restart_openvasd (){ - test -f /var/run/run/openvasd.pid && { - pid=`cat /var/run/run/openvasd.pid` - kill -1 $pid 2>/dev/null - } -} - -echo "OpenVAS NVT Sync $Release$" -echo " " -echo "Configured NVT Feed: $FEED" -echo "Synchronized into: $NVT_DIR" -echo " " - -chk_system_tools -sync_nvts -restart_openvasd -- 1.7.10