From: Elias Probst Date: Fri, 23 Oct 2015 21:25:09 +0000 (+0200) Subject: dev-db/postgresql: Handle RuntimeDirectory in systemd unit X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4d732339911b0ea2aa9b994efe17a92d42281504;p=gentoo.git dev-db/postgresql: Handle RuntimeDirectory in systemd unit Instead of using a separate `tmpfiles.d` definition to create `/run/postgresql`, let the service unit take care of it on its own. This prevents situations where the postgresql service can't start because `systemd-tmpfiles` wasn't run yet. Bug: https://bugs.gentoo.org/show_bug.cgi?id=563122 Package-Manager: portage-2.2.23 --- diff --git a/dev-db/postgresql/files/postgresql.service b/dev-db/postgresql/files/postgresql.service index 20ed27a10f29..a607169d22f4 100644 --- a/dev-db/postgresql/files/postgresql.service +++ b/dev-db/postgresql/files/postgresql.service @@ -47,5 +47,9 @@ TimeoutSec=300 # Disable OOM kill on the postmaster OOMScoreAdjust=-1000 +# Make sure the required runtimedir is present +RuntimeDirectory=postgresql +RuntimeDirectoryMode=1775 + [Install] WantedBy=multi-user.target diff --git a/dev-db/postgresql/files/postgresql.tmpfilesd b/dev-db/postgresql/files/postgresql.tmpfilesd deleted file mode 100644 index 26f44efa3288..000000000000 --- a/dev-db/postgresql/files/postgresql.tmpfilesd +++ /dev/null @@ -1 +0,0 @@ -d /run/postgresql 1775 postgres postgres - diff --git a/dev-db/postgresql/postgresql-9.0.23.ebuild b/dev-db/postgresql/postgresql-9.0.23-r1.ebuild similarity index 99% rename from dev-db/postgresql/postgresql-9.0.23.ebuild rename to dev-db/postgresql/postgresql-9.0.23-r1.ebuild index 174a686213e4..ac1b4fe859aa 100644 --- a/dev-db/postgresql/postgresql-9.0.23.ebuild +++ b/dev-db/postgresql/postgresql-9.0.23-r1.ebuild @@ -198,8 +198,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session diff --git a/dev-db/postgresql/postgresql-9.1.19.ebuild b/dev-db/postgresql/postgresql-9.1.19-r1.ebuild similarity index 99% rename from dev-db/postgresql/postgresql-9.1.19.ebuild rename to dev-db/postgresql/postgresql-9.1.19-r1.ebuild index e2ab37ede1c9..817622c4a539 100644 --- a/dev-db/postgresql/postgresql-9.1.19.ebuild +++ b/dev-db/postgresql/postgresql-9.1.19-r1.ebuild @@ -202,8 +202,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session diff --git a/dev-db/postgresql/postgresql-9.2.14.ebuild b/dev-db/postgresql/postgresql-9.2.14-r1.ebuild similarity index 99% rename from dev-db/postgresql/postgresql-9.2.14.ebuild rename to dev-db/postgresql/postgresql-9.2.14-r1.ebuild index 6ec39d36a746..83a2fa7543ce 100644 --- a/dev-db/postgresql/postgresql-9.2.14.ebuild +++ b/dev-db/postgresql/postgresql-9.2.14-r1.ebuild @@ -196,8 +196,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session diff --git a/dev-db/postgresql/postgresql-9.3.10.ebuild b/dev-db/postgresql/postgresql-9.3.10-r1.ebuild similarity index 99% rename from dev-db/postgresql/postgresql-9.3.10.ebuild rename to dev-db/postgresql/postgresql-9.3.10-r1.ebuild index dc084ca55d17..2367c975064a 100644 --- a/dev-db/postgresql/postgresql-9.3.10.ebuild +++ b/dev-db/postgresql/postgresql-9.3.10-r1.ebuild @@ -196,8 +196,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session diff --git a/dev-db/postgresql/postgresql-9.4.5.ebuild b/dev-db/postgresql/postgresql-9.4.5-r1.ebuild similarity index 99% rename from dev-db/postgresql/postgresql-9.4.5.ebuild rename to dev-db/postgresql/postgresql-9.4.5-r1.ebuild index a411b3837669..d705b1003811 100644 --- a/dev-db/postgresql/postgresql-9.4.5.ebuild +++ b/dev-db/postgresql/postgresql-9.4.5-r1.ebuild @@ -228,8 +228,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session diff --git a/dev-db/postgresql/postgresql-9.5_beta1.ebuild b/dev-db/postgresql/postgresql-9.5_beta1-r1.ebuild similarity index 99% rename from dev-db/postgresql/postgresql-9.5_beta1.ebuild rename to dev-db/postgresql/postgresql-9.5_beta1-r1.ebuild index 50d2cecefa65..cc14882a351c 100644 --- a/dev-db/postgresql/postgresql-9.5_beta1.ebuild +++ b/dev-db/postgresql/postgresql-9.5_beta1-r1.ebuild @@ -234,8 +234,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild index 36e35fdb8ba3..c2fe866097b0 100644 --- a/dev-db/postgresql/postgresql-9999.ebuild +++ b/dev-db/postgresql/postgresql-9999.ebuild @@ -186,8 +186,6 @@ src_install() { "${FILESDIR}/${PN}.service" | \ systemd_newunit - ${PN}-${SLOT}.service - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session