Etapa G: cola C — socat + pigz estáticos (corpus 281→283)

socat 1.8.1.2 (openssl+readline+ncurses), pigz 2.8 (zlib). static-musl, -no-pie.
5 clásicos C ya del unlock: tmux/tig/wget/socat/pigz.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 22:59:55 -04:00
co-authored by Claude Opus 4.8
parent 0cb9094852
commit 19fd683ccf
4 changed files with 34 additions and 88 deletions
-38
View File
@@ -1,38 +0,0 @@
# 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 = "pigz"
version = "2.8"
[source]
tarball = "https://zlib.net/pigz/pigz-2.8.tar.gz"
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
# sha512 = "ae3d9d593e1645d65f9ab77aa828600c9af4bb30d0a073da7ae3dd805e65b87efaf6a0efb980f2d0168e475ae506eba194547d6479956dabb9d88293a9078a7f"
sha256 = "eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0"
[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() {
make LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -O3 -flto=auto" pigz
}
_abuild_phase
'''
# de package() de Alpine (traducido $pkgdir→/out):
install = '''
_abuild_phase() {
install -Dm755 pigz -t "/out"/usr/bin
ln -s pigz "/out"/usr/bin/unpigz
install -Dm644 pigz.1 -t "/out"/usr/share/man/man1
}
_abuild_phase
'''
[deps]
build = ["zlib"]
-50
View File
@@ -1,50 +0,0 @@
# 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 = "socat"
version = "1.8.1.2"
[source]
tarball = "http://www.dest-unreach.org/socat/download/socat-1.8.1.2.tar.gz"
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
# sha512 = "2037ad9153ea2c39db075ee44c9199467f86458838dbd829866bf8298d48a2361231591c5b81fcb6d1030a6528e783d45bca948cdf6179a3cc1e5496ca9e420e"
sha256 = "daeb9eed37a99424cd14877208706e93745c91cb86fb917a355635f4df5c8499"
patches = ["use-linux-headers.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() {
CFLAGS="$CFLAGS -Wno-int-conversion" \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make
}
_abuild_phase
'''
# de package() de Alpine (traducido $pkgdir→/out):
install = '''
_abuild_phase() {
make DESTDIR="/out" install
install -Dm644 EXAMPLES doc/*.html doc/*.css \
-t "/out"/usr/share/doc/socat/
}
_abuild_phase
'''
# depends de runtime de Alpine (NO build-deps): bash
[deps]
build = ["openssl", "readline", "linux-headers"]
+17
View File
@@ -0,0 +1,17 @@
# pigz 2.8 — gzip paralelo (C, Makefile). Lib base: zlib. De-Alpinizada: gcc, -static -no-pie (zlib non-PIC).
name = "pigz"
version = "2.8"
[source]
tarball = "https://zlib.net/pigz/pigz-2.8.tar.gz"
sha256 = "eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0"
[build]
compiler = "gcc"
target = "x86_64-linux-musl"
link = "static"
flags = []
[build.phases]
compile = 'make pigz CC=gcc CFLAGS="-O2 -I/usr/include" LDFLAGS="-static -no-pie -L/usr/lib"'
install = 'mkdir -p /out/usr/bin && cp pigz /out/usr/bin/pigz && ln -sf pigz /out/usr/bin/unpigz'
[deps]
build = ["zlib"]
+17
View File
@@ -0,0 +1,17 @@
# socat 1.8.1.2 — relay de sockets (C, autotools). Deps openssl+readline. De-Alpinizada: gcc, configure-split.
name = "socat"
version = "1.8.1.2"
[source]
tarball = "http://www.dest-unreach.org/socat/download/socat-1.8.1.2.tar.gz"
sha256 = "daeb9eed37a99424cd14877208706e93745c91cb86fb917a355635f4df5c8499"
[build]
compiler = "gcc"
target = "x86_64-linux-musl"
link = "static"
flags = []
[build.phases]
configure = './configure --build=$CBUILD --host=$CHOST --prefix=/usr CPPFLAGS=-I/usr/include LDFLAGS="-static -no-pie -L/usr/lib"'
compile = 'make'
install = 'make DESTDIR=/out install'
[deps]
build = ["openssl", "readline", "ncurses"]