Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0e5c922
Added rpm package as part of build
TejaswiniIBM Mar 17, 2026
993c3ea
Resolved augment comments
TejaswiniIBM Mar 23, 2026
f271bac
Resolved PR reviews in zopen-pax2rpm, pubilsh.groovy
TejaswiniIBM Mar 23, 2026
d9b16e5
Resolved PR reviews in zopen-pax2rpm
TejaswiniIBM Mar 23, 2026
5531b9b
Resolved PR comments
TejaswiniIBM Mar 26, 2026
9da910e
Fixing the review comments
TejaswiniIBM Mar 31, 2026
962d0b3
Resolved the pr review comments v2
TejaswiniIBM Mar 31, 2026
541aa2e
resolved pr comments 3
TejaswiniIBM Mar 31, 2026
057745d
versioning added
TejaswiniIBM Apr 2, 2026
edb4824
refactored the script to matchother zopen tools
TejaswiniIBM Apr 6, 2026
2fa9f22
Fixed the build errors
TejaswiniIBM Apr 6, 2026
703956e
Fixed the build issues
TejaswiniIBM Apr 6, 2026
5eb36a2
Fixed the review comments
TejaswiniIBM Apr 7, 2026
c04a514
Updated the build command to test rpm
TejaswiniIBM Apr 7, 2026
eacfd78
Changed the portbuild to portbuild test for testing the command
TejaswiniIBM Apr 7, 2026
eb99671
Fixed the test build error No compatible architectures found for build
TejaswiniIBM Apr 8, 2026
36ee648
Fixed the test build error - RPM build errors:
TejaswiniIBM Apr 8, 2026
e7315bb
Reverted the Port-Build-Test to Port-Build
TejaswiniIBM Apr 8, 2026
de65cc5
updating the branch to main
TejaswiniIBM Apr 9, 2026
a5b764f
Update publish.groovy
TejaswiniIBM Apr 20, 2026
b8fe3d7
Update Jenkins pipeline to use test jobs
TejaswiniIBM Apr 28, 2026
da8ecec
Update project name for artifact copying in Jenkins
TejaswiniIBM Apr 28, 2026
b4f4673
Refactor the code to use pulp command to upload the rpm
TejaswiniIBM May 4, 2026
e2e30b7
Refactor the code to use pulp command to upload the rpm
TejaswiniIBM May 4, 2026
c69d7d7
Update Jenkins pipeline to use Port-Publish-Test job
TejaswiniIBM May 4, 2026
ce87ca7
Change job name from Port-Publish-Test to Port-Build-Test
TejaswiniIBM May 4, 2026
22636bd
Enhance Pulp configuration and error handling
TejaswiniIBM May 5, 2026
a48a13a
Add PULP_HOST variable for package repository
TejaswiniIBM May 5, 2026
b58d0e1
Refactor publish.groovy for improved clarity and functionality
TejaswiniIBM May 5, 2026
91b80cc
Adding changed upload command
TejaswiniIBM May 7, 2026
79703a4
changes in the publish groovy file
TejaswiniIBM May 12, 2026
471ae27
Updated the pulp command with autopublish
TejaswiniIBM May 12, 2026
25749eb
Fix formatting and syntax errors in zopen-publish script
TejaswiniIBM May 12, 2026
7f2eafe
Fix missing newline at end of zopen-publish file
TejaswiniIBM May 12, 2026
93e7714
Merge branch 'main' into zopen_pax2rpm
TejaswiniIBM May 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGES_MAY_2026.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Documentation of Recent Changes (May 2026)

This document summarizes the significant changes made to the `zopen` tools recently, focusing on RPM generation, Pulp integration, and dependency management improvements.

## 1. `zopen-pax2rpm` Refactoring and Improvements

The `zopen-pax2rpm` tool, used for generating RPM spec files and building RPMs from pax archives, has undergone a major overhaul:

- **Portability:** Switched shebang from `#!/bin/bash` to `#!/bin/sh`.
- **Consistency:** Integrated `setupMyself` to align with other `zopen` scripts and source `common.sh`.
- **Platform Support:**
- Improved architecture detection for z/OS, correctly mapping numeric machine types to `s390x`.
- Added `%define __os_install_post %{nil}` to spec files on z/OS to prevent broken post-install processing (like stripping).
- **Robust Parsing:**
- Improved filename parsing to handle `.zos` suffixes and avoid bash-specific syntax.
- Enhanced pax archive analysis with higher entry limits (up to 5000) and more robust directory structure detection.
- **Improved Build Environment:**
- Better handling of `~/.rpmmacros` and `_topdir`.
- Uses `--define "_topdir ..."` in `rpmbuild` commands for better isolation.
- **User Interface:**
- Added `--pkg-version` and `--version` options.
- Improved error messages and dependency checking.

## 2. Pulp Integration for RPM Publishing

Support for the Pulp repository manager has been added to the publishing workflow:

- **`zopen-publish`**:
- New options: `--pulp` (enable Pulp upload) and `--pulp-repo <repo>` (specify target repository).
- Automatic detection of RPM files in common build locations (`rpmbuild/RPMS` or the same directory as the pax file).
- New `uploadToPulp` function to handle the interaction with the Pulp CLI.
- **`cicd/publish.groovy`**:
- Updated Jenkins pipeline to automatically push RPMs to the appropriate Pulp repository (`zopen-stable` or `zopen-dev`) during the release process.

## 3. Binary-Only Dependency Support (`:bin`)

A new mechanism for handling binary-only dependencies has been introduced to `zopen-build`:

