[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.7.0-4-10-ga741622

Alexander Wirt formorer at debian.org
Thu Jun 21 12:52:34 UTC 2012


The following commit has been merged in the master branch:
commit 29506e2372d82a85a81b32d9733c692d6fb95ddf
Author: Alexander Wirt <formorer at debian.org>
Date:   Thu Jun 21 00:04:35 2012 +0200

    Add a patch for better handling of mysql and pgsql default in ido2b

diff --git a/debian/patches/80_fix_dbd_handling.dpatch b/debian/patches/80_fix_dbd_handling.dpatch
new file mode 100755
index 0000000..ffe7517
--- /dev/null
+++ b/debian/patches/80_fix_dbd_handling.dpatch
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 80_fix_dbd_handling.dpatch by Alexander Wirt <formorer at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: See https://dev.icinga.org/issues/2698
+
+ 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	2012-06-21 00:03:10.000000000 +0200
++++ pkg-icinga/module/idoutils/src/db.c	2012-06-21 00:03:41.470300905 +0200
+@@ -497,8 +497,28 @@
+ 		return IDO_ERROR;
+ 	}
+ 
+-	dbi_conn_set_option(idi->dbinfo.dbi_conn, "host", ido2db_db_settings.host);
+-	dbi_conn_set_option_numeric(idi->dbinfo.dbi_conn, "port", (int)ido2db_db_settings.port);
++       /* decide wether to set host and port, or not ... drivers will use socket otherwise */
++        switch (idi->dbinfo.server_type) {
++        case IDO2DB_DBSERVER_MYSQL:
++               if (ido2db_db_settings.host != NULL)
++                       dbi_conn_set_option(idi->dbinfo.dbi_conn, "host", ido2db_db_settings.host);
++               if (ido2db_db_settings.port != 0)
++                       dbi_conn_set_option_numeric(idi->dbinfo.dbi_conn, "port", (int)ido2db_db_settings.port);
++                break;
++        case IDO2DB_DBSERVER_PGSQL:
++               if (ido2db_db_settings.host != NULL)
++                       dbi_conn_set_option(idi->dbinfo.dbi_conn, "host", ido2db_db_settings.host);
++               if (ido2db_db_settings.port != 0)
++                       dbi_conn_set_option_numeric(idi->dbinfo.dbi_conn, "port", (int)ido2db_db_settings.port);
++                break;
++        default:
++               if (ido2db_db_settings.host != NULL)
++                       dbi_conn_set_option(idi->dbinfo.dbi_conn, "host", ido2db_db_settings.host);
++               if (ido2db_db_settings.port != 0)
++                       dbi_conn_set_option_numeric(idi->dbinfo.dbi_conn, "port", (int)ido2db_db_settings.port);
++                break;
++        }
++
+ 	dbi_conn_set_option(idi->dbinfo.dbi_conn, "username", ido2db_db_settings.username);
+ 	dbi_conn_set_option(idi->dbinfo.dbi_conn, "password", ido2db_db_settings.password);
+ 	dbi_conn_set_option(idi->dbinfo.dbi_conn, "dbname", ido2db_db_settings.dbname);

-- 
debian packaging of icinga(-core)



More information about the Pkg-nagios-changes mailing list