[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.6.1-2-22-gc1c3991

Alexander Wirt formorer at debian.org
Fri May 4 19:11:17 UTC 2012


The following commit has been merged in the master branch:
commit 6ff2be58825c78bcf8e7af1ae59fde72eec8b8d3
Author: Alexander Wirt <formorer at debian.org>
Date:   Tue Apr 24 07:23:09 2012 +0200

    Fix postgres escaping with postgres 9.1
    
    Closes: #659675

diff --git a/debian/patches/90_disable_standard_conforming_strings.dpatch b/debian/patches/90_disable_standard_conforming_strings.dpatch
new file mode 100755
index 0000000..7417961
--- /dev/null
+++ b/debian/patches/90_disable_standard_conforming_strings.dpatch
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## disable_standard_conforming_strings.dpatch by Alexander Wirt <formorer at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-icinga~/module/idoutils/src/db.c pkg-icinga/module/idoutils/src/db.c
+--- pkg-icinga~/module/idoutils/src/db.c	2011-11-26 09:14:41.000000000 +0100
++++ pkg-icinga/module/idoutils/src/db.c	2012-04-07 09:41:27.178825882 +0200
+@@ -426,6 +426,9 @@
+ #endif
+ #ifdef USE_LIBDBI
+ 	const char *dbi_error;
++	const char *error_msg;
++	char *buf;
++	buf = NULL;
+ #endif
+ 	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db_db_connect() start\n");
+ 
+@@ -529,6 +532,24 @@
+ 		idi->dbinfo.connected = IDO_TRUE;
+ 		syslog(LOG_USER | LOG_INFO, "Successfully connected to %s database", ido2db_db_settings.dbserver);
+ 	}
++
++
++	switch (idi->dbinfo.server_type) {
++		case IDO2DB_DBSERVER_PGSQL:
++			/* disable standardconforming strings for postgres,
++			 * this should make idoutils compatible with 9.1 until
++			 * there is a proper fix */
++			if (dbi_conn_query(idi->dbinfo.dbi_conn, "set standard_conforming_strings = off;") == NULL) {
++				dbi_conn_error(idi->dbinfo.dbi_conn, &error_msg);
++				syslog(LOG_USER | LOG_INFO, "Error: Could not unset standard_conforming_strings: %s\n", buf, error_msg);
++			} else {
++				syslog(LOG_USER | LOG_INFO, "Disable standard_conforming_strings in pgsql\n");
++			}
++			break;
++		default:
++			break;
++	}
++	free(buf);
+ #endif
+ 
+ #ifdef USE_PGSQL /* pgsql */

-- 
debian packaging of icinga(-core)



More information about the Pkg-nagios-changes mailing list