From f8045772bd4e555a486fc9f440c80c9fad006fb7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Feb 2012 17:01:49 +0100 Subject: [PATCH] man: document CPE field in os-release file --- man/os-release.xml | 82 +++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/man/os-release.xml b/man/os-release.xml index f503b231..7f7ce142 100644 --- a/man/os-release.xml +++ b/man/os-release.xml @@ -85,10 +85,10 @@ A string identifying the operating system, without a - version string, and not necessarily - suitable for presentation to the - user. If not set defaults to - Linux. Example: + version component, and suitable for + presentation to the user. If not set + defaults to + NAME=Linux. Example: NAME=Fedora or NAME="Debian GNU/Linux". @@ -99,25 +99,26 @@ A string identifying the operating system version, - excluding any name information and + excluding any OS name information, and suitable for presentation to the - user. Example: - VERSION=15 or - VERSION="15 - (Rawhide)". + user. This field is optional. Example: + VERSION=17 or + VERSION="17 + (Beefy Miracle)". ID= A lower-case string - (no spaces) identifying the operating - system, excluding any version - information and suitable for + (no spaces or other characters outside of + 0-9, a-z, ".", "_" and "-") identifying + the operating system, excluding any + version information and suitable for processing by scripts or usage in generated file names. If not set defaults to - linux. Example: + ID=linux. Example: ID=fedora. @@ -125,11 +126,16 @@ VERSION_ID= A lower-case string - (mostly numeric, no spaces) identifying the - operating system version, excluding - any name information and suitable for - processing by scripts or usage in generated file names. Example: - VERSION_ID=15. + (mostly numeric, no spaces or other + characters outside of 0-9, a-z, ".", + "_" and "-") identifying the operating + system version, excluding any OS name + information or release code names, and + suitable for processing by scripts or + usage in generated file names. This + field is optional. Example: + VERSION_ID=17 or + VERSION_ID=11.04. @@ -140,9 +146,9 @@ presentation to the user. May or may not contain an OS version of some kind, as suitable. If not set defaults - to Linux. Example: - PRETTY_NAME="Fedora 15 - (Rawhide)". + to PRETTY_NAME="Linux". Example: + PRETTY_NAME="Fedora 17 + (Beefy Miracle)". @@ -154,15 +160,30 @@ should be specified as string suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code for setting - graphical rendition. Example: - ANSI_COLOR="0;31" for - red, or - ANSI_COLOR="1;34" for - light blue. + graphical rendition. This field is + optional. Example: + ANSI_COLOR="0;31" + for red, or + ANSI_COLOR="1;34" + for light blue. + + + + CPE_NAME= + + A CPE name for the + operating system, following the Common + Platform Enumeration + Specification as proposed by + the MITRE Corporation. This field + is optional. Example: + CPE_NAME="cpe:/o:fedoraproject:fedora:17" + - If you are reading this file from code or a + If you are reading this file from C code or a shell script to determine the OS or a specific version of it, use the ID and VERSION_ID fields. When looking for an OS identification string for presentation to @@ -179,11 +200,12 @@ Example NAME=Fedora -VERSION="15 (Rawhide)" +VERSION="17 (Beefy Miracle)" ID=fedora VERSION_ID=15 -PRETTY_NAME="Fedora 15 (Rawhide)" -ANSI_COLOR="0;34" +PRETTY_NAME="Fedora 17 (Beefy Miracle)" +ANSI_COLOR="0;34" +CPE_NAME="cpe:/o:fedoraproject:fedora:17" -- 2.39.5