Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (3b2e59f94f085164e976fe9e424d79f653fb4c71)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (3b2e59f94f085164e976fe9e424d79f653fb4c71)
  • Date: Thu, 25 Jan 2024 05:15:41 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

audio-drivers/alsa-lib/HISTORY
| 7

audio-drivers/alsa-lib/patches/0001-control.h-Fix-ump-header-file-detection.patch
| 39

audio-drivers/alsa-lib/patches/0001-global.h-move-__STRING-macro-outside-PIC-ifdef-block.patch
| 48 +
audio-drivers/alsa-lib/patches/0001-pcm-Fix-segfault-with-32bit-libs.patch
| 112 ++
audio-drivers/alsa-utils/HISTORY
| 7
audio-drivers/alsa-utils/PRE_BUILD
| 2

audio-drivers/alsa-utils/patches/0001-aplay-use-stdint.h-types-instead-u_int-u_short-u_char.patch
| 450 ++++++++++
audio-drivers/alsa-utils/patches/0001-nhlt-use-stdint.h-types.patch
| 108 ++

audio-drivers/alsa-utils/patches/0001-topology-add-include-for-ENABLE_NLS-on-musl.patch
| 33
utils/binwalk/DETAILS
| 5
utils/binwalk/HISTORY
| 4
11 files changed, 813 insertions(+), 2 deletions(-)

New commits:
commit 3b2e59f94f085164e976fe9e424d79f653fb4c71
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

binwalk 2.3.4, SECURITY_PATCH++

commit 3cb6c054966ce4d162bf5283259033887ebb6c8c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

alsa-utils: Fix build against musl

commit 5b453194d52001f53ea9d4b69d3a544c3eab8384
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

alsa-lib: Fix build against musl

diff --git a/audio-drivers/alsa-lib/HISTORY b/audio-drivers/alsa-lib/HISTORY
index 8184513..4d5ee3d 100644
--- a/audio-drivers/alsa-lib/HISTORY
+++ b/audio-drivers/alsa-lib/HISTORY
@@ -1,3 +1,10 @@
+2024-01-25 Ismael Luceno <ismael AT iodev.co.uk>
+ * patches/0001-control.h-Fix-ump-header-file-detection.patch,
+
patches/0001-global.h-move-__STRING-macro-outside-PIC-ifdef-block.patch:
+ fixed build against musl
+ * patches/0001-pcm-Fix-segfault-with-32bit-libs.patch:
+ fixed largefile-related segfault on 32-bit systems
+
2023-09-02 Pavel Vinogradov <public AT sorcemage.org>
* DETAILS: version 1.2.10

diff --git
a/audio-drivers/alsa-lib/patches/0001-control.h-Fix-ump-header-file-detection.patch

b/audio-drivers/alsa-lib/patches/0001-control.h-Fix-ump-header-file-detection.patch
new file mode 100644
index 0000000..11fb495
--- /dev/null
+++
b/audio-drivers/alsa-lib/patches/0001-control.h-Fix-ump-header-file-detection.patch
@@ -0,0 +1,39 @@
+From fcce13a6726c52882bd8b7131c61c4eba308792c Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex AT perex.cz>
+Date: Mon, 4 Sep 2023 09:38:26 +0200
+Subject: [PATCH] control.h: Fix ump header file detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Apparently, the control.h is used from apps separately (outside
+asoundlib.h). Avoid errors like:
+
+/usr/include/alsa/control.h:417:47: error: ‘snd_ump_endpoint_info_t’ has not
been declared
+ 417 | int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl,
snd_ump_endpoint_info_t *info);
+ | ^~~~~~~~~~~~~~~~~~~~~~~
+/usr/include/alsa/control.h:418:44: error: ‘snd_ump_block_info_t’ has not
been declared
+ 418 | int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t
*info);
+ | ^~~~~~~~~~~~~~~~~~~~
+
+Fixes: https://github.com/alsa-project/alsa-lib/issues/348
+Signed-off-by: Jaroslav Kysela <perex AT perex.cz>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ include/control.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/control.h b/include/control.h
+index ab482ba4..e7541d56 100644
+--- a/include/control.h
++++ b/include/control.h
+@@ -413,6 +413,8 @@ int snd_ctl_pcm_prefer_subdevice(snd_ctl_t *ctl, int
subdev);
+ int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device);
+ int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info);
+ int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev);
++#endif
++#ifdef __ALSA_UMP_H
+ int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device);
+ int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t
*info);
+ int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);
diff --git
a/audio-drivers/alsa-lib/patches/0001-global.h-move-__STRING-macro-outside-PIC-ifdef-block.patch

