-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
nixos/openldap: add bootstrapContents option #92544
Conversation
Adds a bootstrapContents option, which holds LDIF that is used to initialise the LDAP database if it did not exist previously. Motivation primarily came from that there is currently a problem where you cannot start openldap without an existing database, because of slaptest, but cannot easily create an empty database without running slapd manually.
I marked this as stale due to inactivity. → More info |
I marked this as stale due to inactivity. → More info |
Sorry. This went under the radar. If you could fix merge conflicts. I would test and merge this. |
I marked this as stale due to inactivity. → More info |
While this just got my attention: I have gone way off the path that needs this, and do not intend to make any changes, so I'm closing this pull request. |
This addresses the original concern behind NixOS#92544
This addresses the original concern behind NixOS#92544
This addresses the original concern behind NixOS#92544
Motivation for this change
Currently, you cannot start openldap without an existing database, because of slaptest being run in preStart, but cannot easily create an empty database without running slapd/slapadd manually, creating directories, fixing permissions, etc. This adds a bootstrapFile, which can be used to accomplish this.
Note: the existing test does not test this addition, but it has been tested in practice with Nixops, as well, albeit on 20.03. This may not be the best way to do any of this, but if so, I don't know what is.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)