net-misc/icingadb: add 1.2.0 with icingadb-migrate and systemd unit

Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/37461
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
This commit is contained in:
Louis Sautier
2024-07-06 21:37:58 +02:00
committed by Matthew Thode
parent 5be86661af
commit 47ec0db99d
3 changed files with 70 additions and 0 deletions

View File

@@ -2,3 +2,5 @@ DIST icingadb-1.1.0-deps.tar.xz 9188036 BLAKE2B d816220d66d354f348c7eb9874d2edd6
DIST icingadb-1.1.0.tar.gz 3865617 BLAKE2B e71b577f799ff6c069f86810b35731411eedbfb15c5e741aac987f9fdb852e342bbece3b3995af7fe1f957988314e71af8d92cbda118a6bf8d91639cfe8734e2 SHA512 a7659004802acabe9f3fdc2b843e37928b0b8835428d1f12a730fc3842bb7550f380e6abc8b253bd00fe5b5df6710573fef847f657a61b10f4cf617fb03b4ea0
DIST icingadb-1.1.1-deps.tar.xz 9308260 BLAKE2B 95d9e87bc48661af9eeee5b14beea50fcee5ad5fdf846e207795e676b3a0f8a7b95f9410ef3ab97e490be275928f8d21e8b4c54d15fd9b4c0c4036504c4d885c SHA512 d43819ac8979e4396def929bc2cc0777683b5afb2d80d3c95c83a46b5ef2e9463b93e338c1ba1fafee780e4dc7ded53d0044d15258565a01acd178fde85c39ca
DIST icingadb-1.1.1.tar.gz 3868785 BLAKE2B 9f07cfca9acbe170189f28c42d71433c1d1faba55f6a25348b3a5cb76675f72df5e2c8c0f2c984830766a6239db4e1098da9e5daddb5dbd3c24b42c8058161b6 SHA512 25dab9cb93d786b6bccb3e305cf9f36d7910e8919a87148805fee61378c072107838741a2066eddcbadde9f1d345d79e9d12c46b87789ac79b272fb4d01d3ab4
DIST icingadb-1.2.0-deps.tar.xz 9714708 BLAKE2B e79ab63b8bec42ee61cb402db37dbb346f9521aa4188667e3bfe98ea5c3a44f8bada4e228c2f8e06c73d522fa3a97aa11eb23bb7e54500b53c4191f4a458f6a1 SHA512 83c3aed34923c23ea723220e637e54788435ef53837a454ebad00ce0e714c7c33a1e57adaef5702b5e2ebe541659286cb9889e4680986c0bd786b9aa48d87291
DIST icingadb-1.2.0.tar.gz 3345811 BLAKE2B 7cf985e1209ee1bab9f0ee63745fd367ed15000d9807cf776e0301691c11d1dfb63c88e39dfa522ab1ab3daf0ee0165993e82747b32fb8db1ec6fab3857c0c70 SHA512 ab5e01b4ef606c765970e4f32b26d79f956c2363e9ce4213e037413ecbde5cbc85c57cd8c7ae730524c1c103306dd6f78cce47fd758cb58384f1ad0bc963b920

View File

@@ -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=@EPREFIX@/usr/sbin/icingadb --config /etc/icingadb/config.yml
User=icinga
Group=icinga
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,55 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="Icinga configuration and state database supporting multiple environments"
HOMEPAGE="https://icinga.com/docs/icinga-db/"
SRC_URI="
https://github.com/Icinga/icingadb/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~sbraz/distfiles/${P}-deps.tar.xz
"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RDEPEND="
acct-user/icinga
acct-group/icinga
"
DOCS=( config.example.yml doc README.md schema )
src_prepare() {
default
sed -e "s|@EPREFIX@|${EPREFIX}|" "${FILESDIR}/icingadb.service" > "${T}/icingadb.service" || die
}
src_compile() {
local cmd
for cmd in icingadb icingadb-migrate; do
pushd "cmd/${cmd}" || die
ego build
popd || die
done
}
src_install() {
local cmd
for cmd in icingadb icingadb-migrate; do
dobin "cmd/${cmd}/${cmd}"
done
einstalldocs
newinitd "${FILESDIR}/icingadb.initd" "${PN}"
systemd_dounit "${T}/icingadb.service"
keepdir /etc/icingadb
keepdir /var/log/icingadb
fperms 0750 /etc/icingadb /var/log/icingadb
fowners icinga:icinga /etc/icingadb /var/log/icingadb
}