mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
media-libs/alsa-lib: backport more fixes to 1.2.15
Closes: https://bugs.gentoo.org/967264 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST alsa-lib-1.2.13.tar.bz2 1116739 BLAKE2B 1723ca5f191525e050f05423fb9ccf4501e4f20490d01b0c068493bbce279d3a067e8d0e5f52f9c76c2eaecb4c2b3fc42690193b88c313461fce2aec390175b3 SHA512 b0c0666e38e881dca985b61386523c045c71072a88be4952c986ffbe2107ec736da528858ebeffdf439de5c290914bf3facc654100a228c6d26fff9429142ef0
|
||||
DIST alsa-lib-1.2.14.tar.bz2 1115517 BLAKE2B 6fee05f859a19b8ef0d9896d37442c55f602e8b4aaa7698f30c01e03a339d7a74b3214493b095a64b59ee581fb7756d903d4965e080db552e062e2001e0662ff SHA512 2716cc3a2299da4a1a170d734af082d78dc452b253179d0f1a9ec190140734aecf002b6924eec4ff2699ce88ce1ae5c56821c267f36384910984db726d1f9626
|
||||
DIST alsa-lib-1.2.15-patches.tar.xz 15840 BLAKE2B 8baf4438f287534eb7a508936609ea1e3eef52c3b1e354c084a53eac1e1f4ba40ea02a132d0b878cbeb902ee006c422c6b7f95e6d6dd692799d9fc1d080548d6 SHA512 4ccd7d4b1390791f956e121e580f18bd0eb2f4507a787457676ca1b66d16d6f4fc67a5fc749fcb20f16fd3ed42e5528322c84d416f2771366eb2a21619358615
|
||||
DIST alsa-lib-1.2.15.tar.bz2 1125974 BLAKE2B ff5af357cd661df25e024150927e2f34a0e0d34cd1fff7b4af95489f3b2da2021db415bad98fbd33bd5ec862aa889a5bfbb05a216694776bf85eb8c95c66c7de SHA512 6cea9059265ef353a07f1b442004506f0f13883692ea35f03090282ca80db88055f470d2dca5bb54394fef0012711f0e9502d2d0f7fb66b27aa334bffb811559
|
||||
|
||||
@@ -18,6 +18,8 @@ else
|
||||
SRC_URI="https://www.alsa-project.org/files/pub/lib/${P}.tar.bz2"
|
||||
fi
|
||||
|
||||
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches.tar.xz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
@@ -35,7 +37,7 @@ BDEPEND="doc? ( >=app-text/doxygen-1.2.6 )"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.1.6-missing_files.patch" # bug #652422
|
||||
# Backports since last tag
|
||||
"${FILESDIR}/${PV}"
|
||||
"${WORKDIR}/${P}-patches"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
@@ -1,51 +0,0 @@
|
||||
From a068cf08ad67447893b707cddfce31c9cafee643 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Mon, 8 Dec 2025 23:46:17 -0500
|
||||
Subject: [PATCH 1/4] ucm: use closefrom instead of close_range
|
||||
|
||||
closefrom is a library function with a fallback mechanism for when the
|
||||
kernel does not support the close_range syscall.
|
||||
|
||||
Also check for the function properly instead of assuming it is available
|
||||
with _GNU_SOURCE defined.
|
||||
|
||||
Closes: https://github.com/alsa-project/alsa-lib/pull/486
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/485
|
||||
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
src/ucm/ucm_exec.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8f4bd0de..f4862f64 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -52,6 +52,7 @@ dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_CHECK_FUNCS([uselocale])
|
||||
AC_CHECK_FUNCS([eaccess])
|
||||
+AC_CHECK_DECLS([closefrom])
|
||||
|
||||
dnl Enable largefile support
|
||||
AC_SYS_LARGEFILE
|
||||
diff --git a/src/ucm/ucm_exec.c b/src/ucm/ucm_exec.c
|
||||
index b5a22023..713039b4 100644
|
||||
--- a/src/ucm/ucm_exec.c
|
||||
+++ b/src/ucm/ucm_exec.c
|
||||
@@ -259,8 +259,8 @@ int uc_mgr_exec(const char *prog)
|
||||
|
||||
close(f);
|
||||
|
||||
-#if defined(_GNU_SOURCE)
|
||||
- close_range(3, maxfd, 0);
|
||||
+#if HAVE_DECL_CLOSEFROM
|
||||
+ closefrom(3);
|
||||
#else
|
||||
for (f = 3; f < maxfd; f++)
|
||||
close(f);
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
From 813ffe34ff6c720dcc56e4549338bf9e9184af1f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <813ffe34ff6c720dcc56e4549338bf9e9184af1f.1765319211.git.sam@gentoo.org>
|
||||
In-Reply-To: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
References: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 9 Dec 2025 17:48:34 +0100
|
||||
Subject: [PATCH 2/4] ucm: exec - fix maxfd used warning
|
||||
|
||||
Fixes: a068cf08 ("ucm: use closefrom instead of close_range")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/ucm/ucm_exec.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/ucm/ucm_exec.c b/src/ucm/ucm_exec.c
|
||||
index 713039b4..c16a4cfd 100644
|
||||
--- a/src/ucm/ucm_exec.c
|
||||
+++ b/src/ucm/ucm_exec.c
|
||||
@@ -183,7 +183,7 @@ static int parse_args(char ***argv, int argc, const char *cmd)
|
||||
*/
|
||||
int uc_mgr_exec(const char *prog)
|
||||
{
|
||||
- pid_t p, f, maxfd;
|
||||
+ pid_t p, f;
|
||||
int err = 0, status;
|
||||
char bin[PATH_MAX];
|
||||
struct sigaction sa;
|
||||
@@ -212,8 +212,6 @@ int uc_mgr_exec(const char *prog)
|
||||
prog = bin;
|
||||
}
|
||||
|
||||
- maxfd = sysconf(_SC_OPEN_MAX);
|
||||
-
|
||||
/*
|
||||
* block SIGCHLD signal
|
||||
* ignore SIGINT and SIGQUIT in parent
|
||||
@@ -262,8 +260,11 @@ int uc_mgr_exec(const char *prog)
|
||||
#if HAVE_DECL_CLOSEFROM
|
||||
closefrom(3);
|
||||
#else
|
||||
- for (f = 3; f < maxfd; f++)
|
||||
- close(f);
|
||||
+ {
|
||||
+ pid_t maxfd = sysconf(_SC_OPEN_MAX);
|
||||
+ for (f = 3; f < maxfd; f++)
|
||||
+ close(f);
|
||||
+ }
|
||||
#endif
|
||||
|
||||
/* install default handlers for the forked process */
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
From a6238053c4fa518b214f99d91a01b96c5ef6e3ca Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <a6238053c4fa518b214f99d91a01b96c5ef6e3ca.1765319211.git.sam@gentoo.org>
|
||||
In-Reply-To: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
References: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 9 Dec 2025 18:04:07 +0100
|
||||
Subject: [PATCH 3/4] conf: merge card specific contents per file (whole) after
|
||||
parsing
|
||||
|
||||
Unfortunately, mentioned fix caused a regression for items stored in one file.
|
||||
Merge the file contents after parsing not inside parsing process.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2420645
|
||||
Fixes: eda76146 ("conf: fix load_for_all_cards() - do not merge the card specific contents")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf.c | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/conf.c b/src/conf.c
|
||||
index 49499ecd..b1ec9b38 100644
|
||||
--- a/src/conf.c
|
||||
+++ b/src/conf.c
|
||||
@@ -4119,14 +4119,21 @@ static int config_filename_filter(const struct dirent64 *dirent)
|
||||
static int config_file_open(snd_config_t *root, const char *filename, int merge)
|
||||
{
|
||||
snd_input_t *in;
|
||||
+ snd_config_t *top;
|
||||
int err;
|
||||
|
||||
err = snd_input_stdio_open(&in, filename, "r");
|
||||
if (err >= 0) {
|
||||
- if (merge)
|
||||
+ if (merge) {
|
||||
err = snd_config_load(root, in);
|
||||
- else
|
||||
- err = snd_config_load_override(root, in);
|
||||
+ } else {
|
||||
+ err = snd_config_top(&top);
|
||||
+ if (err >= 0) {
|
||||
+ err = snd_config_load(top, in);
|
||||
+ if (err >= 0)
|
||||
+ err = snd_config_merge(root, top, 1);
|
||||
+ }
|
||||
+ }
|
||||
snd_input_close(in);
|
||||
if (err < 0)
|
||||
snd_error(CORE, "%s may be old or corrupted: consider to remove or fix it", filename);
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From 2f59398c83b8065fb9ff58939df3a9187746068e Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <2f59398c83b8065fb9ff58939df3a9187746068e.1765319211.git.sam@gentoo.org>
|
||||
In-Reply-To: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
References: <a068cf08ad67447893b707cddfce31c9cafee643.1765319211.git.sam@gentoo.org>
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 9 Dec 2025 18:39:52 +0100
|
||||
Subject: [PATCH 4/4] conf: fix possible memory leak in config_file_open() -
|
||||
error path
|
||||
|
||||
Fixes: a6238053 ("conf: merge card specific contents per file (whole) after parsing")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf.c b/src/conf.c
|
||||
index b1ec9b38..d90f6dc3 100644
|
||||
--- a/src/conf.c
|
||||
+++ b/src/conf.c
|
||||
@@ -4130,8 +4130,11 @@ static int config_file_open(snd_config_t *root, const char *filename, int merge)
|
||||
err = snd_config_top(&top);
|
||||
if (err >= 0) {
|
||||
err = snd_config_load(top, in);
|
||||
- if (err >= 0)
|
||||
+ if (err >= 0) {
|
||||
err = snd_config_merge(root, top, 1);
|
||||
+ if (err < 0)
|
||||
+ snd_config_delete(top);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
snd_input_close(in);
|
||||
--
|
||||
2.52.0
|
||||
|
||||
Reference in New Issue
Block a user