1 |
commit: 48b03d794b6e7831804c3dc10049127f66451af6 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 8 16:53:41 2022 +0000 |
4 |
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 8 16:57:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48b03d79 |
7 |
|
8 |
net-analyzer/icinga2: add 2.13.6 |
9 |
|
10 |
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org> |
11 |
|
12 |
net-analyzer/icinga2/Manifest | 1 + |
13 |
net-analyzer/icinga2/icinga2-2.13.6.ebuild | 145 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 146 insertions(+) |
15 |
|
16 |
diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest |
17 |
index 4f001e6bf3aa..0cd306438c7e 100644 |
18 |
--- a/net-analyzer/icinga2/Manifest |
19 |
+++ b/net-analyzer/icinga2/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST icinga2-2.13.5.tar.gz 9663739 BLAKE2B 9ce884cfd66eb6ab9a6977c8e751465bbec30605c0b62302850e2533ea5b3bfa003074807ad21a4338d37c41fac59454eb65edbca7ab7c4897ecd74a4d41ff1f SHA512 7ac8970292795b8675a8fdc25ee0a68c6fe506d7413fe9c3c61e90ca159bdf01af43343de2217cbb4b5e446139c97e8b115b4dcd10b8ef68e884a07b80669f5d |
22 |
+DIST icinga2-2.13.6.tar.gz 9666870 BLAKE2B 50fd463ddb5d5d01ae96cb8457f2c4044c126c308f3d142bb6eb5ac95cf1f5704cd911236acd71ed7b77a596c07e65a96bbebce028bd666126324447d4f91aad SHA512 5fcf480c305487c7988d6cacfcb64c768c0f0e749704247c3d0ded746284ff5485e0a3d25c82fba1305414d47067a9eb80f84de594267ddf050a0b913825cd71 |
23 |
|
24 |
diff --git a/net-analyzer/icinga2/icinga2-2.13.6.ebuild b/net-analyzer/icinga2/icinga2-2.13.6.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..2c5482fe5a8f |
27 |
--- /dev/null |
28 |
+++ b/net-analyzer/icinga2/icinga2-2.13.6.ebuild |
29 |
@@ -0,0 +1,145 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+inherit cmake systemd |
36 |
+ |
37 |
+if [[ ${PV} != 9999 ]]; then |
38 |
+ SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
39 |
+ KEYWORDS="~amd64 ~arm64 ~x86" |
40 |
+else |
41 |
+ inherit git-r3 |
42 |
+ EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" |
43 |
+fi |
44 |
+ |
45 |
+DESCRIPTION="Distributed, general purpose, network monitoring engine" |
46 |
+HOMEPAGE="https://icinga.com/" |
47 |
+ |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0" |
50 |
+IUSE="console jumbo-build lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" |
51 |
+ |
52 |
+# Add accounts to DEPEND because of fowners in src_install |
53 |
+DEPEND=" |
54 |
+ dev-libs/openssl:0= |
55 |
+ dev-libs/boost:=[context] |
56 |
+ console? ( dev-libs/libedit ) |
57 |
+ mariadb? ( dev-db/mariadb-connector-c:= ) |
58 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
59 |
+ postgres? ( dev-db/postgresql:= ) |
60 |
+ dev-libs/yajl:= |
61 |
+ acct-user/icinga |
62 |
+ acct-group/icinga |
63 |
+ acct-group/icingacmd" |
64 |
+BDEPEND=" |
65 |
+ sys-devel/bison |
66 |
+ >=sys-devel/flex-2.5.35" |
67 |
+RDEPEND=" |
68 |
+ ${DEPEND} |
69 |
+ plugins? ( || ( |
70 |
+ net-analyzer/monitoring-plugins |
71 |
+ net-analyzer/nagios-plugins |
72 |
+ ) ) |
73 |
+ mail? ( virtual/mailx ) |
74 |
+ acct-group/nagios" |
75 |
+ |
76 |
+REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )" |
77 |
+ |
78 |
+src_configure() { |
79 |
+ local mycmakeargs=( |
80 |
+ -DICINGA2_UNITY_BUILD=$(usex jumbo-build) |
81 |
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc |
82 |
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var |
83 |
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 |
84 |
+ -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins" |
85 |
+ -DICINGA2_USER=icinga |
86 |
+ -DICINGA2_GROUP=icingacmd |
87 |
+ -DICINGA2_COMMAND_GROUP=icingacmd |
88 |
+ -DICINGA2_RUNDIR=/run |
89 |
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON |
90 |
+ -DUSE_SYSTEMD=$(usex systemd) |
91 |
+ -DLOGROTATE_HAS_SU=ON |
92 |
+ -DICINGA2_LTO_BUILD=$(usex lto) |
93 |
+ ) |
94 |
+ # default to off if minimal, allow the flags to be set otherwise |
95 |
+ if use minimal; then |
96 |
+ mycmakeargs+=( |
97 |
+ -DICINGA2_WITH_MYSQL=OFF |
98 |
+ -DICINGA2_WITH_PGSQL=OFF |
99 |
+ ) |
100 |
+ else |
101 |
+ mycmakeargs+=( |
102 |
+ -DICINGA2_WITH_PGSQL=$(usex postgres) |
103 |
+ -DICINGA2_WITH_MYSQL=$(usex mysql yes $(usex mariadb)) |
104 |
+ ) |
105 |
+ fi |
106 |
+ |
107 |
+ cmake_src_configure |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ cmake_src_install |
112 |
+ |
113 |
+ newinitd "${FILESDIR}"/icinga2.initd-3 icinga2 |
114 |
+ |
115 |
+ if use mysql || use mariadb; then |
116 |
+ docinto schema |
117 |
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql |
118 |
+ docinto schema/upgrade |
119 |
+ dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* |
120 |
+ fi |
121 |
+ if use postgres; then |
122 |
+ docinto schema |
123 |
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql |
124 |
+ docinto schema/upgrade |
125 |
+ dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/* |
126 |
+ fi |
127 |
+ |
128 |
+ keepdir /etc/icinga2 |
129 |
+ keepdir /var/lib/icinga2/api/zones |
130 |
+ keepdir /var/lib/icinga2/api/repository |
131 |
+ keepdir /var/lib/icinga2/api/log |
132 |
+ keepdir /var/spool/icinga2/perfdata |
133 |
+ |
134 |
+ rm -r "${D}/run" || die "failed to remove /run" |
135 |
+ rm -r "${D}/var/cache" || die "failed to remove /var/cache" |
136 |
+ |
137 |
+ fowners -R icinga:icinga /etc/icinga2 |
138 |
+ fperms 0750 /etc/icinga2 |
139 |
+ fowners icinga:icinga /var/lib/icinga2 |
140 |
+ fowners -R icinga:icingacmd /var/lib/icinga2/api |
141 |
+ fowners -R icinga:icingacmd /var/lib/icinga2/certificate-requests |
142 |
+ fowners -R icinga:icingacmd /var/lib/icinga2/certs |
143 |
+ fowners icinga:icinga /var/spool/icinga2 |
144 |
+ fowners icinga:icinga /var/spool/icinga2/perfdata |
145 |
+ fowners icinga:icingacmd /var/log/icinga2 |
146 |
+ |
147 |
+ fperms ug+rwX,o-rwx /etc/icinga2 |
148 |
+ fperms ug+rwX,o-rwx /var/lib/icinga2 |
149 |
+ fperms ug+rwX,o-rwx /var/spool/icinga2 |
150 |
+ fperms ug+rwX,o-rwx /var/log/icinga2 |
151 |
+ |
152 |
+ if use vim-syntax; then |
153 |
+ insinto /usr/share/vim/vimfiles |
154 |
+ doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect |
155 |
+ doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax |
156 |
+ fi |
157 |
+ |
158 |
+ if use nano-syntax; then |
159 |
+ insinto /usr/share/nano |
160 |
+ doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc |
161 |
+ fi |
162 |
+} |
163 |
+ |
164 |
+pkg_postinst() { |
165 |
+ if [[ "${PV}" != 9999 ]]; then |
166 |
+ local v |
167 |
+ for v in ${REPLACING_VERSIONS}; do |
168 |
+ if ver_test "${PV}" -gt "${v}"; then |
169 |
+ elog "DB IDO schema upgrade may be required." |
170 |
+ elog "https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" |
171 |
+ fi |
172 |
+ done |
173 |
+ fi |
174 |
+} |