package/rsyslog: extra plugins option introduced

The rsyslog package enables extra plugins based on the availability of
external dependencies. However, there are many cases where those
plugins are not needed, even when some of those external dependencies
are enabled. Allow disabling the build of plugins. This option is
useful in embedded systems to achieve compact footprint.

Signed-off-by: Konstantin Menyaev <KAMenyaev@salutedevices.com>
Signed-off-by: Flávio Tapajós <flavio.tapajos@newtesc.com.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Konstantin Menyaev
2024-07-25 12:37:41 -03:00
committed by Thomas Petazzoni
parent ff7787eadf
commit e929d75d7e
2 changed files with 31 additions and 16 deletions

View File

@@ -17,6 +17,18 @@ config BR2_PACKAGE_RSYSLOG
http://www.rsyslog.com http://www.rsyslog.com
if BR2_PACKAGE_RSYSLOG
config BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS
bool "extra plugins"
default y
help
Enable rsyslog plugins that require external
dependencies. The different plugins will be automatically
enabled if their dependencies are enabled.
endif # BR2_PACKAGE_RSYSLOG
comment "rsyslog needs a toolchain w/ threads, dynamic library" comment "rsyslog needs a toolchain w/ threads, dynamic library"
depends on BR2_USE_MMU depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on BR2_TOOLCHAIN_HAS_SYNC_4

View File

