Skip to content

Build nc from source, statically, on both arches - #28

Merged
mosajjal merged 1 commit into
masterfrom
feat/static-nc
Sep 2, 2026
Merged

mosajjal merged 1 commit into
masterfrom
feat/static-nc

Conversation

@mosajjal

@mosajjal mosajjal commented Sep 2, 2026

Copy link
Copy Markdown
Owner

x64/nc was the last dynamic binary in the repo — glibc-linked, version 1.68, and no
recipe behind it. Nothing could rebuild it, verify it, or tell you what it was.

It now builds from Debian's portable OpenBSD netcat, the same source alpine's
netcat-openbsd package uses, which matches the BSD man page the README already
linked. Three things musl lacks are handled:

  • libbsd — built from source for strtonum; alpine ships it shared-only
  • IPTOS_DSCP_VA — a linux/glibc define musl's netinet/ip.h doesn't carry
  • b64_ntop — from the base64.c aports vendors for exactly this reason

ARM cross-builds too, with its own libmd and libbsd, so nc ships on both arches
instead of neither.

Verified locally: both binaries statically linked, both smoke tests passing (nc -h
under qemu for ARM).

The version moves 1.68 → 1.238-1 when the bump runs — left at 1.68 here so the
README stays consistent with the binary currently in the tree. The new url check
tracks Debian's pool listing from here on, so it stops being a frozen mystery binary.

🤖 Generated with Claude Code

x64/nc was the last dynamic binary in the repo: glibc-linked, version
1.68, and no recipe behind it -- nothing could rebuild or verify it.

It is now built from Debian's portable OpenBSD netcat, the same source
alpine's netcat-openbsd package uses, which matches the BSD man page the
README already linked. Three things musl lacks are handled: libbsd is
built from source for strtonum (alpine ships it shared-only),
IPTOS_DSCP_VA is defined, and b64_ntop comes from the base64.c aports
carries for exactly this reason.

ARM cross-builds too, with its own libmd and libbsd, so nc ships on both
arches instead of neither.

The version moves 1.68 -> 1.238-1 when the bump runs; the url check
tracks Debian's pool listing from here on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mosajjal
mosajjal merged commit aa5eb06 into master Sep 2, 2026
1 check passed
@mosajjal
mosajjal deleted the feat/static-nc branch September 2, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant