From owner-svn-ports-all@freebsd.org Wed Apr 6 07:03:45 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D473B065F6; Wed, 6 Apr 2016 07:03:45 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFCBB1BF5; Wed, 6 Apr 2016 07:03:44 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3673hqe031465; Wed, 6 Apr 2016 07:03:43 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3673hTi031460; Wed, 6 Apr 2016 07:03:43 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201604060703.u3673hTi031460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 6 Apr 2016 07:03:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r412605 - in branches/2016Q2/security/openvas-manager: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2016 07:03:45 -0000 Author: tijl Date: Wed Apr 6 07:03:43 2016 New Revision: 412605 URL: https://svnweb.freebsd.org/changeset/ports/412605 Log: MFH: r412585 Port stat(1) calls in several scripts. PR: 208556 Submitted by: kwinkelman@mcclatchy.com Approved by: ports-secteam (junovitch) Added: branches/2016Q2/security/openvas-manager/files/patch-tools+greenbone-certdata-sync.in - copied unchanged from r412585, head/security/openvas-manager/files/patch-tools+greenbone-certdata-sync.in branches/2016Q2/security/openvas-manager/files/patch-tools+greenbone-scapdata-sync.in - copied unchanged from r412585, head/security/openvas-manager/files/patch-tools+greenbone-scapdata-sync.in branches/2016Q2/security/openvas-manager/files/patch-tools+openvas-certdata-sync.in - copied unchanged from r412585, head/security/openvas-manager/files/patch-tools+openvas-certdata-sync.in branches/2016Q2/security/openvas-manager/files/patch-tools+openvas-scapdata-sync.in - copied unchanged from r412585, head/security/openvas-manager/files/patch-tools+openvas-scapdata-sync.in Modified: branches/2016Q2/security/openvas-manager/Makefile Directory Properties: branches/2016Q2/ (props changed) Modified: branches/2016Q2/security/openvas-manager/Makefile ============================================================================== --- branches/2016Q2/security/openvas-manager/Makefile Wed Apr 6 06:14:31 2016 (r412604) +++ branches/2016Q2/security/openvas-manager/Makefile Wed Apr 6 07:03:43 2016 (r412605) @@ -2,7 +2,7 @@ PORTNAME= openvas-manager PORTVERSION= 6.0.8 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= http://wald.intevation.org/frs/download.php/2295/ Copied: branches/2016Q2/security/openvas-manager/files/patch-tools+greenbone-certdata-sync.in (from r412585, head/security/openvas-manager/files/patch-tools+greenbone-certdata-sync.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/security/openvas-manager/files/patch-tools+greenbone-certdata-sync.in Wed Apr 6 07:03:43 2016 (r412605, copy of r412585, head/security/openvas-manager/files/patch-tools+greenbone-certdata-sync.in) @@ -0,0 +1,29 @@ +--- tools/greenbone-certdata-sync.in.orig 2015-12-08 07:09:31 UTC ++++ tools/greenbone-certdata-sync.in +@@ -643,7 +643,7 @@ update_cert_db() { + then + for certfile in `ls $CERT_DIR/CB-K*.xml` + do +- filedate=`stat -c "%Y" $certfile | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" $certfile | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then +@@ -677,7 +677,7 @@ update_cert_db() { + then + for certfile in `ls $CERT_DIR/dfn-cert-*.xml` + do +- filedate=`stat -c "%Y" $certfile | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" $certfile | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then +@@ -886,7 +886,7 @@ then + exit 1 + fi + +-if [ $(id -u) -ne $(stat -c %u $CERT_DB) ] ++if [ $(id -u) -ne $(stat -f %u $CERT_DB) ] + then + log_err "Not synchronizing or updating the database since the current user is not the owner of the database." + echo "Not synchronizing or updating the database since the current user is not the owner of the database." Copied: branches/2016Q2/security/openvas-manager/files/patch-tools+greenbone-scapdata-sync.in (from r412585, head/security/openvas-manager/files/patch-tools+greenbone-scapdata-sync.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/security/openvas-manager/files/patch-tools+greenbone-scapdata-sync.in Wed Apr 6 07:03:43 2016 (r412605, copy of r412585, head/security/openvas-manager/files/patch-tools+greenbone-scapdata-sync.in) @@ -0,0 +1,60 @@ +--- tools/greenbone-scapdata-sync.in.orig 2015-12-08 07:09:31 UTC ++++ tools/greenbone-scapdata-sync.in +@@ -962,7 +962,7 @@ update_scap_db_private () { + then + for ovalfile in $oval_files_sorted_private + do +- filedate=`stat -c "%Y" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] || [ 1 = "$REBUILD_OVAL" ] + then +@@ -1090,12 +1090,12 @@ update_scap_db() { + CPEBASE="$SCAP_DIR/official-cpe-dictionary_v2.2.xml" + if [ -e $CPEBASE ] + then +- filedate=`stat -c "%Y" "$CPEBASE" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$CPEBASE" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then + log_info "Updating CPEs" +- filesize=`stat -c "%s" "$CPEBASE"` ++ filesize=`stat -f "%z" "$CPEBASE"` + if [ "0" -ne "$SPLIT_PART_SIZE" ] && [ "$filesize" -gt $(($SPLIT_PART_SIZE * 1024)) ] + then + log_info "File is larger than ${SPLIT_PART_SIZE}k. Splitting into multiple parts" +@@ -1152,13 +1152,13 @@ update_scap_db() { + then + for cvefile in `ls $SCAP_DIR/nvdcve-2.0-*.xml` + do +- filedate=`stat -c "%Y" "$cvefile" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$cvefile" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then + log_info "Updating $cvefile" + +- filesize=`stat -c "%s" "$cvefile"` ++ filesize=`stat -f "%z" "$cvefile"` + if [ "0" -ne "$SPLIT_PART_SIZE" ] && [ "$filesize" -gt $(($SPLIT_PART_SIZE * 1024)) ] + then + log_info "File is larger than ${SPLIT_PART_SIZE}k. Splitting into multiple parts" +@@ -1228,7 +1228,7 @@ update_scap_db() { + + for ovalfile in $oval_files_sorted + do +- filedate=`stat -c "%Y" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] || [ 1 = "$REBUILD_OVAL" ] + then +@@ -1469,7 +1469,7 @@ then + exit 1 + fi + +-if [ $(id -u) -ne $(stat -c %u $SCAP_DB) ] ++if [ $(id -u) -ne $(stat -f %u $SCAP_DB) ] + then + log_err "Not synchronizing or updating the database since the current user is not the owner of the database." + echo "Not synchronizing or updating the database since the current user is not the owner of the database." Copied: branches/2016Q2/security/openvas-manager/files/patch-tools+openvas-certdata-sync.in (from r412585, head/security/openvas-manager/files/patch-tools+openvas-certdata-sync.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/security/openvas-manager/files/patch-tools+openvas-certdata-sync.in Wed Apr 6 07:03:43 2016 (r412605, copy of r412585, head/security/openvas-manager/files/patch-tools+openvas-certdata-sync.in) @@ -0,0 +1,20 @@ +--- tools/openvas-certdata-sync.in.orig 2015-08-03 05:52:10 UTC ++++ tools/openvas-certdata-sync.in +@@ -575,7 +575,7 @@ update_sec_db () { + then + for certfile in `ls $CERT_DIR/CB-K*.xml` + do +- filedate=`stat -c "%Y" $certfile | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" $certfile | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then +@@ -610,7 +610,7 @@ update_sec_db () { + then + for certfile in `ls $CERT_DIR/dfn-cert-*.xml` + do +- filedate=`stat -c "%Y" $certfile | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" $certfile | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then Copied: branches/2016Q2/security/openvas-manager/files/patch-tools+openvas-scapdata-sync.in (from r412585, head/security/openvas-manager/files/patch-tools+openvas-scapdata-sync.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/security/openvas-manager/files/patch-tools+openvas-scapdata-sync.in Wed Apr 6 07:03:43 2016 (r412605, copy of r412585, head/security/openvas-manager/files/patch-tools+openvas-scapdata-sync.in) @@ -0,0 +1,52 @@ +--- tools/openvas-scapdata-sync.in.orig 2015-08-03 05:52:10 UTC ++++ tools/openvas-scapdata-sync.in +@@ -885,7 +885,7 @@ update_sec_db_private () { + then + for ovalfile in $oval_files_sorted_private + do +- filedate=`stat -c "%Y" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] || [ 1 = "$REBUILD_OVAL" ] + then +@@ -1012,13 +1012,13 @@ update_sec_db () { + CPEBASE="$SCAP_DIR/official-cpe-dictionary_v2.2.xml" + if [ -e $CPEBASE ] + then +- filedate=`stat -c "%Y" "$CPEBASE" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$CPEBASE" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then + echo "[i] Updating CPEs" + +- filesize=`stat -c "%s" "$CPEBASE"` ++ filesize=`stat -f "%z" "$CPEBASE"` + if [ "0" -ne "$SPLIT_PART_SIZE" ] && [ "$filesize" -gt $(($SPLIT_PART_SIZE * 1024)) ] + then + echo "[i] File is larger than ${SPLIT_PART_SIZE}k. Splitting into multiple parts" +@@ -1075,13 +1075,13 @@ update_sec_db () { + then + for cvefile in `ls $SCAP_DIR/nvdcve-2.0-*.xml` + do +- filedate=`stat -c "%Y" "$cvefile" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$cvefile" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] + then + echo "[i] Updating $cvefile" + +- filesize=`stat -c "%s" "$cvefile"` ++ filesize=`stat -f "%z" "$cvefile"` + if [ "0" -ne "$SPLIT_PART_SIZE" ] && [ "$filesize" -gt $(($SPLIT_PART_SIZE * 1024)) ] + then + echo "[i] File is larger than ${SPLIT_PART_SIZE}k. Splitting into multiple parts" +@@ -1151,7 +1151,7 @@ update_sec_db () { + + for ovalfile in $oval_files_sorted + do +- filedate=`stat -c "%Y" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` ++ filedate=`stat -f "%m" "$ovalfile" | cut -d " " -f 1 | tr -d "-"` + filedate=$(( $filedate - ( $filedate % 60 ) )) + if [ $filedate -gt $DB_LASTUPDATE ] || [ 1 = "$REBUILD_OVAL" ] + then