Build nc from source, statically, on both arches - #28
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
x64/ncwas the last dynamic binary in the repo — glibc-linked, version 1.68, and norecipe 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-openbsdpackage uses, which matches the BSD man page the README alreadylinked. Three things musl lacks are handled:
strtonum; alpine ships it shared-onlyIPTOS_DSCP_VA— a linux/glibc define musl'snetinet/ip.hdoesn't carryb64_ntop— from thebase64.caports vendors for exactly this reasonARM cross-builds too, with its own libmd and libbsd, so
ncships on both archesinstead of neither.
Verified locally: both binaries statically linked, both smoke tests passing (
nc -hunder qemu for ARM).
The version moves
1.68→1.238-1when the bump runs — left at 1.68 here so theREADME stays consistent with the binary currently in the tree. The new
urlchecktracks Debian's pool listing from here on, so it stops being a frozen mystery binary.
🤖 Generated with Claude Code