From bdb25b401f68b6530ee5e51d5441fd967baf356c Mon Sep 17 00:00:00 2001 From: Gernot Hillier Date: Wed, 8 Dec 2021 08:17:41 +0100 Subject: [PATCH 1/3] Debian: extend to specify source packages This allows to refer to Debian source packages. Often there is no trivial mapping between source and binary packages (several binaries built from one source, names as well as versions can differ between binary and source packages!), so package-urls shall allow to explicitely specify source packages. Using the arch qualifier for this was suggested by (former DPL) Chris Lamb and William Bartholomew in https://github.com/package-url/purl-spec/pull/57 and "avoids people doing weird things like ?arch=amd64&type=source". To stay consistent with former versions of the spec, a deb package without qualifier shall refer to a binary package. Signed-off-by: Gernot Hillier --- PURL-TYPES.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 908abf5..c4e8c91 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -129,13 +129,20 @@ deb - The ``namespace`` is the "vendor" name such as "debian" or "ubuntu". It is not case sensitive and must be lowercased. - The ``name`` is not case sensitive and must be lowercased. -- The ``version`` is the package version. -- ``arch`` is the qualifiers key for a package architecture +- The ``version`` is the version of the binary (or source) package. +- ``arch`` is the qualifiers key for a package architecture. The special + value ``arch=source`` shall identify a Debian source package (which + usually consists of a Debian Source control file (.dsc) and corresponding + upstream and Debian sources). In this case, ``name`` and ``version`` of the + source package shall be given (both may differ from binary package!), as + printed by ``dpkg-query -f '${source:Package} ${source:Version} -W ``. - Examples:: pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie pkg:deb/debian/dpkg@1.19.0.4?arch=amd64&distro=stretch pkg:deb/ubuntu/dpkg@1.19.0.4?arch=amd64 + pkg:deb/debian/attr@1:2.4.47-2?arch=source + pkg:deb/debian/attr@1:2.4.47-2%2Bb1?arch=amd64 docker ------ From 1a682c6bebdb44b339af24ea44b2c479c775249c Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 Dec 2021 07:35:04 +0100 Subject: [PATCH 2/3] Debian: extend to specify source packages Fix dpkg command syntax and refine definition Signed-off-by: Philippe Ombredanne --- PURL-TYPES.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index c4e8c91..1122c07 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -130,12 +130,14 @@ deb It is not case sensitive and must be lowercased. - The ``name`` is not case sensitive and must be lowercased. - The ``version`` is the version of the binary (or source) package. -- ``arch`` is the qualifiers key for a package architecture. The special - value ``arch=source`` shall identify a Debian source package (which - usually consists of a Debian Source control file (.dsc) and corresponding - upstream and Debian sources). In this case, ``name`` and ``version`` of the - source package shall be given (both may differ from binary package!), as - printed by ``dpkg-query -f '${source:Package} ${source:Version} -W ``. +- ``arch`` is the qualifiers key for a package architecture. The special value + ``arch=source`` identifies a Debian source package that usually consists of a + Debian Source control file (.dsc) and corresponding upstream and Debian + sources. The ``dpkg-query`` command can print the ``name`` and ``version`` of + the corresponding source package of a binary package:: + + dpkg-query -f '${source:Package} ${source:Version}' -W + - Examples:: pkg:deb/debian/curl@7.50.3-1?arch=i386&distro=jessie From 37fd5f537841dc295cec22a1e34f8579394dd7ac Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 9 Dec 2021 07:36:21 +0100 Subject: [PATCH 3/3] Fix ReST syntax Signed-off-by: Philippe Ombredanne --- PURL-TYPES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 1122c07..6d59a95 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -38,7 +38,7 @@ bitbucket pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c cocoapods ------ +--------- ``cocoapods`` for Cocoapods: - The default repository is ``https://cdn.cocoapods.org/``