#!/bin/bash set -e # Create sources directory mkdir -p sources # Download glibc source archive echo "Downloading glibc-2.42 source archive..." wget -O sources/glibc-2.42.tar.xz https://ftp.gnu.org/gnu/glibc/glibc-2.42.tar.xz # Extract the source archive echo "Extracting glibc source..." tar -xf sources/glibc-2.42.tar.xz -C sources/ # Clean up the archive echo "Cleaning up archive..." rm sources/glibc-2.42.tar.xz # Download required patches echo "Downloading glibc fhs patch..." wget -O sources/glibc-2.42-fhs-1.patch https://www.linuxfromscratch.org/patches/lfs/12.2/glibc-2.40-fhs-1.patch echo "Source acquisition complete."