Skip to content

Add support for package signing#1369

Merged
quba42 merged 8 commits into
pulp:mainfrom
daviddavis:package-signing
Jun 3, 2026
Merged

Add support for package signing#1369
quba42 merged 8 commits into
pulp:mainfrom
daviddavis:package-signing

Conversation

@daviddavis
Copy link
Copy Markdown
Contributor

@daviddavis daviddavis commented Dec 3, 2025

closes #1300

Comment thread pulp_deb/app/viewsets/repository.py
@daviddavis daviddavis force-pushed the package-signing branch 6 times, most recently from 10576a3 to 9a98cf2 Compare January 13, 2026 17:42
@daviddavis daviddavis force-pushed the package-signing branch 2 times, most recently from fc6bbd7 to 8964c59 Compare January 29, 2026 15:30
@daviddavis daviddavis force-pushed the package-signing branch 2 times, most recently from 5298981 to c2ba8b6 Compare January 29, 2026 19:46
@quba42
Copy link
Copy Markdown
Collaborator

quba42 commented Apr 22, 2026

I am afraid there are now merge conflicts due to the new linting. It is mostly rearranging of import statements. I hope they are simple to resolve.

@daviddavis
Copy link
Copy Markdown
Contributor Author

No worries. I am at least partly to blame I think.

@daviddavis daviddavis force-pushed the package-signing branch 2 times, most recently from 90caeac to 4fded08 Compare April 23, 2026 14:32
@daviddavis
Copy link
Copy Markdown
Contributor Author

@quba42 I updated this PR and it should be ready for review again.

Comment thread pyproject.toml
@quba42
Copy link
Copy Markdown
Collaborator

quba42 commented May 4, 2026

I will just leave this here as a comment: https://gist.github.com/daviddavis/5c6288813044fa0686e2aa936f41b653

Comment thread docs/user/guides/signing_service.md Outdated
@daviddavis daviddavis force-pushed the package-signing branch 2 times, most recently from 7f810b9 to 470f5f7 Compare May 19, 2026 13:30
Comment thread docs/user/guides/signing_service.md Outdated
adrianabedon and others added 8 commits May 22, 2026 18:14
Assisted By: GPT-5.1-Codex

fixes pulp#1300
Assisted By: GPT-5.1-Codex

fixes pulp#1300
Add support for release overrides to signed_add_and_remove
Assisted By: Claude Sonnet 4.5
Switch package_signing_fingerprint fields from raw 40-char hex strings
to a prefixed format (e.g. 'v4:<hex>' or 'keyid:<hex>'). This allows
the signing system to distinguish between fingerprint types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add an ArrayField to BasePackage (Package and InstallerPackage) that
records which key fingerprints were used to sign the package. The field
is read-only, null by default, and populated with a fingerprint when a
package is signed via upload or repository modify.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously, we were checking package signatures against the package
signing service's key fingerprint to see if they were already signed by
the repo's package signing service.

Instead the check should be using the repo's package signing
fingerprint. For this fix, we extract the signature and use `gpg
--list-packets` to find the package's fingerprint, which is compared
against the repo fingerprint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ruff was introduced to pulp_deb and needs to run against the new package
signing code.
@daviddavis
Copy link
Copy Markdown
Contributor Author

@quba42 any other feedback?

Copy link
Copy Markdown
Collaborator

@quba42 quba42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big change, and I could probably spend another three months reviewing line by line and testing more use cases.

However, I feel I have done a fair amount of review and testing, and I want to create certainty around migration naming and order, and unblock everyone waiting on same.

As such, I propose merging as is. In many ways this will make it easier, not harder to create small follow up PRs without everyone needing to re-evaluate changes to this huge feature branch.

As such, I have only one last question for @daviddavis:

Do I understand you correctly, that there is a desire to keep the migrations on this PR as they currently are?:

0035_package_signing.py
0036_add_deb_package_signing_result.py
0037_DATA_fix_signing_fingerprint.py
0038_signing_fingerprint_prefix.py
0039_signing_keys.py

That is five separate migrations numbered 0035 to 0039? Or should we squish those together before merging?

Somewhat related: Are there any commits we want to squish together prior to merge?

I am open to leaving things separately as they are, to keep some of the internal history of how this change was created in steps prior to merging.

I am going to keep this PR open with this approving review, until I have gotten an answer vis-a-vis squashing (commits and/or migrations). This will also give @hstct a last chance to veto my approach of merging as is. 😉

@quba42
Copy link
Copy Markdown
Collaborator

quba42 commented Jun 2, 2026

I am also considering if we should perform one more Y-release BEFORE we merge this, so that we have a latest greatest Y-version before the pulpcore floor is raised to >=3.107

@daviddavis
Copy link
Copy Markdown
Contributor Author

Do I understand you correctly, that there is a desire to keep the migrations on this PR as they currently are?:

That's correct. We've already run these migrations in our production environment. Doing some research, it looks like I can maybe squash these migrations since we've already run them. I'm happy to take a stab at that.

Somewhat related: Are there any commits we want to squish together prior to merge?

I kept separate commits that match the ones from pulp_rpm. I thought it would also be easier to review. That said, I am happy to squash them. Maybe one big commit?

I am also considering if we should perform one more Y-release BEFORE we merge this, so that we have a latest greatest Y-version before the pulpcore floor is raised to >=3.107

This makes sense to me.

@daviddavis
Copy link
Copy Markdown
Contributor Author

I took a look into squashing the db migrations. We'd have to create a new squashed migration with a replaces key, release it alongside the existing migrations, then cleanup the new migration (removing the replaces key) and old migrations. So sounds challenging but not impossible.

It looks like pulpcore and some of the other plugins (pulp_rpm, pulp_container) have squashed their migrations so maybe it's worth just squashing all the pulp_deb migrations at some point?

@quba42
Copy link
Copy Markdown
Collaborator

quba42 commented Jun 3, 2026

It looks like pulpcore and some of the other plugins (pulp_rpm, pulp_container) have squashed their migrations so maybe it's worth just squashing all the pulp_deb migrations at some point?

We already have a squash migration up to and including migration 0031: https://github.com/pulp/pulp_deb/blob/main/pulp_deb/app/migrations/0001_initial_squashed_0031_add_domains.py

We just have not yet dropped the individual migrations that this replaces (which we will do at some point).

Given everything you answered, my sense is that it is better to keep the commits and the migrations and merge everything as is. I will have one more internal discussion about it today, and assuming there is no dissent, I will then move ahead with one pre-merge Y-release, and then merge.

@quba42 quba42 merged commit 66597d8 into pulp:main Jun 3, 2026
13 of 14 checks passed
@quba42
Copy link
Copy Markdown
Collaborator

quba42 commented Jun 3, 2026

@daviddavis Thanks for the feature, and thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for deb package signing

2 participants