[Pkg-nagios-devel] nagios/patches 07_fix_default_config.dpatch,NONE,1.1 999_fix_html_pathes.dpatch,NONE,1.1 00list,1.1,1.2 999_cvs_1x_bugfixes.dpatch,1.2,1.3

joerg@haydn.debian.org joerg@haydn.debian.org


Update of /cvsroot/pkg-nagios/nagios/patches
In directory haydn:/tmp/cvs-serv23789/patches

Modified Files:
	00list 999_cvs_1x_bugfixes.dpatch 
Added Files:
	07_fix_default_config.dpatch 999_fix_html_pathes.dpatch 
Log Message:
Added chack_nagios_db for mysql/postgresql users, to check if nagios is alive.
Added part in Readme.Debian about it.
Moved sed magic out of debian/rules in dpatch patches.
Fix a whole lot of bugs with this.
Install check_nagios_db as a doc file, user can read in Readme.Debian howto
activate it.
Modify init-script to use check_nagios_db if user does what we tell him in the
Readme.
Removed useless dbs files.
Postinst: Check if symlink already exist and dont try to add it if it is already there.
Postinst: Args, use the right variable, $apache instead of $webserver.
          Hint: Always use your brain if you use copy and paste. :)

debian/rules:
Remove the FLAGS_text,mysql,pgsql.
Add CONFIGUREMY and CONFIGUREPG, let the mysql and pgsql variant run a make clean
and after it a new configure, with added configure-flags for the database stuff.
That removes that scary "delete some files, patch a configure-generated file, rebuild some others"
hack we had before.
Remove the patch-target that patched the generated file.


--- NEW FILE: 07_fix_default_config.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 07_reasonable_paths.dpatch by Joerg Jaspert <joerg@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix some of the pathes that are set and hardcoded in nagios.
## DP: Also move the changes in nagios.cfg and cgi.cfg, prior made with
## DP: sed in debian/rules to this dpatch.

@DPATCH@
diff -urNad nagios-1.2/common/locations.h.in /home/joerg/tmp/dpep.IWqcHF/nagios-1.2/common/locations.h.in
--- nagios-1.2/common/locations.h.in	2004-11-11 00:22:57.395904252 +0100
+++ /home/joerg/tmp/dpep.IWqcHF/nagios-1.2/common/locations.h.in	2004-11-11 00:23:13.216578491 +0100
@@ -19,14 +19,14 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  ************************************************************************/
 
-#define DEFAULT_TEMP_FILE			"@localstatedir@/tempfile"
+#define DEFAULT_TEMP_FILE			"/var/cache/nagios/tempfile"
 #define DEFAULT_STATUS_FILE			"@localstatedir@/status.log"
 #define DEFAULT_LOG_FILE			"@localstatedir@/nagios.log"
 #define DEFAULT_LOG_ARCHIVE_PATH		"@localstatedir@/archives/"
 #define DEFAULT_COMMENT_FILE			"@localstatedir@/comment.log"
 #define DEFAULT_DOWNTIME_FILE			"@localstatedir@/downtime.log"
-#define DEFAULT_RETENTION_FILE			"@localstatedir@/status.sav"
-#define DEFAULT_COMMAND_FILE			"@localstatedir@/rw/nagios.cmd"
+#define DEFAULT_RETENTION_FILE			"/var/cache/nagios/status.sav"
+#define DEFAULT_COMMAND_FILE			"/var/run/nagios/nagios.cmd"
 #define DEFAULT_PHYSICAL_HTML_PATH		"@datadir@"
 #define DEFAULT_URL_HTML_PATH			"@htmurl@"
 #define DEFAULT_PHYSICAL_CGIBIN_PATH		"@sbindir@"
diff -urNad nagios-1.2/sample-config/cgi.cfg.in /home/joerg/tmp/dpep.IWqcHF/nagios-1.2/sample-config/cgi.cfg.in
--- nagios-1.2/sample-config/cgi.cfg.in	2004-11-11 00:23:12.913623028 +0100
+++ /home/joerg/tmp/dpep.IWqcHF/nagios-1.2/sample-config/cgi.cfg.in	2004-11-11 00:25:05.439078860 +0100
@@ -68,8 +68,12 @@
 # Nagios.  Run the 'ps' command manually to see what the command
 # line entry for the Nagios process looks like.
 
-nagios_check_command=@libexecdir@/check_nagios @localstatedir@/status.log 5 'nagios'
+# Note: If you use the mysql or pgsql nagios build, read
+# /usr/share/doc/nagios-common/README.Debian what todo to let nagios
+# CGI scripts detect nagios state.
 
+nagios_check_command=@libexecdir@/check_nagios @localstatedir@/status.log 5 'nagios'
+#nagios_check_command=/etc/nagios/check_nagios_db
 
 
 # AUTHENTICATION USAGE
@@ -119,7 +123,7 @@
 # not use authorization.  You may use an asterisk (*) to
 # authorize any user who has authenticated to the web server.
 
-#authorized_for_system_information=nagiosadmin,theboss,jdoe
+#authorized_for_system_information=nagiosadmin
 
 
 
@@ -131,7 +135,7 @@
 # an asterisk (*) to authorize any user who has authenticated
 # to the web server.
 
-#authorized_for_configuration_information=nagiosadmin,jdoe
+#authorized_for_configuration_information=nagiosadmin
 
 
 
@@ -157,8 +161,8 @@
 # to authorize any user who has authenticated to the web server.
 
 
-#authorized_for_all_services=nagiosadmin,guest
-#authorized_for_all_hosts=nagiosadmin,guest
+#authorized_for_all_services=nagiosadmin
+#authorized_for_all_hosts=nagiosadmin
 
 
 
