Skip to content

mariadb: wrap mysqld with --basedir#15421

Merged
vcunat merged 1 commit intoNixOS:stagingfrom
pwetzel:fix-mariadb
May 20, 2016
Merged

mariadb: wrap mysqld with --basedir#15421
vcunat merged 1 commit intoNixOS:stagingfrom
pwetzel:fix-mariadb

Conversation

@pwetzel
Copy link
Contributor

@pwetzel pwetzel commented May 12, 2016

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This wraps mysqld to always include --basedir set to the nix store location. Without the --basedir argument, mysqld cannot find an error message i18n file, looking in /not/a/real/dir instead. This issue specifically affects akonadi from KDE's PIM suite.

There is what seems to be a more complete solution in #8494 that seeks to take advantage of multiple-outputs, but that more complex solution is having trouble getting finished or merged (I don't understand some of the discussion). This PR solves the immediate problem and closes #1053. The output splitting fix can come when it's ready.

I've tested this on 16.03 with KDE PIM and a normal mysql service. It seems appropriate to me to merge into release since KDE PIM is currently broken on 16.03, but I'll leave that decision to someone wiser.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @wkennington, @shlevy and @pmahoney to be potential reviewers

@pwetzel
Copy link
Contributor Author

pwetzel commented May 14, 2016

Should have mentioned @thoughtpolice as a maintainer.

@vcunat
Copy link
Member

vcunat commented May 20, 2016

Hmm, do I understand it right that DEFAULT_MYSQL_HOME is set to /not/a/real/dir so that libraries don't depend on the other output? And now it should be overridden in mysqld back.

@vcunat vcunat merged commit 6ce89e1 into NixOS:staging May 20, 2016
vcunat added a commit that referenced this pull request May 20, 2016
@vcunat
Copy link
Member

vcunat commented May 20, 2016

It certainly sounds a step forward. Thanks.

@pwetzel
Copy link
Contributor Author

pwetzel commented May 20, 2016

Thanks. You'd have to ask @wkennington to be sure, but I think the ideal would be DEFAULT_MYSQL_HOME set to $out, but that causes a cyclic reference in the package definition (or it did when I tried that). The multiple outputs solution seems to work around that somehow just by reading it, though I'm not sure it should be able to (shouldn't preConfigure be part of the hash?).

@vcunat
Copy link
Member

vcunat commented May 20, 2016

No, that problem is unavoidable; if libs referred to $out, there's no point in splitting as both outputs would always have to be present. Note that this is/was a multiple-output derivation already.

@shlevy
Copy link
Member

shlevy commented May 20, 2016

@vcunat I haven't been following this whole thing, but FWIW I disagree with the idea that there's no point in splitting outputs that have mutual references. Of course they would both always have to be present, but they wouldn't both have to be, say, included in user environments, processed as buildInputs, etc. Obviously we'd need to extend nix to support the cycle, but I don't think it would be pointless to do so.

@vcunat
Copy link
Member

vcunat commented May 20, 2016

Well, yes, there would be some advantages, but I don't think this particular thread was touching this feature that seems not near being implemented in nix. (And I'm personally not convinced the added complexity in nix would be worth it; it seems much easier to e.g. create symlink trees for requested subsets of files.)

@jerith666
Copy link
Contributor

This did not fix amarok; I'm running on top of current nixos-unstable (453086a) and just reported the /not/a/real/dir issue in #15264.

@vcunat vcunat mentioned this pull request Jun 28, 2016
@pwetzel pwetzel deleted the fix-mariadb branch July 1, 2016 00:28
@Janik-Haag Janik-Haag added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Comments