base-system: util-linux construye — mount/umount/blkid/fdisk estáticos
b3:d0d0ebaa (util-linux 2.42.2). De-Alpinizado (deps→linux-headers), fase configure explícita
--without-{python,systemd,udev,ncurses,...}. Bug real del lab parcheado: zig cc -mcpu=baseline
traduce a -mcpu= VACÍO en modo preprocesador (-dM -E -) que zig rechaza; sed filtra ese flag sólo
en tools/all_{errnos,syscalls}. Estáticos vía --enable-static-programs=blkid,fdisk,mount,umount;
lsblk/lscpu quedan musl-dinámicos (libtool ignora -static). Utilería base del sistema.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# Importada de nixpkgs por `hammer import-nix` (Etapa G). PUNTO DE PARTIDA, no final:
|
||||
# - el build usa el lab de hammer (zig-cc / musl estático), NO el stdenv de nix ⇒ revisá
|
||||
# compiler/link/phases y adaptá hasta que compile.
|
||||
# - las deps van con su nombre NIX; remapealas a las recetas del corpus si difieren.
|
||||
# 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"
|
||||
|
||||
@@ -16,7 +15,62 @@ link = "static"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
configure = "./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --disable-use-tty-group --enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin --disable-makeinstall-setuid --disable-makeinstall-chown --disable-su --enable-write --enable-nls --without-cryptsetup --with-ncursesw --with-systemd --with-systemdsystemunitdir=/04f3da1kmbr67m3gzxikmsl4vjz5zf777sv6m14ahv22r65aac9m/lib/systemd/system/ --with-tmpfilesdir=/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9/lib/tmpfiles.d --with-sysusersdir=/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9/lib/sysusers.d --enable-poman SYSCONFSTATICDIR=/0sra2y18lr3h6j58qjm0w46yv36h1wjmilb09n8aimdpivdymscx/lib"
|
||||
# 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 = ["autoconf", "automake", "po4a", "zlib", "libxcrypt", "sqlite", "linux-pam", "libcap-ng", "ncurses", "systemd-minimal-libs"]
|
||||
build = ["linux-headers"]
|
||||
|
||||
Reference in New Issue
Block a user