Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
packaging
rpm-icinga2
Commits
ab398831
Commit
ab398831
authored
Apr 01, 2019
by
Markus Frosch
Browse files
Merge branch 'feature/boost-asio'
parents
c846494e
e93eec15
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
ab398831
stages
:
-
build
-
test
-
upload
variables
:
DOCKER_IMAGE_BASE
:
registry.icinga.com/build-docker
ICINGA_BUILD_TYPE
:
snapshot
ICINGA_BUILD_UPSTREAM_BRANCH
:
feature/boost-asio
.build
:
&build
stage
:
build
tags
:
-
docker
image
:
${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
script
:
-
icinga-build-package
cache
:
key
:
"
${CI_JOB_NAME}"
paths
:
-
ccache/
-
'
icinga2.git'
artifacts
:
paths
:
-
build/*
expire_in
:
1 week
.test
:
&test
stage
:
test
tags
:
-
docker
image
:
${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
script
:
-
find build/
-
icinga-build-test
.upload
:
&upload
stage
:
upload
tags
:
-
docker
image
:
${DOCKER_IMAGE_BASE}/upload
script
:
-
find build/
-
icinga-build-upload-aptly
only
:
-
tags
-
master
###################################
# EPEL
###################################
build/centos/7
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
centos/7
test/centos/7
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
centos/7
dependencies
:
-
build/centos/7
upload/epel/7
:
<<
:
*upload
dependencies
:
-
build/centos/7
build/centos/6
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
centos/6
test/centos/6
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
centos/6
dependencies
:
-
build/centos/6
upload/epel/6
:
<<
:
*upload
dependencies
:
-
build/centos/6
###################################
# Fedora
###################################
build/fedora/29
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
fedora/29
test/fedora/29
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
fedora/29
dependencies
:
-
build/fedora/29
upload/fedora/29
:
<<
:
*upload
dependencies
:
-
build/fedora/29
build/fedora/28
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
fedora/28
test/fedora/28
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
fedora/28
dependencies
:
-
build/fedora/28
upload/fedora/28
:
<<
:
*upload
dependencies
:
-
build/fedora/28
###################################
# SLES
###################################
build/sles/15.0
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
sles/15.0
test/sles/15.0
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
sles/15.0
dependencies
:
-
build/sles/15.0
upload/SUSE/15.0
:
<<
:
*upload
dependencies
:
-
build/sles/15.0
build/sles/12.4
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
sles/12.4
test/sles/12.4
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
sles/12.4
dependencies
:
-
build/sles/12.4
upload/SUSE/12.4
:
<<
:
*upload
dependencies
:
-
build/sles/12.4
build/sles/12.3
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
sles/12.3
test/sles/12.3
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
sles/12.3
dependencies
:
-
build/sles/12.3
upload/SUSE/12.3
:
<<
:
*upload
dependencies
:
-
build/sles/12.3
###################################
# openSUSE
###################################
build/opensuse/15.0
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
opensuse/15.0
test/opensuse/15.0
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
opensuse/15.0
dependencies
:
-
build/opensuse/15.0
upload/openSUSE/15.0
:
<<
:
*upload
dependencies
:
-
build/opensuse/15.0
build/opensuse/42.3
:
<<
:
*build
variables
:
DOCKER_IMAGE
:
opensuse/42.3
test/opensuse/42.3
:
<<
:
*test
variables
:
DOCKER_IMAGE
:
opensuse/42.3
dependencies
:
-
build/opensuse/42.3
upload/openSUSE/42.3
:
<<
:
*upload
dependencies
:
-
build/opensuse/42.3
icinga2.spec
View file @
ab398831
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
%define apacheuser apache
%define apacheuser apache
%define apachegroup apache
%define apachegroup apache
%if 0%{?
el5}%{?
el6}%{?amzn}
%if 0%{?el6}%{?amzn}
%define use_systemd 0
%define use_systemd 0
%define use_selinux 0
%define use_selinux 0
%if %(uname -m) != "x86_64"
%if %(uname -m) != "x86_64"
...
@@ -63,6 +63,8 @@
...
@@ -63,6 +63,8 @@
%define logmsg logger -t %{name}/rpm
%define logmsg logger -t %{name}/rpm
%define boost_min_version 1.66
Summary: Network monitoring application
Summary: Network monitoring application
%if "%{_vendor}" == "suse"
%if "%{_vendor}" == "suse"
License: GPL-2.0-or-later
License: GPL-2.0-or-later
...
@@ -105,12 +107,13 @@ BuildRequires: gcc48-c++
...
@@ -105,12 +107,13 @@ BuildRequires: gcc48-c++
BuildRequires: libopenssl1-devel
BuildRequires: libopenssl1-devel
BuildRequires: libstdc++48-devel
BuildRequires: libstdc++48-devel
%else
%else
%if "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
%if "%{_vendor}" == "redhat" && (0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
# Requires devtoolset-2 scl
# Requires devtoolset-7 scl
BuildRequires: devtoolset-2-binutils
%define scl_name devtoolset-7
BuildRequires: devtoolset-2-gcc-c++
%define scl_enable scl enable %{scl_name} --
BuildRequires: devtoolset-2-libstdc++-devel
BuildRequires: %{scl_name}-binutils
%define scl_enable scl enable devtoolset-2 --
BuildRequires: %{scl_name}-gcc-c++
BuildRequires: %{scl_name}-libstdc++-devel
%else
%else
BuildRequires: gcc-c++
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
BuildRequires: libstdc++-devel
...
@@ -122,29 +125,52 @@ BuildRequires: cmake
...
@@ -122,29 +125,52 @@ BuildRequires: cmake
BuildRequires: flex >= 2.5.35
BuildRequires: flex >= 2.5.35
BuildRequires: make
BuildRequires: make
%if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
%if "%{_vendor}" == "suse"
# el5 and el6 require packages.icinga.com
%if 0%{?suse_version} >= 1315
BuildRequires: boost153-devel
# SLES 12 and OpenSUSE 42 or later
%else
%define boost_devel_pkg %nil
%if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
%if 0%{?suse_version} < 1320
# sles 11 sp3 requires packages.icinga.com
# before SLES 15 and OpenSUSE 15
BuildRequires: boost153-devel
# Provided by packages.icinga.com
%else
%define boost_library icinga-boost
%if "%{_vendor}" == "suse" && 0%{?suse_version} > 1320
%define boost_version 1.69
BuildRequires: libboost_program_options-devel >= 1.48
%define boost_rpath %{_libdir}/%{boost_library}
BuildRequires: libboost_regex-devel >= 1.48
# Note: the -impl suffix comes from current packages on OBS
BuildRequires: libboost_system-devel >= 1.48
%define boost_devel_suffix -impl
BuildRequires: libboost_thread-devel >= 1.48
%endif # suse_version < 1320
%else
BuildRequires: libboost_context-devel%{?boost_devel_suffix} >= %{boost_min_version}
%if (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
BuildRequires: libboost_coroutine-devel%{?boost_devel_suffix} >= %{boost_min_version}
# Requires EPEL repository
BuildRequires: libboost_program_options-devel%{?boost_devel_suffix} >= %{boost_min_version}
BuildRequires: boost148-devel >= 1.48
BuildRequires: libboost_regex-devel%{?boost_devel_suffix} >= %{boost_min_version}
%else
BuildRequires: libboost_system-devel%{?boost_devel_suffix} >= %{boost_min_version}
BuildRequires: boost-devel >= 1.48
BuildRequires: libboost_thread-devel%{?boost_devel_suffix} >= %{boost_min_version}
%endif
BuildRequires: libboost_test-devel%{?boost_devel_suffix} >= %{boost_min_version}
%endif
%else # suse_version >= 1315
%endif
# old boost devel name
%endif
%define boost_devel_pkg boost-devel
%endif # suse_version >= 1315
%else # vendor == suse - assuming redhat or compatible
# 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
%define boost_version 1.69
%define boost_devel_pkg boost169-devel
%endif # el7
%endif # vendor == suse
%if "%{?boost_devel_pkg}" != ""
BuildRequires: %{boost_devel_pkg} >= %{boost_min_version}
%endif # boost_devel_pkg
%if 0%{?use_systemd}
%if 0%{?use_systemd}
BuildRequires: systemd-devel
BuildRequires: systemd-devel
...
@@ -311,34 +337,26 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
...
@@ -311,34 +337,26 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
%if 0%{?fedora}
%if 0%{?fedora}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
%endif
%endif
%if "%{_vendor}" == "redhat"
%if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
%if 0%{?build_icinga_org}
# Boost_VERSION 1.41.0 vs 101400 - disable build tests
# details in https://dev.icinga.com/issues/5033
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0'"
%else
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost148 \
-DBOOST_INCLUDEDIR=/usr/include/boost148 \
-DBoost_ADDITIONAL_VERSIONS='1.48;1.48.0'"
%endif
CMAKE_OPTS="$CMAKE_OPTS \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBUILD_TESTING=FALSE \
-DBoost_NO_BOOST_CMAKE=TRUE"
%endif
%endif
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
%if (0%{?el6} || 0%{?rhel} == 6)
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
# Explicitly link against rt, because ld doesn't detect it automatically
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_EXE_LINKER_FLAGS=-lrt"
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
%endif # el6
%if "%{?boost_rpath}" != ""
CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_RPATH=%{boost_rpath}"
%endif # boost_rpath
%if "%{?boost_library}" != ""
# Boost_NO_BOOST_CMAKE=ON - disable search for cmake
# Boost_NO_SYSTEM_PATHS=ON - only search in specified locations
CMAKE_OPTS="$CMAKE_OPTS
-DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBUILD_TESTING=FALSE \
-DBOOST_LIBRARYDIR=%{_libdir}/%{boost_library} \
-DBoost_NO_BOOST_CMAKE=TRUE"
-DBOOST_INCLUDEDIR=/usr/include/%{boost_library} \
%endif
-DBoost_ADDITIONAL_VERSIONS='%{boost_version};%{boost_version}.0'"
%endif # boost_library
%if 0%{?use_systemd}
%if 0%{?use_systemd}
CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
...
@@ -356,7 +374,7 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_BUILD_HOST_NAME:STRING=%_buildhost"
...
@@ -356,7 +374,7 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_BUILD_HOST_NAME:STRING=%_buildhost"
%{?scl_enable} cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
%{?scl_enable} cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
make %{?_smp_mflags}
%{?scl_enable}
make %{?_smp_mflags}
%if 0%{?use_selinux}
%if 0%{?use_selinux}
cd tools/selinux
cd tools/selinux
...
@@ -370,7 +388,7 @@ cd -
...
@@ -370,7 +388,7 @@ cd -
%endif
%endif
%install
%install
make install \
%{?scl_enable}
make install \
DESTDIR="%{buildroot}"
DESTDIR="%{buildroot}"
# install custom limits.conf for systemd
# install custom limits.conf for systemd
...
@@ -417,6 +435,10 @@ install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}
...
@@ -417,6 +435,10 @@ install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}
install -D -m 0644 tools/syntax/nano/%{name}.nanorc %{buildroot}%{_datadir}/nano/%{name}.nanorc
install -D -m 0644 tools/syntax/nano/%{name}.nanorc %{buildroot}%{_datadir}/nano/%{name}.nanorc
%check
export CTEST_OUTPUT_ON_FAILURE=1
make test
%pre
%pre
%if "%{_vendor}" == "suse"
%if "%{_vendor}" == "suse"
%if 0%{?use_systemd}
%if 0%{?use_systemd}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment