Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jul 2014 13:57:13 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362972 - head/Mk/Uses
Message-ID:  <201407261357.s6QDvDKN033742@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/:+$//}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407261357.s6QDvDKN033742>