diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2021-11-17 08:56:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 08:56:33 -0500 |
commit | c44df34acc2d839d1dd06fd4f987142012e18a89 (patch) | |
tree | 03aa2eec04b733554650fe5d5f79b6beaf2024ca /packaging | |
parent | 577f8c0e43d15238f9cdecf036fa889605136d66 (diff) |
Add Oracle Linux 8 to CI and package builds. (#11776)
* Add OracleLinux 8 to CI and package builds.
* Fix OracleLinux dependency handling.
* Fix package test code for Oracle Linux.
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/installer/install-required-packages.sh | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh index e236340bf2..6eeda53c0d 100755 --- a/packaging/installer/install-required-packages.sh +++ b/packaging/installer/install-required-packages.sh @@ -198,7 +198,7 @@ get_os_release() { eval "$(grep -E "^(NAME|ID|ID_LIKE|VERSION|VERSION_ID)=" "${os_release_file}")" for x in "${ID}" ${ID_LIKE}; do case "${x,,}" in - alpine | arch | centos | clear-linux-os | debian | fedora | gentoo | manjaro | opensuse-leap | rhel | sabayon | sles | suse | ubuntu) + alpine | arch | centos | clear-linux-os | debian | fedora | gentoo | manjaro | opensuse-leap | ol | rhel | sabayon | sles | suse | ubuntu) distribution="${x}" version="${VERSION_ID}" codename="${VERSION}" @@ -345,7 +345,7 @@ user_picks_distribution() { if [ "${REPLY}" = "yum" ] && [ -z "${distribution}" ]; then REPLY= while [ -z "${REPLY}" ]; do - if ! read -r -p "yum in centos, rhel or fedora? > "; then + if ! read -r -p "yum in centos, rhel, ol or fedora? > "; then continue fi @@ -353,11 +353,14 @@ user_picks_distribution() { fedora | rhel) distribution="rhel" ;; + ol) + distribution="ol" + ;; centos) distribution="centos" ;; *) - echo >&2 "Please enter 'centos', 'fedora' or 'rhel'." + echo >&2 "Please enter 'centos', 'fedora', 'ol' or 'rhel'." REPLY= ;; esac @@ -438,6 +441,17 @@ detect_package_manager_from_distribution() { fi ;; + ol*) + package_installer= + tree="ol" + [ -n "${dnf}" ] && package_installer="install_dnf" + [ -n "${yum}" ] && package_installer="install_yum" + if [ "${IGNORE_INSTALLED}" -eq 0 ] && [ -z "${package_installer}" ]; then + echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system." + exit 1 + fi + ;; + suse* | opensuse* | sles*) package_installer="install_zypper" tree="suse" @@ -501,6 +515,8 @@ check_package_manager() { package_installer="install_dnf" if [ "${distribution}" = "centos" ]; then tree="centos" + elif [ "${distribution}" = "ol" ]; then + tree="ol" else tree="rhel" fi @@ -554,6 +570,8 @@ check_package_manager() { package_installer="install_yum" if [ "${distribution}" = "centos" ]; then tree="centos" + elif [ "${distribution}" = "ol" ]; then + tree="ol" else tree="rhel" fi @@ -791,6 +809,7 @@ declare -A pkg_libz_dev=( ['gentoo']="sys-libs/zlib" ['sabayon']="sys-libs/zlib" ['rhel']="zlib-devel" + ['ol']="zlib-devel" ['suse']="zlib-devel" ['clearlinux']="devpkg-zlib" ['macos']="NOTREQUIRED" @@ -807,6 +826,7 @@ declare -A pkg_libuuid_dev=( ['gentoo']="sys-apps/util-linux" ['sabayon']="sys-apps/util-linux" ['rhel']="libuuid-devel" + ['ol']="libuuid-devel" ['suse']="libuuid-devel" ['macos']="NOTREQUIRED" ['freebsd']="e2fsprogs-libuuid" @@ -821,6 +841,7 @@ declare -A pkg_libmnl_dev=( ['gentoo']="net-libs/libmnl" ['sabayon']="net-libs/libmnl" ['rhel']="libmnl-devel" + ['ol']="libmnl-devel" ['suse']="libmnl-devel" ['clearlinux']="devpkg-libmnl" ['macos']="NOTREQUIRED" @@ -878,6 +899,7 @@ declare -A pkg_netcat=( ['gentoo']="net-analyzer/netcat" ['sabayon']="net-analyzer/gnu-netcat" ['rhel']="nmap-ncat" + ['ol']="nmap-ncat" ['suse']="netcat-openbsd" ['clearlinux']="sysadmin-basic" ['arch']="gnu-netcat" @@ -922,6 +944,7 @@ declare -A pkg_pkg_config=( ['gentoo']="virtual/pkgconfig" ['sabayon']="virtual/pkgconfig" ['rhel']="pkgconfig" + ['ol']="pkgconfig" ['suse']="pkg-config" ['freebsd']="pkgconf" ['clearlinux']="c-basic" @@ -953,6 +976,7 @@ declare -A pkg_python_mysqldb=( # exceptions ['fedora-24']="python2-mysql" + ['ol-8']="WARNING|" ) declare -A pkg_python3_mysqldb=( @@ -963,6 +987,7 @@ declare -A pkg_python3_mysqldb=( ['gentoo']="dev-python/mysqlclient" ['sabayon']="dev-python/mysqlclient" ['rhel']="WARNING|" + ['ol']="WARNING|" ['suse']="WARNING|" ['clearlinux']="WARNING|" ['macos']="WARNING|" @@ -994,6 +1019,7 @@ declare -A pkg_python_psycopg2=( ['gentoo']="dev-python/psycopg" ['sabayon']="dev-python/psycopg:2" ['rhel']="python-psycopg2" + ['ol']="python-psycopg2" ['suse']="python-psycopg2" ['clearlinux']="WARNING|" ['macos']="WARNING|" @@ -1008,6 +1034,7 @@ declare -A pkg_python3_psycopg2=( ['gentoo']="dev-python/psycopg" ['sabayon']="dev-python/psycopg:2" ['rhel']="WARNING|" + ['ol']="WARNING|" ['suse']="WARNING|" ['clearlinux']="WARNING|" ['macos']="WARNING|" @@ -1017,6 +1044,7 @@ declare -A pkg_python3_psycopg2=( ['centos-8']="python38-psycopg2" ['rhel-7']="python3-psycopg2" ['rhel-8']="python38-psycopg2" + ['ol-8']="python3-psycopg2" ) declare -A pkg_python_pip=( @@ -1047,6 +1075,7 @@ declare -A pkg_python_pymongo=( ['suse']="python-pymongo" ['clearlinux']="WARNING|" ['rhel']="WARNING|" + ['ol']="WARNING|" ['macos']="WARNING|" ['default']="python-pymongo" ) @@ -1060,6 +1089,7 @@ declare -A pkg_python3_pymongo=( ['suse']="python3-pymongo" ['clearlinux']="WARNING|" ['rhel']="WARNING|" + ['ol']="WARNING|" ['freebsd']="py37-pymongo" ['macos']="WARNING|" ['default']="python3-pymongo" @@ -1068,6 +1098,7 @@ declare -A pkg_python3_pymongo=( ['centos-8']="python3-pymongo" ['rhel-7']="python36-pymongo" ['rhel-8']="python3-pymongo" + ['ol-8']="python3-pymongo" ) declare -A pkg_python_requests=( @@ -1103,6 +1134,7 @@ declare -A pkg_python3_requests=( ['centos-8']="python3-requests" ['rhel-7']="python36-requests" ['rhel-8']="python3-requests" + ['ol-8']="python3-requests" ) declare -A pkg_lz4=( @@ -1206,6 +1238,7 @@ declare -A pkg_valgrind=( declare -A pkg_ulogd=( ['centos']="WARNING|" ['rhel']="WARNING|" + ['ol']="WARNING|" ['clearlinux']="WARNING|" ['gentoo']="app-admin/ulogd" ['arch']="ulogd" @@ -1235,6 +1268,7 @@ declare -A pkg_libelf=( ['fedora']="elfutils-libelf-devel" ['centos']="elfutils-libelf-devel" ['rhel']="elfutils-libelf-devel" + ['ol']="elfutils-libelf-devel" ['clearlinux']="devpkg-elfutils" ['suse']="libelf-devel" ['macos']="NOTREQUIRED" @@ -1544,6 +1578,30 @@ validate_tree_freebsd() { fi } +validate_tree_ol() { + local opts= + if [ "${NON_INTERACTIVE}" -eq 1 ]; then + echo >&2 "Running in non-interactive mode" + opts="-y" + fi + + if [[ "${version}" =~ ^8(\..*)?$ ]]; then + echo " > Checking for CodeReady Builder ..." + if ! run ${sudo} dnf repolist | grep -q codeready; then + if prompt "CodeReady Builder not found, shall I install it?"; then + cat > /etc/yum.repos.d/ol8_codeready.repo <<-EOF + [ol8_codeready_builder] + name=Oracle Linux \$releasever CodeReady Builder (\$basearch) + baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/codeready/builder/\$basearch + gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle + gpgcheck=1 + enabled=1 + EOF + fi + fi + fi +} + validate_tree_centos() { local opts= if [ "${NON_INTERACTIVE}" -eq 1 ]; then |