check_openmanage spec file fixes for SUSE

Daugherity, Andrew W adaugherity at tamu.edu
Sat Dec 10 00:02:35 CET 2011


(Resending as apparently my first attempt didn't make it through.)


First of all, thanks for making this plugin.  It works well and is very handy.  As requested in the documentation, I am sending this to the nagios-users list rather than directly to the author.


With some minor modifications, the package builds properly on SUSE.  There are two main Nagios packaging differences from RedHat:

1) All Nagios plugins are installed to /usr/lib/nagios/plugins, even on 64-bit (there is no /usr/lib64/nagios directory).  This may not make the most sense, but it is what is, and being consistent with other Nagios packages is good.
2) Non-binary plugin RPMs (e.g. Perl scripts only) use noarch, while binary plugins use the corresponding arch.  For examples of both, browse the build service repo at http://download.opensuse.org/repositories/server:/monitoring/SLE_11.1/ .  Being a Perl script, check_openmanage falls under the former.

This is easily solved with an %if block to make a universal RPM spec:
==== BEGIN PATCH ====
--- nagios-plugins-openmanage.spec.orig	2011-10-05 10:00:18.000000000 -0500
+++ nagios-plugins-openmanage.spec	2011-12-01 15:02:10.000000000 -0600
@@ -5,6 +5,16 @@
# No binaries here, do not build a debuginfo package
%global debug_package %{nil}

+# SUSE installs Nagios plugins under /usr/lib, even on 64-bit
+# It also uses noarch for non-binary Nagios plugins
+%if %{defined suse_version}
+%global nagiospluginsdir /usr/lib/nagios/plugins
+BuildArch:	noarch
+%else
+%global nagiospluginsdir %{_libdir}/nagios/plugins
+%endif
+
+
Name:          nagios-plugins-openmanage
Version:       3.7.3
Release:       1%{?dist}
==== END PATCH ====

I also tested building on CentOS 5 to make sure nothing broke there, and indeed, nothing changed there.


Thanks,

Andrew Daugherity
Systems Analyst
Division of Research, Texas A&M University

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list