initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 98bd6106f8c48bc8f0a27bd712ed4ba6249e9a5f Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 13 Jan 2019 11:03:51 +0100
|
||||
Subject: [PATCH] fix build on m68k with uclibc
|
||||
|
||||
uclibc on m68k defines pthread_spinlock_t but does not define
|
||||
pthread_spin_trylock so check for this function before using it
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/0a6de11c030a4f39e402917809fc6d33fb463d1b
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/buytenh/ivykis/pull/17]
|
||||
---
|
||||
configure.ac | 3 +++
|
||||
src/spinlock.h | 4 ++++
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/lib/ivykis/configure.ac b/lib/ivykis/configure.ac
|
||||
index e9b10c0..24152a9 100644
|
||||
--- a/lib/ivykis/configure.ac
|
||||
+++ b/lib/ivykis/configure.ac
|
||||
@@ -110,6 +110,9 @@ AC_CACHE_CHECK(for linux/netfilter_ipv4.h, ac_cv_header_linux_netfilter_ipv4_h,
|
||||
# Check for pthread_spinlock_t.
|
||||
AC_CHECK_TYPES([pthread_spinlock_t], [], [], [[#include <pthread.h>]])
|
||||
|
||||
+# Check for pthread_spin_trylock
|
||||
+AC_CHECK_FUNCS([pthread_spin_trylock])
|
||||
+
|
||||
# Check which header file defines 'struct timespec'.
|
||||
for hdr in sys/time.h sys/timers.h time.h pthread.h
|
||||
do
|
||||
diff --git a/lib/ivykis/src/spinlock.h b/lib/ivykis/src/spinlock.h
|
||||
index ebcdbec..d837df8 100644
|
||||
--- a/lib/ivykis/src/spinlock.h
|
||||
+++ b/lib/ivykis/src/spinlock.h
|
||||
@@ -76,7 +76,11 @@ static inline void fallback_spin_unlock(fallback_spinlock_t *lock)
|
||||
|
||||
static inline int pthread_spinlocks_available(void)
|
||||
{
|
||||
+#ifdef HAVE_PTHREAD_SPIN_TRYLOCK
|
||||
return !!(pthread_spin_trylock != NULL);
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.14.1
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_SYSLOG_NG
|
||||
bool "syslog-ng"
|
||||
depends on BR2_USE_WCHAR # glib2
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
select BR2_PACKAGE_PCRE
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
syslog-ng is an enhanced log daemon, supporting a wide range
|
||||
of input and output methods: syslog, unstructured text,
|
||||
queueing, SQL & NoSQL
|
||||
|
||||
https://www.syslog-ng.com/products/open-source-log-management/
|
||||
|
||||
comment "syslog-ng needs a toolchain w/ wchar, threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="syslog-ng"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
SYSLOG_NG_ARGS=""
|
||||
|
||||
# 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 "/usr/sbin/$DAEMON" \
|
||||
-- $SYSLOG_NG_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 syslog-ng 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,16 @@
|
||||
@version: 3.34
|
||||
|
||||
source s_sys {
|
||||
file("/proc/kmsg" program_override("kernel"));
|
||||
unix-stream ("/dev/log");
|
||||
internal();
|
||||
};
|
||||
|
||||
destination d_all {
|
||||
file("/var/log/messages");
|
||||
};
|
||||
|
||||
log {
|
||||
source(s_sys);
|
||||
destination(d_all);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally computed
|
||||
sha256 cece39ec1c68c88d493705e0a528b83d038da384e89d4838393ccc75f62a2d4c syslog-ng-3.34.1.tar.gz
|
||||
sha256 e912cf1e1c09b81d61c0154eb6c179588622c31ad07bfb4a90c612d07ff09d9b COPYING
|
||||
sha256 ce3324c9f22299cfc7c281e5a6ab40fbe9c2ea1a67cee87226cb8cd39db1e1d2 GPL.txt
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LGPL.txt
|
||||
@@ -0,0 +1,135 @@
|
||||
################################################################################
|
||||
#
|
||||
# syslog-ng
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# When updating the version, please check at runtime if the version in
|
||||
# syslog-ng.conf header needs to be updated
|
||||
SYSLOG_NG_VERSION = 3.34.1
|
||||
SYSLOG_NG_SITE = https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOG_NG_VERSION)
|
||||
SYSLOG_NG_LICENSE = LGPL-2.1+ (syslog-ng core), GPL-2.0+ (modules)
|
||||
SYSLOG_NG_LICENSE_FILES = COPYING GPL.txt LGPL.txt
|
||||
SYSLOG_NG_CPE_ID_VENDOR = oneidentity
|
||||
SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
|
||||
libglib2 openssl pcre
|
||||
# We're patching configure.ac
|
||||
SYSLOG_NG_AUTORECONF = YES
|
||||
SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
|
||||
--disable-java --disable-java-modules --disable-mongodb
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GEOIP),y)
|
||||
SYSLOG_NG_DEPENDENCIES += geoip
|
||||
SYSLOG_NG_CONF_OPTS += --enable-geoip
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-geoip
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
||||
SYSLOG_NG_DEPENDENCIES += libcap
|
||||
SYSLOG_NG_CONF_OPTS += --enable-linux-caps
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-linux-caps
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
||||
SYSLOG_NG_DEPENDENCIES += python
|
||||
SYSLOG_NG_CONF_OPTS += \
|
||||
--enable-python \
|
||||
--with-python=$(PYTHON_VERSION_MAJOR)
|
||||
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
SYSLOG_NG_DEPENDENCIES += python3
|
||||
SYSLOG_NG_CONF_OPTS += \
|
||||
--enable-python \
|
||||
--with-python=$(PYTHON3_VERSION_MAJOR)
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-python
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBESMTP),y)
|
||||
SYSLOG_NG_DEPENDENCIES += libesmtp
|
||||
SYSLOG_NG_CONF_OPTS += --enable-smtp
|
||||
SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr"
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-smtp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JSON_C),y)
|
||||
SYSLOG_NG_DEPENDENCIES += json-c
|
||||
SYSLOG_NG_CONF_OPTS += --enable-json
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-json
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
|
||||
SYSLOG_NG_DEPENDENCIES += util-linux
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNET),y)
|
||||
SYSLOG_NG_DEPENDENCIES += libnet
|
||||
SYSLOG_NG_CONF_OPTS += \
|
||||
--with-libnet=$(STAGING_DIR)/usr/bin \
|
||||
--enable-spoof-source
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-spoof-source
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
SYSLOG_NG_DEPENDENCIES += libcurl
|
||||
SYSLOG_NG_CONF_OPTS += --enable-http
|
||||
SYSLOG_NG_CONF_OPTS += --with-libcurl="$(STAGING_DIR)/usr"
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-http
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RABBITMQ_C),y)
|
||||
SYSLOG_NG_DEPENDENCIES += rabbitmq-c
|
||||
SYSLOG_NG_CONF_OPTS += --enable-amqp
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-amqp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_INIT_SYSTEMD),y)
|
||||
SYSLOG_NG_DEPENDENCIES += systemd
|
||||
SYSLOG_NG_CONF_OPTS += \
|
||||
--enable-systemd \
|
||||
--with-systemdsystemunitdir=/usr/lib/systemd/system
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-systemd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
||||
SYSLOG_NG_DEPENDENCIES += netsnmp
|
||||
SYSLOG_NG_CONF_OPTS += --enable-afsnmp
|
||||
SYSLOG_NG_CONF_OPTS += --with-net-snmp="$(STAGING_DIR)/usr/bin"
|
||||
else
|
||||
SYSLOG_NG_CONF_OPTS += --disable-afsnmp
|
||||
endif
|
||||
|
||||
define SYSLOG_NG_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 0755 -D package/syslog-ng/S01syslog-ng \
|
||||
$(TARGET_DIR)/etc/init.d/S01syslog-ng
|
||||
endef
|
||||
|
||||
# By default syslog-ng installs a .service that requires a config file at
|
||||
# /etc/default, so provide one with the default values.
|
||||
define SYSLOG_NG_INSTALL_INIT_SYSTEMD
|
||||
mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/syslog-ng@.service.d
|
||||
printf '[Install]\nDefaultInstance=default\n' \
|
||||
>$(TARGET_DIR)/usr/lib/systemd/system/syslog-ng@.service.d/buildroot-default-instance.conf
|
||||
endef
|
||||
|
||||
# By default syslog-ng installs a number of sample configuration
|
||||
# files. Some of these rely on optional features being
|
||||
# enabled. Because of this buildroot uninstalls the shipped config
|
||||
# files and provides a simplified configuration.
|
||||
define SYSLOG_NG_FIXUP_CONFIG
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
DESTDIR=$(TARGET_DIR) scl-uninstall-local
|
||||
$(INSTALL) -D -m 0644 package/syslog-ng/syslog-ng.conf \
|
||||
$(TARGET_DIR)/etc/syslog-ng.conf
|
||||
endef
|
||||
|
||||
SYSLOG_NG_POST_INSTALL_TARGET_HOOKS = SYSLOG_NG_FIXUP_CONFIG
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user