git: 069e58611c79 - main - security/vuxml: Fix make test
Po-Chuan Hsieh
sunpoet at FreeBSD.org
Wed Jul 14 16:19:40 UTC 2021
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=069e58611c7933431ec82b0b9c119677e8d6cc21
commit 069e58611c7933431ec82b0b9c119677e8d6cc21
Author: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-07-14 16:03:56 +0000
Commit: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-07-14 16:10:51 +0000
security/vuxml: Fix make test
- Respect VUXML_FILE and VUXML_FLAT_FILE [1]
It allows run "make test" on read-only media (e.g. poudriere jail)
- Copy all vuln XML file to the test directory [2]
Since vuln.xml has been split into multiple XML files, all of them must be copied to the test directory.
Without [1], the error message is as follows:
===> Testing for vuxml-1.1_5
xmllint -noent vuln.xml > vuln-flat.xml
/bin/sh: cannot create vuln-flat.xml: Read-only file system
*** Error code 2
Stop.
Without [2], the error message is as follows:
===> Testing for vuxml-1.1_5
xmllint -noent /wrkdirs/usr/ports/security/vuxml/work/test/vuln.xml > /wrkdirs/usr/ports/security/vuxml/work/test/vuln-flat.xml
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2021.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2020.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2019.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2018.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2017.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2016.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2015.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2014.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2013.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2012.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2011.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2010.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2009.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2008.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2007.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2006.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2005.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2004.xml"
warning: failed to load external entity "/wrkdirs/usr/ports/security/vuxml/work/test/vuln-2003.xml"
...
*** Error code 1
Stop.
Approved by: delphij (ports-secteam)
---
security/vuxml/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/security/vuxml/Makefile b/security/vuxml/Makefile
index 4732225cf974..10657336a971 100644
--- a/security/vuxml/Makefile
+++ b/security/vuxml/Makefile
@@ -53,10 +53,10 @@ do-install:
do-test:
@${MKDIR} ${WRKDIR}/test
- @${CP} ${.CURDIR}/vuln.xml ${WRKDIR}/test
+ @${CP} ${.CURDIR}/vuln*.xml ${WRKDIR}/test
@cd ${.CURDIR} && make validate PKGDIR=${WRKDIR}/test
-vuln-flat.xml: vuln.xml vuln-20??.xml
+${VUXML_FLAT_FILE}: ${VUXML_FILE} vuln-20??.xml
xmllint -noent ${.ALLSRC:[1]} > ${.TARGET}
validate: tidy
@@ -82,7 +82,7 @@ validate: tidy
fi
${PYTHON_CMD} ${FILESDIR}/extra-validation.py ${VUXML_FLAT_FILE}
-tidy: vuln-flat.xml
+tidy: ${VUXML_FLAT_FILE}
@if [ ! -e ${LOCALBASE}/share/xml/dtd/vuxml/catalog.xml ]; \
then \
echo "Please install the VuXML port prior to running make validate/tidy."; \
More information about the dev-commits-ports-all
mailing list