-
Notifications
You must be signed in to change notification settings - Fork 40
Added rpm package as part of build #1149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0e5c922
993c3ea
f271bac
d9b16e5
5531b9b
9da910e
962d0b3
541aa2e
057745d
edb4824
2fa9f22
703956e
5eb36a2
c04a514
eacfd78
eb99671
36ee648
e7315bb
de65cc5
a5b764f
b8fe3d7
da8ecec
b4f4673
e2e30b7
c69d7d7
ce87ca7
22636bd
a48a13a
b58d0e1
91b80cc
79703a4
471ae27
25749eb
7f2eafe
93e7714
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| -h, --help, -? print this information. | ||
| --no-set-active do not change the pinned version. | ||
| --no-install-deps do not install project's runtime dependencies. | ||
|
|
@@ -437,6 +438,7 @@ processOptions() | |
| buildEnvFile="./buildenv" | ||
| getSourceOnly=false | ||
| generatePax=false | ||
| generateRPM=false | ||
| setActive=true | ||
| signPax=false | ||
| forcePatchApply=false | ||
|
|
@@ -538,11 +540,16 @@ processOptions() | |
| "-gp" | "--generate-pax") | ||
| generatePax=true | ||
| ;; | ||
| "-gr" | "--generate-rpm") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Severity: medium Other Locations
🤖 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" | ||
|
|
@@ -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) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Severity: medium 🤖 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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Severity: medium 🤖 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 | ||
|
|
||
There was a problem hiding this comment.
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-buildfile 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
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.