[Slackbuilds-users] The state of development/google-go-lang
fsLeg
fsleg at t-rg.ws
Thu May 7 19:11:25 UTC 2026
A few days ago ollama released an update that requires google-go-lang
1.26. SBo only has version 1.25.9. I took a look at the SlackBuild and
found that, first, it's not as trivial as changing VERSION for a new
even major number, and second, the code is a mess. So I refactored it.
Well, first I just wrote my own[1] code, then I combined it with the
existing SlackBuild[2]. Key points:
1. Instead of having a section for every bootstrap version, I iterate
through them as the steps are the same anyway. This also means that
future updates are as easy as adjusting GO_BOOTSTRAP array and required
versions below it.
2. I don't see a point in building the entire bootstrap chain from
scratch every time. The first time? Sure, this ensures there were no
blobs used. But afterwards? You've already done that, so why not just
use the version you already have to build the next one? This
significantly reduces build time when upgrading versions. So my script
detects the available go version and adjusts the bootstrap chain as
needed, even removing it completely if the previously installed version
of google-go-lang is recent enough.
My "detection" relies on the fact that Slackware's stock gcc-go package
doesn't set GOROOT environment variable, while SBo's google-go-lang
package does. Hopefully, it's enough. And if not, the script should
still build the package using bootstrapping from scratch.
3. I removed some obsolete code. Also, what is the point of `go install`
command? I don't think there's a use case for installing shared
libraries of the toolchin itself. Arch doesn't do it, Google doesn't do
it, everything still seems to just work if you don't do it. So I'm
thinking about removing that too, it'll help save a lot of space.
And about the SlackBuild's state. The currently listed maintainer is
Vincent Batts. However, his last contribution was in 2023, and the
script has been de-facto maintained by the admins ever since. To whom
should I've written this whole passage of text? Since I don't know, I'm
writing here.
[1]:
https://github.com/fsLeg/sb/blob/master/google-go-lang/google-go-lang.SlackBuild
[2]:
https://github.com/fsLeg/SlackBuilds/blob/master/google-go-lang/google-go-lang.SlackBuild
More information about the SlackBuilds-users
mailing list