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

oracle-instantclient: 12.2.0.1.0 -> 19.3.0.0.0 #67206

Merged
merged 9 commits into from Aug 23, 2019

Conversation

@flokli
Copy link
Contributor

commented Aug 21, 2019

Motivation for this change

It's now possible to download Oracle Instant Client without having to
click a checkbox to agree to the license, and then log in with an Oracle
account to start the download, at least on Linux (for now).

Darwin still seems to be at 18.1 (and needs manual fetching).
Version numbers haven't been that aligned recently, so I refactored the derivation to support different version numbers and fetchers per platform.

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.

Repro:

$(nix-build -E "with import /path/to/checkout {};python3.withPackages (p: [p.cx_oracle p.ptpython])")/bin/ptpython
import cx_Oracle
connection = cx_Oracle.connect("MAIN_USER/MAIN_PASSWORD@localhost/orclpdb1")
Copy link
Contributor

left a comment

Will test once I get a chance.

@flokli flokli referenced this pull request Aug 21, 2019
1 of 10 tasks complete
@flokli flokli force-pushed the flokli:oracle-instantclient-19.3 branch from 41471e6 to 1fbc245 Aug 21, 2019
@flokli

This comment has been minimized.

Copy link
Contributor Author

commented Aug 21, 2019

Was able to build perlPackages.DBDOracle, phpPackages.oci8 and python3.pkgs.cx_oracle successfully.

Poked at the .so files on linux, and tried connecting through the python bindings. Looks good so far :-)

@aanderse, could you take a look at situation on darwin? At least the python bindings previously did work previously…

Copy link
Contributor

left a comment

After making the mentioned changes to your branch I was able to compile the following on darwin:

  • oracle-instantclient
  • php72Packages.oci8
  • php73Packages.oci8
  • python3.pkgs.cx_oracle

And without making any changes I was able to compile the following on linux:

  • oracle-instantclient
  • php72Packages.oci8
  • php73Packages.oci8
  • python3.pkgs.cx_oracle
  • perlPackages.DBDOracle
  • perldevelPackages.DBDOracle

perldevelPackages.DBDOracle had the following failure on darwin:

#   Failed test 'require DBDOracleTestLib;'
#   at t/00dbdoracletestlib.t line 11.
#     Tried to require 'DBDOracleTestLib'.
#     Error:  Can't load '/private/var/folders/3y/f246ctxd07g_ght97sqhlhs80000gp/T/nix-build-perl5.31.2-DBD-Oracle-1.80.drv-0/DBD-Oracle-1.76/blib/arch/auto/DBD/Oracle/Oracle.bundle' for module DBD::Oracle: dlopen(/private/var/folders/3y/f246ctxd07g_ght97sqhlhs80000gp/T/nix-build-perl5.31.2-DBD-Oracle-1.80.drv-0/DBD-Oracle-1.76/blib/arch/auto/DBD/Oracle/Oracle.bundle, 2): Library not loaded: @rpath/libclntsh.dylib.18.1
#   Referenced from: /private/var/folders/3y/f246ctxd07g_ght97sqhlhs80000gp/T/nix-build-perl5.31.2-DBD-Oracle-1.80.drv-0/DBD-Oracle-1.76/blib/arch/auto/DBD/Oracle/Oracle.bundle
#   Reason: image not found at /nix/store/q9dgm21xc01as964s5fj5kqyq9cs0ivs-perl-5.31.2/lib/perl5/5.31.2/darwin-2level/DynaLoader.pm line 197.
#  at t/lib/DBDOracleTestLib.pm line 29.
@flokli flokli force-pushed the flokli:oracle-instantclient-19.3 branch from 5f9c2c4 to f880dff Aug 22, 2019
flokli added 8 commits Aug 21, 2019
It's now possible to download Oracle Instant Client without having to
click a checkbox to agree to the license, and then log in with an Oracle
account to start the download, at least on Linux (for now).

Darwin still seems to be at 18.1, and version numbers haven't been that
aligned recently, so allow different version numbers per platform.
This wasn't about PECL::oci8 in first place, but DBD-Oracle.

In the current version of oracle-instantclient, a libclntsh.so is
shipped, so DBD-Oracle is happy.
libclntsh.so* and libocci.so* are symlinks to the latest version.

By using `install`, these are all dereferenced and duplicated.

Let's avoid that, and shrink the lib output from 621M to 226M.
@flokli flokli force-pushed the flokli:oracle-instantclient-19.3 branch from f880dff to 47c60b3 Aug 22, 2019
@flokli

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2019

I adressed all the changes, and could get perlPackages.DBDOracle to build on macos aswell - had to add ${oracle-instantclient.lib}/lib to the rpath of the resulting Oracle.bundle file. The tests now pass there, too.

@flokli flokli changed the title WIP: oracle-instantclient: 12.2.0.1.0 -> 19.3.0.0.0 oracle-instantclient: 12.2.0.1.0 -> 19.3.0.0.0 Aug 22, 2019
Copy link
Contributor

left a comment

Successfully tested connectivity to an oracle database using phpPackages.oci8. 👍

Thanks @flokli!

@aanderse aanderse merged commit 890196d into NixOS:master Aug 23, 2019
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@flokli flokli deleted the flokli:oracle-instantclient-19.3 branch Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.