On Wed, Apr 27, 2016 at 10:42:35AM +0200, Steffen Trumtrar wrote:
> Signed-off-by: Steffen Trumtrar <[email protected]>
> ---
>  rules/syslogng.in   | 36 +++++++++++++++++++++++++++++++++++
>  rules/syslogng.make | 55 
> +++++++++++++++++++++++++++++++++--------------------
>  2 files changed, 70 insertions(+), 21 deletions(-)
> 
> diff --git a/rules/syslogng.in b/rules/syslogng.in
> index 06e04c2a4f11..1a895e28a10e 100644
> --- a/rules/syslogng.in
> +++ b/rules/syslogng.in
> @@ -6,10 +6,13 @@ menuconfig SYSLOGNG
>       prompt "syslog-ng                     "
>       select EVENTLOG
>       select GLIB
> +     select PYTHON           if SYSLOGNG_PYTHON_DESTINATION
>       select LIBC_NSL
>       select LIBC_RT
>       select LIBNET           if SYSLOGNG_SPOOF_SOURCE
> +     select LIBPCRE
>       select TCPWRAPPER       if SYSLOGNG_TCP_WRAPPER
> +     select SYSTEMD          if SYSLOGNG_SYSTEMD_UNIT
>       help
>         The next generation syslog daemon.
>  
> @@ -36,6 +39,31 @@ config SYSLOGNG_SPOOF_SOURCE
>         destinations though the original message can be
>         received by TCP as well.
>  
> +config SYSLOGNG_AMQP_DESTINATION
> +     bool
> +     prompt "support the AMQP destination"
> +     help
> +       Enables the ability to publish AMQP messages.
> +
> +config SYSLOGNG_MONGODB_DESTINATION
> +     bool
> +     prompt "support the MongoDB destination"
> +     help
> +       Enables the ability to send messages to a MongoDB database.
> +
> +config SYSLOGNG_PYTHON_DESTINATION
> +     bool
> +     prompt "support the python destination"
> +     help
> +       Enables the ability to use inline python in the
> +       syslog-ng configuration file.
> +
> +config SYSLOGNG_STOMP_DESTINATION
> +     bool
> +     prompt "support the STOMP destination"
> +     help
> +       Enables the ability to send STOMP messages to message brokers.
> +
>  comment "runtime options   ---"
>  
>  config SYSLOGNG_CONFIG
> @@ -48,6 +76,14 @@ config SYSLOGNG_CONFIG
>         ptxdist installation
>         ("<PTXDIST>/projectroot/etc/syslog-ng.conf").
>  
> +config SYSLOGNG_SYSTEMD_UNIT

it not just the unit. Name it SYSLOGNG_SYSTEMD

> +     bool
> +     default y

        depends on INITMETHOD_SYSTEMD

