Summary: | [patch] ports-mgmt/portaudit complain if pkg-ng is in use | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Olli Hauer <ohauer> | ||||
Component: | Individual Port(s) | Assignee: | Ports Security Team <ports-secteam> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Olli Hauer
2013-12-23 21:50:00 UTC
Responsible Changed From-To: freebsd-ports-bugs->ports-secteam Over to maintainer (via the GNATS Auto Assign Tool) Author: delphij Date: Mon Dec 23 22:26:43 2013 New Revision: 337303 URL: http://svnweb.freebsd.org/changeset/ports/337303 Log: Detect pkgNG. When pkgNG is present and there is packages managed by pkgNG, give user a warning and run pkg audit -F instead. PR: ports/185147 Submitted by: ohauer Modified: head/ports-mgmt/portaudit/Makefile head/ports-mgmt/portaudit/files/portaudit-cmd.sh Modified: head/ports-mgmt/portaudit/Makefile ============================================================================== --- head/ports-mgmt/portaudit/Makefile Mon Dec 23 22:04:06 2013 (r337302) +++ head/ports-mgmt/portaudit/Makefile Mon Dec 23 22:26:43 2013 (r337303) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portaudit -PORTVERSION= 0.6.1 +PORTVERSION= 0.6.2 CATEGORIES= ports-mgmt security DISTFILES= Modified: head/ports-mgmt/portaudit/files/portaudit-cmd.sh ============================================================================== --- head/ports-mgmt/portaudit/files/portaudit-cmd.sh Mon Dec 23 22:04:06 2013 (r337302) +++ head/ports-mgmt/portaudit/files/portaudit-cmd.sh Mon Dec 23 22:26:43 2013 (r337303) @@ -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" _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Committed, thanks! |