File monitoring-plugins-redfish.spec of Package monitoring-plugins-redfish

# spec file for package monitoring-plugins-redfish
# Copyright (c) 2020-2021, Martin Hauke <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define realname check_redfish
Name:           monitoring-plugins-redfish
Version:        1.3.0
Release:        0
Summary:        An Icinga plugin to monitor HW-health status via Redfish
License:        MIT
Group:          System/Monitoring
BuildRequires:  nagios-rpm-macros
Requires:       python3-redfish >= 2.1.4
BuildArch:      noarch

A monitoring plugin to check components and health status of systems
which support Redfish.

%setup -q -n %{realname}-%{version}
sed -i 's|/usr/bin/env python3|/usr/bin/python3|g'


install -d %{buildroot}/%{nagios_plugindir}/check_redfish/
install -m0755 %{buildroot}/%{nagios_plugindir}/check_redfish/check_redfish
mv cr_module/ %{buildroot}/%{nagios_plugindir}/check_redfish/

mkdir -p %{_localstatedir}/adm/update-messages
cat > %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-notify <<-'EOF'
With %{name}-%{version} the nagios plugin excecutable path has changed:
  from: %{nagios_plugindir}/check_redfish
  to:   %{nagios_plugindir}/check_redfish/check_redfish

rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-notify

%license LICENSE.txt
%doc contrib/*.conf
%dir %{nagios_libdir}
%dir %{nagios_plugindir}

openSUSE Build Service is sponsored by