Skip to contentSkip to conversation

package/freeswitch: fix musl build

PATCH Applied Bernd Kuhls 2 participants 4 messages May 29

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/freeswitch: fix musl build

Fixes:
https://autobuild.buildroot.net/results/b14/b14481674ef0e292c7caf5c7db462bbbb997fc34/

---
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/pipelines/2561720861

 .../freeswitch/0008-apr-fix-musl-build.patch  | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 package/freeswitch/0008-apr-fix-musl-build.patch
package/freeswitch/0008-apr-fix-musl-build.patch new file +65 -0
new file mode 100644
index 0000000000..126c539983
@@ -0,0 +1,65 @@
+From 81bbf05838fc24b221debfdf75ab8a4c7e7b260c Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Fri, 29 May 2026 08:14:32 +0200
+Subject: [PATCH] apr: fix musl build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+strerror_r on musl always returns an int since its addition back in 2011
+with
+https://git.musl-libc.org/cgit/musl/commit/src/string/strerror_r.c?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01
+
+Add defines created by freeswitch configure to apr subproject to fix the
+build error:
+
+misc/unix/errorcodes.c: In function ‘native_strerror’:
+misc/unix/errorcodes.c:358:9: error: assignment to ‘const char *’ from
+ ‘int’ makes pointer from integer without a cast [-Wint-conversion]
+  358 |     msg = strerror_r(statcode, buf, bufsize);
+
+Upstream: https://github.com/signalwire/freeswitch/pull/3046
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ libs/apr/misc/unix/errorcodes.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/libs/apr/misc/unix/errorcodes.c b/libs/apr/misc/unix/errorcodes.c
+index 3be0b25b93..93c428df62 100644
+--- a/libs/apr/misc/unix/errorcodes.c
++++ b/libs/apr/misc/unix/errorcodes.c
+@@ -25,6 +25,9 @@
+ #ifdef HAVE_DLFCN_H
+ #include <dlfcn.h>
+ #endif
++#ifndef WIN32
++#include "../../../src/include/switch_private.h"
++#endif
+ 
+ /*
+  * stuffbuffer - like fspr_cpystrn() but returns the address of the
+@@ -352,12 +355,20 @@ const char *strerror_r(fspr_status_t, char *, fspr_size_t);
+ static char *native_strerror(fspr_status_t statcode, char *buf,
+                              fspr_size_t bufsize)
+ {
++#if defined(STRERROR_R_CHAR_P)
+     const char *msg;
++#else
++    int msg;
++#endif
+ 
+     buf[0] = '\0';
+     msg = strerror_r(statcode, buf, bufsize);
+     if (buf[0] == '\0') { /* libc didn't use our buffer */
++#if defined(STRERROR_R_CHAR_P)
+         return stuffbuffer(buf, bufsize, msg);
++#else
++        return stuffbuffer(buf, bufsize, (const char*)msg);
++#endif
+     }
+     else {
+         return buf;
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/3 package/libks: bump version to 2.0.11

---
Gitlab pipeline passed for libks:
https://gitlab.com/bkuhls/buildroot/-/pipelines/2561720809

The build error with bootlin-aarch64-glibc-old occured in the freeswitch package.

 package/libks/libks.hash | 2 +-
 package/libks/libks.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/libks/libks.hash +1 -1
index de16d0b029..681fe3692f 100644
@@ -1,3 +1,3 @@
 # Locally computed
-sha256  8525dd943cf970c860cd2596207c7ba6646c9e1f407e350fc0a39b76af75e625  libks-2.0.5.tar.gz
+sha256  7142800a0c9095ce0e52308c815026a8ad2a197f519363c050fe441039de20be  libks-2.0.11.tar.gz
 sha256  3aba376a08bf91c95518532e627157f0ee3ab2712d1198463e2b1ac9186dd142  copyright
package/libks/libks.mk +1 -1
index 2de6b727dd..53bec7dcdc 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBKS_VERSION = 2.0.5
+LIBKS_VERSION = 2.0.11
 LIBKS_SITE = $(call github,signalwire,libks,v$(LIBKS_VERSION))
 LIBKS_LICENSE = MIT
 LIBKS_LICENSE_FILES = copyright
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/3 package/freeswitch: security bump version to 1.11.1

In reply to Bernd Kuhls

https://github.com/signalwire/freeswitch/releases/tag/v1.11.1
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Release-Notes/FreeSWITCH-1.11.x-Release-notes/

This bump depends on the bump of libks to 2.0.11:
https://github.com/signalwire/freeswitch/commit/4bc49f57b733e699a508aa51b83a16f09bf505dc

Removed patches which are included in this release. Renumbered patch 0004.

The following mods were removed upstream:
mod_isac: https://github.com/signalwire/freeswitch/commit/6286c51ff6e8d5bd5859e46d7ce4be427b7a63f0
mod_yaml: https://github.com/signalwire/freeswitch/commit/74c64339556362ab70e99976a90aca54e31b2c27
mod_portaudio: https://github.com/signalwire/freeswitch/commit/49e63f6fffc6962ecfe762c57aae0c1e5bcc5096
mod_soundtouch: https://github.com/signalwire/freeswitch/commit/d912e9fb011298acb790663ca075e845c3740e9d

Renamed configure option to disable python support:
https://github.com/signalwire/freeswitch/commit/3a53566eab5793c8c2daf9e44e10d8a4a572aa69

---
Gitlab pipeline passed with the exception of bootlin-aarch64-glibc-old:
https://gitlab.com/bkuhls/buildroot/-/pipelines/2561720809

./.libs/libfreeswitch.so: undefined reference to `getentropy'

Freeswitch added the usage of getentropy in version 1.11.0:
https://github.com/signalwire/freeswitch/commit/7f9dd270b492907ddd063be18003e18719bdb80b

getentropy was added in glibc 2.25
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=ec15dde7613306cfa574149f61ea38ab3fbba76d;hb=db0242e3023436757bbc7c488a779e6e3343db04#l116

causing a build error with bootlin-aarch64-glibc-old which is based on glibc 2.24. I found no way to disable freeswitch for this toolchain.

 package/freeswitch/0002-ffmpeg7.patch         |  206 --
 ...{0004-ffmpeg8.patch => 0002-ffmpeg8.patch} |    0
 ...ld.patch => 0003-apr-fix-musl-build.patch} |    0
 ...nt-mod_xml_rpc-const-compiler-errors.patch |   35 -
 ...compilation-against-2023-06-02-spand.patch |  150 --
 ...mory-leak-by-correctly-freeing-regex.patch |   34 -
 .../0006-Move-project-to-PCRE2.patch          | 1813 -----------------
 ...x-double-free-after-upgrade-to-pcre2.patch |   27 -
 package/freeswitch/freeswitch.hash            |    5 +-
 package/freeswitch/freeswitch.mk              |   30 +-
 10 files changed, 4 insertions(+), 2296 deletions(-)
 delete mode 100644 package/freeswitch/0002-ffmpeg7.patch
 rename package/freeswitch/{0004-ffmpeg8.patch => 0002-ffmpeg8.patch} (100%)
 rename package/freeswitch/{0008-apr-fix-musl-build.patch => 0003-apr-fix-musl-build.patch} (100%)
 delete mode 100644 package/freeswitch/0003-xml_int-mod_xml_rpc-const-compiler-errors.patch
 delete mode 100644 package/freeswitch/0004-mod_spandsp-Fix-compilation-against-2023-06-02-spand.patch
 delete mode 100644 package/freeswitch/0005-Fix-memory-leak-by-correctly-freeing-regex.patch
 delete mode 100644 package/freeswitch/0006-Move-project-to-PCRE2.patch
 delete mode 100644 package/freeswitch/0007-Fix-double-free-after-upgrade-to-pcre2.patch
package/freeswitch/0002-ffmpeg7.patch deleted +0 -206
deleted file mode 100644
index ac1d3a13af..0000000000
@@ -1,206 +0,0 @@
-From ff2e8b475f25a995e085045fc25ba445fb32c57e Mon Sep 17 00:00:00 2001
-From: Korynkai <[email protected]>
-Date: Mon, 30 Dec 2024 22:23:33 +0000
-Subject: [PATCH] Fixes related to signalwire/freeswitch#2202
- AVOutputFormat::priv_data_size is marked private and no longer exists in the
- public API as of FFMPEG 6.0, but found hidden in AVOutputFormat as part of
- FFOutputFormat. AVCodecContext::ticks_per_frame was deprecated as of FFMPEG
- 6.1. libavcodec notes 'do not use avcodec_close()' as of FFMPEG 3.1, use
- avcodec_free_context() instead. AVFrame::key_frame was deprecated as of
- FFMPEG 6.1, use AVFrame::flags instead. AVInputFormat::read_seek and
- AVInputFormat::read_seek2 no longer exists as of FFMPEG 7.0. This seems to
- only be used for logging purposes, so guard this functionality accordingly.
-
-Upstream: https://github.com/signalwire/freeswitch/pull/2681.patch
-
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- src/mod/applications/mod_av/avcodec.c  | 27 +++++++++++++++++++++-
- src/mod/applications/mod_av/avformat.c | 31 +++++++++++++++++++++++---
- 2 files changed, 54 insertions(+), 4 deletions(-)
-
-diff --git a/src/mod/applications/mod_av/avcodec.c b/src/mod/applications/mod_av/avcodec.c
-index 0293b834467..be864a56744 100644
---- a/src/mod/applications/mod_av/avcodec.c
-+++ b/src/mod/applications/mod_av/avcodec.c
-@@ -1226,9 +1226,13 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt
- 	}
- 
- 	if (context->encoder_ctx) {
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,48,101))
- 		if (avcodec_is_open(context->encoder_ctx)) {
- 			avcodec_close(context->encoder_ctx);
- 		}
-+#else
-+		avcodec_free_context(&(context->encoder_ctx));
-+#endif
- 		av_free(context->encoder_ctx);
- 		context->encoder_ctx = NULL;
- 	}
-@@ -1319,9 +1323,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
- 		}
- 
- 		if (context->encoder_ctx) {
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,48,101))
- 			if (avcodec_is_open(context->encoder_ctx)) {
- 				avcodec_close(context->encoder_ctx);
- 			}
-+#else
-+			avcodec_free_context(&(context->encoder_ctx));
-+#endif
- 			av_free(context->encoder_ctx);
- 			context->encoder_ctx = NULL;
- 		}
-@@ -1557,7 +1565,11 @@ static switch_status_t switch_h264_encode(switch_codec_t *codec, switch_frame_t
- 		}
- 
- 		 avframe->pict_type = AV_PICTURE_TYPE_I;
-+#if (LIBAVUTIL_VERSION_INT < AV_VERSION_INT(58,29,100))
- 		 avframe->key_frame = 1;
-+#else
-+		 avframe->flags |= AV_FRAME_FLAG_KEY;
-+#endif
- 		 context->last_keyframe_request = switch_time_now();
- 	}
- 
-@@ -1600,9 +1612,14 @@ GCC_DIAG_ON(deprecated-declarations)
- 		}
- #endif
- 
-+#if (LIBAVUTIL_VERSION_INT < AV_VERSION_INT(58,29,100))
- 	if (context->need_key_frame && avframe->key_frame == 1) {
--		avframe->pict_type = 0;
- 		avframe->key_frame = 0;
-+#else
-+	if (context->need_key_frame && avframe->flags & AV_FRAME_FLAG_KEY) {
-+		avframe->flags ^= AV_FRAME_FLAG_KEY;
-+#endif
-+		avframe->pict_type = 0;
- 		context->need_key_frame = 0;
- 	}
- 
-@@ -1862,14 +1879,22 @@ static switch_status_t switch_h264_destroy(switch_codec_t *codec)
- 
- 	switch_buffer_destroy(&context->nalu_buffer);
- 	if (context->decoder_ctx) {
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,48,101))
- 		if (avcodec_is_open(context->decoder_ctx)) avcodec_close(context->decoder_ctx);
-+#else
-+		avcodec_free_context(&(context->decoder_ctx));
-+#endif
- 		av_free(context->decoder_ctx);
- 	}
- 
- 	switch_img_free(&context->img);
- 
- 	if (context->encoder_ctx) {
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,48,101))
- 		if (avcodec_is_open(context->encoder_ctx)) avcodec_close(context->encoder_ctx);
-+#else
-+		avcodec_free_context(&(context->encoder_ctx));
-+#endif
- 		av_free(context->encoder_ctx);
- 	}
- 
-diff --git a/src/mod/applications/mod_av/avformat.c b/src/mod/applications/mod_av/avformat.c
-index c1e00525300..6fcb51c2079 100644
---- a/src/mod/applications/mod_av/avformat.c
-+++ b/src/mod/applications/mod_av/avformat.c
-@@ -184,6 +184,16 @@ struct av_file_context {
- 
- typedef struct av_file_context av_file_context_t;
- 
-+#if (LIBAVFORMAT_VERSION_MAJOR >= 60)
-+typedef struct FFOutputFormat {
-+	int priv_data_size;
-+} FFOutputFormat;
-+
-+static inline int priv_data_size(const AVOutputFormat *fmt)
-+{
-+    return ((const struct FFOutputFormat*)fmt)->priv_data_size;
-+}
-+#endif
- 
- /**
-  * Fill the provided buffer with a string containing a timestamp
-@@ -455,8 +465,13 @@ static int mod_avformat_alloc_output_context2(AVFormatContext **avctx, const cha
- 	}
- 
- 	s->oformat = oformat;
-+#if (LIBAVFORMAT_VERSION_MAJOR < 60)
- 	if (s->oformat->priv_data_size > 0) {
- 		s->priv_data = av_mallocz(s->oformat->priv_data_size);
-+#else
-+	if (priv_data_size(s->oformat) > 0) {
-+		s->priv_data = av_mallocz(priv_data_size(s->oformat));
-+#endif
- 		if (!s->priv_data) {
- 			goto nomem;
- 		}
-@@ -621,7 +636,9 @@ static switch_status_t add_stream(av_file_context_t *context, MediaStream *mst,
- 		c->rc_initial_buffer_occupancy = buffer_bytes * 8;
- 
- 		if (codec_id == AV_CODEC_ID_H264) {
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60,31,102))
- 			c->ticks_per_frame = 2;
-+#endif
- 
- 
- 			c->flags|=AV_CODEC_FLAG_LOOP_FILTER;   // flags=+loop
-@@ -1410,8 +1427,10 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
- 		switch_goto_status(SWITCH_STATUS_FALSE, err);
- 	}
- 
-+#if (LIBAVFORMAT_VERSION_MAJOR < 61)
- 	handle->seekable = context->fc->iformat->read_seek2 ? 1 : (context->fc->iformat->read_seek ? 1 : 0);
- 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "file %s is %sseekable\n", filename, handle->seekable ? "" : "not ");
-+#endif
- 
- 	/** Get information on the input file (number of streams etc.). */
- 	if ((error = avformat_find_stream_info(context->fc, opts ? &opts : NULL)) < 0) {
-@@ -1502,7 +1521,11 @@ static switch_status_t open_input_file(av_file_context_t *context, switch_file_h
- 
- 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not open input audio codec channel 2 (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
- 		if ((cc = av_get_codec_context(&context->audio_st[0]))) {
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,48,101))
- 			avcodec_close(cc);
-+#else
-+			avcodec_free_context(&cc);
-+#endif
- 		}
- 
- 		context->has_audio = 0;
-@@ -3084,14 +3107,11 @@ static switch_status_t av_file_read_video(switch_file_handle_t *handle, switch_f
- 	void *pop;
- 	MediaStream *mst = &context->video_st;
- 	AVStream *st = mst->st;
--	int ticks = 0;
- 	int64_t max_delta = 1 * AV_TIME_BASE; // 1 second
- 	switch_status_t status = SWITCH_STATUS_SUCCESS;
- 	double fl_to = 0.02;
- 	int do_fl = 0;
- 	int smaller_ts = context->read_fps;
--	AVCodecContext *c = NULL;
--	AVCodecParserContext *cp = NULL;
- 
- 	if (!context->has_video) return SWITCH_STATUS_FALSE;
- 
-@@ -3199,6 +3219,10 @@ static switch_status_t av_file_read_video(switch_file_handle_t *handle, switch_f
- 	}
- #endif
- 
-+#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60,31,102))
-+	int ticks = 0;
-+	AVCodecContext *c = NULL;
-+	AVCodecParserContext *cp = NULL;
- 	if ((c = av_get_codec_context(mst)) && c->time_base.num) {
- 		cp = av_stream_get_parser(st);
- 		ticks = cp ? cp->repeat_pict + 1 : c->ticks_per_frame;
-@@ -3210,6 +3234,7 @@ static switch_status_t av_file_read_video(switch_file_handle_t *handle, switch_f
- 			context->video_start_time, ticks, c ? c->ticks_per_frame : -1, st->time_base.num, st->time_base.den, c ? c->time_base.num : -1, c ? c->time_base.den : -1,
- 			st->start_time, st->duration == AV_NOPTS_VALUE ? context->fc->duration / AV_TIME_BASE * 1000 : st->duration, st->nb_frames, av_q2d(st->time_base));
- 	}
-+#endif
- 
-  again:
- 
package/freeswitch/0002-ffmpeg8.patch renamed from package/freeswitch/0004-ffmpeg8.patch +0 -0
similarity index 100%
rename from package/freeswitch/0004-ffmpeg8.patch
rename to package/freeswitch/0002-ffmpeg8.patch
package/freeswitch/0003-apr-fix-musl-build.patch renamed from package/freeswitch/0008-apr-fix-musl-build.patch +0 -0
similarity index 100%
rename from package/freeswitch/0008-apr-fix-musl-build.patch
rename to package/freeswitch/0003-apr-fix-musl-build.patch
package/freeswitch/0003-xml_int-mod_xml_rpc-const-compiler-errors.patch deleted +0 -35
deleted file mode 100644
index 0cd5283a14..0000000000
@@ -1,35 +0,0 @@
-From 475b64d1c5707e1302cf9f7cfe3c385b7339c6c4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?=
- =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= <[email protected]>
-Date: Sat, 22 Jun 2024 14:58:52 +0200
-Subject: [PATCH] xml_int/mod_xml_rpc: const compiler errors
-
-Upstream: https://github.com/signalwire/freeswitch/pull/2496
-
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
-index 8e49462d2c2..0a4e5e1e449 100644
---- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
-+++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
-@@ -321,7 +321,7 @@ static abyss_bool user_attributes(const char *user, const char *domain_name,
- static abyss_bool is_authorized(const TSession * r, const char *command)
- {
- 	char *user = NULL, *domain_name = NULL;
--	char *allowed_commands = NULL;
-+	const char *allowed_commands = NULL;
- 	char *dp;
- 	char *dup = NULL;
- 	char *argv[256] = { 0 };
-@@ -922,7 +922,7 @@ abyss_bool handler_hook(TSession * r)
- 				if (len > 0) {
- 					int succeeded = TRUE;
- 					char *qp = qbuf;
--					char *readError;
-+					const char *readError;
- 
- 					do {
- 						int blen = r->connP->buffersize - r->connP->bufferpos;
package/freeswitch/0004-mod_spandsp-Fix-compilation-against-2023-06-02-spand.patch deleted +0 -150

150 lines not on this page · raw message

package/freeswitch/0005-Fix-memory-leak-by-correctly-freeing-regex.patch deleted +0 -34
deleted file mode 100644
index 5ce3a060a8..0000000000
@@ -1,34 +0,0 @@
-From 12b47fe7f91b93ba9cec90676e62c6239a097c98 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <[email protected]>
-Date: Fri, 3 Nov 2023 17:27:06 +0100
-Subject: [PATCH] [mod_verto] Fix memory leak by correctly freeing regex
-
-For mod_verto regex was never freed and was actually leaking memory.
-Correctly free the compiled regex to fix the memory leak.
-
-Signed-off-by: Christian Marangi <[email protected]>
-
-Upstream: https://github.com/signalwire/freeswitch/commit/12b47fe7f91b93ba9cec90676e62c6239a097c98
-
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- src/mod/endpoints/mod_verto/mod_verto.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c
-index 48c40527b56..36aba6db5e2 100644
---- a/src/mod/endpoints/mod_verto/mod_verto.c
-+++ b/src/mod/endpoints/mod_verto/mod_verto.c
-@@ -1893,10 +1893,12 @@ static void http_run(jsock_t *jsock)
- 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
- 								  "%d request [%s] matched expr [%s]\n", proceed, request->uri, expression);
- 				request->uri = rule->value;
-+				switch_regex_safe_free(re);
- 				break;
- 			}
- 
- 			rule = rule->next;
-+			switch_regex_safe_free(re);
- 		}
- 	}
- 
package/freeswitch/0006-Move-project-to-PCRE2.patch deleted +0 -1813

1,813 lines not on this page · raw message

package/freeswitch/0007-Fix-double-free-after-upgrade-to-pcre2.patch deleted +0 -27
deleted file mode 100644
index 37455d7794..0000000000
@@ -1,27 +0,0 @@
-From 02549c10d9155d0f71f36289aeeddc9c73a4d46e Mon Sep 17 00:00:00 2001
-From: Andrey Volk <[email protected]>
-Date: Thu, 13 Nov 2025 17:42:04 +0300
-Subject: [PATCH] [mod_dialplan_xml] Fix double free after upgrade to pcre2.
- (#2946)
-
-Upstream: https://github.com/signalwire/freeswitch/commit/02549c10d9155d0f71f36289aeeddc9c73a4d46e
-
-[backported only second part of upstream commit, the first part is
- already included in patch 0006]
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
-index 3d3fdfd8a93..cab522887c4 100644
---- a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
-+++ b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
-@@ -357,6 +357,7 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
- 					save_proceed = proceed;
- 
- 					re = NULL;
-+					match_data = NULL;
- 				}
- 
- 				switch_regex_and_match_data_safe_free(re, match_data);
package/freeswitch/freeswitch.hash +2 -3
index 9c6fb6155d..2cbded4da1 100644
@@ -1,5 +1,5 @@
-# From https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.12.-release.tar.xz.sha256
-sha256  e324e4ae063e692c42b93031157329bae339ea007e611d3535333deaed85aa47  freeswitch-1.10.12.-release.tar.xz
+# From https://files.freeswitch.org/freeswitch-releases/freeswitch-1.11.1.-release.tar.xz.sha256
+sha256  ed4e6ecc6a6ee0bcbc068f33cf3e5d1b83d7ad26c3a98feaebb1b2ab22d5adf4 freeswitch-1.11.1.-release.tar.xz
 # Locally computed
 sha256  75c933202f40939cdc3827fce20a1efdaa38291e2b5a65d234eb16e2cffda66a  COPYING
 sha256  c3e3388768dae8bf4edcc4108f95be815b8a05c0b0aef6e4c3d8df81affdfa34  docs/OPENH264_BINARY_LICENSE.txt
@@ -7,4 +7,3 @@ sha256  e8e26b16da14aa3e6ed5c22c705fdc1f45d6225fca461ea9f7314bcdfdc414c4  libs/a
 sha256  8267348d5af1262c11d1a08de2f5afc77457755f1ac658627dd9acf71011d615  libs/libvpx/LICENSE
 sha256  2b2cc1180c7e6988328ad2033b04b80117419db9c4c584918bbb3cfec7e9364f  libs/libyuv/LICENSE
 sha256  8e19d42a1eec9561f3f347253ddf2e385c55f392f025bb0fd41b88dbf38db5ae  libs/srtp/LICENSE
-sha256  ab00a482b6a3902e40211b43c5d0441962ea99b6cc7c25c0f243fa270b78d482  src/mod/codecs/mod_isac/LICENSE
package/freeswitch/freeswitch.mk +2 -28
index 5cd80cfc4f..cec9b30660 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FREESWITCH_VERSION = 1.10.12
+FREESWITCH_VERSION = 1.11.1
 FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).-release.tar.xz
 FREESWITCH_SITE = https://files.freeswitch.org/freeswitch-releases
 # External modules need headers/libs from staging
@@ -19,9 +19,6 @@ FREESWITCH_LICENSE_FILES = \
 	libs/apr/LICENSE \
 	libs/srtp/LICENSE
 
-# 0006-Move-project-to-PCRE2.patch
-FREESWITCH_AUTORECONF = YES
-
 FREESWITCH_CPE_ID_VENDOR = freeswitch
 
 # required dependencies
@@ -81,7 +78,7 @@ FREESWITCH_CONF_ENV += \
 FREESWITCH_CONF_OPTS = \
 	--without-erlang \
 	--enable-fhs \
-	--without-python \
+	--without-python3 \
 	--disable-system-xmlrpc-c
 
 # Enable optional modules
@@ -156,14 +153,6 @@ define FREESWITCH_ENABLE_MODULES
 endef
 FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES
 
-# mod_isac supports a limited set of archs
-# src/mod/codecs/mod_isac/typedefs.h
-ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y)
-FREESWITCH_LICENSE += , BSD-3-Clause (mod_isac)
-FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE
-FREESWITCH_ENABLED_MODULES += codecs/mod_isac
-endif
-
 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
 FREESWITCH_DEPENDENCIES += alsa-lib
 FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
@@ -231,11 +220,6 @@ ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
 FREESWITCH_DEPENDENCIES += libxcrypt
 endif
 
-ifeq ($(BR2_PACKAGE_LIBYAML),y)
-FREESWITCH_DEPENDENCIES += libyaml
-FREESWITCH_ENABLED_MODULES += languages/mod_yaml
-endif
-
 ifeq ($(BR2_PACKAGE_LUA),y)
 FREESWITCH_DEPENDENCIES += lua
 FREESWITCH_ENABLED_MODULES += languages/mod_lua
@@ -251,11 +235,6 @@ FREESWITCH_DEPENDENCIES += opus
 FREESWITCH_ENABLED_MODULES += codecs/mod_opus
 endif
 
-ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
-FREESWITCH_DEPENDENCIES += portaudio
-FREESWITCH_ENABLED_MODULES += endpoints/mod_portaudio
-endif
-
 ifeq ($(BR2_PACKAGE_LAME)$(BR2_PACKAGE_LIBSHOUT)$(BR2_PACKAGE_MPG123),yyy)
 FREESWITCH_DEPENDENCIES += lame libshout mpg123
 FREESWITCH_ENABLED_MODULES += formats/mod_shout
@@ -271,11 +250,6 @@ FREESWITCH_DEPENDENCIES += libsndfile
 FREESWITCH_ENABLED_MODULES += formats/mod_sndfile
 endif
 
-ifeq ($(BR2_PACKAGE_LIBSOUNDTOUCH),y)
-FREESWITCH_DEPENDENCIES += libsoundtouch
-FREESWITCH_ENABLED_MODULES += applications/mod_soundtouch
-endif
-
 ifeq ($(BR2_PACKAGE_FREESWITCH_OPENCV4),y)
 FREESWITCH_DEPENDENCIES += opencv4
 FREESWITCH_ENABLED_MODULES += applications/mod_cv
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 3/3] package/freeswitch: security bump version to 1.11.1

Quoted 25 lines · Bernd Kuhls

https://github.com/signalwire/freeswitch/releases/tag/v1.11.1
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Release-Notes/FreeSWITCH-1.11.x-Release-notes/

This bump depends on the bump of libks to 2.0.11:
https://github.com/signalwire/freeswitch/commit/4bc49f57b733e699a508aa51b83a16f09bf505dc

Removed patches which are included in this release. Renumbered patch 0004.

The following mods were removed upstream:
mod_isac: https://github.com/signalwire/freeswitch/commit/6286c51ff6e8d5bd5859e46d7ce4be427b7a63f0
mod_yaml: https://github.com/signalwire/freeswitch/commit/74c64339556362ab70e99976a90aca54e31b2c27
mod_portaudio: https://github.com/signalwire/freeswitch/commit/49e63f6fffc6962ecfe762c57aae0c1e5bcc5096
mod_soundtouch: https://github.com/signalwire/freeswitch/commit/d912e9fb011298acb790663ca075e845c3740e9d

Renamed configure option to disable python support:
https://github.com/signalwire/freeswitch/commit/3a53566eab5793c8c2daf9e44e10d8a4a572aa69

---
Gitlab pipeline passed with the exception of bootlin-aarch64-glibc-old:
https://gitlab.com/bkuhls/buildroot/-/pipelines/2561720809

./.libs/libfreeswitch.so: undefined reference to `getentropy'

Quoted 8 lines

Freeswitch added the usage of getentropy in version 1.11.0:
https://github.com/signalwire/freeswitch/commit/7f9dd270b492907ddd063be18003e18719bdb80b

getentropy was added in glibc 2.25
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=ec15dde7613306cfa574149f61ea38ab3fbba76d;hb=db0242e3023436757bbc7c488a779e6e3343db04#l116

causing a build error with bootlin-aarch64-glibc-old which is based on glibc 2.24. I found no way to disable freeswitch for this toolchain.

I also don't know how to do that. It's old though :-)

