diff --git a/0001-do_not_discover_user_host_for_reproducible_builds.patch b/0001-do_not_discover_user_host_for_reproducible_builds.patch deleted file mode 100644 index fb57518..0000000 --- a/0001-do_not_discover_user_host_for_reproducible_builds.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: promu-0.15.0/cmd/build.go -=================================================================== ---- promu-0.15.0.orig/cmd/build.go -+++ promu-0.15.0/cmd/build.go -@@ -32,6 +32,10 @@ import ( - "github.com/prometheus/promu/util/sh" - ) - -+const ( -+ sourceDateEpoch = "SOURCE_DATE_EPOCH" -+) -+ - var ( - buildcmd = app.Command("build", "Build a Go project") - buildCgoFlagSet bool -@@ -155,7 +159,7 @@ func getLdflags(info repository.Info) st - tmplOutput = new(bytes.Buffer) - fnMap = template.FuncMap{ - "date": buildDate.UTC().Format, -- "host": os.Hostname, -+ "host": HostFunc, - "repoPath": RepoPathFunc, - "user": UserFunc, - } -@@ -191,13 +195,13 @@ func getLdflags(info repository.Info) st - func getBuildDate() time.Time { - var buildDate time.Time - -- sourceDate := os.Getenv("SOURCE_DATE_EPOCH") -+ sourceDate := os.Getenv(sourceDateEpoch) - if sourceDate == "" { - buildDate = time.Now() - } else { - unixBuildDate, err := strconv.ParseInt(sourceDate, 10, 64) - if err != nil { -- fatal(errors.Wrap(err, "Failed to parse SOURCE_DATE_EPOCH")) -+ fatal(errors.Wrap(err, "Failed to parse "+sourceDateEpoch)) - } else { - buildDate = time.Unix(unixBuildDate, 0) - } -@@ -205,10 +209,31 @@ func getBuildDate() time.Time { - return buildDate - } - -+func HostFunc() string { -+ if isReproducibleBuild() { -+ return "reproducible" -+ } else { -+ hostname, err := os.Hostname() -+ if err != nil { -+ return "unknown-host" -+ } else { -+ return hostname -+ } -+ } -+} -+ - // UserFunc returns the current username. - func UserFunc() (interface{}, error) { -- // os/user.Current() doesn't always work without CGO -- return shellOutput("whoami"), nil -+ if isReproducibleBuild() { -+ return "reproducible", nil -+ } else { -+ // os/user.Current() doesn't always work without CGO -+ return shellOutput("whoami"), nil -+ } -+} -+ -+func isReproducibleBuild() bool { -+ return os.Getenv(sourceDateEpoch) != "" - } - - // RepoPathFunc returns the repository path. diff --git a/_service b/_service index 3ed47d0..80bcee2 100644 --- a/_service +++ b/_service @@ -4,7 +4,7 @@ git .git @PARENT_TAG@ - v0.15.0 + v0.17.0 v(.*) enable @@ -17,6 +17,6 @@ promu - promu-0.15.0.obscpio + promu-0.17.0.obscpio diff --git a/_servicedata b/_servicedata index 683f9c2..ba1dad1 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/prometheus/promu.git - e1bab893555f728998f2bd404c4b7e66931bc760 \ No newline at end of file + 3912dec4ab83971903015cc7b2a8d8ff93b73910 \ No newline at end of file diff --git a/golang-github-prometheus-promu.changes b/golang-github-prometheus-promu.changes index e64d786..60c919e 100644 --- a/golang-github-prometheus-promu.changes +++ b/golang-github-prometheus-promu.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Sat Apr 20 11:43:43 UTC 2024 - opensuse_buildservice@ojkastl.de + +- Update to version 0.17.0: + * [FEATURE] Add codesign utility function #284 + +------------------------------------------------------------------- +Sat Apr 20 11:41:19 UTC 2024 - opensuse_buildservice@ojkastl.de + +- drop patch + 0001-do_not_discover_user_host_for_reproducible_builds.patch that + was merged upstream + (https://github.com/prometheus/promu/pull/267) +- BuildRequire go1.21 as upstream does +- Update to version 0.16.0: + * [FEATURE] Do not discover user/host for reproducible builds + #267 + * [BUGFIX] Fix example/prometheus build error #274 + ------------------------------------------------------------------- Sat Feb 10 04:51:27 UTC 2024 - Jeff Kowalczyk diff --git a/golang-github-prometheus-promu.spec b/golang-github-prometheus-promu.spec index ee951af..31f01c5 100644 --- a/golang-github-prometheus-promu.spec +++ b/golang-github-prometheus-promu.spec @@ -19,7 +19,7 @@ %define shortname promu Name: golang-github-prometheus-promu -Version: 0.15.0 +Version: 0.17.0 Release: 0 Summary: Prometheus Utility Tool License: Apache-2.0 @@ -27,18 +27,15 @@ Group: System/Management URL: https://github.com/prometheus/promu Source: %{shortname}-%{version}.tar.gz Source1: vendor.tar.gz -# PATCH-FIX-UPSTREAM Fix setting reproducible user and host during the build -# https://github.com/prometheus/promu/pull/267 -Patch1: 0001-do_not_discover_user_host_for_reproducible_builds.patch # PATCH-FIX-OPENSUSE Do not pass -static to external linker by default Patch2: extldflags-no-static.patch ExcludeArch: s390 %if 0%{?rhel} # Fix ERROR: No build ID note found in %undefine _missing_build_ids_terminate_build -BuildRequires: golang >= 1.19 +BuildRequires: golang >= 1.21 %else -BuildRequires: golang(API) >= 1.19 +BuildRequires: golang(API) >= 1.21 %endif %description diff --git a/promu-0.15.0.obscpio b/promu-0.15.0.obscpio deleted file mode 100644 index 0db0437..0000000 --- a/promu-0.15.0.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f960311ec016bac6dda7501c5f944449746b36525003ffe0b88213789c4f7d26 -size 125451 diff --git a/promu-0.17.0.obscpio b/promu-0.17.0.obscpio new file mode 100644 index 0000000..8247cdd --- /dev/null +++ b/promu-0.17.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35738387735146d914e4a8f64a81162af8d011cc02201cac0cc52b3c45469b96 +size 125963 diff --git a/promu.obsinfo b/promu.obsinfo index 38c2c01..34d6418 100644 --- a/promu.obsinfo +++ b/promu.obsinfo @@ -1,4 +1,4 @@ name: promu -version: 0.15.0 -mtime: 1688456354 -commit: e1bab893555f728998f2bd404c4b7e66931bc760 +version: 0.17.0 +mtime: 1713609107 +commit: 3912dec4ab83971903015cc7b2a8d8ff93b73910 diff --git a/vendor.tar.gz b/vendor.tar.gz index 183e3c1..77971e6 100644 --- a/vendor.tar.gz +++ b/vendor.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d01b7ba3c525d28e851655e78029a2cd3d89079995765a66ee3a3559c93fa9d4 -size 1961604 +oid sha256:b7e538af72ac2a90d672b0e825ea2fd77a4670a1c8c5088f3c641e0dca25f4d8 +size 283679