Actions
Issue #8571
closedPublishing raises forbidden checksum error when it shouldn't
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 105
Quarter:
Description
Steps to reproduce:
- Enable md5 via ALLOWED_CONTENT_CHECKSUMS and sync down an md5 repository (eg https://fixtures.pulpproject.org/rpm-with-md5/)
- Disable md5 and run pulpcore-manager handle-artifact-checksums
- Now create a publication for your repository version using an allowed checksum:
http :/pulp/api/v3/publications/rpm/rpm/ repository_version=/pulp/api/v3/repositories/rpm/rpm/a1263205-e97a-452f-a674-f516714812c6/versions/1/ package_checksum_type="sha256"
You'll get this error:
ValueError: Package camel-0:0.1-1.noarch as content unit 6d518294-c03c-4cf1-b8ef-0e663b73274a contains forbidden checksum type 'md5', thus can't be published. Checksum must be one of the allowed checksum types.
I believe this check is faulty since it solely checks rpm_package.checksum_type
and doesn't consider package_checksum_type
.
Related issues
Updated by daviddavis over 3 years ago
Here's what my camel package looks like. Its checksum_type is md5 but also it has a sha256 checksum.
{
"arch": "noarch",
"artifact": "/pulp/api/v3/artifacts/bede35b5-28fe-4c4c-8797-8036d2a45bb9/",
"changelogs": [],
"checksum_type": "md5",
"conflicts": [],
"description": "A dummy package of camel",
"enhances": [],
"epoch": "0",
"files": [
[
null,
"/tmp/",
"camel.txt"
]
],
"is_modular": false,
"location_base": "",
"location_href": "camel-0.1-1.noarch.rpm",
"md5": null,
"name": "camel",
"obsoletes": [],
"pkgId": "a3923b24d45c57431e1a1e7c3249878c",
"provides": [
[
"camel",
"EQ",
"0",
"0.1",
"1",
false
]
],
"pulp_created": "2021-04-15T17:29:13.308853Z",
"pulp_href": "/pulp/api/v3/content/rpm/packages/6d518294-c03c-4cf1-b8ef-0e663b73274a/",
"recommends": [],
"release": "1",
"requires": [],
"rpm_buildhost": "smqe-ws15",
"rpm_group": "Internet/Applications",
"rpm_header_end": 1697,
"rpm_header_start": 280,
"rpm_license": "GPLv2",
"rpm_packager": "",
"rpm_sourcerpm": "camel-0.1-1.src.rpm",
"rpm_vendor": "",
"sha1": null,
"sha224": "bb325191e37933d9778efb47ae8d250e03249fb71c7be540932feb57",
"sha256": "c5c34e1843847990d2c79b936309d6257279e26f907e20f9f58073a14525e1ef",
"sha384": "e01817ea6087146204475e008f71f6735a0173787d8e8d934cd16ad5bd53446a5c735930d598ef3e6f2d654a1b88597d",
"sha512": "8a303d3cbed42e8dc9335ab07012c44b3026163da2aa4cb282862a0e6d6c9eef026ff596637026ba3d9a84b7e7f3b290b794cd15c676e2aa75a0e8ae036cad94",
"size_archive": 296,
"size_installed": 42,
"size_package": 1847,
"suggests": [],
"summary": "A dummy package of camel",
"supplements": [],
"time_build": 1331831360,
"time_file": 1616674365,
"url": "http://tstrachota.fedorapeople.org",
"version": "0.1"
}
]
}
Updated by dalley over 3 years ago
- Status changed from NEW to POST
- Assignee set to dalley
Updated by dalley over 3 years ago
- Copied to Backport #9332: Backport #8571 "Publishing raises forbidden checksum error when it shouldn't" to 3.14.z added
Updated by pulpbot over 3 years ago
Added by dalley over 3 years ago
Updated by dalley over 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset 656d93bb00f062d4a759674b6486f1df7f0d7285.
Updated by dalley over 3 years ago
- Sprint/Milestone changed from 3.14.4 to 3.16.0
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Fix publishing raises forbidden checksum error when it shouldn't
closes: #8571 https://pulp.plan.io/issues/8571