Add OpenSSL 1.1 support
cover Add OpenSSL 1.1 support
Add OpenSSL 1.1 support:
- thrift, net-snmp: apply supporting patch
- syslog-ng: update component to version 3.15.1
.../net-snmp/fix-openssl-build-errors.patch | 171 +++++++++++++++++++++ .../recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 1 + ...07-enable-build-with-OpenSSL-1.1.0-series.patch | 28 ++++ ...-Compile-error-in-TSSLSocket.cpp-with-new.patch | 26 ++++ ...-C++-library-build-fails-if-OpenSSL-does-.patch | 45 ++++++ .../recipes-connectivity/thrift/thrift_0.9.3.bb | 3 + ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 ---- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 +++-- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 10 ++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 -- 12 files changed, 319 insertions(+), 61 deletions(-) create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch create mode 100644 meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch create mode 100644 meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch create mode 100644 meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
Signature · 1 line
2.11.0
PATCH 1/3 thrift: add support for openssl 1.1x
The newest Thrift version has currently no fix for building with gcc>=6. Rather posting supporting patches.
--- ...07-enable-build-with-OpenSSL-1.1.0-series.patch | 28 ++++++++++++++ ...-Compile-error-in-TSSLSocket.cpp-with-new.patch | 26 +++++++++++++ ...-C++-library-build-fails-if-OpenSSL-does-.patch | 45 ++++++++++++++++++++++ .../recipes-connectivity/thrift/thrift_0.9.3.bb | 3 ++ 4 files changed, 102 insertions(+) create mode 100644 meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch create mode 100644 meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch create mode 100644 meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch
meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch new file +28 -0
@@ -0,0 +1,28 @@ +diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +index 68e475d..19132ff 100644 +--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp ++++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +@@ -39,6 +39,7 @@ + #include <thrift/transport/PlatformSocket.h> + + #define OPENSSL_VERSION_NO_THREAD_ID 0x10000000L ++#define OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2 0x10100000L + + using namespace std; + using namespace apache::thrift::concurrency; +@@ -148,10 +149,15 @@ SSLContext::SSLContext(const SSLProtocol& protocol) { + ctx_ = SSL_CTX_new(SSLv3_method()); + } else if (protocol == TLSv1_0) { + ctx_ = SSL_CTX_new(TLSv1_method()); ++#if (OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2) + } else if (protocol == TLSv1_1) { + ctx_ = SSL_CTX_new(TLSv1_1_method()); + } else if (protocol == TLSv1_2) { + ctx_ = SSL_CTX_new(TLSv1_2_method()); ++#else ++ //Support for this versions will end on 2016-12-31 ++ //https://www.openssl.org/about/releasestrat.html ++#endif + } else { + /// UNKNOWN PROTOCOL! + throw TSSLException("SSL_CTX_new: Unknown protocol");
meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch new file +26 -0
@@ -0,0 +1,26 @@ +From cc4f32db13ddc62fbd1e316127c5a60f4080a2d3 Mon Sep 17 00:00:00 2001 +From: "James E. King, III" <[email protected]> +Date: Thu, 29 Sep 2016 15:04:09 -0400 +Subject: [PATCH] THRIFT-3878: fix interop with newer OpenSSL libraries + +--- + lib/cpp/src/thrift/transport/TSSLSocket.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +index 517151f714..1efb9f7a47 100644 +--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp ++++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp +@@ -108,7 +108,12 @@ void initializeOpenSSL() { + SSL_library_init(); + SSL_load_error_strings(); + // static locking ++ // newer versions of OpenSSL changed CRYPTO_num_locks - see THRIFT-3878 ++#ifdef CRYPTO_num_locks ++ mutexes = boost::shared_array<Mutex>(new Mutex[CRYPTO_num_locks()]); ++#else + mutexes = boost::shared_array<Mutex>(new Mutex[ ::CRYPTO_num_locks()]); ++#endif + if (mutexes == NULL) { + throw TTransportException(TTransportException::INTERNAL_ERROR, + "initializeOpenSSL() failed, "
meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch new file +45 -0
45 lines not on this page · raw message
meta-oe/recipes-connectivity/thrift/thrift_0.9.3.bb +3 -0
@@ -12,6 +12,9 @@ SRC_URI = "http://mirror.switch.ch/mirror/apache/dist/thrift/${PV}/${BPN}-${PV}. file://0001-Forcibly-disable-check-for-Qt5.patch \ file://0001-THRIFT-3828-In-cmake-avoid-use-of-both-quoted-paths-.patch \ file://0002-THRIFT-3831-in-test-cpp-explicitly-use-signed-char.patch \ + file://0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch \ + file://0005-THRIFT-3878-Compile-error-in-TSSLSocket.cpp-with-new.patch \ + file://0006-THRIFT-3736-C++-library-build-fails-if-OpenSSL-does-.patch \ " SRC_URI[md5sum] = "88d667a8ae870d5adeca8cb7d6795442"
Signature · 1 line
2.11.0
PATCH 2/3 syslog-ng: update to 3.15.1
In reply to Andrej Valek - Refresh and remove obsolete patches
- Version 3.15.1 supports OpenSSL 1.1
--- ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 ----------------- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 ++++----- .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 +++++++++++++++------- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 10 ++++++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ------- 6 files changed, 45 insertions(+), 61 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch deleted +0 -29
@@ -1,29 +0,0 @@ -Fix the memory leak problem when HAVE_ENVIRON is defined - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- -Index: syslog-ng-3.8.1/lib/gprocess.c -=================================================================== ---- syslog-ng-3.8.1.orig/lib/gprocess.c -+++ syslog-ng-3.8.1/lib/gprocess.c -@@ -1432,6 +1432,18 @@ g_process_startup_ok(void) - void - g_process_finish(void) - { -+#ifdef HAVE_ENVIRON -+ int i = 0; -+ -+ while (environ[i]) { -+ g_free(environ[i]); -+ ++i; -+ } -+ if (environ) -+ g_free(environ); -+ if (process_opts.argv_orig) -+ free(process_opts.argv_orig); -+#endif - g_process_remove_pidfile(); - } -
meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch +8 -8
@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <[email protected]> configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -Index: syslog-ng-3.8.1/configure.ac +Index: syslog-ng-3.15.1/configure.ac =================================================================== ---- syslog-ng-3.8.1.orig/configure.ac -+++ syslog-ng-3.8.1/configure.ac -@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof, +--- syslog-ng-3.15.1.orig/configure.ac ++++ syslog-ng-3.15.1/configure.ac +@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof, AC_ARG_ENABLE(memtrace, [ --enable-memtrace Enable alternative leak debugging code.]) +AC_ARG_ENABLE(thread-tls, -+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") ++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") + AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") -@@ -486,12 +489,14 @@ dnl ************************************ +@@ -591,12 +594,14 @@ dnl *************************************************************************** dnl Is the __thread keyword available? dnl ***************************************************************************
@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac -__thread int a; -]], -[a=0;])], --[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) +-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +if test "x$enable_thread_tls" != "xno"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <pthread.h> + __thread int a; + ]], + [a=0;])], -+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) ++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +fi dnl ***************************************************************************
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf +1 -1
@@ -1,4 +1,4 @@ -@version: 3.8 +@version: 3.15 # # Syslog-ng configuration file, compatible with default Debian syslogd # installation. Originally written by anonymous (I can't find his name)
meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +26 -12
@@ -7,25 +7,39 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start Upstream-Status: pending Signed-off-by: Li Xin <[email protected]> +Updated-by: Andrej Valek <[email protected]> --- contrib/systemd/syslog-ng.service | 5 ++--- 1 file changed, 2 insertion(+), 3 deletions(-) -diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service -index fc16f8d..8e09deb 100644 ---- a/contrib/systemd/syslog-ng.service -+++ b/contrib/systemd/syslog-ng.service -@@ -4,8 +4,8 @@ Description=System Logger Daemon - - [Service] +diff --git a/contrib/systemd/[email protected] b/contrib/systemd/[email protected] +index a28640e..93aec94 100644 +--- a/contrib/systemd/[email protected] ++++ b/contrib/systemd/[email protected] +@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target Type=notify --ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS + EnvironmentFile=-/etc/default/syslog-ng@%i + EnvironmentFile=-/etc/sysconfig/syslog-ng@%i +-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID - EnvironmentFile=-/etc/default/syslog-ng - EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal + StandardError=journal + Restart=on-failure +diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default +index 02da288..3a8215d 100644 +--- a/contrib/systemd/syslog-ng@default ++++ b/contrib/systemd/syslog-ng@default +@@ -1,5 +1,5 @@ + CONFIG_FILE=/etc/syslog-ng.conf +-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist +-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl +-PID_FILE=/var/run/syslog-ng.pid ++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist ++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl ++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid + OTHER_OPTIONS="--enable-core" + -- 1.8.4.2 -
meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb new file +10 -0
@@ -0,0 +1,10 @@ +require syslog-ng.inc + +SRC_URI += " \ + file://fix-config-libnet.patch \ + file://fix-invalid-ownership.patch \ + file://syslog-ng.service-the-syslog-ng-service.patch \ +" + +SRC_URI[md5sum] = "da59a65cd5e293ec0fa3d3ecf4984af9" +SRC_URI[sha256sum] = "a2dabd28674e2b558e4fb92484ad111d77bf7150070aa28556827130b479f9ef"
meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb deleted +0 -11
@@ -1,11 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af" -SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5"
Signature · 1 line
2.11.0
PATCH v2 1/1 syslog-ng: update to 3.15.1
- Refresh and remove obsolete patches
- Implement SystemD service files handling
- splitted service into default
- Remove dependency to eventlog
- external libevtlog library linking was removed
- Version 3.15.1 supports OpenSSL 1.1
--- ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 ----------------- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 ++++----- .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 +++++++++++++++------- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 21 +++++++----- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 10 ++++++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ------- 7 files changed, 58 insertions(+), 69 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch deleted +0 -29
@@ -1,29 +0,0 @@ -Fix the memory leak problem when HAVE_ENVIRON is defined - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- -Index: syslog-ng-3.8.1/lib/gprocess.c -=================================================================== ---- syslog-ng-3.8.1.orig/lib/gprocess.c -+++ syslog-ng-3.8.1/lib/gprocess.c -@@ -1432,6 +1432,18 @@ g_process_startup_ok(void) - void - g_process_finish(void) - { -+#ifdef HAVE_ENVIRON -+ int i = 0; -+ -+ while (environ[i]) { -+ g_free(environ[i]); -+ ++i; -+ } -+ if (environ) -+ g_free(environ); -+ if (process_opts.argv_orig) -+ free(process_opts.argv_orig); -+#endif - g_process_remove_pidfile(); - } -
meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch +8 -8
@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <[email protected]> configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -Index: syslog-ng-3.8.1/configure.ac +Index: syslog-ng-3.15.1/configure.ac =================================================================== ---- syslog-ng-3.8.1.orig/configure.ac -+++ syslog-ng-3.8.1/configure.ac -@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof, +--- syslog-ng-3.15.1.orig/configure.ac ++++ syslog-ng-3.15.1/configure.ac +@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof, AC_ARG_ENABLE(memtrace, [ --enable-memtrace Enable alternative leak debugging code.]) +AC_ARG_ENABLE(thread-tls, -+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") ++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") + AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") -@@ -486,12 +489,14 @@ dnl ************************************ +@@ -591,12 +594,14 @@ dnl *************************************************************************** dnl Is the __thread keyword available? dnl ***************************************************************************
@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac -__thread int a; -]], -[a=0;])], --[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) +-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +if test "x$enable_thread_tls" != "xno"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <pthread.h> + __thread int a; + ]], + [a=0;])], -+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) ++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +fi dnl ***************************************************************************
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf +1 -1
@@ -1,4 +1,4 @@ -@version: 3.8 +@version: 3.15 # # Syslog-ng configuration file, compatible with default Debian syslogd # installation. Originally written by anonymous (I can't find his name)
meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +26 -12
@@ -7,25 +7,39 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start Upstream-Status: pending Signed-off-by: Li Xin <[email protected]> +Updated-by: Andrej Valek <[email protected]> --- contrib/systemd/syslog-ng.service | 5 ++--- 1 file changed, 2 insertion(+), 3 deletions(-) -diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service -index fc16f8d..8e09deb 100644 ---- a/contrib/systemd/syslog-ng.service -+++ b/contrib/systemd/syslog-ng.service -@@ -4,8 +4,8 @@ Description=System Logger Daemon - - [Service] +diff --git a/contrib/systemd/[email protected] b/contrib/systemd/[email protected] +index a28640e..93aec94 100644 +--- a/contrib/systemd/[email protected] ++++ b/contrib/systemd/[email protected] +@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target Type=notify --ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS + EnvironmentFile=-/etc/default/syslog-ng@%i + EnvironmentFile=-/etc/sysconfig/syslog-ng@%i +-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID - EnvironmentFile=-/etc/default/syslog-ng - EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal + StandardError=journal + Restart=on-failure +diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default +index 02da288..3a8215d 100644 +--- a/contrib/systemd/syslog-ng@default ++++ b/contrib/systemd/syslog-ng@default +@@ -1,5 +1,5 @@ + CONFIG_FILE=/etc/syslog-ng.conf +-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist +-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl +-PID_FILE=/var/run/syslog-ng.pid ++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist ++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl ++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid + OTHER_OPTIONS="--enable-core" + -- 1.8.4.2 -
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +13 -8
@@ -13,7 +13,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" # util-linux added to get libuuid -DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" +DEPENDS = "libpcre flex glib-2.0 openssl util-linux" SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ file://syslog-ng.conf \
@@ -67,12 +67,6 @@ do_configure_prepend() { cd $olddir } -do_install_prepend() { - sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service -} - do_install_append() { install -d ${D}/${sysconfdir}/${BPN} install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
@@ -83,6 +77,17 @@ do_install_append() { install -d ${D}/${localstatedir}/lib/${BPN} # Remove /var/run as it is created on startup rm -rf ${D}${localstatedir}/run + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${systemd_unitdir}/system/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + fi } FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
@@ -108,7 +113,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}.service" +SYSTEMD_SERVICE_${PN} = "${BPN}@default ${BPN}@.service" INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."
meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb new file +10 -0
@@ -0,0 +1,10 @@ +require syslog-ng.inc + +SRC_URI += " \ + file://fix-config-libnet.patch \ + file://fix-invalid-ownership.patch \ + file://syslog-ng.service-the-syslog-ng-service.patch \ +" + +SRC_URI[md5sum] = "da59a65cd5e293ec0fa3d3ecf4984af9" +SRC_URI[sha256sum] = "a2dabd28674e2b558e4fb92484ad111d77bf7150070aa28556827130b479f9ef"
meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb deleted +0 -11
@@ -1,11 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af" -SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5"
Signature · 1 line
2.11.0
Re: [meta-oe][PATCH v2] syslog-ng: update to 3.15.1
Fails to build with qemux86_64/musl
In file included from /mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/limits.h:8,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/lib/glib-2.0/include/glibconfig.h:11,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/gtypes.h:32,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/galloca.h:32,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib.h:30,
from ../syslog-ng-3.15.1/lib/compat/glib.h:31,
from../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.h:27,
from../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c:31:../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c: In function 'nondumpable_buffer_alloc':../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c:107:9:
error: expected identifier or '(' before numeric constant
gsize PAGESIZE = sysconf(_SC_PAGE_SIZE);
^~~~~~~~Quoted 266 lines · Andrej Valek
- Refresh and remove obsolete patches
- Implement SystemD service files handling
- splitted service into default
- Remove dependency to eventlog
- external libevtlog library linking was removed
- Version 3.15.1 supports OpenSSL 1.1Signed-off-by Andrej Valek <[email protected]>--- ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 ----------------- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 ++++----- .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 +++++++++++++++------- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 21 +++++++----- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 10 ++++++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ------- 7 files changed, 58 insertions(+), 69 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bbmeta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch deleted +0
-29@@ -1,29 +0,0 @@ -Fix the memory leak problem when HAVE_ENVIRON is defined - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- -Index: syslog-ng-3.8.1/lib/gprocess.c -=================================================================== ---- syslog-ng-3.8.1.orig/lib/gprocess.c -+++ syslog-ng-3.8.1/lib/gprocess.c -@@ -1432,6 +1432,18 @@ g_process_startup_ok(void) - void - g_process_finish(void) - { -+#ifdef HAVE_ENVIRON -+ int i = 0; -+ -+ while (environ[i]) { -+ g_free(environ[i]); -+ ++i; -+ } -+ if (environ) -+ g_free(environ); -+ if (process_opts.argv_orig) -+ free(process_opts.argv_orig); -+#endif - g_process_remove_pidfile(); - } -meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch +8
-8@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <[email protected]> configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -Index: syslog-ng-3.8.1/configure.ac +Index: syslog-ng-3.15.1/configure.ac =================================================================== ---- syslog-ng-3.8.1.orig/configure.ac -+++ syslog-ng-3.8.1/configure.ac -@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof, +--- syslog-ng-3.15.1.orig/configure.ac ++++ syslog-ng-3.15.1/configure.ac +@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof, AC_ARG_ENABLE(memtrace, [ --enable-memtrace Enable alternative leak debugging code.]) +AC_ARG_ENABLE(thread-tls, -+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") ++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") + AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") -@@ -486,12 +489,14 @@ dnl ************************************ +@@ -591,12 +594,14 @@ dnl *************************************************************************** dnl Is the __thread keyword available? dnl ***************************************************************************@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac -__thread int a; -]], -[a=0;])], --[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) +-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +if test "x$enable_thread_tls" != "xno"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <pthread.h> + __thread int a; + ]], + [a=0;])], -+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) ++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +fi dnl ***************************************************************************meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf +1
-1@@ -1,4 +1,4 @@ -@version: 3.8 +@version: 3.15 # # Syslog-ng configuration file, compatible with default Debian syslogd # installation. Originally written by anonymous (I can't find his name)meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +26
-12@@ -7,25 +7,39 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start Upstream-Status: pending Signed-off-by: Li Xin <[email protected]> +Updated-by: Andrej Valek <[email protected]> --- contrib/systemd/syslog-ng.service | 5 ++--- 1 file changed, 2 insertion(+), 3 deletions(-) -diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service -index fc16f8d..8e09deb 100644 ---- a/contrib/systemd/syslog-ng.service -+++ b/contrib/systemd/syslog-ng.service -@@ -4,8 +4,8 @@ Description=System Logger Daemon - - [Service] +diff --git a/contrib/systemd/[email protected] b/contrib/systemd/[email protected] +index a28640e..93aec94 100644 +--- a/contrib/systemd/[email protected] ++++ b/contrib/systemd/[email protected] +@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target Type=notify --ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS + EnvironmentFile=-/etc/default/syslog-ng@%i + EnvironmentFile=-/etc/sysconfig/syslog-ng@%i +-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID - EnvironmentFile=-/etc/default/syslog-ng - EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal + StandardError=journal + Restart=on-failure +diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default +index 02da288..3a8215d 100644 +--- a/contrib/systemd/syslog-ng@default ++++ b/contrib/systemd/syslog-ng@default +@@ -1,5 +1,5 @@ + CONFIG_FILE=/etc/syslog-ng.conf +-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist +-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl +-PID_FILE=/var/run/syslog-ng.pid ++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist ++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl ++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid + OTHER_OPTIONS="--enable-core" + -- 1.8.4.2 -meta-oe/recipes-support/syslog-ng/syslog-ng.inc +13
-8@@ -13,7 +13,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" # util-linux added to get libuuid -DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" +DEPENDS = "libpcre flex glib-2.0 openssl util-linux" SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ file://syslog-ng.conf \@@ -67,12 +67,6 @@ do_configure_prepend() { cd $olddir } -do_install_prepend() { - sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service -} - do_install_append() { install -d ${D}/${sysconfdir}/${BPN} install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf@@ -83,6 +77,17 @@ do_install_append() { install -d ${D}/${localstatedir}/lib/${BPN} # Remove /var/run as it is created on startup rm -rf ${D}${localstatedir}/run + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${systemd_unitdir}/system/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + fi } FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"@@ -108,7 +113,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}.service" +SYSTEMD_SERVICE_${PN} = "${BPN}@default ${BPN}@.service" INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb new file +10
-0@@ -0,0 +1,10 @@ +require syslog-ng.inc + +SRC_URI += " \ + file://fix-config-libnet.patch \ + file://fix-invalid-ownership.patch \ + file://syslog-ng.service-the-syslog-ng-service.patch \ +" + +SRC_URI[md5sum] = "da59a65cd5e293ec0fa3d3ecf4984af9" +SRC_URI[sha256sum] = "a2dabd28674e2b558e4fb92484ad111d77bf7150070aa28556827130b479f9ef"meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb deleted +0
-12@@ -1,11 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af" -SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5" --2.11.0
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [meta-oe][PATCH v2] syslog-ng: update to 3.15.1
Hi Khem,
I have tested it on glibc@qemuarm/x86 before posting. After posted this error message, I have setup new build like this:
$ export MACHINE=qemux86-64 TCLIBC=musl $ . oe-init-build-env $ bitbake syslog-ng
It was compiled without any problems. libsecret-storage library was built.
How did you setup our build?
So, this error looks like that PAGESIZE is represented as constant. What about change type to long? Maybe there is a problem with capitalization.
Regards,
Andrej
Quoted 290 lines · Khem Raj
Fails to build with qemux86_64/musl
In file included from
/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/limits.h:8,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/lib/glib-2.0/include/glibconfig.h:11,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/gtypes.h:32,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/galloca.h:32,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib.h:30,from ../syslog-ng-3.15.1/lib/compat/glib.h:31, from
../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.h:27,
from../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c:31:../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c: In function 'nondumpable_buffer_alloc':../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c:107:9:
error: expected identifier or '(' before numeric constantgsize PAGESIZE = sysconf(_SC_PAGE_SIZE); ^~~~~~~~Quoted 266 lines · Andrej Valek
- Refresh and remove obsolete patches
- Implement SystemD service files handling
- splitted service into default
- Remove dependency to eventlog
- external libevtlog library linking was removed
- Version 3.15.1 supports OpenSSL 1.1Signed-off-by Andrej Valek <[email protected]>--- ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 ----------------- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 ++++----- .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 +++++++++++++++------- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 21 +++++++----- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 10 ++++++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ------- 7 files changed, 58 insertions(+), 69 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bbmeta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch deleted +0
-29@@ -1,29 +0,0 @@ -Fix the memory leak problem when HAVE_ENVIRON is defined - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- -Index: syslog-ng-3.8.1/lib/gprocess.c -=================================================================== ---- syslog-ng-3.8.1.orig/lib/gprocess.c -+++ syslog-ng-3.8.1/lib/gprocess.c -@@ -1432,6 +1432,18 @@ g_process_startup_ok(void) - void - g_process_finish(void) - { -+#ifdef HAVE_ENVIRON -+ int i = 0; -+ -+ while (environ[i]) { -+ g_free(environ[i]); -+ ++i; -+ } -+ if (environ) -+ g_free(environ); -+ if (process_opts.argv_orig) -+ free(process_opts.argv_orig); -+#endif - g_process_remove_pidfile(); - } -meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch +8
-8@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <[email protected]> configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -Index: syslog-ng-3.8.1/configure.ac +Index: syslog-ng-3.15.1/configure.ac =================================================================== ---- syslog-ng-3.8.1.orig/configure.ac -+++ syslog-ng-3.8.1/configure.ac -@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof, +--- syslog-ng-3.15.1.orig/configure.ac ++++ syslog-ng-3.15.1/configure.ac +@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof, AC_ARG_ENABLE(memtrace, [ --enable-memtrace Enable alternative leak debugging code.]) +AC_ARG_ENABLE(thread-tls, -+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") ++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") + AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") -@@ -486,12 +489,14 @@ dnl ************************************ +@@ -591,12 +594,14 @@ dnl *************************************************************************** dnl Is the __thread keyword available? dnl ***************************************************************************@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac -__thread int a; -]], -[a=0;])], --[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) +-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +if test "x$enable_thread_tls" != "xno"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <pthread.h> + __thread int a; + ]], + [a=0;])], -+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) ++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +fi dnl ***************************************************************************meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf +1
-1@@ -1,4 +1,4 @@ -@version: 3.8 +@version: 3.15 # # Syslog-ng configuration file, compatible with default Debian syslogd # installation. Originally written by anonymous (I can't find his name)meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +26
-12@@ -7,25 +7,39 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start Upstream-Status: pending Signed-off-by: Li Xin <[email protected]> +Updated-by: Andrej Valek <[email protected]> --- contrib/systemd/syslog-ng.service | 5 ++--- 1 file changed, 2 insertion(+), 3 deletions(-) -diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service -index fc16f8d..8e09deb 100644 ---- a/contrib/systemd/syslog-ng.service -+++ b/contrib/systemd/syslog-ng.service -@@ -4,8 +4,8 @@ Description=System Logger Daemon - - [Service] +diff --git a/contrib/systemd/[email protected] b/contrib/systemd/[email protected] +index a28640e..93aec94 100644 +--- a/contrib/systemd/[email protected] ++++ b/contrib/systemd/[email protected] +@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target Type=notify --ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS + EnvironmentFile=-/etc/default/syslog-ng@%i + EnvironmentFile=-/etc/sysconfig/syslog-ng@%i +-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID - EnvironmentFile=-/etc/default/syslog-ng - EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal + StandardError=journal + Restart=on-failure +diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default +index 02da288..3a8215d 100644 +--- a/contrib/systemd/syslog-ng@default ++++ b/contrib/systemd/syslog-ng@default +@@ -1,5 +1,5 @@ + CONFIG_FILE=/etc/syslog-ng.conf +-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist +-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl +-PID_FILE=/var/run/syslog-ng.pid ++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist ++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl ++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid + OTHER_OPTIONS="--enable-core" + -- 1.8.4.2 -meta-oe/recipes-support/syslog-ng/syslog-ng.inc +13
-8@@ -13,7 +13,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" # util-linux added to get libuuid -DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" +DEPENDS = "libpcre flex glib-2.0 openssl util-linux" SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ file://syslog-ng.conf \@@ -67,12 +67,6 @@ do_configure_prepend() { cd $olddir } -do_install_prepend() { - sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service -} - do_install_append() { install -d ${D}/${sysconfdir}/${BPN} install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf@@ -83,6 +77,17 @@ do_install_append() { install -d ${D}/${localstatedir}/lib/${BPN} # Remove /var/run as it is created on startup rm -rf ${D}${localstatedir}/run + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${systemd_unitdir}/system/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + fi } FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"@@ -108,7 +113,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}.service" +SYSTEMD_SERVICE_${PN} = "${BPN}@default ${BPN}@.service" INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb new file +10
-0@@ -0,0 +1,10 @@ +require syslog-ng.inc + +SRC_URI += " \ + file://fix-config-libnet.patch \ + file://fix-invalid-ownership.patch \ + file://syslog-ng.service-the-syslog-ng-service.patch \ +" + +SRC_URI[md5sum] = "da59a65cd5e293ec0fa3d3ecf4984af9" +SRC_URI[sha256sum] = "a2dabd28674e2b558e4fb92484ad111d77bf7150070aa28556827130b479f9ef"meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb deleted +0
-12@@ -1,11 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af" -SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5" --2.11.0
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [meta-oe][PATCH v2] syslog-ng: update to 3.15.1
Hi Andrej
Quoted 5 lines · Andrej Valek
Hi Khem,
I have tested it on glibc@qemuarm/x86 before posting. After posted this error message, I have setup new build like this:
Quoted 7 lines
$ export MACHINE=qemux86-64 TCLIBC=musl $ . oe-init-build-env $ bitbake syslog-ngIt was compiled without any problems. libsecret-storage library was built.
How did you setup our build?
Try to enable ptests as well. this is what I have in local.conf DISTRO_FEATURES_append = " largefile opengl ptest multiarch wayland pam "
then try
$ TCLIBC=musl bitbake syslog-ng
Quoted 298 lines
So, this error looks like that PAGESIZE is represented as constant. What about change type to long? Maybe there is a problem with capitalization.
Regards,
AndrejQuoted 290 lines · Khem Raj
Fails to build with qemux86_64/musl
In file included from
/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/limits.h:8,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/lib/glib-2.0/include/glibconfig.h:11,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/gtypes.h:32,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib/galloca.h:32,
from/mnt/a/oe/build/tmp/work/core2-64-bec-linux-musl/syslog-ng/3.15.1-r0/recipe-sysroot/usr/include/glib-2.0/glib.h:30,from ../syslog-ng-3.15.1/lib/compat/glib.h:31, from
../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.h:27,
from../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c:31:../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c: In function 'nondumpable_buffer_alloc':../syslog-ng-3.15.1/lib/secret-storage/nondumpable-allocator.c:107:9:
error: expected identifier or '(' before numeric constantgsize PAGESIZE = sysconf(_SC_PAGE_SIZE); ^~~~~~~~Quoted 266 lines · Andrej Valek
- Refresh and remove obsolete patches
- Implement SystemD service files handling
- splitted service into default
- Remove dependency to eventlog
- external libevtlog library linking was removed
- Version 3.15.1 supports OpenSSL 1.1Signed-off-by Andrej Valek <[email protected]>--- ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 ----------------- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 ++++----- .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 +++++++++++++++------- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 21 +++++++----- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 10 ++++++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ------- 7 files changed, 58 insertions(+), 69 deletions(-)delete mode 100644
meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patchcreate mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb
delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bbmeta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch deleted +0
-29@@ -1,29 +0,0 @@ -Fix the memory leak problem when HAVE_ENVIRON is defined - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- -Index: syslog-ng-3.8.1/lib/gprocess.c -=================================================================== ---- syslog-ng-3.8.1.orig/lib/gprocess.c -+++ syslog-ng-3.8.1/lib/gprocess.c -@@ -1432,6 +1432,18 @@ g_process_startup_ok(void) - void - g_process_finish(void) - { -+#ifdef HAVE_ENVIRON -+ int i = 0; -+ -+ while (environ[i]) { -+ g_free(environ[i]); -+ ++i; -+ } -+ if (environ) -+ g_free(environ); -+ if (process_opts.argv_orig) -+ free(process_opts.argv_orig); -+#endif - g_process_remove_pidfile(); - } -meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch +8
-8@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <[email protected]> configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -Index: syslog-ng-3.8.1/configure.ac +Index: syslog-ng-3.15.1/configure.ac =================================================================== ---- syslog-ng-3.8.1.orig/configure.ac -+++ syslog-ng-3.8.1/configure.ac -@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof, +--- syslog-ng-3.15.1.orig/configure.ac ++++ syslog-ng-3.15.1/configure.ac +@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof, AC_ARG_ENABLE(memtrace, [ --enable-memtrace Enable alternative leak debugging code.]) +AC_ARG_ENABLE(thread-tls, -+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") ++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") + AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") -@@ -486,12 +489,14 @@ dnl ************************************ +@@ -591,12 +594,14 @@ dnl *************************************************************************** dnl Is the __thread keyword available? dnl ***************************************************************************@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac -__thread int a; -]], -[a=0;])], --[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) +-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +if test "x$enable_thread_tls" != "xno"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <pthread.h> + __thread int a; + ]], + [a=0;])], -+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) ++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +fi dnl ***************************************************************************meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf +1
-1@@ -1,4 +1,4 @@ -@version: 3.8 +@version: 3.15 # # Syslog-ng configuration file, compatible with default Debian syslogd # installation. Originally written by anonymous (I can't find his name)meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +26
-12@@ -7,25 +7,39 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start Upstream-Status: pending Signed-off-by: Li Xin <[email protected]> +Updated-by: Andrej Valek <[email protected]> --- contrib/systemd/syslog-ng.service | 5 ++--- 1 file changed, 2 insertion(+), 3 deletions(-) -diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service -index fc16f8d..8e09deb 100644 ---- a/contrib/systemd/syslog-ng.service -+++ b/contrib/systemd/syslog-ng.service -@@ -4,8 +4,8 @@ Description=System Logger Daemon - - [Service] +diff --git a/contrib/systemd/[email protected] b/contrib/systemd/[email protected] +index a28640e..93aec94 100644 +--- a/contrib/systemd/[email protected] ++++ b/contrib/systemd/[email protected] +@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target Type=notify --ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS + EnvironmentFile=-/etc/default/syslog-ng@%i + EnvironmentFile=-/etc/sysconfig/syslog-ng@%i +-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID - EnvironmentFile=-/etc/default/syslog-ng - EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal + StandardError=journal + Restart=on-failure +diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default +index 02da288..3a8215d 100644 +--- a/contrib/systemd/syslog-ng@default ++++ b/contrib/systemd/syslog-ng@default +@@ -1,5 +1,5 @@ + CONFIG_FILE=/etc/syslog-ng.conf +-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist +-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl +-PID_FILE=/var/run/syslog-ng.pid ++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist ++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl ++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid + OTHER_OPTIONS="--enable-core" + -- 1.8.4.2 -meta-oe/recipes-support/syslog-ng/syslog-ng.inc +13
-8@@ -13,7 +13,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" # util-linux added to get libuuid -DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" +DEPENDS = "libpcre flex glib-2.0 openssl util-linux" SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ file://syslog-ng.conf \@@ -67,12 +67,6 @@ do_configure_prepend() { cd $olddir } -do_install_prepend() { - sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service -} - do_install_append() { install -d ${D}/${sysconfdir}/${BPN} install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf@@ -83,6 +77,17 @@ do_install_append() { install -d ${D}/${localstatedir}/lib/${BPN} # Remove /var/run as it is created on startup rm -rf ${D}${localstatedir}/run + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${systemd_unitdir}/system/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + fi } FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"@@ -108,7 +113,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}.service" +SYSTEMD_SERVICE_${PN} = "${BPN}@default ${BPN}@.service" INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb new file +10
-0@@ -0,0 +1,10 @@ +require syslog-ng.inc + +SRC_URI += " \ + file://fix-config-libnet.patch \ + file://fix-invalid-ownership.patch \ + file://syslog-ng.service-the-syslog-ng-service.patch \ +" + +SRC_URI[md5sum] = "da59a65cd5e293ec0fa3d3ecf4984af9" +SRC_URI[sha256sum] = "a2dabd28674e2b558e4fb92484ad111d77bf7150070aa28556827130b479f9ef"meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb deleted +0
-12@@ -1,11 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af" -SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5" --2.11.0
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
PATCH v3 1/1 syslog-ng: update to 3.15.1
In reply to Andrej Valek - Refresh and remove obsolete patches
- Fix PAGESIZE variable conflicting
- PAGESIZE is a define in some libc libraries
- Implement SystemD service files handling
- splitted service into default
- Remove dependency to eventlog
- external libevtlog library linking was removed
- Version 3.15.1 supports OpenSSL 1.1
--- ...ry-leak-problem-when-HAVE_ENVIRON-defined.patch | 29 --------- ...c-add-option-enable-thread-tls-to-manage-.patch | 16 ++--- .../rename-PAGESIZE-variables-to-pagesize.patch | 72 ++++++++++++++++++++++ .../recipes-support/syslog-ng/files/syslog-ng.conf | 2 +- .../syslog-ng.service-the-syslog-ng-service.patch | 38 ++++++++---- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 21 ++++--- .../recipes-support/syslog-ng/syslog-ng_3.15.1.bb | 11 ++++ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ---- 8 files changed, 131 insertions(+), 69 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch create mode 100644 meta-oe/recipes-support/syslog-ng/files/rename-PAGESIZE-variables-to-pagesize.patch create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch deleted +0 -29
@@ -1,29 +0,0 @@ -Fix the memory leak problem when HAVE_ENVIRON is defined - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- -Index: syslog-ng-3.8.1/lib/gprocess.c -=================================================================== ---- syslog-ng-3.8.1.orig/lib/gprocess.c -+++ syslog-ng-3.8.1/lib/gprocess.c -@@ -1432,6 +1432,18 @@ g_process_startup_ok(void) - void - g_process_finish(void) - { -+#ifdef HAVE_ENVIRON -+ int i = 0; -+ -+ while (environ[i]) { -+ g_free(environ[i]); -+ ++i; -+ } -+ if (environ) -+ g_free(environ); -+ if (process_opts.argv_orig) -+ free(process_opts.argv_orig); -+#endif - g_process_remove_pidfile(); - } -
meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch +8 -8
@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <[email protected]> configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -Index: syslog-ng-3.8.1/configure.ac +Index: syslog-ng-3.15.1/configure.ac =================================================================== ---- syslog-ng-3.8.1.orig/configure.ac -+++ syslog-ng-3.8.1/configure.ac -@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof, +--- syslog-ng-3.15.1.orig/configure.ac ++++ syslog-ng-3.15.1/configure.ac +@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof, AC_ARG_ENABLE(memtrace, [ --enable-memtrace Enable alternative leak debugging code.]) +AC_ARG_ENABLE(thread-tls, -+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no") ++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") + AC_ARG_ENABLE(dynamic-linking, [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") -@@ -486,12 +489,14 @@ dnl ************************************ +@@ -591,12 +594,14 @@ dnl *************************************************************************** dnl Is the __thread keyword available? dnl ***************************************************************************
@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac -__thread int a; -]], -[a=0;])], --[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) +-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +if test "x$enable_thread_tls" != "xno"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <pthread.h> + __thread int a; + ]], + [a=0;])], -+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")]) ++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) +fi dnl ***************************************************************************
meta-oe/recipes-support/syslog-ng/files/rename-PAGESIZE-variables-to-pagesize.patch new file +72 -0
72 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf +1 -1
@@ -1,4 +1,4 @@ -@version: 3.8 +@version: 3.15 # # Syslog-ng configuration file, compatible with default Debian syslogd # installation. Originally written by anonymous (I can't find his name)
meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +26 -12
@@ -7,25 +7,39 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start Upstream-Status: pending Signed-off-by: Li Xin <[email protected]> +Updated-by: Andrej Valek <[email protected]> --- contrib/systemd/syslog-ng.service | 5 ++--- 1 file changed, 2 insertion(+), 3 deletions(-) -diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service -index fc16f8d..8e09deb 100644 ---- a/contrib/systemd/syslog-ng.service -+++ b/contrib/systemd/syslog-ng.service -@@ -4,8 +4,8 @@ Description=System Logger Daemon - - [Service] +diff --git a/contrib/systemd/[email protected] b/contrib/systemd/[email protected] +index a28640e..93aec94 100644 +--- a/contrib/systemd/[email protected] ++++ b/contrib/systemd/[email protected] +@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target Type=notify --ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS + EnvironmentFile=-/etc/default/syslog-ng@%i + EnvironmentFile=-/etc/sysconfig/syslog-ng@%i +-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID - EnvironmentFile=-/etc/default/syslog-ng - EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal + StandardError=journal + Restart=on-failure +diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default +index 02da288..3a8215d 100644 +--- a/contrib/systemd/syslog-ng@default ++++ b/contrib/systemd/syslog-ng@default +@@ -1,5 +1,5 @@ + CONFIG_FILE=/etc/syslog-ng.conf +-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist +-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl +-PID_FILE=/var/run/syslog-ng.pid ++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist ++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl ++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid + OTHER_OPTIONS="--enable-core" + -- 1.8.4.2 -
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +13 -8
@@ -13,7 +13,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" # util-linux added to get libuuid -DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" +DEPENDS = "libpcre flex glib-2.0 openssl util-linux" SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ file://syslog-ng.conf \
@@ -67,12 +67,6 @@ do_configure_prepend() { cd $olddir } -do_install_prepend() { - sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service -} - do_install_append() { install -d ${D}/${sysconfdir}/${BPN} install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
@@ -83,6 +77,17 @@ do_install_append() { install -d ${D}/${localstatedir}/lib/${BPN} # Remove /var/run as it is created on startup rm -rf ${D}${localstatedir}/run + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${systemd_unitdir}/system/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + fi } FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
@@ -108,7 +113,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}.service" +SYSTEMD_SERVICE_${PN} = "${BPN}@default ${BPN}@.service" INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."
meta-oe/recipes-support/syslog-ng/syslog-ng_3.15.1.bb new file +11 -0
@@ -0,0 +1,11 @@ +require syslog-ng.inc + +SRC_URI += " \ + file://fix-config-libnet.patch \ + file://fix-invalid-ownership.patch \ + file://syslog-ng.service-the-syslog-ng-service.patch \ + file://rename-PAGESIZE-variables-to-pagesize.patch \ +" + +SRC_URI[md5sum] = "da59a65cd5e293ec0fa3d3ecf4984af9" +SRC_URI[sha256sum] = "a2dabd28674e2b558e4fb92484ad111d77bf7150070aa28556827130b479f9ef"
meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb deleted +0 -11
@@ -1,11 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af" -SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5"
Signature · 1 line
2.11.0
PATCH 3/3 net-snmp: add support for openssl 1.1x
In reply to Andrej ValekPatch was copied from [https://sourceforge.net/p/net-snmp/patches/1336].
--- .../net-snmp/fix-openssl-build-errors.patch | 171 +++++++++++++++++++++ .../recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 1 + 2 files changed, 172 insertions(+) create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch
meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch new file +171 -0
@@ -0,0 +1,171 @@ +net-snmp build fails on Debian 9 with OpenSSL 1.1.0 + +With these changes, net-snmp builds with both +OpenSSL 1.0.x and 1.1.x. + +Author: Sharmila Podury <[email protected]> + +--- a/apps/snmpusm.c ++++ b/apps/snmpusm.c +@@ -125,6 +125,32 @@ char *usmUserPublic_val = NULL + int docreateandwait = 0; + + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ ++#include <string.h> ++#include <openssl/engine.h> ++ ++void DH_get0_pqg(const DH *dh, ++ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) ++{ ++ if (p != NULL) ++ *p = dh->p; ++ if (q != NULL) ++ *q = dh->q; ++ if (g != NULL) ++ *g = dh->g; ++} ++ ++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) ++{ ++ if (pub_key != NULL) ++ *pub_key = dh->pub_key; ++ if (priv_key != NULL) ++ *priv_key = dh->priv_key; ++} ++ ++#endif ++ + void + usage(void) + { +@@ -190,7 +216,7 @@ get_USM_DH_key(netsnmp_variable_list *va + oid *keyoid, size_t keyoid_len) { + u_char *dhkeychange; + DH *dh; +- BIGNUM *other_pub; ++ BIGNUM *p, *g, *pub_key, *other_pub; + u_char *key; + size_t key_len; + +@@ -205,25 +231,29 @@ get_USM_DH_key(netsnmp_variable_list *va + dh = d2i_DHparams(NULL, &cp, dhvar->val_len); + } + +- if (!dh || !dh->g || !dh->p) { ++ if (dh) ++ DH_get0_pqg(dh, &p, NULL, &g); ++ ++ if (!dh || !g || !p) { + SNMP_FREE(dhkeychange); + return SNMPERR_GENERR; + } + +- DH_generate_key(dh); +- if (!dh->pub_key) { ++ if (!DH_generate_key(dh)) { + SNMP_FREE(dhkeychange); + return SNMPERR_GENERR; + } + +- if (vars->val_len != (unsigned int)BN_num_bytes(dh->pub_key)) { ++ DH_get0_key(dh, &pub_key, NULL); ++ ++ if (vars->val_len != (unsigned int)BN_num_bytes(pub_key)) { + SNMP_FREE(dhkeychange); + fprintf(stderr,"incorrect diffie-helman lengths (%lu != %d)\n", +- (unsigned long)vars->val_len, BN_num_bytes(dh->pub_key)); ++ (unsigned long)vars->val_len, BN_num_bytes(pub_key)); + return SNMPERR_GENERR; + } + +- BN_bn2bin(dh->pub_key, dhkeychange + vars->val_len); ++ BN_bn2bin(pub_key, dhkeychange + vars->val_len); + + key_len = DH_size(dh); + if (!key_len) { +--- a/configure.d/config_os_libs2 ++++ b/configure.d/config_os_libs2 +@@ -327,10 +327,16 @@ if test "x$tryopenssl" != "xno" -a "x$tr + [[#include <openssl/evp.h>]]) + + AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create, +- AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [], ++ AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [1], + [Define to 1 if you have the `EVP_MD_CTX_create' function.]) +- AC_DEFINE([HAVE_EVP_MD_CTX_DESTROY], [], ++ AC_DEFINE([HAVE_EVP_MD_CTX_DESTROY], [1], + [Define to 1 if you have the `EVP_MD_CTX_destroy' function.])) ++ ++ AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_new, ++ AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1], ++ [Define to 1 if you have the `EVP_MD_CTX_new' function.]) ++ AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1], ++ [Define to 1 if you have the `EVP_MD_CTX_free' function.])) + fi + if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then + AC_CHECK_LIB(ssl, DTLSv1_method, +--- a/include/net-snmp/net-snmp-config.h.in ++++ b/include/net-snmp/net-snmp-config.h.in +@@ -164,6 +164,12 @@ + /* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ + #undef HAVE_EVP_MD_CTX_DESTROY + ++/* Define to 1 if you have the `EVP_MD_CTX_free' function. */ ++#undef HAVE_EVP_MD_CTX_FREE ++ ++/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ ++#undef HAVE_EVP_MD_CTX_NEW ++ + /* Define if you have EVP_sha224/256 in openssl */ + #undef HAVE_EVP_SHA224 + +--- a/snmplib/keytools.c ++++ b/snmplib/keytools.c +@@ -176,7 +176,9 @@ generate_Ku(const oid * hashtype, u_int + QUITFUN(SNMPERR_GENERR, generate_Ku_quit); + } + +-#ifdef HAVE_EVP_MD_CTX_CREATE ++#ifdef HAVE_EVP_MD_CTX_NEW ++ ctx = EVP_MD_CTX_new(); ++#elif HAVE_EVP_MD_CTX_CREATE + ctx = EVP_MD_CTX_create(); + #else + ctx = malloc(sizeof(*ctx)); +@@ -278,7 +280,9 @@ generate_Ku(const oid * hashtype, u_int + memset(buf, 0, sizeof(buf)); + #ifdef NETSNMP_USE_OPENSSL + if (ctx) { +-#ifdef HAVE_EVP_MD_CTX_DESTROY ++#ifdef HAVE_EVP_MD_CTX_FREE ++ EVP_MD_CTX_free(ctx); ++#elif HAVE_EVP_MD_CTX_DESTROY + EVP_MD_CTX_destroy(ctx); + #else + EVP_MD_CTX_cleanup(ctx); +--- a/snmplib/scapi.c ++++ b/snmplib/scapi.c +@@ -627,7 +627,9 @@ sc_hash(const oid * hashtype, size_t has + return SNMPERR_GENERR; + + /** initialize the pointer */ +-#ifdef HAVE_EVP_MD_CTX_CREATE ++#ifdef HAVE_EVP_MD_CTX_NEW ++ cptr = EVP_MD_CTX_new(); ++#elif HAVE_EVP_MD_CTX_CREATE + cptr = EVP_MD_CTX_create(); + #else + cptr = malloc(sizeof(*cptr)); +@@ -648,7 +650,9 @@ sc_hash(const oid * hashtype, size_t has + /** do the final pass */ + EVP_DigestFinal(cptr, MAC, &tmp_len); + *MAC_len = tmp_len; +-#ifdef HAVE_EVP_MD_CTX_DESTROY ++#ifdef HAVE_EVP_MD_CTX_FREE ++ EVP_MD_CTX_free(cptr); ++#elif HAVE_EVP_MD_CTX_DESTROY + EVP_MD_CTX_destroy(cptr); + #else + #if !defined(OLD_DES)
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +1 -0
@@ -33,6 +33,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \ file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \ file://net-snmp-fix-for-disable-des.patch \ file://0001-Remove-U64-typedef.patch \ + file://fix-openssl-build-errors.patch \ " SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee" SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e"
Signature · 1 line
2.11.0