Skip to content

Packaging refactor + Rpm parameters fix#1191

Merged
sachintu47 merged 9 commits into
mainfrom
packaging_refactor
May 25, 2026
Merged

Packaging refactor + Rpm parameters fix#1191
sachintu47 merged 9 commits into
mainfrom
packaging_refactor

Conversation

@sachintu47
Copy link
Copy Markdown
Member

@sachintu47 sachintu47 commented May 22, 2026

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

  1. Updates bin/zopen-build to move pax/RPM generation and activation out of install() into dedicated helpers (create_pax, create_rpm, finalize_pax_metadata, set_active_version) and a new package() step
  2. Enhances RPM creation to pass explicit name/version/release values and filters meta out of runtime requirements.

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 22, 2026

🤖 Augment PR Summary

Summary: Refactors the zopen build workflow to separate installation, packaging, OCI publishing, and activation into clearer phases.

Changes:

  • Updates bin/zopen-build to move pax/RPM generation and activation out of install() into dedicated helpers (create_pax, create_rpm, finalize_pax_metadata, set_active_version) and a new package() step.
  • Adjusts the main execution flow to run package() only when --generate-pax/--generate-rpm are set, run generateOCI only when --publish-oci is enabled, and activate only when --set-active is requested.
  • Enhances RPM creation to pass explicit name/version/release values and filters meta out of runtime requirements.
  • Adds a --build-binary option to bin/zopen-pax2rpm and updates the rpmbuild invocation flow to support binary-only builds.
  • Improves CI release description generation (cicd/publish.groovy) by including version, test status, runtime deps, build deps, and an example install command snippet.
  • Bumps the framework version to 0.8.5.

🤖 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. 3 suggestions posted.

Fix All in Augment

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

Comment thread bin/zopen-build Outdated
pax_finalize()
{
#TODO: Hack so that we can use coreutils md5sum without impacting builds
ZOPEN_DEPS="coreutils jq"
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 22, 2026

Choose a reason for hiding this comment

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

pax_finalize() resets ZOPEN_DEPS to just coreutils jq, which changes what setDepsEnv will (re)install/re-source for the rest of the run and may unintentionally drop other dependency environments that were previously active. This also mutates the global ZOPEN_DEPS value after install, which could surprise later steps (e.g., OCI publish / activate).

Severity: medium

Fix This in Augment

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

Comment thread bin/zopen-build
Comment thread cicd/publish.groovy
@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-build Outdated
Comment thread bin/zopen-build 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. 2 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
@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-build Outdated
@sachintu47 sachintu47 force-pushed the packaging_refactor branch from 55911b9 to 06a9c5e Compare May 25, 2026 05:22
@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-build
Comment thread bin/zopen-build
Comment thread bin/zopen-pax2rpm
@sachintu47 sachintu47 force-pushed the packaging_refactor branch from 06a9c5e to 33617c1 Compare May 25, 2026 05:40
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

@sachintu47 sachintu47 marked this pull request as ready for review May 25, 2026 06:03
@sachintu47 sachintu47 changed the title Packaging refactor Packaging refactor + Rpm parameters fix May 25, 2026
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-build
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-build Outdated
Comment thread bin/zopen-build
Comment thread cicd/publish.groovy
@sachintu47 sachintu47 force-pushed the packaging_refactor branch from 33617c1 to 03fd43b Compare May 25, 2026 08:50
Extract inline packaging code into separate functions for better
maintainability and code organization.
Add timestamp-based RPM release numbering to prevent CI build overwrites.
Add --build-binary flag to zopen-pax2rpm for faster binary-only builds.
Update zopen-build to use binary-only builds by default.
Filter out 'meta' from ZOPEN_RUNTIME_DEPS when generating RPM requires list.
…e_version()

The set_active_version() function was using an undefined variable 'name'
when creating the profiled directory path and dotenv file. This was
introduced during the refactoring in commit 345ac3f.

Fixed by using PROJECT_NAME which is already defined at the beginning
of the function.
Previously, rpmbuild output was captured but never displayed, making it
difficult to diagnose failures when the error message said 'review the
spec file and build output above'.

Changes:
- Capture and display rpmbuild output for both -bb and -ba modes
- Store exit code separately for proper error checking
- Only show Source RPMs section when not using --build-binary flag
Changed set_active_version() to use getProjectName() instead of cut -d'-' -f1
to properly handle hyphenated port names and maintain consistency with other
parts of the codebase (RPM naming, metadata generation, zopen-install).

This ensures mergeIntoSystem updates the correct project key/directory for
ports with hyphens in their names.

Also fixed setup.sh to run in a subshell to avoid changing the working
directory for later steps like ZOPEN_PRE_TERMINATE_CODE.
@sachintu47 sachintu47 force-pushed the packaging_refactor branch from 03fd43b to 1a6d2f1 Compare May 25, 2026 08:55
@sachintu47 sachintu47 changed the base branch from main to fix_zopen_init May 25, 2026 08:57
Base automatically changed from fix_zopen_init to main May 25, 2026 09:04
@sachintu47
Copy link
Copy Markdown
Member Author

/run tests

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

@IgorTodorovskiIBM IgorTodorovskiIBM left a comment

Choose a reason for hiding this comment

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

LGTM

@sachintu47 sachintu47 merged commit f6dcff3 into main May 25, 2026
1 of 2 checks passed
@sachintu47 sachintu47 deleted the packaging_refactor branch May 25, 2026 14:07
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.

2 participants