initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
config BR2_PACKAGE_SYSKLOGD
|
||||
bool "sysklogd"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
help
|
||||
The continuation of the original sysklogd package, based on
|
||||
the original Berkeley syslog daemon. Now with kernel
|
||||
logging, and log rotation built-in. It can both receive from
|
||||
and send to remote syslog servers. The v2.x series include
|
||||
extended support for RFC5424 with an alt. syslogp() API for
|
||||
clients.
|
||||
|
||||
https://github.com/troglobit/sysklogd/
|
||||
|
||||
if BR2_PACKAGE_SYSKLOGD
|
||||
|
||||
config BR2_PACKAGE_SYSKLOGD_REMOTE_DELAY
|
||||
int "Retry delay (sec)"
|
||||
default "180"
|
||||
help
|
||||
Retry delay (seconds) for sending to remote syslog servers.
|
||||
|
||||
When set up to forward logs to a remote syslog server, the
|
||||
network may not always be available. E.g., default interface
|
||||
down, or no route to the remote server. This setting controls
|
||||
the back-off time before retrying.
|
||||
|
||||
Default: 180 seconds
|
||||
|
||||
config BR2_PACKAGE_SYSKLOGD_LOGGER
|
||||
bool "logger tool"
|
||||
help
|
||||
Generate log messages from scripts or from the command line.
|
||||
|
||||
This version of logger is receommended for use with sysklogd.
|
||||
It makes use of the new syslogp() API for RFC5424 style logs,
|
||||
e.g. MSGID, strucutred data (SD), etc.
|
||||
|
||||
The BusyBox, or util-linux, logger tools can also be used, but
|
||||
are limited to RFC3164 style messages.
|
||||
|
||||
endif
|
||||
|
||||
comment "sysklogd needs a toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="syslogd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
SYSLOGD_ARGS="-m 0"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
|
||||
-- $SYSLOGD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
# SIGHUP makes syslogd reload its configuration
|
||||
reload() {
|
||||
printf 'Reloading %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -s HUP -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|reload)
|
||||
"$1";;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,6 @@
|
||||
# Upstream .md5 and .sha256 from GitHub
|
||||
md5 2c6749c49f52b8c5dad18e9a9315e7dd sysklogd-2.2.3.tar.gz
|
||||
sha256 e7ea09c15511a63c430e84f65ce3bf55a0386ee419ab52e9341c4a9fabae59ad sysklogd-2.2.3.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 7a71d7603a7c4456df441463e54da35acf151c1be0879246de63544f1f34f477 LICENSE
|
||||
@@ -0,0 +1,44 @@
|
||||
################################################################################
|
||||
#
|
||||
# sysklogd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SYSKLOGD_VERSION = 2.2.3
|
||||
SYSKLOGD_SITE = https://github.com/troglobit/sysklogd/releases/download/v$(SYSKLOGD_VERSION)
|
||||
SYSKLOGD_LICENSE = BSD-3-Clause
|
||||
SYSKLOGD_LICENSE_FILES = LICENSE
|
||||
SYSKLOGD_CPE_ID_VENDOR = sysklogd_project
|
||||
|
||||
# Busybox install logger in /usr/bin, and syslogd in /sbin, so install in
|
||||
# the same locations so that busybox does not install its applets in there.
|
||||
SYSKLOGD_CONF_OPTS = \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/sbin \
|
||||
--with-suspend-time=$(BR2_PACKAGE_SYSKLOGD_REMOTE_DELAY)
|
||||
|
||||
# Disable/Enable utilities
|
||||
ifeq ($(BR2_PACKAGE_SYSKLOGD_LOGGER),y)
|
||||
SYSKLOGD_CONF_OPTS += --with-logger
|
||||
else
|
||||
SYSKLOGD_CONF_OPTS += --without-logger
|
||||
endif
|
||||
|
||||
define SYSKLOGD_INSTALL_SAMPLE_CONFIG
|
||||
$(INSTALL) -D -m 0644 $(@D)/syslog.conf \
|
||||
$(TARGET_DIR)/etc/syslog.conf
|
||||
endef
|
||||
|
||||
SYSKLOGD_POST_INSTALL_TARGET_HOOKS += SYSKLOGD_INSTALL_SAMPLE_CONFIG
|
||||
|
||||
define SYSKLOGD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D package/sysklogd/S01syslogd \
|
||||
$(TARGET_DIR)/etc/init.d/S01syslogd
|
||||
endef
|
||||
|
||||
define SYSKLOGD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/syslogd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/syslogd.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=System Logging Service
|
||||
Requires=syslog.socket
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/default/syslogd
|
||||
ExecStart=/sbin/syslogd -m 0 -F $SYSLOGD_ARGS
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=syslog.service
|
||||
Reference in New Issue
Block a user