shadow (useradd/passwd), kbd (loadkeys/setfont), procps-ng (ps/top/free), pciutils (lspci), lsof, strace, mandoc (man) → recipes/ canónicas + índice firmado. usbutils (falta libusb) y gnupg (falta libassuan/libksba/npth) quedan staged/bloqueados; foot diferido (Wayland). Segunda tanda del userland foundational: usuarios + teclado + proceso + hardware + docs + debug.
67 lines
2.8 KiB
TOML
67 lines
2.8 KiB
TOML
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
|
name = "procps-ng"
|
|
version = "4.0.6"
|
|
|
|
[source]
|
|
tarball = "https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.6.tar.xz/download"
|
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
|
# sha512 = "c499aa14b6c94eda3a455bfe0d2d3c74c79dd718bffbd20207bd0831cb87725b83a76e4ee537a49ddf112bd1248a156d35da00035cbcd4c22037a20dcb4bdc9c"
|
|
sha256 = "67bea6fbc3a42a535a0230c9e891e5ddfb4d9d39422d46565a2990d1ace15216"
|
|
patches = ["disable-test_pids-check.patch"]
|
|
|
|
[build]
|
|
# gcc (gueto, como vim/nano/htop): C clásico + la API termcap/ncurses static-no-PIE.
|
|
compiler = "gcc"
|
|
target = "x86_64-linux-musl"
|
|
link = "static"
|
|
flags = []
|
|
|
|
# Fase `configure` EXPLÍCITA (gotcha: si el ./configure va dentro de `compile`, hammer
|
|
# sintetiza un configure por defecto y pisa las flags). Sin utmps/gettext/systemd:
|
|
# --disable-w-from (evita utmp) y --disable-nls (evita -lintl). La ncurses del corpus es
|
|
# widec-only (libncursesw.a; sin libncurses.a) ⇒ NCURSES_LIBS=-lncursesw + --with-ncurses.
|
|
[build.phases]
|
|
configure = '''
|
|
# El parche toca un .am ⇒ make cree que debe regenerar con automake (ausente del corpus).
|
|
# Reordenamos timestamps (fuentes viejas < aclocal < *.in < configure) para saltar la regen.
|
|
find . \( -name '*.am' -o -name '*.m4' -o -name 'configure.ac' -o -name '*.in.in' \) -exec touch -t 200001010000 {} +
|
|
find . -name 'aclocal.m4' -exec touch -t 200001020000 {} +
|
|
find . \( -name '*.in' -o -name 'config.h.in' \) -exec touch -t 200001030000 {} +
|
|
find . -name 'configure' -exec touch -t 200001040000 {} +
|
|
# ncurses del corpus es static (no-PIE); sus reubicaciones R_X86_64_32 (_nc_globals) NO
|
|
# entran en un binario PIE. El lab linka static-PIE por defecto ⇒ apagamos PIE.
|
|
export CFLAGS="${CFLAGS:-} -fno-pie -fno-PIE"
|
|
export LDFLAGS="${LDFLAGS:-} -no-pie"
|
|
export NCURSES_CFLAGS="$(pkg-config --cflags ncursesw)"
|
|
export NCURSES_LIBS="-lncursesw"
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--bindir=/bin \
|
|
--sbindir=/sbin \
|
|
--mandir=/usr/share/man \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--datarootdir=/usr/share \
|
|
--disable-nls \
|
|
--without-systemd \
|
|
--disable-shared \
|
|
--enable-static \
|
|
--disable-w-from \
|
|
--disable-rpath \
|
|
--with-ncurses
|
|
'''
|
|
compile = 'make -j"$(nproc)"'
|
|
# de package() de Alpine (traducido $pkgdir→/out), simplificado (sin overrides de busybox):
|
|
install = '''
|
|
make -j1 DESTDIR="/out" install="install -D" install
|
|
# pkill es idéntico a pgrep.
|
|
ln -sf pgrep "/out"/bin/pkill 2>/dev/null || true
|
|
'''
|
|
|
|
[deps]
|
|
build = ["ncurses", "linux-headers", "pkgconf"]
|