Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tools/read-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DEFAULT_REQUIREMENTS = 'requirements.txt'
# Map the appropriate package dir needed for each distro choice
DISTRO_PKG_TYPE_MAP = {
'centos': 'redhat',
'rocky': 'redhat',
'redhat': 'redhat',
'debian': 'debian',
'ubuntu': 'debian',
Expand Down Expand Up @@ -64,11 +65,13 @@ ZYPPER_INSTALL = [
'--auto-agree-with-licenses']

DRY_DISTRO_INSTALL_PKG_CMD = {
'rocky': ['yum', 'install', '--assumeyes'],
'centos': ['yum', 'install', '--assumeyes'],
'redhat': ['yum', 'install', '--assumeyes'],
}

DISTRO_INSTALL_PKG_CMD = {
'rocky': MAYBE_RELIABLE_YUM_INSTALL,
'centos': MAYBE_RELIABLE_YUM_INSTALL,
'redhat': MAYBE_RELIABLE_YUM_INSTALL,
'debian': ['apt', 'install', '-y'],
Expand Down Expand Up @@ -273,10 +276,10 @@ def pkg_install(pkg_list, distro, test_distro=False, dry_run=False):
cmd = DRY_DISTRO_INSTALL_PKG_CMD[distro]
install_cmd.extend(cmd)

if distro in ['centos', 'redhat']:
if distro in ['centos', 'redhat', 'rocky']:
# CentOS and Redhat need epel-release to access oauthlib and jsonschema
subprocess.check_call(install_cmd + ['epel-release'])
if distro in ['suse', 'opensuse', 'redhat', 'centos']:
if distro in ['suse', 'opensuse', 'redhat', 'rocky', 'centos']:
pkg_list.append('rpm-build')
subprocess.check_call(install_cmd + pkg_list)

Expand Down
8 changes: 4 additions & 4 deletions tools/run-container
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ os_info() {

get_os_info() {
# run inside container, set OS_NAME, OS_VERSION
# example OS_NAME are centos, debian, opensuse
# example OS_NAME are centos, debian, opensuse, rockylinux
[ -n "${OS_NAME:-}" -a -n "${OS_VERSION:-}" ] && return 0
if [ -f /etc/os-release ]; then
OS_NAME=$(sh -c '. /etc/os-release; echo $ID')
Expand Down Expand Up @@ -247,7 +247,7 @@ apt_install() {
install_packages() {
get_os_info || return
case "$OS_NAME" in
centos) yum_install "$@";;
centos|rocky*) yum_install "$@";;
opensuse) zypper_install "$@";;
debian|ubuntu) apt_install "$@";;
*) error "Do not know how to install packages on ${OS_NAME}";
Expand Down Expand Up @@ -485,7 +485,7 @@ main() {

local build_pkg="" build_srcpkg="" pkg_ext="" distflag=""
case "$OS_NAME" in
centos) distflag="--distro=redhat";;
centos|rocky) distflag="--distro=redhat";;
opensuse) distflag="--distro=suse";;
esac

Expand All @@ -494,7 +494,7 @@ main() {
build_pkg="./packages/bddeb -d"
build_srcpkg="./packages/bddeb -S -d"
pkg_ext=".deb";;
centos|opensuse)
centos|opensuse|rocky)
build_pkg="./packages/brpm $distflag"
build_srcpkg="./packages/brpm $distflag --srpm"
pkg_ext=".rpm";;
Expand Down