diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /app-admin/sysklogd | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'app-admin/sysklogd')
-rw-r--r-- | app-admin/sysklogd/Manifest | 10 | ||||
-rw-r--r-- | app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch | 40 | ||||
-rw-r--r-- | app-admin/sysklogd/files/sysklogd.confd2 | 6 | ||||
-rw-r--r-- | app-admin/sysklogd/files/sysklogd.rc8 | 94 | ||||
-rw-r--r-- | app-admin/sysklogd/files/sysklogd.rc9 | 82 | ||||
-rw-r--r-- | app-admin/sysklogd/metadata.xml | 2 | ||||
-rw-r--r-- | app-admin/sysklogd/sysklogd-2.0.2.ebuild | 68 | ||||
-rw-r--r-- | app-admin/sysklogd/sysklogd-2.0.3.ebuild | 77 |
8 files changed, 378 insertions, 1 deletions
diff --git a/app-admin/sysklogd/Manifest b/app-admin/sysklogd/Manifest index b135cec01488..3c0b91fc66ae 100644 --- a/app-admin/sysklogd/Manifest +++ b/app-admin/sysklogd/Manifest @@ -5,10 +5,18 @@ AUX sysklogd-1.5-build.patch 626 BLAKE2B 03fe37ad2095f88cfa5cf3b79ece26acf4d70f9 AUX sysklogd-1.5-debian-cron.patch 913 BLAKE2B 20c0fc489b5ed90576f02f400817537ba6a59dd3521de2bacbc97964748792069bbeb1a656e4384ce8edfca320c9f212f4f04f2c4c49374f9cd5b0b59bb30c2f SHA512 5af0a61e5fb8dd78c30fa42d747b4de3a4f68b80b86a2f53447d2277c98d72972c242ffe5649c30a9f08f30e27974fd3bfe4a5537fa1c7b8658312b0550b28e0 AUX sysklogd-1.5-glibc-2.24.patch 279 BLAKE2B 635ad71844161a13f5c95e670db49c486a856556f10ccd04ea7f4b9cb1252aa9788a2f4e17864d4e0155fd3ca148862a48ce0c4808e389d37f146087088e60be SHA512 35d92a0f1665d38201bdb2f4d4c0e5f17a6086f7a38e489ac4820cdff166419992253fa6c73e321c73e209e4b41a6e2363e19060ef48f18fef8c5ea65ac2664e AUX sysklogd-1.5-syslog-func-collision.patch 2273 BLAKE2B 7aa2ccaf4bb1663c7c71f0d9f67c17f39b6c61b4706352bf779eb9a790e2fed8753afeaa4c2234739513500383593ee2f59a87485378fb554589e0e9a77f61ad SHA512 1fc3e215a45d95dd11ca2d1713f9a3f416e82b9d60127da62d904071f02ec1e934aa099a20d09a7c1eea37f9d93dbaa0e0ce8118af9b58b92d781cc26659e5fc +AUX sysklogd-2.0.3-no_parallel_build.patch 1525 BLAKE2B c428f26bd96afed63b4df50f1cf99954fce78c45f33efff91ad03c22176c1b647669f94de9b0276b2f5460ddab96fdeca7a0925c11f78ee219a45634b716083b SHA512 e1386135e46b28fb9207a36dcd45a3b3dbc5abeedd814a57082ffd03604d70c03bf5ec14ff90698dc085ce55d1cbb2682f11aca652c64bbb755bbff1f55c2c70 AUX sysklogd.confd 113 BLAKE2B 392d4c0ac09d5dd85d01e4d57cb541271e3c09ce90671d6bfcbecfde64184c94603929bee0fe3ae2d65af2b6283919b8a6517c1e551f870d4c0e25bf1ffad051 SHA512 4553d85e93fb07e7d4a6ed0b47a3ea2044a5605adaac05223724c32a60bb8ae96d99ca95965c3931640beef234e976c1141b83f603aa8c6e8aca1dec20ca807c +AUX sysklogd.confd2 129 BLAKE2B 1b58336456d16fc93b3141adbe1730901e87ee991cba61b1ebc83542b521c2131afe0005a1a5629f884758ff70dc798279ecb3b456e895e879df4c08fa102043 SHA512 d106937527abc14921b973dbd4a90c90b1ae640f10e6d286c16d5f6ef91205cd3a2f2bf7323afb463e59d00995379123a88d22adf4458c58eb9b2cf4a221f5c4 AUX sysklogd.logrotate 402 BLAKE2B 2aba98bcef0516602268132507248ea44097541ac5659427f24a286661c500e6ff92b387f184bba84d0f10669ff9c917d7c8ee613c7fdb3a472434485b5f8c78 SHA512 655b25bc92c6d73807b11b0d64f97d619c067efb9fc16ee9c2aba5ba349b13991a22c83e7adaafb95e17578b17992992cab16d18b7bdb2be7d4fc876df5824f7 AUX sysklogd.rc7 1447 BLAKE2B 352be79eca7a99213557f29110a53eca85dfbc11e134eac48801b5d61ebca9e77beadbee10c7f86267fe3509e17352468f9f777d25a875d583292a409d5db071 SHA512 f3c8f00fbf65833735d57927fe25c6299103bbc0b8fa548103b4f2f06f0dc2aa2276f12326ff7477f4ba491a96ccd30fe01cc53e841b0ccee83c4dacabb5a94e +AUX sysklogd.rc8 1666 BLAKE2B 2646e706933318d03471b18f69123c845d125dfcd98eb118a2d5ca8e0bc174edccac63950f56ff4e076dc158b93d0b9bdacedc7419535dbbcce4574fadb381ac SHA512 e2da064c9525bb755dcd31861016bd61b99fc8fdd845c8246fe64792f118c5c2f21656b7a69c9ab459e627b5e443505cfad0449a9b378cc999e53018f221655d +AUX sysklogd.rc9 1550 BLAKE2B 8bfa8e31e42c4d06b630a79b80031c6e8ad5334bf8353b2217e23dfa69d3a7a11dfed8b614aec6bc22d374e97878bc0339af6094ce3aa9ad4021c35d9261b6fa SHA512 58aafffa09fc5eee28478d86a3a6b568c6c38106b796409b1f4a41edc10389875a4750fe0f34fb165af27cc85143963d51a873603a90fbee5ae7da923ac6c8c9 DIST sysklogd-1.5.1.tar.gz 90011 BLAKE2B c40bd8d5769f7d3d4141d602c74ac41e05a140743d18c4923d9368da7ba193ccb89a6837173994f0b7a9c290cc23f64513040434d7ab8df81b5d09b73b0263ad SHA512 a72196a1a172d25be1c4791ef6256fe71fa2ba8c1383d230e646e93f8a65c3a57c535189726325da4c792fdb2e9cb119bba43c878816a8e78e78189fd32b12b7 +DIST sysklogd-2.0.2.tar.gz 465933 BLAKE2B bc0181e43ca5996cfbf8a8a35d083f332e15f5c83215ec60b406cefc7817bb742d0ce094d6c0d9fe708d345db630a73ce408992d9aade18e5b69414ca4e2b2a6 SHA512 1e5e30162b1091c37801542ae44df3e5d1da09ead02dd74f81e1e35ebb2fea99bab372f00eca621340ca306a41629ccdfb3caa0d46db0fecf46e3030da932473 +DIST sysklogd-2.0.3.tar.gz 466919 BLAKE2B d9ada06dadb5a43ca7102cb24eaffa0494af2743f4714bab7d362cf480835ea9c3fc51ee171e4eb3b90380d63abe78c759bdfc5d946ec4d5bf8fce748cd916b9 SHA512 95ed0465e37b438d624b0a78d74c1194c57d117890492b5773c9ccefa7aa2c1f54ed510e54a29019fb2d7274200370031fe822a9316c154e64a2a01cb912d7a8 DIST sysklogd_1.5-6.diff.gz 25677 BLAKE2B 3cb1f596490998b6002d4656a2321a500ce9941a37737c0b9d4702bbb87d7bc9ba21b68e06d175e3c1714a701adc6b3312e18a556ebc9ef395d8968762830cb5 SHA512 816961a835a43057569f62fd20d9f7b5e0bfcfcb173b68947457708504db3ce47e635956c8a9564f9bd577d8f3c49dfc725d321dfd3370b2de918363c30f838e EBUILD sysklogd-1.5.1-r1.ebuild 1703 BLAKE2B 1b5f75d79a86e05f3b7f71523f794a1bcf4cce6b0242dd8564204edcb886c1c9e7a450f25e00e3899f159643dc9d65da38d8c40fbe25becda0522359485b4347 SHA512 f7355db8d66f1b73b09381aa43f9d7112646229bf2a68facc9cf2a5fdf290f95adbc7bd48203473f7d2a21ba608c23aba267d0a5875c5f6b464bff5d1b2752de -MISC metadata.xml 378 BLAKE2B b2ff06a70503694dcc5349aebb2d043cb74c10463e137c7bdd9ee6b5c1241e67fab49c201d08858b200a3007bea36e1d0ae1460e569b0b9e6f8281cf39c58c48 SHA512 9d7311cf197ebeec7e989d97d08a35360242ee0aa467e38e1715c6a425e1e279ddd75da8e2856c1238f357741d67bd67d07841425d7dcc3f8f964def8f02d15c +EBUILD sysklogd-2.0.2.ebuild 1704 BLAKE2B 80878e7f9b5b3f4b83bc4cc81140592dee743d5224fe39e5a5801726b5b8a78885b29deabdb2db73ecf4c88525aa6f9c1a4f7d4a4e1c34d16a3ad25fc24cf327 SHA512 0a35aee84334b06d152601c3fdeb7ac175686a37be4475d88b5cfbea38d6f299569d2004dbf4ee8f67156b7b31414964214364a3ee524e497aafa48d632f6c07 +EBUILD sysklogd-2.0.3.ebuild 1820 BLAKE2B af54756110e0528f3c5f59e1e9fd7ab890f305903649a22a4d3c37bd6b90e0a9eb93c5f4319c232bcf2726891a38b800478dcb8d3a585f55ec0308b72dc14c35 SHA512 c1c8f47062fcf0adfbde35a7d711744f5fcec56d922b057cc56dd6ec404e327643db70df3d4d1d7fc3ca630ecf27ba96a0d2fc08f6766429b7b05eefe3f63bce +MISC metadata.xml 513 BLAKE2B dbb65f1982fba7751a6c64809adcbe4d44ee4313693b9999dbd8d4e6596325fcbea9d8eef294821967f5ccef4f3f5da32510474dbfcc0d29743d42237e1efa85 SHA512 76e47e89a7eef4aa7156145447003085cea5670881e2228c2b8baad238a4bb1b0efe95c3829656119d9f6d291fd49ca0b424f66d17e8989ec71f39355c504218 diff --git a/app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch b/app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch new file mode 100644 index 000000000000..fa0f96ce2c81 --- /dev/null +++ b/app-admin/sysklogd/files/sysklogd-2.0.3-no_parallel_build.patch @@ -0,0 +1,40 @@ +From 9cf1f97cef04fed81c2407f7207795d7592ccb96 Mon Sep 17 00:00:00 2001 +From: Joachim Nilsson <troglobit@gmail.com> +Date: Fri, 6 Dec 2019 18:19:05 +0100 +Subject: [PATCH] Fix nasty parallel build problem reported by Gentoo and + Westermo + +Independently of each other both the Gentoo project and Westermo found +an issue with massively parallel builds on monster-core-machines. At +Westermo there are 40 core Xeon monsters that stumble when building +sysklogd. + +The Gentoo bug report is here: + + https://bugs.gentoo.org/701894 + +The problem stems from strlcat.c and strlcpy.c being used for both +the libcompat convenience library built for libsyslog and als for +syslogd when the system does not have either of the APIs in libc, +i.e. most Linux systems with GLIBC or musl libc. + +I can either rewrite the Makefile.am files to handle dependencies +better, or we just disable parallel build like this patch. There's +too few source files to gain anything from parallel build anyway. + +Signed-off-by: Joachim Nilsson <troglobit@gmail.com> +--- + Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index c4cc80f..7e2b854 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -46,3 +46,6 @@ release: distcheck + # Workaround for systemd unit file duing distcheck + DISTCHECK_CONFIGURE_FLAGS = --with-systemd=$$dc_install_base/$(systemd) --with-klogd + ++# Disable parallel build in top Makefile, we might otherwise get a very ++# bizarre build problem with strlcpy.o in libcompat and for syslogd. ++.NOTPARALLEL: diff --git a/app-admin/sysklogd/files/sysklogd.confd2 b/app-admin/sysklogd/files/sysklogd.confd2 new file mode 100644 index 000000000000..077f36bf6b64 --- /dev/null +++ b/app-admin/sysklogd/files/sysklogd.confd2 @@ -0,0 +1,6 @@ +# Config file for /etc/init.d/sysklogd + +SYSLOGD="-m 0 -s -s -r 10M:10" +# send warnings and above to the console +KLOGD="-c 3 -2" + diff --git a/app-admin/sysklogd/files/sysklogd.rc8 b/app-admin/sysklogd/files/sysklogd.rc8 new file mode 100644 index 000000000000..920ab9633264 --- /dev/null +++ b/app-admin/sysklogd/files/sysklogd.rc8 @@ -0,0 +1,94 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +depend() { + need clock hostname + provide logger +} + +has_klogd() { + [ -x "/usr/sbin/klogd" ] +} + +start_daemon() { + local retval=0 + local daemon="$1" + local options="$2" + local fg_opt="" + + case "${daemon}" in + syslogd) + fg_opt="-F" + ;; + klogd) + fgopt="-n" + ;; + *) + return 1 + ;; + esac + + ebegin "sysklogd -> start: ${daemon}" + start-stop-daemon --start --exec /usr/sbin/"${daemon}" \ + -b -m --pidfile /var/run/"${daemon}".pid \ + -- ${options} ${fg_opt} + retval=$? + eend ${retval} "Failed to start ${daemon}" + + return ${retval} +} + +stop_daemon() { + local retval=0 + local daemon="$1" + + [ -z "${daemon}" ] && return 1 + + ebegin "sysklogd -> stop: ${daemon}" + # syslogd can be stubborn some times (--retry 15)... + start-stop-daemon --stop --retry 15 --quiet --pidfile /var/run/"${daemon}".pid + retval=$? + eend ${retval} "Failed to stop ${daemon}" + + return ${retval} +} + +start() { + start_daemon "syslogd" "${SYSLOGD}" || return 1 + + # klogd do not always start proper if started too early + sleep 1 + + if has_klogd && ! start_daemon "klogd" "${KLOGD}" ; then + stop_daemon "syslogd" + return 1 + fi + + return 0 +} + +stop() { + if has_klogd ; then + stop_daemon "klogd" || return 1 + fi + stop_daemon "syslogd" || return 1 + return 0 +} + +reload() { + local ret=0 + + ebegin "Reloading configuration" + + start-stop-daemon --signal HUP --pidfile /var/run/syslogd.pid + ret=$((${ret} + $?)) + if has_klogd ; then + start-stop-daemon --signal USR1 --pidfile /var/run/klogd.pid + ret=$((${ret} + $?)) + fi + + eend ${ret} +} diff --git a/app-admin/sysklogd/files/sysklogd.rc9 b/app-admin/sysklogd/files/sysklogd.rc9 new file mode 100644 index 000000000000..b0479f1c1754 --- /dev/null +++ b/app-admin/sysklogd/files/sysklogd.rc9 @@ -0,0 +1,82 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" + +depend() { + need clock hostname + provide logger +} + +has_klogd() { + [ -x "/usr/sbin/klogd" ] +} + +start_daemon() { + local retval=0 + local daemon="$1" + local options="$2" + local fg_opt="" + + ebegin "sysklogd -> start: ${daemon}" + start-stop-daemon --start --exec /usr/sbin/"${daemon}" \ + -b -m --pidfile /var/run/"${daemon}".pid \ + -- -F ${options} + retval=$? + eend ${retval} "Failed to start ${daemon}" + + return ${retval} +} + +stop_daemon() { + local retval=0 + local daemon="$1" + + [ -z "${daemon}" ] && return 1 + + ebegin "sysklogd -> stop: ${daemon}" + # syslogd can be stubborn some times (--retry 15)... + start-stop-daemon --stop --retry 15 --quiet --pidfile /var/run/"${daemon}".pid + retval=$? + eend ${retval} "Failed to stop ${daemon}" + + return ${retval} +} + +start() { + start_daemon "syslogd" "${SYSLOGD}" || return 1 + + # klogd do not always start proper if started too early + sleep 1 + + if has_klogd && ! start_daemon "klogd" "${KLOGD}" ; then + stop_daemon "syslogd" + return 1 + fi + + return 0 +} + +stop() { + if has_klogd ; then + stop_daemon "klogd" || return 1 + fi + stop_daemon "syslogd" || return 1 + return 0 +} + +reload() { + local ret=0 + + ebegin "Reloading configuration" + + start-stop-daemon --signal HUP --pidfile /var/run/syslogd.pid + ret=$((${ret} + $?)) + if has_klogd ; then + start-stop-daemon --signal USR1 --pidfile /var/run/klogd.pid + ret=$((${ret} + $?)) + fi + + eend ${ret} +} diff --git a/app-admin/sysklogd/metadata.xml b/app-admin/sysklogd/metadata.xml index 094ccd37b3fd..be89c65a5ee9 100644 --- a/app-admin/sysklogd/metadata.xml +++ b/app-admin/sysklogd/metadata.xml @@ -6,6 +6,8 @@ <name>Gentoo Base System</name> </maintainer> <use> + <flag name="klogd">Build and install (deprecated) kernel logging daemon</flag> + <flag name="logger">Build the logger program</flag> <flag name="logrotate">use app-admin/logrotate for rotating logs rather than custom cron scripts</flag> </use> </pkgmetadata> diff --git a/app-admin/sysklogd/sysklogd-2.0.2.ebuild b/app-admin/sysklogd/sysklogd-2.0.2.ebuild new file mode 100644 index 000000000000..e9298b83532c --- /dev/null +++ b/app-admin/sysklogd/sysklogd-2.0.2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit 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${PV}/${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 ) + +pkg_setup() { + append-lfs-flags + tc-export CC +} + +src_configure() { + local myeconfargs=( + --runstatedir="${EPREFIX}"/run + $(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 +} diff --git a/app-admin/sysklogd/sysklogd-2.0.3.ebuild b/app-admin/sysklogd/sysklogd-2.0.3.ebuild new file mode 100644 index 000000000000..be89e5f845c6 --- /dev/null +++ b/app-admin/sysklogd/sysklogd-2.0.3.ebuild @@ -0,0 +1,77 @@ +# 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${PV}/${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}"/${P}-no_parallel_build.patch #701894 +) + +pkg_setup() { + append-lfs-flags + tc-export CC +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + --runstatedir="${EPREFIX}"/run + $(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.rc9 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 +} |