Skip to content

Fix project name parsing, release validation retries, and pax attributes - #1284

Merged
sachintu47 merged 3 commits into
zopencommunity:mainfrom
sachintu47:main
Oct 23, 2026
Merged

sachintu47 merged 3 commits into
zopencommunity:mainfrom
sachintu47:main

Conversation

@sachintu47

@sachintu47 sachintu47 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

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

This PR updates project-name parsing, release validation, and archive handling in the zopen build and publishing pipeline.

Changes:

Strip trailing -DEV before fallback project-name parsing.
Retry GitHub release validation with increasing delays.
Expand pax preservation flags during RPM extraction and staging.

Related Issues

  • Related Issue #
  • Closes #

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

For packages whose ZOPEN_NAME contains no '-' (e.g. check_python),
the build system appends '-DEV' to avoid colliding with installed
packages.  getProjectName was then called on the resulting
'check_python-DEV' string; because 'DEV' does not match the version
regex ([vV]?[0-9].*), the function returned the full string instead
of the bare project name.

This caused two visible problems:
  - ZOPEN_INSTALL_DIR parent dir became check_python-dev instead of
    check_python (e.g. .../check_python-dev/check_python-DEV)
  - mergeIntoSystem received 'check_python-DEV' as the package name,
    so the canonical symlink was created as check_python-dev ->
    check_python-DEV instead of check_python -> check_python-DEV

Fix: strip a trailing -DEV suffix inside getProjectName before any
further processing.  The strip is a no-op for release builds where
the name already contains a real version (e.g. util-linux-2.5).
…sleep 5

github-release info was called once after a 5-second sleep, which is
not always enough for GitHub's API to make a freshly created release
visible.  The result was a hard failure even though the release had
been created successfully.

Replace the single sleep+check with a retry loop (5s, 10s, 20s, 30s
cumulative backoff, max ~65s total wait) that exits as soon as the
release is confirmed visible, and only fails if none of the attempts
succeed.
All pax invocations in the generated spec used -p p (permissions only).
Since rpmbuild runs on z/OS, extended attributes such as the program
control bit, APF authorization, and EBCDIC file tags must also be
preserved.  Change -p p to -p pe across all five pax calls:
- %prep extraction (.pax.Z and .pax variants)
- %install copies for FHS dirs, misc items, and doc files
Copilot AI balanced review requested due to automatic review settings October 23, 2026 05:50

Copilot AI left a comment

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.

🔵 Needs a closer look

The expanded pax preservation flags need native z/OS validation of ownership, attributes, and privilege requirements.

No open issues 🎉

What changed in this PR

This PR updates project-name parsing, release validation, and archive handling in the zopen build and publishing pipeline.

Changes:

  • Strip trailing -DEV before fallback project-name parsing.
  • Retry GitHub release validation with increasing delays.
  • Expand pax preservation flags during RPM extraction and staging.
File Description
cicd/​publish.groovy Replace one release-validation attempt with bounded retries.
bin/​zopen-pax2rpm Change archive extraction and copy operations from -p p to -p pe.
bin/​zopen-build Remove the development suffix before fallback name extraction.

Review effort: Balanced

@sachintu47
sachintu47 marked this pull request as ready for review October 23, 2026 06:06
@sachintu47
sachintu47 merged commit dba204b into zopencommunity:main Oct 23, 2026
4 of 5 checks passed
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