Added CentOS-Stream to distros (#15742)
* Added CentOS-Stream to distros Containers added https://github.com/netdata/helper-images/pull/219 * Update .github/scripts/pkg-test.sh Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> * pkg-test.sh: disable shellcheck for bad shell function --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Konstantin Shalygin committed
Aug 18, 2023 at 16:40 UTC
6c50aefb74178495f30035099784ae7ea725af0e
6 files changed
+49
-22
.github/data/distros.yml
+24
-1
@@ -108,7 +108,6 @@ include:
108
<<: *amzn_packages
109
repo_distro: amazonlinux/2023
110
111
-
111
- distro: centos
112
version: "7"
113
support_type: Core
@@ -125,6 +124,30 @@ include:
124
test:
125
ebpf-core: false
126
127
+ - ¢os_stream
128
+ distro: centos-stream
129
+ base_image: 'quay.io/centos/centos:stream9'
130
+ version: '9'
131
+ support_type: 'Community'
132
+ notes: ''
133
+ jsonc_removal: |
134
+ dnf remove -y json-c-devel
135
+ eol_check: true
136
+ packages: &cs_packages
137
+ type: rpm
138
+ repo_distro: el/c9s
139
+ arches:
140
+ - x86_64
141
+ - aarch64
142
+ test:
143
+ ebpf-core: true
144
+ - <<: *centos_stream
145
+ version: '8'
146
+ base_image: 'quay.io/centos/centos:stream8'
147
+ packages:
148
+ <<: *cs_packages
149
+ repo_distro: el/c8s
150
+
151
- &debian
152
distro: debian
153
version: "12"
.github/scripts/ci-support-pkgs.sh
+2
-1
@@ -9,7 +9,8 @@ set -e
9
10
case "${ID}" in
11
amzn|almalinux|centos|fedora)
12
- dnf install -y procps-ng cronie cronie-anacron || yum install -y procps-ng cronie cronie-anacron
12
+ dnf install -y procps-ng cronie cronie-anacron || \
13
+ yum install -y procps-ng cronie cronie-anacron
14
;;
15
arch)
16
pacman -S --noconfirm cronie
.github/scripts/pkg-test.sh
+11
-9
@@ -14,7 +14,9 @@ install_debian_like() {
14
15
# Install Netdata
16
# Strange quoting is required here so that glob matching works.
17
- apt-get install -y $(find /netdata/artifacts -type f -name 'netdata*.deb' ! -name '*dbgsym*' ! -name '*cups*' ! -name '*freeipmi*') || exit 3
17
+ # shellcheck disable=SC2046
18
+ apt-get install -y $(find /netdata/artifacts -type f -name 'netdata*.deb' \
19
+! -name '*dbgsym*' ! -name '*cups*' ! -name '*freeipmi*') || exit 3
20
21
# Install testing tools
22
apt-get install -y --no-install-recommends curl "${netcat}" jq || exit 1
@@ -32,10 +34,10 @@ install_fedora_like() {
34
35
# Install Netdata
36
# Strange quoting is required here so that glob matching works.
35
- "$PKGMGR" install -y /netdata/artifacts/netdata*.rpm || exit 1
37
+ "${PKGMGR}" install -y /netdata/artifacts/netdata*.rpm || exit 1
38
39
# Install testing tools
38
- "$PKGMGR" install -y curl nc jq || exit 1
40
+ "${PKGMGR}" install -y curl nc jq || exit 1
41
}
42
43
install_centos() {
@@ -49,15 +51,15 @@ install_centos() {
51
fi
52
53
# Install EPEL (needed for `jq`
52
- "$PKGMGR" install -y epel-release || exit 1
54
+ "${PKGMGR}" install -y epel-release || exit 1
55
56
# Install Netdata
57
# Strange quoting is required here so that glob matching works.
56
- "$PKGMGR" install -y /netdata/artifacts/netdata*.rpm || exit 1
58
+ "${PKGMGR}" install -y /netdata/artifacts/netdata*.rpm || exit 1
59
60
# Install testing tools
61
# shellcheck disable=SC2086
60
- "$PKGMGR" install -y ${opts} curl nc jq || exit 1
62
+ "${PKGMGR}" install -y ${opts} curl nc jq || exit 1
63
}
64
65
install_amazon_linux() {
@@ -69,11 +71,11 @@ install_amazon_linux() {
71
72
# Install Netdata
73
# Strange quoting is required here so that glob matching works.
72
- "$PKGMGR" install -y /netdata/artifacts/netdata*.rpm || exit 1
74
+ "${PKGMGR}" install -y /netdata/artifacts/netdata*.rpm || exit 1
75
76
# Install testing tools
77
# shellcheck disable=SC2086
76
- "$PKGMGR" install -y ${opts} curl nc jq || exit 1
78
+ "${PKGMGR}" install -y ${opts} curl nc jq || exit 1
79
}
80
81
install_suse_like() {
@@ -130,7 +132,7 @@ case "${DISTRO}" in
132
fedora | oraclelinux)
133
install_fedora_like
134
;;
133
- centos | rockylinux | almalinux)
135
+ centos| centos-stream | rockylinux | almalinux)
136
install_centos
137
;;
138
amazonlinux)
packaging/installer/install-required-packages.sh
+10
-9
@@ -182,7 +182,7 @@ get_os_release() {
182
case "${x,,}" in
183
almalinux | alpine | arch | centos | clear-linux-os | debian | fedora | gentoo | manjaro | opensuse-leap | opensuse-tumbleweed | ol | rhel | rocky | sabayon | sles | suse | ubuntu)
184
distribution="${x}"
185
- if [ "${ID}" = "opensuse-tumbleweed" ]; then
185
+ if [[ "${ID}" = "opensuse-tumbleweed" ]]; then
186
version="tumbleweed"
187
codename="tumbleweed"
188
else
@@ -197,9 +197,10 @@ get_os_release() {
197
;;
198
esac
199
done
200
- [ -z "${distribution}" ] && echo >&2 "Cannot find valid distribution in: ${ID} ${ID_LIKE}" && return 1
200
+ [[ -z "${distribution}" ]] && echo >&2 "Cannot find valid distribution in: \
201
+${ID} ${ID_LIKE}" && return 1
202
202
- [ -z "${distribution}" ] && return 1
203
+ [[ -z "${distribution}" ]] && return 1
204
return 0
205
}
206
@@ -409,9 +410,9 @@ detect_package_manager_from_distribution() {
410
centos* | clearos* | rocky* | almalinux*)
411
package_installer=""
412
tree="centos"
412
- [ -n "${yum}" ] && package_installer="install_yum"
413
- [ -n "${dnf}" ] && package_installer="install_dnf"
414
- if [ "${IGNORE_INSTALLED}" -eq 0 ] && [ -z "${package_installer}" ]; then
413
+ [[ -n "${yum}" ]] && package_installer="install_yum"
414
+ [[ -n "${dnf}" ]] && package_installer="install_dnf"
415
+ if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then
416
echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system."
417
exit 1
418
fi
@@ -420,9 +421,9 @@ detect_package_manager_from_distribution() {
421
fedora* | redhat* | red\ hat* | rhel*)
422
package_installer=
423
tree="rhel"
423
- [ -n "${yum}" ] && package_installer="install_yum"
424
- [ -n "${dnf}" ] && package_installer="install_dnf"
425
- if [ "${IGNORE_INSTALLED}" -eq 0 ] && [ -z "${package_installer}" ]; then
424
+ [[ -n "${yum}" ]] && package_installer="install_yum"
425
+ [[ -n "${dnf}" ]] && package_installer="install_dnf"
426
+ if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then
427
echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system."
428
exit 1
429
fi
packaging/installer/kickstart.sh
+1
-1
@@ -685,7 +685,7 @@ get_system_info() {
685
DISTRO_COMPAT_NAME="opensuse"
686
SYSVERSION="tumbleweed"
687
;;
688
- cloudlinux|almalinux|rocky|rhel)
688
+ cloudlinux|almalinux|centos-stream|rocky|rhel)
689
DISTRO_COMPAT_NAME="centos"
690
;;
691
artix|manjaro|obarun)
packaging/installer/netdata-updater.sh
+1
-1
@@ -737,7 +737,7 @@ update_binpkg() {
737
opensuse-leap|opensuse-tumbleweed)
738
DISTRO_COMPAT_NAME="opensuse"
739
;;
740
- cloudlinux|almalinux|rocky|rhel)
740
+ cloudlinux|almalinux|centos-stream|rocky|rhel)
741
DISTRO_COMPAT_NAME="centos"
742
;;
743
*)