syslog-ng: Run autoreconf twice to avoid problems with libtool
PATCH 1/2 syslog-ng: Run autoreconf twice to avoid problems with libtool
syslog-ng has sub-projects with their own autotools configurations. Something has been messed up after the switch to RSS and now it requires autoreconf to be run twice to fully update all files.
--- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 11 ++++++++++- meta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +10 -1
@@ -22,7 +22,7 @@ SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \ " -inherit autotools systemd pkgconfig update-rc.d +inherit autotools gettext systemd pkgconfig update-rc.d EXTRA_OECONF = " \ --enable-dynamic-linking \
@@ -55,6 +55,15 @@ PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," +do_configure_prepend() { + olddir=$(pwd) + cd ${AUTOTOOLS_SCRIPT_PATH} + + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." + + 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
meta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb +0 -2
@@ -13,5 +13,3 @@ SRC_URI += " \ SRC_URI[md5sum] = "e9f401615e92e5eb27396c995c1446ba" SRC_URI[sha256sum] = "7be11df31ac7d716f1f952e22b5ae8e2049edd633a41b223776a853d9106f4e7" - -PNBLACKLIST[syslog-ng] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130631/"
Signature · 1 line
2.9.0
PATCH 2/2 syslog-ng: Update to 3.8.1
* The upstream has changed to github.com.
* Remove patches that are no longer needed:
- Fix-the-memory-leak-problem-for-mutex.patch
- configure.patch
- dbifix.patch
- fix-a-memory-leak-in-log_driver_free.patch
* Update syslog-ng.service-the-syslog-ng-service.patch
* openssl is no longer optional, so remove its PACKAGECONFIG.
* Add (disabled) PACKAGECONFIGs for the new http and native modules.
* Disable the new python and java modules.
--- .../Fix-the-memory-leak-problem-for-mutex.patch | 58 ---------------------- .../syslog-ng/files/configure.patch | 23 --------- .../recipes-support/syslog-ng/files/dbifix.patch | 20 -------- .../fix-a-memory-leak-in-log_driver_free.patch | 33 ------------ .../syslog-ng.service-the-syslog-ng-service.patch | 13 +++-- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 17 ++++--- .../recipes-support/syslog-ng/syslog-ng_3.6.4.bb | 15 ------ .../recipes-support/syslog-ng/syslog-ng_3.8.1.bb | 11 ++++ 8 files changed, 27 insertions(+), 163 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-for-mutex.patch delete mode 100644 meta-oe/recipes-support/syslog-ng/files/configure.patch delete mode 100644 meta-oe/recipes-support/syslog-ng/files/dbifix.patch delete mode 100644 meta-oe/recipes-support/syslog-ng/files/fix-a-memory-leak-in-log_driver_free.patch delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb create 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-for-mutex.patch deleted +0 -58
@@ -1,58 +0,0 @@ -Fix the memory leak problem for mutex - -Upstream-Status: Pending - -Signed-off-by: Xufeng Zhang <[email protected]> ---- - lib/logqueue.c | 1 + - modules/affile/affile-dest.c | 2 ++ - modules/dbparser/dbparser.c | 1 + - 3 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/lib/logqueue.c b/lib/logqueue.c -index 337a3c1..10edcf0 100644 ---- a/lib/logqueue.c -+++ b/lib/logqueue.c -@@ -188,6 +188,7 @@ log_queue_init_instance(LogQueue *self, const gchar *persist_name) - void - log_queue_free_method(LogQueue *self) - { -+ g_static_mutex_free(&self->lock); - g_free(self->persist_name); - g_free(self); - } -diff --git a/modules/affile/affile-dest.c b/modules/affile/affile-dest.c -index a2bcdad..ce79f6f 100644 ---- a/modules/affile/affile-dest.c -+++ b/modules/affile/affile-dest.c -@@ -305,6 +305,7 @@ affile_dw_free(LogPipe *s) - { - AFFileDestWriter *self = (AFFileDestWriter *) s; - -+ g_static_mutex_free(&self->lock); - log_pipe_unref((LogPipe *) self->writer); - self->writer = NULL; - g_free(self->filename); -@@ -687,6 +688,7 @@ affile_dd_free(LogPipe *s) - /* NOTE: this must be NULL as deinit has freed it, otherwise we'd have circular references */ - g_assert(self->single_writer == NULL && self->writer_hash == NULL); - -+ g_static_mutex_free(&self->lock); - log_template_unref(self->filename_template); - log_writer_options_destroy(&self->writer_options); - log_dest_driver_free(s); -diff --git a/modules/dbparser/dbparser.c b/modules/dbparser/dbparser.c -index f1248b5..9775701 100644 ---- a/modules/dbparser/dbparser.c -+++ b/modules/dbparser/dbparser.c -@@ -284,6 +284,7 @@ log_db_parser_free(LogPipe *s) - { - LogDBParser *self = (LogDBParser *) s; - -+ g_static_mutex_free(&self->lock); - if (self->db) - pattern_db_free(self->db); - --- -1.7.1 -
meta-oe/recipes-support/syslog-ng/files/configure.patch deleted +0 -23
@@ -1,23 +0,0 @@ -Index: syslog-ng-3.5.4.1/configure.ac -=================================================================== ---- syslog-ng-3.5.4.1.orig/configure.ac 2014-07-18 13:49:36.794141441 +0000 -+++ syslog-ng-3.5.4.1/configure.ac 2014-07-18 14:23:57.738197606 +0000 -@@ -8,7 +8,8 @@ dnl SNAPSHOT_VERSION - snapshot version to add to version number - dnl BINARY_BRANCH - the value is added to all source/binary packages - dnl SOURCE_REVISION - Revision of the source-tree, will added to the version string - dnl --AC_INIT(syslog-ng/main.c) -+AC_INIT(syslog-ng, 3.5.4.1) -+AC_CONFIG_SRCDIR(syslog-ng/main.c) - AC_CONFIG_MACRO_DIR([m4]) - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -@@ -53,7 +54,7 @@ else - CURRDATE=`date +"%a, %d %b %Y %H:%M:%S %Z"` - fi - --AM_INIT_AUTOMAKE($PACKAGE, $VERSION, [foreign no-define subdir-objects]) -+AM_INIT_AUTOMAKE([foreign no-define subdir-objects]) - _AM_PROG_TAR([ustar]) - if test -n "$SNAPSHOT_VERSION"; then - VERSION=$VERSION+$SNAPSHOT_VERSION
meta-oe/recipes-support/syslog-ng/files/dbifix.patch deleted +0 -20
@@ -1,20 +0,0 @@ -Index: syslog-ng-3.5.4.1/configure.ac -=================================================================== ---- syslog-ng-3.5.4.1.orig/configure.ac 2014-07-18 14:35:03.134215740 +0000 -+++ syslog-ng-3.5.4.1/configure.ac 2014-07-18 15:31:52.510308653 +0000 -@@ -576,13 +576,14 @@ - dnl *************************************************************************** - - AC_CHECK_LIB(dl, dlsym, DL_LIBS="-ldl") -+if test "x$enable_sql" != "xno"; then - PKG_CHECK_MODULES(LIBDBI, dbi >= $LIBDBI_MIN_VERSION, libdbi_pkgconfig_not_found="0", libdbi_pkgconfig_not_found="1") - - if test "$libdbi_pkgconfig_not_found" -eq 1; then - dnl if libdbi has no .pc file, try it without one - AC_CHECK_LIB(dbi, dbi_initialize, LIBDBI_LIBS="-ldbi"; LIBDBI_CFLAGS="-I/usr/include") - fi -- -+fi - if test "x$enable_sql" = "xauto"; then - AC_MSG_CHECKING(whether to enable SQL support) - if test "x$LIBDBI_LIBS" != "x"; then
meta-oe/recipes-support/syslog-ng/files/fix-a-memory-leak-in-log_driver_free.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From a269669ba3cb6d1c06a3322b4a6a035cb787d085 Mon Sep 17 00:00:00 2001 -From: Gergely Nagy <[email protected]> -Date: Tue, 14 Jan 2014 13:58:05 +0100 -Subject: [PATCH] driver: Fix a memory leak in log_driver_free() - -Upstream-Status: Backport - -After freeing up the members of self->plugins, free self->plugins itself -too. - -Signed-off-by: Gergely Nagy <[email protected]> ---- - lib/driver.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/driver.c b/lib/driver.c -index d77fe57..a6867b9 100644 ---- a/lib/driver.c -+++ b/lib/driver.c -@@ -91,6 +91,10 @@ log_driver_free(LogPipe *s) - { - log_driver_plugin_free((LogDriverPlugin *) l->data); - } -+ if (self->plugins) -+ { -+ g_list_free(self->plugins); -+ } - if (self->group) - g_free(self->group); - if (self->id) --- -1.8.4.1 -
meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +6 -7
@@ -15,18 +15,17 @@ diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.servi index fc16f8d..8e09deb 100644 --- a/contrib/systemd/syslog-ng.service +++ b/contrib/systemd/syslog-ng.service -@@ -3,9 +3,8 @@ Description=System Logger Daemon - Documentation=man:syslog-ng(8) +@@ -4,8 +4,8 @@ Description=System Logger Daemon [Service] --Type=notify --ExecStart=/usr/sbin/syslog-ng -F + Type=notify +-ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS -ExecReload=/bin/kill -HUP $MAINPID -+ExecStart=@SBINDIR@/syslog-ng -F -p @LOCALSTATEDIR@/run/syslogd.pid ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID + EnvironmentFile=-/etc/default/syslog-ng + EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal - StandardError=journal - Restart=on-failure -- 1.8.4.2
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +10 -7
@@ -10,12 +10,12 @@ ideal for firewalled environments. \ HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" LICENSE = "GPLv2 & LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=e0e8658d9be248f01b7933df24dc1408" +LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" # util-linux added to get libuuid -DEPENDS = "libpcre flex eventlog glib-2.0 util-linux" +DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" -SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/${BPN}_${PV}.tar.gz \ +SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ file://syslog-ng.conf \ file://initscript \ file://volatiles.03_syslog-ng \
@@ -32,28 +32,31 @@ EXTRA_OECONF = " \ --sysconfdir=${sysconfdir}/${BPN} \ --with-module-dir=${libdir}/${BPN} \ --with-sysroot=${STAGING_DIR_HOST} \ - --with-libmongo-client=no --disable-mongodb \ + --without-mongoc --disable-mongodb \ --with-librabbitmq-client=no \ + --disable-python \ + --disable-java --disable-java-modules \ ${CONFIG_TLS} \ " CONFIG_TLS = "--enable-thread-tls" CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}" -PACKAGECONFIG ??= "openssl \ +PACKAGECONFIG ??= " \ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ " -PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl,openssl," PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," PACKAGECONFIG[libnet] = "--enable-libnet --with-libnet=${STAGING_BINDIR_CROSS},--disable-libnet,libnet," +PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," +PACKAGECONFIG[native] = "--enable-native,--disable-native,," do_configure_prepend() { olddir=$(pwd)
@@ -90,7 +93,7 @@ PACKAGES =+ "${PN}-libs ${PN}-libs-dev ${PN}-libs-dbg" FILES_${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" FILES_${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" FILES_${PN}-libs-dbg = "${libdir}/${BPN}/.debug" -FILES_${PN}-staticdev = "${libdir}/${BPN}/libtest/*.a" +FILES_${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" INSANE_SKIP_${PN}-libs = "dev-so" RDEPENDS_${PN} += "${PN}-libs"
meta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb deleted +0 -15
@@ -1,15 +0,0 @@ -require syslog-ng.inc - -SRC_URI += " \ - file://fix-a-memory-leak-in-log_driver_free.patch \ - file://fix-config-libnet.patch \ - file://fix-invalid-ownership.patch \ - file://Fix-the-memory-leak-problem-for-mutex.patch \ - file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \ - file://configure.patch \ - file://dbifix.patch \ - file://syslog-ng.service-the-syslog-ng-service.patch \ -" - -SRC_URI[md5sum] = "e9f401615e92e5eb27396c995c1446ba" -SRC_URI[sha256sum] = "7be11df31ac7d716f1f952e22b5ae8e2049edd633a41b223776a853d9106f4e7"
meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.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://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.9.0
Quoted 24 lines · Peter Kjellerstedt
syslog-ng has sub-projects with their own autotools configurations. Something has been messed up after the switch to RSS and now it requires autoreconf to be run twice to fully update all files.
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 11 ++++++++++- meta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-)meta-oe/recipes-support/syslog-ng/syslog-ng.inc +1
-1@@ -22,7 +22,7 @@ SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \ " -inherit autotools systemd pkgconfig update-rc.d +inherit autotools gettext systemd pkgconfig update-rc.d EXTRA_OECONF = " \ --enable-dynamic-linking \
meta-oe/recipes-support/syslog-ng/syslog-ng.inc PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," · line 64
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +7
-0@@ -55,6 +55,15 @@ PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," +do_configure_prepend() { + olddir=$(pwd) + cd ${AUTOTOOLS_SCRIPT_PATH} + + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." + + cd $olddir
Please don't use tabs, all layers except oe-core are using 4 spaces for indentation.
Quoted 23 lines
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +2
-0+} + do_install_prepend() { sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.servicemeta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb +0
-2@@ -13,5 +13,3 @@ SRC_URI += " \ SRC_URI[md5sum] = "e9f401615e92e5eb27396c995c1446ba" SRC_URI[sha256sum] = "7be11df31ac7d716f1f952e22b5ae8e2049edd633a41b223776a853d9106f4e7" - -PNBLACKLIST[syslog-ng] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130631/"Signature · 7 lines
2.9.0 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]