Accepting request 1094108 from home:jfkw:branches:devel:languages:go

- Add BuildRequires: golang(API) >= 1.16 (min version per go.mod)
  This or metapackage BuildRequires: go are recommended to pull in
  the Go toolchain.
- Drop Requires: 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.
- Remove manual call to strip the binary. Go binaries are stripped
  automatically in the default configuration.
  Refs boo#1210938
  * GNU strip circa 2016 would incorrectly strip Go intermediate
    step .a binaries (which are not .a ar archives) and write out
    an invalid binary instead of erroring on unrecognized format.
  * Error manifested in Go applications as fmt.a: go archive is
    missing __.PKGDEF on OBS built Go binaries which had passed
    their binary build step but fail at debuginfo creation step
    (which involves binary stripping).
  * The primary use of Go intermediate step .a binaries was for a
    precompiled standard library cache. The .a files comprised
    large fraction of the on-disk >=go1.19 toolchain package size.
  * go1.20+ now use the normal Go build cache for the Go standard
    library. Go intermediate step .a archives are no longer part of
    the regular build process and not affected by GNU strip
    misidentifying them as ar archives.
    https://go.dev/doc/go1.20#go-command
- Use _service mode manual as better alias name than disabled

OBS-URL: https://build.opensuse.org/request/show/1094108
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/tpm-fido?expand=0&rev=2
This commit is contained in:
Jeff Kowalczyk 2023-06-20 15:10:32 +00:00 committed by Git OBS Bridge
parent c5eaccb96f
commit 7ee382e87c
3 changed files with 34 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<services>
<service name="obs_scm" mode="disabled">
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/psanford/tpm-fido</param>
<param name="revision">main</param>
<param name="versionformat">%cd.%h</param>
@ -7,13 +7,13 @@
<param name="changesgenerate">enable</param>
<param name="changesauthor">dheidler@suse.de</param>
</service>
<service name="set_version" mode="disabled" />
<service name="set_version" mode="manual" />
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="compression">gz</param>
<param name="file">*.tar</param>
</service>
<service name="go_modules" mode="disabled">
<service name="go_modules" mode="manual">
<param name="compression">zstd</param>
</service>
</services>

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Tue Jun 20 01:51:03 UTC 2023 - Jeff Kowalczyk <jkowalczyk@suse.com>
- Add BuildRequires: golang(API) >= 1.16 (min version per go.mod)
This or metapackage BuildRequires: go are recommended to pull in
the Go toolchain.
- Drop Requires: 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.
- Remove manual call to strip the binary. Go binaries are stripped
automatically in the default configuration.
Refs boo#1210938
* GNU strip circa 2016 would incorrectly strip Go intermediate
step .a binaries (which are not .a ar archives) and write out
an invalid binary instead of erroring on unrecognized format.
* Error manifested in Go applications as fmt.a: go archive is
missing __.PKGDEF on OBS built Go binaries which had passed
their binary build step but fail at debuginfo creation step
(which involves binary stripping).
* The primary use of Go intermediate step .a binaries was for a
precompiled standard library cache. The .a files comprised
large fraction of the on-disk >=go1.19 toolchain package size.
* go1.20+ now use the normal Go build cache for the Go standard
library. Go intermediate step .a archives are no longer part of
the regular build process and not affected by GNU strip
misidentifying them as ar archives.
https://go.dev/doc/go1.20#go-command
- Use _service mode manual as better alias name than disabled
-------------------------------------------------------------------
Mon Jun 19 12:59:56 UTC 2023 - Dominik Heidler <dheidler@suse.de>

View File

@ -15,7 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Prepare sources and vendor bundle with: osc service dr
# Prepare sources and vendor bundle with: osc service mr
Name: tpm-fido
Version: 20220926.cd117ce
@ -27,7 +27,7 @@ Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.zstd
Source2: tpm-fido.rules
Source3: tpm-fido.service
BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.16
BuildRequires: zstd
Requires: pinentry-gui
Provides: tpm2-fido
@ -42,7 +42,6 @@ tpm-fido is FIDO token implementation for Linux that protects the token keys by
go build \
-mod=vendor \
-buildmode=pie
strip %{name}
%install
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}