Skip to content

Commit

Permalink
feat: glibc extension
Browse files Browse the repository at this point in the history
The extension is pretty much copied from the package that is in the
nvidia extensions, with one major modification: a symbolic link to
ldconfig is installed at /sbin/ldconfig. This change allows the nvidia
gpu-operator to work without modification. This change does require a
patch to the extension validation logic.

Signed-off-by: Jean-Francois Roy <[email protected]>
  • Loading branch information
jfroy committed Sep 18, 2024
1 parent bfaee18 commit 298a3a7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
- ecr-credential-provider
- fuse3
- gasket-driver
- glibc
- gvisor
- gvisor-debug
- hello-world-service
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ TARGETS += drbd
TARGETS += ecr-credential-provider
TARGETS += fuse3
TARGETS += gasket-driver
TARGETS += glibc
TARGETS += gvisor
TARGETS += gvisor-debug
TARGETS += hello-world-service
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| Name | Image | Description | Version Format |
| ------------------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------- | --------------- |
| [binfmt-misc](misc/binfmt-misc) | [ghcr.io/siderolabs/binfmt-misc](https://github.com/siderolabs/extensions/pkgs/container/binfmt-misc) | Miscellaneous Binary Format | `talos version` |
| [glibc](misc/glibc) | [ghcr.io/siderolabs/glibc](https://github.com/siderolabs/extensions/pkgs/container/glibc) | glibc | `talos version` |

### Network

Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions misc/glibc/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: glibc
version: "$VERSION"
author: Jean-Francois Roy
description: |
This system extension provides glibc.
compatibility:
talos:
version: ">= v1.5.0"
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ dependencies:
- image: cgr.dev/chainguard/wolfi-base@{{ .WOLFI_BASE_REF }}
steps:
- sources:
- url: https://src.fedoraproject.org/lookaside/pkgs/glibc/glibc-{{ .GLIBC_VERSION }}-9-g132a72f93c.tar.xz/sha512/f88ffb4ab47104640c88504ca2619cdca0795565173daf98a37d624333e14ab96699f662597fe51ba94a274c4cc7001bd2c8cc29fd5df012733298049e533bf4/glibc-{{ .GLIBC_VERSION }}-9-g132a72f93c.tar.xz
- url: https://src.fedoraproject.org/lookaside/pkgs/glibc/glibc-{{ .VERSION }}-9-g132a72f93c.tar.xz/sha512/f88ffb4ab47104640c88504ca2619cdca0795565173daf98a37d624333e14ab96699f662597fe51ba94a274c4cc7001bd2c8cc29fd5df012733298049e533bf4/glibc-{{ .VERSION }}-9-g132a72f93c.tar.xz
destination: glibc.tar.xz
sha256: 49cd4eed693ffa9010d81e1c75ab33a278a7cbb404a01564b2e287e04ec3d4d3
sha512: f88ffb4ab47104640c88504ca2619cdca0795565173daf98a37d624333e14ab96699f662597fe51ba94a274c4cc7001bd2c8cc29fd5df012733298049e533bf4
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
tar -xf glibc.tar.xz --strip-components=1
Expand All @@ -34,13 +36,14 @@ steps:
make -j $(nproc)
install:
- |
mkdir -p /rootfs/lib64
mkdir -p /rootfs/lib64 /rootfs/sbin
cd build
make install DESTDIR=/rootfs
cp /pkg/ld.so.conf /rootfs/usr/local/glibc/etc/ld.so.conf
ln -s /usr/local/glibc/lib/ld-linux-x86-64.so.2 /rootfs/lib64/ld-linux-x86-64.so.2
ln -s /usr/local/glibc/sbin/ldconfig /rootfs/sbin/ldconfig
# cleanup
rm -rf /rootfs/usr/local/glibc/include
Expand All @@ -49,3 +52,5 @@ steps:
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
2 changes: 2 additions & 0 deletions misc/glibc/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VERSION: 2.40
WOLFI_BASE_REF: sha256:72c8bfed3266b2780243b144dc5151150015baf5a739edbbde53d154574f1607
2 changes: 2 additions & 0 deletions reproducibility/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ dependencies:
- stage: fuse3
# gasket-driver can be ignored from reproducibility test since it's kernel modules copied from pkgs
# - stage: gasket-driver

- stage: glibc
- stage: gvisor
- stage: gvisor-debug
- stage: hello-world-service
Expand Down

0 comments on commit 298a3a7

Please sign in to comment.