Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use bootstrapped packages for building Talos #10307

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

dsseng
Copy link
Member

@dsseng dsseng commented Feb 6, 2025

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 [email protected]

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: siderolabs#10187

Signed-off-by: Dmitry Sharshakov <[email protected]>
${PREFIX}/usr/libexec/getconf \
${PREFIX}/var/db

# Remove contents of /usr/bin except for udevadm
find ${PREFIX}/usr/bin \( -type f -o -type l \) ! -name udevadm -delete
# find ${PREFIX}/usr/bin \( -type f -o -type l \) ! -name udevadm -delete
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, some stuff like c_rehash and openssl aren't necessary. We should examine and remove unnecessary binaries from packages (or copy /usr/lib only for some)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(cleanup was disabled as we now install containerd there, as /bin is a symlink now)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

squashfs tree (main dirs only)
.
├── bin -> usr/bin
├── boot
│   └── EFI
├── dev
├── etc
│   ├── ca-certificates -> /etc/ssl
│   ├── cni
│   │   └── net.d
│   ├── containerd
│   ├── cri
│   │   └── conf.d
│   ├── iscsi
│   ├── kubernetes
│   │   └── manifests
│   ├── lvm
│   │   └── profile
│   ├── nvme
│   ├── pki -> /etc/ssl
│   ├── selinux
│   │   └── targeted
│   └── ssl
│       └── certs
├── lib -> usr/lib
├── lib64 -> usr/lib
├── mnt
├── opt
│   ├── cni
│   │   └── bin
│   └── containerd
│       ├── bin
│       └── lib
├── proc
├── root
├── run
│   └── lock
├── sbin -> usr/sbin
├── sys
├── system
├── tmp
├── usr
│   ├── bin
│   ├── etc
│   ├── include
│   ├── lib
│   │   ├── cryptsetup
│   │   ├── engines-3
│   │   ├── firmware
│   │   ├── modules
│   │   ├── ossl-modules
│   │   ├── systemd
│   │   ├── udev
│   │   └── xtables
│   ├── lib64 -> lib
│   ├── libexec
│   │   └── kubernetes
│   ├── local
│   │   ├── lib
│   │   └── share
│   ├── sbin
│   ├── share
│   │   ├── ca-certificates -> /etc/ssl
│   │   └── zoneinfo
│   ├── src
│   └── var
│       └── lib
└── var
    ├── lock -> ../run/lock
    ├── log
    ├── mail
    ├── run -> ../run
    ├── spool
    └── tmp


xargs -a modules-arm64.txt -I {} install -D lib/modules/${KERNEL_VERSION}/{} /build/lib/modules/${KERNEL_VERSION}/{}
xargs -a modules-arm64.txt -I {} install -D usr/lib/modules/${KERNEL_VERSION}/{} /build/usr/lib/modules/${KERNEL_VERSION}/{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change would need a quirk, as it would affect how we merge kernel modules when installing extensions

Copy link
Member Author

@dsseng dsseng Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quirk in what component? and yes, this is going to be a breaking change as extensions are now disallowed to have /lib on their rootfs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quirk in Talos/imager/Image Factory, as Image Factory handles any version of Talos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants