mirror of
https://github.com/xcat2/confluent.git
synced 2026-10-20 06:35:33 +00:00
6c48cb4fad
Build the rpms for EL9, EL10 and SUSE 16 and the debs for Ubuntu noble and resolute, each for x86_64 and aarch64, install every set on a clean container and publish them as a rolling nightly pre-release. Each release asset is one target's bundle: all of its packages, repository metadata and an INSTALL.txt. Besides the in-tree components this packages confluent_ipxe from the iPXE release roms and the browserfs and vinz helpers from their own repositories. The osdeploy utils are built where buildrpm builds them, el7 for the x86_64 el8bin set, so they still run on the oldest targets. Genesis is left out for now. Noarch packages are built once, in the x86_64 legs, and the aarch64 legs build only what is architecture specific. Build tools are installed without weak dependencies, while the smoke tests keep the distribution defaults, since they stand in for a user's install. Scheduled runs skip the build when neither confluent nor the helper repositories moved since the last published nightly. Pull requests that touch the packaging build and test without publishing.
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build the confluent rpms whose spec depends on the target distribution:
|
|
# confluent_vtbufferd (arch-specific) and, unless --arch-only is given, the
|
|
# noarch client, server and imgutil. Runs inside an EL or openSUSE container.
|
|
#
|
|
# Usage: build-rpms.sh [--arch-only]
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
if command -v zypper > /dev/null; then
|
|
zypper -n install --no-recommends rpm-build gcc make git-core tar xz pandoc systemd python3 python3-setuptools
|
|
# the buildrpm scripts stage into ~/rpmbuild, SUSE defaults to /usr/src/packages
|
|
echo "%_topdir $HOME/rpmbuild" >> ~/.rpmmacros
|
|
else
|
|
dnf -y --setopt=install_weak_deps=False install epel-release
|
|
dnf -y --setopt=install_weak_deps=False install rpm-build gcc make git-core tar xz pandoc systemd python3 python3-setuptools
|
|
fi
|
|
git config --global --add safe.directory "$PWD"
|
|
./mkversion
|
|
mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/SPECS
|
|
|
|
# the buildrpm scripts hide rpmbuild's output, so on failure rerun the spec
|
|
# they wrote to show why
|
|
build() {
|
|
"$1/buildrpm" && return 0
|
|
spec=~/rpmbuild/SPECS/$(basename "$1").spec
|
|
[ -f "$spec" ] && rpmbuild -ba "$spec"
|
|
return 1
|
|
}
|
|
|
|
build confluent_vtbufferd
|
|
if [ "$1" != "--arch-only" ]; then
|
|
build confluent_client
|
|
build confluent_server
|
|
# imgutil/buildrpm calls rpmbuild directly, so its output is visible
|
|
./imgutil/buildrpm
|
|
fi
|