-
Notifications
You must be signed in to change notification settings - Fork 249
Expand file tree
/
Copy pathpkg.yaml
More file actions
75 lines (68 loc) · 1.96 KB
/
Copy pathpkg.yaml
File metadata and controls
75 lines (68 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: glibc
variant: scratch
shell: /bin/bash
install:
- build-base
- gcc-14
- bash
- gawk
- bison
- python3
dependencies:
- image: cgr.dev/chainguard/wolfi-base@{{ .WOLFI_BASE_REF }}
steps:
- env:
CC: gcc-14
CXX: g++-14
LD_LINUX_X86_64: ld-linux-x86-64.so.2
LD_LINUX_AARCH64: ld-linux-aarch64.so.1
sources:
- url: https://ftpmirror.gnu.org/gnu/glibc/glibc-{{ .GLIBC_VERSION }}.tar.xz
destination: glibc.tar.xz
sha256: {{ .GLIBC_SHA256 }}
sha512: {{ .GLIBC_SHA512 }}
prepare:
- |
tar -xf glibc.tar.xz --strip-components=1
mkdir build
cd build
# setting `--disable-sanity-checks` is fine in this case since glibc is an extension and base talos uses musl
../configure \
--prefix=/usr/local \
--sysconfdir=/etc \
--disable-sanity-checks \
--enable-stack-protection=strong \
--disable-werror
build:
- |
cd build
make -j $(nproc)
install:
- |
cd build
make install DESTDIR=/rootfs -j $(nproc)
ARCH_UPPER="${ARCH^^}"
LD_LINUX_PATH="LD_LINUX_${ARCH_UPPER}"
export LD_LINUX_PATH="${!LD_LINUX_PATH}"
mkdir -p /rootfs/{etc,usr/{bin,lib}}
cp /pkg/ld.so.conf /rootfs/etc/ld.so.conf
ln -s /usr/local/lib/${LD_LINUX_PATH} /rootfs/usr/lib/${LD_LINUX_PATH}
ln -s /usr/local/sbin/ldconfig /rootfs/usr/bin/ldconfig
ln -s lib/ /rootfs/usr/local/lib64
# cleanup
rm -rf /rootfs/usr/local/include
rm -rf /rootfs/usr/local/share
rm -rf /rootfs/usr/local/var
rm -f /rootfs/etc/rpc
sbom:
outputPath: /rootfs/usr/local/share/spdx/glibc.spdx.json
version: {{ .GLIBC_VERSION }}
cpes:
- cpe:2.3:a:gnu:glibc:{{ .GLIBC_VERSION }}:*:*:*:*:*:*:*
licenses:
- LGPL-2.1-or-later
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /