Closed vanaf closed 7 months ago
As a workaround we use
GO111MODULE=off
to let go search for modules in GOPATH.
How does boringssl obtain the Go dependencies then? Does the boringssl build system set GOPATH
and vendor the dependency or how does it work with GO111MODULE=off
?
Does this issue need to be fixed in this repository? Fedora spec file mentions the go modules explicitly, link https://src.fedoraproject.org/rpms/android-tools/blob/rawhide/f/android-tools.spec
This is also necessary in openSUSE on OBS, so the preliminary work of creating a vendor.tar.gz
locally, since the OBS does not allow network access even during package building.
If possible, the appropriate vendor packages needed could be created in advance and then included in the finished package.
gocryptfs
does it this way, see e.g. https://github.com/rfjakob/gocryptfs/releases - the package there is currently called gocryptfs_v2.3_src-deps.tar.gz
.
For openSUSE I create the required vendor.tar.gz
locally in advance and then refer in the spec file (after unpacking at the appropriate place) with export GOFLAGS="-mod=vendor"
that no download is necessary.
See also https://github.com/rfjakob/gocryptfs/blob/master/package-release-tarballs.bash
I have now added the go mod vendor
to the Google Action and it seems to work, see https://github.com/nmeum/android-tools/compare/master...munix9:android-tools:vendor
The corresponding package_source for testing is available in https://github.com/munix9/android-tools/actions/runs/4282460513
When compiling, at least an export GOFLAGS="-mod=vendor"
must be done before.
I also hit this when packaging for Chimera Linux, there I could workaround with:
env = {"GOFLAGS": "-mod=vendor"}
def do_prepare(self):
with self.pushd("vendor/boringssl"):
self.do("go", "mod", "vendor", allow_network = True)
I'll try the proposed PR deps archive and report there in a bit
The 34.0.5 release source tarball now includes required go modules for boringssl. It was fixed in 1e417cc26f8c74daa5c96d5e11cdaa12a36063f0 commit. Thanks to munix9
We ship go.sum file since 31.0.0 release, which comes with following boringssl commit: https://boringssl-review.googlesource.com/c/boringssl/+/42044 Without Internet build now fails with
See full log: https://koji.fedoraproject.org/koji/taskinfo?taskID=73169944