Big script

This commit is contained in:
2026-03-20 15:09:30 +01:00
parent dc2ac2f768
commit a2ca02a856
92 changed files with 5842 additions and 0 deletions

38
toolchain/scripts/167-tar.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8: tar
# ============================================================================
# Purpose: Build GNU tar (archive creation and extraction).
# Essential for handling .tar, .tar.gz, .tar.xz files.
# Inputs: /sources/tar-1.35.tar.xz
# Outputs: tar binary in /usr/bin/
# Assumes: Running inside chroot
# Ref: LFS 13.0 §8.73
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="tar"
VERSION="1.35"
echo "=== Building ${PACKAGE}-${VERSION} ==="
cd /sources
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
cd "${PACKAGE}-${VERSION}"
FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr
make
# Optional: run tests (may take significant time)
# make check || true
make install
# Create symlink for consistency with some build scripts
ln -sfv tar /usr/bin/gtar
cd /sources
rm -rf "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="