Accepting request 1146790 from server:monitoring
OBS-URL: https://build.opensuse.org/request/show/1146790 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/golang-github-prometheus-promu?expand=0&rev=18
This commit is contained in:
commit
4debce3db7
6
_service
6
_service
@ -1,5 +1,5 @@
|
|||||||
<services>
|
<services>
|
||||||
<service name="obs_scm" mode="disabled">
|
<service name="obs_scm" mode="manual">
|
||||||
<param name="url">https://github.com/prometheus/promu.git</param>
|
<param name="url">https://github.com/prometheus/promu.git</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="exclude">.git</param>
|
<param name="exclude">.git</param>
|
||||||
@ -13,10 +13,10 @@
|
|||||||
<param name="file">*.tar</param>
|
<param name="file">*.tar</param>
|
||||||
<param name="compression">gz</param>
|
<param name="compression">gz</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="set_version" mode="disabled">
|
<service name="set_version" mode="manual">
|
||||||
<param name="basename">promu</param>
|
<param name="basename">promu</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="go_modules" mode="disabled">
|
<service name="go_modules" mode="manual">
|
||||||
<param name="archive">promu-0.15.0.obscpio</param>
|
<param name="archive">promu-0.15.0.obscpio</param>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Feb 10 04:51:27 UTC 2024 - Jeff Kowalczyk <jkowalczyk@suse.com>
|
||||||
|
|
||||||
|
- Packaging improvements:
|
||||||
|
* _service change disabled to manual per osc deprecation warning:
|
||||||
|
WARNING: Command 'disabledrun/dr' is obsolete, please convert
|
||||||
|
your _service to use 'manual' and then 'manualrun/mr' instead.
|
||||||
|
* Define shortname corresponding to binary name when different
|
||||||
|
from package name. Use shortname where applicable to normalize
|
||||||
|
common lines across Go app packages, similar to name macro.
|
||||||
|
* Drop BuildRequires: golang-packaging. The original macros for
|
||||||
|
file movements into GOPATH are obsolete with Go modules. Macro
|
||||||
|
go_nostrip is no longer needed with current binutils and Go.
|
||||||
|
* Drop export CGO_ENABLED="0". Use the default unless there is a
|
||||||
|
defined requirement or benefit.
|
||||||
|
* Build PIE with pattern that may become recommended procedure:
|
||||||
|
%%ifnarch ppc64 GOFLAGS="-buildmode=pie" %%endif go build
|
||||||
|
A go toolchain buildmode default config would be preferable
|
||||||
|
but none exist at this time.
|
||||||
|
* Drop mod=vendor, go1.14+ will detect vendor dir and auto-enable
|
||||||
|
* Remove ldflags -X entries for upstream import path and version.
|
||||||
|
This information is embedded in binaries with go1.18+ and
|
||||||
|
available via go version -m or runtime/debug.ReadBuildInfo().
|
||||||
|
* Remove ldflags -s (Omit symbol table and debug info) and -w
|
||||||
|
(Omit DWARF symbol table). This information is used to produce
|
||||||
|
separate debuginfo packages and binaries are stripped for
|
||||||
|
reduced size by GNU strip during RPM build.
|
||||||
|
* Drop go build -o arg, default binary name is pkg of main()
|
||||||
|
* Add basic %check to execute binary --help
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 14 11:51:49 UTC 2023 - Andreas Schwab <schwab@suse.de>
|
Thu Dec 14 11:51:49 UTC 2023 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define shortname promu
|
||||||
|
|
||||||
Name: golang-github-prometheus-promu
|
Name: golang-github-prometheus-promu
|
||||||
Version: 0.15.0
|
Version: 0.15.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -23,20 +25,18 @@ Summary: Prometheus Utility Tool
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
URL: https://github.com/prometheus/promu
|
URL: https://github.com/prometheus/promu
|
||||||
Source: promu-%{version}.tar.gz
|
Source: %{shortname}-%{version}.tar.gz
|
||||||
Source1: vendor.tar.gz
|
Source1: vendor.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM Fix setting reproducible user and host during the build
|
# PATCH-FIX-UPSTREAM Fix setting reproducible user and host during the build
|
||||||
# https://github.com/prometheus/promu/pull/267
|
# https://github.com/prometheus/promu/pull/267
|
||||||
Patch1: 0001-do_not_discover_user_host_for_reproducible_builds.patch
|
Patch1: 0001-do_not_discover_user_host_for_reproducible_builds.patch
|
||||||
# PATCH-FIX-OPENSUSE Do not pass -static to external linker by default
|
# PATCH-FIX-OPENSUSE Do not pass -static to external linker by default
|
||||||
Patch2: extldflags-no-static.patch
|
Patch2: extldflags-no-static.patch
|
||||||
BuildRequires: golang-packaging
|
|
||||||
ExcludeArch: s390
|
ExcludeArch: s390
|
||||||
%{go_provides}
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
# Fix ERROR: No build ID note found in
|
# Fix ERROR: No build ID note found in
|
||||||
%undefine _missing_build_ids_terminate_build
|
%undefine _missing_build_ids_terminate_build
|
||||||
BuildRequires: golang >= 1.18
|
BuildRequires: golang >= 1.19
|
||||||
%else
|
%else
|
||||||
BuildRequires: golang(API) >= 1.19
|
BuildRequires: golang(API) >= 1.19
|
||||||
%endif
|
%endif
|
||||||
@ -45,24 +45,24 @@ BuildRequires: golang(API) >= 1.19
|
|||||||
The Prometheus Utility Tool is used by the Prometheus project to build other components.
|
The Prometheus Utility Tool is used by the Prometheus project to build other components.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -a1 -p1 -n promu-%{version}
|
%autosetup -a1 -p1 -n %{shortname}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{goprep} github.com/prometheus/promu
|
%ifnarch ppc64
|
||||||
export VERSION=%{version}
|
export GOFLAGS="-buildmode=pie"
|
||||||
export CGO_ENABLED=0
|
%endif
|
||||||
go build \
|
go build
|
||||||
-mod=vendor \
|
|
||||||
-buildmode=pie \
|
%check
|
||||||
-ldflags "-s -w -X main.version=$VERSION" \
|
# execute the binary as a basic check
|
||||||
-o promu ;
|
./%{shortname} --help
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -D -m 0755 promu "%{buildroot}/%{_bindir}/promu"
|
install -D -m 0755 %{shortname} "%{buildroot}/%{_bindir}/%{shortname}"
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/promu
|
%{_bindir}/%{shortname}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user