diff options
Diffstat (limited to '')
-rw-r--r-- | debian/README.source | 16 | ||||
-rw-r--r-- | debian/changelog | 45 | ||||
-rw-r--r-- | debian/control | 42 | ||||
-rw-r--r-- | debian/copyright | 603 | ||||
-rwxr-xr-x | debian/create-components.sh | 59 | ||||
-rw-r--r-- | debian/docs | 2 | ||||
-rw-r--r-- | debian/gbp.conf | 22 | ||||
-rw-r--r-- | debian/icingadb.service | 13 | ||||
-rwxr-xr-x | debian/install | 3 | ||||
-rw-r--r-- | debian/lintian-overrides | 7 | ||||
-rw-r--r-- | debian/man/icingadb-migrate.8.xml | 80 | ||||
-rw-r--r-- | debian/man/icingadb.8.xml | 108 | ||||
-rw-r--r-- | debian/manpages | 1 | ||||
-rw-r--r-- | debian/postinst | 41 | ||||
-rwxr-xr-x | debian/rules | 45 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/upstream/metadata | 5 | ||||
-rw-r--r-- | debian/watch | 7 |
18 files changed, 1100 insertions, 0 deletions
diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..14aed50 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,16 @@ +IcingaDB for Debian +------------------- + +IcingaDB dependencies are not packaged separately, an additional +component is used alongside the upstream tarball. + +For new upstream releases both tarballs need to be updated: + + uscan --verbose + ./debian/create-components.sh ../icingadb_<VERSION>.orig.tar.gz + +The components are configured in gbp.conf to have them imported +automatically when importing the upstream tarball: + + gbp import-orig ../icingadb_<VERSION>.orig.tar.gz + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..3040fc5 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,45 @@ +icingadb (1.1.1-2) unstable; urgency=medium + + [ Bas Couwenberg ] + * Use dh-sequence-golang. + * Update lintian overrides. + + [ Helmut Grohne ] + * Install systemd unit only once. + (closes: #1054186) + + -- Bas Couwenberg <sebastic@debian.org> Wed, 15 Nov 2023 09:53:35 +0100 + +icingadb (1.1.1-1) unstable; urgency=medium + + * New upstream release. + * Add Rules-Requires-Root to control file. + * Bump Standards-Version to 4.6.2, no changes. + * Bump debhelper compat to 13. + * Update lintian overrides. + * Update copyright file. + + -- Bas Couwenberg <sebastic@debian.org> Wed, 09 Aug 2023 15:11:20 +0200 + +icingadb (1.1.0-1) unstable; urgency=medium + + * New upstream release. + * Update create-components.sh for icingadb-migrate dependencies. + * Update lintian overrides. + * Update copyright file. + * Also build icingadb-migrate. + * Add manpage for icingadb-migrate. + + -- Bas Couwenberg <sebastic@debian.org> Wed, 09 Nov 2022 16:55:10 +0100 + +icingadb (1.0.0-1) unstable; urgency=medium + + * Move from experimental to unstable. + + -- Bas Couwenberg <sebastic@debian.org> Sat, 09 Jul 2022 20:53:45 +0200 + +icingadb (1.0.0-1~exp1) experimental; urgency=medium + + * Initial Release. (Closes: #969155). + + -- Bas Couwenberg <sebastic@debian.org> Sun, 03 Jul 2022 17:54:21 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ec56126 --- /dev/null +++ b/debian/control @@ -0,0 +1,42 @@ +Source: icingadb +Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org> +Uploaders: Bas Couwenberg <sebastic@debian.org> +Section: admin +Priority: optional +Build-Depends: debhelper-compat (= 13), + dh-exec, + dh-golang, + dh-sequence-golang, + golang-any, + docbook2x, + docbook-xsl, + docbook-xml, + xsltproc +Standards-Version: 4.6.2 +Vcs-Browser: https://salsa.debian.org/nagios-team/icingadb +Vcs-Git: https://salsa.debian.org/nagios-team/icingadb.git +Homepage: https://icinga.com +Rules-Requires-Root: no +XS-Go-Import-Path: github.com/icinga/icingadb + +Package: icingadb +Architecture: any +Depends: adduser, + ${shlibs:Depends}, + ${misc:Depends} +Suggests: redis-server, + postgresql | default-mysql-server +Built-Using: ${misc:Built-Using} +Description: database connector for Icinga 2 + Icinga DB is a set of components for publishing, synchronizing and + visualizing monitoring data in the Icinga ecosystem, consisting of: + . + * The Icinga DB daemon, which synchronizes monitoring data between a + Redis server and a database. + * Icinga 2 with its Icinga DB feature enabled, responsible for + publishing the data to the Redis server, i.e. configuration and its + runtime updates, check results, state changes, downtimes, + acknowledgements, notifications, and other events such as flapping. + * And Icinga Web with the Icinga DB Web module enabled, which connects + to both Redis and the database to display and work with the most + up-to-date data. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..8e9232f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,603 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Icinga DB +Source: https://github.com/Icinga/icingadb + +Files: * +Copyright: 2017-2020, Icinga GmbH <info@icinga.com> +License: GPL-2+ + +Files: dependencies/pkg/mod/github.com/acarl005/stripansi@*/* +Copyright: 2018, Andrew Carlson +License: Expat + +Files: dependencies/pkg/mod/github.com/cespare/xxhash/* +Copyright: 2016, Caleb Spare +License: Expat + +Files: dependencies/pkg/mod/github.com/creasty/defaults@*/* +Copyright: 2017-present, Yuki Iwanaga +License: Expat + +Files: dependencies/pkg/mod/github.com/dgryski/go-rendezvous@*/* +Copyright: 2017-2020, Damian Gryski <damian@gryski.com> +License: Expat + +Files: dependencies/pkg/mod/github.com/fatih/color@*/* +Copyright: 2013, Fatih Arslan +License: Expat + +Files: dependencies/pkg/mod/github.com/goccy/go-yaml@*/* +Copyright: 2019, Masaaki Goshima +License: Expat + +Files: dependencies/pkg/mod/github.com/goccy/go-yaml@*/stdlib_quote.go +Copyright: 2009, The Go Authors +License: BSD-3-clause + +Files: dependencies/pkg/mod/github.com/google/uuid@*/* +Copyright: 2009, 2014, 2016-2018, 2021, Google Inc. +License: BSD-3-clause + +Files: dependencies/pkg/mod/github.com/go-redis/redis/v8@*/* +Copyright: 2013, The github.com/go-redis/redis Authors +License: BSD-2-clause + +Files: dependencies/pkg/mod/github.com/go-redis/redis/v8@*/internal/hashtag/hashtag.go +Copyright: 2001-2010, Georges Menie (www.menie.org) + 2013, The Go Authors. +License: BSD-2-clause + +Files: dependencies/pkg/mod/github.com/go-redis/redis/v8@*/internal/once.go +Copyright: 2014, The Camlistore Authors +License: Apache-2.0 + +Files: dependencies/pkg/mod/github.com/go-sql-driver/mysql@*/* +Copyright: 2012-2022, The Go-MySQL-Driver Authors. +License: MPL-2.0 + +Files: dependencies/pkg/mod/github.com/jessevdk/go-flags@*/* +Copyright: 2012, Jesse van den Kieboom +License: BSD-3-clause + +Files: dependencies/pkg/mod/github.com/jmoiron/sqlx@*/* +Copyright: 2013, Jason Moiron +License: Expat + +Files: dependencies/pkg/mod/github.com/lib/pq@*/* +Copyright: 2011-2013, 'pq' Contributors + 2011, Blake Mizerany +License: Expat + +Files: dependencies/pkg/mod/github.com/lib/pq@*/scram/scram.go +Copyright: 2014, Gustavo Niemeyer <gustavo@niemeyer.net> +License: BSD-2-clause + +Files: dependencies/pkg/mod/github.com/mattn/go-colorable@*/* +Copyright: 2016, Yasuhiro Matsumoto +License: Expat + +Files: dependencies/pkg/mod/github.com/mattn/go-isatty@*/* +Copyright: Yasuhiro MATSUMOTO <mattn.jp@gmail.com> +License: Expat + +Files: dependencies/pkg/mod/github.com/mattn/go-runewidth@*/* +Copyright: 2016, Yasuhiro Matsumoto +License: Expat + +Files: dependencies/pkg/mod/github.com/mattn/go-sqlite3@*/* +Copyright: 2014-2022, Yasuhiro Matsumoto <mattn.jp@gmail.com> + 2018, G.J.R. Timmer <gjr.timmer@gmail.com> + 2018, segment.com <friends@segment.com> +License: Expat + +Files: dependencies/pkg/mod/github.com/mattn/go-sqlite3@*/_example/mod_vtable/picojson.h +Copyright: 2009-2010, Cybozu Labs, Inc. + 2011, Kazuho Oku +License: BSD-2-clause + +Files: dependencies/pkg/mod/github.com/mattn/go-sqlite3@*/convert.go +Copyright: 2011, The Go Authors +License: BSD-3-clause + +Files: dependencies/pkg/mod/github.com/mattn/go-sqlite3@*/sqlite3-binding.c + dependencies/pkg/mod/github.com/mattn/go-sqlite3@*/sqlite3-binding.h + dependencies/pkg/mod/github.com/mattn/go-sqlite3@*/sqlite3ext.h +Copyright: disclaimed +License: public-domain + The author disclaims copyright to this source code. + In place of a legal notice, here is a blessing: + . + May you do good and not evil. + May you find forgiveness for yourself and forgive others. + May you share freely, never taking more than you give. + +Files: dependencies/pkg/mod/github.com/okzk/sdnotify@*/* +Copyright: 2016, okzk +License: Expat + +Files: dependencies/pkg/mod/github.com/pkg/errors@*/* +Copyright: 2015, Dave Cheney <dave@cheney.net> +License: BSD-2-clause + +Files: dependencies/pkg/mod/github.com/rivo/uniseg@*/* +Copyright: 2019, Oliver Kuederle +License: Expat + +Files: dependencies/pkg/mod/github.com/ssgreg/journald@*/* +Copyright: 2017, Grigory Zubankov +License: Expat + +Files: dependencies/pkg/mod/github.com/vbauerster/mpb/v6@*/* +Copyright: disclaimed +License: public-domain + This is free and unencumbered software released into the public domain. + . + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. + . + In jurisdictions that recognize copyright laws, the author or authors + of this software dedicate any and all copyright interest in the + software to the public domain. We make this dedication for the benefit + of the public at large and to the detriment of our heirs and + successors. We intend this dedication to be an overt act of + relinquishment in perpetuity of all present and future rights to this + software under copyright law. + . + 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 AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + . + For more information, please refer to <http://unlicense.org/> + +Files: dependencies/pkg/mod/github.com/!vivid!cortex/ewma@*/* +Copyright: 2013, VividCortex +License: Expat + +Files: dependencies/pkg/mod/golang.org/x/exp@*/* +Copyright: 2009-2022, The Go Authors +License: BSD-3-clause + +Files: dependencies/pkg/mod/golang.org/x/sync@*/* +Copyright: 2009-2023, The Go Authors +License: BSD-3-clause + +Files: dependencies/pkg/mod/golang.org/x/sys@*/* +Copyright: 2009-2023, The Go Authors +License: BSD-3-clause + +Files: dependencies/pkg/mod/golang.org/x/xerrors@*/* +Copyright: 2011-2019, The Go Authors +License: BSD-3-clause + +Files: dependencies/pkg/mod/go.uber.org/multierr@*/* +Copyright: 2017-2023, Uber Technologies, Inc. +License: Expat + +Files: dependencies/pkg/mod/go.uber.org/zap@*/* +Copyright: 2016-2023, Uber Technologies, Inc. +License: Expat + +Files: debian/* +Copyright: 2018, Icinga GmbH <info@icinga.com> +License: GPL-2+ + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + . + On Debian systems, the complete text of version 2 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-2'. + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache License can be found + in `/usr/share/common-licenses/Apache-2.0'. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + 2. 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. + . + 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. + +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: + . + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + 2. 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. + . + 3. Neither the name of the product nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + 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 AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License: MPL-2.0 + Mozilla Public License Version 2.0 + . + 1. Definitions + . + 1.1. "Contributor" means each individual or legal entity that + creates, contributes to the creation of, or owns Covered Software. + . + 1.2. "Contributor Version" means the combination of the + Contributions of others (if any) used by a Contributor and that + particular Contributor's Contribution. + . + 1.3. "Contribution" means Covered Software of a particular + Contributor. + . + 1.4. "Covered Software" means Source Code Form to which the + initial Contributor has attached the notice in Exhibit A, the + Executable Form of such Source Code Form, and Modifications of such + Source Code Form, in each case including portions thereof. + . + 1.5. "Incompatible With Secondary Licenses" means + . + (a) that the initial Contributor has attached the notice + described in Exhibit B to the Covered Software; or + . + (b) that the Covered Software was made available under the + terms of version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + . + 1.6. "Executable Form" means any form of the work other than + Source Code Form. + . + 1.7. "Larger Work" means a work that combines Covered Software + with other material, in a separate file or files, that is not Covered + Software. + . + 1.8. "License" means this document. + . + 1.9. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently, any and all of the rights conveyed by this License. + . + 1.10. "Modifications" means any of the following: + . + (a) any file in Source Code Form that results from an + addition to, deletion from, or modification of the contents of Covered + Software; or + . + (b) any new file in Source Code Form that contains any + Covered Software. + . + 1.11. "Patent Claims" of a Contributor means any patent claim(s), + including without limitation, method, process, and apparatus claims, in + any patent Licensable by such Contributor that would be infringed, but + for the grant of the License, by the making, using, selling, offering + for sale, having made, import, or transfer of either its Contributions + or its Contributor Version. + . + 1.12. "Secondary License" means either the GNU General Public + License, Version 2.0, the GNU Lesser General Public License, Version + 2.1, the GNU Affero General Public License, Version 3.0, or any later + versions of those licenses. + . + 1.13. "Source Code Form" means the form of the work preferred for + making modifications. + . + 1.14. "You" (or "Your") means an individual or a legal entity + exercising rights under this License. For legal entities, "You" + includes any entity that controls, is controlled by, or is under common + control with You. For purposes of this definition, "control" means (a) + the power, direct or indirect, to cause the direction or management of + such entity, whether by contract or otherwise, or (b) ownership of more + than fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + . + 2. License Grants and Conditions + . + 2.1. Grants Each Contributor hereby grants You a world-wide, + royalty-free, non-exclusive license: + . + (a) under intellectual property rights (other than patent or + trademark) Licensable by such Contributor to use, reproduce, make + available, modify, display, perform, distribute, and otherwise exploit + its Contributions, either on an unmodified basis, with Modifications, + or as part of a Larger Work; and + . + (b) under Patent Claims of such Contributor to make, use, + sell, offer for sale, have made, import, and otherwise transfer either + its Contributions or its Contributor Version. + . + 2.2. Effective Date The licenses granted in Section 2.1 with + respect to any Contribution become effective for each Contribution on + the date the Contributor first distributes such Contribution. + . + 2.3. Limitations on Grant Scope The licenses granted in this + Section 2 are the only rights granted under this License. No additional + rights or licenses will be implied from the distribution or licensing + of Covered Software under this License. Notwithstanding Section 2.1(b) + above, no patent license is granted by a Contributor: + . + (a) for any code that a Contributor has removed from Covered + Software; or + . + (b) for infringements caused by: (i) Your and any other third + party's modifications of Covered Software, or (ii) the combination of + its Contributions with other software (except as part of its + Contributor Version); or + . + (c) under Patent Claims infringed by Covered Software in the + absence of its Contributions. + . + This License does not grant any rights in the trademarks, service + marks, or logos of any Contributor (except as may be necessary to + comply with the notice requirements in Section 3.4). + . + 2.4. Subsequent Licenses No Contributor makes additional grants as + a result of Your choice to distribute the Covered Software under a + subsequent version of this License (see Section 10.2) or under the + terms of a Secondary License (if permitted under the terms of Section + 3.3). + . + 2.5. Representation Each Contributor represents that the + Contributor believes its Contributions are its original creation(s) or + it has sufficient rights to grant the rights to its Contributions + conveyed by this License. + . + 2.6. Fair Use This License is not intended to limit any rights You + have under applicable copyright doctrines of fair use, fair dealing, or + other equivalents. + . + 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of + the licenses granted in Section 2.1. + . + 3. Responsibilities + . + 3.1. Distribution of Source Form All distribution of Covered + Software in Source Code Form, including any Modifications that You + create or to which You contribute, must be under the terms of this + License. You must inform recipients that the Source Code Form of the + Covered Software is governed by the terms of this License, and how they + can obtain a copy of this License. You may not attempt to alter or + restrict the recipients' rights in the Source Code Form. + . + 3.2. Distribution of Executable Form If You distribute Covered + Software in Executable Form then: + . + (a) such Covered Software must also be made available in + Source Code Form, as described in Section 3.1, and You must inform + recipients of the Executable Form how they can obtain a copy of such + Source Code Form by reasonable means in a timely manner, at a charge no + more than the cost of distribution to the recipient; and + . + (b) You may distribute such Executable Form under the terms + of this License, or sublicense it under different terms, provided that + the license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + . + 3.3. Distribution of a Larger Work You may create and distribute a + Larger Work under terms of Your choice, provided that You also comply + with the requirements of this License for the Covered Software. If the + Larger Work is a combination of Covered Software with a work governed + by one or more Secondary Licenses, and the Covered Software is not + Incompatible With Secondary Licenses, this License permits You to + additionally distribute such Covered Software under the terms of such + Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms + of either this License or such Secondary License(s). + . + 3.4. Notices You may not remove or alter the substance of any + license notices (including copyright notices, patent notices, + disclaimers of warranty, or limitations of liability) contained within + the Source Code Form of the Covered Software, except that You may alter + any license notices to the extent required to remedy known factual + inaccuracies. + . + 3.5. Application of Additional Terms You may choose to offer, and + to charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. However, You + may do so only on Your own behalf, and not on behalf of any + Contributor. You must make it absolutely clear that any such warranty, + support, indemnity, or liability obligation is offered by You alone, + and You hereby agree to indemnify every Contributor for any liability + incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + . + 4. Inability to Comply Due to Statute or Regulation If it is impossible + for You to comply with any of the terms of this License with respect to + some or all of the Covered Software due to statute, judicial order, or + regulation then You must: (a) comply with the terms of this License to + the maximum extent possible; and (b) describe the limitations and the + code they affect. Such description must be placed in a text file + included with all distributions of the Covered Software under this + License. Except to the extent prohibited by statute or regulation, such + description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + . + 5. Termination + . + 5.1. The rights granted under this License will terminate + automatically if You fail to comply with any of its terms. However, if + You become compliant, then the rights granted under this License from a + particular Contributor are reinstated (a) provisionally, unless and + until such Contributor explicitly and finally terminates Your grants, + and (b) on an ongoing basis, if such Contributor fails to notify You of + the non-compliance by some reasonable means prior to 60 days after You + have come back into compliance. Moreover, Your grants from a particular + Contributor are reinstated on an ongoing basis if such Contributor + notifies You of the non-compliance by some reasonable means, this is + the first time You have received notice of non-compliance with this + License from such Contributor, and You become compliant prior to 30 + days after Your receipt of the notice. + . + 5.2. If You initiate litigation against any entity by asserting a + patent infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + . + 5.3. In the event of termination under Sections 5.1 or 5.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or Your distributors under this + License prior to termination shall survive termination. + . + 6. Disclaimer of Warranty Covered Software is provided under this + License on an "as is" basis, without warranty of any kind, either + expressed, implied, or statutory, including, without limitation, + warranties that the Covered Software is free of defects, merchantable, + fit for a particular purpose or non-infringing. The entire risk as to + the quality and performance of the Covered Software is with You. Should + any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part + of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + . + 7. Limitation of Liability Under no circumstances and under no legal + theory, whether tort (including negligence), contract, or otherwise, + shall any Contributor, or anyone who distributes Covered Software as + permitted above, be liable to You for any direct, indirect, special, + incidental, or consequential damages of any character including, + without limitation, damages for lost profits, loss of goodwill, work + stoppage, computer failure or malfunction, or any and all other + commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of + liability shall not apply to liability for death or personal injury + resulting from such party's negligence to the extent applicable law + prohibits such limitation. Some jurisdictions do not allow the + exclusion or limitation of incidental or consequential damages, so this + exclusion and limitation may not apply to You. + . + 8. Litigation Any litigation relating to this License may be brought + only in the courts of a jurisdiction where the defendant maintains its + principal place of business and such litigation shall be governed by + laws of that jurisdiction, without reference to its conflict-of-law + provisions. Nothing in this Section shall prevent a party's ability to + bring cross-claims or counter-claims. + . + 9. Miscellaneous This License represents the complete agreement + concerning the subject matter hereof. If any provision of this License + is held to be unenforceable, such provision shall be reformed only to + the extent necessary to make it enforceable. Any law or regulation + which provides that the language of a contract shall be construed + against the drafter shall not be used to construe this License against + a Contributor. + . + 10. Versions of the License + . + 10.1. New Versions Mozilla Foundation is the license steward. + Except as provided in Section 10.3, no one other than the license + steward has the right to modify or publish new versions of this + License. Each version will be given a distinguishing version number. + . + 10.2. Effect of New Versions You may distribute the Covered + Software under the terms of the version of the License under which You + originally received the Covered Software, or under the terms of any + subsequent version published by the license steward. + . + 10.3. Modified Versions If you create software not governed by + this License, and you want to create a new license for such software, + you may create and use a modified version of this License if you rename + the license and remove any references to the name of the license + steward (except to note that such modified license differs from this + License). + . + 10.4. Distributing Source Code Form that is Incompatible With + Secondary Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + . + Exhibit A - Source Code Form License Notice + . + This Source Code Form is subject to the terms of the Mozilla + Public License, v. 2.0. If a copy of the MPL was not distributed with + this file, You can obtain one at http://mozilla.org/MPL/2.0/. + . + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to look + for such a notice. + . + You may add additional accurate notices of copyright ownership. + . + Exhibit B - "Incompatible With Secondary Licenses" Notice + . + This Source Code Form is "Incompatible With Secondary Licenses", + as defined by the Mozilla Public License, v. 2.0. diff --git a/debian/create-components.sh b/debian/create-components.sh new file mode 100755 index 0000000..840dedf --- /dev/null +++ b/debian/create-components.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 <ORIGTARGZ>" + exit 1 +fi + +UPSTREAM_TARBALL="$(realpath -s "$1")" + +if [ ! -e "${UPSTREAM_TARBALL}" ]; then + echo "Error: Upstream tarball not found" + exit 1 +fi + +COMPONENT_NAME="dependencies" +COMPONENT_TARBALL="${UPSTREAM_TARBALL//.orig.tar/.orig-${COMPONENT_NAME}.tar}" + +TEMP_DIR="$(mktemp -d)" + +GOPATH="${TEMP_DIR}/${COMPONENT_NAME}" +export GOPATH + +echo "Unpacking upstream tarball: ${UPSTREAM_TARBALL} into: ${TEMP_DIR}" +tar --strip-components=1 -xaf "${UPSTREAM_TARBALL}" -C "${TEMP_DIR}" + +MAIN_DIR="${TEMP_DIR}/cmd/icingadb" + +echo "Getting main dependencies into: ${GOPATH}" +cd "${MAIN_DIR}" || exit 1 +go get . +cd "${OLDPWD}" || exit 1 + +MIGRATE_DIR="${TEMP_DIR}/cmd/icingadb-migrate" + +echo "Getting migrate dependencies into: ${GOPATH}" +cd "${MIGRATE_DIR}" || exit 1 +go get . +cd "${OLDPWD}" || exit 1 + +#TESTS_DIR="${TEMP_DIR}/tests" +# +#echo "Getting test dependencies into: ${GOPATH}" +#cd "${TESTS_DIR}" || exit 1 +#go get -t . +#cd "${OLDPWD}" || exit 1 + +echo "Fixing permissions for: ${GOPATH}" +chmod -R u+w "${GOPATH}" + +echo "Removing unwanted files from: ${GOPATH}" +find "${GOPATH}" -name "*.exe" -print -delete + +echo "Creating component tarball: ${COMPONENT_TARBALL}" +cd "${TEMP_DIR}" || exit 1 +tar --owner root --group root -caf "${COMPONENT_TARBALL}" "${COMPONENT_NAME}" +cd "${OLDPWD}" || exit 1 + +echo "Removing temporary directory: ${TEMP_DIR}" +rm -rf "${TEMP_DIR}" diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..968f11e --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.md +doc/* diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..e5a4bce --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,22 @@ +[DEFAULT] + +# The default name for the upstream branch is "upstream". +# Change it if the name is different (for instance, "master"). +upstream-branch = upstream + +# The default name for the Debian branch is "master". +# Change it if the name is different (for instance, "debian/unstable"). +debian-branch = master + +# git-import-orig uses the following names for the upstream tags. +# Change the value if you are not using git-import-orig +upstream-tag = upstream/%(version)s + +# Always use pristine-tar. +pristine-tar = True + +[buildpackage] +pbuilder-options = --source-only-changes + +[import-orig] +component = dependencies diff --git a/debian/icingadb.service b/debian/icingadb.service new file mode 100644 index 0000000..0f4202c --- /dev/null +++ b/debian/icingadb.service @@ -0,0 +1,13 @@ +[Unit] +Description=Icinga DB +Documentation=https://icinga.com/docs/icingadb/latest/ +After=network-online.target redis.service mariadb.service postgresql.service + +[Service] +Type=notify +ExecStart=/usr/sbin/icingadb --config /etc/icingadb/config.yml +User=icingadb +Group=icingadb + +[Install] +WantedBy=multi-user.target diff --git a/debian/install b/debian/install new file mode 100755 index 0000000..0af8cca --- /dev/null +++ b/debian/install @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec +config.example.yml => etc/icingadb/config.yml +schema usr/share/icingadb diff --git a/debian/lintian-overrides b/debian/lintian-overrides new file mode 100644 index 0000000..2abd2b7 --- /dev/null +++ b/debian/lintian-overrides @@ -0,0 +1,7 @@ +# Only systemd is supported +package-supports-alternative-init-but-no-init.d-script [lib/systemd/system/icingadb.service] + +# False positive, string not included in source +spelling-error-in-binary octects octets [usr/sbin/icingadb*] +spelling-error-in-binary wtH with [usr/sbin/icingadb*] + diff --git a/debian/man/icingadb-migrate.8.xml b/debian/man/icingadb-migrate.8.xml new file mode 100644 index 0000000..f688b33 --- /dev/null +++ b/debian/man/icingadb-migrate.8.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<refentry id='icingadb-migrate'> + + <refmeta> + <refentrytitle>icingadb-migrate</refentrytitle> + <manvolnum>8</manvolnum> + </refmeta> + + <refnamediv> + <refname>icingadb-migrate</refname> + <refpurpose>IDO to Icinga DB migrator</refpurpose> + </refnamediv> + + <refsynopsisdiv id='synopsis'> + <cmdsynopsis> + <command>icingadb-migrate</command> + <arg choice='opt'><option>-h</option></arg> + <arg choice='opt'><option>-c</option> <replaceable>PATH</replaceable></arg> + <arg choice='opt'><option>-t</option> <replaceable>PATH</replaceable></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <refsect1 id='description'> + <title>DESCRIPTION</title> + <para> + <command>icingadb-migrate</command> migrates IDO history to Icinga DB. + </para> + </refsect1> + + <refsect1 id='options'> + <title>OPTIONS</title> + + <para> + Application Options: + </para> + <variablelist> + + <varlistentry> + <term><option>-c</option>=<replaceable>PATH</replaceable></term> + <term><option>--config</option>=<replaceable>PATH</replaceable></term> + <listitem> + <para> + Path to config file + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-t</option>=<replaceable>PATH</replaceable></term> + <term><option>--cache</option>=<replaceable>PATH</replaceable></term> + <listitem> + <para> + Path for caching + </para> + </listitem> + </varlistentry> + + </variablelist> + + <para> + Help Options: + </para> + <variablelist> + + <varlistentry> + <term><option>-h</option></term> + <term><option>--help</option></term> + <listitem> + <para> + Show usage information and exit + </para> + </listitem> + </varlistentry> + + </variablelist> + + </refsect1> + +</refentry> diff --git a/debian/man/icingadb.8.xml b/debian/man/icingadb.8.xml new file mode 100644 index 0000000..8366dc9 --- /dev/null +++ b/debian/man/icingadb.8.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<refentry id='icingadb'> + + <refmeta> + <refentrytitle>icingadb</refentrytitle> + <manvolnum>8</manvolnum> + </refmeta> + + <refnamediv> + <refname>icingadb</refname> + <refpurpose>Database connector for Icinga 2</refpurpose> + </refnamediv> + + <refsynopsisdiv id='synopsis'> + <cmdsynopsis> + <command>icingadb</command> + <arg choice='opt'><option>-h</option></arg> + <arg choice='opt'><option>--version</option></arg> + <arg choice='opt'><option>-c</option> <replaceable>PATH</replaceable></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <refsect1 id='description'> + <title>DESCRIPTION</title> + <para> + <command>icingadb</command> is a database connector for Icinga 2. + </para> + <para> + It is part of a set of components for publishing, synchronizing and + visualizing monitoring data in the Icinga ecosystem, consisting of: + <itemizedlist> + <listitem> + <para> + The Icinga DB daemon, which synchronizes monitoring data + between a Redis server and a database. + </para> + </listitem> + <listitem> + <para> + Icinga 2 with its Icinga DB feature enabled, responsible for + publishing the data to the Redis server, i.e. configuration + and its runtime updates, check results, state changes, + downtimes, acknowledgements, notifications, and other events + such as flapping. + </para> + </listitem> + <listitem> + <para> + And Icinga Web with the Icinga DB Web module enabled, which + connects to both Redis and the database to display and work + with the most up-to-date data. + </para> + </listitem> + </itemizedlist> + </para> + </refsect1> + + <refsect1 id='options'> + <title>OPTIONS</title> + + <para> + Application Options: + </para> + <variablelist> + + <varlistentry> + <term><option>--version</option></term> + <listitem> + <para> + Print version and exit + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-c</option>=<replaceable>PATH</replaceable></term> + <term><option>--config</option>=<replaceable>PATH</replaceable></term> + <listitem> + <para> + Path to config file + (default: <filename>/etc/icingadb/config.yml</filename>) + </para> + </listitem> + </varlistentry> + + </variablelist> + + <para> + Help Options: + </para> + <variablelist> + + <varlistentry> + <term><option>-h</option></term> + <term><option>--help</option></term> + <listitem> + <para> + Show usage information and exit + </para> + </listitem> + </varlistentry> + + </variablelist> + + </refsect1> + +</refentry> diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..4748f4f --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +debian/man/*.8 diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..6ab3d87 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,41 @@ +#!/bin/sh +set -e + +setperm() { + user="$1" + group="$2" + mode="$3" + file="$4" + shift 4 + # only do something when no setting exists + if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then + chown "$user":"$group" "$file" + chmod "$mode" "$file" + fi +} + +case "$1" in + configure) + + if ! getent passwd icingadb > /dev/null ; then + echo 'Adding system-user for icingadb' 1>&2 + adduser --system --group --home /etc/icingadb \ + --disabled-login --force-badname icingadb > /dev/null + fi + + setperm icingadb icingadb 0750 /etc/icingadb + setperm icingadb icingadb 0640 /etc/icingadb/config.yml + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c5ec56d --- /dev/null +++ b/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 + +export DH_GOLANG_BUILDPKG=github.com/icinga/icingadb/cmd/icingadb \ + github.com/icinga/icingadb/cmd/icingadb-migrate + +export GO111MODULE=on + +include /usr/share/dpkg/pkg-info.mk + +BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") + +MANPAGES := $(wildcard debian/man/*.*.xml) + +%: + dh $@ --builddirectory=_build --buildsystem=golang + +override_dh_clean: + dh_clean debian/man/*.8 + +override_dh_auto_configure: + dh_auto_configure + + (mkdir -p _build/pkg && cd _build/pkg && ln -s ../../dependencies/pkg/* .) + +override_dh_auto_build: + # Create man page from DocBook XML + for x in $(MANPAGES) ; do \ + docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \ + mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \ + done + + dh_auto_build + +override_dh_auto_install: + dh_auto_install -- --no-source + + mv debian/icingadb/usr/bin debian/icingadb/usr/sbin + +override_dh_installsystemd: + dh_installsystemd --no-enable --no-start + +override_dh_compress: + dh_compress -X.md diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..58eb995 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/Icinga/icingadb/issues +Bug-Submit: https://github.com/Icinga/icingadb/issues/new +Repository: https://github.com/Icinga/icingadb.git +Repository-Browse: https://github.com/Icinga/icingadb diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..46448fe --- /dev/null +++ b/debian/watch @@ -0,0 +1,7 @@ +version=4 +opts=\ +dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$//,\ +uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/;s/RC/rc/,\ +filenamemangle=s/(?:.*?)?(?:rel|v|icingadb)?[\-\_]?(\d\S+)\.(tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))/icingadb-$1.$2/ \ +https://github.com/Icinga/icingadb/tags \ +(?:.*?/archive/(?:.*?/)?)?(?:rel|v|icingadb)?[\-\_]?(\d\S+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) |