From 8f4d0293575595b01fe4896ba3475be9347790c2 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 14 Dec 2021 16:59:44 +0100 Subject: [PATCH 1/3] icinga2.spec: remove dropped CentOS 6 --- icinga2.spec | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/icinga2.spec b/icinga2.spec index 7f51110..cb09831 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -19,7 +19,7 @@ %define apacheuser apache %define apachegroup apache -%if 0%{?el6}%{?amzn} +%if 0%{?amzn} %define use_systemd 0 %define use_selinux 0 %if %(uname -m) != "x86_64" @@ -123,17 +123,8 @@ BuildRequires: gcc48-c++ BuildRequires: libopenssl1-devel BuildRequires: libstdc++48-devel %else -%if "%{_vendor}" == "redhat" && (0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6") -# Requires devtoolset-7 scl -%define scl_name devtoolset-7 -%define scl_enable scl enable %{scl_name} -- -BuildRequires: %{scl_name}-binutils -BuildRequires: %{scl_name}-gcc-c++ -BuildRequires: %{scl_name}-libstdc++-devel -%else BuildRequires: gcc-c++ BuildRequires: libstdc++-devel -%endif BuildRequires: openssl-devel %endif BuildRequires: bison @@ -170,13 +161,6 @@ BuildRequires: libboost_test-devel%{?boost_devel_suffix} >= %{boost_min_version # default boost devel package %define boost_devel_pkg boost-devel - %if (0%{?el6} || 0%{?rhel} == 6) - # Provided by packages.icinga.com - %define boost_library icinga-boost169 - %define boost_version 1.69 - %define boost_devel_pkg icinga-boost169-devel - %define boost_rpath %{_libdir}/%{boost_library} - %endif # el6 %if (0%{?el7} || 0%{?rhel} == 7) # Provided by EPEL %define boost_library boost169 @@ -413,11 +397,6 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=ON" CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=OFF" %endif -%if (0%{?el6} || 0%{?rhel} == 6) -# Explicitly link against rt, because ld doesn't detect it automatically -CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_EXE_LINKER_FLAGS=-lrt" -%endif # el6 - %if "%{?boost_rpath}" != "" CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_RPATH=%{boost_rpath}" %endif # boost_rpath From 641066ac25f95914a331c9fe3a8e77c2733322ba Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 21 Feb 2022 17:44:54 +0100 Subject: [PATCH 2/3] icinga2.spec: drop now not supported GCC 4.8 --- icinga2.spec | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/icinga2.spec b/icinga2.spec index cb09831..3ce7023 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -118,15 +118,9 @@ BuildRequires: libyajl-devel %endif BuildRequires: libedit-devel BuildRequires: ncurses-devel -%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210 -BuildRequires: gcc48-c++ -BuildRequires: libopenssl1-devel -BuildRequires: libstdc++48-devel -%else BuildRequires: gcc-c++ BuildRequires: libstdc++-devel BuildRequires: openssl-devel -%endif BuildRequires: bison BuildRequires: cmake BuildRequires: flex >= 2.5.35 @@ -416,12 +410,6 @@ CMAKE_OPTS="$CMAKE_OPTS CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON" %endif -%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210 -# from package gcc48-c++ -export CC=gcc-4.8 -export CXX=g++-4.8 -%endif - %if "%{?_buildhost}" != "" CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_BUILD_HOST_NAME:STRING=%_buildhost" %endif From 055f39dbad48738c68642aec4c7cd921a5841ec4 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 13 Jan 2022 12:22:38 +0100 Subject: [PATCH 3/3] CentOS 7: require devtoolset-11-gcc-c++ --- icinga2.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/icinga2.spec b/icinga2.spec index 3ce7023..4b10e47 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -118,8 +118,17 @@ BuildRequires: libyajl-devel %endif BuildRequires: libedit-devel BuildRequires: ncurses-devel +%if "%{_vendor}" == "redhat" && (0%{?el7} || 0%{?rhel} == 7 || "%{?dist}" == ".el7") + # Requires devtoolset-11 scl + %define scl_name devtoolset-11 + %define scl_enable scl enable %{scl_name} -- +BuildRequires: %{scl_name}-binutils +BuildRequires: %{scl_name}-gcc-c++ +BuildRequires: %{scl_name}-libstdc++-devel +%else BuildRequires: gcc-c++ BuildRequires: libstdc++-devel +%endif BuildRequires: openssl-devel BuildRequires: bison BuildRequires: cmake