[DO NOT MERGE] [CLI-3822] Add S390x packaging support#3301
[DO NOT MERGE] [CLI-3822] Add S390x packaging support#3301Steven Gagniere (sgagniere) wants to merge 4 commits intomainfrom
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
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/s390xto supported platforms in the launcher script. - Download and package
linux_s390xarchives 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.
| 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 |
There was a problem hiding this comment.
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.
|





Release Notes
Breaking Changes
New Features
Bug Fixes
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Add s390x support in the packaging scripts.
Also fixes a bug where running
make rpmwould 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