Add RELP plugin to rsyslog
cover Add RELP plugin to rsyslog
In the form of an option in order not to draw too much dependencies for those who prefer to keep it lightweight.
David GOUARIN (2):
packages/librelp: new package.
packages/rsyslog: add support for RELP
package/Config.in | 1 + package/librelp/Config.in | 10 ++++++++++ package/librelp/librelp.hash | 6 ++++++ package/librelp/librelp.mk | 14 ++++++++++++++ package/rsyslog/Config.in | 7 +++++++ package/rsyslog/rsyslog.mk | 6 ++++++ 6 files changed, 44 insertions(+) create mode 100644 package/librelp/Config.in create mode 100644 package/librelp/librelp.hash create mode 100644 package/librelp/librelp.mk
Signature · 1 line
2.17.1
PATCH 1/2 packages/librelp: new package.
Reliable Logging Protocol library.
--- package/Config.in | 1 + package/librelp/Config.in | 10 ++++++++++ package/librelp/librelp.hash | 6 ++++++ package/librelp/librelp.mk | 14 ++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 package/librelp/Config.in create mode 100644 package/librelp/librelp.hash create mode 100644 package/librelp/librelp.mk
package/Config.in +1 -0
@@ -1806,6 +1806,7 @@ menu "Networking" source "package/zeromq/Config.in" source "package/zmqpp/Config.in" source "package/zyre/Config.in" + source "package/librelp/Config.in" endmenu menu "Other"
package/librelp/Config.in new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBRELP + bool "librelp" + select BR2_PACKAGE_GNUTLS + # dependencies of gnutls + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + help + Reliable Event Logging Protocol library + + https://www.rsyslog.com/librelp/
package/librelp/librelp.hash new file +6 -0
@@ -0,0 +1,6 @@ +# From http://download.rsyslog.com/librelp/librelp-1.2.16.tar.gz +sha256 0c235dd2a01060ad5e64438879b31ae64e7640d0e262aa1a287a2dd9bc60fd53 librelp-1.2.16.tar.gz + +# Hash for license file: +sha256 1ed76f935566e93e3c3c0d9f8fad22eb6d8bbe406e2eb8470a4a2764d9fd9685 COPYING +
package/librelp/librelp.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# librelp +# +################################################################################ + +LIBRELP_VERSION = 1.2.16 +LIBRELP_SITE = http://download.rsyslog.com/librelp/librelp-1.2.16.tar.gz +LIBRELP_LICENSE = GPL-3.0 +LIBRELP_LICENSE_FILES = COPYING +LIBRELP_INSTALL_STAGING = YES +LIBRELP_DEPENDENCIES = gnutls + +$(eval $(autotools-package))
Signature · 1 line
2.17.1
PATCH 1/2 packages/librelp: new package.
Hello David,
Thanks for this contribution! I applied it, but after a number of changes. See below.
Quoted 9 lines · On Mon, 21 Sep 2020 18:58:33 +0200 David GOUARIN <[email protected]> wrote:
Reliable Logging Protocol library.
Signed-off-by David GOUARIN <[email protected]>--- package/Config.in | 1 + package/librelp/Config.in | 10 ++++++++++ package/librelp/librelp.hash | 6 ++++++ package/librelp/librelp.mk | 14 ++++++++++++++ 4 files changed, 31 insertions(+)
You hard forgotten to add an entry in the DEVELOPERS file, so I've done so.
package/Config.in menu "Networking" · line 1809
Quoted 13 lines
create mode 100644 package/librelp/Config.in create mode 100644 package/librelp/librelp.hash create mode 100644 package/librelp/librelp.mkpackage/Config.in +1
-0@@ -1806,6 +1806,7 @@ menu "Networking" source "package/zeromq/Config.in" source "package/zmqpp/Config.in" source "package/zyre/Config.in" + source "package/librelp/Config.in"
This broke the alphabetic ordering.
package/librelp/Config.in line 3
Quoted 9 lines
package/librelp/Config.in new file +3
-0@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBRELP + bool "librelp" + select BR2_PACKAGE_GNUTLS
gnutls is not at all a mandatory dependency of librelp. So I made it optional, and dropped the depends on !BR2_STATIC_LIBS and BR2_USE_WCHAR.
package/librelp/librelp.mk line 7
Quoted 13 lines
package/librelp/librelp.mk new file +7
-0@@ -0,0 +1,14 @@ +################################################################################ +# +# librelp +# +################################################################################ + +LIBRELP_VERSION = 1.2.16
I updated to 1.2.18
package/librelp/librelp.mk line 8
Quoted 1 line
package/librelp/librelp.mk new file +1
-0+LIBRELP_SITE = http://download.rsyslog.com/librelp/librelp-1.2.16.tar.gz
This shouldn't be the full URL, but just the directory containing the tarball.
package/librelp/librelp.mk line 9
Quoted 1 line
package/librelp/librelp.mk new file +1
-0+LIBRELP_LICENSE = GPL-3.0
License is GPL-3.0+
package/librelp/librelp.mk line 12
Quoted 3 lines
package/librelp/librelp.mk new file +3
-0+LIBRELP_LICENSE_FILES = COPYING +LIBRELP_INSTALL_STAGING = YES +LIBRELP_DEPENDENCIES = gnutls
So I changed that to:
ifeq ($(BR2_PACKAGE_GNUTLS),y)LIBRELP_DEPENDENCIES += gnutls host-pkgconfLIBRELP_CONF_OPTS += --enable-tls
elseLIBRELP_CONF_OPTS += --disable-tls
endif
And applied with all those changes. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 packages/rsyslog: add support for RELP
In reply to David GOUARIN--- package/rsyslog/Config.in | 7 +++++++ package/rsyslog/rsyslog.mk | 6 ++++++ 2 files changed, 13 insertions(+)
package/rsyslog/Config.in +7 -0
@@ -17,6 +17,13 @@ config BR2_PACKAGE_RSYSLOG http://www.rsyslog.com +config BR2_PACKAGE_RSYSLOG_RELP + bool "enable support for relp logging protocol" + depends on BR2_PACKAGE_RSYSLOG + select BR2_PACKAGE_LIBRELP + help + Enable relp rsyslog plugin. + comment "rsyslog needs a uClibc or glibc toolchain w/ threads, dynamic library" depends on BR2_USE_MMU depends on BR2_TOOLCHAIN_HAS_SYNC_4
package/rsyslog/rsyslog.mk +6 -0
@@ -14,6 +14,12 @@ RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \ mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \ mail omprog omruleset omstdout omuxsock \ pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare + +ifeq ($(BR2_PACKAGE_RSYSLOG_RELP),y) +RSYSLOG_DEPENDENCIES += librelp +RSYSLOG_PLUGINS += relp +endif + RSYSLOG_CONF_OPTS = --disable-generate-man-pages \ $(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
Signature · 1 line
2.17.1
PATCH 2/2 packages/rsyslog: add support for RELP
Hello,
package/rsyslog/Config.in config BR2_PACKAGE_RSYSLOG · line 25
Quoted 6 lines · On Mon, 21 Sep 2020 18:58:34 +0200 David GOUARIN <[email protected]> wrote:
package/rsyslog/Config.in +6
-0+config BR2_PACKAGE_RSYSLOG_RELP + bool "enable support for relp logging protocol" + depends on BR2_PACKAGE_RSYSLOG + select BR2_PACKAGE_LIBRELP + help + Enable relp rsyslog plugin.
I dropped this option entirely.
Quoted 1 line
+ifeq ($(BR2_PACKAGE_RSYSLOG_RELP),y)
And simply made this based on the following condition:
ifeq ($(BR2_PACKAGE_LIBRELP),y)
package/rsyslog/rsyslog.mk RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \ · line 21
Quoted 3 lines
package/rsyslog/rsyslog.mk +3
-0+RSYSLOG_DEPENDENCIES += librelp +RSYSLOG_PLUGINS += relp +endif
And I've applied with those changes. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com