syslog-ng: enable http module based on zlib support in curl
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Tue, 5 Mar 2024 19:44:47 +0000 (20:44 +0100)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Tue, 26 Mar 2024 07:27:02 +0000 (08:27 +0100)
Since version 4.4.0, syslog-ng added compression to http() destination
using zlib from curl. [1] However, zlib is currently disabled in curl [2]
and it prevented syslog-ng to start.

This commit changes the configuration opinion to enable http module only if
zlib support is enabled for curl and as well it adds dependency for zlib (in that case).
If the zlib is disabled, then it disables http module, so syslog-ng can start
and thus zlib dependency is not required.

[1] https://gitlab.nic.cz/turris/os/packages/-/issues/932
[2] https://github.com/openwrt/packages/blob/93cbaacbfb13048ad378520a7afea7c9027dd1d6/net/curl/Config.in#L134
Fixes: 4dd49d7c3cd571107958154f1ed1ec8d8dba7464 ("syslog-ng: update to version 4.4.0")
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 1e14d95d78d03ab163653166652972ca3e8c366e)

admin/syslog-ng/Makefile

index 842d447d218c29ea9bfad6a8aa5fbe6bf9f99893..13b7fa0174664ab62b17e3b65d0003da0906d148 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syslog-ng
 PKG_VERSION:=4.6.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
@@ -21,6 +21,7 @@ PKG_BUILD_DEPENDS:= \
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_IPV6 \
+       CONFIG_LIBCURL_ZLIB
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -33,7 +34,7 @@ define Package/syslog-ng
   CATEGORY:=Administration
   TITLE:=A powerful syslog daemon
   URL:=https://www.syslog-ng.com/products/open-source-log-management/
-  DEPENDS:=+libpcre2 +glib2 +libopenssl +libpthread +librt +zlib +libdbi +libjson-c +libcurl +libuuid +SYSLOGNG_LOGROTATE:logrotate
+  DEPENDS:=+libpcre2 +glib2 +libopenssl +libpthread +librt +libdbi +libjson-c +libcurl +libuuid +SYSLOGNG_LOGROTATE:logrotate +LIBCURL_ZLIB:zlib
 endef
 
 define Package/syslog-ng/description
@@ -91,7 +92,7 @@ CONFIGURE_ARGS +=  \
        --with-jsonc=system \
        --enable-cpp=no \
        --enable-json=yes \
-       --enable-http=yes \
+       $(if $(CONFIG_LIBCURL_ZLIB),--enable-http=yes,--enable-http=no) \
        --disable-smtp \
        --disable-mqtt \
        --disable-redis \