[Slackbuilds-users] Updates - 20240525.1
Ruben Schuller
sb at rbn.im
Tue May 28 13:15:19 UTC 2024
Hi,
2024-05-27 Willy Sudiarto Raharjo <willysr at slackbuilds.org>:
> Unfortunately, most of go-related packages requires network access to
> download all the modules
>
> i will try to use vendored script to make offline build for this
> week's release
Nice.
I just looked up [1] how to download modules directly from the go module
proxy. It's rather simple: https://go.dev/ref/mod#goproxy-protocol
To download the module "github.com/lib/pq", version v1.10.9 you would
download https://proxy.golang.org/github.com/lib/pq/@v/v1.10.9.zip
Unfortunately the zip-files are named only using the version, making
collisions likely. The module server doesn't send a Content-Disposition
header and doesn't allow for arbitrarily named files like GitHub does
for tags.
So either we allow source files with the same file name in info files,
likely giving trouble with automated build systems or the Go people add
a possibility to allow named files. I fear it's unlikely that the
module server will see this added.
Side note: I think it would be nice to standardize on something like
"download.sh" which SlackBuilds can optionally provide for cases like
this. It would still allow the classic way while adding comfort
and the possibility for automatization. Another thing would be optional
"$PRGNAM.info_$(uname -m)" files, or similar, for other architectures.
Cheers
Ruben
[1] https://go.dev/ref/mod#goproxy-protocol
More information about the SlackBuilds-users
mailing list