ports/124499: [MAINTAINER] security/openvas-plugins: remove bashism, fix plist, etc

Tomoyuki Sakurai cherry at trombik.org
Thu Jun 12 02:30:04 UTC 2008


>Number:         124499
>Category:       ports
>Synopsis:       [MAINTAINER] security/openvas-plugins: remove bashism, fix plist, etc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 12 02:30:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Tomoyuki Sakurai
>Release:        FreeBSD 7.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD spica.trombik.org 7.0-STABLE FreeBSD 7.0-STABLE #1: Wed Jun 11 03:25:50 JST 2008
>Description:
- replace bash with sh
- POSIX and en_US.US-ASCII are symlink created by bsd.port.mk, not by the port
- use dirrmtry for lib/openvas/plugins
  plugins directory may contains additional files by openvas-nvt-sync
- use "g-prefixed" version of coreutils in openvas-nvt-sync
- add RUN_DEPENDS required by openvas-nvt-sync
- bump PORTVERSION

Reported by: lx

Added file(s):
- files/patch-openvas-nvt-sync.in

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- openvas-plugins-1.0.0_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/security/openvas-plugins/Makefile /usr/home/cherry/svk/ports/security/openvas-plugins/Makefile
--- /usr/ports/security/openvas-plugins/Makefile	2008-06-08 22:20:15.000000000 +0900
+++ /usr/home/cherry/svk/ports/security/openvas-plugins/Makefile	2008-06-12 11:13:03.000000000 +0900
@@ -7,7 +7,7 @@
 
 PORTNAME=	openvas-plugins
 PORTVERSION=	1.0.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	http://wald.intevation.org/frs/download.php/412/
 
@@ -19,7 +19,9 @@
 LIB_DEPENDS=	openvas.1:${PORTSDIR}/security/openvas-libraries \
 		openvasnasl.1:${PORTSDIR}/security/openvas-libnasl \
 		gnutls.26:${PORTSDIR}/security/gnutls
-RUN_DEPENDS=	openvasd:${PORTSDIR}/security/openvas-server
+RUN_DEPENDS=	openvasd:${PORTSDIR}/security/openvas-server \
+	${LOCALBASE}/bin/gmd5sum:${PORTSDIR}/sysutils/coreutils \
+	${LOCALBASE}/bin/rsync:${PORTSDIR}/net/rsync
 
 GNU_CONFIGURE=	yes
 LIBNET_CONFIG?=	${LOCALBASE}/bin/libnet11-config
diff -ruN --exclude=CVS /usr/ports/security/openvas-plugins/files/patch-openvas-nvt-sync.in /usr/home/cherry/svk/ports/security/openvas-plugins/files/patch-openvas-nvt-sync.in
--- /usr/ports/security/openvas-plugins/files/patch-openvas-nvt-sync.in	1970-01-01 09:00:00.000000000 +0900
+++ /usr/home/cherry/svk/ports/security/openvas-plugins/files/patch-openvas-nvt-sync.in	2008-06-12 11:13:03.000000000 +0900
@@ -0,0 +1,54 @@
+--- openvas-nvt-sync.in.orig	2008-01-17 20:48:45.000000000 +0900
++++ openvas-nvt-sync.in	2008-06-12 11:04:05.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # OpenVAS
+ # $Id$
+@@ -60,16 +60,20 @@
+ chk_system_tools(){
+ echo "Searching for required system tools ..."
+ 
+-RSYNC=`findcmd rsync`
+-MD5SUM=`findcmd md5sum`
++RSYNC=`which rsync`
++if [ `uname -s` = "FreeBSD" ]; then
++    MD5SUM=`which gmd5sum`
++else
++    MD5SUM=`which md5sum`
++fi
+ 
+-if [ -z "$RSYNC" ]; then
+-  echo "Error: RSYNC not found";
++if [ ! -f "$RSYNC" ]; then
++  echo "Error: rsync not found in \$PATH=$PATH" 1>&2
+   exit -1
+ fi
+ 
+-if [ -z "$MD5SUM" ]; then
+-  echo "Error: MD5SUM not found";
++if [ ! -f "$MD5SUM" ]; then
++  echo "Error: md5 not found in \$PATH=$PATH" 1>&2
+   exit -1
+ fi
+ }
+@@ -78,14 +82,14 @@
+   echo "Synchonizing NVTs via RSYNC ..."
+ 
+   mkdir -p \"$NVT_DIR\"
+-  eval "rsync -avrP \"$FEED\" \"$NVT_DIR\""
++  eval "$RSYNC -avrP \"$FEED\" \"$NVT_DIR\""
+   if [ $? -ne 0 ] ; then
+-    echo "Error: rsync failed. Your NVT collection might be broken now."
++    echo "Error: rsync failed. Your NVT collection might be broken now." 1>&2
+     exit 1
+   fi
+-  eval "cd \"$NVT_DIR\" ; md5sum -c \"$NVT_DIR/md5sums\""
++  eval "cd \"$NVT_DIR\" ; $MD5SUM -c \"$NVT_DIR/md5sums\""
+   if [ $? -ne 0 ] ; then
+-    echo "Error: md5sums not correct. Your NVT collection might be broken now."
++    echo "Error: md5sums not correct. Your NVT collection might be broken now." 1>&2
+     exit 1
+   fi
+ 
diff -ruN --exclude=CVS /usr/ports/security/openvas-plugins/pkg-plist /usr/home/cherry/svk/ports/security/openvas-plugins/pkg-plist
--- /usr/ports/security/openvas-plugins/pkg-plist	2008-06-04 22:17:20.000000000 +0900
+++ /usr/home/cherry/svk/ports/security/openvas-plugins/pkg-plist	2008-06-12 11:13:03.000000000 +0900
@@ -1,8 +1,6 @@
 @comment $FreeBSD: ports/security/openvas-plugins/pkg-plist,v 1.1 2008/06/04 13:17:20 edwin Exp $
 bin/openvas-build
 sbin/openvas-nvt-sync
-share/nls/POSIX
-share/nls/en_US.US-ASCII
 
 lib/openvas/plugins/12planet_chat_server_xss.nasl
 lib/openvas/plugins/3com_hub.nes
@@ -3520,5 +3518,5 @@
 lib/openvas/plugins_factory/openvas.tmpl
 
 @dirrm lib/openvas/plugins_factory
- at dirrm lib/openvas/plugins
- at dirrm lib/openvas
+ at dirrmtry lib/openvas/plugins
+ at dirrmtry lib/openvas
--- openvas-plugins-1.0.0_2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list