@cryptotaxi247 / netdata-1 / commits / 88809d369

Add Amazon Linux 2023 to CI, packaging, and platform support. (#14771)

* Add Amazon Linux 2023 to CI, packaging, and platform support. * Fix dependencies for AL2023 in RPM spec file. * Fix handling of package tests with DNF.

Austin S. Hemmelgarn committed Mar 29, 2023 at 07:56 UTC 88809d369ac776803bd20f710de2561c31445af4
4 files changed +43 -6
.github/data/distros.yml
+9 -2
@@ -74,10 +74,11 @@ include:
74 - el/8Server
75 - el/8Client
76
77 - - distro: amazonlinux
77 + - &amzn
78 + distro: amazonlinux
79 version: "2"
80 eol_check: 'amazon-linux'
80 - packages:
81 + packages: &amzn_packages
82 type: rpm
83 repo_distro: amazonlinux/2
84 arches:
@@ -85,6 +86,12 @@ include:
86 - aarch64
87 test:
88 ebpf-core: false
89 + - <<: *amzn
90 + version: "2023"
91 + packages:
92 + <<: *amzn_packages
93 + repo_distro: amazonlinux/2023
94 +
95
96 - distro: centos
97 version: "7"
.github/scripts/pkg-test.sh
+8
@@ -28,6 +28,10 @@ install_fedora_like() {
28
29 pkg_version="$(echo "${VERSION}" | tr - .)"
30
31 + if [ "${PKGMGR}" = "dnf" ]; then
32 + opts="--allowerasing"
33 + fi
34 +
35 # Install Netdata
36 # Strange quoting is required here so that glob matching works.
37 "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1
@@ -65,6 +69,10 @@ install_amazon_linux() {
69
70 pkg_version="$(echo "${VERSION}" | tr - .)"
71
72 + if [ "${PKGMGR}" = "dnf" ]; then
73 + opts="--allowerasing"
74 + fi
75 +
76 # Install Netdata
77 # Strange quoting is required here so that glob matching works.
78 "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1
netdata.spec.in
+25 -4
@@ -27,6 +27,20 @@ AutoReqProv: yes
27 %global _have_ebpf 0
28 %endif
29
30 +# Disable FreeIPMI on Amazon Linux
31 +%if 0%{?amzn}
32 +%global _have_freeipmi 0
33 +%else
34 +%global _have_freeipmi 1
35 +%endif
36 +
37 +# Disable the NFACCT plugin on Amazon Linux
38 +%if 0%{?amzn}
39 +%global _have_nfacct 0
40 +%else
41 +%global _have_nfacct 1
42 +%endif
43 +
44 # Mitigate the cross-distro mayhem by strictly defining the libexec destination
45 %define _prefix /usr
46 %define _sysconfdir /etc
@@ -75,7 +89,7 @@ BuildRequires: git-core
89 BuildRequires: autoconf
90 %if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
91 BuildRequires: autoconf-archive
78 -%if 0%{?rhel} <= 8
92 +%if 0%{?rhel} <= 8 && 0%{?amzn} < 2023
93 BuildRequires: autogen
94 %endif
95 %endif
@@ -152,15 +166,19 @@ BuildRequires: elfutils-libelf-devel
166 # end - ebpf dependencies
167
168 # nfacct plugin dependencies
169 +%if %{_have_nfacct}
170 BuildRequires: libmnl-devel
171 %if 0%{?fedora} || 0%{?suse_version} >= 1140
172 BuildRequires: libnetfilter_acct-devel
173 %endif
174 +%endif
175
176 # end nfacct plugin dependencies
177
178 # freeipmi plugin dependencies
179 +%if %{_have_freeipmi}
180 BuildRequires: freeipmi-devel
181 +%endif
182 # end - freeipmi plugin dependencies
183
184 # CUPS plugin dependencies
@@ -254,7 +272,9 @@ install -m 644 -p system/logrotate/netdata "${RPM_BUILD_ROOT}%{_sysconfdir}/logr
272
273 # ###########################################################
274 # Install freeipmi
275 +%if %{_have_freeipmi}
276 install -m 4750 -p freeipmi.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/freeipmi.plugin"
277 +%endif
278
279 # ###########################################################
280 # Install apps.plugin
@@ -484,9 +504,6 @@ rm -rf "${RPM_BUILD_ROOT}"
504 # perf plugin
505 %caps(cap_dac_read_search=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/slabinfo.plugin
506
487 -# freeipmi files
488 -%attr(4750,root,netdata) %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
489 -
507 # go.d.plugin (the capability required for wireguard module)
508 %caps(cap_net_admin,cap_net_raw=eip) %{_libexecdir}/%{name}/plugins.d/go.d.plugin
509
@@ -504,7 +521,9 @@ rm -rf "${RPM_BUILD_ROOT}"
521 %attr(0770,netdata,netdata) %dir %{_localstatedir}/lib/%{name}/registry
522
523 # Free IPMI belongs to a different sub-package
524 +%if %{_have_freeipmi}
525 %exclude %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
526 +%endif
527
528 # CUPS belongs to a different sub package
529 %if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7
@@ -524,6 +543,7 @@ Use this plugin to enable metrics collection from cupsd, the daemon running when
543 %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/cups.plugin
544 %endif
545
546 +%if %{_have_freeipmi}
547 %package plugin-freeipmi
548 Summary: FreeIPMI - The Intelligent Platform Management System
549 Group: Applications/System
@@ -537,6 +557,7 @@ are sensor monitoring, system event monitoring, power control, and serial-over-L
557
558 %files plugin-freeipmi
559 %attr(4750,root,netdata) %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
560 +%endif
561
562 %changelog
563 * Tue Mar 21 2023 Austin Hemmelgarn <austin@netdata.cloud> 0.0.0-18
packaging/PLATFORM_SUPPORT.md
+1
@@ -95,6 +95,7 @@ with minimal user effort.
95 | Alpine Linux | 3.16 | No | |
96 | Alpine Linux | 3.15 | No | |
97 | Alpine Linux | 3.14 | No | |
98 +| Amazon Linux | 2023 | x86\_64, AArch64 | Scheduled for promotion to Core tier at some point after the release of v1.39.0 of the Netdata Agent |
99 | Amazon Linux | 2 | x86\_64, AArch64 | Scheduled for promotion to Core tier at some point after the release of v1.39.0 of the Netdata Agent |
100 | Arch Linux | Latest | No | We officially recommend the community packages available for Arch Linux |
101 | Manjaro Linux | Latest | No | We officially recommend the community packages available for Arch Linux |