From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1287217-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id BE0111382C5
	for <garchives@archives.gentoo.org>; Fri, 28 May 2021 15:52:09 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E3C2EE0A8C;
	Fri, 28 May 2021 15:52:08 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id BD778E0A8C
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 May 2021 15:52:08 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 87EC8340AB5
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 May 2021 15:52:07 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B31A679C
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 May 2021 15:52:04 +0000 (UTC)
From: "Matthew Thode" <prometheanfire@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matthew Thode" <prometheanfire@gentoo.org>
Message-ID: <1622217120.d0773ba2ddd7da40940873e9bbfa91be7b98b062.prometheanfire@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/icinga2/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-analyzer/icinga2/Manifest net-analyzer/icinga2/icinga2-2.12.4.ebuild
X-VCS-Directories: net-analyzer/icinga2/
X-VCS-Committer: prometheanfire
X-VCS-Committer-Name: Matthew Thode
X-VCS-Revision: d0773ba2ddd7da40940873e9bbfa91be7b98b062
X-VCS-Branch: master
Date: Fri, 28 May 2021 15:52:04 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 48a79be1-4953-439b-adc7-d3a3a9206767
X-Archives-Hash: 831e079fee95116ef28e6b007152d5df

commit:     d0773ba2ddd7da40940873e9bbfa91be7b98b062
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Fri May 28 15:51:44 2021 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Fri May 28 15:52:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0773ba2

net-analyzer/icinga2: 2.12.4 bump

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 net-analyzer/icinga2/Manifest              |   1 +
 net-analyzer/icinga2/icinga2-2.12.4.ebuild | 148 +++++++++++++++++++++++++++++
 2 files changed, 149 insertions(+)

diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest
index e92368b9b6f..bd822b23fcf 100644
--- a/net-analyzer/icinga2/Manifest
+++ b/net-analyzer/icinga2/Manifest
@@ -1 +1,2 @@
 DIST icinga2-2.12.3.tar.gz 7534454 BLAKE2B 021f940b3885c90cc43b4708c83430685fdb692d5ce95ed0f667a95b7dd2f4817b30fb7b05f1e214ba3aa31cef806af0f83e68447ece94916d806fb95f66526e SHA512 28b87e03a8ffeb7a1d19ddf9555151b826f7bf1fd33b0139c2fc8abe7c89d66d96089d5b32d0aaccc3876040514b2bfbde9970416d5ec4ea3b023b17c0fb1799
+DIST icinga2-2.12.4.tar.gz 7535804 BLAKE2B 495a53fc0887ff2e1b5e058c52af63c155da600b4c82e38653a56c4b1dab497ef477254b19727c6c366b48c41a052b68c9910cb4bc4782605612a3d63ccf646c SHA512 3a817eb6f1be256f6eca5136e3d74c49e1cc2a7af382a906abebc6d573579e755decf72bfce62fad48f9c5a37fe6bc304c5849d1008ab7ce4939213f720ab37b

