Fix leap-16.0 build error #3
20
_service
20
_service
@@ -1,19 +1,23 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="manual">
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="url">https://github.com/grafana/loki.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="filename">loki</param>
|
||||
<param name="versionformat">@PARENT_TAG@+git.%ct.%h</param>
|
||||
<param name="revision">v2.8.11</param>
|
||||
<!-- use this pattern for snapshots
|
||||
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.%h</param>
|
||||
-->
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="revision">v3.5.3</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
<param name="submodules">disable</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="recompress" mode="manual">
|
||||
<service name="set_version" mode="manual">
|
||||
</service>
|
||||
<service name="tar" mode="buildtime">
|
||||
</service>
|
||||
<service name="recompress" mode="buildtime">
|
||||
<param name="file">loki*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual">
|
||||
<param name="basename">loki</param>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
<param name="url">git://github.com/grafana/loki.git</param>
|
||||
<param name="changesrevision">525040a3265715ca8cfb52cd39108ccfac9f8af6</param></service><service name="tar_scm">
|
||||
<param name="url">https://github.com/grafana/loki.git</param>
|
||||
<param name="changesrevision">aa89d817a7c5f253ab5641f5af3100300bc06897</param></service></servicedata>
|
||||
<param name="changesrevision">af52a690ce73867bbf9cecbf2d279c578aa99d2d</param></service></servicedata>
|
||||
@@ -1,23 +0,0 @@
|
||||
Index: loki-2.5.0+git.1649366683.2d9d0ee23/docs/sources/clients/aws/ec2/promtail.service
|
||||
===================================================================
|
||||
--- loki-2.5.0+git.1649366683.2d9d0ee23.orig/docs/sources/clients/aws/ec2/promtail.service
|
||||
+++ loki-2.5.0+git.1649366683.2d9d0ee23/docs/sources/clients/aws/ec2/promtail.service
|
||||
@@ -1,6 +1,18 @@
|
||||
[Unit]
|
||||
Description=Promtail
|
||||
[Service]
|
||||
+# added automatically, for details please see
|
||||
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||
+ProtectSystem=full
|
||||
+ProtectHome=true
|
||||
+PrivateDevices=true
|
||||
+ProtectHostname=true
|
||||
+ProtectClock=true
|
||||
+ProtectKernelTunables=true
|
||||
+ProtectKernelModules=true
|
||||
+ProtectControlGroups=true
|
||||
+RestrictRealtime=true
|
||||
+# end of automatic additions
|
||||
User=root
|
||||
WorkingDirectory=/opt/promtail/
|
||||
ExecStartPre=/bin/sleep 30
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0f83f881a668d07b758ed01bf15b1dc934ba4788d4781deb64441adcce1589ea
|
||||
size 28488640
|
||||
3
loki-3.5.3.obscpio
Normal file
3
loki-3.5.3.obscpio
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f496c201b6c8e821c473ae7522c278ee30aa8793e1570ab5e3295d0eeba80538
|
||||
size 509494286
|
||||
1857
loki.changes
1857
loki.changes
File diff suppressed because it is too large
Load Diff
4
loki.obsinfo
Normal file
4
loki.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
||||
name: loki
|
||||
version: 3.5.3
|
||||
mtime: 1752701740
|
||||
commit: af52a690ce73867bbf9cecbf2d279c578aa99d2d
|
||||
59
loki.spec
59
loki.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package loki
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -21,7 +21,7 @@
|
||||
%global promtail_datadir /var/lib/promtail
|
||||
|
||||
Name: loki
|
||||
Version: 2.8.11+git.1711098663.aa89d817
|
||||
Version: 3.5.3
|
||||
Release: 0
|
||||
Summary: Loki: like Prometheus, but for logs
|
||||
License: Apache-2.0
|
||||
@@ -33,31 +33,32 @@ Source2: promtail.service
|
||||
Source3: sysconfig.loki
|
||||
Source4: sysconfig.promtail
|
||||
Source99: series
|
||||
Patch0: harden_promtail.service.patch
|
||||
Patch1: proper-data-directories.patch
|
||||
Patch0: proper-data-directories.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: golang(API) = 1.20
|
||||
BuildRequires: golang(API) = 1.24
|
||||
Requires: logcli = %{version}
|
||||
Requires(pre): group(loki)
|
||||
Requires(pre): user(loki)
|
||||
Requires: group(loki)
|
||||
Requires: user(loki)
|
||||
Requires(post): %fillup_prereq
|
||||
%systemd_ordering
|
||||
|
||||
###%%{go_nostrip}
|
||||
|
||||
%description
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus.
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation
|
||||
system inspired by Prometheus.
|
||||
|
||||
This package contains the Loki server
|
||||
This package contains the Loki server.
|
||||
|
||||
%package -n promtail
|
||||
Summary: Promtail Client
|
||||
Group: System/Monitoring
|
||||
|
||||
%description -n promtail
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus.
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation
|
||||
system inspired by Prometheus.
|
||||
|
||||
This package contains the Promtail client.
|
||||
|
||||
@@ -66,25 +67,45 @@ Summary: LogCLI tool
|
||||
Group: System/Monitoring
|
||||
|
||||
%description -n logcli
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus.
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation
|
||||
system inspired by Prometheus.
|
||||
|
||||
This package contains the LogCLI command-line tool.
|
||||
|
||||
%package -n lokitool
|
||||
Summary: A command-line tool to manage Loki
|
||||
Group: System/Monitoring
|
||||
|
||||
%description -n lokitool
|
||||
Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation
|
||||
system inspired by Prometheus.
|
||||
|
||||
This package contains the lokitool command-line tool.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 %{name}-%{version}
|
||||
|
||||
%build
|
||||
%define buildpkg github.com/grafana/loki/pkg/build
|
||||
export CGO_ENABLED=0
|
||||
DATE_FMT="+%%Y-%%m-%%dT%%H:%%M:%%SZ"
|
||||
BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}")
|
||||
|
||||
%ifarch %{ix86} s390 s390x armv7l armv7hl armv7l:armv6l:armv5tel riscv64
|
||||
export CGO_ENABLED=1
|
||||
%else
|
||||
export CGO_ENABLED=0
|
||||
%endif
|
||||
|
||||
export GOFLAGS="-mod=vendor -buildmode=pie -tags=netgo"
|
||||
export GOLDFLAGS="-s -w -X %{buildpkg}.Version=%{version} \
|
||||
-X %{buildpkg}.Revision=%{release} \
|
||||
-X %{buildpkg}.Branch=NA \
|
||||
-X %{buildpkg}.BuildUser=NA \
|
||||
-X %{buildpkg}.BuildDate=NA"
|
||||
export GOLDFLAGS="-X %{buildpkg}.Version=%{version} \
|
||||
-X %{buildpkg}.Revision=v%{version} \
|
||||
-X %{buildpkg}.Branch=main \
|
||||
-X %{buildpkg}.BuildUser=openSUSE \
|
||||
-X %{buildpkg}.BuildDate=${BUILD_DATE}"
|
||||
|
||||
go build -ldflags="$GOLDFLAGS" ./cmd/loki
|
||||
go build -ldflags="$GOLDFLAGS" ./cmd/logcli
|
||||
go build -ldflags="$GOLDFLAGS" ./cmd/lokitool
|
||||
CGO_ENABLED=1 go build -ldflags="$GOLDFLAGS" --tags=promtail_journal_enabled ./clients/cmd/promtail
|
||||
|
||||
%install
|
||||
@@ -107,6 +128,7 @@ install -Dm640 clients/cmd/promtail/promtail-local-config.yaml \
|
||||
# Binaries
|
||||
install -dm755 %{buildroot}%{_bindir}
|
||||
install -Dm755 loki %{buildroot}%{_bindir}
|
||||
install -Dm755 lokitool %{buildroot}%{_bindir}
|
||||
install -Dm755 promtail %{buildroot}%{_bindir}
|
||||
install -Dm755 logcli %{buildroot}%{_bindir}
|
||||
|
||||
@@ -162,4 +184,7 @@ install -D -d -m 0750 %{buildroot}%{promtail_datadir} %{buildroot}%{loki_datadir
|
||||
%files -n logcli
|
||||
%{_bindir}/logcli
|
||||
|
||||
%files -n lokitool
|
||||
%{_bindir}/lokitool
|
||||
|
||||
%changelog
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user