From 5646aaa1709a34b0b72c93e7a3c942ef2a654b06 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Nov 2026 10:46:56 +0100 Subject: [PATCH 1/2] ci: fix "Argument list too long" in metadata The previous fix in e8fa0f614dd264df818ea1e683737a81c42bdf5b introduced a problem with the maximum argument length; Run printf '%s\n' "$BUILD_METADATA" > /tmp/release-metadata.json Error: An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/packaging/packaging'. Argument list too long This reverts the changes in that commit, and instead quotes the here document to prevent interpolation. updates: e8fa0f614dd264df818ea1e683737a81c42bdf5b Signed-off-by: Sebastiaan van Stijn --- .github/workflows/.build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/.build.yml b/.github/workflows/.build.yml index e140f03d..6772c9c1 100644 --- a/.github/workflows/.build.yml +++ b/.github/workflows/.build.yml @@ -374,11 +374,11 @@ jobs: rm -rf /tmp/release-squashed - name: Prepare release - env: - BUILD_METADATA: ${{ steps.build.outputs.metadata }} run: | - printf '%s\n' "$BUILD_METADATA" > /tmp/release-metadata.json - + cat > "/tmp/release-metadata.json" <<-'EOF' + ${{ steps.build.outputs.metadata }} + EOF + for tag in $(jq -r '.tags[]' <<< "$DOCKER_METADATA_OUTPUT_JSON"); do echo "* \`${tag}\`" >> /tmp/tags.txt done From 51ec5c3a795d9db8f3c990b26bf25f6d669d08b1 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 11 Nov 2026 10:25:50 +0100 Subject: [PATCH 2/2] fix RPM conflicts in UBI builds and verification UBI images can ship newer RPM packages than their repositories provide, preventing rpm-build and rpm-plugin-selinux from installing their exact-version dependencies. Allow DNF to remove conflicting packages during RHEL build initialization so RPM can match rpm-build. Synchronize the RPM package family in the separate verification image before installing packages that depend on SELinux. On UBI 10, this removes rpm-plugin-syslog and downgrades RPM to the version available in the repositories. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> (cherry picked from commit 7536d51ec38628610c7f0d13cde532e342652075) Signed-off-by: Sebastiaan van Stijn --- hack/scripts/rpm-init.sh | 4 +++- hack/scripts/verify-rpm-init.sh | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hack/scripts/rpm-init.sh b/hack/scripts/rpm-init.sh index cb1c8bc8..f6353bcc 100755 --- a/hack/scripts/rpm-init.sh +++ b/hack/scripts/rpm-init.sh @@ -88,7 +88,9 @@ case "$pkgrelease" in ;; rhel*) # skipping rpmlint as it requires dependencies not available in ubi images - dnf install -y git rpm-build dnf-plugins-core + # UBI images can ship newer RPM packages than their repositories provide. + # Allow removing conflicting packages so RPM can match rpm-build's version. + dnf install -y --allowerasing git rpm-build dnf-plugins-core ;; esac diff --git a/hack/scripts/verify-rpm-init.sh b/hack/scripts/verify-rpm-init.sh index 8a9d661b..39a1ca26 100755 --- a/hack/scripts/verify-rpm-init.sh +++ b/hack/scripts/verify-rpm-init.sh @@ -52,7 +52,13 @@ case "$pkgrelease" in dnf config-manager --enable ol10_addons ol10_codeready_builder dnf install -y findutils ;; - fedora*|rhel*) + rhel*) + # UBI images can ship newer RPM packages than their repositories provide. + # Align RPM before package dependencies pull in plugins such as SELinux. + dnf distro-sync -y --allowerasing 'rpm*' + dnf install -y findutils dnf-plugins-core + ;; + fedora*) dnf install -y findutils dnf-plugins-core ;; rockylinux8|almalinux8)