From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 66C811382C5 for ; Thu, 8 Apr 2021 13:19:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91044E083D; Thu, 8 Apr 2021 13:19:24 +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 790C4E083D for ; Thu, 8 Apr 2021 13:19:24 +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 21FC1340928 for ; Thu, 8 Apr 2021 13:19:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 98A9E532 for ; Thu, 8 Apr 2021 13:19:21 +0000 (UTC) From: "Mikle Kolyada" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mikle Kolyada" Message-ID: <1617887938.d8eecdbcc464ef4a343c05544ec53cb5a108df8c.zlogene@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-metrics/alertmanager/, app-metrics/alertmanager/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-metrics/alertmanager/alertmanager-0.21.0-r1.ebuild app-metrics/alertmanager/alertmanager-0.21.0-r2.ebuild app-metrics/alertmanager/files/alertmanager.service X-VCS-Directories: app-metrics/alertmanager/ app-metrics/alertmanager/files/ X-VCS-Committer: zlogene X-VCS-Committer-Name: Mikle Kolyada X-VCS-Revision: d8eecdbcc464ef4a343c05544ec53cb5a108df8c X-VCS-Branch: master Date: Thu, 8 Apr 2021 13:19:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fc8d526f-0968-4df2-89d4-ff90070dea2e X-Archives-Hash: 9ca0888cbeec030b76c4deabc77a264f commit: d8eecdbcc464ef4a343c05544ec53cb5a108df8c Author: Mikle Kolyada gentoo org> AuthorDate: Thu Apr 8 13:14:41 2021 +0000 Commit: Mikle Kolyada gentoo org> CommitDate: Thu Apr 8 13:18:58 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8eecdbc app-metrics/alertmanager: add proper systemd support Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Mikle Kolyada gentoo.org> ...1.0-r1.ebuild => alertmanager-0.21.0-r2.ebuild} | 7 +++--- .../alertmanager/files/alertmanager.service | 28 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/app-metrics/alertmanager/alertmanager-0.21.0-r1.ebuild b/app-metrics/alertmanager/alertmanager-0.21.0-r2.ebuild similarity index 82% rename from app-metrics/alertmanager/alertmanager-0.21.0-r1.ebuild rename to app-metrics/alertmanager/alertmanager-0.21.0-r2.ebuild index 7905234ae37..d32f697ad15 100644 --- a/app-metrics/alertmanager/alertmanager-0.21.0-r1.ebuild +++ b/app-metrics/alertmanager/alertmanager-0.21.0-r2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit go-module +inherit go-module systemd GIT_COMMIT=4c6c03eb MY_PV="${PV/_rc/-rc.}" @@ -41,9 +41,10 @@ src_install() { dobin bin/* dodoc {README,CHANGELOG}.md insinto /etc/alertmanager/ - newins doc/examples/simple.yml config.yml.example + newins doc/examples/simple.yml config.yml keepdir /var/lib/alertmanager /var/log/alertmanager + systemd_dounit "${FILESDIR}"/alertmanager.service newinitd "${FILESDIR}"/${PN}.initd ${PN} newconfd "${FILESDIR}"/${PN}.confd ${PN} - fowners ${PN}:${PN} /var/lib/alertmanager /var/log/alertmanager + fowners ${PN}:${PN} /etc/alertmanager /var/lib/alertmanager /var/log/alertmanager } diff --git a/app-metrics/alertmanager/files/alertmanager.service b/app-metrics/alertmanager/files/alertmanager.service new file mode 100644 index 00000000000..b97976dd8dc --- /dev/null +++ b/app-metrics/alertmanager/files/alertmanager.service @@ -0,0 +1,28 @@ +[Unit] +Description=Alertmanager for prometheus +Documentation=https://prometheus.io/docs/alerting/alertmanager/ +Requires=network-online.target +After=network-online.target + +[Service] +User=alertmanager +ExecStart=/usr/bin/alertmanager --cluster.listen-address= --config.file=/etc/alertmanager/config.yml --storage.path=/var/lib/alertmanager/ +ExecReload=/bin/kill -HUP $MAINPID + +NoNewPrivileges=true +ProtectHome=true +ProtectSystem=full +ProtectHostname=true +ProtectControlGroups=true +ProtectKernelModules=true +ProtectKernelTunables=true +LockPersonality=true +PrivateTmp=true +PrivateDevices=True +RestrictRealtime=true +CapabilityBoundingSet= +SystemCallArchitectures=native +MemoryDenyWriteExecute=true + +[Install] +WantedBy=multi-user.target