Skip to content

Add support for package signing#1369

Open
daviddavis wants to merge 7 commits intopulp:mainfrom
daviddavis:package-signing
Open

Add support for package signing#1369
daviddavis wants to merge 7 commits intopulp: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
@daviddavis daviddavis force-pushed the package-signing branch 2 times, most recently from 65cbe36 to 05ef87e Compare March 10, 2026 15:35
@daviddavis
Copy link
Copy Markdown
Contributor Author

Here are the Debian docs on signing packages:

https://www.debian.org/doc/manuals/securing-debian-manual/deb-pack-sign.en.html#check-pkg-sign

Here's our own docs about how to manually verify package signatures:

https://github.com/microsoft/linux-package-repositories?tab=readme-ov-file#verify-the-signature-of-an-individual-deb

This doc has a bit more info including how to configure dpkg to verify signatures:

https://blog.packagecloud.io/how-to-gpg-sign-and-verify-deb-packages-and-apt-repositories/

Here's an example package that is signed:

https://packages.microsoft.com/repos/code/pool/main/c/code/code_1.113.0-1774364744_amd64.deb

Note the signature (_gpgorigin) in the deb package:

$ wget https://packages.microsoft.com/repos/code/pool/main/c/code/code_1.113.0-1774364744_amd64.deb

$ ar t code_1.113.0-1774364744_amd64.deb
debian-binary
control.tar.xz
data.tar.xz
_gpgorigin

@daviddavis daviddavis force-pushed the package-signing branch 6 times, most recently from cfde638 to 236be34 Compare April 9, 2026 21:25
@daviddavis daviddavis force-pushed the package-signing branch 9 times, most recently from 4a62c62 to dfde87c Compare April 22, 2026 01:19
@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.

adrianabedon and others added 6 commits April 22, 2026 17:50
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>
@daviddavis
Copy link
Copy Markdown
Contributor Author

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

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