Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/icinga2/
Date: Tue, 26 Feb 2019 23:33:07
Message-Id: 1551223957.a3213b773f228b3f67da986f4b58e934b7083f86.prometheanfire@gentoo
1 commit: a3213b773f228b3f67da986f4b58e934b7083f86
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 26 23:32:37 2019 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 26 23:32:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3213b77
7
8 net-analyzer/icinga2: 2.10.3 bump
9
10 Package-Manager: Portage-2.3.51, Repoman-2.3.12
11 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
12
13 net-analyzer/icinga2/Manifest | 1 +
14 net-analyzer/icinga2/icinga2-2.10.3.ebuild | 172 +++++++++++++++++++++++++++++
15 2 files changed, 173 insertions(+)
16
17 diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest
18 index bc5a3c1deb2..c43274b9ab1 100644
19 --- a/net-analyzer/icinga2/Manifest
20 +++ b/net-analyzer/icinga2/Manifest
21 @@ -1,3 +1,4 @@
22 DIST icinga2-2.10.2.tar.gz 4408535 BLAKE2B f650826feee13695c42d7e6ced45e3009ac607d6af0bcb16c3f93f8099017a74de40e33deefaffb230a519f9dabf410c03745309d203ede71a4d7076ba8c9121 SHA512 2fb30673fbeef395a43eb7947c0c0217d7c0fc9c149bb244d16dae461dd5728a2540e88bcb351bac2ec5d58d6896f8a4789ced5647cdac8cecf0623fff12054b
23 +DIST icinga2-2.10.3.tar.gz 4421984 BLAKE2B 130279f3fbe90e9cc311d98ca8ff879c3dca34b61e8e8b3f7db30b7cb116361decf2e8fcc44c34bab863ef654a345f7cafc14c0179ec83dc3a2fe84ef103575e SHA512 c3b4b6e66889e30ed5c73b3adf55bec9c547f4f3a81a5511b981d8e6d4b1e370bc71263b3249b625769cea1d13de5aa62f3c039ac5315013c13bc02009e70967
24 DIST icinga2-2.8.4.tar.gz 2510333 BLAKE2B f551a5eadc93d8455612af40e34a0922bc75f41b8064f9989c8f0c28dc2c3fb18963cf9b3272efa29f03973e7cf5824762bebff1bfa1a23c4ba39c93fc29c8e5 SHA512 b2cb5989962ac65da927cbdbac1b3345c913321d507b5113f32dd90bf969b2513478e68d52b9cd4cf255057d74428f9e42067288b7ddc59ad060ca7b84f4f114
25 DIST icinga2-2.9.1.tar.gz 2193190 BLAKE2B 29be491c4b43e218ef8aaa2128822040ccb0989e91d83f033cf7873216e4307cdbc8ee9052d79fd22220c396efeb68759acc97938e3ee596e0820e3f6c8f73bc SHA512 1d69a24f85249386e30ff1625cf522ba58e5f2ab641dbe950bf1764324a6c7516d1532942954e842002566823b0f30383747d5ec8b7bd36705aa5f0ccfa29533
26
27 diff --git a/net-analyzer/icinga2/icinga2-2.10.3.ebuild b/net-analyzer/icinga2/icinga2-2.10.3.ebuild
28 new file mode 100644
29 index 00000000000..8a9695a5e27
30 --- /dev/null
31 +++ b/net-analyzer/icinga2/icinga2-2.10.3.ebuild
32 @@ -0,0 +1,172 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +if [[ ${PV} != 9999 ]]; then
38 + inherit cmake-utils depend.apache eutils systemd toolchain-funcs user wxwidgets
39 + SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
40 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
41 +else
42 + inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs user wxwidgets
43 + EGIT_REPO_URI="https://github.com/Icinga/icinga2.git"
44 + EGIT_BRANCH="master"
45 + KEYWORDS=""
46 +fi
47 +
48 +DESCRIPTION="Distributed, general purpose, network monitoring engine"
49 +HOMEPAGE="http://icinga.org/icinga2"
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +IUSE="classicui console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax"
54 +WX_GTK_VER="3.0"
55 +
56 +CDEPEND="
57 + !libressl? ( dev-libs/openssl:0= )
58 + libressl? ( dev-libs/libressl:0= )
59 + >=dev-libs/boost-1.58-r1
60 + console? ( dev-libs/libedit )
61 + mariadb? ( dev-db/mariadb-connector-c:= )
62 + mysql? ( dev-db/mysql-connector-c:= )
63 + postgres? ( dev-db/postgresql:= )
64 + dev-libs/yajl"
65 +
66 +DEPEND="
67 + ${CDEPEND}
68 + sys-devel/bison
69 + >=sys-devel/flex-2.5.35"
70 +
71 +RDEPEND="
72 + ${CDEPEND}
73 + plugins? ( || (
74 + net-analyzer/monitoring-plugins
75 + net-analyzer/nagios-plugins
76 + ) )
77 + mail? ( virtual/mailx )
78 + classicui? ( net-analyzer/icinga[web] )"
79 +
80 +REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )"
81 +
82 +want_apache2
83 +
84 +pkg_setup() {
85 + depend.apache_pkg_setup
86 + enewgroup icinga
87 + enewgroup icingacmd
88 + enewgroup nagios # for plugins
89 + enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
90 +}
91 +
92 +src_configure() {
93 + sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die
94 + local mycmakeargs=(
95 + -DICINGA2_UNITY_BUILD=FALSE
96 + -DCMAKE_VERBOSE_MAKEFILE=ON
97 + -DCMAKE_BUILD_TYPE=None
98 + -DCMAKE_INSTALL_PREFIX=/usr
99 + -DCMAKE_INSTALL_SYSCONFDIR=/etc
100 + -DCMAKE_INSTALL_LOCALSTATEDIR=/var
101 + -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
102 + -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins"
103 + -DICINGA2_USER=icinga
104 + -DICINGA2_GROUP=icingacmd
105 + -DICINGA2_COMMAND_GROUP=icingacmd
106 + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
107 + -DUSE_SYSTEMD=$(usex systemd ON OFF)
108 + -DLOGROTATE_HAS_SU=ON
109 + )
110 + # default to off if minimal, allow the flags to be set otherwise
111 + if use minimal; then
112 + mycmakeargs+=(
113 + -DICINGA2_WITH_MYSQL=OFF
114 + -DICINGA2_WITH_PGSQL=OFF
115 + )
116 + else
117 + mycmakeargs+=(
118 + -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF)
119 + -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF)
120 + )
121 + fi
122 + # LTO
123 + if use lto; then
124 + mycmakeargs+=(
125 + -DICINGA2_LTO_BUILD=ON
126 + )
127 + else
128 + mycmakeargs+=(
129 + -DICINGA2_LTO_BUILD=OFF
130 + )
131 + fi
132 +
133 + cmake-utils_src_configure
134 +}
135 +
136 +src_install() {
137 + BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
138 + cd "${BUILDDIR}" || die
139 +
140 + emake DESTDIR="${D}" install
141 +
142 + einstalldocs
143 +
144 + newinitd "${FILESDIR}"/icinga2.initd-3 icinga2
145 +
146 + if use mysql ; then
147 + docinto schema
148 + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
149 + docinto schema/upgrade
150 + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/*
151 + fi
152 + if use mariadb ; then # same as mysql
153 + docinto schema
154 + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
155 + docinto schema/upgrade
156 + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/*
157 + fi
158 + if use postgres ; then
159 + docinto schema
160 + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
161 + docinto schema/upgrade
162 + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/*
163 + fi
164 +
165 + keepdir /etc/icinga2
166 + keepdir /var/lib/icinga2/api/zones
167 + keepdir /var/lib/icinga2/api/repository
168 + keepdir /var/lib/icinga2/api/log
169 + keepdir /var/spool/icinga2/perfdata
170 +
171 + rm -r "${D}/var/run" || die "failed to remove /var/run"
172 + rm -r "${D}/var/cache" || die "failed to remove /var/cache"
173 +
174 + fowners root:icinga /etc/icinga2
175 + fperms 0750 /etc/icinga2
176 + fowners icinga:icinga /var/lib/icinga2
177 + fowners icinga:icinga /var/spool/icinga2
178 + fowners -R icinga:icingacmd /var/lib/icinga2/api
179 + fowners icinga:icinga /var/spool/icinga2/perfdata
180 + fowners icinga:icingacmd /var/log/icinga2
181 +
182 + fperms ug+rwX,o-rwx /etc/icinga2
183 + fperms ug+rwX,o-rwx /var/lib/icinga2
184 + fperms ug+rwX,o-rwx /var/spool/icinga2
185 + fperms ug+rwX,o-rwx /var/log/icinga2
186 +
187 + if use vim-syntax; then
188 + insinto /usr/share/vim/vimfiles
189 + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect
190 + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax
191 + fi
192 +
193 + if use nano-syntax; then
194 + insinto /usr/share/nano
195 + doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc
196 + fi
197 +}
198 +
199 +pkg_postinst() {
200 + if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then
201 + elog "DB IDO schema upgrade may be required required.
202 + https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/"
203 + fi
204 +}