15.9. cpe

Possible arguments: (none)

Include Common Platform Enumeration (CPE) information in package manifest as a CPE 2.3 formatted string. See the CPE specification for details. To add CPE information to a port, follow these steps:

  1. Search for the official CPE para for the software product either by using the NVD's CPE search engine or in the official CPE dictionary (warning, very large XML file). Do not ever make up CPE data.

  2. Add cpe to USES and compare the result of make -V CPE_STR to the CPE dictionary para. Continue one step at a time until make -V CPE_STR is correct.

  3. If the product name (second field, defaults to PORTNAME) is incorrect, define CPE_PRODUCT.

  4. If the vendor name (first field, defaults to CPE_PRODUCT) is incorrect, define CPE_VENDOR.

  5. If the version field (third field, defaults to PORTVERSION) is incorrect, define CPE_VERSION.

  6. If the update field (fourth field, defaults to empty) is incorrect, define CPE_UPDATE.

  7. If it is still not correct, check Mk/Uses/cpe.mk for additional details, or contact the Ports Security Team .

  8. Derive as much as possible of the CPE name from existing variables such as PORTNAME and PORTVERSION. Use variable modifiers to extract the relevant portions from these variables rather than hardcoding the name.

  9. Always run make -V CPE_STR and check the output before committing anything that changes PORTNAME or PORTVERSION or any other variable which is used to derive CPE_STR.

本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。

關於本文件的問題,請洽詢 <doc@FreeBSD.org>。