-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add s390x architecture support for CI, packaging, and binary validation #5391
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
base: master
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -109,6 +109,15 @@ class NugetPackage (Package): | |
| './usr/local/lib/librdkafka.so.1', | ||
| 'runtimes/linux-arm64/native/alpine-librdkafka.so'), | ||
|
|
||
| # Linux glibc centos8 s390x without GSSAPI (no external deps) | ||
|
Member
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. Check with Emanuele Sabellico (@emasab) on whether we need similar one for |
||
| Mapping({'arch': 's390x', | ||
| 'plat': 'linux', | ||
| 'dist': 'centos8', | ||
| 'lnk': 'all'}, | ||
| 'librdkafka.tgz', | ||
| './usr/local/lib/librdkafka.so.1', | ||
| 'runtimes/linux-s390x/native/librdkafka.so'), | ||
|
|
||
| # Common Win runtime | ||
| Mapping({'arch': 'x64', | ||
| 'plat': 'win'}, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ def unquote(path): | |
| ('win', 'x86', '.lib'): re.compile('current ar archive'), | ||
| ('linux', 'x64', '.so'): re.compile('ELF 64.* x86-64'), | ||
| ('linux', 'arm64', '.so'): re.compile('ELF 64.* ARM aarch64'), | ||
| ('linux', 's390x', '.so'): re.compile('ELF 64.* IBM S/390'), | ||
|
Member
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. If we run The format looks correct but lets reconfirm once if we need this change. |
||
| ('osx', 'x64', '.dylib'): re.compile('Mach-O 64.* x86_64'), | ||
| ('osx', 'arm64', '.dylib'): re.compile('Mach-O 64.*arm64')} | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,9 +11,10 @@ | |
| # alpine:3.16 | ||
| # quay.io/pypa/manylinux_2_28_aarch64 (centos8) | ||
| # quay.io/pypa/manylinux_2_28_x86_64 (centos8) | ||
| # quay.io/pypa/manylinux_2_28_s390x (centos8, requires QEMU binfmt) | ||
| # | ||
| # Usage: | ||
| # packaging/tools/build-release-artifacts.sh [--disable-gssapi] <docker-image> <relative-output-tarball-path.tgz> | ||
| # packaging/tools/build-release-artifacts.sh [--disable-gssapi] [--platform <docker-platform>] <docker-image> <relative-output-tarball-path.tgz> | ||
| # | ||
| # The output path must be a relative path and inside the librdkafka directory | ||
| # structure. | ||
|
|
@@ -42,20 +43,26 @@ else | |
| disable_gssapi="" | ||
| fi | ||
|
|
||
| docker_platform="" | ||
| if [ "$1" = "--platform" ]; then | ||
| docker_platform="--platform=$2" | ||
| shift 2 | ||
| fi | ||
|
Comment on lines
+46
to
+50
|
||
|
|
||
| # Check if we're running on the host or the (docker) build target. | ||
| if [ "$1" = "--in-docker" -a $# -eq 2 ]; then | ||
| output="$2" | ||
| elif [ $# -eq 2 ]; then | ||
| docker_image="$1" | ||
| output="$2" | ||
| else | ||
| echo "Usage: $0 [--disable-gssapi] <manylinux-docker-image> <output-path.tgz>" | ||
| echo "Usage: $0 [--disable-gssapi] [--platform <docker-platform>] <manylinux-docker-image> <output-path.tgz>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -n "$docker_image" ]; then | ||
| # Running on the host, spin up the docker builder. | ||
| exec docker run -v "$PWD:/v" $docker_image /v/packaging/tools/build-release-artifacts.sh $disable_gssapi --in-docker "/v/$output" | ||
| exec docker run $docker_platform -v "$PWD:/v" $docker_image /v/packaging/tools/build-release-artifacts.sh $disable_gssapi --in-docker "/v/$output" | ||
| # Only reached on exec error | ||
| exit $? | ||
| fi | ||
|
|
@@ -76,7 +83,7 @@ if grep -q alpine /etc/os-release 2>/dev/null ; then | |
|
|
||
| else | ||
| # CentOS | ||
| yum install -y libstdc++-devel gcc gcc-c++ python3 git perl-IPC-Cmd perl-Pod-Html $extra_pkgs_rpm | ||
| yum install -y libstdc++-devel gcc gcc-c++ python3 git perl-IPC-Cmd perl-Pod-Html perl-bignum $extra_pkgs_rpm | ||
| fi | ||
|
|
||
|
|
||
|
|
||
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.
The binfmt helper container is referenced without a tag or digest (
tonistiigi/binfmt). This makes the CI setup non-reproducible and increases supply-chain risk if the upstream image changes. Pin this image to a specific version tag (or, ideally, an immutable digest).