Browse Source

Add openSUSE 15.6 to CI. (#17865)

* Add openSUSE 15.6 to CI.

* Fix handling of log2journal.

* Restructure conditional check.
Austin S. Hemmelgarn 9 months ago
parent
commit
6bacccaab8
2 changed files with 22 additions and 9 deletions
  1. 9 3
      .github/data/distros.yml
  2. 13 6
      netdata.spec.in

+ 9 - 3
.github/data/distros.yml

@@ -207,23 +207,29 @@ include:
 
   - &opensuse
     distro: opensuse
-    version: "15.5"
+    version: "15.6"
     support_type: Core
     notes: ''
     eol_check: true
     bundle_sentry: *default_sentry
-    base_image: opensuse/leap:15.5
+    base_image: opensuse/leap:15.6
     jsonc_removal: |
       zypper rm -y libjson-c-devel
     packages: &opensuse_packages
       type: rpm
-      repo_distro: opensuse/15.5
+      repo_distro: opensuse/15.6
       builder_rev: *def_builder_rev
       arches:
         - x86_64
         - aarch64
     test:
       ebpf-core: true
+  - <<: *opensuse
+    version: "15.5"
+    base_image: opensuse/leap:15.5
+    packages:
+      <<: *opensuse_packages
+      repo_distro: opensuse/15.5
 
   - &oracle
     distro: oraclelinux

+ 13 - 6
netdata.spec.in

@@ -99,6 +99,17 @@ AutoReqProv: yes
 %global _have_mongo_exporter 1
 %endif
 
+# log2journal can’t build on some systems
+%if 0%{?sle_version}
+%if %{sle_version} < 150600
+%global _have_log2journal 0
+%else
+%global _have_log2journal 1
+%endif
+%else
+%global _have_log2journal 1
+%endif
+
 # If ML hasn’t been explicitly disabled or enabled yet, enable it now.
 %if 0%{!?_have_ml:1}
 %global _have_ml 1
@@ -147,9 +158,7 @@ BuildRequires: pkgconfig(libcurl)
 BuildRequires: pkgconfig(liblz4)
 BuildRequires: pkgconfig(yaml-0.1)
 BuildRequires: pkgconfig(json-c)
-%if 0%{?suse_version}
-# log2journal is not available on these systems
-%else
+%if %{_have_log2journal}
 BuildRequires: pkgconfig(libpcre2-8)
 %endif
 %if 0%{?suse_version}
@@ -494,9 +503,7 @@ rm -rf "${RPM_BUILD_ROOT}"
 %{_libdir}/%{name}
 %{_sbindir}/%{name}
 %{_sbindir}/netdatacli
-%if 0%{?suse_version}
-# log2journal is not available on these systems
-%else
+%if %{_have_log2journal}
 %{_sbindir}/log2journal
 %endif
 %{_sbindir}/systemd-cat-native