SHA256
1
0
forked from pool/restic

Accepting request 647647 from home:cyphar:restic

Switch GO111MODULE usage.

OBS-URL: https://build.opensuse.org/request/show/647647
OBS-URL: https://build.opensuse.org/package/show/Archiving/restic?expand=0&rev=14
This commit is contained in:
Aleksa Sarai 2018-11-09 17:53:16 +00:00 committed by Git OBS Bridge
parent 681a2fe2d5
commit 4d21df1c18
2 changed files with 6 additions and 10 deletions

View File

@ -4,8 +4,8 @@ Mon Nov 5 08:44:53 UTC 2018 - Aleksa Sarai <asarai@suse.com>
- Update to 0.9.3.
https://github.com/restic/restic/releases/tag/v0.9.3
See installed /usr/share/doc/packages/restic/CHANGELOG.md
- Update to Go 1.9, and remove Go 1.11 module files to allow building with
pre-Go 1.11 compilers.
- Update to Go 1.9, and disable Go 1.11 modules since they require internet
access (restic still provides vendor/).
-------------------------------------------------------------------
Wed Aug 8 03:59:46 UTC 2018 - asarai@suse.com

View File

@ -68,14 +68,10 @@ export GOPATH="$GOPATH:$HOME/go"
mkdir -p $HOME/go/src/%{import_path}
cp -rT $PWD $HOME/go/src/%{import_path}
# Remove Go 1.11's go.mod, since older versions of Go support it but don't
# support using -mod=vendor which disables using it (note that go modules
# require internet access, unless you pre-load vendor/).
rm -f go.mod go.sum
# Build restic. We don't use build.go because it builds statically, and also
# restricts the Go version in cases where it's not actually necessary.
go build -o %{name} -buildmode=pie \
# Build restic. We don't use build.go because it builds statically, uses go
# modules, and also restricts the Go version in cases where it's not actually
# necessary. We disable go modules because restic still provides a vendor/.
GO111MODULE=off go build -o %{name} -buildmode=pie \
-ldflags "-s -w -X main.version=%{version}" \
%{import_path}/cmd/restic