diff options
author | Stefan Eßer <se@FreeBSD.org> | 2017-10-17 13:38:34 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2017-10-17 13:38:34 +0000 |
commit | f9a7f8f7720506bd7b8bd6b1bca9a69a802485e6 (patch) | |
tree | c02eca6d58ef4953aa6a4e74a4797f2e908473b1 /security/cvechecker | |
parent | 2671dbff4c61fa274d86334442e5a2f162de6398 (diff) |
Notes
Diffstat (limited to 'security/cvechecker')
-rw-r--r-- | security/cvechecker/Makefile | 1 | ||||
-rw-r--r-- | security/cvechecker/files/patch-scripts_pullcves | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/security/cvechecker/Makefile b/security/cvechecker/Makefile index 4d5bffd86308..9099bf1b1e8f 100644 --- a/security/cvechecker/Makefile +++ b/security/cvechecker/Makefile @@ -4,6 +4,7 @@ PORTNAME= cvechecker DISTVERSIONPREFIX= v DISTVERSION= 3.8 +PORTREVISION= 1 CATEGORIES= security MAINTAINER= se@FreeBSD.org diff --git a/security/cvechecker/files/patch-scripts_pullcves b/security/cvechecker/files/patch-scripts_pullcves new file mode 100644 index 000000000000..5d867092766d --- /dev/null +++ b/security/cvechecker/files/patch-scripts_pullcves @@ -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 |