monitorbuilder_pel7ppc64lebuilder0
4 months ago
11 changed files with 167 additions and 14 deletions
@ -0,0 +1,12 @@
@@ -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', |
||||
], |
@ -0,0 +1,91 @@
@@ -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 |
@ -0,0 +1,47 @@
@@ -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 |
Loading…
Reference in new issue