diff -urNad nagios-1.2/sample-config/nagios.cfg.in /home/joerg/tmp/dpep.IWqcHF/nagios-1.2/sample-config/nagios.cfg.in
--- nagios-1.2/sample-config/nagios.cfg.in	2004-11-11 00:22:57.396904105 +0100
+++ /home/joerg/tmp/dpep.IWqcHF/nagios-1.2/sample-config/nagios.cfg.in	2004-11-11 00:23:13.218578197 +0100
@@ -36,6 +36,13 @@
 # plugin release rather than the one provided with Nagios.
 cfg_file=@sysconfdir@/checkcommands.cfg
 
+# Enable the following line (and disable the above checkcommands line)
+# to switch to using the automatically generated plugins configuration
+# file.
+#
+#cfg_file=@sysconfdir@/plugins-auto.cfg
+ 
+
 # Misc commands (notification and event handler commands, etc)
 cfg_file=@sysconfdir@/misccommands.cfg
 
@@ -132,7 +139,7 @@
 # directory level instead of on the file, as the file is deleted every
 # time its contents are processed.
 
-command_file=@localstatedir@/rw/nagios.cmd
+command_file=/var/run/nagios/nagios.cmd
 
 
 
@@ -166,7 +173,7 @@
 # is created, used, and deleted throughout the time that Nagios is
 # running.
 
-temp_file=@localstatedir@/nagios.tmp
+temp_file=/var/cache/nagios/nagios.tmp
 
 
 
@@ -380,7 +387,7 @@
 # This file is used only if the preserve_state_information
 # variable is set to 1.
 
-state_retention_file=@localstatedir@/status.sav
+state_retention_file=/var/cache/nagios/status.sav
 
 
 

--- NEW FILE: 999_fix_html_pathes.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 999_fix_html_pathes.dpatch by Joerg Jaspert <joerg@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes the .html files to have the right pathes for the
## DP: setup.

@DPATCH@
diff -urNad nagios-1.2/html/docs/cgiauth.html /home/joerg/tmp/dpep.OQFbWs/nagios-1.2/html/docs/cgiauth.html
--- nagios-1.2/html/docs/cgiauth.html	2003-04-15 02:19:07.000000000 +0200
+++ /home/joerg/tmp/dpep.OQFbWs/nagios-1.2/html/docs/cgiauth.html	2004-11-10 22:42:01.080598033 +0100
@@ -66,7 +66,7 @@
 <p>
 <font color="red"><strong>
 <pre>
-&lt;Directory /usr/local/nagios/sbin&gt;
+&lt;Directory /usr/lib/cgi-bin/nagios&gt;
 AllowOverride AuthConfig
 order allow,deny
[...1063 lines suppressed...]
--- nagios-1.2/html/docs/xpdfile.html	2002-02-26 05:03:42.000000000 +0100
+++ /home/joerg/tmp/dpep.OQFbWs/nagios-1.2/html/docs/xpdfile.html	2004-11-10 22:42:01.089596713 +0100
@@ -57,7 +57,7 @@
 </p>
 
 <p>
-<font color="red">xpdfile_host_perfdata_file=/usr/local/nagios/var/hostperf.log</font>
+<font color="red">xpdfile_host_perfdata_file=/var/log/nagios/hostperf.log</font>
 </p>
 
 <p>
@@ -96,7 +96,7 @@
 </p>
 
 <p>
-<font color="red">xpdfile_service_perfdata_file=/usr/local/nagios/var/serviceperf.log</font>
+<font color="red">xpdfile_service_perfdata_file=/var/log/nagios/serviceperf.log</font>
 </p>
 
 <p>

Index: 00list
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/patches/00list,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- 00list	31 Oct 2004 14:52:45 -0000	1.1
+++ 00list	11 Nov 2004 00:01:50 -0000	1.2
@@ -4,4 +4,6 @@
 04_command_pipe_move.dpatch
 05_fix_script_errors.dpatch
 06_makefile.in_delete_defaults.dpatch
+07_fix_default_config.dpatch
 999_cvs_1x_bugfixes.dpatch
+999_fix_html_pathes.dpatch

Index: 999_cvs_1x_bugfixes.dpatch
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/patches/999_cvs_1x_bugfixes.dpatch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- 999_cvs_1x_bugfixes.dpatch	31 Oct 2004 22:00:09 -0000	1.2
+++ 999_cvs_1x_bugfixes.dpatch	11 Nov 2004 00:01:50 -0000	1.3
@@ -1048,18 +1048,6 @@
  </pre>
  </p>
  
-diff -urNad nagios-1.2/html/docs/embeddedperl.html /home/joerg/tmp/dpep.VuUghd/nagios-1.2/html/docs/embeddedperl.html
---- nagios-1.2/html/docs/embeddedperl.html	2003-05-30 21:25:56.000000000 +0200
-+++ /home/joerg/tmp/dpep.VuUghd/nagios-1.2/html/docs/embeddedperl.html	2004-02-20 05:35:39.000000000 +0100
-@@ -273,7 +273,7 @@
- # service[check_nfs]=NFS;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_rpc
- #
- # initial version: 3 May 2000 by Truongchinh Nguyen and Karl DeBisschop
--# current status: $Revision$
-+# current status: $Revision$
- #
- # Copyright Notice: GPL
- #
 diff -urNad nagios-1.2/html/docs/notifications.html /home/joerg/tmp/dpep.VuUghd/nagios-1.2/html/docs/notifications.html
 --- nagios-1.2/html/docs/notifications.html	2002-08-12 03:46:38.000000000 +0200
 +++ /home/joerg/tmp/dpep.VuUghd/nagios-1.2/html/docs/notifications.html	2004-10-31 19:16:26.700764708 +0100