]> granicus.if.org Git - icinga2/commitdiff
Debian: Merge back release packaging into development
authorAlexander Wirt <formorer@debian.org>
Mon, 16 Jun 2014 14:14:31 +0000 (16:14 +0200)
committerMarkus Frosch <markus@lazyfrosch.de>
Mon, 16 Jun 2014 14:16:09 +0000 (16:16 +0200)
Signed-off-by: Markus Frosch <markus@lazyfrosch.de>
Refs #5816

19 files changed:
debian/control
debian/copyright
debian/icinga2-bin.install
debian/icinga2-common.install
debian/icinga2-ido-mysql.config [new file with mode: 0644]
debian/icinga2-ido-mysql.install
debian/icinga2-ido-mysql.postinst [new file with mode: 0644]
debian/icinga2-ido-mysql.postrm [new file with mode: 0644]
debian/icinga2-ido-mysql.prerm [new file with mode: 0644]
debian/icinga2-ido-mysql.templates [new file with mode: 0644]
debian/icinga2-ido-pgsql.config [new file with mode: 0644]
debian/icinga2-ido-pgsql.install
debian/icinga2-ido-pgsql.postinst [new file with mode: 0644]
debian/icinga2-ido-pgsql.postrm [new file with mode: 0644]
debian/icinga2-ido-pgsql.prerm [new file with mode: 0644]
debian/icinga2-ido-pgsql.templates [new file with mode: 0644]
debian/ido-mysql.conf-sample [new file with mode: 0644]
debian/ido-pgsql.conf-sample [new file with mode: 0644]
debian/rules

index 34c85103f5e844210ac47c75b8a9fa0745cd83e3..fcfc72f8a9c90a79d9b5fb6446158f2394379ab7 100644 (file)
@@ -2,26 +2,24 @@ Source: icinga2
 Section: admin
 Priority: extra
 Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
-Uploaders:
-    Markus Frosch <markus@lazyfrosch.de>,
-    Alexander Wirt <formorer@debian.org>
-Build-Depends:
-    cmake (>= 2.8.7),
-    make (>= 3.81),
-    bison,
-    debhelper (>= 9),
-    flex,
-    g++ (>= 1.96),
-    libboost-dev,
-    libboost-program-options-dev,
-    libboost-system-dev,
-    libboost-test-dev,
-    libboost-thread-dev,
-    libboost-regex-dev,
-    libmysqlclient-dev,
-    libpq-dev,
-    libssl-dev,
-    po-debconf
+Uploaders: Markus Frosch <markus@lazyfrosch.de>,
+           Alexander Wirt <formorer@debian.org>
+Build-Depends: bison,
+               cmake (>= 2.8.7),
+               debhelper (>= 9),
+               flex,
+               g++ (>= 1.96),
+               libboost-dev,
+               libboost-program-options-dev,
+               libboost-regex-dev,
+               libboost-system-dev,
+               libboost-test-dev,
+               libboost-thread-dev,
+               libmysqlclient-dev,
+               libpq-dev,
+               libssl-dev,
+               make (>= 3.81),
+               po-debconf
 Standards-Version: 3.9.5
 Homepage: http://www.icinga.org
 
@@ -30,7 +28,7 @@ Architecture: any
 Depends: icinga2-bin (= ${binary:Version}),
          icinga2-common (= ${source:Version}),
          ${misc:Depends}
-Recommends: icinga2-doc
+Recommends: icinga2-doc, nagios-plugins-basic
 Description: host and network monitoring system
  Icinga 2 is a general-purpose monitoring application and the next generation
  after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small
@@ -78,7 +76,8 @@ Package: icinga2-bin
 Architecture: any
 Pre-Depends: ${misc:Pre-Depends}
 Depends: icinga2-common (= ${source:Version}),
-         ${misc:Depends}, ${shlibs:Depends}
+         ${misc:Depends},
+         ${shlibs:Depends}
 Description: host and network monitoring system - daemon
  Icinga 2 is a general-purpose monitoring application and the next generation
  after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small
@@ -125,8 +124,8 @@ Description: host and network monitoring system - documentation
 
 Package: icinga2-classicui
 Architecture: all
-Depends: icinga2-common (= ${source:Version}),
-         icinga-cgi-bin | icinga-cgi (>= 1.9.0~),
+Depends: icinga-cgi-bin | icinga-cgi (>= 1.9.0~),
+         icinga2-common (= ${source:Version}),
          ${misc:Depends}
 Recommends: apache2 | httpd
 Description: host and network monitoring system - classic ui integration
@@ -152,9 +151,12 @@ Description: host and network monitoring system - classic ui integration
 Package: icinga2-ido-mysql
 Architecture: any
 Pre-Depends: ${misc:Pre-Depends}
-Depends: icinga2-common (= ${source:Version}),
+Conflicts: icinga2-ido-pgsql
+Depends: dbconfig-common,
          icinga2-bin (= ${binary:Version}),
-         ${shlibs:Depends}, ${misc:Depends}
+         icinga2-common (= ${source:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
 Recommends: mysql-client
 Suggests: mysql-server
 Description: host and network monitoring system - IDO for MySQL
@@ -179,10 +181,12 @@ Description: host and network monitoring system - IDO for MySQL
 
 Package: icinga2-ido-pgsql
 Architecture: any
+Conflicts: icinga2-ido-mysql
 Pre-Depends: ${misc:Pre-Depends}
-Depends: icinga2-common (= ${source:Version}),
-         icinga2-bin (= ${binary:Version}),
-         ${shlibs:Depends}, ${misc:Depends}
+Depends: icinga2-bin (= ${binary:Version}),
+         icinga2-common (= ${source:Version}),
+         ${misc:Depends},
+         ${shlibs:Depends}
 Recommends: postgresql-client
 Suggests: postgresql
 Description: host and network monitoring system - IDO for PostgreSQL
@@ -209,8 +213,7 @@ Package: icinga2-dbg
 Architecture: any
 Section: debug
 Priority: extra
-Depends: icinga2-bin (= ${binary:Version}),
-         ${misc:Depends}
+Depends: icinga2-bin (= ${binary:Version}), ${misc:Depends}
 Description: host and network monitoring system - debug symbols
  Icinga 2 is a general-purpose monitoring application and the next generation
  after Icinga 1.x - which was a Nagios fork. It should fit the needs of a small
@@ -230,4 +233,3 @@ Description: host and network monitoring system - debug symbols
   * Native support for Livestatus and Graphite
  .
  This package provides debug symbols for Icinga 2.
-
index 8c7be85e293d2e552c868385620c1371ecbfd053..59112695a00092675f8ec999c93a2d318e10a2e6 100644 (file)
@@ -103,3 +103,141 @@ License: GPL-1+
  .
  On Debian systems, the complete text of the GNU General
  Public License version 2 can be found in "/usr/share/common-licenses/GPL-1".
+
+Files: third-party/cmake/BoostTestTargets.*
+       third-party/cmake/CopyResourcesToBuildTree.cmake
+       third-party/cmake/GetForceIncludeDefinitions.cmake
+       third-party/cmake/GetGitRevisionDescription.cmake.in
+
+Copyright: 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
+           2009-2010 Iowa State University
+License: Boost Software License 1.0
+ Permission is hereby granted, free of charge, to any person or organization
+ obtaining a copy of the software and accompanying documentation covered by
+ this license (the "Software") to use, reproduce, display, distribute,
+ execute, and transmit the Software, and to prepare derivative works of the
+ Software, and to permit third-parties to whom the Software is furnished to
+ do so, all subject to the following:
+ .
+ The copyright notices in the Software and this entire statement, including
+ the above license grant, this restriction and the following disclaimer,
+ must be included in all copies of the Software, in whole or in part, and
+ all derivative works of the Software, unless such copies or derivative
+ works are solely in the form of machine-executable object code generated by
+ a source language processor.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+Files: third-party/cmake/FindBISON.cmake third-party/cmake/FindFLEX.cmake
+Copyright: 2006 Tristan Carel
+           2009 Kitware, Inc.
+           2010 Jon Siwek
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+ .
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+ .
+ * Neither the names of Kitware, Inc., the Insight Software Consortium,
+   nor the names of their contributors may be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+
+Files: third-party/cmake/FindGit.cmake
+Copyright: 2010 Kitware, Inc.
+           2012 Rolf Eike Beer <eike@sf-mail.de>
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+ .
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+ .
+ * Neither the names of Kitware, Inc., the Insight Software Consortium,
+   nor the names of their contributors may be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+
+Files: third-party/cmake/FindPostgreSQL.cmake
+Copyright:  2004-2009 Kitware, Inc.
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+ .
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+ .
+ * Neither the names of Kitware, Inc., the Insight Software Consortium,
+   nor the names of their contributors may be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
index a4c3401a143a880ba8f1a00621c14da958e2fdcb..da8e7bd401445c4f84d651b05cc286fc24fa4e52 100644 (file)
@@ -1,3 +1,3 @@
-usr/sbin/icinga2
 usr/lib/*/icinga2
+usr/sbin/icinga2
 usr/share/man/man8/icinga2.8
index 3bd02997894847d2bfa8485498a1bf2cf3dcd28a..a97e0a8357216e2fa17585b885a5dea6755b8df9 100644 (file)
@@ -1,12 +1,8 @@
+debian/config/apt.conf        etc/icinga2/conf.d/hosts/localhost
 debian/tmp/etc/icinga2
 debian/tmp/etc/logrotate.d
-debian/config/apt.conf        etc/icinga2/conf.d/hosts/localhost
 tools/syntax/*                       usr/share/icinga2-common/syntax
 usr/bin/icinga2-build*
 usr/bin/icinga2-sign-key
 usr/sbin/icinga2-*-feature
 usr/share/icinga2
-usr/share/man/man8/icinga2-*-feature.8
-usr/share/man/man8/icinga2-build*.8
-usr/share/man/man8/icinga2-sign-key.8
-usr/share/man/man8/icinga2-prepare-dirs.8
diff --git a/debian/icinga2-ido-mysql.config b/debian/icinga2-ido-mysql.config
new file mode 100644 (file)
index 0000000..a7cb658
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh 
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
+    . /usr/share/dbconfig-common/dpkg/config.mysql
+    dbc_go icinga2-ido-mysql $@
+fi
+
+# check if the feature is enabled
+if test -L /etc/icinga2/features-enabled/ido-mysql.conf; then
+    db_set icinga2-ido-mysql/enable "true"
+else 
+    db_set icinga2-ido-mysql/enable "false"
+fi
+db_input high icinga2-ido-mysql/enable || true
+db_go || true
index ffb74db20b2f45f77609a6f97e689db43d0fedb3..9fb84f5730f2d40724d6b82eff787f94b94d43c1 100644 (file)
@@ -1,3 +1,3 @@
-debian/tmp/etc/icinga2/features-available/ido-mysql.conf
-usr/lib/*/icinga2/libdb_ido_mysql*
 components/db_ido_mysql/schema/*.sql usr/share/icinga2-ido-mysql/schema
+debian/ido-mysql.conf-sample usr/share/icinga2/tmpl
+usr/lib/*/icinga2/libdb_ido_mysql*
diff --git a/debian/icinga2-ido-mysql.postinst b/debian/icinga2-ido-mysql.postinst
new file mode 100644 (file)
index 0000000..753dece
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/postinst
+
+#dbc_debug='1'
+dbc_generate_include='template:/etc/icinga2/features-available/ido-mysql.conf'
+dbc_generate_include_owner='nagios:nagios'
+dbc_generate_include_args='--ucf -o template_infile=/usr/share/icinga2/tmpl/ido-mysql.conf-sample'
+dbc_go icinga2-ido-mysql $@
+
+
+if [ "$1" = configure ]; then
+
+    # get values from debconf db
+    db_get icinga2-ido-mysql/enable
+
+    if [ "$RET" = "false" ]; then
+        if [ -L /etc/icinga2/features-enabled/ido-mysql.conf ]
+        then
+            echo "disable ido mysql feature"
+            icinga2-disable-feature ido-mysql
+            echo "reloading icinga2"
+            [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
+        fi
+    else
+        if [ ! -L /etc/icinga2/features-enabled/ido-mysql.conf ]
+        then
+            echo "enable ido mysql feature"
+            icinga2-enable-feature ido-mysql
+            echo "reloading icinga2"
+            [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
+
+        fi
+    fi
+fi
+
+#DEBHELPER#
+db_stop
+
+
diff --git a/debian/icinga2-ido-mysql.postrm b/debian/icinga2-ido-mysql.postrm
new file mode 100644 (file)
index 0000000..531e4ff
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if [ -f /usr/share/debconf/confmodule ]; then
+        . /usr/share/debconf/confmodule
+fi
+
+if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
+        . /usr/share/dbconfig-common/dpkg/postrm
+        dbc_go icinga2-ido-mysql $@
+fi
+
+if [ "$1" = "purge" ]; then
+    rm -f /etc/icinga2/features-available/ido-mysql.conf
+    rm -f /etc/icinga2/features-enabled/ido-mysql.conf
+    if which ucf >/dev/null; then
+        ucf --purge /etc/icinga2/features-available/ido-mysql.conf 
+    fi
+    db_purge
+fi
+
diff --git a/debian/icinga2-ido-mysql.prerm b/debian/icinga2-ido-mysql.prerm
new file mode 100644 (file)
index 0000000..81b478a
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/prerm
+dbc_go icinga2-ido-mysql $@
+
+#DEBHELPER#
+
diff --git a/debian/icinga2-ido-mysql.templates b/debian/icinga2-ido-mysql.templates
new file mode 100644 (file)
index 0000000..672a515
--- /dev/null
@@ -0,0 +1,9 @@
+Template: icinga2-ido-mysql/enable
+Type: boolean
+Default: true
+_Description: Enable icinga 2 mysql idoutils?
+ If you acknowledge this question the ido mysql
+ feature gets enabled for icinga 2.
+ .
+ If you want to disable the feature call 
+ icinga2-disable-feature ido-mysql
diff --git a/debian/icinga2-ido-pgsql.config b/debian/icinga2-ido-pgsql.config
new file mode 100644 (file)
index 0000000..6db17f7
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh 
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
+    . /usr/share/dbconfig-common/dpkg/config.pgsql
+    dbc_authmethod_user="password"
+    dbc_go icinga2-ido-pgsql $@
+fi
+
+# check if the feature is enabled
+if test -L /etc/icinga2/features-enabled/ido-pgsql.conf; then
+    db_set icinga2-ido-pgsql/enable "true"
+else 
+    db_set icinga2-ido-pgsql/enable "false"
+fi
+db_input high icinga2-ido-pgsql/enable || true
+db_go || true
index b83b3dc78d0d1ca2ebc8a5bcebadbc7e0b85766d..570da3c140873304a2a88bdedb884e96b79112cf 100644 (file)
@@ -1,3 +1,4 @@
-debian/tmp/etc/icinga2/features-available/ido-pgsql.conf
-usr/lib/*/icinga2/libdb_ido_pgsql*
+
 components/db_ido_pgsql/schema/*.sql usr/share/icinga2-ido-pgsql/schema
+debian/ido-pgsql.conf-sample usr/share/icinga2/tmpl
+usr/lib/*/icinga2/libdb_ido_pgsql*
diff --git a/debian/icinga2-ido-pgsql.postinst b/debian/icinga2-ido-pgsql.postinst
new file mode 100644 (file)
index 0000000..e8fbad4
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/postinst
+
+#dbc_debug='1'
+dbc_generate_include='template:/etc/icinga2/features-available/ido-pgsql.conf'
+dbc_generate_include_owner='nagios:nagios'
+dbc_generate_include_args='--ucf -o template_infile=/usr/share/icinga2/tmpl/ido-pgsql.conf-sample'
+dbc_go icinga2-ido-pgsql $@
+
+
+if [ "$1" = configure ]; then
+
+    # get values from debconf db
+    db_get icinga2-ido-pgsql/enable
+
+    if [ "$RET" = "false" ]; then
+        if [ -L /etc/icinga2/features-enabled/ido-pgsql.conf ]
+        then
+            echo "disable ido pgsql feature"
+            icinga2-disable-feature ido-pgsql
+            echo "reloading icinga2"
+            [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
+        fi
+    else
+        if [ ! -L /etc/icinga2/features-enabled/ido-pgsql.conf ]
+        then
+            echo "enable ido pgsql feature"
+            icinga2-enable-feature ido-pgsql
+            echo "reloading icinga2"
+            [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
+
+        fi
+    fi
+fi
+
+#DEBHELPER#
+db_stop
+
+
diff --git a/debian/icinga2-ido-pgsql.postrm b/debian/icinga2-ido-pgsql.postrm
new file mode 100644 (file)
index 0000000..9084f6f
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if [ -f /usr/share/debconf/confmodule ]; then
+        . /usr/share/debconf/confmodule
+fi
+
+if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
+        . /usr/share/dbconfig-common/dpkg/postrm
+        dbc_go icinga2-ido-pgsql $@
+fi
+
+if [ "$1" = "purge" ]; then
+    rm -f /etc/icinga2/features-available/ido-pgsql.conf
+    rm -f /etc/icinga2/features-enabled/ido-pgsql.conf
+    if which ucf >/dev/null; then
+        ucf --purge /etc/icinga2/features-available/ido-pgsql.conf 
+    fi
+    db_purge
+fi
+
diff --git a/debian/icinga2-ido-pgsql.prerm b/debian/icinga2-ido-pgsql.prerm
new file mode 100644 (file)
index 0000000..be80f9c
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/prerm
+dbc_go icinga2-ido-pgsql $@
+
+#DEBHELPER#
+
diff --git a/debian/icinga2-ido-pgsql.templates b/debian/icinga2-ido-pgsql.templates
new file mode 100644 (file)
index 0000000..fb5c4b9
--- /dev/null
@@ -0,0 +1,9 @@
+Template: icinga2-ido-pgsql/enable
+Type: boolean
+Default: true
+_Description: Enable icinga 2 pgsql idoutils?
+ If you acknowledge this question the ido pgsql
+ feature gets enabled for icinga 2.
+ .
+ If you want to disable the feature call 
+ icinga2-disable-feature ido-pgsql
diff --git a/debian/ido-mysql.conf-sample b/debian/ido-mysql.conf-sample
new file mode 100644 (file)
index 0000000..84752b4
--- /dev/null
@@ -0,0 +1,14 @@
+/**
+ * The db_ido_mysql library implements IDO functionality
+ * for MySQL.
+ */
+
+library "db_ido_mysql"
+
+object IdoMysqlConnection "ido-mysql" {
+  user = "_DBC_DBUSER_",
+  password = "_DBC_DBPASS_",
+  host = "_DBC_DBSERVER_",
+  database = "_DBC_DBNAME_"
+}
+
diff --git a/debian/ido-pgsql.conf-sample b/debian/ido-pgsql.conf-sample
new file mode 100644 (file)
index 0000000..244ab10
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * The db_ido_pgsql library implements IDO functionality
+ * for PostgreSQL.
+ */
+
+library "db_ido_pgsql"
+
+object IdoPgsqlConnection "ido-pgsql" {
+  user = "_DBC_DBUSER_",
+  password = "_DBC_DBPASS_",
+  host = "_DBC_DBSERVER_",
+  database = "_DBC_DBNAME_"
+}
index 16516338e3fbe2395475f81b75e91f053ecbc6b6..aee72e022b7eb3f68c1aa54a90b6e923b0315dea 100755 (executable)
@@ -17,8 +17,6 @@ ifeq ($(shell test -d .git && echo "git"),git) # verify we are in a GIT repo
 endif
        # now clean build dir
        dh_auto_clean
-       rm -f config.log
-       rm -f config.status
 
 override_dh_auto_configure:
        dh_auto_configure -- \
@@ -39,6 +37,16 @@ override_dh_install:
        # remove ido files from other packages
        if [ -d debian/icinga2-common/ ]; then rm debian/icinga2-common/etc/icinga2/features-available/ido-*; fi
        rm debian/icinga2-bin/usr/lib/*/icinga2/libdb_ido_*
+       for dbms in mysql pgsql; do \
+               mkdir -p debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/install ; \
+               mkdir -p debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/upgrade/$$dbms; \
+               cp components/db_ido_$$dbms/schema/$$dbms.sql debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/install/$$dbms ; \
+       done
+       #       for file in components/db_ido_$$dbms/schema/upgrade/* ; do \
+       #               cp $$file debian/icinga2-ido-$$dbms/usr/share/dbconfig-common/data/icinga2-ido-$$dbms/upgrade/$$dbms/`basename $$file .sql`; \
+       #       done; \
+       #done
+
 
 override_dh_installinit:
        dh_installinit --name=icinga2