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

autoPatchelfHook: Support arbitrary paths in runtimeDependencies #80070

Closed
wants to merge 2 commits into from

Conversation

@jtojnar
Copy link
Contributor

jtojnar commented Feb 13, 2020

Motivation for this change

Previously, the setup hooks configuration variable only accepted packages and added lib subdirectory of those packages to rpath. That was insufficient for including shared libraries like lib/libv4l/v4l2convert.so so this patch allows for passing .so file paths whose parent directory will be added to rpath. The patch also makes the process more strict, failing when a package not containing lib or not a .so file is passed to avoid hard to debug failures like passing a wrong output.

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.
@jtojnar jtojnar requested a review from Ericson2314 as a code owner Feb 13, 2020
@jtojnar
Copy link
Contributor Author

jtojnar commented Feb 13, 2020

Rendered docs:

image

@jtojnar jtojnar mentioned this pull request Feb 13, 2020
4 of 10 tasks complete
@jtojnar jtojnar changed the base branch from master to staging Feb 14, 2020
@jtojnar
Copy link
Contributor Author

jtojnar commented Feb 14, 2020

I am not sure if we actually want this.

jtojnar added 2 commits Feb 14, 2020
* Add id
* Mention rpath
* The control variables do not really have to be env vars (though without structuredAttrs there is not a difference)
Previously, the setup hooks configuration variable only accepted packages
and added lib subdirectory of those packages to rpath.
That was insufficient for including shared libraries like `lib/libv4l/v4l2convert.so`
so this patch allows for passing .so file paths whose parent directory will be added to rpath.
The patch also makes the process more strict, failing when a package not containing lib
or not a .so file is passed to avoid hard to debug failures like passing a wrong output.
@jtojnar jtojnar force-pushed the apeh-anyso branch from 89a862a to 4f8a99e Feb 14, 2020
@FRidh FRidh added this to WIP in Staging via automation Feb 16, 2020
@FRidh FRidh moved this from WIP to Needs review in Staging Feb 16, 2020
@jtojnar jtojnar closed this Jun 1, 2020
Staging automation moved this from Needs review to Done Jun 1, 2020
@jtojnar jtojnar deleted the apeh-anyso branch Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.