From owner-svn-ports-all@FreeBSD.ORG Sat Jul 26 13:57:13 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61CCBA3C; Sat, 26 Jul 2014 13:57:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 352F82E40; Sat, 26 Jul 2014 13:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6QDvD66033743; Sat, 26 Jul 2014 13:57:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6QDvDKN033742; Sat, 26 Jul 2014 13:57:13 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201407261357.s6QDvDKN033742@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 26 Jul 2014 13:57:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r362972 - head/Mk/Uses X-SVN-Group: ports-head 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.18 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: Sat, 26 Jul 2014 13:57:13 -0000 Author: des Date: Sat Jul 26 13:57:12 2014 New Revision: 362972 URL: http://svnweb.freebsd.org/changeset/ports/362972 QAT: https://qat.redports.org/buildarchive/r362972/ Log: Upate the target_sw field to use ${OPSYS} instead of hardcoding "freebsd" and include the major version. Set target_hw to x86 for i386, x64 for amd64, and ${ARCH} on all other platforms. Update the comments to match reality. Modified: head/Mk/Uses/cpe.mk Modified: head/Mk/Uses/cpe.mk ============================================================================== --- head/Mk/Uses/cpe.mk Sat Jul 26 13:42:44 2014 (r362971) +++ head/Mk/Uses/cpe.mk Sat Jul 26 13:57:12 2014 (r362972) @@ -1,33 +1,20 @@ # $FreeBSD$ # -# Include CPE URI in package manifest. +# Include CPE information in package manifest as a CPE 2.3 formatted +# string. See http://scap.nist.gov/specifications/cpe/ for details. # -# http://scap.nist.gov/specifications/cpe/ -# -# The URI is constructed as follows: -# -# cpe:/part:vendor:product:version:update:edition:lang -# -# Trailing colons are ommitted. -# -# CPE_PART Defaults to (and should always be) "a" for "application" -# CPE_VENDOR Defaults to same as ${CPE_PRODUCT} (below) -# CPE_PRODUCT Defaults to ${PORTNAME} -# CPE_VERSION Defaults to ${PORTVERSION} -# CPE_UPDATE Defaults to empty -# CPE_EDITION Defaults to ~~~freebsd~~, see below -# CPE_LANG Defaults to empty -# -# Originally, EDITION was an arbitrary string. In later revisions of -# the CPE specification, it is composed of five tilde-separated fields -# with a leading tilde to distinguish the new syntax from the old. -# The five fields are: -# -# CPE_LEGACY_EDITION Defaults to empty -# CPE_SW_EDITION Defaults to empty -# CPE_TARGET_SW Defaults to "freebsd" -# CPE_TARGET_HW Defaults to empty (subject to future change) -# CPE_OTHER Defaults to empty +# CPE_PART Defaults to "a" for "application". +# CPE_VENDOR Defaults to same as ${CPE_PRODUCT} (below). +# CPE_PRODUCT Defaults to ${PORTNAME}. +# CPE_VERSION Defaults to ${PORTVERSION}. +# CPE_UPDATE Defaults to empty. +# CPE_EDITION Defaults to empty. +# CPE_LANG Defaults to empty. +# CPE_SW_EDITION Defaults to empty. +# CPE_TARGET_SW Defaults to the operating system name and version +# CPE_TARGET_HW Defaults to x86 for i386, x64 for amd64, and +# otherwise ${ARCH}. +# CPE_OTHER Defaults to ${PORTREVISION} if non-zero. # # MAINTAINER: ports-secteam@freebsd.org @@ -42,8 +29,8 @@ CPE_UPDATE ?= CPE_EDITION ?= CPE_LANG ?= CPE_SW_EDITION ?= -CPE_TARGET_SW ?= freebsd -CPE_TARGET_HW ?= +CPE_TARGET_SW ?= ${OPSYS:tl}${OSREL:C/\..*//} +CPE_TARGET_HW ?= ${ARCH:S/i386/x86/:S/amd64/x64/} CPE_OTHER ?= ${PORTREVISION:N0} _CPE_STR = cpe:2.3:${CPE_PART}:${CPE_VENDOR}:${CPE_PRODUCT}:${CPE_VERSION}:${CPE_UPDATE}:${CPE_EDITION}:${CPE_LANG}:${CPE_SW_EDITION}:${CPE_TARGET_SW}:${CPE_TARGET_HW}:${CPE_OTHER} CPE_STR ?= ${_CPE_STR:C/:+$//}