#! /bin/sh /usr/share/dpatch/dpatch-run
## debian.dpatch by Hendrik Frenzel <hfrenzel@scunc.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Commented out unnecessary commands
@DPATCH@
diff -urNad nagiosgrapher-1.7.1~/Makefile.in nagiosgrapher-1.7.1/Makefile.in
--- nagiosgrapher-1.7.1~/Makefile.in 2008-12-18 10:27:55.000000000 +0100
+++ nagiosgrapher-1.7.1/Makefile.in 2010-02-18 17:05:47.000000000 +0100
@@ -68,7 +68,7 @@
default:
-install: dirs config-install cgi-install bin-compile bin-install perl-install logrotate-config init-script image-install logfile all-install-messages
+install: dirs config-install cgi-install bin-compile bin-install perl-install init-script image-install logfile all-install-messages
update: dirs cgi-install bin-compile bin-install perl-install init-script image-install update-messages file-interface-message
@@ -182,11 +182,11 @@
@exit 1
dirs:
- mkdir -p $(DESTDIR)/$(NG_SRVEXT_DIR)
- chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_SRVEXT_DIR)
+ #mkdir -p $(DESTDIR)/$(NG_SRVEXT_DIR)
+ #chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_SRVEXT_DIR)
mkdir -p $(DESTDIR)/$(NG_RRD)
- chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_RRD)
- mkdir -p $(DESTDIR)/$(NG_INIT_SCRIPT_DIR)
+ #chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_RRD)
+ #mkdir -p $(DESTDIR)/$(NG_INIT_SCRIPT_DIR)
mkdir -p `dirname $(DESTDIR)/$(NG_LOGFILE)`
mkdir -p $(DESTDIR)/$(NG_DAEMON)
mkdir -p $(DESTDIR)/$(NG_RRD)
@@ -195,8 +195,8 @@
mkdir -p $(DESTDIR)/$(NG_PERFFILEPATH)
logfile:
- touch $(DESTDIR)/$(NG_LOGFILE)
- chown $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_LOGFILE)
+ #touch $(DESTDIR)/$(NG_LOGFILE)
+ #chown $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_LOGFILE)
config-install:
mkdir -p $(DESTDIR)/$(NG_CONFIG)
@@ -209,15 +209,15 @@
cp -r cfg/templates/extra/*.ncfg* $(DESTDIR)/$(NG_CONFIG_SUB)/templates/extra
cp -r cfg/templates/standard/*.ncfg* $(DESTDIR)/$(NG_CONFIG_SUB)/templates/standard
- chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_CONFIG)/*.ncfg*
- chgrp -R $(NAGIOS_PROC_GROUP) $(DESTDIR)/$(NG_CONFIG)/*.ncfg*
+ #chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NG_CONFIG)/*.ncfg*
+ #chgrp -R $(NAGIOS_PROC_GROUP) $(DESTDIR)/$(NG_CONFIG)/*.ncfg*
cgi-install:
mkdir -p $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
cp sbin/*.cgi $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
- chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
- chgrp -R $(APACHE_GROUP) $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
+ #chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
+ #chgrp -R $(APACHE_GROUP) $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
chmod -R 0755 $(DESTDIR)/$(NAGIOS_FOLDER_CGI)
bin-install:
@@ -228,8 +228,8 @@
contrib/udpecho/udpecho \
$(DESTDIR)/$(NAGIOS_CONTRIBUTION)
- chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NAGIOS_CONTRIBUTION)
- chgrp -R $(NAGIOS_PROC_GROUP) $(DESTDIR)/$(NAGIOS_CONTRIBUTION)
+ #chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(NAGIOS_CONTRIBUTION)
+ #chgrp -R $(NAGIOS_PROC_GROUP) $(DESTDIR)/$(NAGIOS_CONTRIBUTION)
chmod -R 0755 $(DESTDIR)/$(NAGIOS_CONTRIBUTION)
bin-compile:
@@ -246,18 +246,12 @@
cp lib/NagiosGrapher/*.pm $(DESTDIR)/$(PERL_INC)/NagiosGrapher
cp lib/NagiosGrapher/Hooks/*.pm $(DESTDIR)/$(PERL_INC)/NagiosGrapher/Hooks
- chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(PERL_INC)
- chgrp -R $(NAGIOS_PROC_GROUP) $(DESTDIR)/$(PERL_INC)
-
-logrotate-config:
- cp cfg/logrotate/nagios_grapher $(DESTDIR)/${NG_LOGROTATE_CONF_DIR}/
- chown root $(DESTDIR)/$(NG_LOGROTATE_CONF_DIR)/nagios_grapher
- chgrp root $(DESTDIR)/$(NG_LOGROTATE_CONF_DIR)/nagios_grapher
- chmod 0644 $(DESTDIR)/$(NG_LOGROTATE_CONF_DIR)/nagios_grapher
+ #chown -R $(NAGIOS_PROC_USER) $(DESTDIR)/$(PERL_INC)
+ #chgrp -R $(NAGIOS_PROC_GROUP) $(DESTDIR)/$(PERL_INC)
init-script:
- cp nagios_grapher $(DESTDIR)/$(NG_INIT_SCRIPT_DIR)
- chmod 0755 $(DESTDIR)/$(NG_INIT_SCRIPT_DIR)/nagios_grapher
+ #cp nagios_grapher $(DESTDIR)/$(NG_INIT_SCRIPT_DIR)
+ #chmod 0755 $(DESTDIR)/$(NG_INIT_SCRIPT_DIR)/nagios_grapher
image-install:
mkdir -p $(DESTDIR)/$(NAGIOS_IMAGES)
diff -urNad nagiosgrapher-1.7.1~/cfg/ngraph.ncfg.in nagiosgrapher-1.7.1/cfg/ngraph.ncfg.in
--- nagiosgrapher-1.7.1~/cfg/ngraph.ncfg.in 2008-12-18 10:27:55.000000000 +0100
+++ nagiosgrapher-1.7.1/cfg/ngraph.ncfg.in 2010-02-18 17:04:58.000000000 +0100
@@ -9,7 +9,7 @@
port 5667
buffer 1024
interface @NG_INTERFACE@
- # pipe @NG_INTERFACE_PIPE@
+ pipe @NG_INTERFACE_PIPE@
perffile_path @NG_PERFFILEPATH@
# please use subfolder
@@ -35,9 +35,9 @@
serviceextinfo @NG_SRVEXT_FILE@
serviceext_path @NG_SRVEXT_DIR@
- url /nagios/cgi-bin/graphs.cgi
+ url /cgi-bin/nagios3/graphs.cgi
# notes_url /wiki/index.php/$HOSTNAME$#$SERVICEDESC$
- notes_url
+ notes_url ""
nagios_config @NAGIOS_CONFIG@
cgi_config @NAGIOS_CONFIG_CGI@
@@ -45,7 +45,7 @@
icon_image_tag ' dot.png' alt="###ALT###" border="0"></a><A TARGET="_blank" HREF="graphs.cgi?###URL###"><img src="###IMAGESRC###" '
icon_image_src @NG_LOGOS@/graph.png
icon_image_script @NG_CGI@/rrd2-system.cgi?###URL###&start=-5400&title=Actual&width=20&height=20&type=AVERAGE&only-graph=true
- icon_image_static true
+ icon_image_static false
log_file @NG_LOGFILE@
log_level @NG_LOGLEVEL@
diff -urNad nagiosgrapher-1.7.1~/config.layout nagiosgrapher-1.7.1/config.layout
--- nagiosgrapher-1.7.1~/config.layout 2008-12-18 10:27:55.000000000 +0100
+++ nagiosgrapher-1.7.1/config.layout 2010-02-18 17:04:58.000000000 +0100
@@ -58,25 +58,28 @@
# layout for debian package install as provided by the debian patches of Hendrik Frenzel
<Layout debian-patch>
- prefix: /usr/share/nagiosgrapher
- nagios_config: /etc/nagios2/nagios.cfg
- nagios_config_cgi: /etc/nagios2/cgi.cfg
- nagios_images: /usr/share/nagiosgrapher/htdocs/images
- nagios_images_logos: /usr/share/nagiosgrapher/htdocs/images/logos
+ prefix: /usr
+ nagios_config: /etc/nagios3/nagios.cfg
+ nagios_config_cgi: /etc/nagios3/cgi.cfg
+ nagios_images: ${prefix}/share/nagiosgrapher/htdocs/images
+ nagios_images_logos: ${prefix}/share/nagiosgrapher/htdocs/images/logos
nagios_folder_cgi: /usr/lib/cgi-bin/nagiosgrapher
- perl_inc: /usr/share/perl5
nagios_contribution: /usr/lib/nagiosgrapher
+ perl_inc: /usr/share/perl5
ng_config: /etc/nagiosgrapher
ng_config_sub: ${ng_config}/ngraph.d
ng_daemon: /var/run/nagiosgrapher
- ng_srvext_file: /etc/nagios2/serviceextinfo.cfg
- ng_srvext_dir: /etc/nagios2/serviceext
+ ng_srvext_file: /etc/nagios3/serviceextinfo.cfg
+ ng_srvext_dir: /etc/nagiosgrapher/nagios3/serviceext
ng_interface_pipe: /var/lib/nagiosgrapher/ngraph.pipe
ng_perffile_path: /var/lib/nagiosgrapher/
ng_logfile: /var/log/nagiosgrapher/ngraph.log
ng_rrd: /var/lib/nagiosgrapher/rrd
+ ng_rrd_font: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf
ng_tmp_path: /tmp/nagiosgrapher
- ng_pid_file: ${ng_daemon}/nagios_grapher.pid
+ ng_cgi: /nagios3/cgi-bin
+ ng_logos: /nagios3/images/logos
+ ng_pid_file: ${ng_daemon}/nagiosgrapher.pid
init_script_dir: /etc/init.d
logrotate_conf_dir: /etc/logrotate.d
</Layout>
diff -urNad nagiosgrapher-1.7.1~/configure.ac nagiosgrapher-1.7.1/configure.ac
--- nagiosgrapher-1.7.1~/configure.ac 2008-12-18 10:27:55.000000000 +0100
+++ nagiosgrapher-1.7.1/configure.ac 2010-02-18 17:04:58.000000000 +0100
@@ -18,7 +18,7 @@
AC_MSG_ERROR([cannot use $PACKAGE_NAME without perl])
fi
-AC_PREFIX_DEFAULT([/usr/local/nagios])
+AC_PREFIX_DEFAULT([/usr/share/nagiosgrapher])
AC_DEFUN([NG_ENABLE_LAYOUT], [
@@ -357,9 +357,9 @@
dnl NG_INTERFACE
AC_ARG_WITH(ng-interface,
- AC_HELP_STRING([--with-ng-interface=INTERFACE], [the interface to use (default: file)]),
+ AC_HELP_STRING([--with-ng-interface=INTERFACE], [the interface to use (default: pipe)]),
NG_INTERFACE=$withval,
- NG_INTERFACE=file
+ NG_INTERFACE=pipe
# NG_INTERFACE=network
)
AC_SUBST(NG_INTERFACE)
@@ -373,20 +373,20 @@
AC_SUBST(NG_SRVEXT)
#dnl NG_SRVEXT_DIR
-#AC_ARG_WITH(ng-srvext-dir,
-# AC_HELP_STRING([--with-ng-srvext-dir=DIR], [the serviceext dir for multiple]),
-# NG_SRVEXT_DIR=$withval,
-# NG_SRVEXT_DIR=/usr/local/nagios/etc/serviceext
-#)
-#AC_SUBST(NG_SRVEXT_DIR)
+AC_ARG_WITH(ng-srvext-dir,
+ AC_HELP_STRING([--with-ng-srvext-dir=DIR], [the serviceext dir for multiple]),
+ NG_SRVEXT_DIR=$withval,
+ NG_SRVEXT_DIR=/etc/nagiosgrapher/nagios3/serviceext
+)
+AC_SUBST(NG_SRVEXT_DIR)
#dnl NG_SRVEXT_FILE
-#AC_ARG_WITH(ng-srvext-file,
-# AC_HELP_STRING([--with-ng-srvext-file=FILE], [the serviceext file for single]),
-# NG_SRVEXT_FILE=$withval,
-# NG_SRVEXT_FILE=/usr/local/nagios/etc/serviceext.cfg
-#)
-#AC_SUBST(NG_SRVEXT_FILE)
+AC_ARG_WITH(ng-srvext-file,
+ AC_HELP_STRING([--with-ng-srvext-file=FILE], [the serviceext file for single]),
+ NG_SRVEXT_FILE=$withval,
+ NG_SRVEXT_FILE=/usr/nagiosgrapher/nagios3/serviceext.cfg
+)
+AC_SUBST(NG_SRVEXT_FILE)
#dnl NG_LOGFILE
#AC_ARG_WITH(ng-logfile,
@@ -400,7 +400,7 @@
AC_ARG_WITH(ng-loglevel,
AC_HELP_STRING([--with-ng-loglevel=INT], [the loglevel]),
NG_LOGLEVEL=$withval,
- NG_LOGLEVEL=1023
+ NG_LOGLEVEL=63
)
AC_SUBST(NG_LOGLEVEL)
diff -urNad nagiosgrapher-1.7.1~/lib/NagiosGrapher.pm.in nagiosgrapher-1.7.1/lib/NagiosGrapher.pm.in
--- nagiosgrapher-1.7.1~/lib/NagiosGrapher.pm.in 2008-12-18 10:27:55.000000000 +0100
+++ nagiosgrapher-1.7.1/lib/NagiosGrapher.pm.in 2010-02-18 17:04:58.000000000 +0100
@@ -49,7 +49,7 @@
our $ngraphcfg = '@NG_CONFIG@/ngraph.ncfg';
our $xmlfile = 'index.xml';
our $uniqueInstance = undef;
-our $object_cache = '@NG_DAEMON@/NagiosGrapher.obj';
+our $object_cache = '/var/cache/nagiosgrapher/NagiosGrapher.obj';
$LOG_CONFIG = 128;
$LOG_HOOK = 256;