Skip to content

Commit cd66fc6

Browse files
dssengsmira
authored andcommitted
feat: use bootstrapped packages for building Talos
Update tools, pkgs and extras to use fully bootstrapped [Stageˣ]-derived toolchain for building Talos and its dependencies. This brings in changes related to root being usrmerged now, so some paths have changed. Extras have been cleaned up: use only the needed package. Addresses: #10187 Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
1 parent 2b5bd5d commit cd66fc6

44 files changed

Lines changed: 274 additions & 262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 108 additions & 87 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ ZSTD_COMPRESSION_LEVEL ?= 18
1717
CI_RELEASE_TAG := $(shell git log --oneline --format=%B -n 1 HEAD^2 -- 2>/dev/null | head -n 1 | sed -r "/^release\(.*\)/ s/^release\((.*)\):.*$$/\\1/; t; Q")
1818

1919
ARTIFACTS := _out
20-
TOOLS ?= ghcr.io/siderolabs/tools:v1.10.0-alpha.0-7-g7200845
20+
TOOLS ?= ghcr.io/siderolabs/tools:v1.10.0-alpha.0-10-g9db33dd
2121

2222
DEBUG_TOOLS_SOURCE := scratch
2323
EMBED_TARGET ?= embed
2424

2525
PKGS_PREFIX ?= ghcr.io/siderolabs
26-
PKGS ?= v1.10.0-alpha.0-34-g5763e3e
27-
EXTRAS ?= v1.10.0-alpha.0-2-gf4a110f
26+
PKGS ?= v1.10.0-alpha.0-35-g85f8901
27+
EXTRAS ?= v1.10.0-alpha.0-3-g4102a78
2828

2929
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
3030
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
@@ -64,7 +64,7 @@ PKG_KMOD ?= $(PKGS_PREFIX)/kmod:$(PKGS)
6464
PKG_CNI ?= $(PKGS_PREFIX)/cni:$(PKGS)
6565
PKG_FLANNEL_CNI ?= $(PKGS_PREFIX)/flannel-cni:$(PKGS)
6666
PKG_KERNEL ?= $(PKGS_PREFIX)/kernel:$(PKGS)
67-
PKG_TALOSCTL_CNI_BUNDLE_INSTALL ?= $(PKGS_PREFIX)/talosctl-cni-bundle-install:$(EXTRAS)
67+
PKG_TALOSCTL_CNI_BUNDLE ?= $(PKGS_PREFIX)/talosctl-cni-bundle:$(EXTRAS)
6868

6969
# renovate: datasource=github-tags depName=golang/go
7070
GO_VERSION ?= 1.23
@@ -267,7 +267,7 @@ COMMON_ARGS += --build-arg=PKG_RASPBERYPI_FIRMWARE=$(PKG_RASPBERYPI_FIRMWARE)
267267
COMMON_ARGS += --build-arg=PKG_CNI=$(PKG_CNI)
268268
COMMON_ARGS += --build-arg=PKG_FLANNEL_CNI=$(PKG_FLANNEL_CNI)
269269
COMMON_ARGS += --build-arg=PKG_KERNEL=$(PKG_KERNEL)
270-
COMMON_ARGS += --build-arg=PKG_TALOSCTL_CNI_BUNDLE_INSTALL=$(PKG_TALOSCTL_CNI_BUNDLE_INSTALL)
270+
COMMON_ARGS += --build-arg=PKG_TALOSCTL_CNI_BUNDLE=$(PKG_TALOSCTL_CNI_BUNDLE)
271271
COMMON_ARGS += --build-arg=ABBREV_TAG=$(ABBREV_TAG)
272272
COMMON_ARGS += --build-arg=ZSTD_COMPRESSION_LEVEL=$(ZSTD_COMPRESSION_LEVEL)
273273
COMMON_ARGS += --build-arg=MICROSOFT_SECUREBOOT_RELEASE=$(MICROSOFT_SECUREBOOT_RELEASE)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/siderolabs/talos
22

3-
go 1.23.5
3+
go 1.23.6
44

55
replace (
66
// see e.g. https://github.com/grpc/grpc-go/issues/6696

go.work

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
go 1.23.5
1+
go 1.23.6
22

33
use (
44
.

hack/cleanup.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#!/toolchain/bin/bash
2-
3-
export PATH=/toolchain/bin
4-
1+
#!/bin/bash
52
PREFIX="${1}"
63

74
function remove_symlinks() {
@@ -25,16 +22,17 @@ find ${PREFIX} -type f -name \*.la -delete
2522
find ${PREFIX} -type f \( -name \*.static -o -name \*.o \) -delete
2623
# Strip debug symbols from all libraries and binaries.
2724
find ${PREFIX}/{lib,usr/lib} -type f \( -name \*.so* -a ! -name \*dbg \) -exec strip --strip-unneeded {} ';' || true
28-
find ${PREFIX}/{bin,sbin,usr/bin,usr/sbin} -type f -exec strip --strip-all {} ';' || true
25+
find ${PREFIX}/usr/bin -type f -exec strip --strip-all {} ';' || true
2926

3027
# Remove header files, man files, and any other non-runtime dependencies.
31-
rm -rf ${PREFIX}/{lib,usr/lib}/pkgconfig/ \
28+
rm -rf ${PREFIX}/usr/lib/pkgconfig/ \
3229
${PREFIX}/{include,usr/include}/* \
3330
${PREFIX}/{share,usr/share}/* \
3431
${PREFIX}/usr/lib/cmake \
35-
${PREFIX}/lib/gconv/ \
32+
${PREFIX}/usr/lib/gconv/ \
3633
${PREFIX}/usr/libexec/getconf \
3734
${PREFIX}/var/db
3835

3936
# Remove contents of /usr/bin except for udevadm
40-
find ${PREFIX}/usr/bin \( -type f -o -type l \) ! -name udevadm -delete
37+
# TODO: do not install these files in the first place.
38+
# find ${PREFIX}/usr/bin \( -type f -o -type l \) ! -name udevadm -delete

hack/cloud-image-uploader/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/siderolabs/cloud-image-uploader
22

3-
go 1.23.5
3+
go 1.23.6
44

55
require (
66
cloud.google.com/go/storage v1.49.0

hack/docgen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/siderolabs/talos-hack-docgen
22

3-
go 1.23.5
3+
go 1.23.6
44

55
// forked go-yaml that introduces RawYAML interface, which can be used to populate YAML fields using bytes
66
// which are then encoded as a valid YAML blocks with proper indentiation

hack/gotagsrewrite/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/siderolabs/gotagsrewrite
22

3-
go 1.23.5
3+
go 1.23.6
44

55
require (
66
github.com/fatih/structtag v1.2.0

hack/labeled-squashfs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/toolchain/bin/bash
1+
#!/bin/bash
22

33
set -e
44
# set SELinux labels for files according to file_contexts supplied
5-
/toolchain/sbin/setfiles -r $1 -F -vv $3 $1
5+
/sbin/setfiles -r $1 -F -vv $3 $1
66
mksquashfs $1 $2 -all-root -noappend -comp zstd -Xcompression-level $4 -no-progress

hack/module-sig-verify/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module module-sig-verify
22

3-
go 1.23.5
3+
go 1.23.6
44

55
require go.mozilla.org/pkcs7 v0.9.0

0 commit comments

Comments
 (0)