- **Syntax:** Dependencies can now be specified with a `:bin` suffix (e.g., `git:bin`).
- **Behavior:** `:bin` dependencies are intended for tools that are only needed for execution (relying on `bin/` and `share/`), rather than for linking or compiling against.
- **`zopen-build` Changes:**
- Refactored environment sourcing (`setDepsEnv`) to handle `:bin` dependencies by temporarily unsetting `ZOPEN_IN_ZOPEN_BUILD`.
- Added `normalizeDeps` logic to prefer full packages if both full and `:bin` versions of the same package are requested.
- **Environment Protection:**
- Modified `.env` generation to wrap `PKG_CONFIG_PATH` updates in a check for `ZOPEN_IN_ZOPEN_BUILD`. This prevents build-time environment variables from leaking into the runtime environment of `:bin` dependencies.

## 4. Shared Library Updates (`include/common.sh`)

New utility functions were added to `common.sh` to support the new dependency logic:
- `parseDeps`: Now correctly handles the `:bin` suffix and extracts it as a property.
- `normalizeDeps`: Deduplicates and prioritizes dependencies, ensuring a consistent environment.

## 5. Automated Reports

- **`docs/upstreamstatus.md`**: The Upstream Patch Status Report has been updated with the latest data on project patches and historical trends.
25 changes: 25 additions & 0 deletions bin/zopen-build
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ Option:
with the .rej extension.
-g, --get-source get the source and apply patch without building.
-gp, --generate-pax generate a pax.Z file based on the install contents.
-gr, --generate-rpm generate an RPM package from the pax archive.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR also adds a top-level zopen-build file that appears as a binary/empty file in the checkout; if it’s intended as an entrypoint wrapper, it may be an accidentally committed artifact or missing content.

Severity: medium

Fix This in Augment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR also changes the binary zopen-diagnostics file (shown as a binary diff); please confirm this binary update is intentional and reproducible from source, not an accidentally committed artifact.

Severity: low

Fix This in Augment

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

-h, --help, -? print this information.
--no-set-active do not change the pinned version.
--no-install-deps do not install project's runtime dependencies.
Expand Down Expand Up @@ -437,6 +438,7 @@ processOptions()
buildEnvFile="./buildenv"
getSourceOnly=false
generatePax=false
generateRPM=false
setActive=true
signPax=false
forcePatchApply=false
Expand Down Expand Up @@ -538,11 +540,16 @@ processOptions()
"-gp" | "--generate-pax")
generatePax=true
;;
"-gr" | "--generate-rpm")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

--generate-rpm currently only flips generateRPM=true, but the RPM creation logic is nested under the pax-generation flow, so using --generate-rpm by itself appears to do nothing (and won’t hit the “ensure --generate-pax” error). Consider either enforcing the pairing or making the behavior explicit to users.

Severity: medium

Other Locations
  • bin/zopen-build:2222

Fix This in Augment

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

generateRPM=true
generatePax=true
;;
"-s" | "--shell")
startShell=true
;;
"-sp" | "--sign-pax")
signPax=true
generatePax=true
;;
*)
printError "Unknown option ${1} specified"
Expand Down Expand Up @@ -2446,7 +2453,25 @@ install()
if ! runAndLog "${ZOPEN_PAX_CMD}"; then
printError "Could not generate pax \"${paxFileName}\""
fi
fi

if ${generateRPM}; then
if [ -f "${paxFileName}" ]; then
printHeader "Generating RPM from ${ZOPEN_INSTALL_DIR}"
rpm_deps=$(echo "${ZOPEN_RUNTIME_DEPS}" | xargs -n1 | sort -u | xargs)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

rpm_deps is normalized via xargs -n1 | sort -u, which splits dependency expressions on whitespace; this will break versioned deps like oef >= 1.1.0 into separate tokens and can produce an invalid --requires/Requires: value in the generated spec.

Severity: medium

Fix This in Augment

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

cmd="PATH=\"${ZOPEN_ROOTFS}/usr/local/bin:${PATH}\" \"${MYDIR}/zopen-pax2rpm\" \"${paxFileName}\" --summary \"${ZOPEN_NAME} package\" --build --buildroot \"${ZOPEN_ROOT}/rpmbuild\""
if [ -n "${rpm_deps}" ]; then
cmd="${cmd} --requires \"${rpm_deps}\""
fi
if ! runAndLog "${cmd}"; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bin/zopen-build:2233: runAndLog executes via eval, so building cmd from variables like paxFileName/ZOPEN_NAME means any unexpected shell metacharacters or quotes in those values can break the command line or be interpreted as additional shell syntax.

Severity: medium

Fix This in Augment

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

printError "Could not generate RPM from \"${paxFileName}\""
fi
else
printError "Pax file ${paxFileName} not found. Ensure --generate-pax is also used."
fi
fi

if ${generatePax}; then
#TODO: Hack so that we can use coreutils md5sum without impacting builds
ZOPEN_DEPS="${ZOPEN_DEPS} coreutils jq"
if [ "${signPax}" = "true" ] && ( [ -z "${ZOPEN_GPG_SECRET_KEY_FILE}" ] || [ -z "${ZOPEN_GPG_SECRET_KEY_PASSPHRASE_FILE}" ] || [ -z "${ZOPEN_GPG_PUBLIC_KEY_FILE}" ] || [ ! -r "${ZOPEN_GPG_SECRET_KEY_FILE}" ] || [ ! -r "${ZOPEN_GPG_SECRET_KEY_PASSPHRASE_FILE}" ] || [ ! -r "${ZOPEN_GPG_PUBLIC_KEY_FILE}" ] ); then
Expand Down
Loading
Loading