SF.net SVN: gar:[24664] csw/mgar/pkg/nagios-plugin-check_mk/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Feb 19 11:29:11 CET 2015


Revision: 24664
          http://sourceforge.net/p/gar/code/24664
Author:   dmichelsen
Date:     2015-02-19 10:29:11 +0000 (Thu, 19 Feb 2015)
Log Message:
-----------
nagios-plugin-check_mk/trunk: Complete rework, first working version

Modified Paths:
--------------
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/Makefile
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Allow-setting-SETUPCONF-externally.patch
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Do-not-chown-during-package-building.patch
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Honour-SETUPCONF-even-when-DESTDIR-is-set.patch
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/check_mk_setup.conf

Removed Paths:
-------------
    csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Solaris-header-fixes.patch

Modified: csw/mgar/pkg/nagios-plugin-check_mk/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/Makefile	2015-02-19 10:25:33 UTC (rev 24663)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/Makefile	2015-02-19 10:29:11 UTC (rev 24664)
@@ -2,72 +2,57 @@
 # TODO (release-critical prefixed with !, non release-critical with *)
 #
 NAME = check_mk
-#VERSION = 1.2.0p3
-VERSION = 1.2.1i3
+VERSION = 1.2.4p5
 GARTYPE = v2
 
 DESCRIPTION = A new general purpose Nagios-plugin for retrieving data
 
 MASTER_SITES = http://mathias-kettner.de/download/
 DISTFILES += $(DISTNAME).tar.gz
+DISTFILES += check_mk_setup.conf
 
-PATCHFILES += 0001-Solaris-header-fixes.patch
+PATCHFILES += 0001-Do-not-chown-during-package-building.patch
+PATCHFILES += 0001-Allow-setting-SETUPCONF-externally.patch
+PATCHFILES += 0001-Honour-SETUPCONF-even-when-DESTDIR-is-set.patch
 
 VENDOR_URL = http://mathias-kettner.de/check_mk.html
 
-PACKAGES += CSWnagios-plugin-mk-livestatus
-SPKG_DESC_CSWnagios-plugin-mk-livestatus = A new general purpose Nagios-plugin for retrieving data
+PACKAGES += CSWnagios-plugin-checkmk
+SPKG_DESC_CSWnagios-plugin-checkmk = A new general purpose Nagios-plugin for retrieving data
 # PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWnagios-plugin-checkmk += CSWapache2
+RUNTIME_DEP_PKGS_CSWnagios-plugin-checkmk += CSWperl
 
-# ~/.check_mk_setup.conf
+# This is a comment
+CHECKPKG_OVERRIDES_CSWnagios-plugin-checkmk += file-with-bad-content|/usr/share|root/etc/opt/csw/check_mk/multisite.mk.CSW
 
