Bump buildroot to 2019.02

This commit is contained in:
2019-03-28 22:49:48 +01:00
parent 5598b1b762
commit 920d307141
5121 changed files with 78550 additions and 46132 deletions

View File

@@ -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

View File

@@ -1,39 +0,0 @@
From 1b824dd6389e209eab752d5a698c6093f311e3e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Mon, 11 Dec 2017 15:46:06 +0100
Subject: [PATCH] modules/json: Adaptions for json-c v0.13
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
Patch status: upstream commit 1b824dd6389e
modules/json/json-parser.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/json/json-parser.c b/modules/json/json-parser.c
index 0368ed8f7ffe..356df48b9fc7 100644
--- a/modules/json/json-parser.c
+++ b/modules/json/json-parser.c
@@ -20,6 +20,8 @@
* COPYING for details.
*/
+#define JSON_C_VER_013 (13 << 8)
+
#include "json-parser.h"
#include "dot-notation.h"
#include "scratch-buffers.h"
@@ -28,7 +30,10 @@
#include <ctype.h>
#include <json.h>
+
+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
#include <json_object_private.h>
+#endif
typedef struct _JSONParser
{
--
2.15.1

View File

@@ -0,0 +1,160 @@
From d85121c0dc700cad4bd9735b0ee1dab9addf9dd7 Mon Sep 17 00:00:00 2001
From: Kokan <kokaipeter@gmail.com>
Date: Thu, 17 Jan 2019 18:44:41 +0100
Subject: [PATCH] build: make dlsym optional
In case of static uClibc-ng lib, the <dlfcn.h> does not exists.
The signal-handler.c solves an issue in case of program src/dst
and Java destination. That combination is really rare if not impossible.
This patch simply disables own sigaction if <dlfcn.h> is not present.
Signed-off-by: Kokan <kokaipeter@gmail.com>
Downloaded from upstream commit
https://github.com/balabit/syslog-ng/commit/d85121c0dc700cad4bd9735b0ee1dab9addf9dd7
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
CMakeLists.txt | 1 +
configure.ac | 1 +
lib/CMakeLists.txt | 1 -
lib/Makefile.am | 1 -
lib/signal-handler.c | 8 ++++----
lib/signal-handler.h | 31 -------------------------------
syslog-ng-config.h.in | 1 +
7 files changed, 7 insertions(+), 37 deletions(-)
delete mode 100644 lib/signal-handler.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c847a547b..dee691388 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,7 @@ check_symbol_exists("getrandom" "sys/random.h" SYSLOG_NG_HAVE_GETRANDOM)
check_include_files(utmp.h SYSLOG_NG_HAVE_UTMP_H)
check_include_files(utmpx.h SYSLOG_NG_HAVE_UTMPX_H)
+check_include_files(dlfcn.h SYSLOG_NG_HAVE_DLFCN_H)
check_struct_has_member("struct utmpx" "ut_type" "utmpx.h" UTMPX_HAS_UT_TYPE LANGUAGE C)
check_struct_has_member("struct utmp" "ut_type" "utmp.h" UTMP_HAS_UT_TYPE LANGUAGE C)
diff --git a/configure.ac b/configure.ac
index 6bdd8d252..6ef0ad2b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,6 +627,7 @@ dnl ***************************************************************************
AC_HEADER_STDC
AC_CHECK_HEADER(dmalloc.h)
+AC_CHECK_HEADER(dlfcn.h)
AC_CHECK_HEADERS(strings.h \
getopt.h \
stropts.h \
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index be2da32a4..5268712e9 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -91,7 +91,6 @@ set (LIB_HEADERS
logthrdestdrv.h
logwriter.h
mainloop.h
- signal-handler.h
mainloop-call.h
mainloop-worker.h
mainloop-io-worker.h
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ec1928795..5f9e93d79 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -129,7 +129,6 @@ pkginclude_HEADERS += \
lib/logthrdestdrv.h \
lib/logwriter.h \
lib/mainloop.h \
- lib/signal-handler.h \
lib/mainloop-call.h \
lib/mainloop-worker.h \
lib/mainloop-io-worker.h \
diff --git a/lib/signal-handler.c b/lib/signal-handler.c
index 5657ba182..8f52f675b 100644
--- a/lib/signal-handler.c
+++ b/lib/signal-handler.c
@@ -21,14 +21,15 @@
* COPYING for details.
*
*/
-#include "signal-handler.h"
#include "syslog-ng.h"
#include "children.h"
-#ifndef _WIN32
+#include <signal.h>
+
+#if SYSLOG_NG_HAVE_DLFCN_H
+
#include <dlfcn.h>
-#endif
static const struct sigaction *sgchld_handler;
@@ -41,7 +42,6 @@ trigger_sigchld_handler_chain(int signum)
}
}
-#ifndef _WIN32
static int
call_original_sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
{
diff --git a/lib/signal-handler.h b/lib/signal-handler.h
deleted file mode 100644
index 36e5ac293..000000000
--- a/lib/signal-handler.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2018 Balabit
- * Copyright (c) 2018 Kokan
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * As an additional exemption you are allowed to compile & link against the
- * OpenSSL libraries as published by the OpenSSL project. See the file
- * COPYING for details.
- *
- */
-#ifndef SIGNAL_HANDLER_H_INCLUDED
-#define SIGNAL_HANDLER_H_INCLUDED
-
-#include <signal.h>
-
-void trigger_sigchld_handler_chain(int);
-
-#endif
diff --git a/syslog-ng-config.h.in b/syslog-ng-config.h.in
index 9e372f103..d8208eedd 100644
--- a/syslog-ng-config.h.in
+++ b/syslog-ng-config.h.in
@@ -38,6 +38,7 @@
#cmakedefine SYSLOG_NG_PATH_XSDDIR "@SYSLOG_NG_PATH_XSDDIR@"
#cmakedefine SYSLOG_NG_HAVE_GETUTENT @SYSLOG_NG_HAVE_GETUTENT@
#cmakedefine SYSLOG_NG_HAVE_GETUTXENT @SYSLOG_NG_HAVE_GETUTXENT@
+#cmakedefine SYSLOG_NG_HAVE_DLFCN_H @SYSLOG_NG_HAVE_DLFCN_H@
#cmakedefine SYSLOG_NG_HAVE_UTMPX_H @SYSLOG_NG_HAVE_UTMPX_H@
#cmakedefine SYSLOG_NG_HAVE_UTMP_H @SYSLOG_NG_HAVE_UTMP_H@
#cmakedefine SYSLOG_NG_HAVE_MODERN_UTMP @SYSLOG_NG_HAVE_MODERN_UTMP@
--
2.20.1

View File

@@ -1,38 +0,0 @@
#!/bin/sh
start() {
printf "Starting syslog-ng daemon: "
start-stop-daemon -S -q -p /var/run/syslog-ng.pid \
-x /usr/sbin/syslog-ng -- --pidfile /var/run/syslog-ng.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping syslog-ng daemon: "
start-stop-daemon -K -q -p /var/run/syslog-ng.pid \
-x /usr/sbin/syslog-ng
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -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

View File

@@ -1,4 +1,4 @@
@version: 3.10
@version: 3.19
source s_sys {
file("/proc/kmsg" program_override("kernel"));

View File

@@ -1,2 +1,5 @@
# Locally computed
sha256 a905fe7bad09dcf40bf03650ef1c287b511bf262d004464b8993a28ce58c9136 syslog-ng-3.10.1.tar.gz
sha256 5cf931a9d7bead0e6d9a2c65eee8f6005a005878f59aa280f3c4294257ed5178 syslog-ng-3.19.1.tar.gz
sha256 835219c8ca76156e6337236d1bcb8e617c0b1c2783b4a8bc478e18a86743d607 COPYING
sha256 ce3324c9f22299cfc7c281e5a6ab40fbe9c2ea1a67cee87226cb8cd39db1e1d2 GPL.txt
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LGPL.txt

View File

@@ -6,22 +6,17 @@
# When updating the version, please check at runtime if the version in
# syslog-ng.conf header needs to be updated
SYSLOG_NG_VERSION = 3.10.1
SYSLOG_NG_VERSION = 3.19.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
SYSLOG_NG_LICENSE_FILES = COPYING GPL.txt LGPL.txt
SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
eventlog libglib2 openssl pcre
# rabbit-mq needs -lrt
SYSLOG_NG_CONF_ENV = LIBS=-lrt
# 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
# We override busybox's S01logging init script
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
SYSLOG_NG_DEPENDENCIES += busybox
endif
ifeq ($(BR2_PACKAGE_GEOIP),y)
SYSLOG_NG_DEPENDENCIES += geoip
SYSLOG_NG_CONF_OPTS += --enable-geoip
@@ -47,9 +42,7 @@ SYSLOG_NG_CONF_OPTS += \
--enable-python \
--with-python=$(PYTHON3_VERSION_MAJOR)
else
SYSLOG_NG_CONF_OPTS += \
--disable-python \
--without-python
SYSLOG_NG_CONF_OPTS += --disable-python
endif
ifeq ($(BR2_PACKAGE_LIBESMTP),y)
@@ -88,6 +81,13 @@ 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 += \
@@ -98,8 +98,18 @@ SYSLOG_NG_CONF_OPTS += --disable-systemd
endif
define SYSLOG_NG_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/syslog-ng/S01logging \
$(TARGET_DIR)/etc/init.d/S01logging
$(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
$(INSTALL) -m 0644 -D package/syslog-ng/syslog-ng@default \
$(TARGET_DIR)/etc/default/syslog-ng@default
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/syslog-ng@.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslog-ng@default.service
endef
# By default syslog-ng installs a number of sample configuration

View File

@@ -0,0 +1,8 @@
#
# /etc/default/syslog-ng@default
#
CONFIG_FILE=/etc/syslog-ng.conf
PERSIST_FILE=/var/run/syslog-ng.persist
CONTROL_FILE=/var/run/syslog-ng.ctl
PID_FILE=/var/run/syslog-ng.pid
OTHER_OPTIONS="--enable-core"