check_openmanage spec file fixes for SUSE

Trond Hasle Amundsen t.h.amundsen at usit.uio.no
Mon Dec 12 13:27:48 CET 2011


"Daugherity, Andrew W" <adaugherity at tamu.edu> writes:

> 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.

Hello Andrew,

Excellent :) Usually a public forum is better, where everybody can
participate and share their insight.

> 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 for the patch, applied. However, there are some changes to the
spec file lately. Among them is an added Requires to the nagios-plugins
package, which owns the /usr/lib(64)?/nagios/plugins directory.
Hopefully SUSE does the same in this respect. The updated spec file is
available here:

  http://folk.uio.no/trondham/software/tmp/nagios-plugins-openmanage.spec

PS. check_openmanage has been added to Fedora and EPEL, but there are
some SELinux issues. Until these are resolved I'll hold off pushing it
to stable, but it is available in testing.

Cheers,
-- 
Trond H. Amundsen <t.h.amundsen at usit.uio.no>
Center for Information Technology Services, University of Oslo

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
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