openldap: load client config from /etc, not the nix store#182080
openldap: load client config from /etc, not the nix store#182080mweinelt merged 1 commit intoNixOS:masterfrom
Conversation
|
I assume you found that out emperically? Because I don't find these flags intuitive at all. 😄 |
|
I've worked on (and been responsible for) enough automake messes throughout my life that I was able to guess at this "solution" 🙃 |
|
Ideally we would now create a test case to make sure we don't break this again. Do you think that's something you could contribute? https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/openldap.nix |
|
Sure, I can give it a go. |
We want Openldap clients to load /etc/ldap.conf at runtime, not
${pkgs.openldap}/etc/ldap.conf which is always a sample config.
Pass sysconfdir=/etc at compile time, so that /etc/krb5.conf is embedded
in the library as the path of its config file.
Pass sysconfdir=${out}/etc at install time, so that the sample configs
and schema files are correctly included in the build output.
This hack works because the Makefiles are not smart enough to notice
that the sysconfdir variable has changed across invocations -- because
nobody ever writes their Makefiles to be that smart. :-)
Fixes NixOS#181937.
e7395f2 to
be2175d
Compare
|
Amended to make the tests rely on client config, so that they will fail if openldap isn't reading |
|
Well, I did run I quickly skimmed the failures and they all look like unrelated pre-existing breakages. I was a little concerned about but that problem reproduces on the |
|
Sorry, merged then reverted, this should've gone into staging, not master, given that it causes alot of rebuilds. |
kwohlfahrt
left a comment
There was a problem hiding this comment.
I'm late to the party, but agree the change looks good - I guess the PR needs to be reopened now to fix the correct base branch branch?
|
Successfully created backport PR #182395 for |
|
I'm currently doing the rebase locally and moving a few things around due to the test changes I just merged. I'm just building up to the openldap test on staging, so it takes a few minutes. |
Oops, sorry about that. I'm new to Nixos and didn't know about the staging branch. |
Description of changes
Fixes #181937 by passing
sysconfdir=twice.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes