From 37c398c1e355fb4651de5941dfb0d1ecf75cda47 Mon Sep 17 00:00:00 2001 From: monitorbuilder_pel7ppc64lebuilder0 Date: Tue, 16 Jul 2024 15:01:57 +0200 Subject: [PATCH] icinga updates Signed-off-by: monitorbuilder_pel7ppc64lebuilder0 --- SOURCES/icinga-notifications.service | 2 +- SOURCES/nagios-plugins-systemd.pymodule.patch | 12 +++ SPECS/icinga-notifications-web.spec | 2 +- SPECS/icinga-notifications.spec | 17 ++-- SPECS/icinga-php-library.spec | 2 +- SPECS/icingaweb2-module-director.spec | 91 +++++++++++++++++++ SPECS/icingaweb2-module-graphite.spec | 2 +- SPECS/icingaweb2-module-reporting.spec | 2 +- SPECS/icingaweb2-module-toplevelview.spec | 2 +- SPECS/nagios-plugins-systemd.spec | 47 ++++++++++ SPECS/prometheus.spec | 2 +- 11 files changed, 167 insertions(+), 14 deletions(-) create mode 100644 SOURCES/nagios-plugins-systemd.pymodule.patch create mode 100644 SPECS/icingaweb2-module-director.spec create mode 100644 SPECS/nagios-plugins-systemd.spec diff --git a/SOURCES/icinga-notifications.service b/SOURCES/icinga-notifications.service index a3ee333..e06cbcb 100644 --- a/SOURCES/icinga-notifications.service +++ b/SOURCES/icinga-notifications.service @@ -4,7 +4,7 @@ After=syslog.target network-online.target icinga2.service postgresql.service [Service] Type=notify -ExecStart=/usr/sbin/icinga-notifications-daemon --config /etc/icinga-notifications/config.yml +ExecStart=/usr/sbin/icinga-notifications --config /etc/icinga-notifications/config.yml User=icinganotifications Group=icinganotifications diff --git a/SOURCES/nagios-plugins-systemd.pymodule.patch b/SOURCES/nagios-plugins-systemd.pymodule.patch new file mode 100644 index 0000000..489af59 --- /dev/null +++ b/SOURCES/nagios-plugins-systemd.pymodule.patch @@ -0,0 +1,12 @@ +diff --color -ur check_systemd-2.3.1/setup.py check_systemd-2.3.1.pymodule/setup.py +--- check_systemd-2.3.1/setup.py 2021-03-03 21:05:57.000000000 +0100 ++++ check_systemd-2.3.1.pymodule/setup.py 2022-11-06 12:52:16.694700980 +0100 +@@ -27,7 +27,7 @@ + name='check_systemd', + packages=find_packages(), + version=find_version('check_systemd.py'), +- scripts=['check_systemd.py'], ++ py_modules=['check_systemd'], + install_requires=[ + 'nagiosplugin>=1.2', + ], diff --git a/SPECS/icinga-notifications-web.spec b/SPECS/icinga-notifications-web.spec index 60690cd..8fc9b2e 100644 --- a/SPECS/icinga-notifications-web.spec +++ b/SPECS/icinga-notifications-web.spec @@ -3,7 +3,7 @@ %global docdir %{_datadir}/doc/icinganotifications Name: icinga-notifications-web -Version: 0.0.4 +Version: 0.0.5 Release: 1%{?dist} Summary: Icinga Notifications Web — Manage incidents and who gets notified about them how and when Group: Applications/System diff --git a/SPECS/icinga-notifications.spec b/SPECS/icinga-notifications.spec index 115112b..2aed29a 100644 --- a/SPECS/icinga-notifications.spec +++ b/SPECS/icinga-notifications.spec @@ -9,7 +9,7 @@ %define service %{name}.service Name: icinga-notifications -Version: 0.0.4 +Version: 0.0.5 Release: 1%{?dist} Summary: Icinga Notifications Group: System Environment/Daemons @@ -31,10 +31,13 @@ Icinga Notifications %prep %setup -q -T -c %{name}-%{version} git clone https://%{provider_prefix} . +sed 's/go 1.22$/go 1.22.0/' -i go.mod %build -go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}"" -buildvcs=false -trimpath ./cmd/icinga-notifications-daemon -go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}"" -buildvcs=false -trimpath -o channel/ ./cmd/channel/... +go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" \ + -X 'icinga-notifications/internal.LibExecDir="%{_libexecdir}"/"%{name}"/' -X 'icinga-notifications/internal.SysConfDir="%{configdir}"'" \ + -buildvcs=false -trimpath ./cmd/icinga-notifications +go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}"" -buildvcs=false -trimpath -o channels/ ./cmd/channels/... %install @@ -42,8 +45,8 @@ install -d -m 0755 %{buildroot}%{_sbindir} install -d -m 0755 %{buildroot}%{configdir} install -d -m 0755 %{buildroot}%{_unitdir} install -d -m 0755 %{buildroot}%{_libexecdir}/%{name} -install -m 0755 icinga-notifications-daemon %{buildroot}%{_sbindir}/ -%{__cp} -r channel %{buildroot}%{_libexecdir}/%{name}/ +install -m 0755 icinga-notifications %{buildroot}%{_sbindir}/ +%{__cp} -r channels %{buildroot}%{_libexecdir}/%{name}/ install -m 0644 config.example.yml %{buildroot}%{configdir}/config.yml install -m 0644 icinga2.conf %{buildroot}%{configdir}/icinga2-notifications.conf install -m 0644 %{S:1} %{buildroot}%{_unitdir}/ @@ -69,8 +72,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root) %doc LICENSE README.md -%{_sbindir}/icinga-notifications-daemon -%{_libexecdir}/%{name}/channel/ +%{_sbindir}/icinga-notifications +%{_libexecdir}/%{name}/channels/ %{_unitdir}/%{service} %dir %{_datadir}/%{name} %{_datadir}/%{name}/schema diff --git a/SPECS/icinga-php-library.spec b/SPECS/icinga-php-library.spec index f0203ea..db6510c 100644 --- a/SPECS/icinga-php-library.spec +++ b/SPECS/icinga-php-library.spec @@ -1,7 +1,7 @@ %global basedir %{_datadir}/icinga-php/ipl Name: icinga-php-library -Version: 0.13.2 +Version: 0.14.0 Release: 1%{?dist} Summary: Icinga PHP Library for Icinga Web 2 Group: Applications/System diff --git a/SPECS/icingaweb2-module-director.spec b/SPECS/icingaweb2-module-director.spec new file mode 100644 index 0000000..6d5d867 --- /dev/null +++ b/SPECS/icingaweb2-module-director.spec @@ -0,0 +1,91 @@ +%global module_name director +%global icingaweb_min_version 2.10.3 +%global basedir %{_datadir}/icingaweb2/modules/%{module_name} + +Name: icingaweb2-module-%{module_name} +Version: 1.11.1 +Release: 1%{?dist} +Summary: Configuration deployment tool in the Icinga ecosystem +Group: Applications/System +License: GPLv2+ +URL: https://icinga.com +Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}.tar.gz +BuildArch: noarch +Requires: icingaweb2 >= %{icingaweb_min_version} +Requires: php-Icinga >= %{icingaweb_min_version} +Requires: icingaweb2-module-%{module_name}-daemon = %{version}-%{release} + + +%description +Icinga Director is the configuration deployment tool in the Icinga ecosystem, +designed for automating configuration deployments, +but also for making changes directly in the webinterface. + +%package daemon +Requires(pre): shadow-utils +Requires: icingaweb2-module-%{module_name} = %{version}-%{release} +Requires: icingacli >= %{icingaweb_min_version} +Requires: php-process +Summary: Icinga Director daemon files +%description daemon +Daemon files for Icinga Director. + + +%prep +%autosetup + + +%build + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{basedir} +cp -r * %{buildroot}%{basedir} +install -Dpm 0644 contrib/systemd/icinga-director.service %{buildroot}%{_unitdir}/icinga-director.service +install -dm 0750 %{buildroot}/var/lib/icingadirector + + +%preun +if [ $1 == 0 ]; then +rm -f /etc/icingaweb2/enabledModules/director +fi +%post +if [ $1 == 1 ]; then +if [ ! -d /etc/icingaweb2/enabledModules ]; then +install -dm 2770 -g icingaweb2 /etc/icingaweb2/enabledModules +fi +ln -sf /usr/share/icingaweb2/modules/director /etc/icingaweb2/enabledModules/director +fi + + +%pre daemon +getent passwd icingadirector >/dev/null || useradd -r -G icingaweb2 -d /var/lib/icingadirector -s /sbin/nologin icingadirector +%post daemon +if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then +/usr/lib/systemd/systemd-update-helper install-system-units icinga-director.service || : +fi +%preun daemon +if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then +/usr/lib/systemd/systemd-update-helper remove-system-units icinga-director.service || : +fi +%postun daemon +if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then +/usr/lib/systemd/systemd-update-helper mark-restart-system-units icinga-director.service || : +fi +test "$1" != 0 || userdel -rf icingadirector &>/dev/null || : + + +%files +%doc README.md +%docdir %{_datadir}/icingaweb2/modules/%{module_name}/doc +%license LICENSE +%{_datadir}/icingaweb2/modules/%{module_name}/ + + +%files daemon +/usr/lib/systemd/system/icinga-director.service +%attr(-,icingadirector,icingaweb2) /var/lib/icingadirector + + +%changelog diff --git a/SPECS/icingaweb2-module-graphite.spec b/SPECS/icingaweb2-module-graphite.spec index efc14f9..778910d 100644 --- a/SPECS/icingaweb2-module-graphite.spec +++ b/SPECS/icingaweb2-module-graphite.spec @@ -3,7 +3,7 @@ %global basedir %{_datadir}/icingaweb2/modules/%{module_name} Name: icingaweb2-module-%{module_name} -Version: 1.2.2 +Version: 1.2.4 Release: 1%{?dist} Summary: Audit - Icinga Web 2 module Group: Applications/System diff --git a/SPECS/icingaweb2-module-reporting.spec b/SPECS/icingaweb2-module-reporting.spec index d9f76e8..6a300c8 100644 --- a/SPECS/icingaweb2-module-reporting.spec +++ b/SPECS/icingaweb2-module-reporting.spec @@ -5,7 +5,7 @@ %global service_user apache Name: icingaweb2-module-%{module_name} -Version: 1.0.1 +Version: 1.0.2 Release: 1%{?dist} Summary: Reporting - Icinga Web 2 module Group: Applications/System diff --git a/SPECS/icingaweb2-module-toplevelview.spec b/SPECS/icingaweb2-module-toplevelview.spec index 1f28569..f510163 100644 --- a/SPECS/icingaweb2-module-toplevelview.spec +++ b/SPECS/icingaweb2-module-toplevelview.spec @@ -2,7 +2,7 @@ %global icingaweb_min_version 2.6.0 %global basedir %{_datadir}/icingaweb2/modules/%{module_name} Name: icingaweb2-module-%{module_name} -Version: 0.3.2 +Version: 0.4.0 Release: 1%{?dist} Summary: TopLevelView is a drill down view into your Icinga environment Group: Applications/System diff --git a/SPECS/nagios-plugins-systemd.spec b/SPECS/nagios-plugins-systemd.spec new file mode 100644 index 0000000..6859de1 --- /dev/null +++ b/SPECS/nagios-plugins-systemd.spec @@ -0,0 +1,47 @@ +%global nagiospluginsdir %{_libdir}/nagios/plugins +%global debug_package %{nil} + +Name: nagios-plugins-systemd +Version: 2.3.1 +Release: 1%{dist} +Summary: Nagios Plugin - check_systemd +License: LGPL-2.1-only +URL: https://exchange.icinga.com/joseffriedrich/check_systemd +Source: https://github.com/Josef-Friedrich/check_systemd/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: nagios-plugins-systemd.pymodule.patch +BuildRequires: python3-devel +Requires: python3 + + +%description +This systemd check for nagios compatible monitoring systems will report a +degraded systemd to your monitoring solution. It can also be used to monitor +individual systemd services and timers units. + + +%prep +%autosetup -p1 -n check_systemd-%{version} + + +%build +%{__python3} setup.py build + + +%install +%{__python3} setup.py install --root %{buildroot} --optimize 2 +mkdir -p %{buildroot}/%{nagiospluginsdir} +mv %{buildroot}/%{_bindir}/check_systemd %{buildroot}/%{nagiospluginsdir} + + +%check +PYTHONPATH=%{buildroot}/%{nagiospluginsdir}:${PYTHONPATH} PATH=%{buildroot}/%{nagiospluginsdir}:${PATH} %tox + + +%files +%doc README.* +%license LICENSE +%{nagiospluginsdir}/check_systemd +%{python3_sitelib} + + +%changelog diff --git a/SPECS/prometheus.spec b/SPECS/prometheus.spec index e22325a..2e48eae 100644 --- a/SPECS/prometheus.spec +++ b/SPECS/prometheus.spec @@ -6,7 +6,7 @@ #%define debug_package %{nil} Name : prometheus -Version : 2.37.0 +Version : 2.52.0 Release : 1%{dist} License : MIT URL : https://prometheus.io