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

postgresql: always create the bin directory in postgresqlAndPlugins #58251

Merged
merged 2 commits into from Jul 16, 2019

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Mar 25, 2019

This is needed because some PostgreSQL plugins don't have a bin
directory. If only these plugins are listed in cfg.extraPlugins
buildEnv will turn $out/bin into a symbolic link to ${pg}/bin. Lateron
we try to rm $out/bin/{pg_config,postgres,pg_ctl} which will then fail
because $out/bin will be read-only.

Rebased from #44379, which didn't get merged
Closes #22653

backport please

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This is needed because some PostgreSQL plugins don't have a bin
directory. If only these plugins are listed in cfg.extraPlugins buildEnv
will turn $out/bin into a symbolic link to ${pg}/bin. Lateron we try to
rm $out/bin/{pg_config,postgres,pg_ctl} which will then fail because
$out/bin will be read-only.
@aanderse
Copy link
Member

@marsam Is this PR still valid? Are you just waiting for review from someone like @thoughtpolice, @danbst, or @aszlig?

@marsam
Copy link
Contributor Author

marsam commented Jul 16, 2019

Is this PR still valid?

yes, is still valid. I'd really appreciate a review of the PostgreSQL package maintainers

@danbst danbst merged commit 4a2375c into NixOS:master Jul 16, 2019
@aanderse
Copy link
Member

Thanks team!

@marsam marsam deleted the postgresql-plugins-bin branch July 16, 2019 11:17
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.

Postgresql extraPlugins require /bin dir to exist in extension directory
6 participants