From: Alexander Yurkov <[email protected]>

Backport patches from syslog-ng for options to disable awk.
Gawk dependency in syslog-ng can only be turned off in the right way via
options.

Signed-off-by: Alexander Yurkov <[email protected]>
---
 ...at-Add-option-in-cmake-to-remove-awk.patch | 37 +++++++++++++
 ...dd-option-in-autotools-to-remove-awk.patch | 55 +++++++++++++++++++
 .../syslog-ng/syslog-ng_4.11.0.bb             |  4 +-
 3 files changed, 95 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-support/syslog-ng/files/0001-feat-Add-option-in-cmake-to-remove-awk.patch
 create mode 100644 
meta-oe/recipes-support/syslog-ng/files/0002-feat-Add-option-in-autotools-to-remove-awk.patch

diff --git 
a/meta-oe/recipes-support/syslog-ng/files/0001-feat-Add-option-in-cmake-to-remove-awk.patch
 
b/meta-oe/recipes-support/syslog-ng/files/0001-feat-Add-option-in-cmake-to-remove-awk.patch
new file mode 100644
index 0000000000..931b83a1d0
--- /dev/null
+++ 
b/meta-oe/recipes-support/syslog-ng/files/0001-feat-Add-option-in-cmake-to-remove-awk.patch
@@ -0,0 +1,37 @@
+From 57df53d6132cc77251cea746ad6ab6cfd9c8a9f1 Mon Sep 17 00:00:00 2001
+From: Alexander Yurkov <[email protected]>
+Date: Thu, 28 May 2026 21:01:40 +0000
+Subject: [PATCH] feat: Add option in cmake to remove awk.
+
+Add an option in cmake to remove the need for awk to avoid licensing issues.
+
+Upstream-Status: Backport [cd7ca1019aca0619f83035f2b11e8f3a22c51a33]
+
+Signed-off-by: Alexander Yurkov <[email protected]>
+---
+ scl/CMakeLists.txt | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/scl/CMakeLists.txt b/scl/CMakeLists.txt
+index e3f8c1d..bef4d50 100644
+--- a/scl/CMakeLists.txt
++++ b/scl/CMakeLists.txt
+@@ -54,8 +54,17 @@ set(SCL_DIRS
+     azure
+ )
+
++option(ENABLE_SCL_SYSLOGCONF_AWK "Install 
scl/syslogconf/convert-syslogconf.awk" ON)
++
+ install(DIRECTORY ${SCL_DIRS} DESTINATION share/syslog-ng/include/scl
+-        USE_SOURCE_PERMISSIONS)
++        USE_SOURCE_PERMISSIONS
++        PATTERN "convert-syslogconf.awk" EXCLUDE)
++
++if (ENABLE_SCL_SYSLOGCONF_AWK)
++    install(FILES syslogconf/convert-syslogconf.awk
++            DESTINATION share/syslog-ng/include/scl/syslogconf)
++endif()
++
+ install(FILES scl.conf DESTINATION share/syslog-ng/include)
+
+ if (NOT EXISTS ${CMAKE_INSTALL_PREFIX}/etc/syslog-ng.conf)
diff --git 
a/meta-oe/recipes-support/syslog-ng/files/0002-feat-Add-option-in-autotools-to-remove-awk.patch
 
b/meta-oe/recipes-support/syslog-ng/files/0002-feat-Add-option-in-autotools-to-remove-awk.patch
new file mode 100644
index 0000000000..976066c3ff
--- /dev/null
+++ 
b/meta-oe/recipes-support/syslog-ng/files/0002-feat-Add-option-in-autotools-to-remove-awk.patch
@@ -0,0 +1,55 @@
+From dc42135ae830e34df7939bf3c08934904c402fa6 Mon Sep 17 00:00:00 2001
+From: Alexander Yurkov <[email protected]>
+Date: Thu, 28 May 2026 21:04:27 +0000
+Subject: [PATCH] feat: Add option in autotools to remove awk.
+
+The option is to avoid licensing issues, and awk is turned off by
+default.
+
+Upstream-Status: Backport [eda6d019710048e81f00f3497d5f1143f3eca803]
+
+Signed-off-by: Alexander Yurkov <[email protected]>
+---
+ configure.ac    | 7 +++++++
+ scl/Makefile.am | 3 +++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b283836..b6c487b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -639,6 +639,12 @@ AC_ARG_ENABLE(all-modules,
+     AS_HELP_STRING([--enable-all-modules], [Forcibly enable all modules. 
(default: auto)]),
+     , enable_all_modules="auto")
+
++AC_ARG_ENABLE([scl-syslogconf-awk],
++  [AS_HELP_STRING([--disable-scl-syslogconf-awk],
++                  [Do not install scl/syslogconf/convert-syslogconf.awk])],
++  [],
++  [enable_scl_syslogconf_awk=yes])
++
+ if test "x$enable_all_modules" != "xauto"; then
+    state="$enable_all_modules"
+
+@@ -2685,6 +2691,7 @@ AM_CONDITIONAL([HAVE_GETRANDOM], [test 
x$ac_cv_func_getrandom = xyes])
+ AM_CONDITIONAL([HAVE_FMEMOPEN], [test x$ac_cv_func_fmemopen = xyes])
+ AM_CONDITIONAL([HAVE_JAVAH], [test -n "$JAVAH_BIN"])
+ AM_CONDITIONAL(ENABLE_IPV6, [test $enable_ipv6 = yes])
++AM_CONDITIONAL([ENABLE_SCL_SYSLOGCONF_AWK], [test 
"x$enable_scl_syslogconf_awk" = "xyes"])
+
+ AM_CONDITIONAL(OS_TYPE_MACOS, [test $ostype = "Darwin"])
+ AM_CONDITIONAL(OS_TYPE_FREEBSD, [test $ostype = "FreeBSD"])
+diff --git a/scl/Makefile.am b/scl/Makefile.am
+index 17d1a55..62b9d01 100644
+--- a/scl/Makefile.am
++++ b/scl/Makefile.am
+@@ -71,6 +71,9 @@ scl-install-data-local:
+               $(install_sh_DATA) $(srcdir)/scl/scl.conf  
$(DESTDIR)/$(config_includedir)/scl.conf; \
+       fi
+       (cd $(srcdir)/scl; tar cf - $(SCL_SUBDIRS)) | (cd $(DESTDIR)/$(scldir) 
&& tar xf - --no-same-owner)
++if !ENABLE_SCL_SYSLOGCONF_AWK
++      rm -f $(DESTDIR)/$(scldir)/syslogconf/convert-syslogconf.awk
++endif
+       chmod -R u+rwX $(DESTDIR)/$(scldir)
+
+ scl-uninstall-local:
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.11.0.bb 
b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.11.0.bb
index 1846758681..9c6f62856b 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.11.0.bb
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.11.0.bb
@@ -23,7 +23,9 @@ SRC_URI = 
"https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.ta
            file://syslog-ng-tmp.conf \
            file://syslog-ng.service-the-syslog-ng-service.patch \
            file://0001-Fix-buildpaths-warning.patch \
-"
+           file://0001-feat-Add-option-in-cmake-to-remove-awk.patch \
+           file://0002-feat-Add-option-in-autotools-to-remove-awk.patch \
+           "
 SRC_URI:append:powerpc64le = " 
file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch"
 
 SRC_URI[sha256sum] = 
"37ea0d4588533316de122df4e1b249867b0a0575f646c7478d0cc4d747462943"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#127287): 
https://lists.openembedded.org/g/openembedded-devel/message/127287
Mute This Topic: https://lists.openembedded.org/mt/119545563/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

  • [oe] [PATCH 1/2] syslog-ng: ... alexander.v.yurkov via lists.openembedded.org

Reply via email to