Los 17 que construyen de la tanda base-system-1 pasan de recipes/incoming-clib a recipes/ canónicas y al índice firmado (dist/repo, artefacto local): bash git sudo doas util-linux rsync sed tzdata dbus dhcpcd iproute2 iputils dosfstools e2fsprogs parted vim ca-certificates. Sólo foot queda staged (stack Wayland, diferido). Cierra el grueso del hueco 'userland foundational' hacia la distro completa: shell real + VCS + privilegios + red + disco + TLS.
77 lines
2.7 KiB
TOML
77 lines
2.7 KiB
TOML
# Importada de nixpkgs por `hammer import-nix` (Etapa G). PUNTO DE PARTIDA, no final:
|
|
# de-Alpinizada al lab de hammer (zig-cc / musl estático). Objetivo mínimo:
|
|
# mount/umount/lsblk/blkid/fdisk/lscpu (utilería base del sistema).
|
|
name = "util-linux"
|
|
version = "2.42.2"
|
|
|
|
[source]
|
|
tarball = "https://www.kernel.org/pub/linux/utils/util-linux/v2.42/util-linux-2.42.2.tar.xz"
|
|
sha256 = "03a05d3adf9602ef128f2da05b84b3205ce60c351e5737c0370f74000679ce8a"
|
|
|
|
[build]
|
|
compiler = "zig-cc"
|
|
target = "x86_64-linux-musl"
|
|
link = "static"
|
|
flags = []
|
|
|
|
[build.phases]
|
|
# fase configure EXPLÍCITA: si la receta no la define, hammer autogenera su propio
|
|
# `./configure --prefix=/usr` (sin nuestros --disable-*) e ignora estos flags.
|
|
#
|
|
# ESTÁTICO: libtool se COME el `-static` de LDFLAGS (lo lee como "static libtool
|
|
# libs", no como link real) ⇒ el único camino a binarios musl 100% estáticos es
|
|
# `--enable-static-programs`, que SÓLO soporta
|
|
# blkid,fdisk,losetup,mount,nsenter,partx,sfdisk,umount,unshare. Produce
|
|
# {mount,umount,blkid,fdisk}.static (verificados corriendo en el host). lsblk y
|
|
# lscpu NO están en esa lista ⇒ quedan dinámicos-musl: construyen y corren en la
|
|
# distro musl, pero en un host glibc segfaultean por loader-skew (no verificables
|
|
# acá). El resto de binarios (lsblk/lscpu/...) son musl-dinámicos.
|
|
configure = '''
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--localstatedir=/var \
|
|
--sysconfdir=/etc \
|
|
--disable-shared \
|
|
--enable-static \
|
|
--enable-static-programs=blkid,fdisk,mount,umount \
|
|
--disable-nls \
|
|
--disable-rpath \
|
|
--disable-liblastlog2 \
|
|
--disable-pylibmount \
|
|
--disable-makeinstall-setuid \
|
|
--disable-makeinstall-chown \
|
|
--without-python \
|
|
--without-systemd \
|
|
--without-systemdsystemunitdir \
|
|
--without-udev \
|
|
--without-cryptsetup \
|
|
--without-ncursesw \
|
|
--without-ncurses \
|
|
--without-tinfo \
|
|
--without-readline \
|
|
--without-libz \
|
|
--without-selinux \
|
|
--without-audit \
|
|
--without-econf
|
|
'''
|
|
compile = '''
|
|
# zig cc traduce `-mcpu=baseline` a un `-mcpu=` VACÍO en modo preprocesador
|
|
# (`-dM -E -`), que zig rechaza. Los generadores errnos.h/syscalls.h de
|
|
# util-linux invocan `$(CC) -dM -E -` ⇒ filtramos ese flag (irrelevante para
|
|
# extraer #defines) sólo en esos dos scripts; el resto del build lo conserva.
|
|
for f in tools/all_errnos tools/all_syscalls; do
|
|
sed -i 's#^"$@" -MD#a=(); for x in "$@"; do [ "$x" = "-mcpu=baseline" ] || a+=("$x"); done\n"${a[@]}" -MD#' "$f"
|
|
done
|
|
make
|
|
'''
|
|
install = '''
|
|
make DESTDIR="/out" install
|
|
'''
|
|
|
|
# deps de Alpine/nix remapeadas al catálogo canónico. AUSENTES quitadas:
|
|
# autoconf/automake/po4a/libxcrypt/sqlite/linux-pam/libcap-ng/systemd-minimal-libs.
|
|
[deps]
|
|
build = ["linux-headers"]
|