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

p4v: explicitly depend on openssl 1.0 series #71301

Merged
merged 1 commit into from Nov 4, 2019

Conversation

nathyong
Copy link
Contributor

@nathyong nathyong commented Oct 17, 2019

Motivation for this change

The 2017.3 version of p4v is linked against libssl.so.1.0.0. Since
the default openssl in NixOS 2019.09 has been changed to openssl 1.1,
the p4v package must now import the openssl_1_0_2 derivation.

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 nix-review --run "nix-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.
Notify maintainers

cc @nioncode

The 2017.3 version of p4v is linked against `libssl.so.1.0.0`.  Since
the default openssl in NixOS 2019.09 has been changed to openssl 1.1,
the p4v package must now import the openssl_1_0_2 derivation.
@nioncode
Copy link
Member

Looks good to me, thanks for contributing!

@masaeedu
Copy link
Contributor

I'm trying out the change by sticking the following in my config.nix:

  packageOverrides = pkgs: {
    p4v = pkgs.p4v.overrideAttrs (_: {
      ldLibraryPath = with pkgs; with pkgs.qt5; lib.makeLibraryPath [
        stdenv.cc.cc.lib
        qtbase
        qtmultimedia
        qtscript
        qtsensors
        qtwebkit
        openssl_1_0_2
      ];
    });
  };

But it seems like after doing that, then nix-env -e p4v and then nix-env -iA nixpkgs.p4v, I still get the SSL related error when I run any perforce tools.

@masaeedu
Copy link
Contributor

masaeedu commented Oct 24, 2019

Just to make sure I'm not bungling the configuration stuff, I tried running nix show-derivation nixpkgs.p4v and it looks like the stuff did end up in the ld path:

{
  "/nix/store/b8nhy124ic2c09a0916pc06v1i2iny1v-p4v-2017.3.1601999.drv": {
    ...
    "env": {
      ...
      "ldLibraryPath": "/nix/store/pjx3f50x0qziyivs7rbg5s12p99nn2np-gcc-7.4.0-lib/lib:/nix/store/zxmcidggfwy1zl6j4nsxh2anvmvdp4jc-qtbase-5.12.0/lib:/nix/store/b5m3vb3kafp42zk3lyp7rmvivwl2aa5g-qtmultimedia-5.12.0/lib:/nix/store/7m7zzralcpchxivl20wfcmsbwkpgfnff-qtscript-5.12.0/lib:/nix/store/97dsa15flz5ssl7gnkqiif469kmr1zbm-qtsensors-5.12.0/lib:/nix/store/wl72lkrlaxzwkxr4wc9hq7a52cqg50id-qtwebkit-5.212-alpha-01-26-2018/lib:/nix/store/1g9n3mxrawawa5p9mv8g2baaxjvdg2ag-openssl-1.0.2s/lib",
      "name": "p4v-2017.3.1601999",
      "nativeBuildInputs": "/nix/store/1nhp2lgbj7bdrw3qb2f81dwmh476pd9f-hook",
      "out": "/nix/store/f4xlr9k61zkrhz331937c17kzl09p9bf-p4v-2017.3.1601999",
      ...
    }
  }
}

Specifically the last thing in ldLibraryPath is /nix/store/1g9n3mxrawawa5p9mv8g2baaxjvdg2ag-openssl-1.0.2s/lib. Which seems right-ish.

@jhenahan
Copy link
Contributor

jhenahan commented Oct 25, 2019

Would this be more flexible in the face of OpenSSL/p4v updates if it were just

p4v = libsForQt5.callPackage ../applications/version-management/p4v { openssl = pkgs.openssl_1_0_2; };

at the top-level/all-packages.nix or something like that? I'm mainly picturing what happens if p4v gets updated to use the 1.1 series.

@masaeedu
Copy link
Contributor

@jhenahan Does making that change actually cause p4v to work for you?

@jhenahan
Copy link
Contributor

jhenahan commented Oct 25, 2019

@masaeedu Sadly, I'm on Darwin so it doesn't build for me regardless. I'm just speculating based on how I think Nix works. 😆

@nioncode nioncode mentioned this pull request Nov 4, 2019
10 tasks
@roberth
Copy link
Member

roberth commented Nov 4, 2019

This fixes it for me.

@roberth
Copy link
Member

roberth commented Nov 4, 2019

Any further improvements can be done in a separate PR if necessary.

@roberth roberth merged commit 64a8f2e into NixOS:master Nov 4, 2019
veprbl pushed a commit that referenced this pull request Nov 15, 2019
The 2017.3 version of p4v is linked against `libssl.so.1.0.0`.  Since
the default openssl in NixOS 2019.09 has been changed to openssl 1.1,
the p4v package must now import the openssl_1_0_2 derivation.

(cherry picked from commit 1ced63d)

cc #71301
Closes: #73456
@veprbl veprbl added the 8.has: port to stable A PR already has a backport to the stable release. label Nov 15, 2019
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

6 participants