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
sysdig: fix bash-completion location #105684
Conversation
In order to support auto-loading, the bash-completion scripts should live in $out/share/bash-completion.
Result of 1 package marked as broken and skipped:
|
Result of 4 packages marked as broken and skipped:
16 packages built:
|
'' | ||
# Fix the bash completion location | ||
installShellCompletion --bash $out/etc/bash_completion.d/sysdig | ||
rm $out/etc/bash_completion.d/sysdig |
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.
We can't use rm -rf here, right?
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 think this is a check that exactly one file is removed (and some directories), which makes sense for something as generic as $out/etc
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.
Yes, that was the purpose. If a new file gets added in future releases, we want to know about it.
make install_driver | ||
kernel_dev=${kernel.dev} | ||
kernel_dev=''${kernel_dev#/nix/store/} | ||
kernel_dev=''${kernel_dev%%-linux*dev*} |
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.
Isn't it enough to ${kernel_dev%%-*}
?
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.
Maybe. This PR just indents that code so I think it's out of scope.
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 indeed, I do not read the red lines attentively most of the time.
kernel_dev=''${kernel_dev#/nix/store/} | ||
kernel_dev=''${kernel_dev%%-linux*dev*} | ||
if test -f "$out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko"; then | ||
sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko |
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 of dots is intended to be actually equal to ${kernel_dev//?/.}
, right?
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.
Same as #105684 (comment)
Motivation for this change
In order to support auto-loading, the bash-completion scripts should
live in $out/share/bash-completion.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)