Skip to content
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

stern: Include bash & zsh completion support #49668

Merged
merged 1 commit into from Nov 26, 2018

Conversation

benley
Copy link
Member

@benley benley commented Nov 3, 2018

Motivation for this change

I want tab completion

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

kalbasit referenced this pull request Nov 3, 2018
aarch64 cpus are going to break on pkgsi686Linux packages.

See this error:

https://hydra.nixos.org/build/82962379/
@matthewbauer
Copy link
Member

@GrahamcOfBorg eval

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: stern

Partial log (click to expand)

github.com/wercker/stern
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/x3il84l3p9rsygn3fpgp6z6svfd7blib-stern-1.10.0-bin
shrinking /nix/store/x3il84l3p9rsygn3fpgp6z6svfd7blib-stern-1.10.0-bin/bin/stern
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/x3il84l3p9rsygn3fpgp6z6svfd7blib-stern-1.10.0-bin/bin
patching script interpreter paths in /nix/store/x3il84l3p9rsygn3fpgp6z6svfd7blib-stern-1.10.0-bin
checking for references to /build in /nix/store/x3il84l3p9rsygn3fpgp6z6svfd7blib-stern-1.10.0-bin...
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: stern

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/vzbaw3dhkrsnqiyzx9vyq7yflsyscvld-stern-1.10.0-bin
shrinking /nix/store/vzbaw3dhkrsnqiyzx9vyq7yflsyscvld-stern-1.10.0-bin/bin/stern
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/vzbaw3dhkrsnqiyzx9vyq7yflsyscvld-stern-1.10.0-bin/bin
patching script interpreter paths in /nix/store/vzbaw3dhkrsnqiyzx9vyq7yflsyscvld-stern-1.10.0-bin
checking for references to /build in /nix/store/vzbaw3dhkrsnqiyzx9vyq7yflsyscvld-stern-1.10.0-bin...
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
/nix/store/vzbaw3dhkrsnqiyzx9vyq7yflsyscvld-stern-1.10.0-bin

@roberth
Copy link
Member

roberth commented Nov 3, 2018

Sadly, it does break cross-compilation. I see two ways to fix it, either

  • don't generate completions when cross compiling
  • hardcode the completion scripts and turn the non-cross build into an equality test

The latter may or may not be feasible, depending on what's in the script. If the script defers most/all of the logic to the binary it should be fine.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: stern

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2mc8j39gbsf3hcfyd2zpc70k4pzsha6d-stern-1.10.0-bin
shrinking /nix/store/2mc8j39gbsf3hcfyd2zpc70k4pzsha6d-stern-1.10.0-bin/bin/stern
strip is /nix/store/qjrnv0qw44bw1hc23zhfh26xd1c25dfs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/2mc8j39gbsf3hcfyd2zpc70k4pzsha6d-stern-1.10.0-bin/bin
patching script interpreter paths in /nix/store/2mc8j39gbsf3hcfyd2zpc70k4pzsha6d-stern-1.10.0-bin
checking for references to /build in /nix/store/2mc8j39gbsf3hcfyd2zpc70k4pzsha6d-stern-1.10.0-bin...
strip is /nix/store/qjrnv0qw44bw1hc23zhfh26xd1c25dfs-binutils-2.30/bin/strip
/nix/store/2mc8j39gbsf3hcfyd2zpc70k4pzsha6d-stern-1.10.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: stern

Partial log (click to expand)

github.com/wercker/stern
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/5x2is76b1k9wlq1wcninl48xz0zqn3kg-stern-1.10.0-bin
shrinking /nix/store/5x2is76b1k9wlq1wcninl48xz0zqn3kg-stern-1.10.0-bin/bin/stern
strip is /nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/5x2is76b1k9wlq1wcninl48xz0zqn3kg-stern-1.10.0-bin/bin
patching script interpreter paths in /nix/store/5x2is76b1k9wlq1wcninl48xz0zqn3kg-stern-1.10.0-bin
checking for references to /build in /nix/store/5x2is76b1k9wlq1wcninl48xz0zqn3kg-stern-1.10.0-bin...
strip is /nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/strip

@benley benley merged commit 5087dcf into NixOS:master Nov 26, 2018
@benley benley deleted the benley/stern-completion branch November 26, 2018 19:41
benley added a commit that referenced this pull request Nov 27, 2018
Moments after merging #49668 I realized that this is not hard to do
correctly, so here it is now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants