1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

Packaudit: switch to Subversion

- use links to Subversion tree, HTTPS-flavored ones;

 - extract revision using Subversion format of $FreeBSD$;

 - refuse to work with vuln.xml that comes from CVS:
   automated exporter is switched off, so this source of
   vulnerabilities is stale.

Reviewed by:	simon, bz (partly), gavin
Approved by:	portmgr (tabthorpe), so (des), secteam (simon)
This commit is contained in:
Eygene Ryabinkin 2013-04-09 17:36:29 +00:00
parent d846db1c94
commit 8f2ef95e34
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=315772
2 changed files with 23 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= portaudit-db
PORTVERSION= 0.2.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= ports-mgmt
DISTFILES=

View File

@ -67,8 +67,27 @@ fi
TMPNAME=`$BASENAME "$0"`
VULVER=`$SED -En -e '/^.*\\$FreeBSD\: [^$ ]+,v ([0-9]+(\.[0-9]+)+) [^$]+\\$.*$/{s//\1/p;q;}' "$VUXMLDIR/vuln.xml"`
VULURL="http://cvsweb.freebsd.org/ports/security/vuxml/vuln.xml?rev=$VULVER"
# Is CVS still used for generation of VuXML entries? That's bad.
ISCVS=`$SED -En -e '/^.*\\$FreeBSD\: [^$ ]+\/vuln.xml,v ([0-9]+(\.[0-9]+)+) [^$]+\\$.*$/{s//\1/p;q;}' "$VUXMLDIR/vuln.xml"`
if [ -n "$ISCVS" ]; then
cat << EOF
File $VUXMLDIR/vuln.xml seem to come from CVS.
CVS for FreeBSD ports is no longer synced with Subversion, so you will
get outdated vulnerability list. Please, check out your sources from
Subversion, refer to
http://www.freebsd.org/doc/handbook/svn.html
for the up to date instructions on how to actually do that.
EOF
exit 1
fi
VULPATH=`$SED -En -e '/^.*\\$FreeBSD\: ([^$ ]+\/vuln.xml) ([0-9]+) [^$]+\\$/{s//\1?revision=\2/p;q;}' "$VUXMLDIR/vuln.xml"`
if [ -z "$VULPATH" ]; then
echo "Can't determine origin and version of vuln.xml from $VUXMLDIR/vuln.xml"
exit 1
fi
VULURL="https://svnweb.freebsd.org/ports/$VULPATH"
[ -r "%%PREFIX%%/etc/packaudit.conf" ] && . "%%PREFIX%%/etc/packaudit.conf"
@ -90,7 +109,7 @@ fi
TMPDIR=`$MKTEMP -d -t "$TMPNAME.$$"` || exit 1
TESTPORT="vulnerability-test-port>=2000<`$DATE -u +%Y.%m.%d`"
TESTURL="http://cvsweb.freebsd.org/ports/security/vulnerability-test-port/"
TESTURL="https://svnweb.freebsd.org/ports/head/ports-mgmt/vulnerability-test-port/"
TESTREASON="Not vulnerable, just a test port (database: `$DATE -u +%Y-%m-%d`)"
XLIST_FILE="$PORTAUDITDBDIR/database/portaudit.xlist"