mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
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
This commit is contained in:
parent
4a8b1cc958
commit
0b3eef7441
11 changed files with 32 additions and 80 deletions
|
@ -26,6 +26,7 @@ let
|
|||
optionalString
|
||||
types
|
||||
versionAtLeast
|
||||
warn
|
||||
;
|
||||
|
||||
cfg = config.services.postgresql;
|
||||
|
@ -484,10 +485,18 @@ in
|
|||
|
||||
services.postgresql.package = let
|
||||
mkThrow = ver: throw "postgresql_${ver} was removed, please upgrade your postgresql version.";
|
||||
mkWarn = ver: warn ''
|
||||
The postgresql package is not pinned and selected automatically by
|
||||
`systemd.stateVersion`. Right now this is `pkgs.postgresql_${ver}`, the
|
||||
oldest postgresql version available and thus the next that will be
|
||||
removed when EOL on the next stable cycle.
|
||||
|
||||
See also https://endoflife.date/postgresql
|
||||
'';
|
||||
base = if versionAtLeast config.system.stateVersion "24.11" then pkgs.postgresql_16
|
||||
else if versionAtLeast config.system.stateVersion "23.11" then pkgs.postgresql_15
|
||||
else if versionAtLeast config.system.stateVersion "22.05" then pkgs.postgresql_14
|
||||
else if versionAtLeast config.system.stateVersion "21.11" then pkgs.postgresql_13
|
||||
else if versionAtLeast config.system.stateVersion "21.11" then mkWarn "13" pkgs.postgresql_13
|
||||
else if versionAtLeast config.system.stateVersion "20.03" then mkThrow "11"
|
||||
else if versionAtLeast config.system.stateVersion "17.09" then mkThrow "9_6"
|
||||
else mkThrow "9_5";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue