From 48af6951c8986edfb9b2a61cf2fc4fa7b6081bf1 Mon Sep 17 00:00:00 2001 From: Oliver Eikemeier Date: Fri, 13 Aug 2004 17:51:46 +0000 Subject: apply xlist not to the own files --- ports-mgmt/portaudit-db/Makefile | 2 +- ports-mgmt/portaudit-db/files/packaudit.sh | 23 ++++++++++++++--------- security/portaudit-db/Makefile | 2 +- security/portaudit-db/files/packaudit.sh | 23 ++++++++++++++--------- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/ports-mgmt/portaudit-db/Makefile b/ports-mgmt/portaudit-db/Makefile index b0bd360ef721..81c625ce651e 100644 --- a/ports-mgmt/portaudit-db/Makefile +++ b/ports-mgmt/portaudit-db/Makefile @@ -6,7 +6,7 @@ # PORTNAME= portaudit-db -PORTVERSION= 0.2.2 +PORTVERSION= 0.2.3 CATEGORIES= security DISTFILES= diff --git a/ports-mgmt/portaudit-db/files/packaudit.sh b/ports-mgmt/portaudit-db/files/packaudit.sh index 2734c4aa008c..4d0e245da6a8 100644 --- a/ports-mgmt/portaudit-db/files/packaudit.sh +++ b/ports-mgmt/portaudit-db/files/packaudit.sh @@ -102,7 +102,17 @@ cd "$TMPDIR" || exit 1 echo "$TESTPORT|$TESTURL|$TESTREASON" echo "# Please refer to the original document for copyright information:" echo "# $VULURL" - $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$VUXMLDIR/vuln.xml" + $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$VUXMLDIR/vuln.xml" \ + | $AWK -F\| -v XLIST_FILE="$XLIST_FILE" ' + BEGIN { + while((getline < XLIST_FILE) > 0) + if(!/^(#|$)/) + ignore[$1]=1 + } + /^(#|$)/ || !($4 in ignore) { + print + } + ' echo "# This part is in the public domain" $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$PORTAUDITDBDIR/database/portaudit.xml" $AWK -F\| ' @@ -118,19 +128,14 @@ cd "$TMPDIR" || exit 1 } ' "$PORTAUDITDBDIR/database/portaudit.txt" } | $AWK -F\| -v XLIST_FILE="$XLIST_FILE" ' - BEGIN { - while((getline < XLIST_FILE) > 0) - if(!/^(#|$)/) - ignore[$1]=1 - } /^(#|$)/ { print next } { - if (!($4 in ignore)) - print $1 "|" $2 "|" $3 - }' > auditfile + print $1 "|" $2 "|" $3 + } +' > auditfile echo "#CHECKSUM: MD5 `$MD5 < auditfile`" >> auditfile $TAR -jcf "$DATABASEDIR/auditfile.tbz" auditfile cd diff --git a/security/portaudit-db/Makefile b/security/portaudit-db/Makefile index b0bd360ef721..81c625ce651e 100644 --- a/security/portaudit-db/Makefile +++ b/security/portaudit-db/Makefile @@ -6,7 +6,7 @@ # PORTNAME= portaudit-db -PORTVERSION= 0.2.2 +PORTVERSION= 0.2.3 CATEGORIES= security DISTFILES= diff --git a/security/portaudit-db/files/packaudit.sh b/security/portaudit-db/files/packaudit.sh index 2734c4aa008c..4d0e245da6a8 100644 --- a/security/portaudit-db/files/packaudit.sh +++ b/security/portaudit-db/files/packaudit.sh @@ -102,7 +102,17 @@ cd "$TMPDIR" || exit 1 echo "$TESTPORT|$TESTURL|$TESTREASON" echo "# Please refer to the original document for copyright information:" echo "# $VULURL" - $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$VUXMLDIR/vuln.xml" + $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$VUXMLDIR/vuln.xml" \ + | $AWK -F\| -v XLIST_FILE="$XLIST_FILE" ' + BEGIN { + while((getline < XLIST_FILE) > 0) + if(!/^(#|$)/) + ignore[$1]=1 + } + /^(#|$)/ || !($4 in ignore) { + print + } + ' echo "# This part is in the public domain" $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$PORTAUDITDBDIR/database/portaudit.xml" $AWK -F\| ' @@ -118,19 +128,14 @@ cd "$TMPDIR" || exit 1 } ' "$PORTAUDITDBDIR/database/portaudit.txt" } | $AWK -F\| -v XLIST_FILE="$XLIST_FILE" ' - BEGIN { - while((getline < XLIST_FILE) > 0) - if(!/^(#|$)/) - ignore[$1]=1 - } /^(#|$)/ { print next } { - if (!($4 in ignore)) - print $1 "|" $2 "|" $3 - }' > auditfile + print $1 "|" $2 "|" $3 + } +' > auditfile echo "#CHECKSUM: MD5 `$MD5 < auditfile`" >> auditfile $TAR -jcf "$DATABASEDIR/auditfile.tbz" auditfile cd -- cgit v1.2.3