diff options
author | Xin LI <delphij@FreeBSD.org> | 2013-12-23 22:26:43 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2013-12-23 22:26:43 +0000 |
commit | 322e0e3478e2feae45d3b4b505110521423cbf26 (patch) | |
tree | 26a4f94841b6eec88ceb17045cf024563e1c6abe /ports-mgmt | |
parent | 0f731ff8676a7f6873b38685a8c310d653bd1c0a (diff) |
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portaudit/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/portaudit/files/portaudit-cmd.sh | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/ports-mgmt/portaudit/Makefile b/ports-mgmt/portaudit/Makefile index 05eacc343253..bbcd220c2ab4 100644 --- a/ports-mgmt/portaudit/Makefile +++ b/ports-mgmt/portaudit/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portaudit -PORTVERSION= 0.6.1 +PORTVERSION= 0.6.2 CATEGORIES= ports-mgmt security DISTFILES= diff --git a/ports-mgmt/portaudit/files/portaudit-cmd.sh b/ports-mgmt/portaudit/files/portaudit-cmd.sh index d99550e8efdb..30a0fbee7563 100644 --- a/ports-mgmt/portaudit/files/portaudit-cmd.sh +++ b/ports-mgmt/portaudit/files/portaudit-cmd.sh @@ -53,6 +53,10 @@ portaudit_confs() : ${portaudit_fixed=""} : ${portaudit_openssl:="/usr/bin/openssl"} + + # check if new pkg tools are in use + : ${pkgng_db:="/var/db/pkg/local.sqlite"} + : ${PKGSTATIC:="%%PREFIX%%/sbin/pkg-static"} } extract_auditfile_raw() @@ -438,6 +442,20 @@ if $opt_version; then echo "portaudit version %%PORTVERSION%%" fi +if [ -e ${pkgng_db} -a -x ${PKGSTATIC} ]; then + IPKGNG=`echo 'SELECT COUNT() FROM packages;' | $PKGSTATIC shell` + if [ ${IPKGNG} -ge 1 ]; then + echo "New pkg tools detected: found ${IPKGNG} installed packages." + echo + echo "The portaudit tool is now obsolete, please remove portaudit and use the" + echo "command 'pkg audit' instead. See man pkg-audit(8) for more information." + echo + echo "Running ${PKGSTATIC} audit -F:" + ${PKGSTATIC} audit -F + exit 1 + fi +fi + if $opt_fetch; then if $opt_quiet ; then portaudit_fetch_cmd="${portaudit_fetch_cmd} -q" |