-#    VARNAME=$1
-#    DEF_ROOT=$2
-#    DEF_USER=$3
-#    DEF_OMD=$4
-#    SHORT=$5
-#    DESCR=$6
-
-# ask_dir bindir /usr/bin $HOMEBASEDIR/bin $OMD_ROOT/local/bin "Executable programs" \
-# ask_dir confdir /etc/$NAME $HOMEBASEDIR $OMD_ROOT/etc/check_mk "Check_MK configuration" \
-# ask_dir sharedir /usr/share/$NAME $HOMEBASEDIR $OMD_ROOT/local/share/check_mk "Check_MK software" \
-# ask_dir docdir /usr/share/doc/$NAME $HOMEBASEDIR/doc $OMD_ROOT/local/share/check_mk/doc "documentation" \
-# ask_dir checkmandir /usr/share/doc/$NAME/checks $HOMEBASEDIR/doc/checks $OMD_ROOT/local/share/check_mk/checkman "check manuals" \
-# ask_dir vardir /var/lib/$NAME $HOMEBASEDIR/var $OMD_ROOT/var/check_mk "working directory of check_mk" \
-# ask_dir agentslibdir /usr/lib/check_mk_agent $HOMEBASEDIR/check_mk_agent /usr/lib/check_mk_agent "extensions for agents" \
-# ask_dir agentsconfdir /etc/check_mk $HOMEBASEDIR /etc/check_mk "configuration dir for agents" \
-# ask_dir -d nagiosuser nagios $(id -un) "$OMD_SITE" "Name of Nagios user" \
-# ask_dir -d wwwuser www-data www-data "$OMD_SITE" "User of Apache process" \
-# ask_dir -d wwwgroup nagios $(id -un) "$OMD_SITE" "Common group of Nagios+Apache" \
-# ask_dir nagios_binary /usr/sbin/nagios $HOMEBASEDIR/nagios/bin/nagios $OMD_ROOT/bin/nagios "Nagios binary" \
-# ask_dir nagios_config_file /etc/nagios/nagios.cfg $HOMEBASEDIR/nagios/etc/nagios.cfg $OMD_ROOT/tmp/nagios/nagios.cfg "Nagios main configuration file" \
-# ask_dir nagconfdir /etc/nagios/objects $HOMEBASEDIR/nagios/etc $OMD_ROOT/etc/nagios/conf.d "Nagios object directory" \
-# ask_dir nagios_startscript /etc/init.d/nagios /etc/init.d/nagios $OMD_ROOT/etc/init.d/nagios "Nagios startskript" \
-# ask_dir nagpipe /var/log/nagios/rw/nagios.cmd $HOMEBASEDIR/var/nagios/rw/nagios.cmd $OMD_ROOT/tmp/run/nagios.cmd "Nagios command pipe" \
-# ask_dir check_result_path /usr/local/nagios/var/spool/checkresults $HOMEBASEDIR/var/nagios/checkresults $OMD_ROOT/tmp/nagios/checkresults "Check results directory" \
-# ask_dir nagios_status_file /var/log/nagios/status.dat /var/log/nagios/status.dat $OMD_ROOT/tmp/nagios/status.dat "Nagios status file" \
-# ask_dir check_icmp_path /usr/lib/nagios/plugins/check_icmp $HOMEBASEDIR/libexec/check_icmp $OMD_ROOT/lib/nagios/plugins/check_icmp "Path to check_icmp" \
-# ask_dir -d url_prefix / / /$OMD_SITE/ "URL Prefix for Web addons" \
-# ask_dir apache_config_dir /etc/apache2/conf.d /etc/apache2/conf.d $OMD_ROOT/etc/apache/conf.d "Apache config dir" \
-# ask_dir htpasswd_file /etc/nagios/htpasswd.users $HOMEBASEDIR/etc/htpasswd.users $OMD_ROOT/etc/htpasswd "HTTP authentication file" \
-# ask_dir -d nagios_auth_name "Nagios Access" "Nagios Access" "OMD Monitoring Site $OMD_SITE" "HTTP AuthName" \
-# ask_dir pnptemplates /usr/share/$NAME/pnp-templates $HOMEBASEDIR/pnp-templates $OMD_ROOT/local/share/check_mk/pnp-templates "PNP4Nagios templates" \
-# ask_dir -d enable_livestatus yes yes yes "compile livestatus module" \
-#   ask_dir libdir /usr/lib/$NAME $HOMEBASEDIR/lib $OMD_ROOT/local/lib/mk-livestatus "check_mk's binary modules" \
-#   ask_dir livesock ${nagpipe%/*}/live ${nagpipe%/*}/live $OMD_ROOT/tmp/run/live "Unix socket for Livestatus" \
-#   ask_dir livebackendsdir /usr/share/$NAME/livestatus $HOMEBASEDIR/livestatus $OMD_ROOT/local/share/mk-livestatus "Backends for other systems" \
-
 GARCOMPILER = GCC4
 
-EXTRA_LDFLAGS += -lsocket  -lnsl
+# The configure/build/install phase is combined in setup.sh
+CONFIGURE_SCRIPTS =
+BUILD_SCRIPTS =
+TEST_SCRIPTS =
+INSTALL_SCRIPTS = custom
 
-# The issued command "which diet" is on Solaris /usr/bin/diet which always returns 0 and therefore always enable diet mode
-REINPLACE_MATCH = .*diet.*
-REINPLACE_WITH = if false; then
-REINPLACE_FILES += configure
+PRESERVECONF += $(sysconfdir)/check_mk/main.mk
+PRESERVECONF += $(sysconfdir)/check_mk/multisite.mk
 
 include gar/category.mk
 