[snip]

package/freeswitch/freeswitch.hash line 2

Quoted 9 lines
package/freeswitch/freeswitch.hash +2 -2
index 9c6fb6155d..2cbded4da1 100644
@@ -1,5 +1,5 @@
-# From https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.12.-release.tar.xz.sha256
-sha256  e324e4ae063e692c42b93031157329bae339ea007e611d3535333deaed85aa47  freeswitch-1.10.12.-release.tar.xz
+# From https://files.freeswitch.org/freeswitch-releases/freeswitch-1.11.1.-release.tar.xz.sha256
+sha256  ed4e6ecc6a6ee0bcbc068f33cf3e5d1b83d7ad26c3a98feaebb1b2ab22d5adf4 freeswitch-1.11.1.-release.tar.xz

Should be two spaces instead of one space (check-package).

Applied series to master, thanks.
Regards,
Arnout

Quoted 81 lines
package/freeswitch/freeswitch.hash +0 -1
  # Locally computed
  sha256  75c933202f40939cdc3827fce20a1efdaa38291e2b5a65d234eb16e2cffda66a  COPYING
  sha256  c3e3388768dae8bf4edcc4108f95be815b8a05c0b0aef6e4c3d8df81affdfa34  docs/OPENH264_BINARY_LICENSE.txt
