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://ftpmirror.gnu.org/libc/glibc-{{ .GLIBC_VERSION }}.tar.gz destination: glibc.tar.gz sha256: 16e51e0455e288f03380b436e41d5927c60945abd86d0c9852b84be57dd6ed5e sha512: ca799ef40129433791777c698b62142edf0f0e8a87552f324ee6a036a2fe747b867696863692bde45bdd4a263ac6c419a52f92c1b6072b8ff49a887ebaa45299 prepare: - | tar -xzf glibc.tar.gz --strip-components=1 mkdir build cd build ../configure \ --prefix=/usr/local/glibc \ --libdir=/usr/local/glibc/lib \ --libexecdir=/usr/local/glibc/lib \ --enable-stack-protection=strong \ --disable-werror build: - | cd build make -j $(nproc) install: - | mkdir -p /rootfs/lib64 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 # 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