diff --git a/debian/control b/debian/control index 34c85103f..fcfc72f8a 100644 --- a/debian/control +++ b/debian/control @@ -2,26 +2,24 @@ Source: icinga2 Section: admin Priority: extra Maintainer: Debian Nagios Maintainer Group -Uploaders: - Markus Frosch , - Alexander Wirt -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 , + Alexander Wirt +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. - diff --git a/debian/copyright b/debian/copyright index 8c7be85e2..59112695a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -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 + 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 +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. diff --git a/debian/icinga2-bin.install b/debian/icinga2-bin.install index a4c3401a1..da8e7bd40 100644 --- a/debian/icinga2-bin.install +++ b/debian/icinga2-bin.install @@ -1,3 +1,3 @@ -usr/sbin/icinga2 usr/lib/*/icinga2 +usr/sbin/icinga2 usr/share/man/man8/icinga2.8 diff --git a/debian/icinga2-common.install b/debian/icinga2-common.install index 3bd029978..a97e0a835 100644 --- a/debian/icinga2-common.install +++ b/debian/icinga2-common.install @@ -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 index 000000000..a7cb65811 --- /dev/null +++ b/debian/icinga2-ido-mysql.config @@ -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 diff --git a/debian/icinga2-ido-mysql.install b/debian/icinga2-ido-mysql.install index ffb74db20..9fb84f573 100644 --- a/debian/icinga2-ido-mysql.install +++ b/debian/icinga2-ido-mysql.install @@ -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 index 000000000..753dece81 --- /dev/null +++ b/debian/icinga2-ido-mysql.postinst @@ -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 index 000000000..531e4ff31 --- /dev/null +++ b/debian/icinga2-ido-mysql.postrm @@ -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 index 000000000..81b478ae4 --- /dev/null +++ b/debian/icinga2-ido-mysql.prerm @@ -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 index 000000000..672a51587 --- /dev/null +++ b/debian/icinga2-ido-mysql.templates @@ -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 index 000000000..6db17f71e --- /dev/null +++ b/debian/icinga2-ido-pgsql.config @@ -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 diff --git a/debian/icinga2-ido-pgsql.install b/debian/icinga2-ido-pgsql.install index b83b3dc78..570da3c14 100644 --- a/debian/icinga2-ido-pgsql.install +++ b/debian/icinga2-ido-pgsql.install @@ -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 index 000000000..e8fbad4f2 --- /dev/null +++ b/debian/icinga2-ido-pgsql.postinst @@ -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 index 000000000..9084f6f15 --- /dev/null +++ b/debian/icinga2-ido-pgsql.postrm @@ -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 index 000000000..be80f9c9f --- /dev/null +++ b/debian/icinga2-ido-pgsql.prerm @@ -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 index 000000000..fb5c4b9d8 --- /dev/null +++ b/debian/icinga2-ido-pgsql.templates @@ -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 index 000000000..84752b436 --- /dev/null +++ b/debian/ido-mysql.conf-sample @@ -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 index 000000000..244ab102e --- /dev/null +++ b/debian/ido-pgsql.conf-sample @@ -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_" +} diff --git a/debian/rules b/debian/rules index 16516338e..aee72e022 100755 --- a/debian/rules +++ b/debian/rules @@ -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