@@ -7,4 +7,3 @@ sha256  e8e26b16da14aa3e6ed5c22c705fdc1f45d6225fca461ea9f7314bcdfdc414c4  libs/a
  sha256  8267348d5af1262c11d1a08de2f5afc77457755f1ac658627dd9acf71011d615  libs/libvpx/LICENSE
  sha256  2b2cc1180c7e6988328ad2033b04b80117419db9c4c584918bbb3cfec7e9364f  libs/libyuv/LICENSE
  sha256  8e19d42a1eec9561f3f347253ddf2e385c55f392f025bb0fd41b88dbf38db5ae  libs/srtp/LICENSE
-sha256  ab00a482b6a3902e40211b43c5d0441962ea99b6cc7c25c0f243fa270b78d482  src/mod/codecs/mod_isac/LICENSE
package/freeswitch/freeswitch.mk +2 -23
index 5cd80cfc4f..cec9b30660 100644
@@ -4,7 +4,7 @@
  #
  ################################################################################
 
-FREESWITCH_VERSION = 1.10.12
+FREESWITCH_VERSION = 1.11.1
  FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).-release.tar.xz
  FREESWITCH_SITE = https://files.freeswitch.org/freeswitch-releases
  # External modules need headers/libs from staging
@@ -19,9 +19,6 @@ FREESWITCH_LICENSE_FILES = \
  	libs/apr/LICENSE \
  	libs/srtp/LICENSE
 
