-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
netcat-openbsd: fix w/musl by providing b64_ntop #37819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: netcat-openbsd Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: netcat-openbsd Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: netcat-openbsd Partial log (click to expand)
|
@@ -25,8 +25,9 @@ stdenv.mkDerivation rec { | |||
for i in $(cat ../debian/patches/series); do | |||
patch -p1 < "../debian/patches/$i" | |||
done | |||
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' | |||
patch -p1 -i ${./musl.patch} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also point out that this code is coming from glibc. This safes people from reviewing the code below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe just fetch it: https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=resolv/base64.c;hb=2d813d7b77ba8341a0a982d74bb59f5a0d775784
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also point out that this code is coming from glibc. This safes people from reviewing the code below.
I don't believe this code originated with glibc. Also, note the OpenBSD comment header. This used to be in the OpenBSD tree, not sure of history before that. Good call re:fetching though-- the current version in glibc is still liberally licensed so might be the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Maybe we can assume we never need to touch base64.c
because the implementation should not change except for includes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bind link would be still a nice hint in case somebody needs to update it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetching it is a good idea--looks like the gentoo-musl project's patch is fetch-friendly (the alpine one was close but conflicted re:Makefile which is why I had a local copy).
I'll add BIND link too.
cee377d
to
30df008
Compare
It seems many projects have copies of this code-- and AFAICT all are derived from ISC's BIND[2] although it does not appear present in recent versions. This is a curious function as it is not documented nor part of any standard[1]. [1] https://www.lemoda.net/unix/base64/index.html [2] for example, glibc's copy: https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/README;h=514e9bb617e710f16126c1474561965a2b35653d;hb=HEAD#l104
30df008
to
5e3e3e9
Compare
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: netcat-openbsd Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: netcat-openbsd Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: netcat-openbsd Partial log (click to expand)
|
Patch from gentoo-musl, implementation is from ISC (all known implementations are from ISC as far as I can tell).
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)