@@ -15,12 +15,15 @@ RSYSLOG_CPE_ID_VENDOR = rsyslog
RSYSLOG_IGNORE_CVES += CVE-2015-3243 RSYSLOG_IGNORE_CVES += CVE-2015-3243
RSYSLOG_DEPENDENCIES = zlib libestr liblogging libfastjson host-pkgconf RSYSLOG_DEPENDENCIES = zlib libestr liblogging libfastjson host-pkgconf
RSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99' RSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99'
ifeq ($(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),y)
RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \ RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \ mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \
mail omprog omruleset omstdout omuxsock \ mail omprog omruleset omstdout omuxsock \
pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare
endif
ifeq ($(BR2_PACKAGE_LIBRELP),y) ifeq ($(BR2_PACKAGE_LIBRELP)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += librelp RSYSLOG_DEPENDENCIES += librelp
RSYSLOG_PLUGINS += relp RSYSLOG_PLUGINS += relp
endif endif
@@ -33,7 +36,7 @@ RSYSLOG_CONF_OPTS += \
--disable-mmkubernetes \ --disable-mmkubernetes \
--disable-mmnormalize --disable-mmnormalize
ifeq ($(BR2_PACKAGE_LIBCURL),y) ifeq ($(BR2_PACKAGE_LIBCURL)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += libcurl RSYSLOG_DEPENDENCIES += libcurl
RSYSLOG_CONF_OPTS += \ RSYSLOG_CONF_OPTS += \
--enable-clickhouse \ --enable-clickhouse \
@@ -52,35 +55,35 @@ RSYSLOG_CONF_OPTS += \
--disable-omhttpfs --disable-omhttpfs
endif endif
ifeq ($(BR2_PACKAGE_CIVETWEB_LIB),y) ifeq ($(BR2_PACKAGE_CIVETWEB_LIB)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += apr-util civetweb RSYSLOG_DEPENDENCIES += apr-util civetweb
RSYSLOG_CONF_OPTS += --enable-imhttp RSYSLOG_CONF_OPTS += --enable-imhttp
else else
RSYSLOG_CONF_OPTS += --disable-imhttp RSYSLOG_CONF_OPTS += --disable-imhttp
endif endif
ifeq ($(BR2_PACKAGE_CZMQ),y) ifeq ($(BR2_PACKAGE_CZMQ)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += czmq RSYSLOG_DEPENDENCIES += czmq
RSYSLOG_CONF_OPTS += --enable-imczmq --enable-omczmq RSYSLOG_CONF_OPTS += --enable-imczmq --enable-omczmq
else else
RSYSLOG_CONF_OPTS += --disable-imczmq --disable-omczmq RSYSLOG_CONF_OPTS += --disable-imczmq --disable-omczmq
endif endif
ifeq ($(BR2_PACKAGE_GNUTLS),y) ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += gnutls RSYSLOG_DEPENDENCIES += gnutls
RSYSLOG_CONF_OPTS += --enable-gnutls RSYSLOG_CONF_OPTS += --enable-gnutls
else else
RSYSLOG_CONF_OPTS += --disable-gnutls RSYSLOG_CONF_OPTS += --disable-gnutls
endif endif
ifeq ($(BR2_PACKAGE_HIREDIS),y) ifeq ($(BR2_PACKAGE_HIREDIS)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += hiredis RSYSLOG_DEPENDENCIES += hiredis
RSYSLOG_CONF_OPTS += --enable-omhiredis RSYSLOG_CONF_OPTS += --enable-omhiredis
else else
RSYSLOG_CONF_OPTS += --disable-omhiredis RSYSLOG_CONF_OPTS += --disable-omhiredis
endif endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) ifeq ($(BR2_PACKAGE_LIBGCRYPT)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += libgcrypt RSYSLOG_DEPENDENCIES += libgcrypt
RSYSLOG_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config RSYSLOG_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
RSYSLOG_CONF_OPTS += --enable-libgcrypt RSYSLOG_CONF_OPTS += --enable-libgcrypt
@@ -88,21 +91,21 @@ else
RSYSLOG_CONF_OPTS += --disable-libgcrypt RSYSLOG_CONF_OPTS += --disable-libgcrypt
endif endif
ifeq ($(BR2_PACKAGE_LIBMAXMINDDB),y) ifeq ($(BR2_PACKAGE_LIBMAXMINDDB)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += libmaxminddb RSYSLOG_DEPENDENCIES += libmaxminddb
RSYSLOG_CONF_OPTS += --enable-mmdblookup RSYSLOG_CONF_OPTS += --enable-mmdblookup
else else
RSYSLOG_CONF_OPTS += --disable-mmdblookup RSYSLOG_CONF_OPTS += --disable-mmdblookup
endif endif
ifeq ($(BR2_PACKAGE_LIBPCAP),y) ifeq ($(BR2_PACKAGE_LIBPCAP)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += libpcap RSYSLOG_DEPENDENCIES += libpcap
RSYSLOG_CONF_OPTS += --enable-impcap RSYSLOG_CONF_OPTS += --enable-impcap
else else
RSYSLOG_CONF_OPTS += --disable-impcap RSYSLOG_CONF_OPTS += --disable-impcap
endif endif
ifeq ($(BR2_PACKAGE_MARIADB),y) ifeq ($(BR2_PACKAGE_MARIADB)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += mariadb RSYSLOG_DEPENDENCIES += mariadb
RSYSLOG_CONF_OPTS += --enable-mysql RSYSLOG_CONF_OPTS += --enable-mysql
RSYSLOG_CONF_ENV += ac_cv_prog_MYSQL_CONFIG=$(STAGING_DIR)/usr/bin/mysql_config RSYSLOG_CONF_ENV += ac_cv_prog_MYSQL_CONFIG=$(STAGING_DIR)/usr/bin/mysql_config
@@ -110,7 +113,7 @@ else
RSYSLOG_CONF_OPTS += --disable-mysql RSYSLOG_CONF_OPTS += --disable-mysql
endif endif
ifeq ($(BR2_PACKAGE_POSTGRESQL),y) ifeq ($(BR2_PACKAGE_POSTGRESQL)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += postgresql RSYSLOG_DEPENDENCIES += postgresql
RSYSLOG_CONF_OPTS += --enable-pgsql RSYSLOG_CONF_OPTS += --enable-pgsql
RSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config RSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config
@@ -118,28 +121,28 @@ else
RSYSLOG_CONF_OPTS += --disable-pgsql RSYSLOG_CONF_OPTS += --disable-pgsql
endif endif
ifeq ($(BR2_PACKAGE_QPID_PROTON),y) ifeq ($(BR2_PACKAGE_QPID_PROTON)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += qpid-proton RSYSLOG_DEPENDENCIES += qpid-proton
RSYSLOG_CONF_OPTS += --enable-omamqp1 RSYSLOG_CONF_OPTS += --enable-omamqp1
else else
RSYSLOG_CONF_OPTS += --disable-omamqp1 RSYSLOG_CONF_OPTS += --disable-omamqp1
endif endif
ifeq ($(BR2_PACKAGE_RABBITMQ_C),y) ifeq ($(BR2_PACKAGE_RABBITMQ_C)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += rabbitmq-c RSYSLOG_DEPENDENCIES += rabbitmq-c
RSYSLOG_CONF_OPTS += --enable-omrabbitmq RSYSLOG_CONF_OPTS += --enable-omrabbitmq
else else
RSYSLOG_CONF_OPTS += --disable-omrabbitmq RSYSLOG_CONF_OPTS += --disable-omrabbitmq
endif endif
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_DEPENDENCIES += util-linux RSYSLOG_DEPENDENCIES += util-linux
RSYSLOG_CONF_OPTS += --enable-uuid RSYSLOG_CONF_OPTS += --enable-uuid
else else
RSYSLOG_CONF_OPTS += --disable-uuid RSYSLOG_CONF_OPTS += --disable-uuid
endif endif
ifeq ($(BR2_INIT_SYSTEMD),y) ifeq ($(BR2_INIT_SYSTEMD)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_CONF_OPTS += \ RSYSLOG_CONF_OPTS += \
--enable-imjournal \ --enable-imjournal \
--enable-omjournal \ --enable-omjournal \
@@ -151,7 +154,7 @@ RSYSLOG_CONF_OPTS += \
--disable-omjournal --disable-omjournal
endif endif
ifeq ($(BR2_PACKAGE_LIBDBI_DRIVERS),y) ifeq ($(BR2_PACKAGE_LIBDBI_DRIVERS)$(BR2_PACKAGE_RSYSLOG_EXTRA_PLUGINS),yy)
RSYSLOG_CONF_OPTS += --enable-libdbi RSYSLOG_CONF_OPTS += --enable-libdbi
RSYSLOG_DEPENDENCIES += libdbi-drivers RSYSLOG_DEPENDENCIES += libdbi-drivers
else else