-# 0006-Move-project-to-PCRE2.patch
-FREESWITCH_AUTORECONF = YES
-
  FREESWITCH_CPE_ID_VENDOR = freeswitch
 
  # required dependencies
@@ -81,7 +78,7 @@ FREESWITCH_CONF_ENV += \
  FREESWITCH_CONF_OPTS = \
  	--without-erlang \
  	--enable-fhs \
-	--without-python \
+	--without-python3 \
  	--disable-system-xmlrpc-c
 
  # Enable optional modules
@@ -156,14 +153,6 @@ define FREESWITCH_ENABLE_MODULES
  endef
  FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES
 
-# mod_isac supports a limited set of archs
-# src/mod/codecs/mod_isac/typedefs.h
-ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y)
-FREESWITCH_LICENSE += , BSD-3-Clause (mod_isac)
-FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE
-FREESWITCH_ENABLED_MODULES += codecs/mod_isac
-endif
-
  ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
  FREESWITCH_DEPENDENCIES += alsa-lib
  FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa
@@ -231,11 +220,6 @@ ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
  FREESWITCH_DEPENDENCIES += libxcrypt
  endif
 
-ifeq ($(BR2_PACKAGE_LIBYAML),y)
-FREESWITCH_DEPENDENCIES += libyaml
-FREESWITCH_ENABLED_MODULES += languages/mod_yaml
-endif
-
  ifeq ($(BR2_PACKAGE_LUA),y)
  FREESWITCH_DEPENDENCIES += lua
  FREESWITCH_ENABLED_MODULES += languages/mod_lua
