# curl 8.20.0 → libcurl (C). Lib FUNDACIONAL: dep del crate `curl`/curl-sys (hurl y muchos tools), # y de cola C de red. De-Alpinizada (Etapa G): # - compiler=zig-cc (migrado de gcc, matar-gcc 2026-07-16), configure-split explícito, --disable-shared --enable-static. # - TLS vía openssl del corpus (--with-openssl); compresión vía zlib del corpus. # - drop de deps ausentes: --disable-ares, --without-{libidn2,nghttp2,libpsl,libssh2}. HTTP/HTTPS ok. name = "curl" version = "8.20.0" license = "curl" [source] tarball = "https://curl.se/download/curl-8.20.0.tar.xz" sha256 = "63fe2dc148ba0ceae89922ef838f7e5c946272c2e78b7c59fab4b79d3ce2b896" [build] compiler = "zig-cc" target = "x86_64-linux-musl" link = "static" flags = [] [build.phases] configure = ''' ./configure --build=$CBUILD --host=$CHOST --prefix=/usr \ --disable-shared --enable-static \ --with-openssl --with-zlib \ --disable-ares --without-libidn2 --without-nghttp2 --without-libpsl --without-libssh2 \ --disable-ldap --enable-ipv6 --enable-unix-sockets \ --with-ca-path=/etc/ssl/certs ''' # -all-static (patrón de jq/parted/shadow/procps-ng): curl linka CON LIBTOOL, que lee el `-static` # del lab como "preferí mis .a", NO como flag al linker ⇒ `link = "static"` se ignoraba EN SILENCIO # y el binario salía dinámico (`NEEDED: libz.so.1, libc.so`). `libc.so` es el soname de la musl que # zig bundlea; en el host son 255B de linker script ⇒ el curl sellado NO CORRÍA fuera del sandbox # ("Error relocating /lib/libz.so.1: __snprintf_chk"). Medido con scripts/static-audit.sh. # Va SÓLO en compile e install: en configure rompería los link-tests (no pasan por libtool), y en # install porque libtool RELINKEA el binario al instalar. compile = 'make LDFLAGS="-all-static -no-pie" -j"$(nproc)"' install = 'make DESTDIR=/out install LDFLAGS="-all-static -no-pie"' [deps] build = ["openssl", "zlib", "perl"]