diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-07-13 14:17:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 07:17:59 -0400 |
commit | ba52f5d91f61389718e57502a94078b5beaae34f (patch) | |
tree | a76a27a5b925b6d9e360e70ab0c8e1e38809cfef /packaging/installer | |
parent | 70f19efb7d4b5b7543f2d718493fffaaf518f15b (diff) |
Add Oracle Linux 9 to officially supported platforms. (#13367)
* Add Oracle Linux 9 to officially supported platforms.
* Add OL9 dependency handling code.
Diffstat (limited to 'packaging/installer')
-rwxr-xr-x | packaging/installer/dependencies/ol.sh | 22 | ||||
-rwxr-xr-x | packaging/installer/install-required-packages.sh | 7 |
2 files changed, 24 insertions, 5 deletions
diff --git a/packaging/installer/dependencies/ol.sh b/packaging/installer/dependencies/ol.sh index 8d0feb3f53..020bf63ccb 100755 --- a/packaging/installer/dependencies/ol.sh +++ b/packaging/installer/dependencies/ol.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Package tree used for installing netdata on distribution: -# << Oracle Linux: [8] >> +# << Oracle Linux: [8, 9] >> set -e @@ -90,13 +90,17 @@ check_flags() { } validate_tree_ol() { - opts= if [ "${NON_INTERACTIVE}" -eq 1 ]; then echo >&2 "Running in non-interactive mode" opts="-y" fi + # shellcheck disable=SC1091 + source /etc/os-release + + # shellcheck disable=SC2153 + version="$(echo "${VERSION}" | cut -f 1 -d '.')" echo >&2 " > Checking for config-manager ..." if ! dnf config-manager &> /dev/null; then @@ -106,9 +110,17 @@ validate_tree_ol() { fi echo " > Checking for CodeReady Builder ..." - if ! dnf repolist | grep ol8_codeready_builder; then - if prompt "CodeReadyBuilder not found, shall I install it?"; then - dnf ${opts} config-manager --set-enabled ol8_codeready_builder || enable_repo + if [[ "${version}" =~ ^8(\..*)?$ ]]; then + if ! dnf repolist enabled | grep ol8_codeready_builder; then + if prompt "CodeReadyBuilder not found, shall I install it?"; then + dnf ${opts} config-manager --set-enabled ol8_codeready_builder || enable_repo + fi + fi + elif [[ "${version}" =~ ^9(\..*)?$ ]]; then + if ! dnf repolist enabled | grep ol9_codeready_builder; then + if prompt "CodeReadyBuilder not found, shall I install it?"; then + dnf ${opts} config-manager --set-enabled ol9_codeready_builder || enable_repo + fi fi fi diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh index bf7fba1490..a5883420a1 100755 --- a/packaging/installer/install-required-packages.sh +++ b/packaging/installer/install-required-packages.sh @@ -1528,6 +1528,13 @@ validate_tree_ol() { EOF fi fi + elif [[ "${version}" =~ ^9(\..*)?$ ]]; then + echo " > Checking for CodeReady Builder ..." + if ! run ${sudo} dnf repolist enabled | grep -q codeready; then + if prompt "CodeReady Builder not enabled, shall I enable it?"; then + run ${sudo} dnf config-manager --set-enabled ol9_codeready_builder + fi + fi fi } |