diff --git a/net-analyzer/icinga2/icinga2-2.12.4.ebuild b/net-analyzer/icinga2/icinga2-2.12.4.ebuild
new file mode 100644
index 00000000000..655d8049880
--- /dev/null
+++ b/net-analyzer/icinga2/icinga2-2.12.4.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd
+
+if [[ ${PV} != 9999 ]]; then
+	SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm64 ~x86"
+else
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/Icinga/icinga2.git"
+fi
+
+DESCRIPTION="Distributed, general purpose, network monitoring engine"
+HOMEPAGE="https://icinga.com/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console jumbo-build lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax"
+
+# Add accounts to DEPEND because of fowners in src_install
+DEPEND="
+	dev-libs/openssl:0=
+	>=dev-libs/boost-1.66.0:=[context]
+	console? ( dev-libs/libedit )
+	mariadb? ( dev-db/mariadb-connector-c:= )
+	mysql? ( dev-db/mysql-connector-c:= )
+	postgres? ( dev-db/postgresql:= )
+	dev-libs/yajl:=
+	acct-user/icinga
+	acct-group/icinga
+	acct-group/icingacmd"
+BDEPEND="
+	sys-devel/bison
+	>=sys-devel/flex-2.5.35"
+RDEPEND="
+	${DEPEND}
+	plugins? ( || (
+		net-analyzer/monitoring-plugins
+		net-analyzer/nagios-plugins
+	) )
+	mail? ( virtual/mailx )
+	acct-group/nagios"
+
+REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )"
+
+PATCHES=(
+	# https://github.com/Icinga/icinga2/issues/8185#issuecomment-680875875
+	"${FILESDIR}/${PN}-2.12.1-boost-1.74.0.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DICINGA2_UNITY_BUILD=$(usex jumbo-build)
+		-DCMAKE_INSTALL_SYSCONFDIR=/etc
+		-DCMAKE_INSTALL_LOCALSTATEDIR=/var
+		-DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
+		-DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins"
+		-DICINGA2_USER=icinga
+		-DICINGA2_GROUP=icingacmd
+		-DICINGA2_COMMAND_GROUP=icingacmd
+		-DICINGA2_RUNDIR=/run
+		-DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON
+		-DUSE_SYSTEMD=$(usex systemd)
+		-DLOGROTATE_HAS_SU=ON
+		-DICINGA2_LTO_BUILD=$(usex lto)
+	)
+	# default to off if minimal, allow the flags to be set otherwise
+	if use minimal; then
+		mycmakeargs+=(
+			-DICINGA2_WITH_MYSQL=OFF
+			-DICINGA2_WITH_PGSQL=OFF
+		)
+	else
+		mycmakeargs+=(
+			-DICINGA2_WITH_PGSQL=$(usex postgres)
+			-DICINGA2_WITH_MYSQL=$(usex mysql yes $(usex mariadb))
+		)
+	fi
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	newinitd "${FILESDIR}"/icinga2.initd-3 icinga2
+
+	if use mysql || use mariadb; then
+		docinto schema
+		newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+		docinto schema/upgrade
+		dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/*
+	fi
+	if use postgres; then
+		docinto schema
+		newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
+		docinto schema/upgrade
+		dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/*
+	fi
+
+	keepdir /etc/icinga2
+	keepdir /var/lib/icinga2/api/zones
+	keepdir /var/lib/icinga2/api/repository
+	keepdir /var/lib/icinga2/api/log
+	keepdir /var/spool/icinga2/perfdata
+
+	rm -r "${D}/run" || die "failed to remove /run"
+	rm -r "${D}/var/cache" || die "failed to remove /var/cache"
+
+	fowners root:icinga /etc/icinga2
+	fperms 0750 /etc/icinga2
+	fowners icinga:icinga /var/lib/icinga2
+	fowners icinga:icinga /var/spool/icinga2
+	fowners -R icinga:icingacmd /var/lib/icinga2/api
+	fowners icinga:icinga /var/spool/icinga2/perfdata
+	fowners icinga:icingacmd /var/log/icinga2
+
+	fperms ug+rwX,o-rwx /etc/icinga2
+	fperms ug+rwX,o-rwx /var/lib/icinga2
+	fperms ug+rwX,o-rwx /var/spool/icinga2
+	fperms ug+rwX,o-rwx /var/log/icinga2
+
+	if use vim-syntax; then
+		insinto /usr/share/vim/vimfiles
+		doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect
+		doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax
+	fi
+
+	if use nano-syntax; then
+		insinto /usr/share/nano
+		doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc
+	fi
+}
+
+pkg_postinst() {
+	if [[ "${PV}" != 9999 ]]; then
+		local v
+		for v in ${REPLACING_VERSIONS}; do
+			if ver_test "${PV}" -gt "${v}"; then
+				elog "DB IDO schema upgrade may be required."
+				elog "https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/"
+			fi
+		done
+	fi
+}