From 105194a442c8450f0e073f240e0878702ddf3139 Mon Sep 17 00:00:00 2001
From: ecsos <>
Date: Dec 16 2021 01:08:41 +0000
Subject: Update loki to version 2.4.1+git.1636374074.f61a4d261 / rev 6 via SR 940654
https://build.opensuse.org/request/show/940654
by user ecsos + dimstar_suse
---
diff --git a/.files b/.files
index 57acdc7..d05af9f 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index 1b2a43a..aa06985 100644
--- a/.rev
+++ b/.rev
@@ -40,4 +40,12 @@
928144
+
+ 9ee60e40509e38a865b2acba49fc6e61
+ 2.4.1+git.1636374074.f61a4d261
+
+ dimstar_suse
+
+ 940654
+
diff --git a/.servicemark b/.servicemark
index ac14468..3365118 100644
--- a/.servicemark
+++ b/.servicemark
@@ -1 +1 @@
-e63028dfabedf411546cb45322676480
+98ce990e504d7ccf94e079deb1e9ffc2
diff --git a/_service b/_service
index 81b1e8b..0393a29 100644
--- a/_service
+++ b/_service
@@ -5,8 +5,9 @@
.git
loki
@PARENT_TAG@+git.%ct.%h
- v2.2.1
+ v2.4.1
v(.*)
+ enable
loki*.tar
diff --git a/_servicedata b/_servicedata
new file mode 100644
index 0000000..d19a183
--- /dev/null
+++ b/_servicedata
@@ -0,0 +1,4 @@
+
+
+ git://github.com/grafana/loki.git
+ f61a4d2612d8fa3a385c90c363301ec05bab34d8
\ No newline at end of file
diff --git a/loki-2.2.1+git.1617669398.babea82e.tar.bz2 b/loki-2.2.1+git.1617669398.babea82e.tar.bz2
deleted file mode 120000
index 30307e7..0000000
--- a/loki-2.2.1+git.1617669398.babea82e.tar.bz2
+++ /dev/null
@@ -1 +0,0 @@
-/ipfs/bafybeihk2bialjsdfj2axhvgpwkxbr7qa36jy3aej3q2lltm334j5ijuva
\ No newline at end of file
diff --git a/loki-2.4.1+git.1636374074.f61a4d261.tar.bz2 b/loki-2.4.1+git.1636374074.f61a4d261.tar.bz2
new file mode 120000
index 0000000..4c66d68
--- /dev/null
+++ b/loki-2.4.1+git.1636374074.f61a4d261.tar.bz2
@@ -0,0 +1 @@
+/ipfs/bafybeibqcbgtf3d7ovv5v4qnyaubrowzoxgswkieh26qh4x6fcxyi24xnq
\ No newline at end of file
diff --git a/loki.changes b/loki.changes
index 2706a02..65b29e5 100644
--- a/loki.changes
+++ b/loki.changes
@@ -1,4 +1,31 @@
-------------------------------------------------------------------
+Mon Dec 13 20:15:36 UTC 2021 - ecsos
+
+- Change user in promtail.service from loki to root.
+ Without run as root promtail can not tail logfiles.
+
+-------------------------------------------------------------------
+Mon Dec 13 13:56:26 UTC 2021 - ecsos@opensuse.org
+
+- Update to version 2.4.1+git.1636374074.f61a4d261:
+ * fix flaky retention tests (#4697) (#4698)
+ * Project: Loki 2.4.1 release notes (#4688) (#4692)
+ * Adds replication_factor doc to common config (#4683) (#4691)
+ * overrides checks for nil tenant limits on AllByUserID (#4687) (#4690)
+ * Loki: check new Read target when initializing boltdb-shipper store (#4681) (#4689)
+ * remove my text to test PR push (#4678)
+ * testing docs publish
+ * change branch publish pr runs on
+ * Docs: revise v2.4 release notes (#4675) (#4676)
+ * update references to new 2.4.0 image (#4672) (#4673)
+
+-------------------------------------------------------------------
+Sun Dec 12 23:32:48 UTC 2021 - Robert Munteanu
+
+- Move the logcli tool in a separate package, to allow users to install it
+ without pulling in the full loki package
+
+-------------------------------------------------------------------
Wed Oct 6 06:11:13 UTC 2021 - Johannes Segitz
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
diff --git a/loki.spec b/loki.spec
index 9a07c01..c436e71 100644
--- a/loki.spec
+++ b/loki.spec
@@ -17,9 +17,9 @@
Name: loki
-Version: 2.2.1+git.1617669398.babea82e
+Version: 2.4.1+git.1636374074.f61a4d261
Release: 0
-Summary: Loki: like Prometheus, but for logs.
+Summary: Loki: like Prometheus, but for logs
License: Apache-2.0
Group: System/Monitoring
URL: https://grafana.com/loki
@@ -28,11 +28,12 @@ Source1: loki.service
Source2: promtail.service
Source3: sysconfig.loki
Source4: sysconfig.promtail
-Patch0: harden_promtail.service.patch
+Patch0: harden_promtail.service.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: golang-packaging
BuildRequires: systemd-devel
BuildRequires: golang(API) >= 1.15
+Requires: logcli = %{version}
Requires: group(loki)
Requires: user(loki)
Requires(post): %fillup_prereq
@@ -48,14 +49,21 @@ This package contains the Loki server
%package -n promtail
Summary: Promtail Client
Group: System/Monitoring
-Requires: group(loki)
-Requires: user(loki)
%description -n promtail
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus.
This package contains the Promtail client.
+%package -n logcli
+Summary: LogCLI tool
+Group: System/Monitoring
+
+%description -n logcli
+Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus.
+
+This package contains the LogCLI command-line tool.
+
%prep
%setup -q %{name}-%{version}
%patch0 -p1
@@ -72,7 +80,7 @@ export GOLDFLAGS="-s -w -X %{buildpkg}.Version=%{version} \
go build -ldflags="$GOLDFLAGS" ./cmd/loki
go build -ldflags="$GOLDFLAGS" ./cmd/logcli
-CGO_ENABLED=1 go build -ldflags="$GOLDFLAGS" ./cmd/promtail
+CGO_ENABLED=1 go build -ldflags="$GOLDFLAGS" ./clients/cmd/promtail
%install
@@ -88,7 +96,7 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcpromtail
# Config files
install -Dm644 cmd/loki/loki-local-config.yaml \
%{buildroot}%{_sysconfdir}/loki/loki.yaml
-install -Dm644 cmd/promtail/promtail-local-config.yaml \
+install -Dm644 clients/cmd/promtail/promtail-local-config.yaml \
%{buildroot}%{_sysconfdir}/loki/promtail.yaml
# Binaries
@@ -129,7 +137,6 @@ install -Dm755 logcli %{buildroot}%{_bindir}
%{_unitdir}/loki.service
%{_fillupdir}/sysconfig.loki
%{_bindir}/loki
-%{_bindir}/logcli
%dir %{_sysconfdir}/loki
%config(noreplace) %{_sysconfdir}/loki/loki.yaml
%{_sbindir}/rcloki
@@ -141,4 +148,7 @@ install -Dm755 logcli %{buildroot}%{_bindir}
%config(noreplace) %{_sysconfdir}/loki/promtail.yaml
%{_sbindir}/rcpromtail
+%files -n logcli
+%{_bindir}/logcli
+
%changelog
diff --git a/promtail.service b/promtail.service
index f17b98b..a41723d 100644
--- a/promtail.service
+++ b/promtail.service
@@ -16,7 +16,7 @@ ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Restart=always
-User=loki
+User=root
EnvironmentFile=-/etc/sysconfig/promtail
ExecStart=/usr/bin/promtail -config.file=${CONFIG_FILE}
ExecReload=/bin/kill -HUP $MAINPID