-post-extract-modulated:
-	-cd $(WORKSRC) && gtar zxvf livestatus.tar.gz
+#post-extract:
+#	-cd $(WORKSRC) && gtar zxvf livestatus.tar.gz
+#	@$(MAKECOOKIE)
+
+install-custom:
+	cd $(WORKSRC) && DESTDIR=$(DESTDIR) PATH=/opt/csw/gnu:/usr/xpg4/bin:$(PATH) SETUPCONF=$(abspath $(WORKDIR)/check_mk_setup.conf) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LD_OPTIONS="$(LD_OPTIONS)" CC="$(CC)" ./setup.sh
+	@# This crashes the python code around elfdump
+	rm -f $(DESTDIR)/opt/csw/libexec/check_mk/livestatus.o
+	@# WTF? Mixed binaries just deployed?!?
+	@# CHECKPKG_OVERRIDES_CSWnagios-plugin-mk-livestatus += binary-architecture-does-not-match-placement|file=opt/csw/share/doc/check_mk/treasures/modbus/agent_modbus|arch_id=62|arch_name=amd64  
+	@# CHECKPKG_OVERRIDES_CSWnagios-plugin-mk-livestatus += binary-architecture-does-not-match-placement|file=opt/csw/share/check_mk/agents/waitmax|arch_id=3|arch_name=i386  
+	rm -f $(DESTDIR)/opt/csw/share/doc/check_mk/treasures/modbus/agent_modbus
+	rm -f $(DESTDIR)/opt/csw/share/check_mk/agents/waitmax
+	@# This is also present as multisite.mk, delete the versioned one as we use PRESERVECONF anyway
+	rm -f $(DESTDIR)/etc/opt/csw/check_mk/multisite.mk-$(VERSION)
+	rm -f $(DESTDIR)/etc/opt/csw/check_mk/main.mk-$(VERSION)
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/nagios-plugin-check_mk/trunk/checksums
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/checksums	2015-02-19 10:25:33 UTC (rev 24663)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/checksums	2015-02-19 10:29:11 UTC (rev 24664)
@@ -1 +1 @@
-45713ac5bf81e750e115bf36d9732eec  check_mk-1.2.1i3.tar.gz
+ef3055d191bd38295d1716b3f7824115  check_mk-1.2.4p5.tar.gz

