mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-11-25 03:42:17 +00:00
0cbf0e0d64
goconserver/gomod/go.mod declared go 1.25.12 while Leap 15.6 resolves BuildRequires: golang to 1.25.8, and the build runs GOTOOLCHAIN=local, so Go refuses rather than fetching a toolchain: go: go.mod requires go >= 1.25.12 (running go 1.25.8; GOTOOLCHAIN=local) 1.25.12 was the patch level of the toolchain that regenerated the file, not a requirement of the code. The highest directive in the pinned graph is 1.25.0, which every target meets, so the directive is lowered to that. The fix existed on the uftp-suse lineage and was never proposed here. t/goconserver_gomod_floor.t fails on the parent commit. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Pinned go.mod / go.sum for the goconserver build
These pin the Go module graph for goconserver at the commit built by ../sbuild.pl (Ubuntu) and
../mockbuild.pl (EL): REF=6166fe5ec1c5b3c20475e322a9f0e8e93c87e45f. Both builders overlay them
into the freshly cloned upstream tree and compile with GOFLAGS=-mod=mod, so modules are downloaded
from the Go proxy but pinned and integrity-checked by go.sum — the build is reproducible, with
no go mod tidy at build time (which would float transitive versions from the network).
The go directive (currently go 1.25.12) is the floor every builder must meet: the GO_PIN
toolchain of ../sbuild.pl and the golang of the EL10 mock chroot. Regenerate with the lowest of
them, so neither build is rejected.
Regenerate (when bumping REF or GO_PIN, or a dependency)
On a host with network, using the pinned toolchain:
REF=6166fe5ec1c5b3c20475e322a9f0e8e93c87e45f
git clone https://github.com/xcat2/goconserver gcsrc && cd gcsrc
git checkout "$REF"
rm -rf storage/etcd.go storage/etcd/ # the build drops the broken etcd backend
[ -f go.mod ] || go mod init github.com/xcat2/goconserver # only if upstream ships no go.mod
go mod edit -replace github.com/kr/pty=github.com/creack/pty@v1.1.21
go mod tidy
cp go.mod go.sum <this dir>
Notes:
kr/pty → creack/ptyfixes console fork (pty.StartsetsCttyin a way Go ≥1.15 rejects).- The etcd removal is required: goconserver's etcd storage backend drags in
github.com/coreos/bbolt, which now declares its module path asgo.etcd.io/bbolt, sogo mod tidyaborts on it. The build removesstorage/etcd*anyway (CGO-free static console server), so the pinned graph omits it.