OBS Source Service to download, verify and vendor Go module dependency sources
Using go.mod and go.sum distributed with a Go application, the obs-service-go_modules service calls go mod download, go mod verify and go mod vendor. The service then creates vendor.tar.gz containing the vendor/ directory populated by go mod vendor, allowing Go application package builds without network access during the build stage.
- Devel package for openSUSE:Factory
-
7
derived packages
- Links to openSUSE:Factory / obs-service-go_modules
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout devel:languages:go/obs-service-go_modules && cd $_
- Create Badge
Refresh
Refresh
Source Files
Filename | Size | Changed |
---|---|---|
_service | 0000000681 681 Bytes | |
_servicedata | 0000000248 248 Bytes | |
obs-service-go_modules-0.6.4.tar.gz | 0000015874 15.5 KB | |
obs-service-go_modules.changes | 0000007804 7.62 KB | |
obs-service-go_modules.spec | 0000002966 2.9 KB |
Revision 27 (latest revision is 28)
Jeff Kowalczyk (jfkw)
accepted
request 1183515
from
Jeff Kowalczyk (jfkw)
(revision 27)
- Update go toolchain to Requires: golang(API) >= 1.22 * Recent go toolchain versions enforce use of the minimum toolchain version specified in go.mod * Minimum toolchain requirements are in effect for go commands as well as unit compilation * Users running a version older than specified may see error: go: go.mod requires go >= 1.22 (running go 1.21.10; GOTOOLCHAIN=local) * This package and others which call go toolchain commands will need timely updates to the latest version * Reported by Sheng Huang (psheng) * Closes https://github.com/openSUSE/obs-service-go_modules/issues/49
Comments 2
SUPER!!! Thanks for this package!
Which "dependency resolution softwares" "supports"? I mean, if I use go get, do this work? Or how do you get the list of the modules that need to go into the vendor directory?
The service extracts the full application source to read go.mod and go.sum contained in the application root. It then uses the online source service phase to download all Go modules in the transitive set of dependencies. Finally it creates a
vendor.tar.gz
containing all dependencies imported by the Go application and its test code.During the offline build phase the Go application .spec references
vendor.tar.gz
as a source, and go build and related commands pass argumentgo build -mod=vendor
or set environment variableGOFLAGS=-
mod=vendor. Other Go tools to explore or graph dependencies in the offline build phase should be usable with these vendored dependencies.There is documentation in the README and manpage that covers the above in more detail. Issues and feature requests welcome at https://github.com/openSUSE/obs-service-go_modules.