forked from pool/golang-github-prometheus-prometheus
Accepting request 848823 from home:STorresi:containers
- Update to upstream version 2.22.1 - Update packaging * Remove systemd and shadow hard requirements * Require the user from a dedicated 'system-user-prometheus' sibling package * Add 'prometheus' package alias OBS-URL: https://build.opensuse.org/request/show/848823 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=35
This commit is contained in:
parent
148a94cc9a
commit
1f0866e2bd
@ -1,7 +1,7 @@
|
||||
From 29211c2f5e1ed47715789aa75d755002cddeba02 Mon Sep 17 00:00:00 2001
|
||||
From 7953e106d8afa5ba660396c1c59bcc674ef3a404 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Fajerski <jfajerski@suse.com>
|
||||
Date: Fri, 8 Feb 2019 09:17:06 +0100
|
||||
Subject: [PATCH] Do not force the pure Go name resolver
|
||||
Subject: [PATCH 1/3] Do not force the pure Go name resolver
|
||||
|
||||
Revert to Go's default mechanism that will decide between the `netgo`
|
||||
pure-Go implementation and the `netcgo` cgo-based implementation depending
|
||||
@ -15,16 +15,18 @@ Signed-off-by: Jan Fajerski <jfajerski@suse.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.promu.yml b/.promu.yml
|
||||
index 0541bec..ad6cc78 100644
|
||||
index caaa63a55..f75af963d 100644
|
||||
--- a/.promu.yml
|
||||
+++ b/.promu.yml
|
||||
@@ -12,7 +12,7 @@ build:
|
||||
@@ -10,7 +10,7 @@ build:
|
||||
path: ./cmd/prometheus
|
||||
- name: promtool
|
||||
path: ./cmd/promtool
|
||||
- name: tsdb
|
||||
path: ./tsdb/cmd/tsdb
|
||||
- flags: -mod=vendor -a -tags netgo,builtinassets
|
||||
+ flags: -mod=vendor -a -tags builtinassets
|
||||
ldflags: |
|
||||
-X github.com/prometheus/common/version.Version={{.Version}}
|
||||
-X github.com/prometheus/common/version.Revision={{.Revision}}
|
||||
--
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 6b1180bc4cb98e20afa0db6e738f5790a0c982c7 Mon Sep 17 00:00:00 2001
|
||||
From 129223e15588c384c39b279213c81ba24e2f7ac9 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Fajerski <jfajerski@suse.com>
|
||||
Date: Fri, 8 Feb 2019 09:28:12 +0100
|
||||
Subject: [PATCH] Adjust default settings
|
||||
Subject: [PATCH 2/3] Default settings
|
||||
|
||||
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
|
||||
---
|
||||
@ -9,10 +9,10 @@ Signed-off-by: Jan Fajerski <jfajerski@suse.com>
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go
|
||||
index 2b70381..03af484 100644
|
||||
index fa6b6fa88..ac9f9dcfa 100644
|
||||
--- a/cmd/prometheus/main.go
|
||||
+++ b/cmd/prometheus/main.go
|
||||
@@ -143,7 +143,7 @@ func main() {
|
||||
@@ -147,7 +147,7 @@ func main() {
|
||||
a.HelpFlag.Short('h')
|
||||
|
||||
a.Flag("config.file", "Prometheus configuration file path.").
|
||||
@ -21,7 +21,7 @@ index 2b70381..03af484 100644
|
||||
|
||||
a.Flag("web.listen-address", "Address to listen on for UI, API, and telemetry.").
|
||||
Default("0.0.0.0:9090").StringVar(&cfg.web.ListenAddress)
|
||||
@@ -173,10 +173,10 @@ func main() {
|
||||
@@ -177,10 +177,10 @@ func main() {
|
||||
Default("false").BoolVar(&cfg.web.EnableAdminAPI)
|
||||
|
||||
a.Flag("web.console.templates", "Path to the console template directory, available at /consoles.").
|
||||
@ -34,7 +34,7 @@ index 2b70381..03af484 100644
|
||||
|
||||
a.Flag("web.page-title", "Document title of Prometheus instance.").
|
||||
Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
|
||||
@@ -185,7 +185,7 @@ func main() {
|
||||
@@ -189,7 +189,7 @@ func main() {
|
||||
Default(".*").StringVar(&cfg.corsRegexString)
|
||||
|
||||
a.Flag("storage.tsdb.path", "Base path for metrics storage.").
|
||||
@ -43,3 +43,6 @@ index 2b70381..03af484 100644
|
||||
|
||||
a.Flag("storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted. For use in testing.").
|
||||
Hidden().Default("2h").SetValue(&cfg.tsdb.MinBlockDuration)
|
||||
--
|
||||
2.29.2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
5
_service
5
_service
@ -3,8 +3,9 @@
|
||||
<param name="url">https://github.com/prometheus/prometheus.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="versionformat">2.18.0</param>
|
||||
<param name="revision">v2.18.0</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="revision">v2.22.1</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">prometheus-*.tar</param>
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 9 10:49:39 UTC 2020 - Stefano Torresi <stefano.torresi@suse.com>
|
||||
|
||||
- Update to upstream version 2.22.1
|
||||
- Update packaging
|
||||
* Remove systemd and shadow hard requirements
|
||||
* use systemd-sysusers to configure the user in a dedicated 'system-user-prometheus' subpackage
|
||||
* add 'prometheus' package alias
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 31 14:50:21 UTC 2020 - Witek Bedyk <witold.bedyk@suse.com>
|
||||
|
||||
|
@ -17,9 +17,6 @@
|
||||
#
|
||||
|
||||
|
||||
%global prometheus_user prometheus
|
||||
%global prometheus_group %{prometheus_user}
|
||||
|
||||
# Compatibility with systems older than Nov 2017
|
||||
# See https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
|
||||
%if ! %{defined _fillupdir}
|
||||
@ -29,14 +26,12 @@
|
||||
%define _sharedstatedir /var/lib
|
||||
%endif
|
||||
|
||||
%{go_nostrip}
|
||||
|
||||
Name: golang-github-prometheus-prometheus
|
||||
Version: 2.18.0
|
||||
Version: 2.22.1
|
||||
Release: 0
|
||||
Summary: The Prometheus monitoring system and time series database
|
||||
License: Apache-2.0
|
||||
Group: System/Management
|
||||
Group: System/Monitoring
|
||||
URL: https://prometheus.io/
|
||||
Source: prometheus-%{version}.tar.xz
|
||||
Source1: prometheus.service
|
||||
@ -54,12 +49,15 @@ BuildRequires: glibc-devel-static
|
||||
BuildRequires: golang-github-prometheus-promu
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: xz
|
||||
BuildRequires: golang(API) = 1.14
|
||||
BuildRequires: golang(API) >= 1.14
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
Requires(pre): shadow
|
||||
Requires(pre): user(prometheus)
|
||||
Requires(pre): group(prometheus)
|
||||
Requires(post): %fillup_prereq
|
||||
%{go_provides}
|
||||
Provides: prometheus = %{version}
|
||||
%systemd_ordering
|
||||
|
||||
%go_nostrip
|
||||
|
||||
%description
|
||||
Prometheus's main features are:
|
||||
@ -98,11 +96,10 @@ install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
|
||||
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/data
|
||||
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
|
||||
%gofilelist
|
||||
|
||||
%fdupes %{buildroot}/%{_prefix}
|
||||
|
||||
%pre
|
||||
getent group %{prometheus_group} >/dev/null || %{_sbindir}/groupadd -r %{prometheus_group}
|
||||
getent passwd %{prometheus_user} >/dev/null || %{_sbindir}/useradd -r -g %{prometheus_group} -d %{_localstatedir}/lib/prometheus -s /sbin/nologin %{prometheus_user}
|
||||
%service_add_pre prometheus.service
|
||||
|
||||
%post
|
||||
@ -128,9 +125,9 @@ getent passwd %{prometheus_user} >/dev/null || %{_sbindir}/useradd -r -g %{prome
|
||||
%{_sbindir}/rcprometheus
|
||||
%{_datarootdir}/prometheus
|
||||
%{_fillupdir}/sysconfig.prometheus
|
||||
%dir %attr(0700,%{prometheus_user},%{prometheus_group}) %{_sharedstatedir}/prometheus
|
||||
%dir %attr(0700,%{prometheus_user},%{prometheus_group}) %{_sharedstatedir}/prometheus/data
|
||||
%dir %attr(0700,%{prometheus_user},%{prometheus_group}) %{_sharedstatedir}/prometheus/metrics
|
||||
%dir %attr(0700,prometheus,prometheus) %{_sharedstatedir}/prometheus
|
||||
%dir %attr(0700,prometheus,prometheus) %{_sharedstatedir}/prometheus/data
|
||||
%dir %attr(0700,prometheus,prometheus) %{_sharedstatedir}/prometheus/metrics
|
||||
%dir %{_sysconfdir}/prometheus
|
||||
%config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b3bc45d847b2cddbf0d9afafdd8a20f74c5150a3d7d9951672669b64dc2b7de6
|
||||
size 12010376
|
3
prometheus-2.22.1.tar.xz
Normal file
3
prometheus-2.22.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:56fa74d4989d05e3585a784f44961aca9eaac9cbfc0cc07dbaaf797194bcb6e2
|
||||
size 12706560
|
Loading…
Reference in New Issue
Block a user