Skip to contentSkip to conversation

libsndfile1: bump to version 1.0.31

PATCH Superseded Alexandru Ardelean 2 participants 3 messages Feb 24, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsndfile1: bump to version 1.0.31

It seems that the homepage has moved (for a while now) from
http://www.mega-nerd.com/libsndfile/
to
https://libsndfile.github.io/libsndfile/

On Github, the development group seems to include Erik de Castro Lopo (the original author of libsndfile1).

All backported CVE patches are in version 1.0.31 (I've checked).

The supported format page [1], mentions that Ogg/Opus is supported since 1.0.29, however that isn't currently added in this patch. And it may require libopus.
And mp3 is supported at around version 1.1.0, but that version is in beta.

This change focuses solely on updating to 1.0.31 and removing all backported patches.

[1] https://libsndfile.github.io/libsndfile/formats.html

---
 ...aw-fix-multiple-buffer-overflows-432.patch | 107 ----------------
 .../libsndfile1/CVE-2017-12562.patch          |  96 ---------------
 .../libsndfile1/CVE-2017-14634.patch          |  42 -------
 .../libsndfile1/CVE-2017-6892.patch           |  34 ------
 .../libsndfile1/CVE-2017-8361-8365.patch      |  73 -----------
 .../libsndfile1/CVE-2017-8362.patch           |  59 ---------
 .../libsndfile1/CVE-2017-8363.patch           |  37 ------
 .../libsndfile1/CVE-2018-13139.patch          |  37 ------
 .../libsndfile1/CVE-2018-19432.patch          | 115 ------------------
 .../libsndfile1/CVE-2018-19758.patch          |  34 ------
 .../libsndfile1/CVE-2019-3832.patch           |  37 ------
 .../libsndfile/libsndfile1_1.0.28.bb          |  46 -------
 .../libsndfile/libsndfile1_1.0.31.bb          |  31 +++++
 13 files changed, 31 insertions(+), 717 deletions(-)
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch
 delete mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
 create mode 100644 meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb
meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch deleted +0 -107
deleted file mode 100644
index a4679cef2a..0000000000
@@ -1,107 +0,0 @@
-This patch fixes #429 (CVE-2018-19661 CVE-2018-19662) and #344 (CVE-2017-17456
-CVE-2017-17457). As per
-https://github.com/erikd/libsndfile/issues/344#issuecomment-448504425 it also
-fixes #317 (CVE-2017-14245 CVE-2017-14246).
-
-CVE: CVE-2017-14245 CVE-2017-14246
-CVE: CVE-2017-17456 CVE-2017-17457
-CVE: CVE-2018-19661 CVE-2018-19662
-
-Upstream-Status: Backport [8ddc442d539ca775d80cdbc7af17a718634a743f]
-Signed-off-by: Ross Burton <[email protected]>
-
-From 39453899fe1bb39b2e041fdf51a85aecd177e9c7 Mon Sep 17 00:00:00 2001
-From: Changqing Li <[email protected]>
-Date: Mon, 7 Jan 2019 15:55:03 +0800
-Subject: [PATCH] a/ulaw: fix multiple buffer overflows (#432)
-
-i2ulaw_array() and i2alaw_array() fail to handle ptr [count] = INT_MIN
-properly, leading to buffer underflow. INT_MIN is a special value
-since - INT_MIN cannot be represented as int.
-
-In this case round - INT_MIN to INT_MAX and proceed as usual.
-
-f2ulaw_array() and f2alaw_array() fail to handle ptr [count] = NaN
-properly, leading to null pointer dereference.
-
-In this case, arbitrarily set the buffer value to 0.
-
-This commit fixes #429 (CVE-2018-19661 and CVE-2018-19662) and
-fixes #344 (CVE-2017-17456 and CVE-2017-17457).
-
----
- src/alaw.c | 9 +++++++--
- src/ulaw.c | 9 +++++++--
- 2 files changed, 14 insertions(+), 4 deletions(-)
-
-diff --git a/src/alaw.c b/src/alaw.c
-index 063fd1a..4220224 100644
---- a/src/alaw.c
-+++ b/src/alaw.c
-@@ -19,6 +19,7 @@
- #include	"sfconfig.h"
- 
- #include	<math.h>
-+#include	<limits.h>
- 
- #include	"sndfile.h"
- #include	"common.h"
-@@ -326,7 +327,9 @@ s2alaw_array (const short *ptr, int count, unsigned char *buffer)
- static inline void
- i2alaw_array (const int *ptr, int count, unsigned char *buffer)
- {	while (--count >= 0)
--	{	if (ptr [count] >= 0)
-+	{	if (ptr [count] == INT_MIN)
-+			buffer [count] = alaw_encode [INT_MAX >> (16 + 4)] ;
-+		else if (ptr [count] >= 0)
- 			buffer [count] = alaw_encode [ptr [count] >> (16 + 4)] ;
- 		else
- 			buffer [count] = 0x7F & alaw_encode [- ptr [count] >> (16 + 4)] ;
-@@ -346,7 +349,9 @@ f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
- static inline void
- d2alaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
- {	while (--count >= 0)
--	{	if (ptr [count] >= 0)
-+	{	if (!isfinite (ptr [count]))
-+			buffer [count] = 0 ;
-+		else if (ptr [count] >= 0)
- 			buffer [count] = alaw_encode [lrint (normfact * ptr [count])] ;
- 		else
- 			buffer [count] = 0x7F & alaw_encode [- lrint (normfact * ptr [count])] ;
-diff --git a/src/ulaw.c b/src/ulaw.c
-index e50b4cb..b6070ad 100644
---- a/src/ulaw.c
-+++ b/src/ulaw.c
-@@ -19,6 +19,7 @@
- #include	"sfconfig.h"
- 
- #include	<math.h>
-+#include	<limits.h>
- 
- #include	"sndfile.h"
- #include	"common.h"
-@@ -827,7 +828,9 @@ s2ulaw_array (const short *ptr, int count, unsigned char *buffer)
- static inline void
- i2ulaw_array (const int *ptr, int count, unsigned char *buffer)
- {	while (--count >= 0)
--	{	if (ptr [count] >= 0)
-+	{	if (ptr [count] == INT_MIN)
-+			buffer [count] = ulaw_encode [INT_MAX >> (16 + 2)] ;
-+		else if (ptr [count] >= 0)
- 			buffer [count] = ulaw_encode [ptr [count] >> (16 + 2)] ;
- 		else
- 			buffer [count] = 0x7F & ulaw_encode [-ptr [count] >> (16 + 2)] ;
-@@ -847,7 +850,9 @@ f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
- static inline void
- d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
- {	while (--count >= 0)
--	{	if (ptr [count] >= 0)
-+	{	if (!isfinite (ptr [count]))
-+			buffer [count] = 0 ;
-+		else if (ptr [count] >= 0)
- 			buffer [count] = ulaw_encode [lrint (normfact * ptr [count])] ;
- 		else
- 			buffer [count] = 0x7F & ulaw_encode [- lrint (normfact * ptr [count])] ;
--- 
-2.7.4
-
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch deleted +0 -96

96 lines not on this page · raw message

meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch deleted +0 -42

42 lines not on this page · raw message

meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch deleted +0 -34
deleted file mode 100644
index 89552ac2d9..0000000000
@@ -1,34 +0,0 @@
-From f833c53cb596e9e1792949f762e0b33661822748 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <[email protected]>
-Date: Tue, 23 May 2017 20:15:24 +1000
-Subject: [PATCH] src/aiff.c: Fix a buffer read overflow
-
-Secunia Advisory SA76717.
-
-Found by: Laurent Delosieres, Secunia Research at Flexera Software
-
-CVE: CVE-2017-6892
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <[email protected]>
-
----
- src/aiff.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/aiff.c b/src/aiff.c
-index 5b5f9f5..45864b7 100644
---- a/src/aiff.c
-+++ b/src/aiff.c
-@@ -1759,7 +1759,7 @@ aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword)
- 		psf_binheader_readf (psf, "j", dword - bytesread) ;
- 
- 	if (map_info->channel_map != NULL)
--	{	size_t chanmap_size = psf->sf.channels * sizeof (psf->channel_map [0]) ;
-+	{	size_t chanmap_size = SF_MIN (psf->sf.channels, layout_tag & 0xffff) * sizeof (psf->channel_map [0]) ;
- 
- 		free (psf->channel_map) ;
- 
--- 
-1.9.1
-
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch deleted +0 -73

73 lines not on this page · raw message

meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch deleted +0 -59

59 lines not on this page · raw message

meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch deleted +0 -37
deleted file mode 100644
index e526e5a346..0000000000
@@ -1,37 +0,0 @@
-From cd7da8dbf6ee4310d21d9e44b385d6797160d9e8 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <[email protected]>
-Date: Wed, 12 Apr 2017 20:19:34 +1000
-Subject: [PATCH] src/flac.c: Fix another memory leak
-
-When the FLAC decoder was passed a malformed file, the associated
-`FLAC__StreamDecoder` object was not getting released.
-
-Closes: https://github.com/erikd/libsndfile/issues/233
-
-CVE: CVE-2017-8363
-
-Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/cd7da8dbf6ee4310d21d9e44b385d6797160d9e8]
-
-Signed-off-by: Jackie Huang <[email protected]>
----
- src/flac.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/flac.c b/src/flac.c
-index 986a7b8..5a4f8c2 100644
---- a/src/flac.c
-+++ b/src/flac.c
-@@ -841,7 +841,9 @@ flac_read_header (SF_PRIVATE *psf)
- 
- 	psf_log_printf (psf, "End\n") ;
- 
--	if (psf->error == 0)
-+	if (psf->error != 0)
-+		FLAC__stream_decoder_delete (pflac->fsd) ;
-+	else
- 	{	FLAC__uint64 position ;
- 
- 		FLAC__stream_decoder_get_decode_position (pflac->fsd, &position) ;
--- 
-2.7.4
-
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch deleted +0 -37
deleted file mode 100644
index 707373d414..0000000000
@@ -1,37 +0,0 @@
-CVE: CVE-2018-13139
-Upstream-Status: Backport [9dc989eb89cd697e19897afa616d6ab0debe4822]
-Signed-off-by: Ross Burton <[email protected]>
-
-From 9dc989eb89cd697e19897afa616d6ab0debe4822 Mon Sep 17 00:00:00 2001
-From: "Brett T. Warden" <[email protected]>
-Date: Tue, 28 Aug 2018 12:01:17 -0700
-Subject: [PATCH] Check MAX_CHANNELS in sndfile-deinterleave
-
-Allocated buffer has space for only 16 channels. Verify that input file
-meets this limit.
-
-Fixes #397
----
- programs/sndfile-deinterleave.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/programs/sndfile-deinterleave.c b/programs/sndfile-deinterleave.c
-index e27593e2..cb497e1f 100644
---- a/programs/sndfile-deinterleave.c
-+++ b/programs/sndfile-deinterleave.c
-@@ -89,6 +89,13 @@ main (int argc, char **argv)
- 		exit (1) ;
- 		} ;
- 
-+	if (sfinfo.channels > MAX_CHANNELS)
-+	{	printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
-+			argv [1], sfinfo.channels, MAX_CHANNELS) ;
-+		exit (1) ;
-+		} ;
-+
-+
- 	state.channels = sfinfo.channels ;
- 	sfinfo.channels = 1 ;
- 
--- 
-2.11.0
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch deleted +0 -115

115 lines not on this page · raw message

meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch deleted +0 -34
deleted file mode 100644
index c3586f9dfc..0000000000
@@ -1,34 +0,0 @@
-There is a heap-based buffer over-read at wav.c in wav_write_header in
-libsndfile 1.0.28 that will cause a denial of service.
-
-CVE: CVE-2018-19758
-Upstream-Status: Backport [42132c543358cee9f7c3e9e9b15bb6c1063a608e]
-Signed-off-by: Ross Burton <[email protected]>
-
-From c12173b0197dd0c5cfa2cd27977e982d2ae59486 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <[email protected]>
-Date: Tue, 1 Jan 2019 20:11:46 +1100
-Subject: [PATCH] src/wav.c: Fix heap read overflow
-
-This is CVE-2018-19758.
-
-Closes: https://github.com/erikd/libsndfile/issues/435
----
- src/wav.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/wav.c b/src/wav.c
-index e8405b55..6fb94ae8 100644
---- a/src/wav.c
-+++ b/src/wav.c
-@@ -1094,6 +1094,8 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
- 		psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
- 		psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
- 
-+		/* Loop count is signed 16 bit number so we limit it range to something sensible. */
-+		psf->instrument->loop_count &= 0x7fff ;
- 		for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
- 		{	int type ;
- 
--- 
-2.11.0
meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch deleted +0 -37
deleted file mode 100644
index ab37211399..0000000000
@@ -1,37 +0,0 @@
-From 43886efc408c21e1e329086ef70c88860310f25b Mon Sep 17 00:00:00 2001
-From: Emilio Pozuelo Monfort <[email protected]>
-Date: Tue, 5 Mar 2019 11:27:17 +0100
-Subject: [PATCH] wav_write_header: don't read past the array end
-
-CVE-2018-19758 wasn't entirely fixed in the fix, so fix it harder.
-
-CVE: CVE-2019-3832
-Upstream-Status: Backport [7408c4c788ce047d4e652b60a04e7796bcd7267e]
-Signed-off-by: Ross Burton <[email protected]>
-
-If loop_count is bigger than the array, truncate it to the array
-length (and not to 32k).
-
-CVE-2019-3832
-
----
- src/wav.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/wav.c b/src/wav.c
-index daae3cc..8851549 100644
---- a/src/wav.c
-+++ b/src/wav.c
-@@ -1094,8 +1094,10 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
- 		psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
- 		psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
- 
--		/* Loop count is signed 16 bit number so we limit it range to something sensible. */
--		psf->instrument->loop_count &= 0x7fff ;
-+		/* Make sure we don't read past the loops array end. */
-+		if (psf->instrument->loop_count > ARRAY_LEN (psf->instrument->loops))
-+			psf->instrument->loop_count = ARRAY_LEN (psf->instrument->loops) ;
-+
- 		for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
- 		{	int type ;
- 
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb deleted +0 -46

46 lines not on this page · raw message

meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb new file +31 -0
new file mode 100644
index 0000000000..c70c2f32a5
@@ -0,0 +1,31 @@
+SUMMARY = "Audio format Conversion library"
+DESCRIPTION = "Library for reading and writing files containing sampled \
+sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
+one standard library interface."
+HOMEPAGE = "https://libsndfile.github.io/libsndfile/"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL-2.1-only"
+
+SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.bz2 \
+          "
+
+SRC_URI[md5sum] = "3f3b2a86a032f064ef922a2c8c191f7b"
+SRC_URI[sha256sum] = "a8cfb1c09ea6e90eff4ca87322d4168cdbe5035cb48717b40bf77e751cc02163"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+CVE_PRODUCT = "libsndfile"
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
+
+inherit autotools lib_package pkgconfig multilib_header
+
+do_install_append() {
+    oe_multilib_header sndfile.h
+}
Signature · 1 line
2.25.1
#1 lore raw
Quoted 79 lines · Alexandru Ardelean
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb deleted +0 -46
deleted file mode 100644
index b8e703d084..0000000000
@@ -1,46 +0,0 @@
-SUMMARY = "Audio format Conversion library"
-DESCRIPTION = "Library for reading and writing files containing sampled \
-sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
-one standard library interface."
-HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
-AUTHOR = "Erik de Castro Lopo"
-DEPENDS = "flac libogg libvorbis"
-SECTION = "libs/multimedia"
-LICENSE = "LGPL-2.1-only"
-
-SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
-           file://CVE-2017-6892.patch \
-           file://CVE-2017-8361-8365.patch \
-           file://CVE-2017-8362.patch \
-           file://CVE-2017-8363.patch \
-           file://CVE-2017-14634.patch \
-           file://CVE-2018-13139.patch \
-           file://0001-a-ulaw-fix-multiple-buffer-overflows-432.patch \
-           file://CVE-2018-19432.patch \
-           file://CVE-2017-12562.patch \
-           file://CVE-2018-19758.patch \
-           file://CVE-2019-3832.patch \
-          "
-
-SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"
-SRC_URI[sha256sum] = "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
-
-CVE_PRODUCT = "libsndfile"
-
-S = "${WORKDIR}/libsndfile-${PV}"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
-
-inherit autotools lib_package pkgconfig multilib_header
-
-do_install:append() {
-    oe_multilib_header sndfile.h
-}
-
-# This can't be replicated and is just a memory leak.
-# https://github.com/erikd/libsndfile/issues/398
-CVE_CHECK_IGNORE += "CVE-2018-13419"
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb new file +21 -0
new file mode 100644
index 0000000000..c70c2f32a5
@@ -0,0 +1,31 @@
+SUMMARY = "Audio format Conversion library"
+DESCRIPTION = "Library for reading and writing files containing sampled \
+sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
+one standard library interface."
+HOMEPAGE = "https://libsndfile.github.io/libsndfile/"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL-2.1-only"
+
+SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.bz2 \
+          "
+
+SRC_URI[md5sum] = "3f3b2a86a032f064ef922a2c8c191f7b"
+SRC_URI[sha256sum] = "a8cfb1c09ea6e90eff4ca87322d4168cdbe5035cb48717b40bf77e751cc02163"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+CVE_PRODUCT = "libsndfile"
+
+S = "${WORKDIR}/libsndfile-${PV}"

meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb line 31

Quoted 10 lines
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb new file +10 -0
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
+
+inherit autotools lib_package pkgconfig multilib_header
+
+do_install_append() {
+    oe_multilib_header sndfile.h
+}

Thanks for this, I was a little surprised the do_install:append became a do_install_append which doesn't work with current bitbake?

Generating the patches with -M should help make these kinds of differences clearer too. It does look like we've missed out on a few versions of this.

Cheers,

Richard

#2 lore raw
Quoted 86 lines · Richard Purdie
Quoted 84 lines · Alexandru Ardelean
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb deleted +0 -46
deleted file mode 100644
index b8e703d084..0000000000
@@ -1,46 +0,0 @@
-SUMMARY = "Audio format Conversion library"
-DESCRIPTION = "Library for reading and writing files containing sampled \
-sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
-one standard library interface."
-HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
-AUTHOR = "Erik de Castro Lopo"
-DEPENDS = "flac libogg libvorbis"
-SECTION = "libs/multimedia"
-LICENSE = "LGPL-2.1-only"
-
-SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
-           file://CVE-2017-6892.patch \
-           file://CVE-2017-8361-8365.patch \
-           file://CVE-2017-8362.patch \
-           file://CVE-2017-8363.patch \
-           file://CVE-2017-14634.patch \
-           file://CVE-2018-13139.patch \
-           file://0001-a-ulaw-fix-multiple-buffer-overflows-432.patch \
-           file://CVE-2018-19432.patch \
-           file://CVE-2017-12562.patch \
-           file://CVE-2018-19758.patch \
-           file://CVE-2019-3832.patch \
-          "
-
-SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"
-SRC_URI[sha256sum] = "1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
-
-CVE_PRODUCT = "libsndfile"
-
-S = "${WORKDIR}/libsndfile-${PV}"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
-
-inherit autotools lib_package pkgconfig multilib_header
-
-do_install:append() {
-    oe_multilib_header sndfile.h
-}
-
-# This can't be replicated and is just a memory leak.
-# https://github.com/erikd/libsndfile/issues/398
-CVE_CHECK_IGNORE += "CVE-2018-13419"
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb new file +26 -0
new file mode 100644
index 0000000000..c70c2f32a5
@@ -0,0 +1,31 @@
+SUMMARY = "Audio format Conversion library"
+DESCRIPTION = "Library for reading and writing files containing sampled \
+sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
+one standard library interface."
+HOMEPAGE = "https://libsndfile.github.io/libsndfile/"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL-2.1-only"
+
+SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.bz2 \
+          "
+
+SRC_URI[md5sum] = "3f3b2a86a032f064ef922a2c8c191f7b"
+SRC_URI[sha256sum] = "a8cfb1c09ea6e90eff4ca87322d4168cdbe5035cb48717b40bf77e751cc02163"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+CVE_PRODUCT = "libsndfile"
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
+
Quoted 8 lines

meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb line 31

Quoted 5 lines
meta/recipes-multimedia/libsndfile/libsndfile1_1.0.31.bb new file +5 -0
+inherit autotools lib_package pkgconfig multilib_header
+
+do_install_append() {
+    oe_multilib_header sndfile.h
+}

Thanks for this, I was a little surprised the do_install:append became a do_install_append which doesn't work with current bitbake?

Oops.
Apologies.
I tested this on a dunfell-23.0.4 and it worked, and I assumed that the colon was one of my not-so-famous vim typos.

That's the current system that I have around to test (also on a board).

Quoted 3 lines

Generating the patches with -M should help make these kinds of differences clearer too. It does look like we've missed out on a few versions of this.

Hmmm, ok.
Will see about the -M when doing a V2.

Thanks
Alex

Quoted 6 lines

Cheers,

Richard