Added: csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Allow-setting-SETUPCONF-externally.patch
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Allow-setting-SETUPCONF-externally.patch	                        (rev 0)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Allow-setting-SETUPCONF-externally.patch	2015-02-19 10:29:11 UTC (rev 24664)
@@ -0,0 +1,24 @@
+From 436df63038d14f85986c8464743a41b97d9d52f0 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 18 Feb 2015 15:55:45 +0100
+Subject: [PATCH] Allow setting SETUPCONF externally
+
+---
+ setup.sh | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.sh b/setup.sh
+index 288be33..7e576b3 100755
+--- a/setup.sh
++++ b/setup.sh
+@@ -28,7 +28,6 @@ VERSION=1.2.4p5
+ NAME=check_mk
+ LANG=
+ LC_ALL=
+-SETUPCONF=~/.check_mk_setup.conf
+ 
+ # Find path to ourselves
+ SRCDIR=${0%/*}
+-- 
+2.2.1
+

Added: csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Do-not-chown-during-package-building.patch
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Do-not-chown-during-package-building.patch	                        (rev 0)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Do-not-chown-during-package-building.patch	2015-02-19 10:29:11 UTC (rev 24664)
@@ -0,0 +1,34 @@
+From bbf70e55a25bb4aa32f51bb22d2c0e8fbd0a39ce Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 18 Feb 2015 15:15:28 +0100
+Subject: [PATCH] Do not chown during package building
+
+---
+ setup.sh | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/setup.sh b/setup.sh
+index 201511b..288be33 100755
+--- a/setup.sh
++++ b/setup.sh
+@@ -778,7 +778,7 @@ do
+ 	   if [ "$enable_livestatus" = yes ]
+ 	   then
+ 	       if [ -z "$YES" ] ; then echo -n "(Compiling MK Livestatus..." ; fi
+-	       compile_livestatus 2>&1 | propeller > $SRCDIR/livestatus.log
++	       compile_livestatus 
+ 	       if [ "${PIPESTATUS[0]}" = 0 ]
+ 	       then
+ 
+@@ -1018,8 +1018,6 @@ EOF
+            # WATO. Also create an empty and Apache-writable auth.serials
+            serials_file=$DESTDIR${htpasswd_file%/*}/auth.serials &&
+            touch "$serials_file" &&
+-           (chown $wwwuser "$serials_file" || true) &&
+-           (chown $wwwuser "$htpasswd_file" || true) &&
+ 	   create_sudo_configuration &&
+            if [ "$enable_mkeventd" = yes ]
+            then
+-- 
+2.2.1
+

Added: csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Honour-SETUPCONF-even-when-DESTDIR-is-set.patch
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Honour-SETUPCONF-even-when-DESTDIR-is-set.patch	                        (rev 0)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Honour-SETUPCONF-even-when-DESTDIR-is-set.patch	2015-02-19 10:29:11 UTC (rev 24664)
@@ -0,0 +1,25 @@
+From e4e4801a34084964a908298990ad0ea0addadf8f Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 18 Feb 2015 17:32:07 +0100
+Subject: [PATCH] Honour SETUPCONF even when DESTDIR is set
+
+---
+ setup.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.sh b/setup.sh
+index 7e576b3..c64a03b 100755
+--- a/setup.sh
++++ b/setup.sh
+@@ -212,7 +212,7 @@ then
+     fi
+ fi
+ 
+-if [ -z "$DESTDIR" -a -e "$SETUPCONF" ] && . $SETUPCONF
++if [ -f "$SETUPCONF" ] && . $SETUPCONF
+ then
+     if [ -z "$YES" ] ; then
+         printf " %-71s \n" "* Read $(grep = $SETUPCONF | wc -l) settings from previous setup from $SETUPCONF."
+-- 
+2.2.1
+

Deleted: csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Solaris-header-fixes.patch
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Solaris-header-fixes.patch	2015-02-19 10:25:33 UTC (rev 24663)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/0001-Solaris-header-fixes.patch	2015-02-19 10:29:11 UTC (rev 24664)
@@ -1,44 +0,0 @@
-From 61afd99627dbf87c98ac3df4cbd336ed01642e92 Mon Sep 17 00:00:00 2001
-From: Dagobert Michelsen <dam at opencsw.org>
-Date: Thu, 6 Dec 2012 16:06:56 +0100
-Subject: [PATCH] Solaris header fixes
-
----
- src/check_icmp.c | 4 ++--
- src/livecheck.c  | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/check_icmp.c b/src/check_icmp.c
-index bb53fef..353cec5 100644
---- a/src/check_icmp.c
-+++ b/src/check_icmp.c
-@@ -65,11 +65,11 @@ typedef unsigned short u_short;
- #include <netdb.h>
- #include <sys/socket.h>
- #include <net/if.h>
--#include "/usr/include/netinet/ip_icmp.h"
--// #include <netinet/ip_icmp.h>
-+// #include "/usr/include/netinet/ip_icmp.h"
- #include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
-+#include <netinet/ip_icmp.h>
- #include <arpa/inet.h>
- #include <signal.h>
- #include <float.h>
-diff --git a/src/livecheck.c b/src/livecheck.c
-index 019613a..dae61cd 100644
---- a/src/livecheck.c
-+++ b/src/livecheck.c
-@@ -26,7 +26,7 @@
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <sys/timeb.h>
--#include <netinet/ip.h>
-+#include <netinet/in.h>
- #include <stdlib.h>
- #include <fcntl.h>
- #include <string.h>
--- 
-1.8.0
-

Added: csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/check_mk_setup.conf
===================================================================
--- csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/check_mk_setup.conf	                        (rev 0)
+++ csw/mgar/pkg/nagios-plugin-check_mk/trunk/files/check_mk_setup.conf	2015-02-19 10:29:11 UTC (rev 24664)
@@ -0,0 +1,33 @@
+# Written by setup of check_mk 1.2.4p5 at Tue Feb 17 14:46:11 CET 2015
+bindir='/opt/csw/bin'
+confdir='/etc/opt/csw/check_mk'
+sharedir='/opt/csw/share/check_mk'
+docdir='/opt/csw/share/doc/check_mk'
+checkmandir='/opt/csw/share/doc/check_mk/checks'
+vardir='/var/opt/csw/check_mk'
+agentslibdir='/opt/csw/lib/check_mk_agent'
+agentsconfdir='/etc/opt/csw/check_mk'
+nagiosuser='nagios'
+wwwuser='www'
+wwwgroup='www'
+nagios_binary='/opt/csw/nagios/bin/nagios'
+nagios_config_file='/etc/opt/csw/nagios/nagios.cfg'
+nagconfdir='/etc/opt/csw/nagios/objects'
+nagios_startscript='/etc/opt/csw/init.d/cswnagios'
+nagpipe='/var/opt/csw/nagios/rw/nagios.cmd'
+check_result_path='/var/opt/csw/nagios/spool/checkresults'
+nagios_status_file='/var/opt/csw/nagios/status.dat'
+check_icmp_path='/opt/csw/libexec/nagios-plugins/check_icmp'
+url_prefix='/'
+apache_config_dir='/opt/csw/apache2/etc'
+htpasswd_file='/etc/opt/csw/nagios/htpasswd.users'
+nagios_auth_name='Nagios Access'
+pnptemplates='/opt/csw/share/check_mk/pnp-templates'
+rrd_path='/var/opt/csw/nagios/rrd'
+rrdcached_socket='/var/opt/csw/nagios/rrdcached.sock'
+enable_livestatus='yes'
+nagios_version='3.5.0'
+libdir='/opt/csw/libexec/check_mk'
+livesock='/var/opt/csw/nagios/rw/live'
+livebackendsdir='/opt/csw/share/check_mk/livestatus'
+enable_mkeventd='no'

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list