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

pass: add find and grep as dependencies #105869

Merged
merged 1 commit into from Dec 4, 2020
Merged

Conversation

beardhatcode
Copy link
Contributor

@beardhatcode beardhatcode commented Dec 4, 2020

When pass is called from passff it does not have grep and find in its
path.

PATH="" /home/beardhatcode/.nix-profile/bin/pass grep lol ~
/nix/store/HASH-password-store-1.7.3/bin/.pass-wrapped: line 399: find: command not found

$ PATH="/nix/store/HASH-findutils-4.7.0/bin" /home/beardhatcode/.nix-profile/bin/pass grep lol
/nix/store/HASH-password-store-1.7.3/bin/.pass-wrapped: line 403: grep: command not found
/nix/store/HASH-password-store-1.7.3/bin/.pass-wrapped: line 403: grep: command not found

Motivation for this change

PassFF did not work properly

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip" (10 packages built, see bottom)
  • 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
`nix-shell -p nixpkgs-review --run "nixpkgs-review wip"` output
$ nix-shell -p nixpkgs-review --run "nixpkgs-review wip"     ~/Documents/nixpkgs/pkgs/tools/security/pass
these paths will be fetched (2.73 MiB download, 12.96 MiB unpacked):
  /nix/store/1jcc4z7w736sg6va7vxp0aj4z6jicp4d-nixpkgs-review-2.5.0
  /nix/store/6bxr4dvrkl91kdq5p4yphhka9xwid84z-nix-2.4pre20201201_5a6ddb3
  /nix/store/lssm44v6r2b2zr0xsp13qzk2mgl1ibpl-nlohmann_json-3.7.3
  /nix/store/pa9wjfmfv6dchj6kij20vwkv6rpz4b29-nix-2.4pre20201201_5a6ddb3-man
copying path '/nix/store/pa9wjfmfv6dchj6kij20vwkv6rpz4b29-nix-2.4pre20201201_5a6ddb3-man' from 'https://cache.nixos.org'...
copying path '/nix/store/lssm44v6r2b2zr0xsp13qzk2mgl1ibpl-nlohmann_json-3.7.3' from 'https://cache.nixos.org'...
copying path '/nix/store/6bxr4dvrkl91kdq5p4yphhka9xwid84z-nix-2.4pre20201201_5a6ddb3' from 'https://cache.nixos.org'...
copying path '/nix/store/1jcc4z7w736sg6va7vxp0aj4z6jicp4d-nixpkgs-review-2.5.0' from 'https://cache.nixos.org'...
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0
remote: Enumerating objects: 62, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 26 (delta 17), reused 17 (delta 11), pack-reused 0
Unpacking objects: 100% (26/26), 5.00 KiB | 243.00 KiB/s, done.
From https://github.com/NixOS/nixpkgs
   5d30b8ad31f..263ddd73cd4  master     -> refs/nixpkgs-review/0
$ git worktree add /home/beardhatcode/.cache/nixpkgs-review/rev-a2cc15a0f4e04a66e6d2b941b0697548c4569a83-dirty/nixpkgs 263ddd73cd48820feba9a097311cbbf7424644ae
Preparing worktree (detached HEAD 263ddd73cd4)
Updating files: 100% (23415/23415), done.
HEAD is now at 263ddd73cd4 pythonPackages.class-registry: Add typing propagatedBuildInput when using python2
$ nix-env -f /home/beardhatcode/.cache/nixpkgs-review/rev-a2cc15a0f4e04a66e6d2b941b0697548c4569a83-dirty/nixpkgs -qaP --xml --out-path --show-trace
Applying `nixpkgs` diff...
$ nix-env -f /home/beardhatcode/.cache/nixpkgs-review/rev-a2cc15a0f4e04a66e6d2b941b0697548c4569a83-dirty/nixpkgs -qaP --xml --out-path --show-trace --meta
10 packages updated:
krunner-pass pass-audit pass-extensions-env pass-import passff-host password-store password-store password-store qtpass rofi-pass

$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/beardhatcode/.cache/nixpkgs-review/rev-a2cc15a0f4e04a66e6d2b941b0697548c4569a83-dirty/build.nix
10 packages built:
krunner-pass pass pass-nodmenu pass-otp pass-wayland passExtensions.pass-audit passExtensions.pass-import passff-host qtpass rofi-pass

$ nix-shell /home/beardhatcode/.cache/nixpkgs-review/rev-a2cc15a0f4e04a66e6d2b941b0697548c4569a83-dirty/shell.nix

Result of nixpkgs-review run on x86_64-linux 1

10 packages built:
  • krunner-pass
  • pass
  • pass-nodmenu
  • pass-otp
  • pass-wayland
  • passExtensions.pass-audit
  • passExtensions.pass-import
  • passff-host
  • qtpass
  • rofi-pass

When pass is called from passff it does not have grep and find in its
path.

PATH="" /home/beardhatcode/.nix-profile/bin/pass grep lol                                             ~
/nix/store/HASH-password-store-1.7.3/bin/.pass-wrapped: line 399: find: command not found

$ PATH="/nix/store/HASH-findutils-4.7.0/bin" /home/beardhatcode/.nix-profile/bin/pass grep lol
/nix/store/HASH-password-store-1.7.3/bin/.pass-wrapped: line 403: grep: command not found
/nix/store/HASH-password-store-1.7.3/bin/.pass-wrapped: line 403: grep: command not found
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 4, 2020

Tests of pass-audit freeze on darwin. Unrelated to this PR.

[1/4/8 built, 35 copied (56.4/56.4 MiB), 10.7 MiB DL] building pass-audit-1.1 (checkPhase): EOFError

@Ma27
Copy link
Member

Ma27 commented Dec 4, 2020

Have you checked whether this is related to this PR?

@SuperSandro2000
Copy link
Member

Have you checked whether this is related to this PR?

It is unrelated but I am going to disable the tests on darwin.

@Ma27
Copy link
Member

Ma27 commented Dec 4, 2020

It is unrelated but I am going to disable the tests on darwin.

I'm sorry, but it doesn't really help if you only mention that something got broken without stating or checking that it's unrelated.

Anyway, this seems to be an issue on 20.09 as well, hence: e34208e.

@SuperSandro2000
Copy link
Member

I'm sorry, but it doesn't really help if you only mention that something got broken without stating or checking that it's unrelated.

I usually fix such issues myself or just mark it broken on Darwin if it isn't to trivial to fix.
Also checking if it is related in such case is not very appealing because it is potentially going to clock up my workflow and blocking Darwin builds.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 105869 run on x86_64-linux 1

9 packages built:
  • krunner-pass
  • pass
  • pass-nodmenu
  • pass-wayland
  • passExtensions.pass-audit
  • passExtensions.pass-import
  • passff-host
  • qtpass
  • rofi-pass

@Ma27
Copy link
Member

Ma27 commented Dec 5, 2020

I'm sorry, but I really consider this blindly posting build logs without any context or investigation (and only a single log message, full logs can be displayed with nix build -L btw) an actual anti-pattern. Like everyone else contributing here, I do my best to avoid breaking other people's workflow with my changes and if I see such a (IMHO misleading) post, I'll have to check on a platform where I don't own builders for myself, whether I introduced a regression or not.

And to be frank, I'm actually afraid that if we do this more extensively, people will stop taking those posts sufficiently serious and therefore stop caring about fixing potential regressions.

Please don't get me wrong though, of course I don't mean this personally and I appreciate everyone who invests free time in nixpkgs, I just want to make clear that I don't think it's a reasonable approach to report build failures and regressions.

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

3 participants