Commit Graph

220 Commits

Author SHA1 Message Date
Wolfgang Walther
b492340e98 postgresql: add nlsSupport option 2024-11-23 17:11:59 +01:00
Wolfgang Walther
cb8a1c74f3 postgresql: add selinuxSupport option 2024-11-23 17:11:59 +01:00
Wolfgang Walther
ac3961828b postgresql: add tclSupport option 2024-11-23 17:11:59 +01:00
Wolfgang Walther
1d6870f81e postgresql: add ldapSupport option 2024-11-23 17:11:59 +01:00
Wolfgang Walther
53c64f04a7 postgresql: add perlSupport option 2024-11-23 17:11:59 +01:00
Wolfgang Walther
5f7a1e814c postgresql: make icu optional 2024-11-23 17:11:59 +01:00
Wolfgang Walther
6bafc8f578 postgresql: make PAM optional 2024-11-23 17:11:59 +01:00
Wolfgang Walther
a2128516a7 postgresql: sort and group dependencies
A bit of structure and much more diff-friendly.
2024-11-23 17:11:58 +01:00
github-actions[bot]
86f9d57ca7 Merge staging-next into staging 2024-11-17 00:16:47 +00:00
Maximilian Bosch
97a911e8fb Merge: nixos/postgresql: extension based hardening relaxation (#355010) 2024-11-16 22:29:36 +01:00
Martin Weinelt
d370af0785 nixos/postgresql: create infrastructure for relaxing systemd hardening
By matching on the package names of the plugins passed into the package
we can relax the systemd unit hardening as needed.
2024-11-16 17:29:34 +01:00
github-actions[bot]
26e917bf9c Merge staging-next into staging 2024-11-15 12:06:36 +00:00
Maximilian Bosch
0b3eef7441 postgresql_12: remove
This will be EOL at the end of November, so there's little reason to
keep it in 24.11[1]. As discussed, we'd like to keep it for as long as
possible to make sure there's a state in nixpkgs that has the latest
minor of postgresql_12 available with the most recent CVEs fixed for
people who cannot upgrade[2].

This aspect has been made explicit in the manual now for the next .11
release.

During the discussions it has been brought up that if people just do
`services.postgresql.enable = true;` and let the code decide the
postgresql version based on `system.stateVersion`, there's a chance that
such EOL dates will be missed. To make this harder, a warning will now
be raised when using the stateVersion-condition and the oldest still
available major is selected.

Additionally regrouped the postgresql things in the release notes to
make sure these are all shown consecutively. Otherwise it's a little
hard to keep track of all the changes made to postgresql in 24.11.

[1] https://endoflife.date/postgresql
[2] https://github.com/NixOS/nixpkgs/pull/353158#issuecomment-2453056692
2024-11-15 09:17:06 +01:00
Wolfgang Walther
797b544bda postgresql_16: 16.4 -> 16.5
Release Notes:
https://www.postgresql.org/about/news/postgresql-171-165-159-1414-1317-and-1221-released-2955/
2024-11-15 09:02:19 +01:00
github-actions[bot]
3f47e370d6 Merge staging-next into staging 2024-11-15 00:15:44 +00:00
Wolfgang Walther
8e48064d55 postgresql_17: 17.0 -> 17.1
Release Notes:
https://www.postgresql.org/about/news/postgresql-171-165-159-1414-1317-and-1221-released-2955/
2024-11-14 20:04:11 +01:00
Wolfgang Walther
9dc6733018 postgresql_15: 15.8 -> 15.9
Release Notes:
https://www.postgresql.org/about/news/postgresql-171-165-159-1414-1317-and-1221-released-2955/
2024-11-14 19:26:41 +01:00
Wolfgang Walther
cf1f7e7201 postgresql_14: 14.13 -> 14.14
Release Notes:
https://www.postgresql.org/about/news/postgresql-171-165-159-1414-1317-and-1221-released-2955/
2024-11-14 19:23:47 +01:00
Wolfgang Walther
b1a05d9399 postgresql_13: 13.16 -> 13.17
Release Notes:
https://www.postgresql.org/about/news/postgresql-171-165-159-1414-1317-and-1221-released-2955/
2024-11-14 19:20:16 +01:00
github-actions[bot]
dca0223667 Merge staging-next into staging 2024-11-10 18:04:23 +00:00
Maximilian Bosch
0644d3be87 Merge branch 'master' into staging-next 2024-11-10 18:34:57 +01:00
github-actions[bot]
a382145e6b Merge staging-next into staging 2024-11-10 00:15:47 +00:00
K900
7ebe9739ff Merge remote-tracking branch 'origin/master' into staging-next 2024-11-09 23:12:56 +03:00
Wolfgang Walther
9035573855 nixosTests.postgresql: move all postgresql related nixosTests into one folder
This makes it possible to run all those tests at once by building
nixosTests.postgresql and allow a simple entry to ci/OWNERS for all
tests.
2024-11-09 18:24:52 +01:00
Wolfgang Walther
139c546676 postgresql: add passthru.tests.postgresql-tls-client-cert
Same reasoning as commit before.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
f6c2de9262 postgresql: add passthru.tests.postgresql
Restructuring the nixosTests.postgresql test a little bit to allow
calling it with the specific versioned package from generic.nix.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
65ef7381c8 nixosTests.postgresql-jit: avoid manual imports
Same reasoning as commit before.
2024-11-09 18:24:50 +01:00
Wolfgang Walther
a1ae4377e0 nixosTests.postgresql-wal-receiver: avoid manual imports
Manually importing postgresql packages from the /pkgs/ folder or
manually importing the test from /nixos/tests/ in generic.nix is not
only ugly, but also forbidden should we ever move to pkgs/by-name.

We can achieve almost the same with a slightly different setup. We allow
overriding the postgresql package for the test via passthru.override, to
make sure that each postgresql_xx.tests.postgresql-wal-receiver is
properly teted with the right version.
2024-11-09 18:24:50 +01:00
Maximilian Bosch
3bf6a063b3 Merge: postgresqlPackages: fix some builds on darwin (#354748) 2024-11-09 18:21:30 +01:00
github-actions[bot]
9d10d593cf Merge staging-next into staging 2024-11-09 15:14:38 +00:00
github-actions[bot]
a90280100f Merge master into staging-next 2024-11-09 15:14:08 +00:00
Wolfgang Walther
4801d0c2a3 postgresql17Packages.{pg_cron,pg_hll}: fix build on x86_64-darwin
This fixes the following error:

error: comparison of integers of different signs: 'ssize_t' (aka 'long')
and 'const size_t' (aka 'const unsigned long') [-Werror,-Wsign-compare]
                if (part < iov[i].iov_len)
                    ~~~~ ^ ~~~~~~~~~~~~~~
2024-11-09 12:16:58 +01:00
Maximilian Bosch
676db52174 postgresql_17: fix build
Closes #354497

See https://www.postgresql.org/message-id/ba8e1bc0-8a99-45b7-8397-3f2e94415e03%40suse.de for context.
2024-11-08 20:36:48 +01:00
Maximilian Bosch
4cd083a3cd postgresql: drop build-time dependency on GHC
This replaces `writeShellApplication` with `writeShellScriptBin` that
doesn't perform a shellcheck. This makes it way easier to build
postgresql on staging since GHC is super slow to build, even with pretty
powerful machines.

Also Haskell updates are currently merged straight into master which
means that postgresql and all reverse dependencies require a rebuild on
master then[1].

[1] https://github.com/NixOS/nixpkgs/pull/354270#issuecomment-2463196665
2024-11-08 18:24:55 +01:00
github-actions[bot]
e953c01873 Merge staging-next into staging 2024-11-05 00:14:28 +00:00
Maximilian Bosch
184cda2b94 postgresql: remove danbst from maintainer list
Thanks a lot for all your work! If you ever come back to nixpkgs, feel
free to revert the commit, your return would be welcomed!
2024-11-02 15:47:50 +01:00
Maximilian Bosch
c65705940a postgresql: use team
Main motivation for this is that I'd like to get a feature-freeze ping:
we have old stuff to remove and quite a bit of things ongoing here, so
explicitly being part of the check-up process seems like a good thing.

Also added myself and wolfgangwalther to it.
2024-11-02 15:47:32 +01:00
github-actions[bot]
6d99484921 Merge staging-next into staging 2024-10-31 12:05:55 +00:00
Maximilian Bosch
a34f8f6c4b Merge: postgresql.withPackages: support withJIT and withoutJIT (#352158) 2024-10-31 10:35:07 +01:00
Wolfgang Walther
6cc9178c31 postgresql.withPackages: support withJIT and withoutJIT
This allows using postgresql.withPackages in the nixos module, which
calls withJIT and without JIT.

Supersedes #351968
2024-10-29 19:38:44 +01:00
Wolfgang Walther
e24121ec20 postgresqlPackages: replace custom installPhase with buildPostgresqlExtension helper 2024-10-29 09:55:20 +01:00
Fabián Heredia Montiel
34b62f7c47 Merge remote-tracking branch 'origin/master' into staging-next 2024-10-27 16:10:56 -06:00
Wolfgang Walther
4cc4534295 postgresql_17: init at 17.0 2024-10-26 15:15:24 +02:00
Wolfgang Walther
6178e9bd3c postgresql: remove deprecated enableSystemd override
This was deprecated in e6bfabf366, where
we agreed on removing this after one release in [1].

Time has come!

[1]: https://github.com/NixOS/nixpkgs/pull/292993#discussion_r1518883146
2024-09-26 19:08:55 +02:00
Wolfgang Walther
a7fdf2256a postgresql: simplify systemdSupport default value
systemd is not available on static platforms, so the isStatic check is
redundant.
2024-09-26 19:08:54 +02:00
Wolfgang Walther
de4ad2a6ac postgresql: use newer libuuid instead of ossp-uuid
Since PostgreSQL 9.4 it's possible to build with different uuid
libraries. Eversince, the postgres docs [1] have this to say:

  [..] the OSSP UUID library [..] is not well maintained, and is
  becoming increasingly difficult to port to newer platforms. [..]
  On Linux, OS X, and some other platforms, suitable functions are
  provided in the libuuid library, which originally came from the
  e2fsprogs project (though on modern Linux it is considered part of
  util-linux-ng).

Using e2fs for Darwin was introduced 9 years ago in #8574, which library
to use for Linux was never considered again. Thus, start building with
newer libs now.

As a side effect, we require one less patch if we decide to build with
meson later.

[1]: https://www.postgresql.org/docs/current/uuid-ossp.html
2024-09-26 19:08:54 +02:00
Wolfgang Walther
149aa98ce4 postgresql: run full test-suite during checkPhase
doCheck was enabled in #61395 which does not mention an explicit decision
for "check" instead of "check-world". The latter runs more tests, for example
for contrib modules etc. - but results in higher build times..

Running "nix-build -A postgresql":
- with doCheck = false: 46s
- with checkTarget = "check": 60s
- with checkTarget = "check-world": 75s
2024-09-26 09:40:04 +02:00
Maximilian Bosch
fc16319c06 Merge: postgresqlPackages: refactor extension checks with helper (#343486) 2024-09-25 19:06:11 +02:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00