From 1b42eeab328b4993c9101e41c543a079dbb44fe2 Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Mon, 19 Feb 2024 17:25:53 +0530 Subject: [PATCH] Fix qualifier bug in debian purls See https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#deb Here `arch is the qualifiers key for a package architecture`, and we were using architecture, which was a bug. This commit is a fix for that. Signed-off-by: Ayan Sinha Mahapatra --- src/packagedcode/debian.py | 4 +- .../data/debian/basic-rootfs-expected.json | 28 ++++----- .../data/debian/basic/status.expected | 24 ++++---- .../data/debian/control.expected.json | 32 +++++----- ...r-layer.tar.xz.get-installed-expected.json | 20 +++---- ...-container-layer.tar.xz.scan-expected.json | 28 ++++----- .../adduser_3.118+deb11u1.dsc.expected.json | 12 ++-- .../data/debian/end-to-end.tgz.expected.json | 20 +++---- .../data/debian/mini-status/status.expected | 4 +- .../debian/ubuntu-var-lib-dpkg/expected.json | 58 +++++++++---------- 10 files changed, 115 insertions(+), 115 deletions(-) diff --git a/src/packagedcode/debian.py b/src/packagedcode/debian.py index dd70d9f8293..7d713a18bbf 100644 --- a/src/packagedcode/debian.py +++ b/src/packagedcode/debian.py @@ -279,7 +279,7 @@ def assemble(cls, package_data, resource, codebase, package_adder): # We only need to adjust the md5sum/list path in the case of `same` qualifiers = package_data.qualifiers or {} - architecture = qualifiers.get('architecture') + architecture = qualifiers.get('arch') multi_arch = package_data.extra_data.get('multi_arch') @@ -626,7 +626,7 @@ def build_package_data(debian_data, datasource_id, package_type='deb', distro=No qualifiers = {} architecture = debian_data.get('architecture') if architecture: - qualifiers['architecture'] = architecture + qualifiers['arch'] = architecture extra_data = {} # Multi-Arch can be: "foreign", "same", "allowed", "all", "optional" or diff --git a/tests/packagedcode/data/debian/basic-rootfs-expected.json b/tests/packagedcode/data/debian/basic-rootfs-expected.json index ff2041ff5c1..6c4ac5b7bcd 100644 --- a/tests/packagedcode/data/debian/basic-rootfs-expected.json +++ b/tests/packagedcode/data/debian/basic-rootfs-expected.json @@ -6,7 +6,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1.18.04", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -180,7 +180,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "basic-rootfs.tar.gz/var/lib/dpkg/status", "basic-rootfs.tar.gz/usr/share/doc/libncurses5/copyright", @@ -191,7 +191,7 @@ "debian_copyright_in_package", "debian_installed_md5sums" ], - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64" }, { "type": "deb", @@ -199,7 +199,7 @@ "name": "libndp0", "version": "1.4-2ubuntu0.16.04.1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -319,7 +319,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "basic-rootfs.tar.gz/var/lib/dpkg/status", "basic-rootfs.tar.gz/usr/share/doc/libndp0/copyright", @@ -330,7 +330,7 @@ "debian_copyright_in_package", "debian_installed_md5sums" ], - "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64" } ], "dependencies": [], @@ -507,7 +507,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -619,7 +619,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -738,7 +738,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -820,7 +820,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -834,7 +834,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1.18.04", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -884,7 +884,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64" }, { "type": "deb", @@ -892,7 +892,7 @@ "name": "libndp0", "version": "1.4-2ubuntu0.16.04.1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -942,7 +942,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64" } ], "for_packages": [], diff --git a/tests/packagedcode/data/debian/basic/status.expected b/tests/packagedcode/data/debian/basic/status.expected index 0f19459a2c8..229d6a950a2 100644 --- a/tests/packagedcode/data/debian/basic/status.expected +++ b/tests/packagedcode/data/debian/basic/status.expected @@ -5,7 +5,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1.18.04", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -55,7 +55,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64" }, { "type": "deb", @@ -63,7 +63,7 @@ "name": "libcom-err2", "version": "1.44.1-1ubuntu1.1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -113,7 +113,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libcom-err2@1.44.1-1ubuntu1.1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libcom-err2@1.44.1-1ubuntu1.1?arch=amd64" }, { "type": "deb", @@ -121,7 +121,7 @@ "name": "libapt-pkg5.0", "version": "1.6.11", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -171,7 +171,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libapt-pkg5.0@1.6.11?architecture=amd64" + "purl": "pkg:deb/ubuntu/libapt-pkg5.0@1.6.11?arch=amd64" }, { "type": "deb", @@ -179,7 +179,7 @@ "name": "libaudit1", "version": "1:2.8.2-1ubuntu1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -229,7 +229,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libaudit1@1:2.8.2-1ubuntu1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libaudit1@1:2.8.2-1ubuntu1?arch=amd64" }, { "type": "deb", @@ -237,7 +237,7 @@ "name": "perl-base", "version": "5.26.1-6ubuntu0.3", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -285,7 +285,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/perl-base@5.26.1-6ubuntu0.3?architecture=amd64" + "purl": "pkg:deb/ubuntu/perl-base@5.26.1-6ubuntu0.3?arch=amd64" }, { "type": "deb", @@ -293,7 +293,7 @@ "name": "libudev1", "version": "237-3ubuntu10.22", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -343,6 +343,6 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libudev1@237-3ubuntu10.22?architecture=amd64" + "purl": "pkg:deb/ubuntu/libudev1@237-3ubuntu10.22?arch=amd64" } ] \ No newline at end of file diff --git a/tests/packagedcode/data/debian/control.expected.json b/tests/packagedcode/data/debian/control.expected.json index 86903641f10..925a4425d31 100644 --- a/tests/packagedcode/data/debian/control.expected.json +++ b/tests/packagedcode/data/debian/control.expected.json @@ -6,7 +6,7 @@ "name": "gzip", "version": null, "qualifiers": { - "architecture": "any" + "arch": "any" }, "subpath": null, "primary_language": null, @@ -39,14 +39,14 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/debian/gzip?architecture=any&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/debian/gzip?arch=any&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "control/debian/control" ], "datasource_ids": [ "debian_control_in_source" ], - "purl": "pkg:deb/debian/gzip?architecture=any" + "purl": "pkg:deb/debian/gzip?arch=any" }, { "type": "deb", @@ -54,7 +54,7 @@ "name": "gzip-win32", "version": null, "qualifiers": { - "architecture": "all" + "arch": "all" }, "subpath": null, "primary_language": null, @@ -87,14 +87,14 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/debian/gzip-win32?architecture=all&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/debian/gzip-win32?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "control/debian/control" ], "datasource_ids": [ "debian_control_in_source" ], - "purl": "pkg:deb/debian/gzip-win32?architecture=all" + "purl": "pkg:deb/debian/gzip-win32?arch=all" } ], "dependencies": [], @@ -104,8 +104,8 @@ "type": "directory", "package_data": [], "for_packages": [ - "pkg:deb/debian/gzip?architecture=any&uuid=fixed-uid-done-for-testing-5642512d1758", - "pkg:deb/debian/gzip-win32?architecture=all&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/debian/gzip?arch=any&uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:deb/debian/gzip-win32?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -114,8 +114,8 @@ "type": "directory", "package_data": [], "for_packages": [ - "pkg:deb/debian/gzip?architecture=any&uuid=fixed-uid-done-for-testing-5642512d1758", - "pkg:deb/debian/gzip-win32?architecture=all&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/debian/gzip?arch=any&uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:deb/debian/gzip-win32?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -183,7 +183,7 @@ "name": "gzip", "version": null, "qualifiers": { - "architecture": "any" + "arch": "any" }, "subpath": null, "primary_language": null, @@ -219,7 +219,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_control_in_source", - "purl": "pkg:deb/debian/gzip?architecture=any" + "purl": "pkg:deb/debian/gzip?arch=any" }, { "type": "deb", @@ -227,7 +227,7 @@ "name": "gzip-win32", "version": null, "qualifiers": { - "architecture": "all" + "arch": "all" }, "subpath": null, "primary_language": null, @@ -263,12 +263,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_control_in_source", - "purl": "pkg:deb/debian/gzip-win32?architecture=all" + "purl": "pkg:deb/debian/gzip-win32?arch=all" } ], "for_packages": [ - "pkg:deb/debian/gzip?architecture=any&uuid=fixed-uid-done-for-testing-5642512d1758", - "pkg:deb/debian/gzip-win32?architecture=all&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/debian/gzip?arch=any&uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:deb/debian/gzip-win32?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] } diff --git a/tests/packagedcode/data/debian/debian-container-layer.tar.xz.get-installed-expected.json b/tests/packagedcode/data/debian/debian-container-layer.tar.xz.get-installed-expected.json index 3d4d68fe163..3520c42e80e 100644 --- a/tests/packagedcode/data/debian/debian-container-layer.tar.xz.get-installed-expected.json +++ b/tests/packagedcode/data/debian/debian-container-layer.tar.xz.get-installed-expected.json @@ -5,7 +5,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1.18.04", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -179,7 +179,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "debian-container-layer.tar.xz/var/lib/dpkg/status", "debian-container-layer.tar.xz/usr/share/doc/libncurses5/copyright", @@ -328,7 +328,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -419,12 +419,12 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] } ], - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64" }, { "type": "deb", @@ -432,7 +432,7 @@ "name": "libndp0", "version": "1.4-2ubuntu0.16.04.1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -552,7 +552,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "debian-container-layer.tar.xz/var/lib/dpkg/status", "debian-container-layer.tar.xz/usr/share/doc/libndp0/copyright", @@ -665,7 +665,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -747,11 +747,11 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] } ], - "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64" } ] \ No newline at end of file diff --git a/tests/packagedcode/data/debian/debian-container-layer.tar.xz.scan-expected.json b/tests/packagedcode/data/debian/debian-container-layer.tar.xz.scan-expected.json index a2f02b1c5c4..7c8a2aea7a9 100644 --- a/tests/packagedcode/data/debian/debian-container-layer.tar.xz.scan-expected.json +++ b/tests/packagedcode/data/debian/debian-container-layer.tar.xz.scan-expected.json @@ -6,7 +6,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1.18.04", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -180,7 +180,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "debian-container-layer.tar.xz/var/lib/dpkg/status", "debian-container-layer.tar.xz/usr/share/doc/libncurses5/copyright", @@ -191,7 +191,7 @@ "debian_copyright_in_package", "debian_installed_md5sums" ], - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64" }, { "type": "deb", @@ -199,7 +199,7 @@ "name": "libndp0", "version": "1.4-2ubuntu0.16.04.1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -319,7 +319,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "debian-container-layer.tar.xz/var/lib/dpkg/status", "debian-container-layer.tar.xz/usr/share/doc/libndp0/copyright", @@ -330,7 +330,7 @@ "debian_copyright_in_package", "debian_installed_md5sums" ], - "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64" } ], "dependencies": [], @@ -521,7 +521,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -633,7 +633,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -752,7 +752,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -834,7 +834,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -848,7 +848,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1.18.04", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -898,7 +898,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1.18.04?arch=amd64" }, { "type": "deb", @@ -906,7 +906,7 @@ "name": "libndp0", "version": "1.4-2ubuntu0.16.04.1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -956,7 +956,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libndp0@1.4-2ubuntu0.16.04.1?arch=amd64" } ], "for_packages": [], diff --git a/tests/packagedcode/data/debian/dsc_files/adduser_3.118+deb11u1.dsc.expected.json b/tests/packagedcode/data/debian/dsc_files/adduser_3.118+deb11u1.dsc.expected.json index 393d5a31e0c..8bbbf4f4dbb 100644 --- a/tests/packagedcode/data/debian/dsc_files/adduser_3.118+deb11u1.dsc.expected.json +++ b/tests/packagedcode/data/debian/dsc_files/adduser_3.118+deb11u1.dsc.expected.json @@ -6,7 +6,7 @@ "name": "adduser", "version": "3.118+deb11u1", "qualifiers": { - "architecture": "all" + "arch": "all" }, "subpath": null, "primary_language": null, @@ -49,14 +49,14 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/debian/adduser@3.118%2Bdeb11u1?architecture=all&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/debian/adduser@3.118%2Bdeb11u1?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "adduser_3.118+deb11u1.dsc" ], "datasource_ids": [ "debian_source_control_dsc" ], - "purl": "pkg:deb/debian/adduser@3.118%2Bdeb11u1?architecture=all" + "purl": "pkg:deb/debian/adduser@3.118%2Bdeb11u1?arch=all" } ], "dependencies": [], @@ -71,7 +71,7 @@ "name": "adduser", "version": "3.118+deb11u1", "qualifiers": { - "architecture": "all" + "arch": "all" }, "subpath": null, "primary_language": null, @@ -117,11 +117,11 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_source_control_dsc", - "purl": "pkg:deb/debian/adduser@3.118%2Bdeb11u1?architecture=all" + "purl": "pkg:deb/debian/adduser@3.118%2Bdeb11u1?arch=all" } ], "for_packages": [ - "pkg:deb/debian/adduser@3.118%2Bdeb11u1?architecture=all&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/debian/adduser@3.118%2Bdeb11u1?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] } diff --git a/tests/packagedcode/data/debian/end-to-end.tgz.expected.json b/tests/packagedcode/data/debian/end-to-end.tgz.expected.json index 68256ab0afd..6b86d879661 100644 --- a/tests/packagedcode/data/debian/end-to-end.tgz.expected.json +++ b/tests/packagedcode/data/debian/end-to-end.tgz.expected.json @@ -6,7 +6,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -53,7 +53,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "end-to-end.tgz/var/lib/dpkg/status", "end-to-end.tgz/var/lib/dpkg/info/libncurses5:amd64.md5sums" @@ -62,7 +62,7 @@ "debian_installed_status_db", "debian_installed_md5sums" ], - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64" } ], "dependencies": [], @@ -93,7 +93,7 @@ "type": "file", "package_data": [], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -123,7 +123,7 @@ "type": "file", "package_data": [], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -132,7 +132,7 @@ "type": "file", "package_data": [], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -141,7 +141,7 @@ "type": "file", "package_data": [], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -274,7 +274,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -288,7 +288,7 @@ "name": "libncurses5", "version": "6.1-1ubuntu1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -338,7 +338,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?architecture=amd64" + "purl": "pkg:deb/ubuntu/libncurses5@6.1-1ubuntu1?arch=amd64" } ], "for_packages": [], diff --git a/tests/packagedcode/data/debian/mini-status/status.expected b/tests/packagedcode/data/debian/mini-status/status.expected index 2eb6e79bb2f..d3542ff364e 100644 --- a/tests/packagedcode/data/debian/mini-status/status.expected +++ b/tests/packagedcode/data/debian/mini-status/status.expected @@ -5,7 +5,7 @@ "name": "perl-base", "version": "5.22.1-9ubuntu0.6", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -53,6 +53,6 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/perl-base@5.22.1-9ubuntu0.6?architecture=amd64" + "purl": "pkg:deb/ubuntu/perl-base@5.22.1-9ubuntu0.6?arch=amd64" } ] \ No newline at end of file diff --git a/tests/packagedcode/data/debian/ubuntu-var-lib-dpkg/expected.json b/tests/packagedcode/data/debian/ubuntu-var-lib-dpkg/expected.json index 9d47769286a..fa839a1466e 100644 --- a/tests/packagedcode/data/debian/ubuntu-var-lib-dpkg/expected.json +++ b/tests/packagedcode/data/debian/ubuntu-var-lib-dpkg/expected.json @@ -6,7 +6,7 @@ "name": "base-files", "version": "11ubuntu5", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -62,7 +62,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/base-files@11ubuntu5?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/base-files@11ubuntu5?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "ubuntu-var-lib-dpkg/var/lib/dpkg/status", "ubuntu-var-lib-dpkg/var/lib/dpkg/info/base-files.list" @@ -71,7 +71,7 @@ "debian_installed_status_db", "debian_installed_files_list" ], - "purl": "pkg:deb/ubuntu/base-files@11ubuntu5?architecture=amd64" + "purl": "pkg:deb/ubuntu/base-files@11ubuntu5?arch=amd64" }, { "type": "deb", @@ -79,7 +79,7 @@ "name": "base-passwd", "version": "3.5.47", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -279,7 +279,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/debian/base-passwd@3.5.47?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/debian/base-passwd@3.5.47?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "ubuntu-var-lib-dpkg/var/lib/dpkg/status", "ubuntu-var-lib-dpkg/var/lib/dpkg/info/base-passwd.md5sums" @@ -288,7 +288,7 @@ "debian_installed_status_db", "debian_installed_md5sums" ], - "purl": "pkg:deb/debian/base-passwd@3.5.47?architecture=amd64" + "purl": "pkg:deb/debian/base-passwd@3.5.47?arch=amd64" }, { "type": "deb", @@ -296,7 +296,7 @@ "name": "bash", "version": "5.0-6ubuntu1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -550,7 +550,7 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/bash@5.0-6ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/bash@5.0-6ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "ubuntu-var-lib-dpkg/var/lib/dpkg/status", "ubuntu-var-lib-dpkg/var/lib/dpkg/info/bash.list", @@ -561,7 +561,7 @@ "debian_installed_files_list", "debian_installed_md5sums" ], - "purl": "pkg:deb/ubuntu/bash@5.0-6ubuntu1?architecture=amd64" + "purl": "pkg:deb/ubuntu/bash@5.0-6ubuntu1?arch=amd64" }, { "type": "deb", @@ -569,7 +569,7 @@ "name": "e2fsprogs", "version": "1.46.2-2", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -614,14 +614,14 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/e2fsprogs@1.46.2-2?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/e2fsprogs@1.46.2-2?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "ubuntu-var-lib-dpkg/var/lib/dpkg/status" ], "datasource_ids": [ "debian_installed_status_db" ], - "purl": "pkg:deb/ubuntu/e2fsprogs@1.46.2-2?architecture=amd64" + "purl": "pkg:deb/ubuntu/e2fsprogs@1.46.2-2?arch=amd64" }, { "type": "deb", @@ -629,7 +629,7 @@ "name": "tar", "version": "1.30+dfsg-7", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -674,14 +674,14 @@ "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, - "package_uid": "pkg:deb/ubuntu/tar@1.30%2Bdfsg-7?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", + "package_uid": "pkg:deb/ubuntu/tar@1.30%2Bdfsg-7?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_paths": [ "ubuntu-var-lib-dpkg/var/lib/dpkg/status" ], "datasource_ids": [ "debian_installed_status_db" ], - "purl": "pkg:deb/ubuntu/tar@1.30%2Bdfsg-7?architecture=amd64" + "purl": "pkg:deb/ubuntu/tar@1.30%2Bdfsg-7?arch=amd64" } ], "dependencies": [], @@ -1686,7 +1686,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/base-files@11ubuntu5?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/base-files@11ubuntu5?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -1892,7 +1892,7 @@ } ], "for_packages": [ - "pkg:deb/debian/base-passwd@3.5.47?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/debian/base-passwd@3.5.47?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -2332,7 +2332,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/bash@5.0-6ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/bash@5.0-6ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -2583,7 +2583,7 @@ } ], "for_packages": [ - "pkg:deb/ubuntu/bash@5.0-6ubuntu1?architecture=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:deb/ubuntu/bash@5.0-6ubuntu1?arch=amd64&uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -2597,7 +2597,7 @@ "name": "base-files", "version": "11ubuntu5", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -2645,7 +2645,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/base-files@11ubuntu5?architecture=amd64" + "purl": "pkg:deb/ubuntu/base-files@11ubuntu5?arch=amd64" }, { "type": "deb", @@ -2653,7 +2653,7 @@ "name": "base-passwd", "version": "3.5.47", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -2701,7 +2701,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/debian/base-passwd@3.5.47?architecture=amd64" + "purl": "pkg:deb/debian/base-passwd@3.5.47?arch=amd64" }, { "type": "deb", @@ -2709,7 +2709,7 @@ "name": "bash", "version": "5.0-6ubuntu1", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -2757,7 +2757,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/bash@5.0-6ubuntu1?architecture=amd64" + "purl": "pkg:deb/ubuntu/bash@5.0-6ubuntu1?arch=amd64" }, { "type": "deb", @@ -2765,7 +2765,7 @@ "name": "e2fsprogs", "version": "1.46.2-2", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -2813,7 +2813,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/e2fsprogs@1.46.2-2?architecture=amd64" + "purl": "pkg:deb/ubuntu/e2fsprogs@1.46.2-2?arch=amd64" }, { "type": "deb", @@ -2821,7 +2821,7 @@ "name": "tar", "version": "1.30+dfsg-7", "qualifiers": { - "architecture": "amd64" + "arch": "amd64" }, "subpath": null, "primary_language": null, @@ -2869,7 +2869,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "debian_installed_status_db", - "purl": "pkg:deb/ubuntu/tar@1.30%2Bdfsg-7?architecture=amd64" + "purl": "pkg:deb/ubuntu/tar@1.30%2Bdfsg-7?arch=amd64" } ], "for_packages": [],