Skip to content

add automated RPM signing#1186

Draft
sachintu47 wants to merge 3 commits into
mainfrom
rpmsign
Draft

add automated RPM signing#1186
sachintu47 wants to merge 3 commits into
mainfrom
rpmsign

Conversation

@sachintu47
Copy link
Copy Markdown
Member

  • Separate local install from packaging logic in zopen-build.
  • Add specialized functions for pax and RPM creation.
  • Enable headless RPM signing using zopen GPG environment variables.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Content Update

Category

  • zopen build framework
  • zopen package manager
  • Documentation
  • CI/CD
  • Tools

Description

Related Issues

  • Related Issue #
  • Closes #

[optional] Are there any post-deployment tasks or follow-up actions required?

@sachintu47
Copy link
Copy Markdown
Member Author

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 19, 2026

🤖 Augment PR Summary

Summary: Refactors zopen-build to split packaging (pax/RPM artifact creation) into a dedicated post-install phase, and introduces an optional RPM signing step driven by zopen GPG environment variables.

Changes:

  • Moves pax and RPM generation logic out of install() into new helpers: create_pax(), create_rpm(), and pax_finalize().
  • Adds a new package() phase that installs packaging-time deps (e.g., coreutils/jq, plus gpg/rpm when needed) and then produces artifacts.
  • Invokes package() after install() when --generate-pax or --generate-rpm is requested.
  • Extends zopen-pax2rpm with a --sign flag and a new sign_rpm() function to sign built RPMs using imported secret key material in a temporary GPG home.
  • Updates zopen-build to pass --sign to zopen-pax2rpm when pax signing is enabled.

Technical Notes: The RPM signing flow uses GNUPGHOME pointing at a temp keyring, imports the secret key non-interactively, derives a key id, and runs rpmsign --addsign with gpg-related macro overrides.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread bin/zopen-build Outdated
Comment thread bin/zopen-build Outdated
Comment thread bin/zopen-pax2rpm Outdated
Comment thread bin/zopen-pax2rpm Outdated
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread bin/zopen-build
Comment thread bin/zopen-build
Comment thread bin/zopen-pax2rpm
Comment thread bin/zopen-pax2rpm
Comment thread bin/zopen-pax2rpm Outdated
@sachintu47 sachintu47 force-pushed the rpmsign branch 2 times, most recently from 9f1c3c1 to 324cd6e Compare May 19, 2026 07:13
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread bin/zopen-build
Comment thread bin/zopen-pax2rpm
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread bin/zopen-pax2rpm
Comment thread bin/zopen-pax2rpm
Comment thread bin/zopen-pax2rpm
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread bin/zopen-pax2rpm
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread bin/zopen-pax2rpm Outdated
BUILD_RPM=true
shift
;;
--sign)
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 19, 2026

Choose a reason for hiding this comment

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

bin/zopen-pax2rpm:912 --sign can be provided without --build, but signing is only triggered after a successful RPM build (sign_rpm is called in the build-success path). This can lead to a confusing no-op where --sign is accepted but nothing is signed (and no warning/error is emitted).

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@sachintu47 sachintu47 changed the base branch from main to packaging_refactor May 25, 2026 08:58
Base automatically changed from packaging_refactor to main May 25, 2026 14:07
@sachintu47 sachintu47 changed the title Refactor packaging logic and add automated RPM signing add automated RPM signing May 25, 2026
@sachintu47 sachintu47 force-pushed the rpmsign branch 2 times, most recently from 2a8d8dd to fdbe838 Compare May 25, 2026 15:01
- Enable headless RPM signing using zopen GPG environment variables.
Removed unnecessary checks and cleanup commands for GPG directory and RPM list.

Signed-off-by: Sachin <32639496+sachintu47@users.noreply.github.com>
Add debugging output to the sign_rpm function.

Signed-off-by: Sachin <32639496+sachintu47@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant