diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2019-11-24 14:25:02 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2019-11-24 14:25:33 +0100 |
commit | 0d3159ce3a0ba9d0d7d6daaabd4da6052fbc5784 (patch) | |
tree | f90a8c6588f20ef60067ea7edb89599f1eb97391 /app-admin/sysklogd/sysklogd-2.0-r1.ebuild | |
parent | media-plugins/imlib2_loaders: wrap longdescription properly (diff) | |
download | gentoo-0d3159ce3a0ba9d0d7d6daaabd4da6052fbc5784.tar.gz gentoo-0d3159ce3a0ba9d0d7d6daaabd4da6052fbc5784.tar.bz2 gentoo-0d3159ce3a0ba9d0d7d6daaabd4da6052fbc5784.zip |
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@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@gentoo.org>
Diffstat (limited to 'app-admin/sysklogd/sysklogd-2.0-r1.ebuild')
-rw-r--r-- | app-admin/sysklogd/sysklogd-2.0-r1.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/app-admin/sysklogd/sysklogd-2.0-r1.ebuild b/app-admin/sysklogd/sysklogd-2.0-r1.ebuild new file mode 100644 index 000000000000..d7a075079882 --- /dev/null +++ b/app-admin/sysklogd/sysklogd-2.0-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic systemd toolchain-funcs + +DESCRIPTION="Standard log daemons" +HOMEPAGE="https://troglobit.com/sysklogd.html https://github.com/troglobit/sysklogd" +SRC_URI="https://github.com/troglobit/sysklogd/releases/download/v$(ver_cut 1-2)/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="klogd logger logrotate systemd" +RESTRICT="test" + +DEPEND=" + logger? ( + !<sys-apps/util-linux-2.34-r3 + !>=sys-apps/util-linux-2.34-r3[logger] + ) +" +RDEPEND="${DEPEND}" + +DOCS=( ChangeLog.md README.md ) + +PATCHES=( + "${FILESDIR}/${PN}-2.0-optional_logger.patch" +) + +pkg_setup() { + append-lfs-flags + tc-export CC +} + +src_prepare() { + default + eautoreconf +} + +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)) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + insinto /etc + doins syslog.conf + keepdir /etc/syslog.d + + newinitd "${FILESDIR}"/sysklogd.rc8 sysklogd + newconfd "${FILESDIR}"/sysklogd.confd2 sysklogd + + if use logrotate ; then + insinto /etc/logrotate.d + newins "${FILESDIR}"/sysklogd.logrotate sysklogd + sed 's@ -r 10M:10@@' -i "${ED}"/etc/conf.d/sysklogd || die + fi + + find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die +} + +pkg_postinst() { + if ! use logrotate && [[ -n ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 2.0 ; then + elog "Starting with version 2.0 syslogd has built in log rotation" + elog "functionality that does no longer require a running cron daemon." + elog "So we no longer install any log rotation cron files for sysklogd." + fi +} |