> +     prompt "Enable systemd support"
> +     help
> +       Installs the systemd service file and enables support for the
> +       systemd-journal
> +
>  config SYSLOGNG_STARTSCRIPT
>       bool
>       default y
> diff --git a/rules/syslogng.make b/rules/syslogng.make
> index 0cca16358504..c4cf7153fe67 100644
> --- a/rules/syslogng.make
> +++ b/rules/syslogng.make
> @@ -2,6 +2,7 @@
>  #
>  # Copyright (C) 2006 by Robert Schwebel
>  #               2008, 2009 by Marc Kleine-Budde <[email protected]>
> +#               2016 Pengutronix, Steffen Trumtrar 
> <[email protected]>
>  #
>  # See CREDITS for details about who has contributed to this project.
>  #
> @@ -17,14 +18,15 @@ PACKAGES-$(PTXCONF_SYSLOGNG) += syslogng
>  #
>  # Paths and names
>  #
> -SYSLOGNG_VERSION     := 2.0.10
> -SYSLOGNG_MD5         := 3f96ccf13dda0b9e150e511bcffde795
> +SYSLOGNG_VERSION     := 3.7.3
> +SYSLOG_LIBVERSION    := 3.7
> +SYSLOGNG_MD5         := 803d61a713d6d41a973942d417fec999
>  SYSLOGNG             := syslog-ng-$(SYSLOGNG_VERSION)
>  SYSLOGNG_SUFFIX              := tar.gz
> -SYSLOGNG_URL         := 
> http://www.balabit.com/downloads/files/syslog-ng/sources/2.0/src/$(SYSLOGNG).$(SYSLOGNG_SUFFIX)
> +SYSLOGNG_URL         := 
> https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOGNG_VERSION)/$(SYSLOGNG).$(SYSLOGNG_SUFFIX)
>  SYSLOGNG_SOURCE              := $(SRCDIR)/$(SYSLOGNG).$(SYSLOGNG_SUFFIX)
>  SYSLOGNG_DIR         := $(BUILDDIR)/$(SYSLOGNG)
> -SYSLOGNG_LICENSE     := GPL-2.0+
> +SYSLOGNG_LICENSE     := GPL-2.0+, LGPL-2.1
>  
>  # 
> ----------------------------------------------------------------------------
>  # Prepare
> @@ -42,21 +44,19 @@ SYSLOGNG_AUTOCONF := \
>       --enable-dynamic-linking \
>       --disable-debug \
>       --disable-sun-streams \
> -     --disable-sun-door
> -
> -ifdef PTXCONF_SYSLOGNG_TCP_WRAPPER
> -SYSLOGNG_AUTOCONF += --enable-tcp-wrapper
> -else
> -SYSLOGNG_AUTOCONF += --disable-tcp-wrapper
> -endif
> -
> -ifdef PTXCONF_SYSLOGNG_SPOOF_SOURCE
> -SYSLOGNG_AUTOCONF += \
> -     --enable-spoof-source \
> -     --with-libnet=$(SYSROOT)/usr/bin
> -else
> -SYSLOGNG_AUTOCONF += --disable-spoof-source
> -endif
> +     --disable-sun-door \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_AMQP_DESTINATION)-amqp \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_MONGODB_DESTINATION)-mongodb \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_PYTHON_DESTINATION)-python \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_SYSTEMD_UNIT)-systemd \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_SPOOF_SOURCE)-spoof-source \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_STOMP_DESTINATION)-stomp \
> +     --$(call ptx/endis, PTXCONF_SYSLOGNG_TCP_WRAPPER)-tcp-wrapper \
> +     --with-systemd-journal=system \
> +     --with-systemdsystemunitdir=/lib/systemd/system \
> +     --localstatedir=/var/run \
> +     --with-libnet=$(SYSROOT)/usr/bin \
> +     --with-rootlibdir=/lib
>  
>  # 
> ----------------------------------------------------------------------------
>  # Target-Install
> @@ -72,8 +72,10 @@ $(STATEDIR)/syslogng.targetinstall:
>       @$(call install_fixup, syslogng,DESCRIPTION,missing)
>  
>  #    # binary
> -     @$(call install_copy, syslogng, 0, 0, 0755, -, \
> -             /sbin/syslog-ng)
> +     @$(call install_copy, syslogng, 0, 0, 0755, 
> $(SYSLOGNG_DIR)/syslog-ng/syslog-ng, \
> +             /usr/sbin/syslog-ng)

use CROSS_AUTOCONF_USR above instead of CROSS_AUTOCONF_ROOT. Then the '-'
will work for /usr/sbin/syslog-ng

Michael

> +     @$(call install_lib, syslogng, 0, 0, 0644, 
> libsyslog-ng-$(SYSLOG_LIBVERSION))
> +     @$(call install_tree, syslogng, 0, 0, -, /lib/syslog-ng)
>  
>  #    # config
>  ifdef PTXCONF_SYSLOGNG_CONFIG
> @@ -92,6 +94,17 @@ ifneq ($(call 
> remove_quotes,$(PTXCONF_SYSLOGNG_BBINIT_LINK)),)
>  endif
>  endif
>  endif
> +
> +ifdef PTXCONF_INITMETHOD_SYSTEMD
> +ifdef PTXCONF_SYSLOGNG_SYSTEMD_UNIT
> +     @$(call install_alternative, syslogng, 0, 0, 0644, \
> +             /lib/systemd/system/syslog-ng.service)
> +     @$(call install_link, syslogng, ../syslog-ng.service, \
> +             /lib/systemd/system/multi-user.target.wants/syslog-ng.service)
> +     @$(call install_link, syslogng, syslog.service, \
> +             /lib/systemd/system/syslog.service)
> +endif
> +endif
>       @$(call install_finish, syslogng)
>  
>       @$(call touch)
> -- 
> 2.8.0.rc3
> 
> 
> _______________________________________________
> ptxdist mailing list
> [email protected]

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to