0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-26 05:47:20 +00:00

Add Oracle Linux 8 to CI and package builds. ()

* Add OracleLinux 8 to CI and package builds.

* Fix OracleLinux dependency handling.

* Fix package test code for Oracle Linux.
This commit is contained in:
Austin S. Hemmelgarn 2021-11-17 08:56:33 -05:00 committed by GitHub
parent 577f8c0e43
commit c44df34acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 70 additions and 4 deletions

View file

@ -81,6 +81,11 @@
"artifact_key": "opensuse15.2",
"rmjsonc": "zypper rm -y libjson-c-devel"
},
{
"distro": "oraclelinux:8",
"artifact_key": "oraclelinux8",
"rmjsonc": "dnf remove -y json-c-devel"
},
{
"distro": "ubuntu:21.10",
"artifact_key": "ubuntu21.10",

View file

@ -98,7 +98,7 @@ case "${DISTRO}" in
debian | ubuntu)
install_debian_like
;;
fedora)
fedora | oraclelinux)
install_fedora_like
;;
centos)

View file

@ -70,6 +70,8 @@ jobs:
- {distro: opensuse, version: "15.2", pkgclouddistro: opensuse/15.2, format: rpm, base_image: opensuse/leap, platform: linux/arm64/v8, arch: arm64}
- {distro: opensuse, version: "15.3", pkgclouddistro: opensuse/15.3, format: rpm, base_image: opensuse/leap, platform: linux/amd64, arch: amd64}
- {distro: opensuse, version: "15.3", pkgclouddistro: opensuse/15.3, format: rpm, base_image: opensuse/leap, platform: linux/arm64/v8, arch: arm64}
- {distro: oraclelinux, version: "8", pkgclouddistro: ol/8, format: rpm, base_image: oraclelinux, platform: linux/amd64, arch: amd64}
- {distro: oraclelinux, version: "8", pkgclouddistro: ol/8, format: rpm, base_image: oraclelinux, platform: linux/arm64/v8, arch: arm64}
# We intentiaonally disable the fail-fast behavior so that a
# build failure for one version doesn't prevent us from publishing
# successfully built and tested packages for another version.

View file

@ -30,6 +30,7 @@ jobs:
- {distro: fedora, version: "35", pkgclouddistro: fedora/35, format: rpm, base_image: fedora, platform: linux/amd64, arch: amd64}
- {distro: opensuse, version: "15.2", pkgclouddistro: opensuse/15.2, format: rpm, base_image: opensuse/leap, platform: linux/amd64, arch: amd64}
- {distro: opensuse, version: "15.3", pkgclouddistro: opensuse/15.3, format: rpm, base_image: opensuse/leap, platform: linux/amd64, arch: amd64}
- {distro: oraclelinux, version: "8", pkgclouddistro: ol/8, format: rpm, base_image: oraclelinux, platform: linux/amd64, arch: amd64}
# We intentiaonally disable the fail-fast behavior so that a
# build failure for one version doesn't prevent us from publishing
# successfully built and tested packages for another version.

View file

@ -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