Skip to content

[DO NOT MERGE] [CLI-3822] Add S390x packaging support#3301

Open
Steven Gagniere (sgagniere) wants to merge 4 commits intomainfrom
s390x-packaging
Open

[DO NOT MERGE] [CLI-3822] Add S390x packaging support#3301
Steven Gagniere (sgagniere) wants to merge 4 commits intomainfrom
s390x-packaging

Conversation

@sgagniere
Copy link
Copy Markdown
Member

@sgagniere Steven Gagniere (sgagniere) commented Apr 3, 2026

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • PLACEHOLDER

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.
  • I have put checkmarks below confirming that the feature associated with this PR is enabled in:
    • Confluent Cloud prod
    • Confluent Cloud stag
    • Confluent Platform
    • Check this box if the feature is enabled for certain organizations only

What

Add s390x support in the packaging scripts.

Also fixes a bug where running make rpm would skip creating the amd64 file if run on a machine with a different architecture.

This PR should not be merged before s390x versions are actually released, since packaging runs on the main branch.

Blast Radius

References

Test & Review

Testing: https://docs.google.com/document/d/13loCTqtZFjVwbjBg6pMVZtp3nc6XeCvPPgY0AHUGptI/edit?usp=sharing

Copilot AI review requested due to automatic review settings April 3, 2026 01:06
@confluent-cla-assistant
Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@sgagniere Steven Gagniere (sgagniere) changed the title S390x packaging [DO NOT MERGE] Add S390x packaging support Apr 3, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds s390x support to the CLI packaging flow, ensuring the packaging scripts recognize and bundle s390x binaries, and adjusting RPM packaging so make rpm reliably produces an amd64 RPM even when run on non-amd64 hosts.

Changes:

  • Add linux/s390x to supported platforms in the launcher script.
  • Download and package linux_s390x archives in the Debian packaging Makefile.
  • Extend RPM packaging to build amd64/arm64/s390x RPMs and update the spec template to exclude two non-target Linux arch directories per build.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packaging/confluent.sh Recognizes linux/s390x as a supported platform for runtime selection.
debian/Makefile Downloads linux_s390x archive; builds RPMs for amd64/arm64/s390x; forces amd64 target to avoid host-arch mismatch.
debian/confluent-cli.spec.in Updates RPM %exclude directives to support excluding two non-target Linux arch directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +119 to +137
rpm: rpm-amd64-build rpm-arm64-build rpm-s390x-build
find RPM_BUILDING/{,S}RPMS/ -type f | xargs -n1 -iXXX mv XXX .
@echo
@echo "================================================="
@echo "The RPMs have been created and can be found here:"
@ls -laF $(FULL_PACKAGE_TITLE)*rpm
@echo "================================================="

rpm-amd64-build: rpm-amd64-spec
echo "Building the amd64 RPM"
rpmbuild --define="_topdir `pwd`/RPM_BUILDING" --nodebuginfo -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz || rpmbuild --define="_topdir `pwd`/RPM_BUILDING" -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz
rpmbuild --target=x86_64 --define="_topdir `pwd`/RPM_BUILDING" --nodebuginfo -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz || rpmbuild --target=x86_64 --define="_topdir `pwd`/RPM_BUILDING" -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz

rpm-arm64-build: rpm-arm64-spec
echo "Building the arm64 RPM"
rpmbuild --target=aarch64 --define="_topdir `pwd`/RPM_BUILDING" --nodebuginfo -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz || rpmbuild --target=aarch64 --define="_topdir `pwd`/RPM_BUILDING" -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz
find RPM_BUILDING/{,S}RPMS/ -type f | xargs -n1 -iXXX mv XXX .
echo
echo "================================================="
echo "The RPMs have been created and can be found here:"
@ls -laF $(FULL_PACKAGE_TITLE)*rpm
echo "================================================="

rpm-s390x-build: rpm-s390x-spec
echo "Building the s390x RPM"
rpmbuild --target=s390x --define="_topdir `pwd`/RPM_BUILDING" --nodebuginfo -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz || rpmbuild --target=s390x --define="_topdir `pwd`/RPM_BUILDING" -tb RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

The rpm target depends on three arch builds that all (via the rpm-*-spec prerequisites) write to the same tarball path RPM_BUILDING/SOURCES/$(FULL_PACKAGE_TITLE)-$(RPM_VERSION).tar.gz. If make is invoked with parallelism (e.g., make -j rpm), those spec/build recipes can run concurrently and race/overwrite that shared tarball, leading to non-deterministic or corrupted RPM outputs. Consider making the rpm-related targets non-parallel (e.g., .NOTPARALLEL for rpm/rpm-*-build/rpm-*-spec) or generating per-arch source tarballs (distinct filenames) and pointing each rpmbuild invocation at its arch-specific tarball.

Copilot uses AI. Check for mistakes.
@sgagniere Steven Gagniere (sgagniere) changed the title [DO NOT MERGE] Add S390x packaging support [DO NOT MERGE] [CLI-3822] Add S390x packaging support Apr 3, 2026
@sgagniere Steven Gagniere (sgagniere) marked this pull request as ready for review April 3, 2026 21:36
@sgagniere Steven Gagniere (sgagniere) requested a review from a team as a code owner April 3, 2026 21:36
@sonarqube-confluent
Copy link
Copy Markdown

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