Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net-misc/loki-promtail-bin add ebuild #868

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions net-misc/loki-promtail-bin/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST loki-promtail-bin-2.9.5.zip 26837462 BLAKE2B 56ea6438ca32a68a004961dba6d43b0340adc9cf9cdd4287d40024ccbda320bd19b9fc75764e7bcc5c89bd3348c51000b9b7b3691b7757e1c6062d0d7b61197c SHA512 652fa8aef13b5c58ed27e213557eb161a0fce607558ed79f5a6cf4adcfbb4cc9b49d9b2d58afc9b18100eebe5ba0d957dcc0ef26a9205dc71f2ec24800110f7c
16 changes: 16 additions & 0 deletions net-misc/loki-promtail-bin/files/promtail.initd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/sbin/openrc-run
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

name="Loki Promtail"
description="Promtail is a logs agent"
command="/opt/bin/promtail"
command_args="-config.file /etc/promtail.yml"
command_background="true"
pidfile="/var/run/${RC_SVCNAME}.pid"
output_logger="logger -p daemon.info -t ${SVCNAME}"
error_logger="logger -p daemon.error -t ${SVCNAME}"

depend() {
after net
}
39 changes: 39 additions & 0 deletions net-misc/loki-promtail-bin/loki-promtail-bin-2.9.5.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Promtail is an agent which ships the contents of local logs to a Loki instance."
HOMEPAGE="https://grafana.com/loki"
SRC_URI="https://github.com/grafana/loki/releases/download/v${PV}/promtail-linux-amd64.zip -> ${P}.zip"

S="${WORKDIR}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="
app-arch/zip
>=dev-lang/go-1.13:*
"

QA_PREBUILT="/opt/bin/promtail"
QA_PRESTRIPPED="/opt/bin/promtail"

RESTRICT="mirror strip"

src_install() {
newinitd "${FILESDIR}/promtail.initd" "promtail"
dodoc *.md
into /opt
newbin promtail-linux-amd64 promtail
insinto /etc
doins "${FILESDIR}/promtail.yml"
}

pkg_postinst() {
einfo
einfo "Please make sure to modify /etc/promtail.yml before starting Promtail!"
einfo
}
Loading