Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 2017 13:38:34 +0000 (UTC)
From:      Stefan Esser <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r452276 - in head/security/cvechecker: . files
Message-ID:  <201710171338.v9HDcYAj052309@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Tue Oct 17 13:38:34 2017
New Revision: 452276
URL: https://svnweb.freebsd.org/changeset/ports/452276

Log:
  Use "fetch" instead of "wget" to download CVE information.
  
  Reported by:	Lars Engels (lars.engels at 0x20.net)

Added:
  head/security/cvechecker/files/patch-scripts_pullcves   (contents, props changed)
Modified:
  head/security/cvechecker/Makefile

Modified: head/security/cvechecker/Makefile
==============================================================================
--- head/security/cvechecker/Makefile	Tue Oct 17 13:09:18 2017	(r452275)
+++ head/security/cvechecker/Makefile	Tue Oct 17 13:38:34 2017	(r452276)
@@ -4,6 +4,7 @@
 PORTNAME=	cvechecker
 DISTVERSIONPREFIX=	v
 DISTVERSION=	3.8
+PORTREVISION=	1
 CATEGORIES=	security
 
 MAINTAINER=	se@FreeBSD.org

Added: head/security/cvechecker/files/patch-scripts_pullcves
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/cvechecker/files/patch-scripts_pullcves	Tue Oct 17 13:38:34 2017	(r452276)
@@ -0,0 +1,48 @@
+--- scripts/pullcves.orig	2017-03-27 16:42:38 UTC
++++ scripts/pullcves
+@@ -44,17 +44,11 @@ then
+   exit 1;
+ fi
+ 
+-wget -V > /dev/null 2>&1;
+-if [ $? -ne 0 ];
+-then
+-  echo "This script requires wget to be available on the system and reachable in a directory mentioned in the PATH variable."
+-  exit 1;
+-fi
+ 
+ DATADIR=$(awk -F'=' '/^datadir/ {print $2}' ${CONFFILE} | awk -F'"' '{print $2}');
+ CVECACHE=$(awk -F'=' '/^cvecache/ {print $2}' ${CONFFILE} | awk -F'"' '{print $2}');
+ DLLOCATION=$(awk -F'=' '/^version_url/ {print $2}' ${CONFFILE} | awk -F'"' '{print $2}');
+-WGETCMD="wget --no-check-certificate";
++FETCHCMD="fetch -q"
+ DLCVE=0;
+ DLDAT=0;
+ COMMAND=$1;
+@@ -68,7 +69,7 @@ do
+   if [ ! -f ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml ];
+   then
+     printf "Downloading nvdcve-2.0-20${YEAR}.xml... ";
+-    ${WGETCMD} -q -O ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-20${YEAR}.xml.gz;
++    ${FETCHCMD} -o ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-20${YEAR}.xml.gz;
+     gunzip -c ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz > ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml && rm ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz;
+     printf "ok\nConverting nvdcve-2.0-20${YEAR}.xml to CSV... ";
+     xsltproc ${DATADIR}/nvdcve2simple.xsl ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml > ${CVECACHE}/nvdcve-2.0-20${YEAR}.csv;
+@@ -85,7 +86,7 @@ else
+   CKSUM=$(cksum nvdcve-2.0-Modified.xml 2>/dev/null);
+ fi
+ printf "Downloading nvdcve-2.0-Modified.xml... ";
+-${WGETCMD} -q -N http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-Modified.xml.gz;
++${FETCHCMD} -i nvdcve-2.0-Modified.xml http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-Modified.xml.gz;
+ gunzip -c nvdcve-2.0-Modified.xml.gz > nvdcve-2.0-Modified.xml && rm nvdcve-2.0-Modified.xml.gz;
+ CKSUM2=$(cksum nvdcve-2.0-Modified.xml 2>/dev/null);
+ if [ "${CKSUM2}" != "${CKSUM}" ] || [ -f nvdcve-2.0-Modified.xml.1 ];
+@@ -113,7 +114,7 @@ fi
+ 
+ CKSUM=$(cksum versions.dat 2>/dev/null);
+ printf "Downloading versions.dat... ";
+-${WGETCMD} -q -N ${DLLOCATION};
++${FETCHCMD} -i versions.dat ${DLLOCATION};
+ CKSUM2=$(cksum versions.dat 2>/dev/null);
+ if [ "${CKSUM}" != "${CKSUM2}" ] || [ -f versions.dat.1 ];
+ then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710171338.v9HDcYAj052309>