Accepting request 821110 from home:jfkw:branches:devel:languages:go
- Ensure 'Provides: golang(API) = %{api_version}' is consistent to improve package resolution for common go dependency expressions 'BuildRequires: golang(API) >= 1.x' and BuildRequires: go >= 1.x OBS projects that contain go code often have prjconf entries 'Prefer: go' which selects go metapackage over go1.x packages. When go metapackage Provides: version is lower than go1.x versions, 'Prefer: go' is not effective and build failures occur with errors unresolvable: have choice for golang(API) >= 1.13: go1.13 go1.14 Edits and changelog Jeff Kowalczyk <jkowalczyk@suse.com> Refs boo#1172608 * Unify '{version'} and '{short_version}' as '{api_version}' for 'Provides: golang(API) = %{api_version}' * Use both 'BuildRequires: go%{api_version}' and 'Requires: go%{api_version}' to trigger build errors if go1.x is unavailable * Add aarch64 to supported systems for go-race via %define tsan_arch x86_64 aarch64 * Add tsan_arch x86_64 aarch64 for suse_version >= 1500 and sle_version >= 150000, formerly conditional on suse_version >= 1315 * Ensure %ifarch %{tsan_arch} always evaluates (nil does not work) via dummy tsan_arch on systems where go-race is not supported OBS-URL: https://build.opensuse.org/request/show/821110 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=329
This commit is contained in:
parent
417d2b3ac6
commit
e6e2df1dc0
24
go.changes
24
go.changes
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 6 09:45:55 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Ensure 'Provides: golang(API) = %{api_version}' is consistent
|
||||
to improve package resolution for common go dependency expressions
|
||||
'BuildRequires: golang(API) >= 1.x' and BuildRequires: go >= 1.x
|
||||
OBS projects that contain go code often have prjconf entries
|
||||
'Prefer: go' which selects go metapackage over go1.x packages.
|
||||
When go metapackage Provides: version is lower than go1.x versions,
|
||||
'Prefer: go' is not effective and build failures occur with errors
|
||||
unresolvable: have choice for golang(API) >= 1.13: go1.13 go1.14
|
||||
Edits and changelog Jeff Kowalczyk <jkowalczyk@suse.com>
|
||||
Refs boo#1172608
|
||||
* Unify '{version'} and '{short_version}' as '{api_version}' for
|
||||
'Provides: golang(API) = %{api_version}'
|
||||
* Use both 'BuildRequires: go%{api_version}' and 'Requires: go%{api_version}'
|
||||
to trigger build errors if go1.x is unavailable
|
||||
* Add aarch64 to supported systems for go-race via
|
||||
%define tsan_arch x86_64 aarch64
|
||||
* Add tsan_arch x86_64 aarch64 for suse_version >= 1500 and
|
||||
sle_version >= 150000, formerly conditional on suse_version >= 1315
|
||||
* Ensure %ifarch %{tsan_arch} always evaluates (nil does not work)
|
||||
via dummy tsan_arch on systems where go-race is not supported
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 17 03:00:35 UTC 2020 - Jeff Kowalczyk <jkowalczyk@suse.com>
|
||||
|
||||
|
31
go.spec
31
go.spec
@ -16,19 +16,21 @@
|
||||
#
|
||||
# nodebuginfo
|
||||
|
||||
# By default we don't include tsan. It's only supported on amd64.
|
||||
%define tsan_arch x86_64
|
||||
|
||||
%if 0%{?suse_version} >= 1315
|
||||
%define short_version 1.14
|
||||
# NOTE: This logic must come from the latest go1.x package specfile.
|
||||
# We only build go-race on supported systems.
|
||||
%if 0%{suse_version} >= 1500 || 0%{?sle_version} >= 150000
|
||||
%define tsan_arch x86_64 aarch64
|
||||
%else
|
||||
%define short_version 1.11
|
||||
# Cannot use {nil} here (ifarch doesn't like it) so just make up a fake
|
||||
# architecture that no build will ever match.
|
||||
%define tsan_arch openSUSE_FAKE_ARCH
|
||||
%endif
|
||||
|
||||
Name: go
|
||||
Version: 1.14
|
||||
# Version must always be a valid golang(API) version
|
||||
%define api_version %{version}
|
||||
Release: 0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Summary: A compiled, garbage-collected, concurrent programming language
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Other
|
||||
@ -38,8 +40,11 @@ Recommends: go-doc = %{version}
|
||||
ExclusiveArch: %ix86 x86_64 %arm aarch64 ppc64 ppc64le s390x
|
||||
# We provide golang(API) so that projects can Prefer: go. Any project using Go
|
||||
# code with golang(API) BuildRequires should add Prefer: go.
|
||||
Provides: golang(API) = %{short_version}
|
||||
Requires: go%{short_version}
|
||||
Provides: golang(API) = %{api_version}
|
||||
# Make this both Requires and BuildRequires go1.x so that we get build errors
|
||||
# if it is missing.
|
||||
BuildRequires: go%{api_version}
|
||||
Requires: go%{api_version}
|
||||
|
||||
%description
|
||||
Go is an expressive, concurrent, garbage collected systems programming language
|
||||
@ -53,7 +58,8 @@ Summary: Go documentation
|
||||
License: BSD-3-Clause
|
||||
Group: Documentation/Other
|
||||
Requires: go = %{version}
|
||||
Requires: go%{short_version}-doc
|
||||
Supplements: go = %{version}
|
||||
Requires: go%{api_version}-doc
|
||||
|
||||
%description doc
|
||||
Go examples and documentation.
|
||||
@ -68,7 +74,10 @@ Url: https://compiler-rt.llvm.org/
|
||||
Requires: go = %{version}
|
||||
Supplements: go = %{version}
|
||||
ExclusiveArch: %{tsan_arch}
|
||||
Requires: go%{short_version}-race
|
||||
# Make this both Requires and BuildRequires go1.x-race so that we get build
|
||||
# errors if it is missing.
|
||||
BuildRequires: go%{api_version}-race
|
||||
Requires: go%{api_version}-race
|
||||
|
||||
%description race
|
||||
Go runtime race detector libraries. Install this package if you wish to use the
|
||||
|
Loading…
Reference in New Issue
Block a user