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

browserpass: Fix usage as Firefox plugin #79190

Closed
wants to merge 1 commit into from

Conversation

bkchr
Copy link
Contributor

@bkchr bkchr commented Feb 3, 2020

When the firefox-wrapper binds native plugins here:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/firefox/wrapper.nix#L159
it uses lndir. The problem is that derivation internal symlinks are
relative. Thus, lndir will point to a file that is a relative link and
that will fail at runtime.

Motivation for this change

The firefox native plugin broke, because of: #74253

CC @andir as you have implemented the relative symlink pr.

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"
  • 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.

When the firefox-wrapper binds native plugins here:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/firefox/wrapper.nix#L159
it uses lndir. The problem is that derivation internal symlinks are
relative. Thus, lndir will point to a file that is a relative link and
that will fail at runtime.
@infinisil
Copy link
Member

Is this not fixable by changing the lndir command to first dereference symlink in https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/firefox/wrapper.nix#L160 ? That seems like a more appropriate fix

@bkchr
Copy link
Contributor Author

bkchr commented Feb 4, 2020

Do you know how I can do this?

@infinisil
Copy link
Member

Not sure no, I thought of a readlink, but I guess it's on the wrong level or so. This is the first time I've seen lndir too.

@bkchr
Copy link
Contributor Author

bkchr commented Feb 4, 2020

Yeah, I checked yesterday the documentation and could not find any solution for it. (using lndir)

@bkchr
Copy link
Contributor Author

bkchr commented Feb 5, 2020

Superseded by #79297

@bkchr bkchr closed this Feb 5, 2020
@bkchr bkchr deleted the bkchr-fix-browserpass branch February 5, 2020 23:09
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

2 participants