Accepting request 1057808 from home:ojkastl_buildservice:Prometheus_Grafana_SLES15
- Update to version 0.14.0: * Add the ability to override tags per GOOS * Remove ioutil * Update common Prometheus files (#232) (#224) * Validate environment variable value * Set build date from SOURCE_DATE_EPOCH - drop patch 0001-Set-build-date-from-SOURCE_DATE_EPOCH.patch that is included upstream now OBS-URL: https://build.opensuse.org/request/show/1057808 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-promu?expand=0&rev=26
This commit is contained in:
parent
a53a41d945
commit
e5ff7d8fe0
@ -1,53 +0,0 @@
|
|||||||
From 2098a5128565a72fc1886e996a444cc111e43c36 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Witek Bedyk <witold.bedyk@suse.com>
|
|
||||||
Date: Tue, 26 Apr 2022 17:21:46 +0200
|
|
||||||
Subject: [PATCH] Set build date from SOURCE_DATE_EPOCH
|
|
||||||
|
|
||||||
Allow to override build date with SOURCE_DATE_EPOCH
|
|
||||||
in order to make builds reproducible.
|
|
||||||
See https://reproducible-builds.org/ for why this is good
|
|
||||||
and https://reproducible-builds.org/specs/source-date-epoch/
|
|
||||||
for the definition of this variable.
|
|
||||||
|
|
||||||
This PR was done while working on [reproducible builds for
|
|
||||||
openSUSE](https://en.opensuse.org/openSUSE:Reproducible_Builds).
|
|
||||||
|
|
||||||
Signed-off-by: Witek Bedyk <witold.bedyk@suse.com>
|
|
||||||
---
|
|
||||||
cmd/build.go | 10 +++++++++-
|
|
||||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cmd/build.go b/cmd/build.go
|
|
||||||
index 18f1c5e..694b964 100644
|
|
||||||
--- a/cmd/build.go
|
|
||||||
+++ b/cmd/build.go
|
|
||||||
@@ -20,6 +20,7 @@ import (
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"path"
|
|
||||||
+ "strconv"
|
|
||||||
"strings"
|
|
||||||
"text/template"
|
|
||||||
"time"
|
|
||||||
@@ -146,10 +147,17 @@ func getLdflags(info repository.Info) string {
|
|
||||||
var ldflags []string
|
|
||||||
|
|
||||||
if len(strings.TrimSpace(config.Build.LDFlags)) > 0 {
|
|
||||||
+ var buildDate time.Time
|
|
||||||
+ unixBuildDate, err := strconv.ParseInt(os.Getenv("SOURCE_DATE_EPOCH"), 10, 64)
|
|
||||||
+ if err == nil {
|
|
||||||
+ buildDate = time.Unix(unixBuildDate, 0)
|
|
||||||
+ } else {
|
|
||||||
+ buildDate = time.Now()
|
|
||||||
+ }
|
|
||||||
var (
|
|
||||||
tmplOutput = new(bytes.Buffer)
|
|
||||||
fnMap = template.FuncMap{
|
|
||||||
- "date": time.Now().UTC().Format,
|
|
||||||
+ "date": buildDate.UTC().Format,
|
|
||||||
"host": os.Hostname,
|
|
||||||
"repoPath": RepoPathFunc,
|
|
||||||
"user": UserFunc,
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
4
_service
4
_service
@ -4,7 +4,7 @@
|
|||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="exclude">.git</param>
|
<param name="exclude">.git</param>
|
||||||
<param name="versionformat">@PARENT_TAG@</param>
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
<param name="revision">v0.13.0</param>
|
<param name="revision">v0.14.0</param>
|
||||||
<param name="versionrewrite-pattern">v(.*)</param>
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
<param name="changesgenerate">enable</param>
|
<param name="changesgenerate">enable</param>
|
||||||
</service>
|
</service>
|
||||||
@ -16,6 +16,6 @@
|
|||||||
<param name="basename">promu</param>
|
<param name="basename">promu</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="go_modules" mode="disabled">
|
<service name="go_modules" mode="disabled">
|
||||||
<param name="archive">promu-0.13.0.tar.gz</param>
|
<param name="archive">promu-0.14.0.tar.gz</param>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">https://github.com/prometheus/promu.git</param>
|
<param name="url">https://github.com/prometheus/promu.git</param>
|
||||||
<param name="changesrevision">b1a2edae78614c8b0ae9e2faa88d14098e96f6d2</param></service></servicedata>
|
<param name="changesrevision">a880d9756ae466605040585bc3b15005b55cc9f6</param></service></servicedata>
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 10 16:18:52 UTC 2023 - kastl@b1-systems.de
|
||||||
|
|
||||||
|
- Update to version 0.14.0:
|
||||||
|
* Add the ability to override tags per GOOS
|
||||||
|
* Remove ioutil
|
||||||
|
* Update common Prometheus files (#232) (#224)
|
||||||
|
* Validate environment variable value
|
||||||
|
* Set build date from SOURCE_DATE_EPOCH
|
||||||
|
- drop patch 0001-Set-build-date-from-SOURCE_DATE_EPOCH.patch that is
|
||||||
|
included upstream now
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 31 14:17:46 UTC 2022 - Witek Bedyk <witold.bedyk@suse.com>
|
Mon Oct 31 14:17:46 UTC 2022 - Witek Bedyk <witold.bedyk@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package golang-github-prometheus-promu
|
# spec file for package golang-github-prometheus-promu
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: golang-github-prometheus-promu
|
Name: golang-github-prometheus-promu
|
||||||
Version: 0.13.0
|
Version: 0.14.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Prometheus Utility Tool
|
Summary: Prometheus Utility Tool
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@ -25,7 +25,6 @@ Group: System/Management
|
|||||||
URL: https://github.com/prometheus/promu
|
URL: https://github.com/prometheus/promu
|
||||||
Source: promu-%{version}.tar.gz
|
Source: promu-%{version}.tar.gz
|
||||||
Source1: vendor.tar.gz
|
Source1: vendor.tar.gz
|
||||||
Patch1: 0001-Set-build-date-from-SOURCE_DATE_EPOCH.patch
|
|
||||||
BuildRequires: golang-packaging
|
BuildRequires: golang-packaging
|
||||||
ExcludeArch: s390
|
ExcludeArch: s390
|
||||||
%{go_provides}
|
%{go_provides}
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1e519b56eebb90c5665f92174f2edeb01d99ea41717e343de4e6ff1cbcd49595
|
|
||||||
size 46851
|
|
3
promu-0.14.0.tar.gz
Normal file
3
promu-0.14.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e98bfe046101b2b1f2faf2e641f20bbadf5d4eb0780c2d637b56fc5472202fa7
|
||||||
|
size 47594
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:043f72452ac106081e9afe59aea4d2f4e84ae841b7663604dae426b36c2037e4
|
oid sha256:b4ee082451f0f1f63019f7891ba6f58f54c7c3815c057e2b26f50792fb5f71d7
|
||||||
size 1776289
|
size 2236774
|
||||||
|
Loading…
x
Reference in New Issue
Block a user