commit:     0d3159ce3a0ba9d0d7d6daaabd4da6052fbc5784
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 24 13:25:02 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Nov 24 13:25:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d3159ce

app-admin/sysklogd: Revbump to set correct localstatedir path

This is required to not make syslogd bail out on startup if
/var/lib/run directory does not exist.

Reported-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://bugs.gentoo.org/701048
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-admin/sysklogd/files/sysklogd.rc8                              | 2 +-
 app-admin/sysklogd/{sysklogd-2.0.ebuild => sysklogd-2.0-r1.ebuild} | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/app-admin/sysklogd/files/sysklogd.rc8 
b/app-admin/sysklogd/files/sysklogd.rc8
index a6590d725a6..920ab963326 100644
--- a/app-admin/sysklogd/files/sysklogd.rc8
+++ b/app-admin/sysklogd/files/sysklogd.rc8
@@ -34,7 +34,7 @@ start_daemon() {
        ebegin "sysklogd -> start: ${daemon}"
        start-stop-daemon --start --exec /usr/sbin/"${daemon}" \
                -b -m --pidfile /var/run/"${daemon}".pid \
-               -- ${fg_opt} ${options}
+               -- ${options} ${fg_opt}
        retval=$?
        eend ${retval} "Failed to start ${daemon}"
 

diff --git a/app-admin/sysklogd/sysklogd-2.0.ebuild 
b/app-admin/sysklogd/sysklogd-2.0-r1.ebuild
similarity index 87%
rename from app-admin/sysklogd/sysklogd-2.0.ebuild
rename to app-admin/sysklogd/sysklogd-2.0-r1.ebuild
index c69300ca428..d7a07507988 100644
--- a/app-admin/sysklogd/sysklogd-2.0.ebuild
+++ b/app-admin/sysklogd/sysklogd-2.0-r1.ebuild
@@ -41,6 +41,11 @@ src_prepare() {
 
 src_configure() {
        local myeconfargs=(
+               # Required for correct pid file location. (bug #701048)
+               # syslogd appends "/run/syslogd.pid" to the localstatedir
+               # path, and tries to write to that file even when being
+               # started in foreground. So we need to pin this to /
+               --localstatedir="${EPREFIX}"/
                $(use_with klogd)
                $(use_with logger)
                $(use_with systemd systemd $(systemd_get_systemunitdir))

Reply via email to