]> git.pld-linux.org Git - packages/gitlab-runner.git/commitdiff
Force -mod=vendor mode master auto/th/gitlab-runner-13.12.0-1
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 7 Sep 2021 06:05:14 +0000 (09:05 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 7 Sep 2021 06:07:18 +0000 (09:07 +0300)
The default should be -mod=readonly for go.mod version 1.13 (present in
go.mod), but that still ends up making a network connection

http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2021-September/026359.html

go: cloud.google.com/go/storage at v1.12.0: Get "https://proxy.golang.org/cloud.google.com/go/storage/@v/v1.12.0.mod": dial tcp 142.250.203.209:443: connect: connection refused

https://golang.org/ref/mod#build-commands

The -mod flag controls whether go.mod may be automatically updated and
whether the vendor directory is used.

-mod=mod tells the go command to ignore the vendor directory and to
automatically update go.mod, for example, when an imported package is
not provided by any known module.

-mod=readonly tells the go command to ignore the vendor directory and to
report an error if go.mod needs to be updated.

-mod=vendor tells the go command to use the vendor directory. In this
mode, the go command will not use the network or the module cache.

By default, if the go version in go.mod is 1.14 or higher and a vendor
directory is present, the go command acts as if -mod=vendor were used.
Otherwise, the go command acts as if -mod=readonly were used.

gitlab-runner.spec

index 9970bdcca8681dd44d51180704ebd0ee42fe8ecb..ed46f9228c6d603ba3c04f4ca671b4b266ee642c 100644 (file)
@@ -49,7 +49,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # go stuff
 %define _enable_debug_packages 0
-%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v %{?debug:-x} %{?**};
+%define gobuild(o:) go build -mod=vendor -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v %{?debug:-x} %{?**};
 %define import_path    gitlab.com/gitlab-org/gitlab-runner
 
 %description
This page took 0.087503 seconds and 4 git commands to generate.