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

Fix mariadb drivers #73928

Merged
merged 1 commit into from Nov 23, 2019
Merged

Fix mariadb drivers #73928

merged 1 commit into from Nov 23, 2019

Conversation

@jamii
Copy link
Contributor

@jamii jamii commented Nov 22, 2019

Motivation for this change

The mariadb unixODBC drivers fail to load with an unhelpful error message - #73258

I haven't been able to pin down what exactly is wrong, but I've found that building against the subrepo rather than against the system libmysqlclient leads to working drivers.

I've tested this PR against mariadb on NixOS and OS X Mojave.

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 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 @

jamii added a commit to jamii/nixpkgs that referenced this pull request Nov 22, 2019
For unknown reasons, building against libmysqlclient results in
unixODBC reporting an error when trying to load the driver, but
building against the subrepo works fine.

Fixes NixOS#73928
@jamii jamii force-pushed the jamii:fix_mariadb_drivers branch from 053d2dc to 213da44 Nov 22, 2019
@jamii
Copy link
Contributor Author

@jamii jamii commented Nov 22, 2019

jamie@machine:~/nixpkgs$ nix-shell -p nix-review --run "nix-review wip"
these paths will be fetched (0.03 MiB download, 0.10 MiB unpacked):
  /nix/store/wvrisx65diwaf934clcx7gld33j7b5bg-nix-review-2.0.1
copying path '/nix/store/wvrisx65diwaf934clcx7gld33j7b5bg-nix-review-2.0.1' from 'https://cache.nixos.org'...
$ git fetch --force https://github.com/NixOS/nixpkgs master:refs/nix-review/0
remote: Enumerating objects: 1216, done.
remote: Counting objects: 100% (1216/1216), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 2489 (delta 1212), reused 1214 (delta 1212), pack-reused 1273
Receiving objects: 100% (2489/2489), 1.19 MiB | 2.63 MiB/s, done.
Resolving deltas: 100% (1786/1786), completed with 568 local objects.
From https://github.com/NixOS/nixpkgs
 * [new branch]              master     -> refs/nix-review/0
$ git worktree add /home/jamie/.cache/nix-review/rev-053d2dc590afd23d9ca7f2d354666ff3c6ea628e-dirty/nixpkgs 8960509fc5308dd4ab500f537c30ada256695d7a
Preparing worktree (detached HEAD 8960509fc53)
Updating files: 100% (20343/20343), done.
HEAD is now at 8960509fc53 cargo-make: 0.23.0 -> 0.24.0
$ nix-env -f /home/jamie/.cache/nix-review/rev-053d2dc590afd23d9ca7f2d354666ff3c6ea628e-dirty/nixpkgs -qaP --xml --out-path --show-trace
Applying `nixpkgs` diff...
$ nix-env -f /home/jamie/.cache/nix-review/rev-053d2dc590afd23d9ca7f2d354666ff3c6ea628e-dirty/nixpkgs -qaP --xml --out-path --show-trace --meta
Nothing changed
No packages were successfully build, skip nix-shell
$ git worktree prune
@jamii
Copy link
Contributor Author

@jamii jamii commented Nov 22, 2019

There don't appear to be any tests.

@jamii
Copy link
Contributor Author

@jamii jamii commented Nov 22, 2019

@aanderse
Copy link
Contributor

@aanderse aanderse commented Nov 22, 2019

libmysqlclient is no longer being referenced so you should remove it. This will also make the backport to 19.09 easier.

jamii added a commit to jamii/nixpkgs that referenced this pull request Nov 23, 2019
For unknown reasons, building against libmysqlclient results in
unixODBC reporting an error when trying to load the driver, but
building against the subrepo works fine.

Fixes NixOS#73928
@jamii jamii force-pushed the jamii:fix_mariadb_drivers branch from 213da44 to 9b88fc4 Nov 23, 2019
src = fetchFromGitHub {
owner = "MariaDB";
repo = "mariadb-connector-odbc";
rev = "c921b500650eca535010f12e0d83417d2ef915ec";

This comment has been minimized.

@aanderse

aanderse Nov 23, 2019
Contributor

I'm terribly sorry I didn't notice this before... we generally set rev to something involving version for easy updates. So in this case:

Suggested change
rev = "c921b500650eca535010f12e0d83417d2ef915ec";
rev = version;

I've tested this on NixOS and after this change I'm happy to merge to master. This change deserves a backport as well. Thank you so much for digging into this! Hopefully at some point someone can get to the bottom of our libmysqlclient issue, but until that happens the priority is to have a working package 😄

Thanks again @jamii 🎉

For unknown reasons, building against libmysqlclient results in
unixODBC reporting an error when trying to load the driver, but
building against the subrepo works fine.

Fixes #73928
@jamii jamii force-pushed the jamii:fix_mariadb_drivers branch from 9b88fc4 to fa9a981 Nov 23, 2019
Copy link
Contributor

@aanderse aanderse left a comment

LGTM 👍

@aanderse aanderse merged commit 216f0e6 into NixOS:master Nov 23, 2019
15 checks passed
15 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
unixODBCDrivers.mariadb on aarch64-linux Success
Details
unixODBCDrivers.mariadb on x86_64-linux Success
Details
@aanderse
Copy link
Contributor

@aanderse aanderse commented Nov 23, 2019

Thank you very much @jamii! Are you going to open a backport PR?

@jamii
Copy link
Contributor Author

@jamii jamii commented Nov 25, 2019

Not soon. I was asked to spend less time working on nix stuff 🤷‍♂️

@aanderse
Copy link
Contributor

@aanderse aanderse commented Nov 25, 2019

I'll grab it then. Thanks again... and sorry to hear :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.