From ec3dc21fcbfde34b9dd31e4ae3a6c49a3c62421c Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 10 Jul 2026 23:30:04 -0400 Subject: [PATCH] =?UTF-8?q?base-system-2:=20lsof=20construye=20=E2=80=94?= =?UTF-8?q?=20ficheros=20abiertos=204.99.7=20est=C3=A1tico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b3:b87f0307. deps→linux-headers (perl/bash eran el fallo de carga). El tarball trae el Configure viejo (sh, no autotools) → ./Configure -n linux + make CC='cc -static' (Configure genera su propia línea de link que ignora los LDFLAGS del lab). --- recipes/incoming-clib/lsof.toml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes/incoming-clib/lsof.toml diff --git a/recipes/incoming-clib/lsof.toml b/recipes/incoming-clib/lsof.toml new file mode 100644 index 00000000..70321391 --- /dev/null +++ b/recipes/incoming-clib/lsof.toml @@ -0,0 +1,42 @@ +# 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 = "lsof" +version = "4.99.7" + +[source] +tarball = "https://github.com/lsof-org/lsof/archive/4.99.7/lsof-4.99.7.tar.gz" +# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine: +# sha512 = "02888ffd9984aeffeec8868956cb49f9553e5e6c6b907b29c885282432efc05631c44e76be19598c3cdf3ebffac38d284c6e9c1594c0459058dea14ca7d00699" +sha256 = "bac1b0acbc50aede42fc97dffaa0b0475e97973e36a6351de5f349c6155afc68" +patches = ["hassecurity.patch"] + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[build.phases] +# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático): +compile = ''' +_abuild_phase() { +./Configure -n linux + # El script Configure genera su propia línea de link (${CC} -o lsof ... ${CFGL}) + # e ignora los LDFLAGS estáticos de hammer; forzamos -static por CC. link=static. + make CC="cc -static" +} +_abuild_phase +''' +# de package() de Alpine (traducido $pkgdir→/out): +install = ''' +_abuild_phase() { +install -Dm0755 lsof -t "/out"/usr/bin/ + install -Dm0644 Lsof.8 "/out"/usr/share/man/man8/lsof.8 + install -Dm0644 COPYING -t "/out"/usr/share/licenses/lsof/ +} +_abuild_phase +''' + +[deps] +build = ["linux-headers"]