b/audio-drivers/alsa-lib/patches/0001-global.h-move-__STRING-macro-outside-PIC-ifdef-block.patch
new file mode 100644
index 0000000..d4d55f4
--- /dev/null
+++
b/audio-drivers/alsa-lib/patches/0001-global.h-move-__STRING-macro-outside-PIC-ifdef-block.patch
@@ -0,0 +1,48 @@
+From 10bd599970acc71c92f85eb08943eb8d3d702a9c Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex AT perex.cz>
+Date: Wed, 6 Sep 2023 15:16:44 +0200
+Subject: [PATCH] global.h: move __STRING() macro outside !PIC ifdef block
+
+It solves the musl libc compilation issue.
+
+control.c: In function 'snd_ctl_open_conf':
+../../include/global.h:98:36: warning: implicit declaration of function
'__STRING' [-Wimplicit-function-declaratio]
+ 98 | #define SND_DLSYM_VERSION(version) __STRING(version)
+ | ^~~~~~~~
+
+Fixes: https://github.com/alsa-project/alsa-lib/issues/350
+Signed-off-by: Jaroslav Kysela <perex AT perex.cz>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ include/global.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/global.h b/include/global.h
+index dfe9bc2b..3ecaeee8 100644
+--- a/include/global.h
++++ b/include/global.h
+@@ -51,6 +51,11 @@ const char *snd_asoundlib_version(void);
+ #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+ #endif
+
++#ifndef __STRING
++/** \brief Return 'x' argument as string */
++#define __STRING(x) #x
++#endif
++
+ #ifdef PIC /* dynamic build */
+
+ /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
+@@ -71,11 +76,6 @@ struct snd_dlsym_link {
+
+ extern struct snd_dlsym_link *snd_dlsym_start;
+
+-#ifndef __STRING
+-/** \brief Return 'x' argument as string */
+-#define __STRING(x) #x
+-#endif
+-
+ /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
+ #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ##
version
+ /**
diff --git
a/audio-drivers/alsa-lib/patches/0001-pcm-Fix-segfault-with-32bit-libs.patch
b/audio-drivers/alsa-lib/patches/0001-pcm-Fix-segfault-with-32bit-libs.patch
new file mode 100644
index 0000000..8ea1a8c
--- /dev/null
+++
b/audio-drivers/alsa-lib/patches/0001-pcm-Fix-segfault-with-32bit-libs.patch
@@ -0,0 +1,112 @@
+From 0e3dfb9f705ca78be34cd70fd59d67c431e29cc7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai AT suse.de>
+Date: Sat, 9 Sep 2023 17:42:03 +0200
+Subject: [PATCH] pcm: Fix segfault with 32bit libs
+
+The recent rearrangement of header inclusion order caused a regression
+showing segfaults on 32bit Arm. The primary reason is the
+inconsistent compile condition depending on the inclusion of config.h;
+while most of other code include pcm_local.h (that implicitly includes
+config.h) at first, pcm_direct.c doesn't do it, hence the access with
+direct plugins crashes.
+
+For fixing it, we need to include config.h at the beginning. But,
+it's better to include pcm_local.h for all relevant code for
+consistency. The patch does it, and also it adds the guard in
+pcm_local.h for double inclusions.
+
+Fixes: ad3a8b8b314e ("reshuffle included files to include config.h as first")
+Link: https://github.com/alsa-project/alsa-lib/issues/352
+Signed-off-by: Takashi Iwai <tiwai AT suse.de>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/pcm/pcm_direct.c | 1 +
+ src/pcm/pcm_dmix.c | 2 +-
+ src/pcm/pcm_dshare.c | 1 +
+ src/pcm/pcm_dsnoop.c | 1 +
+ src/pcm/pcm_local.h | 5 +++++
+ src/pcm/pcm_shm.c | 1 +
+ 6 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
+index 040fc160..e53e5923 100644
+--- a/src/pcm/pcm_direct.c
++++ b/src/pcm/pcm_direct.c
+@@ -19,6 +19,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
+index 7cd3c508..55cae3e7 100644
+--- a/src/pcm/pcm_dmix.c
++++ b/src/pcm/pcm_dmix.c
+@@ -26,7 +26,7 @@
+ *
+ */
+
+-#include "config.h"
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
+index 454b39a9..c0329098 100644
+--- a/src/pcm/pcm_dshare.c
++++ b/src/pcm/pcm_dshare.c
+@@ -26,6 +26,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
+index d3ce300c..bf67c68a 100644
+--- a/src/pcm/pcm_dsnoop.c
++++ b/src/pcm/pcm_dsnoop.c
+@@ -26,6 +26,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
+index 6a0e71e7..152c92c3 100644
+--- a/src/pcm/pcm_local.h
++++ b/src/pcm/pcm_local.h
+@@ -20,6 +20,9 @@
+ *
+ */
+
++#ifndef __PCM_LOCAL_H
++#define __PCM_LOCAL_H
++
+ #include "config.h"
+
+ #include <stdio.h>
+@@ -1223,3 +1226,5 @@ static inline void snd_pcm_unlock(snd_pcm_t *pcm)
+ #define snd_pcm_lock(pcm) do {} while (0)
+ #define snd_pcm_unlock(pcm) do {} while (0)
+ #endif /* THREAD_SAFE_API */
++
++#endif /* __PCM_LOCAL_H */
+diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
+index f0bfd934..d9596547 100644
+--- a/src/pcm/pcm_shm.c
++++ b/src/pcm/pcm_shm.c
+@@ -26,6 +26,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
diff --git a/audio-drivers/alsa-utils/HISTORY
b/audio-drivers/alsa-utils/HISTORY
index 96c2e20..00d257f 100644
--- a/audio-drivers/alsa-utils/HISTORY
+++ b/audio-drivers/alsa-utils/HISTORY
@@ -1,3 +1,10 @@
+2024-01-25 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD,
+
patches/0001-aplay-use-stdint.h-types-instead-u_int-u_short-u_char.patch,
+ patches/0001-nhlt-use-stdint.h-types.patch,
+ patches/0001-topology-add-include-for-ENABLE_NLS-on-musl.patch:
+ fixed build against musl
+
2023-09-02 Pavel Vinogradov <public AT sorcemage.org>
* DETAILS: version 1.2.10
* PRE_BUILD, patches-stable/0001-glibc-2.38.patch: removed the patch,
diff --git a/audio-drivers/alsa-utils/PRE_BUILD
b/audio-drivers/alsa-utils/PRE_BUILD
index 5162c16..253668f 100755
--- a/audio-drivers/alsa-utils/PRE_BUILD
+++ b/audio-drivers/alsa-utils/PRE_BUILD
@@ -19,4 +19,6 @@ if [[ $ALSA_UTILS_BRANCH == scm ]]; then
automake --foreign --copy --add-missing &&
touch depcomp &&
autoconf
+else
+ apply_patch_dir patches
fi
diff --git
a/audio-drivers/alsa-utils/patches/0001-aplay-use-stdint.h-types-instead-u_int-u_short-u_char.patch

b/audio-drivers/alsa-utils/patches/0001-aplay-use-stdint.h-types-instead-u_int-u_short-u_char.patch
new file mode 100644
index 0000000..c4b2797
--- /dev/null
+++
b/audio-drivers/alsa-utils/patches/0001-aplay-use-stdint.h-types-instead-u_int-u_short-u_char.patch
@@ -0,0 +1,450 @@
+From 37447085c6fc975d191ecb508931a67bce79233d Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex AT perex.cz>
+Date: Tue, 17 Oct 2023 13:44:03 +0200
+Subject: [PATCH] aplay: use stdint.h types instead u_int/u_short/u_char
+
+Closes: https://github.com/alsa-project/alsa-utils/pull/234
+Signed-off-by: Jaroslav Kysela <perex AT perex.cz>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ aplay/aplay.c | 92 ++++++++++++++++++++++++-------------------------
+ aplay/formats.h | 70 ++++++++++++++++++-------------------
+ 2 files changed, 81 insertions(+), 81 deletions(-)
+
+diff --git a/aplay/aplay.c b/aplay/aplay.c
+index f180d42b..9cf36dee 100644
+--- a/aplay/aplay.c
++++ b/aplay/aplay.c
+@@ -29,6 +29,7 @@
+ #define _GNU_SOURCE
+ #include "aconfig.h"
+ #include <stdio.h>
++#include <stdint.h>
+ #if HAVE_MALLOC_H
+ #include <malloc.h>
+ #endif
+@@ -50,7 +51,6 @@
+ #include <sys/uio.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
+-#include <sys/types.h>
+ #include <endian.h>
+ #include "gettext.h"
+ #include "formats.h"
+@@ -114,7 +114,7 @@ static int mmap_flag = 0;
+ static int interleaved = 1;
+ static int nonblock = 0;
+ static volatile sig_atomic_t in_aborting = 0;
+-static u_char *audiobuf = NULL;
++static uint8_t *audiobuf = NULL;
+ static snd_pcm_uframes_t chunk_size = 0;
+ static unsigned period_time = 0;
+ static unsigned buffer_time = 0;
+@@ -859,7 +859,7 @@ int main(int argc, char *argv[])
+ chunk_size = 1024;
+ hwparams = rhwparams;
+
+- audiobuf = (u_char *)malloc(1024);
++ audiobuf = (uint8_t *)malloc(1024);
+ if (audiobuf == NULL) {
+ error(_("not enough memory"));
+ return 1;
+@@ -970,7 +970,7 @@ static int test_vocfile(void *buffer)
+ * helper for test_wavefile
+ */
+
+-static size_t test_wavefile_read(int fd, u_char *buffer, size_t *size,
size_t reqsize, int line)
++static size_t test_wavefile_read(int fd, uint8_t *buffer, size_t *size,
size_t reqsize, int line)
+ {
+ if (*size >= reqsize)
+ return *size;
+@@ -995,17 +995,17 @@ static size_t test_wavefile_read(int fd, u_char
*buffer, size_t *size, size_t re
+ * == 0 if not
+ * Value returned is bytes to be discarded.
+ */
+-static ssize_t test_wavefile(int fd, u_char *_buffer, size_t size)
++static ssize_t test_wavefile(int fd, uint8_t *_buffer, size_t size)
+ {
+ WaveHeader *h = (WaveHeader *)_buffer;
+- u_char *buffer = NULL;
++ uint8_t *buffer = NULL;
+ size_t blimit = 0;
+ WaveFmtBody *f;
+ WaveChunkHeader *c;
+- u_int type, len;
++ uint32_t type, len;
+ unsigned short format, channels;
+ int big_endian, native_format;
+- u_char vbps = 0;
++ uint8_t vbps = 0;
+
+ if (size < sizeof(WaveHeader))
+ return -1;
+@@ -1044,7 +1044,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer,
size_t size)
+
+ if (len < sizeof(WaveFmtBody)) {
+ error(_("unknown length of 'fmt ' chunk (read %u, should be
%u at least)"),
+- len, (u_int)sizeof(WaveFmtBody));
++ len, (uint32_t)sizeof(WaveFmtBody));
+ prg_exit(EXIT_FAILURE);
+ }
+ check_wavefile_space(buffer, len, blimit);
+@@ -1055,7 +1055,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer,
size_t size)
+ WaveFmtExtensibleBody *fe = (WaveFmtExtensibleBody*)buffer;
+ if (len < sizeof(WaveFmtExtensibleBody)) {
+ error(_("unknown length of extensible 'fmt ' chunk
(read %u, should be %u at least)"),
+- len,
(u_int)sizeof(WaveFmtExtensibleBody));
++ len, (unsigned
int)sizeof(WaveFmtExtensibleBody));
+ prg_exit(EXIT_FAILURE);
+ }
+ if (memcmp(fe->guid_tag, WAV_GUID_TAG, 14) != 0) {
+@@ -1167,7 +1167,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer,
size_t size)
+ size -= len;
+
+ while (1) {
+- u_int type, len;
++ uint32_t type, len;
+
+ check_wavefile_space(buffer, sizeof(WaveChunkHeader), blimit);
+ test_wavefile_read(fd, buffer, &size,
sizeof(WaveChunkHeader), __LINE__);
+@@ -1809,7 +1809,7 @@ static void print_vu_meter(signed int *perc, signed
int *maxperc)
+ }
+
+ /* peak handler */
+-static void compute_max_peak(u_char *data, size_t samples)
++static void compute_max_peak(uint8_t *data, size_t samples)
+ {
+ signed int val, max, perc[2], max_peak[2];
+ static int run = 0;
+@@ -2054,9 +2054,9 @@ static void do_test_position(void)
+ /*
+ */
+ #ifdef CONFIG_SUPPORT_CHMAP
+-static u_char *remap_data(u_char *data, size_t count)
++static uint8_t *remap_data(uint8_t *data, size_t count)
+ {
+- static u_char *tmp, *src, *dst;
++ static uint8_t *tmp, *src, *dst;
+ static size_t tmp_size;
+ size_t sample_bytes = bits_per_sample / 8;
+ size_t step = bits_per_frame / 8;
+@@ -2090,9 +2090,9 @@ static u_char *remap_data(u_char *data, size_t count)
+ return tmp;
+ }
+
+-static u_char **remap_datav(u_char **data, size_t count ATTRIBUTE_UNUSED)
++static uint8_t **remap_datav(uint8_t **data, size_t count ATTRIBUTE_UNUSED)
+ {
+- static u_char **tmp;
++ static uint8_t **tmp;
+ unsigned int ch;
+
+ if (!hw_map)
+@@ -2118,7 +2118,7 @@ static u_char **remap_datav(u_char **data, size_t
count ATTRIBUTE_UNUSED)
+ * write function
+ */
+
+-static ssize_t pcm_write(u_char *data, size_t count)
++static ssize_t pcm_write(uint8_t *data, size_t count)
+ {
+ ssize_t r;
+ ssize_t result = 0;
+@@ -2157,7 +2157,7 @@ static ssize_t pcm_write(u_char *data, size_t count)
+ return result;
+ }
+
+-static ssize_t pcm_writev(u_char **data, unsigned int channels, size_t
count)
++static ssize_t pcm_writev(uint8_t **data, unsigned int channels, size_t
count)
+ {
+ ssize_t r;
+ size_t result = 0;
+@@ -2210,7 +2210,7 @@ static ssize_t pcm_writev(u_char **data, unsigned int
channels, size_t count)
+ * read function
+ */
+
+-static ssize_t pcm_read(u_char *data, size_t rcount)
++static ssize_t pcm_read(uint8_t *data, size_t rcount)
+ {
+ ssize_t r;
+ size_t result = 0;
+@@ -2252,7 +2252,7 @@ static ssize_t pcm_read(u_char *data, size_t rcount)
+ return result > rcount ? rcount : result;
+ }
+
+-static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t
rcount)
++static ssize_t pcm_readv(uint8_t **data, unsigned int channels, size_t
rcount)
+ {
+ ssize_t r;
+ size_t result = 0;
+@@ -2304,7 +2304,7 @@ static ssize_t pcm_readv(u_char **data, unsigned int
channels, size_t rcount)
+ * ok, let's play a .voc file
+ */
+
+-static ssize_t voc_pcm_write(u_char *data, size_t count)
++static ssize_t voc_pcm_write(uint8_t *data, size_t count)
+ {
+ ssize_t result = count, r;
+ size_t size;
+@@ -2329,9 +2329,9 @@ static ssize_t voc_pcm_write(u_char *data, size_t
count)
+ static void voc_write_silence(unsigned x)
+ {
+ unsigned l;
+- u_char *buf;
++ uint8_t *buf;
+
+- buf = (u_char *) malloc(chunk_bytes);
++ buf = (uint8_t *) malloc(chunk_bytes);
+ if (buf == NULL) {
+ error(_("can't allocate buffer for silence"));
+ return; /* not fatal error */
+@@ -2372,15 +2372,15 @@ static void voc_play(int fd, int ofs, char *name)
+ VocVoiceData *vd;
+ VocExtBlock *eb;
+ size_t nextblock, in_buffer;
+- u_char *data, *buf;
++ uint8_t *data, *buf;
+ char was_extended = 0, output = 0;
+- u_short *sp, repeat = 0;
++ uint16_t *sp, repeat = 0;
+ off_t filepos = 0;
+
+ #define COUNT(x) nextblock -= x; in_buffer -= x; data += x
+ #define COUNT1(x) in_buffer -= x; data += x
+
+- data = buf = (u_char *)malloc(64 * 1024);
++ data = buf = (uint8_t *)malloc(64 * 1024);
+ buffer_pos = 0;
+ if (data == NULL) {
+ error(_("malloc error"));
+@@ -2472,8 +2472,8 @@ static void voc_play(int fd, int ofs, char *name)
+ #endif
+ break;
+ case 3: /* a silence block, no data, only a count */
+- sp = (u_short *) data;
+- COUNT1(sizeof(u_short));
++ sp = (uint16_t *) data;
++ COUNT1(sizeof(uint16_t));
+ hwparams.rate = (int) (*data);
+ COUNT1(1);
+ hwparams.rate = 1000000 / (256 -
hwparams.rate);
+@@ -2488,8 +2488,8 @@ static void voc_play(int fd, int ofs, char *name)
+ voc_write_silence(*sp);
+ break;
+ case 4: /* a marker for syncronisation, no effect */
+- sp = (u_short *) data;
+- COUNT1(sizeof(u_short));
++ sp = (uint16_t *) data;
++ COUNT1(sizeof(uint16_t));
+ #if 0
+ d_printf("Marker %d\n", *sp);
+ #endif
+@@ -2503,8 +2503,8 @@ static void voc_play(int fd, int ofs, char *name)
+ case 6: /* repeat marker, says repeatcount */
+ /* my specs don't say it: maybe this can be
recursive, but
+ I don't think somebody use it */
+- repeat = *(u_short *) data;
+- COUNT1(sizeof(u_short));
++ repeat = *(uint16_t *) data;
++ COUNT1(sizeof(uint16_t));
+ #if 0
+ d_printf("Repeat loop %d times\n", repeat);
+ #endif
+@@ -2649,14 +2649,14 @@ static void begin_voc(int fd, size_t cnt)
+ }
+ bt.type = 1;
+ cnt += sizeof(VocVoiceData); /* Channel_data block follows */
+- bt.datalen = (u_char) (cnt & 0xFF);
+- bt.datalen_m = (u_char) ((cnt & 0xFF00) >> 8);
+- bt.datalen_h = (u_char) ((cnt & 0xFF0000) >> 16);
++ bt.datalen = (uint8_t) (cnt & 0xFF);
++ bt.datalen_m = (uint8_t) ((cnt & 0xFF00) >> 8);
++ bt.datalen_h = (uint8_t) ((cnt & 0xFF0000) >> 16);
+ if (xwrite(fd, &bt, sizeof(VocBlockType)) != sizeof(VocBlockType)) {
+ error(_("write error"));
+ prg_exit(EXIT_FAILURE);
+ }
+- vd.tc = (u_char) (256 - (1000000 / hwparams.rate));
++ vd.tc = (uint8_t) (256 - (1000000 / hwparams.rate));
+ vd.pack = 0;
+ if (xwrite(fd, &vd, sizeof(VocVoiceData)) != sizeof(VocVoiceData)) {
+ error(_("write error"));
+@@ -2671,8 +2671,8 @@ static void begin_wave(int fd, size_t cnt)
+ WaveFmtBody f;
+ WaveChunkHeader cf, cd;
+ int bits;
+- u_int tmp;
+- u_short tmp2;
++ uint32_t tmp;
++ uint16_t tmp2;
+
+ /* WAVE cannot handle greater than 32bit (signed?) int */
+ if (cnt == (size_t)-2)
+@@ -2715,11 +2715,11 @@ static void begin_wave(int fd, size_t cnt)
+ #if 0
+ tmp2 = (samplesize == 8) ? 1 : 2;
+ f.byte_p_spl = LE_SHORT(tmp2);
+- tmp = dsp_speed * hwparams.channels * (u_int) tmp2;
++ tmp = dsp_speed * hwparams.channels * (uint32_t) tmp2;
+ #else
+ tmp2 = hwparams.channels *
snd_pcm_format_physical_width(hwparams.format) / 8;
+ f.byte_p_spl = LE_SHORT(tmp2);
+- tmp = (u_int) tmp2 * hwparams.rate;
++ tmp = (uint32_t) tmp2 * hwparams.rate;
+ #endif
+ f.byte_p_sec = LE_INT(tmp);
+ f.bit_p_spl = LE_SHORT(bits);
+@@ -2786,9 +2786,9 @@ static void end_voc(int fd)
+ cnt += sizeof(VocVoiceData); /* Channel_data block follows */
+ if (cnt > 0x00ffffff)
+ cnt = 0x00ffffff;
+- bt.datalen = (u_char) (cnt & 0xFF);
+- bt.datalen_m = (u_char) ((cnt & 0xFF00) >> 8);
+- bt.datalen_h = (u_char) ((cnt & 0xFF0000) >> 16);
++ bt.datalen = (uint8_t) (cnt & 0xFF);
++ bt.datalen_m = (uint8_t) ((cnt & 0xFF00) >> 8);
++ bt.datalen_h = (uint8_t) ((cnt & 0xFF0000) >> 16);
+ if (lseek(fd, length_seek, SEEK_SET) == length_seek)
+ xwrite(fd, &bt, sizeof(VocBlockType));
+ }
+@@ -2798,7 +2798,7 @@ static void end_wave(int fd)
+ WaveChunkHeader cd;
+ off_t length_seek;
+ off_t filelen;
+- u_int rifflen;
++ uint32_t rifflen;
+
+ length_seek = sizeof(WaveHeader) +
+ sizeof(WaveChunkHeader) +
+@@ -3339,7 +3339,7 @@ static void playbackv_go(int* fds, unsigned int
channels, size_t loaded, off_t c
+ size_t vsize;
+
+ unsigned int channel;
+- u_char *bufs[channels];
++ uint8_t *bufs[channels];
+
+ header(rtype, names[0]);
+ set_params();
+@@ -3393,7 +3393,7 @@ static void capturev_go(int* fds, unsigned int
channels, off_t count, int rtype,
+ ssize_t r;
+ unsigned int channel;
+ size_t vsize;
+- u_char *bufs[channels];
++ uint8_t *bufs[channels];
+
+ header(rtype, names[0]);
+ set_params();
+diff --git a/aplay/formats.h b/aplay/formats.h
+index 093ab809..d82505e4 100644
+--- a/aplay/formats.h
++++ b/aplay/formats.h
+@@ -17,28 +17,28 @@
+ ((u_long)(bp->datalen_h) << 16) )
+
+ typedef struct voc_header {
+- u_char magic[20]; /* must be MAGIC_STRING */
+- u_short headerlen; /* Headerlength, should be 0x1A */
+- u_short version; /* VOC-file version */
+- u_short coded_ver; /* 0x1233-version */
++ uint8_t magic[20]; /* must be MAGIC_STRING */
++ uint16_t headerlen; /* Headerlength, should be 0x1A */
++ uint16_t version; /* VOC-file version */
++ uint16_t coded_ver; /* 0x1233-version */
+ } VocHeader;
+
+ typedef struct voc_blocktype {
+- u_char type;
+- u_char datalen; /* low-byte */
+- u_char datalen_m; /* medium-byte */
+- u_char datalen_h; /* high-byte */
++ uint8_t type;
++ uint8_t datalen; /* low-byte */
++ uint8_t datalen_m; /* medium-byte */
++ uint8_t datalen_h; /* high-byte */
+ } VocBlockType;
+
+ typedef struct voc_voice_data {
+- u_char tc;
+- u_char pack;
++ uint8_t tc;
++ uint8_t pack;
+ } VocVoiceData;
+
+ typedef struct voc_ext_block {
+- u_short tc;
+- u_char pack;
+- u_char mode;
++ uint16_t tc;
++ uint8_t pack;
++ uint8_t mode;
+ } VocExtBlock;
+
+ /* Definitions for Microsoft WAVE format */
+@@ -85,32 +85,32 @@ typedef struct voc_ext_block {
+ it works on all WAVE-file I have
+ */
+ typedef struct {
+- u_int magic; /* 'RIFF' */
+- u_int length; /* filelen */
+- u_int type; /* 'WAVE' */
++ uint32_t magic; /* 'RIFF' */
++ uint32_t length; /* filelen */
++ uint32_t type; /* 'WAVE' */
+ } WaveHeader;
+
+ typedef struct {
+- u_short format; /* see WAV_FMT_* */
+- u_short channels;
+- u_int sample_fq; /* frequence of sample */
+- u_int byte_p_sec;
+- u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
+- u_short bit_p_spl; /* 8, 12 or 16 bit */
++ uint16_t format; /* see WAV_FMT_* */
++ uint16_t channels;
++ uint32_t sample_fq; /* frequence of sample */
++ uint32_t byte_p_sec;
++ uint16_t byte_p_spl; /* samplesize; 1 or 2 bytes */
++ uint16_t bit_p_spl; /* 8, 12 or 16 bit */
+ } WaveFmtBody;
+
+ typedef struct {
+ WaveFmtBody format;
+- u_short ext_size;
+- u_short bit_p_spl;
+- u_int channel_mask;
+- u_short guid_format; /* WAV_FMT_* */
+- u_char guid_tag[14]; /* WAV_GUID_TAG */
++ uint16_t ext_size;
++ uint16_t bit_p_spl;
++ uint32_t channel_mask;
++ uint16_t guid_format; /* WAV_FMT_* */
++ uint8_t guid_tag[14]; /* WAV_GUID_TAG */
+ } WaveFmtExtensibleBody;
+
+ typedef struct {
+- u_int type; /* 'data' */
+- u_int length; /* samplecount */
++ uint32_t type; /* 'data' */
++ uint32_t length; /* samplecount */
+ } WaveChunkHeader;
+
+ /* Definitions for Sparc .au header */
+@@ -122,12 +122,12 @@ typedef struct {
+ #define AU_FMT_LIN16 3
+
+ typedef struct au_header {
+- u_int magic; /* '.snd' */
+- u_int hdr_size; /* size of header (min 24) */
+- u_int data_size; /* size of data */
+- u_int encoding; /* see to AU_FMT_XXXX */
+- u_int sample_rate; /* sample rate */
+- u_int channels; /* number of channels (voices) */
++ uint32_t magic; /* '.snd' */
++ uint32_t hdr_size; /* size of header (min 24) */
++ uint32_t data_size; /* size of data */
++ uint32_t encoding; /* see to AU_FMT_XXXX */
++ uint32_t sample_rate; /* sample rate */
++ uint32_t channels; /* number of channels (voices) */
+ } AuHeader;
+
+ #endif /* FORMATS */
diff --git
a/audio-drivers/alsa-utils/patches/0001-nhlt-use-stdint.h-types.patch
b/audio-drivers/alsa-utils/patches/0001-nhlt-use-stdint.h-types.patch
new file mode 100644
index 0000000..f037cd2
--- /dev/null
+++ b/audio-drivers/alsa-utils/patches/0001-nhlt-use-stdint.h-types.patch
@@ -0,0 +1,108 @@
+From c08d580b281bd5965585bf09b45ba3a582202931 Mon Sep 17 00:00:00 2001
+From: Sam James <sam AT gentoo.org>
+Date: Thu, 7 Sep 2023 21:24:16 +0100
+Subject: [PATCH] nhlt: use stdint.h types
+
+u_int_* aren't standard, but uint* are. Use those instead for musl compat.
+
+Closes: https://github.com/alsa-project/alsa-utils/pull/234
+Bug: https://bugs.gentoo.org/913758
+Signed-off-by: Sam James <sam AT gentoo.org>
+Signed-off-by: Jaroslav Kysela <perex AT perex.cz>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ nhlt/nhlt-dmic-info.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/nhlt/nhlt-dmic-info.c b/nhlt/nhlt-dmic-info.c
+index 331555a8..eadf21a1 100644
+--- a/nhlt/nhlt-dmic-info.c
++++ b/nhlt/nhlt-dmic-info.c
+@@ -46,7 +46,7 @@ int debug = 0;
+ #define NHLT_EP_HDR_SIZE (4 + 1 + 1 + 2 + 2 + 2 + 4 + 1 + 1 + 1)
+ #define VENDOR_MIC_CFG_SIZE (1 + 1 + 2 + 2 + 2 + 1 + 1 + 2 + 2 + 2 + 2 + 2
+ 2)
+
+-static const char *microphone_type(u_int8_t type)
++static const char *microphone_type(uint8_t type)
+ {
+ switch (type) {
+ case 0: return "omnidirectional";
+@@ -60,7 +60,7 @@ static const char *microphone_type(u_int8_t type)
+ return "unknown";
+ }
+
+-static const char *microphone_location(u_int8_t location)
++static const char *microphone_location(uint8_t location)
+ {
+ switch (location) {
+ case 0: return "laptop-top-panel";
+@@ -74,21 +74,21 @@ static const char *microphone_location(u_int8_t location)
+ }
+
+
+-static inline u_int8_t get_u8(u_int8_t *base, u_int32_t off)
++static inline uint8_t get_u8(uint8_t *base, uint32_t off)
+ {
+ return *(base + off);
+ }
+
+-static inline int32_t get_s16le(u_int8_t *base, u_int32_t off)
++static inline int32_t get_s16le(uint8_t *base, uint32_t off)
+ {
+- u_int32_t v = *(base + off + 0) |
++ uint32_t v = *(base + off + 0) |
+ (*(base + off + 1) << 8);
+ if (v & 0x8000)
+ return -((int32_t)0x10000 - (int32_t)v);
+ return v;
+ }
+
+-static inline u_int32_t get_u32le(u_int8_t *base, u_int32_t off)
++static inline uint32_t get_u32le(uint8_t *base, uint32_t off)
+ {
+ return *(base + off + 0) |
+ (*(base + off + 1) << 8) |
+@@ -138,10 +138,10 @@ static int nhlt_dmic_config(FILE *out, uint8_t *dmic,
uint8_t mic)
+ return 0;
+ }
+
+-static int nhlt_dmic_ep_to_json(FILE *out, uint8_t *ep, u_int32_t ep_size)
++static int nhlt_dmic_ep_to_json(FILE *out, uint8_t *ep, uint32_t ep_size)
+ {
+- u_int32_t off, specific_cfg_size;
+- u_int8_t config_type, array_type, mic, num_mics;
++ uint32_t off, specific_cfg_size;
++ uint8_t config_type, array_type, mic, num_mics;
+ int res;
+
+ off = NHLT_EP_HDR_SIZE;
+@@ -182,15 +182,15 @@ static int nhlt_dmic_ep_to_json(FILE *out, uint8_t
*ep, u_int32_t ep_size)
+ return -EINVAL;
+ }
+
+-static int nhlt_table_to_json(FILE *out, u_int8_t *nhlt, u_int32_t size)
++static int nhlt_table_to_json(FILE *out, uint8_t *nhlt, uint32_t size)
+ {
+- u_int32_t _size, off, ep_size;
+- u_int8_t sum = 0, ep, ep_count, link_type, dmics = 0;
++ uint32_t _size, off, ep_size;
++ uint8_t sum = 0, ep, ep_count, link_type, dmics = 0;
+ int res;
+
+ _size = get_u32le(nhlt, 4);
+ if (_size != size) {
+- fprintf(stderr, "Table size mismatch (%08x != %08x)\n",
_size, (u_int32_t)size);
++ fprintf(stderr, "Table size mismatch (%08x != %08x)\n",
_size, (uint32_t)size);
+ return -EINVAL;
+ }
+ for (off = 0; off < size; off++)
+@@ -232,7 +232,7 @@ static int nhlt_table_to_json(FILE *out, u_int8_t *nhlt,
u_int32_t size)
+ static int nhlt_to_json(FILE *out, const char *nhlt_file)
+ {
+ struct stat st;
+- u_int8_t *buf;
++ uint8_t *buf;
+ int _errno, fd, res;
+ size_t pos, size;
+ ssize_t ret;
diff --git
a/audio-drivers/alsa-utils/patches/0001-topology-add-include-for-ENABLE_NLS-on-musl.patch

b/audio-drivers/alsa-utils/patches/0001-topology-add-include-for-ENABLE_NLS-on-musl.patch
new file mode 100644
index 0000000..58bd77b
--- /dev/null
+++
b/audio-drivers/alsa-utils/patches/0001-topology-add-include-for-ENABLE_NLS-on-musl.patch
@@ -0,0 +1,33 @@
+From d272c5d935b2ff8acc00f16317f1f960b02ed3a1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam AT gentoo.org>
+Date: Thu, 7 Sep 2023 21:23:51 +0100
+Subject: [PATCH] topology: add include for ENABLE_NLS on musl
+
+Needed for setlocale().
+
+(After rebasing to pick up 8c229270f6bae83b705a03714c46067a7aa57b02, just
+move it to be guarded as the include now exists.)
+
+Closes: https://github.com/alsa-project/alsa-utils/pull/234
+Signed-off-by: Sam James <sam AT gentoo.org>
+Signed-off-by: Jaroslav Kysela <perex AT perex.cz>
+Upstream-Status: Backport
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ topology/topology.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/topology/topology.c b/topology/topology.c
+index 5d03a8b1..98b000aa 100644
+--- a/topology/topology.c
++++ b/topology/topology.c
+@@ -36,6 +36,9 @@
+ #include <alsa/asoundlib.h>
+ #include <alsa/topology.h>
+ #include "gettext.h"
++#ifdef ENABLE_NLS
++#include <locale.h>
++#endif
+ #include "version.h"
+ #include "topology.h"
+
diff --git a/utils/binwalk/DETAILS b/utils/binwalk/DETAILS
index 191373d..25eff94 100755
--- a/utils/binwalk/DETAILS
+++ b/utils/binwalk/DETAILS
@@ -1,8 +1,9 @@
SPELL=binwalk
- VERSION=2.3.3
+ VERSION=2.3.4
+ SECURITY_PATCH=1
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_URL[0]=https://github.com/devttys0/$SPELL/archive/v$VERSION.tar.gz
-
SOURCE_HASH=sha512:d7e8d576cfc92b1488ceda7d4577aeaaefb2a251a5aca0b4a497da0dff7c6e6e862e0a77346593c77fb4e54b7de3d3a0c1c8c9421ecec8f06aabbc4b336920c5
+
SOURCE_HASH=sha512:5a5e16035dfc05b94ae4ee3969a337336c550606b71e20fcb1f150c4b38ef2084b6a823ce2a8050f4b41616b7d7c31cfb04bf43e7f2c977ab1a634aba9d67fec
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE=http://code.google.com/p/binwalk/
LICENSE[0]=MIT
diff --git a/utils/binwalk/HISTORY b/utils/binwalk/HISTORY
index 9eaab72..b4f1ca4 100644
--- a/utils/binwalk/HISTORY
+++ b/utils/binwalk/HISTORY
@@ -1,3 +1,7 @@
+2024-01-25 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 2.3.4
+ SECURITY_PATCH++
+
2022-05-21 Ismael Luceno <ismael AT sourcemage.org>
* DEPENDS: added missing dependency on python3
* BUILD, DETAILS, INSTALL: updated spell to 2.3.3



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (3b2e59f94f085164e976fe9e424d79f653fb4c71), Ismael Luceno, 01/25/2024

Archive powered by MHonArc 2.6.24.

Top of Page