Five fixes for building and running on systems with glibc:
-
Fix var->const for envp in namespace.zig (caught by newer zig
nightly builds). -
Prevent vendored curl from auto-detecting host libraries. The
configure step was finding system nghttp2, brotli, libidn2,
librtmp, and openldap, then linking against them without
including them in the final link line. Added explicit --without
and --disable flags. -
Prevent vendored libarchive from auto-detecting host libmd.
On systems with libmd/libbsd installed, configure found BSD
digest headers (md5.h, sha.h, etc.) and linked against libmd
for SHA/MD5/RMD160 functions. Added ac_cv overrides to skip
these header and library checks. -
Fix EBADF from fchmod on glibc. When opening a directory with
default options (.{}), zig uses O_PATH which returns a path-only
fd. fchmod/fchown on O_PATH fds returns EBADF on Linux. On musl
this was masked because O_PATH may not be set. Fixed all call
sites that open a directory and then call setPermissions or
setOwner to use .{ .iterate = true } which avoids O_PATH. -
Move ld-musl interpreter provision detection outside the
target_exists check. The detection is name-based (symlink named
ld-musl-*.so.1 under lib/) and does not need the symlink target
to resolve on the build host. On glibc systems, the absolute
target /lib/libc.so does not exist.
Closes #43