Skip to content

Commit

Permalink
s390x rpm support (#3286)
Browse files Browse the repository at this point in the history
Signed-off-by: cfillekes <[email protected]>
  • Loading branch information
cfilleke authored May 26, 2024
1 parent 6d9c106 commit 4a64af4
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,14 @@ build:crossbuild-aarch64 --incompatible_enable_cc_toolchain_resolution --platfor
run:crossbuild-aarch64 --incompatible_enable_cc_toolchain_resolution --platforms=//bazel/platforms:aarch64-none-linux-gnu --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64_cgo
test:crossbuild-aarch64 --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64_cgo --host_javabase=@local_jdk//:jdk

build:s390x --platforms=@io_bazel_rules_go//go/toolchain:linux_s390x_cgo --incompatible_use_cc_configure_from_rules_cc
run:s390x --platforms=@io_bazel_rules_go//go/toolchain:linux_s390x_cgo --incompatible_use_cc_configure_from_rules_cc
test:s390x --platforms=@io_bazel_rules_go//go/toolchain:linux_s390x_cgo --host_javabase=@local_jdk//:jdk

build:crossbuild-s390x --incompatible_enable_cc_toolchain_resolution --platforms=//bazel/platforms:s390x-none-linux-gnu --platforms=@io_bazel_rules_go
//go/toolchain:linux_s390x_cgo
run:crossbuild-s390x --incompatible_enable_cc_toolchain_resolution --platforms=//bazel/platforms:s390x-none-linux-gnu --platforms=@io_bazel_rules_go/
/go/toolchain:linux_s390x_cgo
test:crossbuild-s390x --platforms=@io_bazel_rules_go//go/toolchain:linux_s390x_cgo --host_javabase=@local_jdk//:jdk

build --define gotags=selinux
53 changes: 53 additions & 0 deletions hack/build/rpm-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,56 @@ bazel run \
bazel run \
--config=aarch64 \
//:bazeldnf -- prune

# s390x #####
# XXX: passing --nobest otherwise we fail to solve the dependencies
bazel run \
--config=s390x \
//:bazeldnf -- rpmtree \
--public \
--name testimage_s390x --arch s390x \
--nobest \
--basesystem centos-stream-release \
${bazeldnf_repos} \
$centos_base \
$centos_extra \
$testimage

bazel run \
--config=s390x \
//:bazeldnf -- rpmtree \
--public --nobest \
--name centos_base_s390x --arch s390x \
--basesystem centos-stream-release \
${bazeldnf_repos} \
$centos_base \
$centos_extra

bazel run \
--config=s390x \
//:bazeldnf -- rpmtree \
--public --nobest \
--name cdi_importer_base_s390x --arch s390x \
--basesystem centos-stream-release \
${bazeldnf_repos} \
$centos_base \
$centos_extra \
$cdi_importer

bazel run \
--config=s390x \
//:bazeldnf -- rpmtree \
--public --nobest \
--name cdi_uploadserver_base_s390x --arch s390x\
--basesystem centos-stream-release \
${bazeldnf_repos} \
$centos_base \
$centos_extra \
$cdi_uploadserver

# remove all RPMs which are no longer referenced by a rpmtree
bazel run \
--config=s390x \
//:bazeldnf -- prune


10 changes: 9 additions & 1 deletion repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ repositories:
gpgkey: https://download.copr.fedorainfracloud.org/results/nsoffer/ovirt-imageio-preview/pubkey.gpg
- arch: aarch64
baseurl: https://download.copr.fedorainfracloud.org/results/ovirt/ovirt-master-snapshot/centos-stream-9-aarch64/
name: ovirt-master-snapshot-aarch64
name: ovirt-master-snapshot-aarch64
- arch: s390x
baseurl: http://mirror.stream.centos.org/9-stream/BaseOS/s390x/os/
name: centos/stream9-baseos-s390x
gpgkey: https://www.stream.centos.org/keys/RPM-GPG-KEY-CentOS-Official
- arch: s390x
baseurl: http://mirror.stream.centos.org/9-stream/AppStream/s390x/os/
name: centos/stream9-appstream-s390x
gpgkey: https://www.stream.centos.org/keys/RPM-GPG-KEY-CentOS-Official

0 comments on commit 4a64af4

Please sign in to comment.