mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 02:20:37 +00:00
the centos image repos on docker has been deprecated, and the repo for centos7 has been removed from the main CentOS servers. so we are either not able to install packages from its default repo, without using the vault mirror, or no longer to pull its image from dockerhub. so, in this change * we switch over to rockylinux:9, which is the latest stable release of rockylinux, and rockylinux is a popular clone of RHEL, so it matches our expectation of a typical use case of scylla. * use dnf to manage the packages. as dnf is the standard way to manage rpm packages in modern RPM-based distributions. * do not install deltarpm. delta rpms are was not supported since RHEL8, and the `deltarpm` package is not longer available ever since. see https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#ref_the-deltarpm-functionality-is-no-longer-supported_notable-changes-to-the-yum-stack as a sequence, this package does not exist in Rockylinux-9. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
68 lines
1.5 KiB
Bash
Executable File
68 lines
1.5 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
#
|
|
# Copyright (C) 2020-present ScyllaDB
|
|
#
|
|
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
|
|
PROGRAM=$(basename $0)
|
|
|
|
print_usage() {
|
|
echo "Usage: $PROGRAM [OPTION]..."
|
|
echo ""
|
|
echo " --mode MODE The build mode of 'scylla' to verify (options: 'release', 'dev', and 'debug')."
|
|
exit 1
|
|
}
|
|
|
|
if which podman > /dev/null 2>&1 ; then
|
|
contool=podman
|
|
elif which docker > /dev/null 2>&1 ; then
|
|
contool=docker
|
|
else
|
|
echo "Please make sure you have either podman or docker installed on this host in order to use dist-chec"
|
|
exit 1
|
|
fi
|
|
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
"--mode")
|
|
MODE=$2
|
|
shift 2
|
|
;;
|
|
"--help")
|
|
print_usage
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ -z "$MODE" ]; then
|
|
print_usage
|
|
fi
|
|
|
|
if [ -f /.dockerenv ]; then
|
|
echo "error: running $PROGRAM in container is not supported, please run on host."
|
|
exit 1
|
|
fi
|
|
|
|
container_images=(
|
|
docker.io/rockylinux:9
|
|
)
|
|
|
|
for container_image in "${container_images=[@]}"
|
|
do
|
|
container_script="${container_image//:/-}"
|
|
install_sh="$(pwd)/tools/testing/dist-check/$container_script.sh"
|
|
if [ -f "$install_sh" ]; then
|
|
$contool run -i --rm -v $(pwd):$(pwd):Z $container_image /bin/bash -c "cd $(pwd) && $install_sh --mode $MODE"
|
|
else
|
|
echo "internal error: $install_sh does not exist, please create one to verify packages on $container_image."
|
|
exit 1
|
|
fi
|
|
done
|