Skip to content

Add log statements to package signing task#4459

Merged
dralley merged 1 commit intopulp:mainfrom
daviddavis:package-signing-logs
May 6, 2026
Merged

Add log statements to package signing task#4459
dralley merged 1 commit intopulp:mainfrom
daviddavis:package-signing-logs

Conversation

@daviddavis
Copy link
Copy Markdown
Contributor

Adds informational and debug log messages around package signing, mirroring the troubleshooting coverage already present in pulp_deb. The new logs cover:

  • the active signing fingerprint passed to the signing service (_sign_file),
  • a debug entry on fingerprint mismatch in _verify_package_fingerprint,
  • the previously-silent return paths in _sign_package (package already signed with the target fingerprint, and reusing a previously-signed package via RpmPackageSigningResult),
  • the per-repository entry point for signed_add_and_remove, naming the repository and the signing service in use.

Assisted-by: Claude (GitHub Copilot)

Adds informational and debug log messages around package signing,
mirroring the troubleshooting coverage already present in pulp_deb.
The new logs cover the active signing fingerprint, the cases where a
package is already signed or a previously-signed result is reused, and
the per-repository entry point for signed_add_and_remove.

Assisted-by: Claude (GitHub Copilot)
original_package_sha256=content_artifact.artifact.sha256,
package_signing_fingerprint=signing_fingerprint,
).first():
log.info(f"Reusing previously signed package for {package.filename}.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In retrospect this particular check concerns me, because if the signing service selects a mainkey that is not a signing key, then GPG is free to select a signing subkey, which means that a package signed by an old subkey would not be resigned by a new subkey because the package_signing_fingerprint matches.

So we might want to figure out how to track the actual signing fingerprint and not just the mainkey fingerprint.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That is, however, a separate concern from this PR

Copy link
Copy Markdown
Contributor Author

@daviddavis daviddavis May 6, 2026

Choose a reason for hiding this comment

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

So the issue is that a repo has a fingerprint for A for package signing service and the package was previously signed with the signing servie using subkey A1 and now it is signing with key A2? I don't know how there's a way for Pulp to know that the package signing key for the signing service didn't change (A1 -> A2). I would imagine that the user should set the fingerprints for A1 or A2 on the repo and not the primary key fingerprint (A). Otherwise, we could give users an option to bypass this check (like a setting).

@dralley dralley merged commit e3c908a into pulp:main May 6, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants