From 4d21df1c1829a30d034a68fcf245b5a6052832c011eec1a1d4eafa4868e8e001 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Fri, 9 Nov 2018 17:53:16 +0000 Subject: [PATCH] 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 --- restic.changes | 4 ++-- restic.spec | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/restic.changes b/restic.changes index 0e06e81..d4cb14c 100644 --- a/restic.changes +++ b/restic.changes @@ -4,8 +4,8 @@ Mon Nov 5 08:44:53 UTC 2018 - Aleksa Sarai - 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 diff --git a/restic.spec b/restic.spec index 8d6c217..969e0b3 100644 --- a/restic.spec +++ b/restic.spec @@ -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