-
Notifications
You must be signed in to change notification settings - Fork 142
/
Copy pathpkg.yaml
67 lines (61 loc) · 2.1 KB
/
pkg.yaml
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
name: glibc
variant: scratch
shell: /bin/bash
install:
- build-base
- bash
- gawk
- bison
- python3
dependencies:
- image: cgr.dev/chainguard/wolfi-base@{{ .WOLFI_BASE_REF }}
steps:
- sources:
- url: https://src.fedoraproject.org/lookaside/pkgs/glibc/glibc-{{ .GLIBC_VERSION }}-8-g1e0e33e1b1.tar.xz/sha512/449e3d4f6b59bfde2175c5d1be71447b084e0b12b176518b65fd9b0ac8430766b25416a173fe3efd47462bc1719d59a051e7eed9544e0fba9165dd86f69ee0b9/glibc-{{ .GLIBC_VERSION }}-8-g1e0e33e1b1.tar.xz
destination: glibc.tar.xz
sha256: {{ .GLIBC_SHA256 }}
sha512: {{ .GLIBC_SHA512 }}
prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
tar -xf glibc.tar.xz --strip-components=1
mkdir build
cd build
../configure \
--prefix=/usr/local/glibc \
--libdir=/usr/local/glibc/usr/lib \
--libexecdir=/usr/local/glibc/usr/lib \
--enable-stack-protection=strong \
--disable-werror
build:
- |
cd build
make -j $(nproc)
install:
- |
mkdir -p \
/rootfs/usr/local/glibc/usr/bin \
/rootfs/usr/local/glibc/usr/lib \
/rootfs/usr/local/glibc/usr/lib32 \
/rootfs/usr/local/glibc/usr/sbin
ln -s usr/bin/ /rootfs/usr/local/glibc/bin
ln -s usr/lib/ /rootfs/usr/local/glibc/lib
ln -s usr/lib/ /rootfs/usr/local/glibc/lib64
ln -s usr/sbin/ /rootfs/usr/local/glibc/sbin
ln -s lib/ /rootfs/usr/local/glibc/usr/lib64
cd build
make install DESTDIR=/rootfs
cp /pkg/ld.so.conf /rootfs/usr/local/glibc/etc/ld.so.conf
mkdir -p /rootfs/usr/lib /rootfs/usr/bin
ln -s /usr/local/glibc/usr/lib/ld-linux-x86-64.so.2 /rootfs/usr/lib/ld-linux-x86-64.so.2
ln -s /usr/local/glibc/usr/sbin/ldconfig /rootfs/usr/bin/ldconfig
# cleanup
rm -rf /rootfs/usr/local/glibc/include
rm -rf /rootfs/usr/local/glibc/share
rm -rf /rootfs/usr/local/glibc/var
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /