Compare commits
22 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 7f5e47a781 | |||
| f1b1ce54b2 | |||
| 87d444e78c | |||
| a059b69113 | |||
| b88d9ac2aa | |||
| e5a75aff05 | |||
| bd407d9a42 | |||
| 6079107904 | |||
| 04f68b2530 | |||
| 6c82675c17 | |||
| 7a18076031 | |||
| ba3e687afc | |||
| eb42377f7b | |||
| cba6992aaf | |||
| e4139ed8af | |||
| 283ec739a3 | |||
| 9d3950036f | |||
| fd0fdbdd35 | |||
| 4274a85f7a | |||
| 64c44da6b5 | |||
| fbb988dad1 | |||
| 1ca8def9c3 |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:759f192b30b46cffbdd96fd57953143b2c50a29fa2aa5ffbb99006e7af2bc462
|
||||
size 9397382
|
||||
3
icinga2-2.15.1.tar.gz
Normal file
3
icinga2-2.15.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:698cfae4aeded8fe05351995156814305a77bd0404b12e513a8dce8e7884c520
|
||||
size 9454711
|
||||
@@ -15,10 +15,10 @@
|
||||
# https://trac.nginx.org/nginx/attachment/ticket/2276/fix-nginx-syntax.patch
|
||||
#
|
||||
|
||||
Index: icinga2-2.13.3/tools/syntax/vim/syntax/icinga2.vim
|
||||
Index: icinga2-2.14.3/tools/syntax/vim/syntax/icinga2.vim
|
||||
===================================================================
|
||||
--- icinga2-2.13.3.orig/tools/syntax/vim/syntax/icinga2.vim
|
||||
+++ icinga2-2.13.3/tools/syntax/vim/syntax/icinga2.vim
|
||||
--- icinga2-2.14.3.orig/tools/syntax/vim/syntax/icinga2.vim
|
||||
+++ icinga2-2.14.3/tools/syntax/vim/syntax/icinga2.vim
|
||||
@@ -16,6 +16,10 @@ if !exists("main_syntax")
|
||||
let main_syntax = 'icinga2'
|
||||
endif
|
||||
@@ -30,7 +30,7 @@ Index: icinga2-2.13.3/tools/syntax/vim/syntax/icinga2.vim
|
||||
" case off
|
||||
syntax case ignore
|
||||
|
||||
@@ -358,3 +362,7 @@ hi link icinga2Namespace Statement
|
||||
@@ -359,3 +363,7 @@ hi link icinga2Namespace Statement
|
||||
hi link valueNumber Number
|
||||
hi link valueBoolean Boolean
|
||||
hi link valueNull Special
|
||||
|
||||
258
icinga2.changes
258
icinga2.changes
@@ -1,3 +1,260 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 17 10:45:56 UTC 2025 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 2.15.1
|
||||
* Security
|
||||
- CVE-2025-61907: Prevent API users from accessing variables and objects they
|
||||
don't have access to within filter expressions.
|
||||
This allowed authenticated API users to learn information they aren't allowed
|
||||
to access directly.
|
||||
- CVE-2025-61908: Add a missing null pointer check while evaluating expressions.
|
||||
This allowed authenticated API users to crash the Icinga 2 daemon by supplying
|
||||
a crafted filter expression.
|
||||
- CVE-2025-61909: Don't send signals as root in safe-reload script and logrotate config.
|
||||
This allowed a limited privilege escalation from the Icinga 2 service user to root.
|
||||
The scope is limited to sending SIGHUP or SIGUSR1 to an arbitrary process. #10590
|
||||
- Windows: Update to OpenSSL 3.0.18. #10591
|
||||
* Bugfixes
|
||||
- When a reload triggered from Icinga Director (or the /v1/config API) fails,
|
||||
the corresponding state is cleared, allowing to deploy a new config
|
||||
without having to restart Icinga 2 manually first. #10584
|
||||
* Enhancements
|
||||
- Add JSON-RPC utilization metrics and troubleshooting docs. #10586
|
||||
- When sending cluster messages to other zones, prefer endpoints in the order
|
||||
as specified in the zone configuration. #10587
|
||||
- Track the number of JSON-RPC messages received for each message type per endpoint. #10585
|
||||
- Add support for building with Boost v1.89 and use it on Windows. #10578
|
||||
- Drop 76fa0d9e8054f405dc3d1e39a4b48f21e86afdf0.patch because now in upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 27 17:43:34 UTC 2025 - Arjen de Korte <suse+build@de-korte.org>
|
||||
|
||||
- Boost.System has been header only since Boost 1.69.0
|
||||
- Add 76fa0d9e8054f405dc3d1e39a4b48f21e86afdf0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 19 08:50:18 UTC 2025 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update ot 2.15.0
|
||||
* Breaking Changes
|
||||
- API: Fix /v1/objects/* queries with attrs set to [] to return empty attributes instead of all of them. #8169
|
||||
- Drop the undocumented Checkable#process_check_result and broken System#track_parents DSL functions. #10457
|
||||
* Enhancements
|
||||
- Gracefully disconnect all clients on shutdown and prevent from accepting new connections. #10460
|
||||
- Icinga DB: Send data to Redis® exactly as they're stored in the database to avoid extra value-mapping routines by the Go daemon. #10452
|
||||
- Add support for Icinga 2 dependencies in Icinga DB. #10290
|
||||
- Take host/service reachability into account when computing its severity. #10399
|
||||
- Rework the dependency cycle detection to efficiently handle large configs and provide better error messages. #10360
|
||||
- Don't log next check timestamp in scientific notation. #10352
|
||||
- Automatically remove child downtimes when removing parent downtime. #10345
|
||||
- Ensure compatibility with Boost version up to v1.88. #10278 #10419
|
||||
- Reject infinite performance data values. #10077
|
||||
- Support host_template and service_template tags in ElasticsearchWriter. #10074
|
||||
- Icinga DB: Support Redis® username authentication. #10102
|
||||
- Cluster: Distribute host child objects (e.g. services, notifications, etc.) based on the host's name. #10161
|
||||
- Icinga DB Check: Report an error if both Icinga DB instances are responsible in a HA setup. #10188
|
||||
- Windows: upgrade build toolchain to Visual Studio 2022. #9747
|
||||
* Bugfixes
|
||||
* Core
|
||||
- Use Checkable#check_timeout also for rescheduling remote checks. #10443
|
||||
- Log: Don't unnecessarily buffer log messages that are going to be dropped anyway. #10177
|
||||
- Don't loose perfdata counter (c) unit when normalizing performance data for Icinga DB. #10432
|
||||
- Fix broken SELinux policy on Fedora ≥ 41 due to the new /usr/sbin to /usr/bin equivalence. #10429
|
||||
- Don't load Notification objects before User and UserGroup objects to allow them to be referenced in notifications. #10427
|
||||
- Ensure consistent DST handling across different platforms. #10422
|
||||
- Fix Icinga 2 doesn't generate a core dump when it crashes with SIGABRT. #10416
|
||||
- Don't process concurrent checks for the same checkable. #10372
|
||||
- Don't process check results after the checker and API listener have been stopped. #10397
|
||||
- Avoid zombie processes on plugin execution timeout on busy systems. #10375
|
||||
- Properly restore the notification object state on Recovery notification. #10361
|
||||
- Fix incorrectly dropped acknowledgement and recovery notifications. #10211
|
||||
- Prevent checks from always being rescheduled outside the configured check_period. #10070
|
||||
- Don't send reminder notifications after a Custom notification while interval is set to 0. #7818
|
||||
- Reset all signal handlers of child processes to their defaults before starting a plugin. #8011
|
||||
- tests: Fix FormatDateTime test cases with invalid formats on macOS and all BSD-based systems. #10149
|
||||
- Mark move constructor and assignment operator in String as noexcept to allow optimizations. #10353 #10365
|
||||
* Cluster and API
|
||||
- Fix an inverted condition in ApiListener#IsHACluster() that caused to always return true in a non-HA setup. #10417
|
||||
- Don't silently accept authenticated JSON-RPC connections with no valid endpoint. #10415
|
||||
- Sync Notification#notified_problem_users across the cluster to prevent lost recovery notifications. #10380
|
||||
- Remove superfluous ) from a HTTP request log message. #9966
|
||||
- Disable TLS renegotiation (handshake on existing connection) on OpenBSD as well. #9943
|
||||
- Log also the underlying error message when a HTTP request is closed with No data received by Icinga 2. #9928
|
||||
- Fix a deadlock triggered by concurrent /v1/actions/add-comment and /v1/actions/acknowledge-problem requests
|
||||
on the same checkable, as well as a crash that might occur when running perfectly timed /v1/actions/add-comment
|
||||
and /v1/actions/remove-comment requests targeting the same comment. #9924
|
||||
* Icinga DB
|
||||
- Fix missing acknowledgement and flapping history entries due to a number overflow. #10467
|
||||
- Send downtime cancel_time only if it is cancelled. #10379
|
||||
- Send only the necessary data to the icinga:stats Redis® stream. #10359
|
||||
- Remove a spin lock in RedisConnection#Connect() to avoid busy waiting. #10265
|
||||
* Writers
|
||||
- Serialize all required metrics before queueing them to a WorkQueue. #10420
|
||||
- OpenTsdbWriter: Include checkable name in log messages to ease troubleshooting. #10009
|
||||
- OpenTsdbWriter: Don't send custom empty tags. #7928
|
||||
- InfluxDBWriter: Add missing closing quote in validation error message. #10174
|
||||
* ITL
|
||||
- Add --maintenance_mode_state ($vmware_maintenance_mode_state) argument to vmware-esx-command check command. #10435
|
||||
- Add -n ($load_procs_to_show$) argument to load check command. #10426
|
||||
- Add --inode-perfdata ($disk_np_inode_perfdata$) argument to disk check command. #10395
|
||||
- Add -r ($ssh_remote_version$) and -P ($ssh_remote_protocol$) arguments to ssh check command. #10283
|
||||
- Add --unplugged_nics_state ($vmware_unplugged_nics_state$) argument to
|
||||
vmware-esx-soap-host-net and vmware-esx-soap-host-net-nic check commands. #10261
|
||||
- Add -X ($proc_exclude_process$) argument to procs check command. #10232
|
||||
- Add --dane ($ssl_cert_dane$) argument to ssl_cert check command. #10196
|
||||
- Fix check_ssl_cert deprecation warnings. #9758
|
||||
- Fix check_systemd executable name add add all missing arguments. #10035
|
||||
- Add -M ($snmp_multiplier$ & $snmpv3_multiplier$) argument to snmp and snmpv3 check commands. #9975
|
||||
- Add --continue-after-certificate ($http_certificate_continue$) argument to http check command. #9974
|
||||
- Add --ignore-maximum-validity ($ssl_cert_ignore_maximum_validity$) argument to ssl_cert check command. #10396
|
||||
- Add --maximum-validity ($ssl_cert_maximum_validity$) argument to ssl_cert check command. #9881
|
||||
- Add --url ($ssl_cert_http_url$) argument to ssl_cert check command. #9759
|
||||
- Add fuse.sshfs and fuse.* (supported only by Monitoring Plugins) to the list of default disk exclude types. #9749
|
||||
- Add check_curl check command. #9205
|
||||
- Add the --extra-opts argument to various commands that support it. #8010
|
||||
* Documentation
|
||||
- Don't use dnf config-manager to configure Fedora repository and mention icingadb-redis-selinux package. #10479
|
||||
- Update the outdated cold startup duration documentation to reflect the current behavior. #10446
|
||||
- Indent second-level unordered lists with four spaces to correctly render them in the HTML documentation. #10441
|
||||
- Add a reference to the check result state documentation from within the Advanced Topics section. #10421
|
||||
- Improve the documentation of how to generate Icinga 2 core dumps. #10418
|
||||
- Update Icinga 2 CLI output examples to match the current output. #10323
|
||||
- Fix incorrect ping_timeout value in the hostalive check command documentation. #10069
|
||||
* Code Quality
|
||||
- Simplify deferred SSL shutdown in ApiListener#NewClientHandlerInternal(). #10301
|
||||
- Don't unnecessarily shuffle configuration items during config load. #10008
|
||||
- Sort config types by their load dependencies at namespace initialization time to save some round trips during config load. #10148
|
||||
- Fix livestatus build error on macOS without unity builds. #10176
|
||||
- Remove unused methods in SharedObject class. #10456
|
||||
- Remove unused ProcessingResult#NoCheckResult enum value. #10444
|
||||
- CMake: Drop all third-party cmake modules and use the ones shipped with CMake v3.8+. #10403
|
||||
- CMake: Raise the minimum required policy to 3.8. #10402 #10478
|
||||
- CMake: Turn on -Wsuggest-override to warn about missing override specifiers. #10225 #10356
|
||||
- Make icinga::Empty a constant to prevent accidental modifications. #10224
|
||||
- Remove various unused methods in the Registry class. #10222
|
||||
- Fix missing parent std::atomic<T> constructor call in our Atomic<T> wrapper class. #10215
|
||||
- Drop unused m_NextHeartbeat member variable from JsonRpcConnection. #10208
|
||||
- Enhance some of the validation error messages. #10201
|
||||
- Don't allow Type#GetLoadDependencies() to return non-config object type dependencies. #10169
|
||||
- Don't allow Type#GetLoadDependencies() to return a set of nullptr type dependencies. #10155
|
||||
- Remove EOL distros detection code from Utility::ReleaseHelper() function. #10147
|
||||
- Remove dead code in TLS GetSignatureAlgorithm() function. #9882
|
||||
- Mark Logger#GetSeverity() as non-virtual to avoid unnecessary vtable lookups. #9851
|
||||
- Remove unused Stream#Peak() method and unused allow_partial parameter from Stream#Read(). #9734 #9736
|
||||
- Suppress compiler warnings in third-party libraries. #9732
|
||||
- Fix various compiler warnings. #9731 #10442
|
||||
- Reduce task function allocation overhead by using a per-thread created lambda in WorkQueue. #9575
|
||||
- Remove redundant trailing empty lines and add missing newlines in some files. #7799
|
||||
- Drop icinga-pr10278.patch becauise now in upstream.
|
||||
- Change BuildRequires from yajl to nlohmann_json because yajl is dead.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 27 16:49:31 UTC 2025 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 2.14.6
|
||||
- CVE-2025-48057: Prevent invalid certificates from being renewed with OpenSSL older than v1.1.0.
|
||||
- Fix use-after-free in VerifyCertificate(): Additionally, a use-after-free was found in the same
|
||||
function which is fixed as well, but in case it is triggered, typically only a wrong error code
|
||||
may be shown in a log message.
|
||||
- Windows: Update OpenSSL shipped on Windows to v3.0.16.
|
||||
- Rebase icinga-pr10278.patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 15 14:59:42 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Clean up merge-conflict markers in the changelog.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 14 16:30:58 CET 2025 - ro@suse.de
|
||||
|
||||
- fix permissions for include and script files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 13 11:43:51 CET 2025 - ro@suse.de
|
||||
|
||||
- add patches from PR10278 to fix build with boost 1.87
|
||||
https://github.com/Icinga/icinga2/pull/10278
|
||||
icinga-pr10278.patch
|
||||
- use RPM_BUILD_ROOT variable
|
||||
- fix ownership for include files and scripts
|
||||
- move bash-completions to /usr/share
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 7 06:46:53 UTC 2025 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 2.14.5
|
||||
* Bug Fixes
|
||||
- Don't close anonymous connections before sending the response for a certificate request #10337
|
||||
- Performance data: Don't discard min/max values even if crit/warn thresholds aren’t given #10339
|
||||
- Fix a failing test case on systems time_t is only 32 bits #10343
|
||||
* Documentation
|
||||
- Document the -X option for the mail-host-notification and mail-service-notification commands #10335
|
||||
- Include Nagios in the migration docs #10324
|
||||
- Remove RHEL 7 from installation instructions #10334
|
||||
- Add instructions for installing build dependencies on Windows Server #10336
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 06:38:40 UTC 2025 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 2.14.4
|
||||
* Crash Fixes
|
||||
- Invalid DateTime#format() arguments in config and console on Windows Server 2016 and older. #10112
|
||||
- Downtime scheduling at runtime with non-existent trigger. #10049
|
||||
- Object creation at runtime during Icinga DB initialization. #10151
|
||||
- Comment on a service of a non-existent host. #9861
|
||||
* Miscellaneous Bugfixes
|
||||
- Lost notifications after recovery outside the notification time period. #10187
|
||||
- TimePeriod/ScheduledDowntime exceeding specified date range. #9983 #10107
|
||||
- Clean up failure for obsolete Downtimes. #10062
|
||||
- ifw-api check command: use correct process-finished handler. #10140
|
||||
- Email notification scripts: strip 0x0D (CR) for a proper Content-Type. #10061
|
||||
- Several fixes and improvements of the code quality. #10066 #10214 #10254 #10263 #10264
|
||||
* Cluster and API
|
||||
- Sync runtime objects in topological order to honor their dependencies. #10000
|
||||
- Make parallel config syncs more robust. #10013
|
||||
- After object creation via API fails, clean up properly for the next try. #10111
|
||||
- Close HTTPS connections properly to prevent leaks. #10005 #10006
|
||||
- Reduce the number of cluster messages in memory at the same time. #9991 #9999 #10210
|
||||
- Once a cluster connection shall be closed, stop communicating. #10213 #10221
|
||||
- Remove unnecessary blocking of semaphores. #9992 #9994
|
||||
- Reduce unnecessary cluster messages setting the next check time. #10011
|
||||
* Icinga DB and IDO
|
||||
- IDO: fix object relations after aborted synchronization. #10065
|
||||
- Icinga DB, IDO: limit all timestamps to four year digits. #10058 #10059
|
||||
- Icinga DB: limit execution_time and latency (milliseconds) to database schema. #10060
|
||||
* Troubleshooting
|
||||
- Add /v1/debug/malloc_info which calls malloc_info(3) if available. #10015
|
||||
- Add log messages about own network I/O. #9993 #10141 #10207
|
||||
- Several fixes and improvements of log messages. #9997 #10021 #10209
|
||||
* Windows
|
||||
- Update OpenSSL shipped on Windows to v3.0.15. #10170
|
||||
- Update Boost shipped on Windows to v1.86. #10114
|
||||
- Support CMake v3.29. #10037
|
||||
- Don't require to build .msi as admin. #10137
|
||||
- Build configuration scripts: allow custom $CMAKE_ARGS. #10312
|
||||
* Documentation
|
||||
- Distributed Monitoring: add section "External CA/PKI". #9825
|
||||
- Explain how to enable/disable debug logging on the fly. #9981
|
||||
- Update supported OS versions and repository configuration. #10064 #10090 #10120 #10135 #10136 #10205
|
||||
- Several fixes and improvements. #9960 #10050 #10071 #10156 #10194
|
||||
- Replace broken links. #10115 #10118 #10282
|
||||
- Fix typographical and similarly trivial errors. #9953 #9967 #10056 #10116 #10152 #10153 #10204
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 25 10:33:39 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Use %{optflags} macro for build flags
|
||||
- Fix build on non-x86_64 architectures
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 12 16:47:56 UTC 2024 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 2.14.3
|
||||
- Security: fix TLS certificate validation bypass. CVE-2024-49369 (boo#1233310)
|
||||
- Security: update OpenSSL shipped on Windows to v3.0.15.
|
||||
- Windows: sign MSI packages with a certificate the OS trusts by default.
|
||||
- Revision and cleanup of the spec file to remove errors and make it clearer.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 22 13:38:43 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
@@ -1746,7 +2003,6 @@ Sat Jun 25 14:00:24 UTC 2016 - ecsos@opensuse.org
|
||||
* Bug 11779 (API): Incorrect variable names for joined fields in filters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
>>>>>>> ./icinga2.changes.r55
|
||||
Wed Apr 27 17:38:08 UTC 2016 - ecsos@opensuse.org
|
||||
|
||||
- update to upstream version 2.4.7
|
||||
|
||||
716
icinga2.spec
716
icinga2.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package icinga2
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,113 +15,24 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define revision 1
|
||||
|
||||
# make sure that _rundir is working on older systems
|
||||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
%define _libexecdir %{_prefix}/lib/
|
||||
%define plugindir %{_libdir}/nagios/plugins
|
||||
|
||||
%if "%{_vendor}" == "redhat"
|
||||
%define apachename httpd
|
||||
%define apacheconfdir %{_sysconfdir}/httpd/conf.d
|
||||
%define apacheuser apache
|
||||
%define apachegroup apache
|
||||
|
||||
%if 0%{?el5}%{?el6}%{?amzn}
|
||||
%define use_systemd 0
|
||||
%define use_selinux 0
|
||||
%if %(uname -m) != "x86_64"
|
||||
%define march_flag -march=i686
|
||||
%endif
|
||||
%else
|
||||
# fedora and el>=7
|
||||
%define use_systemd 1
|
||||
%define use_selinux 1
|
||||
%if 0%{?fedora} >= 24
|
||||
# for installing limits.conf on systemd >= 228
|
||||
%define configure_systemd_limits 1
|
||||
%else
|
||||
%define configure_systemd_limits 0
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if "%{_vendor}" == "suse"
|
||||
%define plugindir %{icinga2_plugindir}
|
||||
%define apachename apache2
|
||||
%define apacheconfdir %{_sysconfdir}/apache2/conf.d
|
||||
%define apacheuser wwwrun
|
||||
%define apachegroup www
|
||||
%if 0%{?suse_version} >= 1310
|
||||
%define use_systemd 1
|
||||
%if 0%{?sle_version} >= 120200 || 0%{?suse_version} > 1320
|
||||
# for installing limits.conf on systemd >= 228
|
||||
%define configure_systemd_limits 1
|
||||
%else
|
||||
%define configure_systemd_limits 0
|
||||
%endif
|
||||
%else
|
||||
%define use_systemd 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%define icinga_user icinga
|
||||
%define icinga_group icinga
|
||||
%define icingacmd_group icingacmd
|
||||
|
||||
# enable unity builds by default for all architectures except arm32
|
||||
%ifarch %{arm}
|
||||
%bcond_with unity_build
|
||||
%else
|
||||
%bcond_without unity_build
|
||||
%endif
|
||||
# enable unity builds by default for all distribution except Tumbleweed
|
||||
%if 0%{?suse_version} > 1500
|
||||
%define unity_build 0
|
||||
%else
|
||||
%define unity_build 1
|
||||
%endif
|
||||
|
||||
%define logmsg logger -t %{name}/rpm
|
||||
|
||||
Name: icinga2
|
||||
Version: 2.15.1
|
||||
Release: 0
|
||||
Summary: Network monitoring application
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/Monitoring
|
||||
%if "%{_vendor}" == "suse"
|
||||
%else
|
||||
%endif
|
||||
Name: icinga2
|
||||
Version: 2.14.2
|
||||
Release: %{revision}%{?dist}
|
||||
URL: https://www.icinga.com/
|
||||
Source: https://github.com/Icinga/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Source1: icinga2-rpmlintrc
|
||||
%if "%{_vendor}" == "suse"
|
||||
# PATCH-FEATURE-OPENSUSE ecsos -- insert missing graphite tags as descriped in icingaweb2-module-graphite docs.
|
||||
Patch0: icinga2-graphite.patch
|
||||
# PATCH-FIX-OPENSUSE lrupp -- fixing the syntax file for vim >= 8.x
|
||||
Patch1: icinga2-vim_syntax.patch
|
||||
%endif
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if "%{_vendor}" == "suse"
|
||||
PreReq: permissions
|
||||
Requires: logrotate
|
||||
BuildRequires: nagios-rpm-macros
|
||||
%endif
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
Conflicts: %{name}-common < %{version}-%{release}
|
||||
Requires: icinga2-bin = %{version}
|
||||
Requires: icinga2-common = %{version}
|
||||
Conflicts: icinga2-common < %{version}
|
||||
|
||||
%description
|
||||
Meta package for Icinga 2 Core, DB IDO and Web.
|
||||
@@ -129,77 +40,41 @@ Meta package for Icinga 2 Core, DB IDO and Web.
|
||||
%package bin
|
||||
Summary: Icinga 2 binaries and libraries
|
||||
Group: System/Monitoring
|
||||
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
|
||||
%if "%{_vendor}" == "suse"
|
||||
Provides: monitoring_daemon
|
||||
Recommends: monitoring-plugins
|
||||
%if 0%{?suse_version} >= 1310
|
||||
BuildRequires: libyajl-devel
|
||||
%endif
|
||||
%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
|
||||
%if "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
# Requires devtoolset-2 scl
|
||||
BuildRequires: devtoolset-2-binutils
|
||||
BuildRequires: devtoolset-2-gcc-c++
|
||||
BuildRequires: devtoolset-2-libstdc++-devel
|
||||
%define scl_enable scl enable devtoolset-2 --
|
||||
%else
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libstdc++-devel
|
||||
%endif
|
||||
BuildRequires: openssl-devel
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake
|
||||
%if 0%{?suse_version} < 1600
|
||||
BuildRequires: gcc13
|
||||
BuildRequires: gcc13-c++
|
||||
%else
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
BuildRequires: flex >= 2.5.35
|
||||
BuildRequires: make
|
||||
|
||||
%if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
# el5 and el6 require packages.icinga.com
|
||||
BuildRequires: boost166-devel
|
||||
%else
|
||||
%if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
|
||||
# sles 11 sp3 requires packages.icinga.com
|
||||
BuildRequires: boost166-devel
|
||||
%else
|
||||
%if "%{_vendor}" == "suse" && 0%{?suse_version} > 1320
|
||||
BuildRequires: libboost_context-devel >= 1.66
|
||||
BuildRequires: libboost_coroutine-devel >= 1.66
|
||||
BuildRequires: libboost_filesystem-devel >= 1.66
|
||||
BuildRequires: libboost_iostreams-devel >= 1.66
|
||||
BuildRequires: libboost_program_options-devel >= 1.66
|
||||
BuildRequires: libboost_regex-devel >= 1.66
|
||||
%if 0%{?suse_version} < 1600
|
||||
BuildRequires: libboost_system-devel >= 1.66
|
||||
%endif
|
||||
BuildRequires: libboost_test-devel >= 1.66
|
||||
BuildRequires: libboost_thread-devel >= 1.66
|
||||
%else
|
||||
%if (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
# Requires EPEL repository
|
||||
BuildRequires: boost166-devel >= 1.66
|
||||
%else
|
||||
BuildRequires: boost-devel >= 1.66
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
BuildRequires: pkgconfig(libedit)
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: pkgconfig(nlohmann_json)
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(ncurses)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: icinga2-bin = %{version}
|
||||
Requires: systemd
|
||||
%endif
|
||||
|
||||
Obsoletes: %{name}-libs < %{version}
|
||||
Provides: %{name}-libs = %{version}
|
||||
Conflicts: %{name}-libs
|
||||
Recommends: monitoring-plugins
|
||||
Conflicts: icinga2-libs <= 2.10.0
|
||||
Provides: monitoring_daemon
|
||||
Obsoletes: icinga2-libs <= 2.10.0
|
||||
|
||||
%description bin
|
||||
Icinga 2 is a general-purpose network monitoring application.
|
||||
@@ -208,35 +83,24 @@ This subpackage provides the binaries for Icinga 2 Core.
|
||||
%package common
|
||||
Summary: Common Icinga 2 configuration
|
||||
Group: System/Monitoring
|
||||
%if (0%{?amzn} || 0%{?fedora} || 0%{?rhel})
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): shadow-utils
|
||||
%endif
|
||||
BuildRequires: logrotate
|
||||
%if "%{_vendor}" == "suse"
|
||||
PreReq: permissions
|
||||
Provides: group(%{icinga_group})
|
||||
Provides: group(%{icingacmd_group})
|
||||
Provides: user(%{icinga_user})
|
||||
Requires(pre): shadow
|
||||
Requires(post): shadow
|
||||
# Coreutils is added because of autoyast problems reported
|
||||
Requires(pre): coreutils
|
||||
Requires(post): coreutils
|
||||
%if 0%{?suse_version} >= 1200
|
||||
BuildRequires: monitoring-plugins-common
|
||||
Requires: monitoring-plugins-common
|
||||
%else
|
||||
Recommends: monitoring-plugins-common
|
||||
%endif
|
||||
# FIXME: use proper Requires(pre/post/preun/...)
|
||||
PreReq: permissions
|
||||
Requires(post): coreutils
|
||||
Requires(post): shadow
|
||||
Requires(pre): coreutils
|
||||
Requires(pre): shadow
|
||||
Recommends: logrotate
|
||||
%endif
|
||||
Provides: group(%{icinga_group})
|
||||
Provides: group(%{icinga_command_group})
|
||||
Provides: user(%{icinga_user})
|
||||
|
||||
%description common
|
||||
This subpackage provides common directories, and the UID and GUID definitions
|
||||
among Icinga 2 related packages.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for Icinga 2
|
||||
Group: Documentation/Other
|
||||
@@ -244,73 +108,36 @@ Group: Documentation/Other
|
||||
%description doc
|
||||
This subpackage provides documentation for Icinga 2.
|
||||
|
||||
|
||||
%package ido-mysql
|
||||
Summary: IDO MySQL database backend for Icinga 2
|
||||
Group: System/Monitoring
|
||||
%if "%{_vendor}" == "suse"
|
||||
BuildRequires: libmysqlclient-devel
|
||||
%if 0%{?suse_version} >= 1310
|
||||
BuildRequires: mysql-devel
|
||||
%endif
|
||||
|
||||
%else
|
||||
BuildRequires: mysql-devel
|
||||
%endif
|
||||
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
Requires: icinga2-bin = %{version}
|
||||
|
||||
%description ido-mysql
|
||||
Icinga 2 IDO mysql database backend. Compatible with Icinga 1.x
|
||||
IDOUtils schema >= 1.12
|
||||
|
||||
|
||||
%package ido-pgsql
|
||||
Summary: IDO PostgreSQL database backend for Icinga 2
|
||||
Group: System/Monitoring
|
||||
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
|
||||
BuildRequires: postgresql-devel >= 8.4
|
||||
%else
|
||||
BuildRequires: postgresql-devel
|
||||
%endif
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
Requires: icinga2-bin = %{version}
|
||||
|
||||
%description ido-pgsql
|
||||
Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
|
||||
IDOUtils schema >= 1.12
|
||||
|
||||
%if 0%{?use_selinux}
|
||||
%global selinux_variants mls targeted
|
||||
%global selinux_modulename %{name}
|
||||
|
||||
%package selinux
|
||||
Summary: SELinux policy module supporting icinga2
|
||||
Group: System/Base
|
||||
BuildRequires: checkpolicy
|
||||
BuildRequires: hardlink
|
||||
BuildRequires: selinux-policy-devel
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
Requires(post): policycoreutils-python
|
||||
Requires(postun): policycoreutils-python
|
||||
|
||||
%description selinux
|
||||
SELinux policy module supporting icinga2.
|
||||
%endif
|
||||
|
||||
%package -n vim-icinga2
|
||||
Summary: Vim syntax highlighting for icinga2
|
||||
Group: Productivity/Text/Editors
|
||||
%if "%{_vendor}" == "suse"
|
||||
BuildRequires: vim
|
||||
Requires: vim
|
||||
%else
|
||||
Requires: vim-filesystem
|
||||
%endif
|
||||
|
||||
%description -n vim-icinga2
|
||||
Provides Vim syntax highlighting for icinga2.
|
||||
|
||||
|
||||
%package -n nano-icinga2
|
||||
Summary: Nano syntax highlighting for icinga2
|
||||
Group: Productivity/Text/Editors
|
||||
@@ -320,460 +147,237 @@ Requires: nano
|
||||
Provides Nano syntax highlighting for icinga2.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
# use absolute shebang instead of env on SUSE distributions
|
||||
%if "%{_vendor}" == "suse"
|
||||
%autosetup -p1
|
||||
find . -type f -name '*.sh' -exec sed -i -e 's|\/usr\/bin\/env bash|\/bin\/bash|g' {} \;
|
||||
%patch -P 0 -p1
|
||||
%patch -P 1 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DICINGA2_LTO_BUILD=ON \
|
||||
-DCMAKE_NO_BUILTIN_CHRPATH=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DBoost_NO_BOOST_CMAKE=ON \
|
||||
-DICINGA2_PLUGINDIR=%{plugindir} \
|
||||
-DICINGA2_RUNDIR=%{_rundir} \
|
||||
-DICINGA2_SYSCONFIGFILE=/etc/sysconfig/icinga2 \
|
||||
-DICINGA2_USER=%{icinga_user} \
|
||||
-DICINGA2_GROUP=%{icinga_group} \
|
||||
-DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
|
||||
%if 0%{?fedora}
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
|
||||
%if 0%{?suse_version} < 1600
|
||||
export CC=gcc-13
|
||||
export CXX=g++-13
|
||||
%endif
|
||||
export CCACHE_BASEDIR="${CCACHE_BASEDIR:-$(pwd)}"
|
||||
|
||||
%if %{unity_build}
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=ON "
|
||||
%else
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=OFF "
|
||||
%endif
|
||||
CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DBoost_NO_BOOST_CMAKE=ON \
|
||||
-DICINGA2_PLUGINDIR=%{icinga2_plugindir} \
|
||||
-DICINGA2_RUNDIR=/run \
|
||||
-DICINGA2_SYSCONFIGFILE=%{_sysconfdir}/sysconfig/icinga2 \
|
||||
-DICINGA2_USER=%{icinga_user} \
|
||||
-DICINGA2_GROUP=%{icinga_group} \
|
||||
-DICINGA2_COMMAND_GROUP=%{icinga_command_group} \
|
||||
-DBASHCOMPLETION_DIR=%{_datadir}/bash-completion/completions"
|
||||
|
||||
%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
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=ON"
|
||||
|
||||
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
|
||||
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
|
||||
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
|
||||
-DBoost_NO_SYSTEM_PATHS=TRUE \
|
||||
-DBUILD_TESTING=FALSE \
|
||||
-DBoost_NO_BOOST_CMAKE=TRUE"
|
||||
%endif
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=OFF"
|
||||
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=OFF"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_COMPAT=ON"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_LIVESTATUS=ON"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_NOTIFICATION=ON"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PERFDATA=ON"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_TESTS=ON"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_MYSQL=ON"
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=ON"
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
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
|
||||
# FIXME: you should use the %%cmake macros
|
||||
cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} " -DCMAKE_CXX_FLAGS:STRING="%{optflags} " .
|
||||
|
||||
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_BUILD_HOST_NAME:STRING=OBS"
|
||||
|
||||
%{?scl_enable} cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if 0%{?use_selinux}
|
||||
cd tools/selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
||||
mv %{selinux_modulename}.pp %{selinux_modulename}.pp.${selinuxvariant}
|
||||
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
||||
done
|
||||
cd -
|
||||
%endif
|
||||
%make_build
|
||||
|
||||
%install
|
||||
make install \
|
||||
DESTDIR="%{buildroot}"
|
||||
|
||||
# install custom limits.conf for systemd
|
||||
%if 0%{?configure_systemd_limits}
|
||||
# for > 2.8 or > 2.7.2
|
||||
%if "%{_vendor}" == "suse"
|
||||
DESTDIR="$RPM_BUILD_ROOT"
|
||||
install -D -m 0644 etc/initsystem/icinga2.service.limits.conf %{buildroot}/%{_unitdir}/%{name}.service.d/limits.conf
|
||||
%else
|
||||
install -D -m 0644 etc/initsystem/icinga2.service.limits.conf %{buildroot}/etc/systemd/system/%{name}.service.d/limits.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# remove features-enabled symlinks
|
||||
rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
|
||||
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/icinga2/features-enabled/*.conf
|
||||
|
||||
# enable suse rc links
|
||||
%if "%{_vendor}" == "suse"
|
||||
%if 0%{?use_systemd}
|
||||
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
%else
|
||||
ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
|
||||
%endif
|
||||
mkdir -p "%{buildroot}%{_fillupdir}/"
|
||||
mv "%{buildroot}%{_sysconfdir}/sysconfig/%{name}" "%{buildroot}%{_fillupdir}/sysconfig.%{name}"
|
||||
%endif
|
||||
ln -sf %{_sbindir}/service $RPM_BUILD_ROOT/usr/sbin/rcicinga2
|
||||
mkdir -p "$RPM_BUILD_ROOT%{_fillupdir}"
|
||||
mv "$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/icinga2" "$RPM_BUILD_ROOT%{_fillupdir}/sysconfig.icinga2"
|
||||
|
||||
%if 0%{?use_selinux}
|
||||
cd tools/selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
||||
install -p -m 644 %{selinux_modulename}.pp.${selinuxvariant} \
|
||||
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{selinux_modulename}.pp
|
||||
done
|
||||
cd -
|
||||
install -D -m 0644 tools/syntax/vim/syntax/icinga2.vim $RPM_BUILD_ROOT/usr/share/vim/site/syntax/icinga2.vim
|
||||
install -D -m 0644 tools/syntax/vim/ftdetect/icinga2.vim $RPM_BUILD_ROOT/usr/share/vim/site/ftdetect/icinga2.vim
|
||||
|
||||
# TODO: Fix build problems on Icinga, see https://github.com/Icinga/puppet-icinga_build/issues/11
|
||||
#/usr/sbin/hardlink -cv %%{buildroot}%%{_datadir}/selinux
|
||||
%endif
|
||||
install -D -m 0644 tools/syntax/nano/icinga2.nanorc $RPM_BUILD_ROOT/usr/share/nano/icinga2.nanorc
|
||||
|
||||
%if "%{_vendor}" == "suse"
|
||||
install -D -m 0644 tools/syntax/vim/syntax/%{name}.vim %{buildroot}%{_datadir}/vim/site/syntax/%{name}.vim
|
||||
install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}/vim/site/ftdetect/%{name}.vim
|
||||
%else
|
||||
install -D -m 0644 tools/syntax/vim/syntax/%{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/%{name}.vim
|
||||
install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/%{name}.vim
|
||||
%endif
|
||||
|
||||
install -D -m 0644 tools/syntax/nano/%{name}.nanorc %{buildroot}%{_datadir}/nano/%{name}.nanorc
|
||||
%check
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
%make_build test
|
||||
|
||||
%pre
|
||||
%if "%{_vendor}" == "suse"
|
||||
%if 0%{?use_systemd}
|
||||
%service_add_pre %{name}.service
|
||||
%endif
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_rundir}/%{name}/cmd
|
||||
%endif
|
||||
|
||||
%{_bindir}/chkstat -n --warn --system -e /run/icinga2/cmd 1>&2
|
||||
|
||||
%post
|
||||
# suse
|
||||
%if "%{_vendor}" == "suse"
|
||||
%if 0%{?suse_version} >= 1310
|
||||
%set_permissions %{_rundir}/%{name}/cmd
|
||||
%endif
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
if [ -x %{_bindir}/chkstat ]; then
|
||||
%{_bindir}/chkstat -n --set --system /run/icinga2/cmd
|
||||
fi
|
||||
|
||||
%fillup_only %{name}
|
||||
%service_add_post %{name}.service
|
||||
%else
|
||||
%fillup_and_insserv %{name}
|
||||
%endif
|
||||
|
||||
if [ ${1:-0} -eq 1 ]
|
||||
then
|
||||
# initial installation, enable default features
|
||||
for feature in checker notification mainlog; do
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/icinga2/features-enabled/${feature}.conf
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%else
|
||||
# rhel
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
%systemd_post %{name}.service
|
||||
%else
|
||||
/sbin/chkconfig --add %{name}
|
||||
%endif
|
||||
|
||||
if [ ${1:-0} -eq 1 ]
|
||||
then
|
||||
# initial installation, enable default features
|
||||
for feature in checker notification mainlog; do
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%endif
|
||||
# suse/rhel
|
||||
|
||||
%preun
|
||||
# suse
|
||||
%if "%{_vendor}" == "suse"
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
%service_del_preun %{name}.service
|
||||
%else
|
||||
%stop_on_removal %{name}
|
||||
%endif
|
||||
|
||||
exit 0
|
||||
|
||||
%else
|
||||
# rhel
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
%systemd_preun %{name}.service
|
||||
%else
|
||||
if [ "$1" = "0" ]; then
|
||||
/sbin/service %{name} stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del %{name} || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
exit 0
|
||||
|
||||
%endif
|
||||
# suse / rhel
|
||||
%service_del_preun %{name}.service
|
||||
|
||||
%postun
|
||||
# suse
|
||||
%if "%{_vendor}" == "suse"
|
||||
%if 0%{?use_systemd}
|
||||
%service_del_postun %{name}.service
|
||||
%else
|
||||
%restart_on_update %{name}
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%else
|
||||
# rhel
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
%systemd_postun_with_restart %{name}.service
|
||||
%else
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%endif
|
||||
# suse / rhel
|
||||
|
||||
%service_del_postun %{name}.service
|
||||
if [ "$1" = "0" ]; then
|
||||
# deinstallation of the package - remove enabled features
|
||||
rm -rf %{_sysconfdir}/%{name}/features-enabled
|
||||
rm -rf %{_sysconfdir}/icinga2/features-enabled
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%pre common
|
||||
getent group %{icinga_group} >/dev/null || %{_sbindir}/groupadd -r %{icinga_group}
|
||||
getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacmd_group}
|
||||
getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G %{icingacmd_group} -g %{icinga_group} %{icinga_user}
|
||||
getent group %{icinga_command_group} >/dev/null || %{_sbindir}/groupadd -r %{icinga_command_group}
|
||||
getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/icinga2 -G %{icinga_command_group} -g %{icinga_group} %{icinga_user}
|
||||
|
||||
%if "%{_vendor}" == "suse"
|
||||
%verifyscript common
|
||||
%verify_permissions -e %{_rundir}/%{name}/cmd
|
||||
%endif
|
||||
|
||||
%{_bindir}/chkstat -n --warn --system -e /run/icinga2/cmd 1>&2
|
||||
|
||||
%post common
|
||||
%if "%{_vendor}" == "suse"
|
||||
%if 0%{?suse_version} >= 1310
|
||||
%set_permissions %{_rundir}/%{name}/cmd
|
||||
%endif
|
||||
%endif
|
||||
|
||||
if [ -x %{_bindir}/chkstat ]; then
|
||||
%{_bindir}/chkstat -n --set --system /run/icinga2/cmd
|
||||
fi
|
||||
|
||||
%post ido-mysql
|
||||
if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf ]
|
||||
if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/icinga2/features-enabled/ido-mysql.conf ]
|
||||
then
|
||||
# initial installation, enable ido-mysql feature
|
||||
ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
||||
ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/icinga2/features-enabled/ido-mysql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%postun ido-mysql
|
||||
if [ "$1" = "0" ]; then
|
||||
# deinstallation of the package - remove feature
|
||||
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
||||
rm -f %{_sysconfdir}/icinga2/features-enabled/ido-mysql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%post ido-pgsql
|
||||
if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf ]
|
||||
if [ ${1:-0} -eq 1 ] && [ -e %{_sysconfdir}/icinga2/features-enabled/ido-pgsql.conf ]
|
||||
then
|
||||
# initial installation, enable ido-pgsql feature
|
||||
ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
||||
ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/icinga2/features-enabled/ido-pgsql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%postun ido-pgsql
|
||||
if [ "$1" = "0" ]; then
|
||||
# deinstallation of the package - remove feature
|
||||
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
||||
rm -f %{_sysconfdir}/icinga2/features-enabled/ido-pgsql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%if 0%{?use_selinux}
|
||||
%post selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
/usr/sbin/semodule -s ${selinuxvariant} -i \
|
||||
%{_datadir}/selinux/${selinuxvariant}/%{selinux_modulename}.pp &> /dev/null || :
|
||||
done
|
||||
/sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
|
||||
/sbin/fixfiles -R icinga2-common restore &> /dev/null || :
|
||||
/sbin/semanage port -a -t icinga2_port_t -p tcp 5665 &> /dev/null || :
|
||||
|
||||
%postun selinux
|
||||
if [ $1 -eq 0 ] ; then
|
||||
/sbin/semanage port -d -t icinga2_port_t -p tcp 5665 &> /dev/null || :
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
/usr/sbin/semodule -s ${selinuxvariant} -r %{selinux_modulename} &> /dev/null || :
|
||||
done
|
||||
/sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
|
||||
/sbin/fixfiles -R icinga2-common restore &> /dev/null || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%license COPYING
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
%attr(644,root,root) %{_unitdir}/%{name}.service
|
||||
%if 0%{?configure_systemd_limits}
|
||||
%if "%{_vendor}" == "suse"
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/icinga2
|
||||
%dir %{_unitdir}/%{name}.service.d
|
||||
%attr(644,root,root) %{_unitdir}/%{name}.service
|
||||
%{_unitdir}/%{name}.service.d/limits.conf
|
||||
%else
|
||||
%dir /etc/systemd/system/%{name}.service.d
|
||||
%attr(644,root,root) %config(noreplace) /etc/systemd/system/%{name}.service.d/limits.conf
|
||||
%endif
|
||||
%endif
|
||||
%else
|
||||
%attr(755,root,root) %config(noreplace) %{_sysconfdir}/init.d/%{name}
|
||||
%endif
|
||||
%if "%{_vendor}" == "suse"
|
||||
%{_sbindir}/rc%{name}
|
||||
%{_fillupdir}/sysconfig.%{name}
|
||||
%else
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||
%endif
|
||||
|
||||
%{_sbindir}/%{name}
|
||||
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%{_libexecdir}/%{name}/prepare-dirs
|
||||
%{_libexecdir}/%{name}/safe-reload
|
||||
%dir %{_prefix}/lib/icinga2
|
||||
%{_prefix}/lib/icinga2/prepare-dirs
|
||||
%{_prefix}/lib/icinga2/safe-reload
|
||||
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/conf.d
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-available
|
||||
%exclude %{_sysconfdir}/%{name}/features-available/ido-*.conf
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-enabled
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/scripts
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/zones.d
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/%{name}.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/constants.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/*.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/*.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/*
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/scripts/*
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/icinga2
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/icinga2/conf.d
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/icinga2/features-available
|
||||
%exclude %{_sysconfdir}/icinga2/features-available/ido-*.conf
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/icinga2/features-enabled
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/icinga2/scripts
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/icinga2/zones.d
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/icinga2.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/constants.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/zones.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/conf.d/*.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/features-available/*.conf
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/zones.d/*
|
||||
%config(noreplace) %attr(-,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/scripts/*
|
||||
|
||||
%attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
|
||||
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/log/%{name}/crash
|
||||
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat
|
||||
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat/archives
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %{_localstatedir}/lib/%{name}
|
||||
%attr(0750,%{icinga_user},%{icingacmd_group}) %ghost %dir %{_rundir}/%{name}
|
||||
%attr(2750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}/cmd
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
|
||||
%attr(0770,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
|
||||
%attr(0750,%{icinga_user},%{icinga_command_group}) %{_localstatedir}/cache/icinga2
|
||||
%attr(0750,%{icinga_user},%{icinga_command_group}) %dir %{_localstatedir}/log/icinga2
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/log/icinga2/crash
|
||||
%attr(0750,%{icinga_user},%{icinga_command_group}) %dir %{_localstatedir}/log/icinga2/compat
|
||||
%attr(0750,%{icinga_user},%{icinga_command_group}) %dir %{_localstatedir}/log/icinga2/compat/archives
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %{_localstatedir}/lib/icinga2
|
||||
%attr(0750,%{icinga_user},%{icinga_command_group}) %ghost %dir /run/icinga2
|
||||
%attr(2750,%{icinga_user},%{icinga_command_group}) %ghost /run/icinga2/cmd
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/icinga2
|
||||
%attr(0770,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/icinga2/perfdata
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/icinga2/tmp
|
||||
|
||||
%files bin
|
||||
%defattr(-,root,root,-)
|
||||
%license COPYING
|
||||
%license COPYING
|
||||
%doc README.md NEWS AUTHORS CHANGELOG.md
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %{_libdir}/%{name}/sbin
|
||||
%{_libdir}/%{name}/sbin/%{name}
|
||||
%{plugindir}/check_nscp_api
|
||||
%{_datadir}/%{name}
|
||||
%exclude %{_datadir}/%{name}/include
|
||||
%{_mandir}/man8/%{name}.8.gz
|
||||
%dir %{_libdir}/icinga2
|
||||
%dir %{_libdir}/icinga2/sbin
|
||||
%{_libdir}/icinga2/sbin/icinga2
|
||||
%{icinga2_plugindir}/check_nscp_api
|
||||
%{_datadir}/icinga2
|
||||
%exclude %{_datadir}/icinga2/include
|
||||
%{_mandir}/man8/icinga2.8%{?ext_man}
|
||||
|
||||
%files common
|
||||
%defattr(-,root,root,-)
|
||||
%license COPYING
|
||||
%license COPYING
|
||||
%doc README.md NEWS AUTHORS CHANGELOG.md tools/syntax
|
||||
%{_sysconfdir}/bash_completion.d/%{name}
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
|
||||
%{_datadir}/%{name}/include/*
|
||||
%{_datadir}/bash-completion/completions/icinga2
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/icinga2/include
|
||||
%attr(-,%{icinga_user},%{icinga_group}) %{_datadir}/icinga2/include/*
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/doc/%{name}
|
||||
%docdir %{_datadir}/doc/%{name}
|
||||
%{_datadir}/doc/icinga2
|
||||
%docdir %{_datadir}/doc/icinga2
|
||||
|
||||
%files ido-mysql
|
||||
%defattr(-,root,root,-)
|
||||
%license COPYING
|
||||
%license COPYING
|
||||
%doc README.md NEWS AUTHORS CHANGELOG.md
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-mysql.conf
|
||||
%{_libdir}/%{name}/libmysql_shim*
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/features-available/ido-mysql.conf
|
||||
%{_libdir}/icinga2/libmysql_shim*
|
||||
%{_datadir}/icinga2-ido-mysql
|
||||
|
||||
%files ido-pgsql
|
||||
%defattr(-,root,root,-)
|
||||
%license COPYING
|
||||
%license COPYING
|
||||
%doc README.md NEWS AUTHORS CHANGELOG.md
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-pgsql.conf
|
||||
%{_libdir}/%{name}/libpgsql_shim*
|
||||
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/icinga2/features-available/ido-pgsql.conf
|
||||
%{_libdir}/icinga2/libpgsql_shim*
|
||||
%{_datadir}/icinga2-ido-pgsql
|
||||
|
||||
%if 0%{?use_selinux}
|
||||
%files selinux
|
||||
%defattr(-,root,root,0755)
|
||||
%doc tools/selinux/*
|
||||
%{_datadir}/selinux/*/%{selinux_modulename}.pp
|
||||
%endif
|
||||
|
||||
%files -n vim-icinga2
|
||||
%defattr(-,root,root,-)
|
||||
%if "%{_vendor}" == "suse"
|
||||
%{_datadir}/vim/site/syntax/%{name}.vim
|
||||
%{_datadir}/vim/site/ftdetect/%{name}.vim
|
||||
%else
|
||||
%{_datadir}/vim/vimfiles/syntax/%{name}.vim
|
||||
%{_datadir}/vim/vimfiles/ftdetect/%{name}.vim
|
||||
%endif
|
||||
%{_datadir}/vim/site/syntax/icinga2.vim
|
||||
%{_datadir}/vim/site/ftdetect/icinga2.vim
|
||||
|
||||
%files -n nano-icinga2
|
||||
%defattr(-,root,root,-)
|
||||
%if "%{_vendor}" == "suse"
|
||||
%dir %{_datadir}/nano
|
||||
%endif
|
||||
%{_datadir}/nano/%{name}.nanorc
|
||||
%{_datadir}/nano/icinga2.nanorc
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user