From 45251bd7d0b29973d597b72a741eb38b51813b0b Mon Sep 17 00:00:00 2001 From: cfillekes Date: Mon, 29 Jan 2024 14:25:51 +0100 Subject: [PATCH] enable and configure rpm processing for s390x Signed-off-by: cfillekes --- .bazelrc | 8 +++++++ hack/build/rpm-deps.sh | 52 ++++++++++++++++++++++++++++++++++++++++++ repo.yaml | 10 +++++++- 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index f62636af5f..29fb3a21cf 100644 --- a/.bazelrc +++ b/.bazelrc @@ -18,4 +18,12 @@ 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 diff --git a/hack/build/rpm-deps.sh b/hack/build/rpm-deps.sh index 53aa906203..b4d28c60c8 100755 --- a/hack/build/rpm-deps.sh +++ b/hack/build/rpm-deps.sh @@ -169,3 +169,55 @@ 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 + diff --git a/repo.yaml b/repo.yaml index 271b916231..1adc62f457 100644 --- a/repo.yaml +++ b/repo.yaml @@ -22,4 +22,12 @@ repositories: - arch: aarch64 baseurl: https://download.copr.fedorainfracloud.org/results/nsoffer/ovirt-imageio-preview/centos-stream-9-aarch64/ name: ovirt-imageio-preview - gpgkey: https://download.copr.fedorainfracloud.org/results/nsoffer/ovirt-imageio-preview/pubkey.gpg \ No newline at end of file + gpgkey: https://download.copr.fedorainfracloud.org/results/nsoffer/ovirt-imageio-preview/pubkey.gpg +- 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