From e8b059a274a02308d245f1e8cf2e0930d5eac8ef Mon Sep 17 00:00:00 2001 From: wangmy Date: Mon, 29 Nov 2021 23:01:45 +0800 Subject: sysklogd: upgrade 2.2.3 -> 2.3.0 Changes: Add support for logger -k, early log to /dev/kmsg. Useful when logging from early system startup scripts before syslogd has started Support for extracting non-kernel log messages from /dev/kmsg Ignore EINVAL from kernel, caused warning message at first startup Use journald socket on systemd systems, not /dev/log Issue #38: add support for syslogd -C file to use file for caching the last seen kernel sequence number, default: /run/syslogd.cache. Note: syslogd relies on the location of this file to be wiped at system boot. The default, /run, is a RAM disk on modern systems Fixes Issue #34: regression in v2.2.3, causing loss of syslogd log messages like syslogd v2.2.3: restart. Issue #35: man pages lists -v as verbose mode, is actually version Issue #36: retry DNS lookup of remote syslog servers with res_init() to ensure name resolution at bootup when a remote DNS may temporarily be unreachable. Retry at most every five seconds, to prevent syslogd from monopolizing the CPU when emptying the kernel ring buffer Issue #39: update tests to use -P fn and -C fn Issue #40: improve documentation for syslogd.cache file requirements Issue #41: add missing documentation for -H option Issue #42: add option (-K) to always trust kernel timestamp. By default syslogd only trusts the kernel timestamp for the initial emptying of the kernel ring buffer Issue #43: avoid asserting (exiting) on and around Jan 19, 2038, when the UNIX epoch wraps around on 32-bit time_t systems libsyslog: handle EOVERFLOW from gettimeofday() on Jan 19, 2038 Avoid NULL pointers to internal logit() function, only triggered when in debug mode Replace \m with \n (missing newline) in logger usage text (From OE-Core rev: 84de7a1f3863989c437a8fcf34255399c10e4143) Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie --- meta/recipes-extended/sysklogd/sysklogd_2.2.3.bb | 56 ------------------------ meta/recipes-extended/sysklogd/sysklogd_2.3.0.bb | 56 ++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 meta/recipes-extended/sysklogd/sysklogd_2.2.3.bb create mode 100644 meta/recipes-extended/sysklogd/sysklogd_2.3.0.bb diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.2.3.bb b/meta/recipes-extended/sysklogd/sysklogd_2.2.3.bb deleted file mode 100644 index f4ecb7d459..0000000000 --- a/meta/recipes-extended/sysklogd/sysklogd_2.2.3.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "System Log Daemons" -DESCRIPTION = "The sysklogd package implements system log daemons: syslogd" -HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" -SECTION = "base" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5b4be4b2549338526758ef479c040943 \ - file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \ - " - -inherit update-rc.d update-alternatives systemd autotools - -SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1;protocol=https \ - file://sysklogd \ - " - -SRCREV = "17b68ca89ab814bb623b615c4e7088d619ed8829" - -S = "${WORKDIR}/git" - -EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger" - -do_install:append () { - install -d ${D}${sysconfdir} - install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf - install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog -} - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE:${PN} = "syslogd.service" -SYSTEMD_AUTO_ENABLE = "enable" - -INITSCRIPT_NAME = "syslog" -CONFFILES:${PN} = "${sysconfdir}/syslog.conf" -RCONFLICTS:${PN} = "rsyslog busybox-syslog syslog-ng" - -FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" - -ALTERNATIVE_PRIORITY = "100" - -ALTERNATIVE:${PN}-doc = "syslogd.8" -ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" - -pkg_prerm:${PN} () { - if test "x$D" = "x"; then - if test "$1" = "upgrade" -o "$1" = "remove"; then - /etc/init.d/syslog stop || : - fi - fi -} - -python () { - if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") -} diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.3.0.bb b/meta/recipes-extended/sysklogd/sysklogd_2.3.0.bb new file mode 100644 index 0000000000..0682ec1d63 --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd_2.3.0.bb @@ -0,0 +1,56 @@ +SUMMARY = "System Log Daemons" +DESCRIPTION = "The sysklogd package implements system log daemons: syslogd" +HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" +SECTION = "base" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5b4be4b2549338526758ef479c040943 \ + file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \ + " + +inherit update-rc.d update-alternatives systemd autotools + +SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1;protocol=https \ + file://sysklogd \ + " + +SRCREV = "03c2c9c68d5d02675326527774e7e9cba3490ba0" + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger" + +do_install:append () { + install -d ${D}${sysconfdir} + install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog +} + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "syslogd.service" +SYSTEMD_AUTO_ENABLE = "enable" + +INITSCRIPT_NAME = "syslog" +CONFFILES:${PN} = "${sysconfdir}/syslog.conf" +RCONFLICTS:${PN} = "rsyslog busybox-syslog syslog-ng" + +FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE:${PN}-doc = "syslogd.8" +ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" + +pkg_prerm:${PN} () { + if test "x$D" = "x"; then + if test "$1" = "upgrade" -o "$1" = "remove"; then + /etc/init.d/syslog stop || : + fi + fi +} + +python () { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} -- cgit v1.2.3-54-g00ecf