1 |
commit: 11648313f20e3a3a175832764755c373edc71ec0 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 20 17:05:34 2018 +0000 |
4 |
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 20 17:05:34 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11648313 |
7 |
|
8 |
net-analyzer/icinga2: update init script |
9 |
|
10 |
Do not require icinga2 to run before we start it. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/668506 |
13 |
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org> |
14 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
15 |
|
16 |
net-analyzer/icinga2/Manifest | 1 - |
17 |
net-analyzer/icinga2/files/icinga2.initd-3 | 12 +- |
18 |
...2-2.10.0-r1.ebuild => icinga2-2.10.1-r1.ebuild} | 0 |
19 |
net-analyzer/icinga2/icinga2-2.10.1.ebuild | 172 --------------------- |
20 |
4 files changed, 1 insertion(+), 184 deletions(-) |
21 |
|
22 |
diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest |
23 |
index 8d1baa7dc18..b0895c99616 100644 |
24 |
--- a/net-analyzer/icinga2/Manifest |
25 |
+++ b/net-analyzer/icinga2/Manifest |
26 |
@@ -1,4 +1,3 @@ |
27 |
-DIST icinga2-2.10.0.tar.gz 2227324 BLAKE2B fdbcb84d11b867e06804a2528ee3579dfd15df72bbe5f3b4334ee38282b710701889def9f4b44613c0196ea49f13466de86103f65049cf16f491c6f28b9390d1 SHA512 0997461371440521cfbb13d29f6801e889b423d46a4fb792edef5191db3cf39503b4452823fcd78a0d0934072eb7df53b17a56b6bae7c1fb21412f7022d4d0a5 |
28 |
DIST icinga2-2.10.1.tar.gz 4406432 BLAKE2B cccc60f63faabed43f9a99f313e3835c15afab9d70e1335f987f431f3187907fedb94451457fe4652886e950b1b058952957832bc7fb5ad5e8f6f4f1f47d4178 SHA512 88e0ef1dfd93a399535f3238cb675e86159ca23d1abfd78009797c3533d10ac5c5167008ff04dfc64d4b9f225e75d85947ce85c5a941250699c0d772be9c0aeb |
29 |
DIST icinga2-2.8.4.tar.gz 2510333 BLAKE2B f551a5eadc93d8455612af40e34a0922bc75f41b8064f9989c8f0c28dc2c3fb18963cf9b3272efa29f03973e7cf5824762bebff1bfa1a23c4ba39c93fc29c8e5 SHA512 b2cb5989962ac65da927cbdbac1b3345c913321d507b5113f32dd90bf969b2513478e68d52b9cd4cf255057d74428f9e42067288b7ddc59ad060ca7b84f4f114 |
30 |
DIST icinga2-2.9.1.tar.gz 2193190 BLAKE2B 29be491c4b43e218ef8aaa2128822040ccb0989e91d83f033cf7873216e4307cdbc8ee9052d79fd22220c396efeb68759acc97938e3ee596e0820e3f6c8f73bc SHA512 1d69a24f85249386e30ff1625cf522ba58e5f2ab641dbe950bf1764324a6c7516d1532942954e842002566823b0f30383747d5ec8b7bd36705aa5f0ccfa29533 |
31 |
|
32 |
diff --git a/net-analyzer/icinga2/files/icinga2.initd-3 b/net-analyzer/icinga2/files/icinga2.initd-3 |
33 |
index 46990e3e4e2..5af259d5ddf 100644 |
34 |
--- a/net-analyzer/icinga2/files/icinga2.initd-3 |
35 |
+++ b/net-analyzer/icinga2/files/icinga2.initd-3 |
36 |
@@ -32,20 +32,10 @@ checkconfig() { |
37 |
eend 1 |
38 |
fi |
39 |
|
40 |
- ICINGA2_USER=$($DAEMON variable get RunAsUser) |
41 |
- if [ $? != 0 ]; then |
42 |
- eerror "Could not fetch RunAsUser variable: '$ICINGA2_USER'." |
43 |
- return 1 |
44 |
- fi |
45 |
- ICINGA2_GROUP=$($DAEMON variable get RunAsGroup) |
46 |
- if [ $? != 0 ]; then |
47 |
- eerror "Could not fetch RunAsGroup variable: '$ICINGA2_GROUP'." |
48 |
- return 1 |
49 |
- fi |
50 |
- |
51 |
checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_RUN_DIR |
52 |
checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_STATE_DIR |
53 |
checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR |
54 |
+ checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CACHE_DIR |
55 |
|
56 |
if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 2>&1; then |
57 |
eerror "Icinga2 detected configuration errors. Check '$ICINGA2_STARTUP_LOG' for details." |
58 |
|
59 |
diff --git a/net-analyzer/icinga2/icinga2-2.10.0-r1.ebuild b/net-analyzer/icinga2/icinga2-2.10.1-r1.ebuild |
60 |
similarity index 100% |
61 |
rename from net-analyzer/icinga2/icinga2-2.10.0-r1.ebuild |
62 |
rename to net-analyzer/icinga2/icinga2-2.10.1-r1.ebuild |
63 |
|
64 |
diff --git a/net-analyzer/icinga2/icinga2-2.10.1.ebuild b/net-analyzer/icinga2/icinga2-2.10.1.ebuild |
65 |
deleted file mode 100644 |
66 |
index 913217ef694..00000000000 |
67 |
--- a/net-analyzer/icinga2/icinga2-2.10.1.ebuild |
68 |
+++ /dev/null |
69 |
@@ -1,172 +0,0 @@ |
70 |
-# Copyright 1999-2018 Gentoo Authors |
71 |
-# Distributed under the terms of the GNU General Public License v2 |
72 |
- |
73 |
-EAPI=6 |
74 |
-if [[ ${PV} != 9999 ]]; then |
75 |
- inherit cmake-utils depend.apache eutils systemd toolchain-funcs user wxwidgets |
76 |
- SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
77 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
78 |
-else |
79 |
- inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs user wxwidgets |
80 |
- EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" |
81 |
- EGIT_BRANCH="master" |
82 |
- KEYWORDS="" |
83 |
-fi |
84 |
- |
85 |
-DESCRIPTION="Distributed, general purpose, network monitoring engine" |
86 |
-HOMEPAGE="http://icinga.org/icinga2" |
87 |
- |
88 |
-LICENSE="GPL-2" |
89 |
-SLOT="0" |
90 |
-IUSE="classicui console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" |
91 |
-WX_GTK_VER="3.0" |
92 |
- |
93 |
-CDEPEND=" |
94 |
- !libressl? ( dev-libs/openssl:0= ) |
95 |
- libressl? ( dev-libs/libressl:0= ) |
96 |
- >=dev-libs/boost-1.58-r1 |
97 |
- console? ( dev-libs/libedit ) |
98 |
- mariadb? ( dev-db/mariadb-connector-c:= ) |
99 |
- mysql? ( dev-db/mysql-connector-c:= ) |
100 |
- postgres? ( dev-db/postgresql:= ) |
101 |
- dev-libs/yajl" |
102 |
- |
103 |
-DEPEND=" |
104 |
- ${CDEPEND} |
105 |
- sys-devel/bison |
106 |
- >=sys-devel/flex-2.5.35" |
107 |
- |
108 |
-RDEPEND=" |
109 |
- ${CDEPEND} |
110 |
- plugins? ( || ( |
111 |
- net-analyzer/monitoring-plugins |
112 |
- net-analyzer/nagios-plugins |
113 |
- ) ) |
114 |
- mail? ( virtual/mailx ) |
115 |
- classicui? ( net-analyzer/icinga[web] )" |
116 |
- |
117 |
-REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )" |
118 |
- |
119 |
-want_apache2 |
120 |
- |
121 |
-pkg_setup() { |
122 |
- depend.apache_pkg_setup |
123 |
- enewgroup icinga |
124 |
- enewgroup icingacmd |
125 |
- enewgroup nagios # for plugins |
126 |
- enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios" |
127 |
-} |
128 |
- |
129 |
-src_configure() { |
130 |
- sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die |
131 |
- local mycmakeargs=( |
132 |
- -DICINGA2_UNITY_BUILD=FALSE |
133 |
- -DCMAKE_VERBOSE_MAKEFILE=ON |
134 |
- -DCMAKE_BUILD_TYPE=None |
135 |
- -DCMAKE_INSTALL_PREFIX=/usr |
136 |
- -DCMAKE_INSTALL_SYSCONFDIR=/etc |
137 |
- -DCMAKE_INSTALL_LOCALSTATEDIR=/var |
138 |
- -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 |
139 |
- -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins" |
140 |
- -DICINGA2_USER=icinga |
141 |
- -DICINGA2_GROUP=icingacmd |
142 |
- -DICINGA2_COMMAND_GROUP=icingacmd |
143 |
- -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes |
144 |
- -DUSE_SYSTEMD=$(usex systemd ON OFF) |
145 |
- -DLOGROTATE_HAS_SU=ON |
146 |
- ) |
147 |
- # default to off if minimal, allow the flags to be set otherwise |
148 |
- if use minimal; then |
149 |
- mycmakeargs+=( |
150 |
- -DICINGA2_WITH_MYSQL=OFF |
151 |
- -DICINGA2_WITH_PGSQL=OFF |
152 |
- ) |
153 |
- else |
154 |
- mycmakeargs+=( |
155 |
- -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF) |
156 |
- -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF) |
157 |
- ) |
158 |
- fi |
159 |
- # LTO |
160 |
- if use lto; then |
161 |
- mycmakeargs+=( |
162 |
- -DICINGA2_LTO_BUILD=ON |
163 |
- ) |
164 |
- else |
165 |
- mycmakeargs+=( |
166 |
- -DICINGA2_LTO_BUILD=OFF |
167 |
- ) |
168 |
- fi |
169 |
- |
170 |
- cmake-utils_src_configure |
171 |
-} |
172 |
- |
173 |
-src_install() { |
174 |
- BUILDDIR="${WORKDIR}"/icinga2-${PV}_build |
175 |
- cd "${BUILDDIR}" || die |
176 |
- |
177 |
- emake DESTDIR="${D}" install |
178 |
- |
179 |
- einstalldocs |
180 |
- |
181 |
- newinitd "${FILESDIR}"/icinga2.initd-3 icinga2 |
182 |
- |
183 |
- if use mysql ; then |
184 |
- docinto schema |
185 |
- newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql |
186 |
- docinto schema/upgrade |
187 |
- dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* |
188 |
- fi |
189 |
- if use mariadb ; then # same as mysql |
190 |
- docinto schema |
191 |
- newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql |
192 |
- docinto schema/upgrade |
193 |
- dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* |
194 |
- fi |
195 |
- if use postgres ; then |
196 |
- docinto schema |
197 |
- newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql |
198 |
- docinto schema/upgrade |
199 |
- dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/* |
200 |
- fi |
201 |
- |
202 |
- keepdir /etc/icinga2 |
203 |
- keepdir /var/lib/icinga2/api/zones |
204 |
- keepdir /var/lib/icinga2/api/repository |
205 |
- keepdir /var/lib/icinga2/api/log |
206 |
- keepdir /var/spool/icinga2/perfdata |
207 |
- |
208 |
- rm -r "${D}/var/run" || die "failed to remove /var/run" |
209 |
- rm -r "${D}/var/cache" || die "failed to remove /var/cache" |
210 |
- |
211 |
- fowners root:icinga /etc/icinga2 |
212 |
- fperms 0750 /etc/icinga2 |
213 |
- fowners icinga:icinga /var/lib/icinga2 |
214 |
- fowners icinga:icinga /var/spool/icinga2 |
215 |
- fowners -R icinga:icingacmd /var/lib/icinga2/api |
216 |
- fowners icinga:icinga /var/spool/icinga2/perfdata |
217 |
- fowners icinga:icingacmd /var/log/icinga2 |
218 |
- |
219 |
- fperms ug+rwX,o-rwx /etc/icinga2 |
220 |
- fperms ug+rwX,o-rwx /var/lib/icinga2 |
221 |
- fperms ug+rwX,o-rwx /var/spool/icinga2 |
222 |
- fperms ug+rwX,o-rwx /var/log/icinga2 |
223 |
- |
224 |
- if use vim-syntax; then |
225 |
- insinto /usr/share/vim/vimfiles |
226 |
- doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect |
227 |
- doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax |
228 |
- fi |
229 |
- |
230 |
- if use nano-syntax; then |
231 |
- insinto /usr/share/nano |
232 |
- doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc |
233 |
- fi |
234 |
-} |
235 |
- |
236 |
-pkg_postinst() { |
237 |
- if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then |
238 |
- elog "DB IDO schema upgrade may be required required. |
239 |
- https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" |
240 |
- fi |
241 |
-} |