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

Add '--allowed-rpath-prefixes' option to '--shrink-rpath' … #98

Merged
merged 2 commits into from
Sep 1, 2016

Commits on Jun 3, 2016

  1. Extract a function for splitting a colon-separated string

    We're going to need this logic in another place, so make a function of
    this.
    dezgeg committed Jun 3, 2016
    Configuration menu
    Copy the full SHA
    2e3fdc2 View commit details
    Browse the repository at this point in the history
  2. Add '--allowed-rpath-prefixes' option to '--shrink-rpath'

    Fixes NixOS#97. In essence, the problem is that some packages in Nixpkgs have
    RPATHs pointing to both $NIX_BUILD_TOP and $out, e.g.:
    
    /tmp/nix-build-openldap-2.4.44.drv-0/openldap-2.4.44/libraries/libldap_r/.libs
    /tmp/nix-build-openldap-2.4.44.drv-0/openldap-2.4.44/libraries/liblber/.libs
    /nix/store/bfkmdxmv3a3f0g3d2q8jkdz2wam93c5z-openldap-2.4.44/lib
    /nix/store/bfkmdxmv3a3f0g3d2q8jkdz2wam93c5z-openldap-2.4.44/lib64
    
    Currently, running `patchelf --shrink-rpath` does the wrong thing by
    keeping the /tmp/ paths and deleting the /nix/store ones. Now we can fix
    the problem by using
    
    patchelf --shrink-rpath --allowed-rpath-prefixes $NIX_STORE_DIR
    
    in the Nixpkgs fixupPhase instead.
    dezgeg committed Jun 3, 2016
    Configuration menu
    Copy the full SHA
    4814341 View commit details
    Browse the repository at this point in the history