-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
testssl: 2.9.5-4 -> 2.9.5-5 #38936
testssl: 2.9.5-4 -> 2.9.5-5 #38936
Conversation
@GrahamcOfBorg build testssl |
Success on x86_64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: testssl Partial log (click to expand)
|
}; | ||
|
||
buildInputs = [ coreutils openssl ]; |
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.
That should not be necessary as both are mentioned in postPatch
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.
I didn't know that nix picked that up automatically, removed.
mkdir -p $out/bin $out/etc | ||
cp -r etc/ $out/ | ||
mkdir -p $out/bin | ||
cp -r etc/ $out | ||
cp testssl.sh $out/bin/testssl.sh |
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.
Here you could use install
, but that's personal taste:
install -Dt $out/bin testssl.sh
cp -r etc $out
}; | ||
|
||
patches = [ ./testssl.patch ]; | ||
|
||
postPatch = '' | ||
substituteInPlace testssl.sh \ | ||
--replace /bin/pwd ${pwdBinPath} \ | ||
--replace /bin/pwd ${coreutils}/bin/pwd \ |
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.
I can't find /bin/pwd
in testssl.sh
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.
It's in there, when I do grep 'bin/pwd' result/bin/testssl.sh
I get the following output:
cwd="$(/nix/store/jy9knxp7nmw80jkf932axrs1b4p9k4hi-coreutils-8.29/bin/pwd)" || \
if [[ "$openssl_location" =~ $(/nix/store/jy9knxp7nmw80jkf932axrs1b4p9k4hi-coreutils-8.29/bin/pwd)/bin ]]; then
On the patched one.
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.
It seems to be line 11404 and 11406 :p
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.
Ah, sorry. I was looking at the development version.
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.
However, I think that's a bit inconsistent: There are other places where $(pwd)
or $(printf)
is used. Maybe we should use makeWrapper
to add coreutils
to the path and replace /bin/pwd
by pwd
?
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.
I was told before that people rather patch bash scripts than to have wrappers for them, since it's easy to patch. But I've added a --replace
for $(pwd)
as well
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.
And what about printf
, basename
, kill
, ...? I think in this case a wrapper is definitely the simplest solution.
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.
I also see hostname
from nettools
used
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.
I'm not sure if that's generally agreed upon, but I think this should run fine in nix-shell --pure -p testssl
.
However, I get
/nix/store/mjswi7v7il7afrjpr8rf7sl42nasijgb-testssl.sh-2.9.5-5/bin/testssl.sh: line 121: hostname: command not found
Fatal error: Neither "dig", "host", "drill" or "nslookup" is present
Success on x86_64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: testssl Partial log (click to expand)
|
@dotlambda Now it works in a pure shell, and got rid of some patching by using a wrapper. |
dnsutils # for dig | ||
nettools # for hostname | ||
openssl # for openssl | ||
openssl # for openssl |
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 line is there twice
Changelog: https://github.com/drwetter/testssl.sh/releases/tag/v2.9.5-5 Also improved expression.
Success on aarch64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: testssl Partial log (click to expand)
|
Motivation for this change
Changelog:
https://github.com/drwetter/testssl.sh/releases/tag/v2.9.5-5
Also improved expression.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)