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

nixos/openldap: add bootstrapContents option #92544

Closed

Conversation

celestefox
Copy link
Contributor

@celestefox celestefox commented Jul 7, 2020

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
  • 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 nixpkgs-review --run "nixpkgs-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.

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.
@stale
Copy link

stale bot commented Jan 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 3, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 18, 2021
@stale
Copy link

stale bot commented Jul 19, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 19, 2021
@mweinelt mweinelt requested a review from Mic92 August 8, 2021 13:30
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 8, 2021
@Mic92
Copy link
Member

Mic92 commented Aug 8, 2021

Sorry. This went under the radar. If you could fix merge conflicts. I would test and merge this.

@stale
Copy link

stale bot commented Apr 19, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 19, 2022
@celestefox
Copy link
Contributor Author

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.

@celestefox celestefox closed this Jun 5, 2022
kwohlfahrt added a commit to kwohlfahrt/nixpkgs that referenced this pull request Jun 6, 2022
This addresses the original concern behind NixOS#92544
Mic92 pushed a commit to Mic92/nixpkgs that referenced this pull request Jun 29, 2022
This addresses the original concern behind NixOS#92544
Artturin pushed a commit to Artturin/nixpkgs that referenced this pull request Jul 27, 2022
This addresses the original concern behind NixOS#92544
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants