From 4f90b052e5a643884ae2d78d99940b818605752f Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 6 May 2021 03:05:02 +0200 Subject: [PATCH 1/2] docs/COREDUMP_PACKAGE_METADATA.md: Add debuginfod key Signed-off-by: Mark Wielaard --- docs/COREDUMP_PACKAGE_METADATA.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/COREDUMP_PACKAGE_METADATA.md b/docs/COREDUMP_PACKAGE_METADATA.md index ab7c4596de1..6ef746f2465 100644 --- a/docs/COREDUMP_PACKAGE_METADATA.md +++ b/docs/COREDUMP_PACKAGE_METADATA.md @@ -39,6 +39,9 @@ Implementers working on build tools should strive to use the same key names, for consistency. The most common will be listed here. When corresponding to the content of os-release, the values should match, again for consistency. +If available, the metadata should also include the debuginfod server URL that can provide +the original executable, debuginfo and sources, to further facilitate debugging. + * Section header ``` @@ -58,6 +61,7 @@ Value: a JSON string with the structure described below "name":"coreutils", "version": "4711.0815.fc13.arm32", "osCpe": # A CPE name for the operating system, `CPE_NAME` from os-release is a good default + "debugInfoUrl": "https://debuginfod.fedoraproject.org/", } ``` From 201962ef46f717d612512a2f5c1414f6d82b8869 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 6 May 2021 14:38:47 +0100 Subject: [PATCH 2/2] docs/COREDUMP_PACKAGE_METADATA.md: add table with well-known keys and their definition --- docs/COREDUMP_PACKAGE_METADATA.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/COREDUMP_PACKAGE_METADATA.md b/docs/COREDUMP_PACKAGE_METADATA.md index 6ef746f2465..f27f835064d 100644 --- a/docs/COREDUMP_PACKAGE_METADATA.md +++ b/docs/COREDUMP_PACKAGE_METADATA.md @@ -60,8 +60,8 @@ Value: a JSON string with the structure described below "osVersion":"33", "name":"coreutils", "version": "4711.0815.fc13.arm32", - "osCpe": # A CPE name for the operating system, `CPE_NAME` from os-release is a good default - "debugInfoUrl": "https://debuginfod.fedoraproject.org/", + "osCpe": "cpe:/o:fedoraproject:fedora:33", # A CPE name for the operating system, `CPE_NAME` from os-release is a good default + "debugInfoUrl": "https://debuginfod.fedoraproject.org/" } ``` @@ -108,3 +108,18 @@ SECTIONS } INSERT AFTER .note.gnu.build-id; ``` + +## Well-known keys + +The metadata format is intentionally left open, so that vendors can add their own information. +A set of well-known keys is defined here, and hopefully shared among all vendors. + +| Key name | Key description | Example value | +|--------------|--------------------------------------------------------------------------|---------------------------------------| +| type | The packaging type | rpm | +| os | The OS name, typically corresponding to ID in os-release | fedora | +| osVersion | The OS version, typically corresponding to VERSION_ID in os-release | 33 | +| name | The source package name | coreutils | +| version | The source package version | 4711.0815.fc13.arm32 | +| osCpe | A CPE name for the OS, typically corresponding to CPE_NAME in os-release | cpe:/o:fedoraproject:fedora:33 | +| debugInfoUrl | The debuginfod server url, if available | https://debuginfod.fedoraproject.org/ |