From 27e7b0bf14cf2321e2aae64e490671f5cfa2281d Mon Sep 17 00:00:00 2001 From: Arnout Vandecappelle Date: Fri, 19 Jul 2024 20:03:53 +0200 Subject: [PATCH 01/23] package/tipidee: fix install without config file When the tipidee package was added in commit 17deaf60f66fc08a796233920a104e5233b501e0, the committer refactored it so no separate boolean option is required to enable the config file. However, in doing so, the case where the config file is empty was not correctly handled: BR2_PACKAGE_TIPIDEE_CONFIG_FILE is never empty because even with the empty string it contains "". Fox by qstrip'ing before checking for empty. Signed-off-by: Arnout Vandecappelle --- package/tipidee/tipidee.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/tipidee/tipidee.mk b/package/tipidee/tipidee.mk index 1e15782aa49f..915b4f84bddf 100644 --- a/package/tipidee/tipidee.mk +++ b/package/tipidee/tipidee.mk @@ -33,12 +33,13 @@ define TIPIDEE_INSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/libexec/tipidee-config-preprocess endef -ifneq ($(BR2_PACKAGE_TIPIDEE_CONFIG_FILE),) +TIPIDEE_CONFIG_FILE = $(call qstrip, $(BR2_PACKAGE_TIPIDEE_CONFIG_FILE)) +ifneq ($(TIPIDEE_CONFIG_FILE),) TIPIDEE_DEPENDENCIES += host-tipidee define TIPIDEE_INSTALL_CONFIG $(HOST_DIR)/bin/tipidee-config \ - -i $(call qstrip, $(BR2_PACKAGE_TIPIDEE_CONFIG_FILE)) \ + -i "$(TIPIDEE_CONFIG_FILE)" \ -o $(TARGET_DIR)/etc/tipidee.conf.cdb endef TIPIDEE_POST_INSTALL_TARGET_HOOKS += TIPIDEE_INSTALL_CONFIG From 3bb426628c19f04cbad6821c1a68f008043d7808 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 14:29:08 +0200 Subject: [PATCH 02/23] package/mpir: fix build with host gcc >= 14 Fix the following build failure with host gcc >= 14 which enables -Werror=implicit-function-declaration (https://gcc.gnu.org/gcc-14/porting_to.html): configure:9998: checking build system compiler /usr/bin/gcc configure:10011: /usr/bin/gcc conftest.c conftest.c: In function 'main': conftest.c:4:3: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 4 | exit(0); | ^~~~ conftest.c:1:1: note: include '' or provide a declaration of 'exit' +++ |+#include 1 | int conftest.c:4:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 4 | exit(0); | ^~~~ conftest.c:4:3: note: include '' or provide a declaration of 'exit' configure:10014: $? = 1 configure:10021: result: no configure:10026: error: Specified CC_FOR_BUILD doesn't seem to work Fixes: - http://autobuild.buildroot.org/results/3ab381f06d5dc030039b6f6f8d19feb55cf3367d Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- ...-Fix-configure-failures-with-Xcode12.patch | 116 ++++++++++++++++++ package/mpir/mpir.mk | 2 + 2 files changed, 118 insertions(+) create mode 100644 package/mpir/0002-Fix-configure-failures-with-Xcode12.patch diff --git a/package/mpir/0002-Fix-configure-failures-with-Xcode12.patch b/package/mpir/0002-Fix-configure-failures-with-Xcode12.patch new file mode 100644 index 000000000000..453515f9267f --- /dev/null +++ b/package/mpir/0002-Fix-configure-failures-with-Xcode12.patch @@ -0,0 +1,116 @@ +From bbc43ca6ae0bec4f64e69c9cd4c967005d6470eb Mon Sep 17 00:00:00 2001 +From: Mitchell Blank Jr +Date: Mon, 21 Dec 2020 12:05:19 +0000 +Subject: [PATCH] Fix configure failures with Xcode12 + +Changes are needed becuase Xcode12 includes a default of +-Werror,-Wimplicit-function-declaration which means that +even something like calling "exit(0);" is a compile failure +if you haven't done a "#include " first (as C99 +requires, but most other compilers will just warn about) + +I don't know if the "long long reliability test 2" test which +tries to provoke a crash on a particular gcc 3.3 build still +does what it was originally intended to do with my change. +Of course, I doubt anyone has tried to use that compiler in +years. + +Fixes #290 + +Upstream: https://github.com/wbhart/mpir/commit/bbc43ca6ae0bec4f64e69c9cd4c967005d6470eb +Signed-off-by: Fabrice Fontaine +--- + acinclude.m4 | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 91c35bc23..620a629ef 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -589,9 +589,9 @@ extern + #endif + __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) + {t1 c,x,r;int i;if(v0){c=1;for(i=1;iconftest.c <conftest.c < + int + main () + { +- exit(0); ++ return 0; + } + double d; + double diff --git a/package/mpir/mpir.mk b/package/mpir/mpir.mk index 5dbd760aa1f8..46cd35e4365b 100644 --- a/package/mpir/mpir.mk +++ b/package/mpir/mpir.mk @@ -11,6 +11,8 @@ MPIR_LICENSE = LGPL-3.0+ MPIR_LICENSE_FILES = COPYING.LIB MPIR_INSTALL_STAGING = YES MPIR_DEPENDENCIES = gmp host-yasm +# 0002-Fix-configure-failures-with-Xcode12.patch +MPIR_AUTORECONF = YES ifeq ($(BR2_MIPS_NABI32),y) MPIR_CONF_OPTS += ABI=n32 From d3e1821cc6496bfab19e4fe3be9fe6223e8f8176 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 14:40:08 +0200 Subject: [PATCH 03/23] package/cpuload: fix build with gcc >= 14 Fix the following build failure with gcc >= 14: read_cpu_stat.c: In function 'cpudata_new': read_cpu_stat.c:49:17: error: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration] 49 | error("too many cpus"); | ^~~~~ | perror Fixes: - http://autobuild.buildroot.org/results/3bca2659011d123d7b7a0ca19c4e868643d45766 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- .../0001-Changed-error-calls-to-perror.patch | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 package/cpuload/0001-Changed-error-calls-to-perror.patch diff --git a/package/cpuload/0001-Changed-error-calls-to-perror.patch b/package/cpuload/0001-Changed-error-calls-to-perror.patch new file mode 100644 index 000000000000..6672bec6779c --- /dev/null +++ b/package/cpuload/0001-Changed-error-calls-to-perror.patch @@ -0,0 +1,115 @@ +From ffd61eaa72acf123dea0c80ed3774656289ab49f Mon Sep 17 00:00:00 2001 +From: roiec +Date: Wed, 5 Jan 2022 17:12:05 +0200 +Subject: [PATCH] Changed 'error' calls to 'perror' + +Upstream: https://github.com/kelvincheung/cpuload/pull/1 +Signed-off-by: Fabrice Fontaine +--- + .gitignore | 60 ++++++++++++++++++++++++++++++++++++++++++++ + src/graph_cpu_load.c | 4 +-- + src/read_cpu_stat.c | 2 +- + 3 files changed, 63 insertions(+), 3 deletions(-) + create mode 100644 .gitignore + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..c2ae907 +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,60 @@ ++# Prerequisites ++*.d ++ ++# Object files ++*.o ++*.ko ++*.obj ++*.elf ++ ++# Linker output ++*.ilk ++*.map ++*.exp ++ ++# Precompiled Headers ++*.gch ++*.pch ++ ++# Libraries ++*.lib ++*.a ++*.la ++*.lo ++ ++# Shared objects (inc. Windows DLLs) ++*.dll ++*.so ++*.so.* ++*.dylib ++ ++# Executables ++*.exe ++*.out ++*.app ++*.i*86 ++*.x86_64 ++*.hex ++ ++# Debug files ++*.dSYM/ ++*.su ++*.idb ++*.pdb ++ ++# Kernel Module Compile Results ++*.mod* ++*.cmd ++.tmp_versions/ ++modules.order ++Module.symvers ++Mkfile.old ++dkms.conf ++ ++#images ++*.tgz ++*.img ++ ++ ++#build ++configure +diff --git a/src/graph_cpu_load.c b/src/graph_cpu_load.c +index e4b7785..525d9ed 100644 +--- a/src/graph_cpu_load.c ++++ b/src/graph_cpu_load.c +@@ -132,7 +132,7 @@ void graph_new_line(char *str, unsigned long color) + graph_last_x = graph_last_y = -1; + + if (graph_data_index >= MAX_GRAPH_DATA - 2) +- error("Too many graph data."); ++ perror("Too many graph data."); + + graph_data[graph_data_index++] = DATUM_COLOR; + graph_data[graph_data_index++] = color; +@@ -145,7 +145,7 @@ void graph_new_line(char *str, unsigned long color) + void graph_add_point(int size, int amount) + { + if (graph_data_index >= MAX_GRAPH_DATA - 4) +- error("Too many graph data."); ++ perror("Too many graph data."); + + graph_data[graph_data_index++] = DATUM_SIZE; + graph_data[graph_data_index++] = size; +diff --git a/src/read_cpu_stat.c b/src/read_cpu_stat.c +index 3d014be..ff51d7f 100644 +--- a/src/read_cpu_stat.c ++++ b/src/read_cpu_stat.c +@@ -46,7 +46,7 @@ ProcessList *cpudata_new(void) + fclose(file); + + if (cpu > cpus -1) { +- error("too many cpus"); ++ perror("too many cpus"); + exit(1); + } + From 65672b9cd099b71dcfec1d982af1f35824b851d4 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 16:26:29 +0200 Subject: [PATCH 04/23] package/autossh: fix build with gcc >= 14 Include stdio.h to avoid that __progname check wrongly returned that the function is unavailable with gcc >= 14 which enables -Werror=implicit-function-declaration (https://gcc.gnu.org/gcc-14/porting_to.html): configure:5231: checking if libc defines __progname configure:5249: /home/autobuild/autobuild/instance-7/output-1/host/bin/sh4-buildroot-linux-musl-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c >&5 conftest.c: In function 'main': conftest.c:73:27: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 73 | extern char *__progname; printf("%s", __progname); | ^~~~~~ conftest.c:1:1: note: include '' or provide a declaration of 'printf' 1 | /* confdefs.h */ conftest.c:73:27: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 73 | extern char *__progname; printf("%s", __progname); | ^~~~~~ conftest.c:73:27: note: include '' or provide a declaration of 'printf' resulting in the following static build failure: /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/sh4-buildroot-linux-musl/14.1.0/../../../../sh4-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/host/sh4-buildroot-linux-musl/sysroot/lib/libc.a(libc.o):(.bss.__progname+0x0): multiple definition of `__progname'; autossh.o:(.bss+0x120): first defined here Fixes: - http://autobuild.buildroot.org/results/5d80a8096d0f5529cbd86903a74f3bab3d230f4a Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- ....ac-fix-__progname-check-with-gcc-14.patch | 52 +++++++++++++++++++ package/autossh/autossh.mk | 1 + 2 files changed, 53 insertions(+) create mode 100644 package/autossh/0001-configure.ac-fix-__progname-check-with-gcc-14.patch diff --git a/package/autossh/0001-configure.ac-fix-__progname-check-with-gcc-14.patch b/package/autossh/0001-configure.ac-fix-__progname-check-with-gcc-14.patch new file mode 100644 index 000000000000..a51732811077 --- /dev/null +++ b/package/autossh/0001-configure.ac-fix-__progname-check-with-gcc-14.patch @@ -0,0 +1,52 @@ +From 3a74eff481f37975e04f00db4923b1c16f93497d Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 20 Jul 2024 16:06:37 +0200 +Subject: [PATCH] configure.ac: fix __progname check with gcc >= 14 + +Include stdio.h to avoid that __progname check wrongly returns that +the function is unavailable with gcc >= 14 which enables +-Werror=implicit-function-declaration +(https://gcc.gnu.org/gcc-14/porting_to.html): + +configure:5231: checking if libc defines __progname +configure:5249: /home/autobuild/autobuild/instance-7/output-1/host/bin/sh4-buildroot-linux-musl-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c >&5 +conftest.c: In function 'main': +conftest.c:73:27: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] + 73 | extern char *__progname; printf("%s", __progname); + | ^~~~~~ +conftest.c:1:1: note: include '' or provide a declaration of 'printf' + 1 | /* confdefs.h */ +conftest.c:73:27: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] + 73 | extern char *__progname; printf("%s", __progname); + | ^~~~~~ +conftest.c:73:27: note: include '' or provide a declaration of 'printf' + +resulting in the following static build failure: + +/home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/sh4-buildroot-linux-musl/14.1.0/../../../../sh4-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/host/sh4-buildroot-linux-musl/sysroot/lib/libc.a(libc.o):(.bss.__progname+0x0): multiple definition of `__progname'; autossh.o:(.bss+0x120): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/5d80a8096d0f5529cbd86903a74f3bab3d230f4a + +Signed-off-by: Fabrice Fontaine +Upstream: https://github.com/Autossh/autossh/pull/9 +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4bb9380..dadb523 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -132,7 +132,7 @@ AC_CHECK_LIB(socket, connect) + # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ +- AC_TRY_LINK([], ++ AC_TRY_LINK([ #include ], + [ extern char *__progname; printf("%s", __progname); ], + [ ac_cv_libc_defines___progname="yes" ], + [ ac_cv_libc_defines___progname="no" ] +-- +2.43.0 + diff --git a/package/autossh/autossh.mk b/package/autossh/autossh.mk index 899e5cdb525a..fbb525bcca2c 100644 --- a/package/autossh/autossh.mk +++ b/package/autossh/autossh.mk @@ -10,6 +10,7 @@ AUTOSSH_SOURCE = autossh-$(AUTOSSH_VERSION).tgz AUTOSSH_LICENSE = Modified BSD AUTOSSH_LICENSE_FILES = autossh.c # Fix AC_ARG_WITH code generation for --with-ssh +# 0001-configure.ac-fix-__progname-check-with-gcc-14.patch AUTOSSH_AUTORECONF = YES AUTOSSH_CONF_OPTS = --with-ssh=/usr/bin/ssh From 9e5022a12c1f79139e446b2583e06aa430fad195 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 12:08:20 +0200 Subject: [PATCH 05/23] package/httping: fix patch fuzz Fix patch fuzz to avoid the following build failure raised since commit 8f88a644ed7d6c9ea55fd4fbe9d7f37055920016 which reduced the fuzz factor: Applying 0001-fix-math-library-linking.patch using patch: patching file Makefile Hunk #1 FAILED at 37. 1 out of 2 hunks FAILED -- saving rejects to file Makefile.rej Fixes: 8f88a644ed7d6c9ea55fd4fbe9d7f37055920016 - http://autobuild.buildroot.org/results/f9cfb6f55d1f2cb855e6959c2381eeddea3e4936 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/httping/0001-fix-math-library-linking.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/httping/0001-fix-math-library-linking.patch b/package/httping/0001-fix-math-library-linking.patch index 0078f41c61ef..582fb9e91787 100644 --- a/package/httping/0001-fix-math-library-linking.patch +++ b/package/httping/0001-fix-math-library-linking.patch @@ -2,12 +2,14 @@ Move LDFLAGS+=-lm option to the end. The order of the math library directive '-lm' matters. Signed-off-by: Yuvaraj Patil +[Fabrice: make the patch to be applied with fuzz factor 0] +Signed-off-by: Fabrice Fontaine --- diff -Nurp httping-2.3.4_orig/Makefile httping-2.3.4/Makefile --- httping-2.3.4_orig/Makefile 2014-07-23 16:16:36.495546288 +0530 +++ httping-2.3.4/Makefile 2014-07-23 16:18:42.547541002 +0530 -@@ -37,7 +37,6 @@ DEBUG=yes - WFLAGS=-Wall -W +@@ -36,7 +36,6 @@ DEBUG=yes + WFLAGS=-Wall -W -Wextra -pedantic -D_FORTIFY_SOURCE=2 OFLAGS= CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" -DLOCALEDIR=\"$(LOCALEDIR)\" -LDFLAGS+=-lm From a5466a4303d7652c217139bf0dc0b1eb9d6ba0c5 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 11:37:43 +0200 Subject: [PATCH 06/23] package/libcli: fix build with gcc >= 14 Fix the following build failure with gcc >= 14: libcli.c: In function 'cli_register_command': libcli.c:430:27: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 430 | if (!(c = calloc(sizeof(struct cli_command), 1))) return NULL; | ^~~~~~ libcli.c:430:27: note: earlier argument should specify number of elements, later size of each element Fixes: - http://autobuild.buildroot.org/results/a170d27689e069cf58f830bdd74f604364ee503b Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- ...rameters-for-Wcalloc-transposed-args.patch | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 package/libcli/0001-Swap-calloc-parameters-for-Wcalloc-transposed-args.patch diff --git a/package/libcli/0001-Swap-calloc-parameters-for-Wcalloc-transposed-args.patch b/package/libcli/0001-Swap-calloc-parameters-for-Wcalloc-transposed-args.patch new file mode 100644 index 000000000000..909de2b74ddd --- /dev/null +++ b/package/libcli/0001-Swap-calloc-parameters-for-Wcalloc-transposed-args.patch @@ -0,0 +1,96 @@ +From 42e798e3f8b4a092be26bc91c9f87e5593f0d302 Mon Sep 17 00:00:00 2001 +From: Gwyn Ciesla +Date: Wed, 31 Jan 2024 14:40:42 -0600 +Subject: [PATCH] Swap calloc parameters for -Wcalloc-transposed-args + +Upstream: https://github.com/dparrish/libcli/pull/93 +Signed-off-by: Fabrice Fontaine +--- + libcli.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/libcli.c b/libcli.c +index 88c23d8..32ceeae 100644 +--- a/libcli.c ++++ b/libcli.c +@@ -427,7 +427,7 @@ struct cli_command *cli_register_command(struct cli_def *cli, struct cli_command + struct cli_command *c; + + if (!command) return NULL; +- if (!(c = calloc(sizeof(struct cli_command), 1))) return NULL; ++ if (!(c = calloc(1, sizeof(struct cli_command)))) return NULL; + c->command_type = CLI_REGULAR_COMMAND; + c->callback = callback; + c->next = NULL; +@@ -597,7 +597,7 @@ struct cli_def *cli_init() { + struct cli_def *cli; + struct cli_command *c; + +- if (!(cli = calloc(sizeof(struct cli_def), 1))) return 0; ++ if (!(cli = calloc(1, sizeof(struct cli_def)))) return 0; + + cli->buf_size = 1024; + if (!(cli->buffer = calloc(cli->buf_size, 1))) { +@@ -1957,7 +1957,7 @@ int cli_match_filter_init(struct cli_def *cli, int argc, char **argv, struct cli + char *search_flags = cli_get_optarg_value(cli, "search_flags", NULL); + + filt->filter = cli_match_filter; +- filt->data = state = calloc(sizeof(struct cli_match_filter_state), 1); ++ filt->data = state = calloc(1, sizeof(struct cli_match_filter_state)); + if (!state) return CLI_ERROR; + + if (!strcmp(cli->pipeline->current_stage->words[0], "include")) { +@@ -2050,7 +2050,7 @@ int cli_range_filter_init(struct cli_def *cli, int argc, char **argv, struct cli + // from the command line processing and continue + + filt->filter = cli_range_filter; +- filt->data = state = calloc(sizeof(struct cli_range_filter_state), 1); ++ filt->data = state = calloc(1, sizeof(struct cli_range_filter_state)); + if (state) { + state->from = from; + state->to = to; +@@ -2087,7 +2087,7 @@ int cli_count_filter_init(struct cli_def *cli, int argc, UNUSED(char **argv), st + } + + filt->filter = cli_count_filter; +- if (!(filt->data = calloc(sizeof(int), 1))) return CLI_ERROR; ++ if (!(filt->data = calloc(1, sizeof(int)))) return CLI_ERROR; + + return CLI_OK; + } +@@ -2144,7 +2144,7 @@ struct cli_command *cli_register_filter(struct cli_def *cli, const char *command + struct cli_command *c; + + if (!command) return NULL; +- if (!(c = calloc(sizeof(struct cli_command), 1))) return NULL; ++ if (!(c = calloc(1, sizeof(struct cli_command)))) return NULL; + + c->command_type = CLI_FILTER_COMMAND; + c->init = init; +@@ -2256,7 +2256,7 @@ struct cli_optarg *cli_register_optarg(struct cli_command *cmd, const char *name + goto CLEANUP; + } + } +- if (!(optarg = calloc(sizeof(struct cli_optarg), 1))) goto CLEANUP; ++ if (!(optarg = calloc(1, sizeof(struct cli_optarg)))) goto CLEANUP; + if (!(optarg->name = strdup(name))) goto CLEANUP; + if (help && !(optarg->help = strdup(help))) goto CLEANUP; + +@@ -2532,7 +2532,7 @@ struct cli_command *cli_int_register_buildmode_command(struct cli_def *cli, stru + struct cli_command *c; + + if (!command) return NULL; +- if (!(c = calloc(sizeof(struct cli_command), 1))) return NULL; ++ if (!(c = calloc(1, sizeof(struct cli_command)))) return NULL; + + c->flags = flags; + c->callback = callback; +@@ -3095,7 +3095,7 @@ int cli_int_execute_pipeline(struct cli_def *cli, struct cli_pipeline *pipeline) + struct cli_pipeline_stage *stage = &pipeline->stage[stage_num]; + pipeline->current_stage = stage; + cli->found_optargs = stage->found_optargs; +- *filt = calloc(sizeof(struct cli_filter), 1); ++ *filt = calloc(1, sizeof(struct cli_filter)); + if (*filt) { + if ((rc = stage->command->init(cli, stage->num_words, stage->words, *filt) != CLI_OK)) { + break; From 321e065516a64198f586632bd83411767d98fe6c Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 22:22:31 +0200 Subject: [PATCH 07/23] package/augeas: bump to version 1.14.1 This bump will fix the following build failure with gcc >= 14 thanks to https://github.com/hercules-team/augeas/commit/792fb220a31a42043de6962fac6a1f6c030d67c5: internal.c: In function 'xstrerror': internal.c:436:12: error: returning 'int' from a function with return type 'const char *' makes pointer from integer without a cast [-Wint-conversion] 436 | return strerror_r(errnum, buf, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ https://github.com/hercules-team/augeas/blob/release-1.14.1/NEWS Fixes: - http://autobuild.buildroot.org/results/65014642966721115ae4050c23b083a7f39e1300 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/augeas/augeas.hash | 5 ++--- package/augeas/augeas.mk | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package/augeas/augeas.hash b/package/augeas/augeas.hash index 03b71349acb0..b3b2a2427c88 100644 --- a/package/augeas/augeas.hash +++ b/package/augeas/augeas.hash @@ -1,4 +1,3 @@ -# Locally calculated after checking pgp signature from -# http://download.augeas.net/augeas-1.12.0.tar.gz.sig -sha256 321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87 augeas-1.12.0.tar.gz +# Locally calculated +sha256 368bfdd782e4b9c7163baadd621359c82b162734864b667051ff6bcb57b9edff augeas-1.14.1.tar.gz sha256 ca0061fc1381a3ab242310e4b3f56389f28e3d460eb2fd822ed7a21c6f030532 COPYING diff --git a/package/augeas/augeas.mk b/package/augeas/augeas.mk index a0bc29456544..ac4bc7d0bee7 100644 --- a/package/augeas/augeas.mk +++ b/package/augeas/augeas.mk @@ -4,8 +4,8 @@ # ################################################################################ -AUGEAS_VERSION = 1.12.0 -AUGEAS_SITE = http://download.augeas.net +AUGEAS_VERSION = 1.14.1 +AUGEAS_SITE = https://github.com/hercules-team/augeas/releases/download/release-$(AUGEAS_VERSION) AUGEAS_INSTALL_STAGING = YES AUGEAS_LICENSE = LGPL-2.1+ AUGEAS_LICENSE_FILES = COPYING From e66a1a5e864ba78f78b01ea373bbb6ad31f0cba4 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 22:43:41 +0200 Subject: [PATCH 08/23] package/gtkiostream: fix version Update GTKIOSTREAM_VERSION to make it compatible with what is returned by https://release-monitoring.org/project/373420/ Fixes: fab48302865e5c0c98d91b696bc90e75e38189bb Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/gtkiostream/gtkiostream.hash | 2 +- package/gtkiostream/gtkiostream.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/gtkiostream/gtkiostream.hash b/package/gtkiostream/gtkiostream.hash index 90c754f48c2a..225504be1b1c 100644 --- a/package/gtkiostream/gtkiostream.hash +++ b/package/gtkiostream/gtkiostream.hash @@ -1,3 +1,3 @@ # locally computed hash -sha256 44e8d921d462005cd330a1c24e5bd8061175b90ae53f537dbf73f59b74f6e01b gtkiostream-v1.8.0.tar.gz +sha256 44e8d921d462005cd330a1c24e5bd8061175b90ae53f537dbf73f59b74f6e01b gtkiostream-1.8.0.tar.gz sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 gpl.txt diff --git a/package/gtkiostream/gtkiostream.mk b/package/gtkiostream/gtkiostream.mk index 36905d7e7d27..970644d6dfc2 100644 --- a/package/gtkiostream/gtkiostream.mk +++ b/package/gtkiostream/gtkiostream.mk @@ -4,8 +4,8 @@ # ################################################################################ -GTKIOSTREAM_VERSION = v1.8.0 -GTKIOSTREAM_SITE = $(call github,flatmax,gtkiostream,$(GTKIOSTREAM_VERSION)) +GTKIOSTREAM_VERSION = 1.8.0 +GTKIOSTREAM_SITE = $(call github,flatmax,gtkiostream,v$(GTKIOSTREAM_VERSION)) GTKIOSTREAM_LICENSE = GPL-2.0+ GTKIOSTREAM_LICENSE_FILES = gpl.txt From 16598146fbbbf492283f7b42d7c02e0d9fde2000 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 23:01:14 +0200 Subject: [PATCH 09/23] package/gtkiostream: fix build with alsa-lib Select BR2_PACKAGE_ALSA_LIB_MIXER if needed to fix the following build failure with alsa-lib raised since the addition of the package in commit fab48302865e5c0c98d91b696bc90e75e38189bb: In file included from ../include/ALSA/MixerElement.H:20, from ../include/ALSA/Mixer.H:20, from ../include/ALSA/ALSA.H:56, from ALSAControlMonitor.C:19: ../include/ALSA/MixerElementTypes.H:26:5: error: 'snd_mixer_selem_channel_id_t' does not name a type 26 | snd_mixer_selem_channel_id_t channel; ///< The ALSA channel ID | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: fab48302865e5c0c98d91b696bc90e75e38189bb - http://autobuild.buildroot.org/results/6be71c9fbdccbdf4f5e540bafa748dda833aeedb Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/gtkiostream/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/gtkiostream/Config.in b/package/gtkiostream/Config.in index 17480b8ff811..1d1ec2734619 100644 --- a/package/gtkiostream/Config.in +++ b/package/gtkiostream/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_GTKIOSTREAM bool "gtkiostream" depends on BR2_INSTALL_LIBSTDCPP # eigen depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ALSA_LIB_MIXER if BR2_PACKAGE_ALSA_LIB select BR2_PACKAGE_EIGEN select BR2_PACKAGE_FFTW select BR2_PACKAGE_FFTW_DOUBLE From 910e91f3b0311bc9dc5ef00c43b6e3c930eac300 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 21:55:05 +0200 Subject: [PATCH 10/23] package/zsh: fix build with gcc >= 14 Fix the following build failure with gcc >= 14: termcap.c:45:14: error: conflicting types for 'boolcodes'; have 'char *[]' 45 | static char *boolcodes[] = { | ^~~~~~~~~ In file included from ../../Src/zshterm.h:1, from ../../Src/zsh_system.h:932, from ../../Src/zsh.mdh:17, from termcap.mdh:17, from termcap.c:38: /home/autobuild/autobuild/instance-0/output-1/host/or1k-buildroot-linux-uclibc/sysroot/usr/include/term.h:764:56: note: previous declaration of 'boolcodes' with type 'const char * const[]' 764 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[]; | ^~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/fe2f7170465e96cc1de3dae139a25f615331f4b9 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- ...er-types-in-terminfo-global-variable.patch | 51 +++++++++++++++++++ package/zsh/zsh.mk | 2 + 2 files changed, 53 insertions(+) create mode 100644 package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch diff --git a/package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch b/package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch new file mode 100644 index 000000000000..c67c374918f6 --- /dev/null +++ b/package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch @@ -0,0 +1,51 @@ +From 4c89849c98172c951a9def3690e8647dae76308f Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 8 Dec 2023 21:58:07 +0100 +Subject: [PATCH] 52383: Avoid incompatible pointer types in terminfo global + variable checks + +Upstream: https://sourceforge.net/p/zsh/code/ci/4c89849c98172c951a9def3690e8647dae76308f +Signed-off-by: Fabrice Fontaine +--- + ChangeLog | 3 +++ + configure.ac | 12 ++++++------ + 2 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2a8221e1f..2871dcb7c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1768,27 +1768,27 @@ if test x$zsh_cv_path_term_header != xnone; then + fi + + AC_MSG_CHECKING(if boolcodes is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no]) + AC_MSG_RESULT($boolcodes) + + AC_MSG_CHECKING(if numcodes is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no]) + AC_MSG_RESULT($numcodes) + + AC_MSG_CHECKING(if strcodes is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no]) + AC_MSG_RESULT($strcodes) + + AC_MSG_CHECKING(if boolnames is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no]) + AC_MSG_RESULT($boolnames) + + AC_MSG_CHECKING(if numnames is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no]) + AC_MSG_RESULT($numnames) + + AC_MSG_CHECKING(if strnames is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no]) + AC_MSG_RESULT($strnames) + + dnl There are apparently defective terminal library headers on some diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk index e790bf4c5ea9..7e577fa9e1da 100644 --- a/package/zsh/zsh.mk +++ b/package/zsh/zsh.mk @@ -13,6 +13,8 @@ ZSH_CONF_ENV = zsh_cv_sys_nis=no zsh_cv_sys_nis_plus=no ZSH_LICENSE = MIT-like ZSH_LICENSE_FILES = LICENCE ZSH_CPE_ID_VENDOR = zsh +# 0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch +ZSH_AUTORECONF = YES # zsh uses TRY_RUN to determine these ZSH_CONF_OPTS += \ From 29d29569ebde681d28db9d6bc123d3487e240134 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 21:31:42 +0200 Subject: [PATCH 11/23] package/openswan: select libxcrypt if needed Fix the following build failure raised since bump of glibc to version 2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97: /home/autobuild/autobuild/instance-7/output-1/build/openswan-3.0.0/programs/pluto/xauth.c:36:10: fatal error: crypt.h: No such file or directory 36 | #include | ^~~~~~~~~ Fixes: b5680f53d60acf8ff6010082f873438a39bd5d97 - http://autobuild.buildroot.org/results/df7cce809e3e4aa92e700a3fc5105c6c20f21f6b Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/openswan/Config.in | 1 + package/openswan/openswan.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/package/openswan/Config.in b/package/openswan/Config.in index 724654e984dd..31c4a66b35c1 100644 --- a/package/openswan/Config.in +++ b/package/openswan/Config.in @@ -4,6 +4,7 @@ config BR2_PACKAGE_OPENSWAN depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 # iproute2 select BR2_PACKAGE_GMP select BR2_PACKAGE_IPROUTE2 + select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC help Openswan is an implementation of IPsec for Linux diff --git a/package/openswan/openswan.mk b/package/openswan/openswan.mk index 4c6a779f0da5..64218810f809 100644 --- a/package/openswan/openswan.mk +++ b/package/openswan/openswan.mk @@ -22,6 +22,10 @@ OPENSWAN_DEPENDENCIES += libcurl OPENSWAN_MAKE_OPTS += USE_LIBCURL=true endif +ifeq ($(BR2_PACKAGE_LIBXCRYPT),y) +OPENSWAN_DEPENDENCIES += libxcrypt +endif + ifeq ($(BR2_PACKAGE_OPENSSL),y) OPENSWAN_DEPENDENCIES += openssl OPENSWAN_MAKE_OPTS += HAVE_OPENSSL=true From 33d25f08f97450cea7a415582dc2110b2bc828c2 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 21:01:40 +0200 Subject: [PATCH 12/23] package/libcoap: enable required libopenssl options libcoap unconditionally calls the (deprecated) ENGINE_* logic in libopenssl resulting in a build failure when !BR2_PACKAGE_LIBOPENSSL_ENGINES since commit 623d3bbe43e9193aa8e3395367d01af59071b859 libcoap also unconditionally uses PSK Fixes: 623d3bbe43e9193aa8e3395367d01af59071b859 - http://autobuild.buildroot.org/results/6bd3e1390cbbc59b9b3d030c2a401e45e9d173da - http://autobuild.buildroot.org/results/f243209454feed4f33f759786c2023c576a2cd3d Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/libcoap/Config.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/libcoap/Config.in b/package/libcoap/Config.in index 6e0c1905bcb1..950aee5279b3 100644 --- a/package/libcoap/Config.in +++ b/package/libcoap/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_LIBCOAP bool "libcoap" + select BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK if BR2_PACKAGE_LIBOPENSSL + select BR2_PACKAGE_LIBOPENSSL_ENGINES if BR2_PACKAGE_LIBOPENSSL help libcoap is a C implementation of a lightweight application-protocol for devices that are constrained their From da45ae33040a55d9eaa6a05c75c5e7f24fe73cf4 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Fri, 19 Jul 2024 23:23:54 +0200 Subject: [PATCH 13/23] package/liburing: bump to version 2.6 - Drop patch (already in version) - Update hash of README (typo fixed with https://github.com/axboe/liburing/commit/2c89b57f3d55b2e3098a629e8aabe659fd5ec138) https://github.com/axboe/liburing/blob/liburing-2.6/CHANGELOG Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- ...01-src-arch-aarch64-fix-uclibc-build.patch | 39 ------------------- package/liburing/liburing.hash | 4 +- package/liburing/liburing.mk | 2 +- 3 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 package/liburing/0001-src-arch-aarch64-fix-uclibc-build.patch diff --git a/package/liburing/0001-src-arch-aarch64-fix-uclibc-build.patch b/package/liburing/0001-src-arch-aarch64-fix-uclibc-build.patch deleted file mode 100644 index 4468105e4fa9..000000000000 --- a/package/liburing/0001-src-arch-aarch64-fix-uclibc-build.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f03f8da34fe96ac35a916ca3058b0f41971eae3b Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Fri, 16 Feb 2024 18:59:42 +0100 -Subject: [PATCH] src/arch/aarch64: fix uclibc build - -Fix the following build failure with uclibc-ng raised since version 2.3 -and -https://github.com/axboe/liburing/commit/c6bc86e2125bcd6fa10ff2b128cd86486acadff6: - -In file included from lib.h:12, - from setup.c:4: -arch/aarch64/lib.h:7:10: fatal error: sys/auxv.h: No such file or directory - 7 | #include - | ^~~~~~~~~~~~ - -Fixes: - - http://autobuild.buildroot.org/results/cc44d714c9267dd7a98debeb8c81c4ee1efe4ebb - -Signed-off-by: Fabrice Fontaine -Upstream: https://github.com/axboe/liburing/commit/32f9c27a76c43627f79bb77469d2da8583e4d3df ---- - src/arch/aarch64/lib.h | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/arch/aarch64/lib.h b/src/arch/aarch64/lib.h -index 3b701b1..41bcfc9 100644 ---- a/src/arch/aarch64/lib.h -+++ b/src/arch/aarch64/lib.h -@@ -4,7 +4,6 @@ - #define LIBURING_ARCH_AARCH64_LIB_H - - #include --#include - #include "../../syscall.h" - - static inline long __get_page_size(void) --- -2.43.0 - diff --git a/package/liburing/liburing.hash b/package/liburing/liburing.hash index 30458c6b9f31..f06dd187a795 100644 --- a/package/liburing/liburing.hash +++ b/package/liburing/liburing.hash @@ -1,8 +1,8 @@ # Locally calculated -sha256 319ff9096a5655362a9741c5145b45494db810e38679a1de82e2f440c17181a6 liburing-2.5.tar.bz2 +sha256 78bcc0dc0d004a238d8b5f597adbb4ec74926352a3983b872db7f0efdb72565d liburing-2.6.tar.bz2 # Hash for license files sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c COPYING sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPL sha256 2ec12f7934cdfce25ff72b0557738989d79fc7a496d1cf9b2d3f9464fd61edbe LICENSE -sha256 51e124279343177cb3c214ffddc011f1355b6eba0bbefca4f4c41fbc56574c92 README +sha256 b0731ca09e6f4718d456a989d32b6c61bf27e5d4bab6ca31e409d75c5120d19e README diff --git a/package/liburing/liburing.mk b/package/liburing/liburing.mk index 2c448d6a87a8..fc3993b38cdd 100644 --- a/package/liburing/liburing.mk +++ b/package/liburing/liburing.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBURING_VERSION = 2.5 +LIBURING_VERSION = 2.6 LIBURING_SOURCE = liburing-$(LIBURING_VERSION).tar.bz2 LIBURING_SITE = https://git.kernel.dk/cgit/liburing/snapshot LIBURING_LICENSE = (GPL-2.0 with exceptions and LGPL-2.1+) or MIT From 3a4bd98d11550081db622327fd8cab570c0ad077 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Fri, 19 Jul 2024 23:27:51 +0200 Subject: [PATCH 14/23] package/libupnp: bump to version 1.4.19 https://github.com/pupnp/pupnp/blob/release-1.14.19/ChangeLog Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/libupnp/libupnp.hash | 2 +- package/libupnp/libupnp.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libupnp/libupnp.hash b/package/libupnp/libupnp.hash index 6fd4678c0d78..86437a7339b1 100644 --- a/package/libupnp/libupnp.hash +++ b/package/libupnp/libupnp.hash @@ -1,3 +1,3 @@ # Locally computed: -sha256 16a7cee93ce2868ae63ab1a8164dc7de43577c59983b9f61293a310d6888dceb libupnp-1.14.18.tar.bz2 +sha256 b6423c573b758d09539f5e6c4712c1a9fd35dccf835f81d99473d50a50ad49b0 libupnp-1.14.19.tar.bz2 sha256 c8b99423cad48bb44e2cf52a496361404290865eac259a82da6d1e4331ececb3 COPYING diff --git a/package/libupnp/libupnp.mk b/package/libupnp/libupnp.mk index 61e52c095a43..cd148d14d06a 100644 --- a/package/libupnp/libupnp.mk +++ b/package/libupnp/libupnp.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBUPNP_VERSION = 1.14.18 +LIBUPNP_VERSION = 1.14.19 LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2 LIBUPNP_SITE = \ http://downloads.sourceforge.net/project/pupnp/release-$(LIBUPNP_VERSION) From f3461d083b53ac262dd31e2b93281cecdc8d3147 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Fri, 19 Jul 2024 23:41:18 +0200 Subject: [PATCH 15/23] package/libxslt: bump to version 1.1.42 https://gitlab.gnome.org/GNOME/libxslt/-/blob/v1.1.42/NEWS Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/libxslt/libxslt.hash | 4 ++-- package/libxslt/libxslt.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libxslt/libxslt.hash b/package/libxslt/libxslt.hash index 7597e7954de4..dd67940c8a8e 100644 --- a/package/libxslt/libxslt.hash +++ b/package/libxslt/libxslt.hash @@ -1,5 +1,5 @@ -# From https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.39.sha256sum -sha256 2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0 libxslt-1.1.39.tar.xz +# From https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.42.sha256sum +sha256 85ca62cac0d41fc77d3f6033da9df6fd73d20ea2fc18b0a3609ffb4110e1baeb libxslt-1.1.42.tar.xz # Hash for license file: sha256 7e48e290b6bfccc2ec1b297023a1d77f2fd87417f71fbb9f50aabef40a851819 COPYING diff --git a/package/libxslt/libxslt.mk b/package/libxslt/libxslt.mk index 8098937ef39a..b5bb22f9aedf 100644 --- a/package/libxslt/libxslt.mk +++ b/package/libxslt/libxslt.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBXSLT_VERSION = 1.1.39 +LIBXSLT_VERSION = 1.1.42 LIBXSLT_SOURCE = libxslt-$(LIBXSLT_VERSION).tar.xz LIBXSLT_SITE = https://download.gnome.org/sources/libxslt/1.1 LIBXSLT_INSTALL_STAGING = YES From b409766234a3aabb33918b935b58704822345e9e Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Fri, 19 Jul 2024 23:46:10 +0200 Subject: [PATCH 16/23] package/ksmbd-tools: bump to version 3.5.2 https://github.com/cifsd-team/ksmbd-tools/releases/tag/3.5.2 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/ksmbd-tools/ksmbd-tools.hash | 2 +- package/ksmbd-tools/ksmbd-tools.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/ksmbd-tools/ksmbd-tools.hash b/package/ksmbd-tools/ksmbd-tools.hash index c3e6ebefe5c7..3367886d5539 100644 --- a/package/ksmbd-tools/ksmbd-tools.hash +++ b/package/ksmbd-tools/ksmbd-tools.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 ab377b3044c48382303f3f7ec95f2e1a17592c774d70b2a11f32952099dbb214 ksmbd-tools-3.5.1.tar.gz +sha256 5da7fb4cb4368f9abf56f6f9fbc17b25e387876bed9ff7ee0d6f1140ef07c8d7 ksmbd-tools-3.5.2.tar.gz sha256 576540abf5e95029ad4ad90e32071385a5e95b2c30708c706116f3eb87b9a3de COPYING diff --git a/package/ksmbd-tools/ksmbd-tools.mk b/package/ksmbd-tools/ksmbd-tools.mk index c56c6e10bbc8..261eddad7c59 100644 --- a/package/ksmbd-tools/ksmbd-tools.mk +++ b/package/ksmbd-tools/ksmbd-tools.mk @@ -4,7 +4,7 @@ # ################################################################################ -KSMBD_TOOLS_VERSION = 3.5.1 +KSMBD_TOOLS_VERSION = 3.5.2 KSMBD_TOOLS_SITE = https://github.com/cifsd-team/ksmbd-tools/releases/download/$(KSMBD_TOOLS_VERSION) KSMBD_TOOLS_LICENSE = GPL-2.0+ KSMBD_TOOLS_LICENSE_FILES = COPYING From 124087c51c6bf751b0caa5cd6327f7ce3d89d0e1 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 11:52:13 +0200 Subject: [PATCH 17/23] package/edid-decode: switch to meson-package Switch to meson-package to fix the following build failure raised since bump to 6f117a8 in commit 4f5790116b42768bd1bd982245e00483440a6311 and https://git.linuxtv.org/edid-decode.git/commit/?id=cdf81907def8658a66041a76ef2542e9a888cbed: make[1]: *** No targets specified and no makefile found. Stop. Fixes: 4f5790116b42768bd1bd982245e00483440a6311 - http://autobuild.buildroot.org/results/c569b0484dcd33f6ea88a9b6f11df5b54401db96 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/edid-decode/edid-decode.mk | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/package/edid-decode/edid-decode.mk b/package/edid-decode/edid-decode.mk index be0c4f1a0e51..3e1d861f22be 100644 --- a/package/edid-decode/edid-decode.mk +++ b/package/edid-decode/edid-decode.mk @@ -10,14 +10,4 @@ EDID_DECODE_SITE_METHOD = git EDID_DECODE_LICENSE = MIT EDID_DECODE_LICENSE_FILES = LICENSE -define EDID_DECODE_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ - CFLAGS="$(TARGET_CXXFLAGS) -std=c++11" WARN_FLAGS= -endef - -define EDID_DECODE_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ - DESTDIR="$(TARGET_DIR)" install -endef - -$(eval $(generic-package)) +$(eval $(meson-package)) From f04a95f79f087869a44ea3d63d55ce7b27b8e922 Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Sat, 20 Jul 2024 13:45:57 +0200 Subject: [PATCH 18/23] support/testing: add mawk runtime test Signed-off-by: Julien Olivain Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + support/testing/tests/package/test_mawk.py | 114 +++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 support/testing/tests/package/test_mawk.py diff --git a/DEVELOPERS b/DEVELOPERS index c4f1565edd1f..06eef3740f2a 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1901,6 +1901,7 @@ F: support/testing/tests/package/test_lzip.py F: support/testing/tests/package/test_lsof.py F: support/testing/tests/package/test_lz4.py F: support/testing/tests/package/test_lzop.py +F: support/testing/tests/package/test_mawk.py F: support/testing/tests/package/test_mdadm.py F: support/testing/tests/package/test_mdadm/ F: support/testing/tests/package/test_micropython.py diff --git a/support/testing/tests/package/test_mawk.py b/support/testing/tests/package/test_mawk.py new file mode 100644 index 000000000000..5caf77c1169f --- /dev/null +++ b/support/testing/tests/package/test_mawk.py @@ -0,0 +1,114 @@ +import os + +import infra.basetest + + +class TestMawk(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_MAWK=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def basic_mawk_tests(self): + # Check the program can execute + self.assertRunOk("mawk --version") + + # Check "mawk" can return a specific exit code + code = 123 + cmd = "mawk 'BEGIN { exit(" + str(code) + "); }'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, code) + + # Run a basic print program + test_string = "Hello Buildroot" + cmd = "mawk 'BEGIN {print \"" + test_string + "\"; }'" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertEqual(output[0], test_string) + + def create_test_data(self): + # Create some test data + entries = ["one", "two", "three", "four"] + for entry in entries: + self.assertRunOk(f"echo {entry} >> data1.txt") + + def add_line_numbers(self): + # Add line numbers with mawk + cmd = "mawk '{ print NR \"\\t\" $1; }' data1.txt > data2.txt" + self.assertRunOk(cmd) + + def sum_column(self): + # Check the sum of the first column is 1+2+3+4 == 10 + awk_prg = "BEGIN { SUM = 0; } { SUM = SUM + $1; } END { print SUM; }" + cmd = f"mawk '{awk_prg}' data2.txt" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertEqual(int(output[0]), 10) + + def uppercase_column(self): + # Extract only column 2 and convert it to upper case + cmd = "mawk '{ print toupper($2); }' data2.txt > data3.txt" + self.assertRunOk(cmd) + + # Prepare the same output using "data1.txt" and the "tr" command, + # for verification + cmd = "tr a-z A-Z < data1.txt > data3-tr.txt" + self.assertRunOk(cmd) + + # "mawk" and "tr" output are expected to be the same + self.assertRunOk("cmp data3.txt data3-tr.txt") + + def mawk_head(self): + # Show the first 2 lines of a file + cmd = "mawk 'NR <= 2 { print $0; }' data2.txt > data4.txt" + self.assertRunOk(cmd) + + # Prepare the same output using the "head" command + cmd = "head -2 data2.txt > data4-head.txt" + self.assertRunOk(cmd) + + # "mawk" and "tr" output are expected to be the same + self.assertRunOk("cmp data4.txt data4-head.txt") + + def mawk_specific(self): + # Use the "-W dump" mawk specific option. + # See: https://invisible-island.net/mawk/manpage/mawk.html + # We create an arbitrary awk program with an integer and + # string constant. We then check those constants are in the + # mawk "assembler" output. + awk_int = 12345 + awk_str = "Buildroot" + awk_expr = f"print ($1 + {awk_int}) \"{awk_str}\";" + awk_prg = "BEGIN { " + awk_expr + " }" + cmd = f"mawk -W dump '{awk_prg}'" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + out_str = "\n".join(output) + self.assertIn(str(awk_int), out_str) + self.assertIn(awk_str, out_str) + + def mawk_numeric(self): + value = 1234 + squared_value = value * value + cmd = "mawk 'BEGIN { print sqrt(" + str(squared_value) + "); }'" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertEqual(int(output[0]), value) + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + self.basic_mawk_tests() + self.create_test_data() + self.add_line_numbers() + self.sum_column() + self.uppercase_column() + self.mawk_head() + self.mawk_specific() + self.mawk_numeric() From 58983179e4f8849ca4e9d6bb063c2f5bd232235a Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 16:48:31 +0200 Subject: [PATCH 19/23] package/flashrom: disable -Werror Disable -Werror to avoid the following build failure raised since switch to meson-package in commit 37dded43ae681e8319d7b76f9a612c71991467a9: ../stlinkv3_spi.c: In function 'stlinkv3_spi_init': ../stlinkv3_spi.c:508:12: error: 'stlinkv3_handle' may be used uninitialized [-Werror=maybe-uninitialized] 508 | if (!stlinkv3_handle) { | ^ ../stlinkv3_spi.c:485:31: note: 'stlinkv3_handle' was declared here 485 | libusb_device_handle *stlinkv3_handle; | ^~~~~~~~~~~~~~~ Fixes: 37dded43ae681e8319d7b76f9a612c71991467a9 - http://autobuild.buildroot.org/results/eecabbdd0d21344991379a57e605845e73ef679e Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/flashrom/flashrom.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/flashrom/flashrom.mk b/package/flashrom/flashrom.mk index 60774b962104..0b474caab475 100644 --- a/package/flashrom/flashrom.mk +++ b/package/flashrom/flashrom.mk @@ -15,7 +15,8 @@ FLASHROM_CONF_OPTS = \ -Dclassic_cli_print_wiki=disabled \ -Dich_descriptors_tool=enabled \ -Dtests=disabled \ - -Duse_internal_dmi=true + -Duse_internal_dmi=true \ + -Dwerror=false FLASHROM_PROGRAMMERS = \ buspirate_spi \ From 6084d904de77ddb99daad7fb9d67dad06fd42526 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 16:50:18 +0200 Subject: [PATCH 20/23] package/flashrom: fix satamv handling satamv is only available on x86 resulting in the following build failure since switch to meson-package in commit 37dded43ae681e8319d7b76f9a612c71991467a9: ../output-1/build/flashrom-1.3.0/meson.build:475:6: ERROR: Problem encountered: satamv selected but not supported on this platform Fixes: 37dded43ae681e8319d7b76f9a612c71991467a9 - http://autobuild.buildroot.org/results/c689bf039d7686a9b42c6fcb84f87b555a9bcfb6 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/flashrom/flashrom.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/flashrom/flashrom.mk b/package/flashrom/flashrom.mk index 0b474caab475..478b53e1ac76 100644 --- a/package/flashrom/flashrom.mk +++ b/package/flashrom/flashrom.mk @@ -65,7 +65,6 @@ FLASHROM_PROGRAMMERS += \ nicintel_eeprom \ nicintel_spi \ ogp_spi \ - satamv \ satasii ifeq ($(BR2_i386)$(BR2_x86_64),y) @@ -74,7 +73,8 @@ FLASHROM_PROGRAMMERS += \ atapromise \ nic3com \ nicnatsemi \ - nicrealtek + nicrealtek \ + satamv endif endif From 183f5399cef8b09b675ef7386a0e4984294e5f59 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 20 Jul 2024 17:31:13 +0200 Subject: [PATCH 21/23] package/zabbix: fix patch fuzz Fix patch fuzz to avoid the following build failure raised since commit 8f88a644ed7d6c9ea55fd4fbe9d7f37055920016 which reduced the fuzz factor: Applying 0002-fix-build-with-libressl-3.5.0.patch using patch: patching file include/zbxcomms.h Hunk #1 succeeded at 210 (offset -43 lines). patching file src/libs/zbxcomms/tls.c Hunk #1 FAILED at 30. 1 out of 1 hunk FAILED -- saving rejects to file src/libs/zbxcomms/tls.c.rej While at it, also fix Upstream tags Fixes: 8f88a644ed7d6c9ea55fd4fbe9d7f37055920016 - http://autobuild.buildroot.org/results/75dfe12312b5479669fcdfea623d93880c675e13 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- .checkpackageignore | 2 -- .../0001-m4-netsnmp.m4-fix-shared-netsnmp-build.patch | 2 +- package/zabbix/0002-fix-build-with-libressl-3.5.0.patch | 8 ++++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.checkpackageignore b/.checkpackageignore index 2e6e8a9cac49..975a7f21f4d7 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -1486,8 +1486,6 @@ package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch lib_patch.Ups package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch lib_patch.Upstream package/ympd/0001-only-c-language.patch lib_patch.Upstream package/ympd/0002-added-forward-declarations.patch lib_patch.Upstream -package/zabbix/0001-m4-netsnmp.m4-fix-shared-netsnmp-build.patch lib_patch.Upstream -package/zabbix/0002-fix-build-with-libressl-3.5.0.patch lib_patch.Upstream package/zic/0001-remove-dependency-check-on-version-file.patch lib_patch.Upstream package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch lib_patch.Upstream package/zip/0002-configure-Don-t-use-host-CPP.patch lib_patch.Upstream diff --git a/package/zabbix/0001-m4-netsnmp.m4-fix-shared-netsnmp-build.patch b/package/zabbix/0001-m4-netsnmp.m4-fix-shared-netsnmp-build.patch index ffb1f54ba231..6c742b0d0a20 100644 --- a/package/zabbix/0001-m4-netsnmp.m4-fix-shared-netsnmp-build.patch +++ b/package/zabbix/0001-m4-netsnmp.m4-fix-shared-netsnmp-build.patch @@ -16,7 +16,7 @@ Fixes: - http://autobuild.buildroot.org/results/0f541e45d1fa27b3302968683bf64949131ec1c9 Signed-off-by: Fabrice Fontaine -[Upstream status: https://github.com/zabbix/zabbix/pull/61] +Upstream: https://github.com/zabbix/zabbix/pull/61 --- m4/netsnmp.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package/zabbix/0002-fix-build-with-libressl-3.5.0.patch b/package/zabbix/0002-fix-build-with-libressl-3.5.0.patch index acb5cfc9a676..ad6960f3291f 100644 --- a/package/zabbix/0002-fix-build-with-libressl-3.5.0.patch +++ b/package/zabbix/0002-fix-build-with-libressl-3.5.0.patch @@ -30,7 +30,7 @@ Fixes: - http://autobuild.buildroot.org/results/acdfcb17b39d438ccf5e4621707a10f60577d233 Signed-off-by: Fabrice Fontaine -[Upstream status: not sent (no feedback on first patch)] +Upstream: not sent (no feedback on first patch) --- include/zbxcomms.h | 3 ++- src/libs/zbxcomms/tls.c | 5 +++-- @@ -54,9 +54,9 @@ diff --git a/src/libs/zbxcomms/tls.c b/src/libs/zbxcomms/tls.c index 54ab0a6ef4..bd4075b3e4 100644 --- a/src/libs/zbxcomms/tls.c +++ b/src/libs/zbxcomms/tls.c -@@ -30,8 +30,9 @@ - #include "zbxstr.h" - #include "zbxtime.h" +@@ -28,8 +28,9 @@ + #include "log.h" + #include "zbxcrypto.h" -#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER) -/* for OpenSSL 1.0.1/1.0.2 (before 1.1.0) or LibreSSL */ From 4649372e87bd33f6e159b585796137bbedf4fd3a Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Fri, 19 Jul 2024 23:15:24 +0200 Subject: [PATCH 22/23] package/libmaxminddb: bump to version 1.10.0 https://github.com/maxmind/libmaxminddb/blob/1.10.0/Changes.md Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- package/libmaxminddb/libmaxminddb.hash | 2 +- package/libmaxminddb/libmaxminddb.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libmaxminddb/libmaxminddb.hash b/package/libmaxminddb/libmaxminddb.hash index f5c84fc90535..567a428e421d 100644 --- a/package/libmaxminddb/libmaxminddb.hash +++ b/package/libmaxminddb/libmaxminddb.hash @@ -1,3 +1,3 @@ # Locally computed: -sha256 a80682a89d915fdf60b35d316232fb04ebf36fff27fda9bd39fe8a38d3cd3f12 libmaxminddb-1.9.1.tar.gz +sha256 5e6db72df423ae225bfe8897069f6def40faa8931f456b99d79b8b4d664c6671 libmaxminddb-1.10.0.tar.gz sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/package/libmaxminddb/libmaxminddb.mk b/package/libmaxminddb/libmaxminddb.mk index 1a1a2e302a84..84fc3d11ddab 100644 --- a/package/libmaxminddb/libmaxminddb.mk +++ b/package/libmaxminddb/libmaxminddb.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBMAXMINDDB_VERSION = 1.9.1 +LIBMAXMINDDB_VERSION = 1.10.0 LIBMAXMINDDB_SITE = \ https://github.com/maxmind/libmaxminddb/releases/download/$(LIBMAXMINDDB_VERSION) LIBMAXMINDDB_INSTALL_STAGING = YES From 9c8f6dc5e4d7244b493e290c055202cadc9a12cb Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Sat, 20 Jul 2024 19:38:34 +0200 Subject: [PATCH 23/23] support/testing: add gpsd runtime testing Signed-off-by: Julien Olivain Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 2 + support/testing/tests/package/test_gpsd.py | 56 +++++++++++++++++++ .../rootfs-overlay/root/udp-nmea.log | 6 ++ 3 files changed, 64 insertions(+) create mode 100644 support/testing/tests/package/test_gpsd.py create mode 100644 support/testing/tests/package/test_gpsd/rootfs-overlay/root/udp-nmea.log diff --git a/DEVELOPERS b/DEVELOPERS index 06eef3740f2a..e5fe7b25a5df 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1870,6 +1870,8 @@ F: support/testing/tests/package/test_gnuplot.py F: support/testing/tests/package/test_gnuplot/ F: support/testing/tests/package/test_gnuradio.py F: support/testing/tests/package/test_gnuradio/ +F: support/testing/tests/package/test_gpsd.py +F: support/testing/tests/package/test_gpsd/ F: support/testing/tests/package/test_gzip.py F: support/testing/tests/package/test_highway.py F: support/testing/tests/package/test_hwloc.py diff --git a/support/testing/tests/package/test_gpsd.py b/support/testing/tests/package/test_gpsd.py new file mode 100644 index 000000000000..deed586c17b3 --- /dev/null +++ b/support/testing/tests/package/test_gpsd.py @@ -0,0 +1,56 @@ +import os +import time + +import infra.basetest + + +class TestGpsd(infra.basetest.BRTest): + rootfs_overlay = \ + infra.filepath("tests/package/test_gpsd/rootfs-overlay") + # This test is using the gpsfake Python script. + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + f""" + BR2_PACKAGE_GPSD=y + BR2_PACKAGE_PYTHON3=y + BR2_ROOTFS_OVERLAY="{rootfs_overlay}" + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + # We check the program can execute. + self.assertRunOk("gpsd --version") + + # Since gpsd needs a real GPS device, we stop the service. + self.assertRunOk("/etc/init.d/S50gpsd stop") + + # We start the "gpsfake" GPS emulator instead. + cmd = "gpsfake" + cmd += " --slow --cycle 0.1 --quiet" + cmd += "/root/udp-nmea.log &> /dev/null &" + self.assertRunOk(cmd) + + # Wait a bit, to let the gpsfake and gpsd to settle... + time.sleep(3 * self.timeout_multiplier) + + # List the GPS devices. We should see our local UDP test GPS. + out, ret = self.emulator.run("gpsctl") + self.assertEqual(ret, 0) + self.assertTrue(out[0].startswith("udp://127.0.0.1")) + self.assertIn("NMEA0183", out[0]) + + # Collect some of our fake GPS data, and check we got the + # coordinates from our test data file. + # Our expected coordinates are: + # https://www.openstreetmap.org/#map=19/43.60439/1.44336 + out, ret = self.emulator.run("gpscsv --header 0 --count 3") + self.assertEqual(ret, 0) + _, gps_lat, gps_long, _ = out[0].split(",") + self.assertAlmostEqual(float(gps_lat), 43.60439) + self.assertAlmostEqual(float(gps_long), 1.44336) diff --git a/support/testing/tests/package/test_gpsd/rootfs-overlay/root/udp-nmea.log b/support/testing/tests/package/test_gpsd/rootfs-overlay/root/udp-nmea.log new file mode 100644 index 000000000000..f3730da7c50b --- /dev/null +++ b/support/testing/tests/package/test_gpsd/rootfs-overlay/root/udp-nmea.log @@ -0,0 +1,6 @@ +# Name: NMEA 0183 messages for gpsd Buildroot test +# Transport: UDP +# For packet format, see: +# https://gpsd.gitlab.io/gpsd/NMEA.html +$GPGGA,123456.789,4336.2634,N,0126.6016,E,1,04,1.7,143.5,M,,,,*3A +$GPZDA,123456.789,20,07,2024,2,00*64