mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
98a90ef9f3
The upstream rsyslog build links against libyaml-0.so.2 whenever
pkg-config detects yaml-0.1, which made libyaml a hard dependency
of the rsyslog binary without any way to opt out from OpenWrt
config. libyaml is only used for YAML (.yaml/.yml) configuration
files and for loading rate-limiting policies from external files;
RainerScript (.conf) installs do not need it.
Introduce a new RSYSLOG_libyaml Config.in switch, default off, and
gate the +libyaml DEPENDS entry on it. Pass --enable-libyaml or
--disable-libyaml to configure based on the switch.
The upstream configure script in 8.2604.0 does not understand a
--disable-libyaml flag (libyaml was unconditionally autodetected).
Backport upstream commit c5c244861 ("configure: make libyaml
default-on explicit") as 001-configure-make-libyaml-default-on-
explicit.patch, which adds the AC_ARG_ENABLE(libyaml) block. The
patch dissolves cleanly once the package is bumped to 8.2606.0+.
PKG_FIXUP:=autoreconf is added so the configure.ac change flows
into the generated configure script during the SDK build.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
54 lines
2.0 KiB
Diff
54 lines
2.0 KiB
Diff
From c5c2448617e72d088e818a5581a8a6cc85e81963 Mon Sep 17 00:00:00 2001
|
|
From: Rainer Gerhards <rgerhards@adiscon.com>
|
|
Date: Sat, 16 May 2026 10:44:45 +0200
|
|
Subject: [PATCH] configure: make libyaml default-on explicit
|
|
|
|
Why: Distro builds must not silently change rsyslog features based
|
|
on whether libyaml development files happen to be installed.
|
|
|
|
Impact: Default builds now require yaml-0.1 unless --disable-libyaml
|
|
is passed explicitly.
|
|
|
|
Before/After: Before, configure auto-disabled libyaml features;
|
|
after, the default fails fast and opt-out builds are explicit.
|
|
|
|
Closes https://github.com/rsyslog/rsyslog/issues/6914
|
|
|
|
Upstream-Status: Backport [v8.2604.0 -> 8.2606.0]
|
|
Upstream-Commit: c5c2448617e72d088e818a5581a8a6cc85e81963
|
|
---
|
|
configure.ac | 17 +++++++++++++----
|
|
1 file changed, 13 insertions(+), 4 deletions(-)
|
|
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -166,11 +166,24 @@ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#i
|
|
)
|
|
|
|
# Checks for libraries.
|
|
-PKG_CHECK_MODULES([LIBYAML], [yaml-0.1], [
|
|
- AC_DEFINE([HAVE_LIBYAML], [1], [Define if libyaml is available])
|
|
- have_libyaml=yes
|
|
+AC_ARG_ENABLE(libyaml,
|
|
+ [AS_HELP_STRING([--disable-libyaml],
|
|
+ [Disable libyaml-backed YAML configuration and policy file support @<:@default=enabled@:>@])],
|
|
+ [case "${enableval}" in
|
|
+ yes) enable_libyaml="yes" ;;
|
|
+ no) enable_libyaml="no" ;;
|
|
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-libyaml) ;;
|
|
+ esac],
|
|
+ [enable_libyaml="yes"]
|
|
+)
|
|
+AS_IF([test "x$enable_libyaml" = "xyes"], [
|
|
+ PKG_CHECK_MODULES([LIBYAML], [yaml-0.1], [
|
|
+ AC_DEFINE([HAVE_LIBYAML], [1], [Define if libyaml is available])
|
|
+ have_libyaml=yes
|
|
+ ], [
|
|
+ AC_MSG_ERROR([libyaml support is enabled by default but yaml-0.1 was not found. Install libyaml development files or configure with --disable-libyaml.])
|
|
+ ])
|
|
], [
|
|
- AC_MSG_WARN([libyaml not found, rate limiting policies from files and YAML configuration support will be disabled])
|
|
have_libyaml=no
|
|
])
|
|
AM_CONDITIONAL(HAVE_LIBYAML, test x$have_libyaml = xyes)
|