@@ -251,11 +235,6 @@ FREESWITCH_DEPENDENCIES += opus
  FREESWITCH_ENABLED_MODULES += codecs/mod_opus
  endif
 
-ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
-FREESWITCH_DEPENDENCIES += portaudio
-FREESWITCH_ENABLED_MODULES += endpoints/mod_portaudio
-endif
-
  ifeq ($(BR2_PACKAGE_LAME)$(BR2_PACKAGE_LIBSHOUT)$(BR2_PACKAGE_MPG123),yyy)
  FREESWITCH_DEPENDENCIES += lame libshout mpg123
  FREESWITCH_ENABLED_MODULES += formats/mod_shout
@@ -271,11 +250,6 @@ FREESWITCH_DEPENDENCIES += libsndfile
  FREESWITCH_ENABLED_MODULES += formats/mod_sndfile

package/freeswitch/freeswitch.mk FREESWITCH_DEPENDENCIES += libsndfile · line 255

Quoted 10 lines
package/freeswitch/freeswitch.mk +0 -5
  endif
 
-ifeq ($(BR2_PACKAGE_LIBSOUNDTOUCH),y)
-FREESWITCH_DEPENDENCIES += libsoundtouch
-FREESWITCH_ENABLED_MODULES += applications/mod_soundtouch
-endif
-
  ifeq ($(BR2_PACKAGE_FREESWITCH_OPENCV4),y)
  FREESWITCH_DEPENDENCIES += opencv4
  FREESWITCH_ENABLED_MODULES += applications/mod_cv

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot