[arch-commits] Commit in loki/repos (8 files)
Jelle van der Waa
jelle at archlinux.org
Tue Jul 7 18:13:52 UTC 2020
Date: Tuesday, July 7, 2020 @ 18:13:52
Author: jelle
Revision: 660038
archrelease: copy trunk to community-x86_64
Added:
loki/repos/community-x86_64/
loki/repos/community-x86_64/PKGBUILD
(from rev 660036, loki/trunk/PKGBUILD)
loki/repos/community-x86_64/loki.service
(from rev 660036, loki/trunk/loki.service)
loki/repos/community-x86_64/loki.sysusers
(from rev 660036, loki/trunk/loki.sysusers)
loki/repos/community-x86_64/loki.tmpfiles
(from rev 660036, loki/trunk/loki.tmpfiles)
loki/repos/community-x86_64/promtail.service
(from rev 660036, loki/trunk/promtail.service)
loki/repos/community-x86_64/promtail.sysusers
(from rev 660037, loki/trunk/promtail.sysusers)
loki/repos/community-x86_64/promtail.tmpfiles
(from rev 660037, loki/trunk/promtail.tmpfiles)
-------------------+
PKGBUILD | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++
loki.service | 27 ++++++++++++++++++
loki.sysusers | 1
loki.tmpfiles | 1
promtail.service | 26 ++++++++++++++++++
promtail.sysusers | 2 +
promtail.tmpfiles | 1
7 files changed, 133 insertions(+)
Copied: loki/repos/community-x86_64/PKGBUILD (from rev 660036, loki/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1,75 @@
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+
+pkgname=loki
+pkgver=1.5.0
+pkgrel=1
+pkgdesc='like Prometheus, but for logs'
+url='https://github.com/grafana/loki'
+arch=('x86_64')
+license=('Apache')
+depends=('glibc')
+makedepends=('go' 'systemd')
+backup=('etc/loki/loki.yaml' 'etc/loki/promtail.yaml')
+source=($pkgname-$pkgver.tar.gz::https://github.com/grafana/loki/archive/v$pkgver.tar.gz
+ promtail.sysusers promtail.service promtail.tmpfiles
+ loki.sysusers loki.service loki.tmpfiles)
+sha512sums=('31d61ba9cb47afeb0971fe35347683cf96e3b7a4da44b640b0065e64268109c2a1e9011f94d3fcf7912e98f8b079a001cd892a06e3f8d11796f23c8acfc93fff'
+ '2b6c44b18ea3c9f955a7450222180d0b20b5fc551d0b7e5d0d8949e40adc847c4166829146260f87a75732cc5473eab0347dd56fc2125517698bac0652738c74'
+ 'a3427ddecada33b90658635962c4ea36ced6b9d0e1686ce898884980c2ce1a82be2ddcfa6b42736392653f48fa561408633d6016b77e2b513029ba0cec977727'
+ '598042c40673a7914c5a1eeccfb78f832379a61f4360212c5d86f667343cf2fc78e98d9025f9717ea64f3e16e0a28f08cd7709706d811656722019f6167dd788'
+ 'f00b3cb64b71d3ca5a422a2bdff1f81a3e2707c4f73bcb27e24338eabff039b96125c847aaae43c9b22ccc47f89585118c1d0e0b29c4eb7b6f9260c68f8a8324'
+ '3c40d70366ee0ac3d11c87a818d82dfb4e64143e905187b287f7716ee009640bab6676b8a348e526458a00e4cff35fbd8e9d81bdaa6db38a5d673294f09e6638'
+ 'de40d1e6752edbf8c21317ce1ee10f98dfc869e569c07092c613f7144e261e9438683a145a2e0e37e2a9fc758c5c2f02e1d0ac1c60347e98b147e4a550ec6040')
+
+build() {
+ cd loki-$pkgver
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ ./cmd/loki
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ ./cmd/promtail
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ ./cmd/logcli
+}
+
+check() {
+ cd loki-$pkgver
+
+ go test -v $(go list ./... | grep -v "distributor")
+}
+
+package() {
+ cd loki-$pkgver
+
+ install -Dm755 -t "$pkgdir"/usr/bin loki promtail logcli
+
+ install -Dm644 cmd/promtail/promtail-local-config.yaml $pkgdir/etc/loki/promtail.yaml
+ install -Dm644 cmd/loki/loki-local-config.yaml $pkgdir/etc/loki/loki.yaml
+
+ # Promtail
+ install -Dm644 ${srcdir}/promtail.sysusers "$pkgdir/usr/lib/sysusers.d/promtail.conf"
+ install -Dm644 ${srcdir}/promtail.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/promtail.conf"
+ install -Dm644 ${srcdir}/promtail.service "$pkgdir/usr/lib/systemd/system/promtail.service"
+
+ # Loki
+ install -Dm644 ${srcdir}/loki.sysusers "$pkgdir/usr/lib/sysusers.d/loki.conf"
+ install -Dm644 ${srcdir}/loki.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/loki.conf"
+ install -Dm644 ${srcdir}/loki.service "$pkgdir/usr/lib/systemd/system/loki.service"
+}
Copied: loki/repos/community-x86_64/loki.service (from rev 660036, loki/trunk/loki.service)
===================================================================
--- community-x86_64/loki.service (rev 0)
+++ community-x86_64/loki.service 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1,27 @@
+[Unit]
+Description=Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/loki -boltdb.dir /var/lib/loki/index -local.chunk-directory /var/lib/loki/chunks -config.file /etc/loki/loki.yaml
+TimeoutStopSec=30s
+User=loki
+
+NoNewPrivileges=true
+MemoryDenyWriteExecute=true
+RestrictRealtime=true
+
+ProtectHome=true
+ProtectSystem=strict
+ReadWritePaths=/var/lib/loki
+PrivateTmp=true
+
+PrivateDevices=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+
+[Install]
+WantedBy=multi-user.target
Copied: loki/repos/community-x86_64/loki.sysusers (from rev 660036, loki/trunk/loki.sysusers)
===================================================================
--- community-x86_64/loki.sysusers (rev 0)
+++ community-x86_64/loki.sysusers 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1 @@
+u loki - "loki user" /var/lib/loki
Copied: loki/repos/community-x86_64/loki.tmpfiles (from rev 660036, loki/trunk/loki.tmpfiles)
===================================================================
--- community-x86_64/loki.tmpfiles (rev 0)
+++ community-x86_64/loki.tmpfiles 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1 @@
+d /var/lib/loki 0750 loki loki -
Copied: loki/repos/community-x86_64/promtail.service (from rev 660036, loki/trunk/promtail.service)
===================================================================
--- community-x86_64/promtail.service (rev 0)
+++ community-x86_64/promtail.service 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1,26 @@
+[Unit]
+Description=promtail is the agent responsible for gathering logs and sending them to Loki.
+Documentation=https://github.com/grafana/loki/blob/master/docs/promtail.md
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/promtail -positions.file /var/lib/promtail/positions.yml -config.file /etc/loki/promtail.yaml
+User=promtail
+TimeoutStopSec=30s
+
+NoNewPrivileges=true
+MemoryDenyWriteExecute=true
+RestrictRealtime=true
+
+ProtectHome=true
+ProtectSystem=strict
+ReadWritePaths=/var/lib/promtail
+PrivateTmp=true
+
+PrivateDevices=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectControlGroups=true
+
+[Install]
+WantedBy=multi-user.target
Copied: loki/repos/community-x86_64/promtail.sysusers (from rev 660037, loki/trunk/promtail.sysusers)
===================================================================
--- community-x86_64/promtail.sysusers (rev 0)
+++ community-x86_64/promtail.sysusers 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1,2 @@
+u promtail - "promtail user" /var/lib/promtail
+m promtail systemd-journal
Copied: loki/repos/community-x86_64/promtail.tmpfiles (from rev 660037, loki/trunk/promtail.tmpfiles)
===================================================================
--- community-x86_64/promtail.tmpfiles (rev 0)
+++ community-x86_64/promtail.tmpfiles 2020-07-07 18:13:52 UTC (rev 660038)
@@ -0,0 +1 @@
+d /var/lib/promtail 0750 promtail promtail -
More information about the arch-commits
mailing list