Commit Graph

120 Commits

Author SHA1 Message Date
aszlig
f5106019d3 postgresql: Only use /run/postgresql on Linux
We only have /run on modern GNU/Linux systems and it's not necessarily
the case for Mac OS X or *BSD, so let's add the patch only if
stdenv.isLinux.

Thanks to @danbst for catching this.

Signed-off-by: aszlig <aszlig@nix.build>
2019-03-16 12:34:00 +01:00
aszlig
ef553788d0 postgresql: Move socket dir to /run/postgresql
The default, which is /tmp, has a few issues associated with it:

One being that it makes it easy for users on the system to spoof a
PostgreSQL server if it's not running, causing applications to connect
to their provided sockets instead of just failing to connect.

Another one is that it makes sandboxing of PostgreSQL and other services
unnecessarily difficult. This is already the case if only PrivateTmp is
used in a systemd service, so in order for such a service to be able to
connect to PostgreSQL, a bind mount needs to be done from /tmp to some
other path, so the service can access it. This pretty much defeats the
whole purpose of PrivateTmp.

We regularily run into issues with this in the past already (one example
would be https://github.com/NixOS/nixpkgs/pull/24317) and with the new
systemd-confinement mode upcoming in
https://github.com/NixOS/nixpkgs/pull/57519, it makes it even more
tedious to sandbox services.

I've tested this change against all the postgresql NixOS VM tests and
they still succeed and I also grepped through the source tree to replace
other occasions where we might have /tmp hardcoded. Luckily there were
very few occasions.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @ocharles, @thoughtpolice, @danbst
2019-03-15 04:52:35 +01:00
Danylo Hlynskyi
d0d099266e postgresql: fix regression in NixOS after update to 11.2 (#56146)
ryantm bot updates `psqlSchema` alongside with version: https://github.com/NixOS/nixpkgs/pull/50646, https://github.com/NixOS/nixpkgs/pull/55860
but `psqlSchema` is used to generate `stateDir`. It shouldn't be updated.

Ideally it should be equal to postgresql major version for pg versions,
but we already have deployments in /var/lib/postgresql/11.1. Strange why
nobody complained when it was changed from 11.0 -> 11.1.

I propose do correct naming for PG12+, but status quo for current versions.

Fixes https://github.com/NixOS/nixpkgs/issues/56134
2019-02-21 19:21:08 +02:00
Shea Levy
bb52ff3df8 postgresql: Don't move libs unnecessarily out of $lib.
In particular, when static linking pkgconfig expects libpq.a in $lib
2019-02-18 20:31:09 -05:00
R. RyanTM
e9aeffdc0a postgresql_11: 11.1 -> 11.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/postgresql/versions
2019-02-15 16:02:50 -08:00
John Ericson
c85a8a1fad postgresql: No need to refer to super
self.callPackage works fine for now. If/when that changes, we have a
repo-wide thing to deal with so no reason to do anything now.
2019-02-02 15:56:52 -05:00
Danylo Hlynskyi
8e985dced0 postgresql: reorganize package and its extensions (#54319)
* postgresql: reorganize package and it's extensions

Extracts some useful parts of https://github.com/NixOS/nixpkgs/pull/38698,
in particular, it's vision that postgresql plugins should be namespaced.
2019-01-26 19:46:57 +02:00
Austin Seipp
73f56ae191 nixpkgs: move postgresql patches into a common directory
This simply makes it easier to browse the PostgreSQL package directory. More to
come.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-19 17:33:32 -06:00
Lancelot SIX
ce235f70ca postgresql_9_3: drop
Postgresql 9.3 reached end of life on november 11, 2018 (see
https://www.postgresql.org/about/news/1905/)

(Rebase of #52052. Closes #52052.)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-12-31 08:44:57 -06:00
Franz Pletz
61bd0e851e postgresql: branch 9.3 is not maintained anymore
See https://www.postgresql.org/support/versioning/.
2018-12-17 16:35:48 +01:00
Alexey Shmalko
ef966c1952 Merge pull request #51719 from marsam/postgresql-build-icu-support
postgresql: Build with icu support
2018-12-10 01:52:54 +02:00
Mario Rodas
acc45d8f4f postgresql: Build with icu support 2018-12-08 00:33:39 -05:00
Frederik Rietdijk
9b81c7e455 Merge staging-next into staging 2018-11-29 09:18:35 +01:00
Frederik Rietdijk
9db2421d1f Merge master into staging-next 2018-11-29 08:12:56 +01:00
Jack Kelly
5987c5c694 postgresql: Remove static libs using host platform extension 2018-11-28 10:49:13 -06:00
Alyssa Ross
c41c195dc5 postgresql: disable parallel building on Darwin
There have been multiple reports of this failing.

Fixes https://github.com/NixOS/nixpkgs/issues/51093.
2018-11-27 20:13:23 +00:00
Domen Kožar
f31ea5a2d5 postgresql: conditionalize systemd (on darwin) 2018-11-27 19:38:54 +00:00
Domen Kožar
d04fedd715 postgresql: Enable systemd integration for 9.6+
This allows, finally, proper detection when postgresql is ready to
accept connections. Until now, it was possible that services depending
on postgresql would fail in a race condition trying to connect
to postgresql.
2018-11-27 19:16:21 +00:00
R. RyanTM
128a446c59 postgresql_11: 11.0 -> 11.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/postgresql/versions
2018-11-26 09:53:36 -06:00
Lancelot SIX
3cbc20e8c4 postgresql_11: 11.0 -> 11.1
See https://www.postgresql.org/about/news/1905/ for release information.
Fixes CVE-2018-16850
2018-11-09 09:42:45 +01:00
Lancelot SIX
575151eb08 postgresql_10: 10.5 -> 10.6
See https://www.postgresql.org/about/news/1905/ for release information.
Fixes CVE-2018-16850
2018-11-09 09:42:45 +01:00
Lancelot SIX
1670fd115d postgresql_9_6: 9.6.10 -> 9.6.11
See https://www.postgresql.org/about/news/1905/ for release information.
Fixes CVE-2018-16850
2018-11-09 09:42:44 +01:00
Lancelot SIX
f703ea62a0 postgresql_9_5: 9.5.14 -> 9.5.15
See https://www.postgresql.org/about/news/1905/ for release information.
Fixes CVE-2018-16850
2018-11-09 09:42:44 +01:00
Lancelot SIX
882c3b529c postgresql_9_4: 9.4.19 -> 9.4.20
See https://www.postgresql.org/about/news/1905/ for release information.
Fixes CVE-2018-16850
2018-11-09 09:42:44 +01:00
Lancelot SIX
5d37d63388 postgresql_9_3: 9.3.24 -> 9.3.25
See https://www.postgresql.org/about/news/1905/ for release information.
Fixes CVE-2018-16850
2018-11-09 09:42:37 +01:00
Austin Seipp
2266f2014b nixos/postgresql: add myself as maintainer
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-11-02 13:52:33 -05:00
Alyssa Ross
91c746cacc postgresql_11: init at 11.0 2018-10-30 14:33:35 +00:00
Alyssa Ross
c6c7d55790 postgresql*: use underscores in version numbers 2018-10-30 14:32:21 +00:00
Alyssa Ross
9594b59f13 postgresql10: rename from postgresql100 2018-10-30 12:40:20 +00:00
John Ericson
440ac01e5a postgresql: Fix cross compilation
b1548ce080 dropped the C compiler prefix
2018-08-20 10:12:18 +02:00
Vladimír Čunát
b1548ce080 postgresql*: fixup build by a side-step
https://github.com/NixOS/nixpkgs/pull/44767#issuecomment-414066070
2018-08-19 09:07:00 +02:00
Andreas Rammhold
5de601e0d2 postgresql93: 9.3.23 -> 9.3.24
Fixes CVE-2018-10915 & CVE-2018-10925

Release notes: https://www.postgresql.org/docs/current/static/release-9-3-24.html
2018-08-16 21:52:37 +02:00
Andreas Rammhold
2abb00e249 postgresql94: 9.4.18 -> 9.4.19
Fixes CVE-2018-10915 & CVE-2018-10925

Release notes: https://www.postgresql.org/docs/current/static/release-9-4-19.html
2018-08-16 21:52:37 +02:00
Andreas Rammhold
98d8db4c32 postgresql95: 9.5.13 -> 9.5.14
Fixes CVE-2018-10915 & CVE-2018-10925

Release notes: https://www.postgresql.org/docs/current/static/release-9-5-14.html
2018-08-16 21:52:30 +02:00
Andreas Rammhold
94c35894b0 postgresql96: 9.6.9 -> 9.6.10
Fixes CVE-2018-10915 & CVE-2018-10925

Release notes: https://www.postgresql.org/docs/current/static/release-9-6-10.html
2018-08-16 21:41:05 +02:00
Andreas Rammhold
1c4fc1dbd9 postgresql100: 10.4 -> 10.5
Fixes CVE-2018-10915 & CVE-2018-10925

Release notes: https://www.postgresql.org/docs/current/static/release-10-5.html
2018-08-16 21:38:29 +02:00
Christoph Hrdinka
72a35533e0 postgresql: fix tzdata path
Signed-off-by: Christoph Hrdinka <c.github@hrdinka.at>
2018-08-14 19:07:32 +01:00
John Ericson
f539c30095 postgresql: Fix nits after cross fixes 2018-08-02 18:48:06 -04:00
Ding Xiang Fei
003055a670 pass NIX_CFLAGS_COMPILE through mkDerivation instead 2018-07-31 11:23:17 +08:00
Ding Xiang Fei
c0ca3e36d6 be explicit on choice of uuid library 2018-07-30 15:47:10 +08:00
Ding Xiang Fei
e8682cafd6 always build against tzdata 2018-07-30 11:54:57 +08:00
Ding Xiang Fei
894705161c use NIX_CFLAGS_COMPILE 2018-07-29 21:21:46 +08:00
Ding Xiang Fei
a998a49ee4 reduce diffs due to reordering 2018-07-27 14:19:05 +08:00
Ding Xiang Fei
b2104d93ff point to the right libxml2 header folder 2018-07-27 14:12:25 +08:00
Ding Xiang Fei
5c7cfbc0f1 allow postgresql cross compiling 2018-07-25 16:32:42 +08:00
volth
dda95bae35 [bot] treewide: remove unused 'args@' in lambdas 2018-07-20 19:54:05 +00:00
Silvan Mosberger
446ec6df2d postgresql100: 10.3 -> 10.4
Fixes CVE-2018-1115

Release notes: https://www.postgresql.org/docs/10/static/release-10-4.html
2018-07-20 11:50:41 -05:00
Silvan Mosberger
d066cecd7d postgresql96: 9.6.8 -> 9.6.9
Fixes CVE-2018-1115

Release notes: https://www.postgresql.org/docs/10/static/release-9-6-9.html
2018-07-20 11:50:41 -05:00
Silvan Mosberger
ac5fdda5a6 postgresql95: 9.5.12 -> 9.5.13
Release notes: https://www.postgresql.org/docs/10/static/release-9-5-13.html
2018-07-20 11:50:41 -05:00
Silvan Mosberger
3d16732102 postgresql94: 9.4.17 -> 9.4.18
Release notes: https://www.postgresql.org/docs/10/static/release-9-4-18.html
2018-07-20 11:50:41 -05:00