diff options
Diffstat (limited to 'meta/recipes-multimedia')
112 files changed, 2010 insertions, 3005 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch new file mode 100644 index 0000000000..30aeef5817 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-correct-version-script-path.patch @@ -0,0 +1,38 @@ +From 2a736a0d2543f206fd2653aaae8a08a4c42eb917 Mon Sep 17 00:00:00 2001 +From: Michael Opdenacker <michael.opdenacker@bootlin.com> +Date: Tue, 30 Jan 2024 14:24:25 +0100 +Subject: [PATCH] topology: correct version script path + +From: Jan Palus <jpalus@fastmail.com> + +contrary to libasound, version script for libatopology is a regular +source file. while it's often the case that $(builddir) and $(srcdir) +point to the same directory, they don't always have to. therefore path +needs to point explicitly to $(srcdir) for Versions script in topology + +Closes: https://github.com/alsa-project/alsa-lib/pull/383 +Fixes: GH-382 +Fixes: dc7da761f3a2 ("topology: separate Versions linker script") +Signed-off-by: Jan Palus <jpalus@fastmail.com> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +Upstream-Status: Backport [https://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=2a736a0d2543f206fd2653aaae8a08a4c42eb917] +--- + src/topology/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/topology/Makefile.am b/src/topology/Makefile.am +index 04299588..e0b78373 100644 +--- a/src/topology/Makefile.am ++++ b/src/topology/Makefile.am +@@ -2,7 +2,7 @@ EXTRA_DIST = Versions + COMPATNUM=@LIBTOOL_VERSION_INFO@ + + if VERSIONED_SYMBOLS +-VSYMS = -Wl,--version-script=Versions ++VSYMS = -Wl,--version-script=$(srcdir)/Versions + else + VSYMS = + endif +-- +2.34.1 + diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb index cf7c3fcd43..c212b17aa3 100644 --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.5.1.bb +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb @@ -4,19 +4,21 @@ provides a level of abstraction over the /dev interfaces provided by the kernel HOMEPAGE = "http://www.alsa-project.org" BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" SECTION = "libs/multimedia" -LICENSE = "LGPLv2.1 & GPLv2+" +LICENSE = "LGPL-2.1-only & GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \ " -SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" -SRC_URI[sha256sum] = "628421d950cecaf234de3f899d520c0a6923313c964ad751ffac081df331438e" +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \ + file://0001-topology-correct-version-script-path.patch \ + " +SRC_URI[sha256sum] = "9f3f2f69b995f9ad37359072fbc69a3a88bfba081fc83e9be30e14662795bb4d" inherit autotools pkgconfig EXTRA_OECONF += " \ ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ - --disable-python \ + --disable-python --disable-old-symbols \ " PACKAGES =+ "alsa-server alsa-conf libatopology" diff --git a/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch b/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch new file mode 100644 index 0000000000..ff7745d637 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam_av.c-Include-missing-string.h.patch @@ -0,0 +1,25 @@ +From b01b176a665ba65979d74922955f51dc4888a713 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 23 Aug 2022 15:21:16 -0700 +Subject: [PATCH] arcam_av.c: Include missing string.h + +bzero() function needs this header to be included + +Upstream-Status: Submitted [https://github.com/alsa-project/alsa-plugins/pull/47] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + arcam-av/arcam_av.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arcam-av/arcam_av.c b/arcam-av/arcam_av.c +index 63f9b4e..29fc537 100644 +--- a/arcam-av/arcam_av.c ++++ b/arcam-av/arcam_av.c +@@ -27,6 +27,7 @@ + #include <signal.h> + #include <stddef.h> + #include <stdio.h> ++#include <string.h> + #include <termios.h> + #include <unistd.h> + diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.5.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb index 0eac982e1a..9500462d5c 100644 --- a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.5.bb +++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb @@ -6,24 +6,26 @@ HOMEPAGE = "http://alsa-project.org" BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" SECTION = "multimedia" -# The primary license of alsa-plugins is LGPLv2.1. +# The primary license of alsa-plugins is LGPL-2.1-only. # -# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the -# build system, and doesn't affect the licensing of the build result. +# m4/attributes.m4 is licensed under GPL-2.0-or-later. m4/attributes.m4 is part +# of the build system, and doesn't affect the licensing of the build result. # -# The samplerate plugin source code is licensed under GPLv2+ to be consistent -# with the libsamplerate license. However, if the licensee has a commercial -# license for libsamplerate, the samplerate plugin may be used under the terms -# of LGPLv2.1 like the rest of the plugins. -LICENSE = "LGPLv2.1 & GPLv2+" +# The samplerate plugin source code is licensed under GPL-2.0-or-later to be +# consistent with the libsamplerate license. However, if the licensee has a +# commercial license for libsamplerate, the samplerate plugin may be used under +# the terms of LGPL-2.1-only like the rest of the plugins. +LICENSE = "LGPL-2.1-only & GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \ file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ " -SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" -SRC_URI[sha256sum] = "42eef98433d2c8d11f1deeeb459643619215a75aa5a5bbdd06a794e4c413df20" +SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2 \ + file://0001-arcam_av.c-Include-missing-string.h.patch \ + " +SRC_URI[sha256sum] = "8c337814954bb7c167456733a6046142a2931f12eccba3ec2a4ae618a3432511" DEPENDS += "alsa-lib" @@ -34,7 +36,7 @@ PACKAGECONFIG ??= "\ speexdsp \ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ " -PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,avtp" +PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,libavtp" PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav" PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb index 540f4f79f4..53868041c0 100644 --- a/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb @@ -5,7 +5,7 @@ firmware loaders for pcmcia, USB and the hdsp devices." HOMEPAGE = "http://www.alsa-project.org" BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" SECTION = "console/utils" -LICENSE = "GPLv2 & LGPLv2+" +LICENSE = "GPL-2.0-only & LGPL-2.0-or-later" DEPENDS = "alsa-lib" LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f65 SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2" -SRC_URI[sha256sum] = "35a71027a01f4d7de4722e223520e940de68b3c570b6c671691567ae28f9893e" +SRC_URI[sha256sum] = "0915c9634a502fd3655ca9c574d259bc9e79983d91d45aeacff6f3c00f8ae3e9" inherit autotools-brokensep pkgconfig # brokensep as as10k1 (and probably more) fail out of tree @@ -71,6 +71,7 @@ python do_compile() { } python do_install() { + d.delVarFlag("autotools_do_install", "cleandirs") for subdir in d.getVar("PACKAGECONFIG").split(): subdir = subdir.replace("--", "/") bb.note("Installing %s" % subdir) diff --git a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb index 9d874eca13..ce1a42c9b8 100644 --- a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.5.1.bb +++ b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb @@ -8,7 +8,7 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2" -SRC_URI[sha256sum] = "5841a444166dcbf479db751303dbc3556f685085ac7e00f0c9e7755676195d97" +SRC_URI[sha256sum] = "387c01cf30e2a1676d7b8f72b2681cf219abca70dd1ec2a9e33add5bf3feae81" # Something went wrong at upstream tarballing inherit allarch diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.5.1.bb deleted file mode 100644 index 000e984a7d..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.5.1.bb +++ /dev/null @@ -1,25 +0,0 @@ -require alsa-utils.inc - -SUMMARY = "Shell scripts that show help info and create ALSA configuration files" -PROVIDES = "alsa-utils-alsaconf" - -FILESEXTRAPATHS:prepend := "${THISDIR}/alsa-utils:" - -PACKAGES = "${PN}" -RDEPENDS:${PN} += "bash" - -FILES:${PN} = "${sbindir}/alsaconf \ - ${sbindir}/alsa-info.sh \ - ${sbindir}/alsabat-test.sh \ - " - -S = "${WORKDIR}/alsa-utils-${PV}" - -do_install() { - install -d ${D}${sbindir} - install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/ - install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/ - if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then - install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/ - fi -} diff --git a/meta/recipes-multimedia/alsa/alsa-utils.inc b/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb index 95b93d4432..e598fac9f8 100644 --- a/meta/recipes-multimedia/alsa/alsa-utils.inc +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb @@ -4,8 +4,9 @@ designed to allow users to control the various parts of the ALSA system." HOMEPAGE = "http://www.alsa-project.org" BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" SECTION = "console/utils" -# Some parts are GPLv2+, some are only GPLv2 (e.g. axfer, alsactl) so result is GPLv2 -LICENSE = "GPLv2" +# Some parts are GPL-2.0-or-later, some are GPL-2.0-only (e.g. axfer, alsactl) +# so result is GPL-2.0-only +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642" DEPENDS = "alsa-lib ncurses libsamplerate0" @@ -23,8 +24,9 @@ PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe -SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2" -SRC_URI[sha256sum] = "9c169ae37a49295f9b97b92ace772803daf6b6510a19574e0b78f87e562118d0" +SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2 \ + " +SRC_URI[sha256sum] = "9ac6ca3a883f151e568dcf979b8d2e5cbecc51b819bb0e6bb8a2e9b34cc428a7" # On build machines with python-docutils (not python3-docutils !!) installed # rst2man (not rst2man.py) is detected and compile fails with @@ -52,6 +54,8 @@ ALSA_UTILS_PKGS = "\ alsa-utils-alsactl \ alsa-utils-alsaloop \ alsa-utils-alsaucm \ + alsa-utils-scripts \ + alsa-utils-nhltdmicinfo \ " PACKAGES += "${ALSA_UTILS_PKGS}" @@ -60,7 +64,7 @@ RDEPENDS:${PN} += "${ALSA_UTILS_PKGS}" FILES:${PN} = "" ALLOW_EMPTY:alsa-utils = "1" FILES:alsa-utils-alsabat = "${bindir}/alsabat" -FILES:alsa-utils-alsatplg = "${bindir}/alsatplg" +FILES:alsa-utils-alsatplg = "${bindir}/alsatplg ${libdir}/alsa-topology" FILES:alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer" FILES:alsa-utils-amixer = "${bindir}/amixer" FILES:alsa-utils-alsamixer = "${bindir}/alsamixer" @@ -73,6 +77,11 @@ FILES:alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restor FILES:alsa-utils-aseqdump = "${bindir}/aseqdump" FILES:alsa-utils-alsaloop = "${bindir}/alsaloop" FILES:alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules" +FILES:alsa-utils-scripts = "${sbindir}/alsaconf \ + ${sbindir}/alsa-info.sh \ + ${sbindir}/alsabat-test.sh \ + " +FILES:alsa-utils-nhltdmicinfo = "${bindir}/nhlt-dmic-info" SUMMARY:alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver" SUMMARY:alsa-utils-alsatplg = "Converts topology text files into binary format for kernel" @@ -88,20 +97,28 @@ SUMMARY:alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.s SUMMARY:alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" SUMMARY:alsa-utils-alsaloop = "ALSA PCM loopback utility" SUMMARY:alsa-utils-alsaucm = "ALSA Use Case Manager" +SUMMARY:alsa-utils-scripts = "Shell scripts that show help info and create ALSA configuration files" +SUMMARY:alsa-utils-nhltdmicinfo = "Dumps microphone array information from ACPI NHLT table" RRECOMMENDS:alsa-utils-alsactl = "alsa-states" do_install() { autotools_do_install - # We don't ship this here because it requires a dependency on bash. - # See alsa-utils-scripts_${PV}.bb - rm ${D}${sbindir}/alsaconf - rm ${D}${sbindir}/alsa-info.sh - rm -f ${D}${sbindir}/alsabat-test.sh + install -d ${D}${sbindir} + install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/ + install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/ + if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then + install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/ + fi # If udev is disabled, we told configure to install the rules # in /unwanted, so we can remove them now. If udev is enabled, # then /unwanted won't exist and this will have no effect. rm -rf ${D}/unwanted } + + +PROVIDES = "alsa-utils-alsaconf alsa-utils-scripts" + +RDEPENDS:${PN}-scripts += "bash" diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.2.5.1.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.2.5.1.bb deleted file mode 100644 index 3430288da4..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils_1.2.5.1.bb +++ /dev/null @@ -1,2 +0,0 @@ -require alsa-utils.inc - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch deleted file mode 100644 index 3b503c49c9..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 24a58d70cbb3997e471366bd5afe54be9007bfb1 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 10 Nov 2020 15:32:14 +0000 -Subject: [PATCH] libavutil: include assembly with full path from source root - -Otherwise nasm writes the full host-specific paths into .o -output, which breaks binary reproducibility. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - libavutil/x86/cpuid.asm | 2 +- - libavutil/x86/emms.asm | 2 +- - libavutil/x86/fixed_dsp.asm | 2 +- - libavutil/x86/float_dsp.asm | 2 +- - libavutil/x86/lls.asm | 2 +- - libavutil/x86/pixelutils.asm | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm -index c3f7866..766f77f 100644 ---- a/libavutil/x86/cpuid.asm -+++ b/libavutil/x86/cpuid.asm -@@ -21,7 +21,7 @@ - ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ;****************************************************************************** - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - SECTION .text - -diff --git a/libavutil/x86/emms.asm b/libavutil/x86/emms.asm -index 8611762..df84f22 100644 ---- a/libavutil/x86/emms.asm -+++ b/libavutil/x86/emms.asm -@@ -18,7 +18,7 @@ - ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ;****************************************************************************** - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - SECTION .text - -diff --git a/libavutil/x86/fixed_dsp.asm b/libavutil/x86/fixed_dsp.asm -index 979dd5c..2f41185 100644 ---- a/libavutil/x86/fixed_dsp.asm -+++ b/libavutil/x86/fixed_dsp.asm -@@ -20,7 +20,7 @@ - ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ;****************************************************************************** - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - SECTION .text - -diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm -index 517fd63..b773e61 100644 ---- a/libavutil/x86/float_dsp.asm -+++ b/libavutil/x86/float_dsp.asm -@@ -20,7 +20,7 @@ - ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ;****************************************************************************** - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - SECTION_RODATA 32 - pd_reverse: dd 7, 6, 5, 4, 3, 2, 1, 0 -diff --git a/libavutil/x86/lls.asm b/libavutil/x86/lls.asm -index 317fba6..d2526d1 100644 ---- a/libavutil/x86/lls.asm -+++ b/libavutil/x86/lls.asm -@@ -20,7 +20,7 @@ - ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ;****************************************************************************** - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - SECTION .text - -diff --git a/libavutil/x86/pixelutils.asm b/libavutil/x86/pixelutils.asm -index 36c57c5..8b45ead 100644 ---- a/libavutil/x86/pixelutils.asm -+++ b/libavutil/x86/pixelutils.asm -@@ -21,7 +21,7 @@ - ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ;****************************************************************************** - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - SECTION .text - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch deleted file mode 100644 index f048c2e715..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 223b5e8ac9f6461bb13ed365419ec485c5b2b002 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Fri, 28 May 2021 20:18:25 +0200 -Subject: [PATCH] avcodec/aacpsy: Avoid floating point division by 0 of - norm_fac - -Fixes: Ticket7995 -Fixes: CVE-2020-20446 - -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> - -CVE: CVE-2020-20446 -Upstream-Status: Backport [223b5e8ac9f6461bb13ed365419ec485c5b2b002] - -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - libavcodec/aacpsy.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c -index 482113d427..e51d29750b 100644 ---- a/libavcodec/aacpsy.c -+++ b/libavcodec/aacpsy.c -@@ -794,7 +794,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel, - - if (pe < 1.15f * desired_pe) { - /* 6.6.1.3.6 "Final threshold modification by linearization" */ -- norm_fac = 1.0f / norm_fac; -+ norm_fac = norm_fac ? 1.0f / norm_fac : 0; - for (w = 0; w < wi->num_windows*16; w += 16) { - for (g = 0; g < num_bands; g++) { - AacPsyBand *band = &pch->band[w+g]; --- -2.32.0 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch deleted file mode 100644 index b1c94057a3..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Fri, 28 May 2021 21:37:26 +0200 -Subject: [PATCH] avcodec/aacenc: Avoid 0 lambda - -Fixes: Ticket8003 -Fixes: CVE-2020-20453 - -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> - -CVE: CVE-2020-20453 -Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8] - -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - libavcodec/aacenc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c -index aa223cf25f..e80591ba86 100644 ---- a/libavcodec/aacenc.c -+++ b/libavcodec/aacenc.c -@@ -28,6 +28,7 @@ - * TODOs: - * add sane pulse detection - ***********************************/ -+#include <float.h> - - #include "libavutil/libm.h" - #include "libavutil/float_dsp.h" -@@ -852,7 +853,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, - /* Not so fast though */ - ratio = sqrtf(ratio); - } -- s->lambda = FFMIN(s->lambda * ratio, 65536.f); -+ s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f); - - /* Keep iterating if we must reduce and lambda is in the sky */ - if (ratio > 0.9f && ratio < 1.1f) { --- -2.32.0 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch deleted file mode 100644 index 5c911299cb..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 4c1afa292520329eecd1cc7631bc59a8cca95c46 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Sat, 29 May 2021 09:22:27 +0200 -Subject: [PATCH] avformat/movenc: Check pal_size before use - -Fixes: assertion failure -Fixes: out of array read -Fixes: Ticket8190 -Fixes: CVE-2020-22015 - -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> - - -CVE: CVE-2020-22015 -Upstream-Status: Backport [4c1afa292520329eecd1cc7631bc59a8cca95c46] - -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - libavformat/movenc.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/libavformat/movenc.c b/libavformat/movenc.c -index 2ab507df15..7d839f447b 100644 ---- a/libavformat/movenc.c -+++ b/libavformat/movenc.c -@@ -2160,11 +2160,13 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex - avio_wb16(pb, 0x18); /* Reserved */ - - if (track->mode == MODE_MOV && track->par->format == AV_PIX_FMT_PAL8) { -- int pal_size = 1 << track->par->bits_per_coded_sample; -- int i; -+ int pal_size, i; - avio_wb16(pb, 0); /* Color table ID */ - avio_wb32(pb, 0); /* Color table seed */ - avio_wb16(pb, 0x8000); /* Color table flags */ -+ if (track->par->bits_per_coded_sample < 0 || track->par->bits_per_coded_sample > 8) -+ return AVERROR(EINVAL); -+ pal_size = 1 << track->par->bits_per_coded_sample; - avio_wb16(pb, pal_size - 1); /* Color table size (zero-relative) */ - for (i = 0; i < pal_size; i++) { - uint32_t rgb = track->palette[i]; --- -2.32.0 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch deleted file mode 100644 index 6f7fce0e4c..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 7971f62120a55c141ec437aa3f0bacc1c1a3526b Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Sat, 29 May 2021 11:17:35 +0200 -Subject: [PATCH] avfilter/vf_yadif: Fix handing of tiny images - -Fixes: out of array access -Fixes: Ticket8240 -Fixes: CVE-2020-22021 - -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> - -CVE: CVE-2020-22021 -Upstream-Status: Backport [7971f62120a55c141ec437aa3f0bacc1c1a3526b] - -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - libavfilter/vf_yadif.c | 32 ++++++++++++++++++-------------- - 1 file changed, 18 insertions(+), 14 deletions(-) - -diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c -index 91cc79ecc3..b0d9fbaf1f 100644 ---- a/libavfilter/vf_yadif.c -+++ b/libavfilter/vf_yadif.c -@@ -123,20 +123,22 @@ static void filter_edges(void *dst1, void *prev1, void *cur1, void *next1, - uint8_t *next2 = parity ? cur : next; - - const int edge = MAX_ALIGN - 1; -+ int offset = FFMAX(w - edge, 3); - - /* Only edge pixels need to be processed here. A constant value of false - * for is_not_edge should let the compiler ignore the whole branch. */ -- FILTER(0, 3, 0) -+ FILTER(0, FFMIN(3, w), 0) - -- dst = (uint8_t*)dst1 + w - edge; -- prev = (uint8_t*)prev1 + w - edge; -- cur = (uint8_t*)cur1 + w - edge; -- next = (uint8_t*)next1 + w - edge; -+ dst = (uint8_t*)dst1 + offset; -+ prev = (uint8_t*)prev1 + offset; -+ cur = (uint8_t*)cur1 + offset; -+ next = (uint8_t*)next1 + offset; - prev2 = (uint8_t*)(parity ? prev : cur); - next2 = (uint8_t*)(parity ? cur : next); - -- FILTER(w - edge, w - 3, 1) -- FILTER(w - 3, w, 0) -+ FILTER(offset, w - 3, 1) -+ offset = FFMAX(offset, w - 3); -+ FILTER(offset, w, 0) - } - - -@@ -170,21 +172,23 @@ static void filter_edges_16bit(void *dst1, void *prev1, void *cur1, void *next1, - uint16_t *next2 = parity ? cur : next; - - const int edge = MAX_ALIGN / 2 - 1; -+ int offset = FFMAX(w - edge, 3); - - mrefs /= 2; - prefs /= 2; - -- FILTER(0, 3, 0) -+ FILTER(0, FFMIN(3, w), 0) - -- dst = (uint16_t*)dst1 + w - edge; -- prev = (uint16_t*)prev1 + w - edge; -- cur = (uint16_t*)cur1 + w - edge; -- next = (uint16_t*)next1 + w - edge; -+ dst = (uint16_t*)dst1 + offset; -+ prev = (uint16_t*)prev1 + offset; -+ cur = (uint16_t*)cur1 + offset; -+ next = (uint16_t*)next1 + offset; - prev2 = (uint16_t*)(parity ? prev : cur); - next2 = (uint16_t*)(parity ? cur : next); - -- FILTER(w - edge, w - 3, 1) -- FILTER(w - 3, w, 0) -+ FILTER(offset, w - 3, 1) -+ offset = FFMAX(offset, w - 3); -+ FILTER(offset, w, 0) - } - - static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) --- -2.32.0 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch deleted file mode 100644 index 5d979ca3f2..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 82ad1b76751bcfad5005440db48c46a4de5d6f02 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Sat, 29 May 2021 09:58:31 +0200 -Subject: [PATCH] avfilter/vf_vmafmotion: Check dimensions - -Fixes: out of array access -Fixes: Ticket8241 -Fixes: Ticket8246 -Fixes: CVE-2020-22019 -Fixes: CVE-2020-22033 - -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> - - -CVE: CVE-2020-22033 -CVE: CVE-2020-22019 -Upstream-Status: Backport [82ad1b76751bcfad5005440db48c46a4de5d6f02] - -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - libavfilter/vf_vmafmotion.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c -index 2db4783d8d..454ebb8afa 100644 ---- a/libavfilter/vf_vmafmotion.c -+++ b/libavfilter/vf_vmafmotion.c -@@ -238,6 +238,9 @@ int ff_vmafmotion_init(VMAFMotionData *s, - int i; - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); - -+ if (w < 3 || h < 3) -+ return AVERROR(EINVAL); -+ - s->width = w; - s->height = h; - s->stride = FFALIGN(w * sizeof(uint16_t), 32); --- -2.32.0 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch deleted file mode 100644 index 51edb76389..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Tue, 25 May 2021 19:29:18 +0200 -Subject: [PATCH] avcodec/exr: More strictly check dc_count -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes: out of array access -Fixes: exr/deneme - -Found-by: Burak Çarıkçı <burakcarikci@crypttech.com> -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> - - -CVE: CVE-2021-33815 -Upstream-Status: Backport [26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777] - -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - libavcodec/exr.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavcodec/exr.c b/libavcodec/exr.c -index 9377a89169..4648ed7d62 100644 ---- a/libavcodec/exr.c -+++ b/libavcodec/exr.c -@@ -1059,11 +1059,11 @@ static int dwa_uncompress(EXRContext *s, const uint8_t *src, int compressed_size - bytestream2_skip(&gb, ac_size); - } - -- if (dc_size > 0) { -+ { - unsigned long dest_len = dc_count * 2LL; - GetByteContext agb = gb; - -- if (dc_count > (6LL * td->xsize * td->ysize + 63) / 64) -+ if (dc_count != dc_w * dc_h * 3) - return AVERROR_INVALIDDATA; - - av_fast_padded_malloc(&td->dc_data, &td->dc_size, FFALIGN(dest_len, 64) * 2); --- -2.32.0 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch deleted file mode 100644 index d82f3a4b63..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch +++ /dev/null @@ -1,42 +0,0 @@ -CVE: CVE-2021-38171 -Upstream-Status: Backport -Signed-off-by: Kiran Surendran <kiran.surendran@windriver.com> - -From fb993619d1035fa9646506925ea70fb122038999 Mon Sep 17 00:00:00 2001 -From: maryam ebrahimzadeh <me22bee@outlook.com> -Date: Wed, 4 Aug 2021 16:15:18 -0400 -Subject: [PATCH] avformat/adtsenc: return value check for init_get_bits in - adts_decode_extradata - -As the second argument for init_get_bits (buf) can be crafted, a return value check for this function call is necessary. -'buf' is part of 'AVPacket pkt'. -replace init_get_bits with init_get_bits8. - -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> -(cherry picked from commit 9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6) -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> ---- - libavformat/adtsenc.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c -index 3595cb3bb2..c35a12a628 100644 ---- a/libavformat/adtsenc.c -+++ b/libavformat/adtsenc.c -@@ -51,9 +51,11 @@ static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const ui - GetBitContext gb; - PutBitContext pb; - MPEG4AudioConfig m4ac; -- int off; -+ int off, ret; - -- init_get_bits(&gb, buf, size * 8); -+ ret = init_get_bits8(&gb, buf, size); -+ if (ret < 0) -+ return ret; - off = avpriv_mpeg4audio_get_config2(&m4ac, buf, size, 1, s); - if (off < 0) - return off; --- -2.31.1 - diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb index 0c6af6549d..aa59755034 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb @@ -5,17 +5,16 @@ DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encod HOMEPAGE = "https://www.ffmpeg.org/" SECTION = "libs" -LICENSE = "GPLv2+ & LGPLv2.1+ & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" -LICENSE:${PN} = "GPLv2+" -LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libpostproc = "GPLv2+" -LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" +LICENSE:${PN} = "GPL-2.0-or-later" +LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libpostproc = "GPL-2.0-or-later" +LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ @@ -23,17 +22,16 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" -SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ - file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ - file://fix-CVE-2020-20446.patch \ - file://fix-CVE-2020-20453.patch \ - file://fix-CVE-2020-22015.patch \ - file://fix-CVE-2020-22021.patch \ - file://fix-CVE-2020-22033-CVE-2020-22019.patch \ - file://fix-CVE-2021-33815.patch \ - file://fix-CVE-2021-38171.patch \ - " -SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" +SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz" + +SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968" + +# https://nvd.nist.gov/vuln/detail/CVE-2023-39018 +# https://github.com/bramp/ffmpeg-cli-wrapper/issues/291 +# https://security-tracker.debian.org/tracker/CVE-2023-39018 +# https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-39018 +CVE_STATUS[CVE-2023-39018] = "cpe-incorrect: This issue belongs to ffmpeg-cli-wrapper \ +(Java wrapper around the FFmpeg CLI) and not ffmepg itself." # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 ARM_INSTRUCTION_SET:armv4 = "arm" @@ -48,9 +46,8 @@ DEPENDS = "nasm-native" inherit autotools pkgconfig -PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ - alsa bzlib lzma pic pthreads shared theora zlib \ - ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ +PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \ + alsa bzlib lzma theora zlib \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" # libraries to build in addition to avutil @@ -61,7 +58,6 @@ PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" -PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" # features to support PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" @@ -81,6 +77,7 @@ PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" +PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils" PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" @@ -90,13 +87,6 @@ PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" -# other configuration options -PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2" -PACKAGECONFIG[pic] = "--enable-pic" -PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads" -PACKAGECONFIG[shared] = "--enable-shared" -PACKAGECONFIG[strip] = ",--disable-stripping" - # Check codecs that require --enable-nonfree USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" @@ -107,6 +97,10 @@ def cpu(d): return 'generic' EXTRA_OECONF = " \ + --disable-stripping \ + --enable-pic \ + --enable-shared \ + --enable-pthreads \ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ \ --cross-prefix=${TARGET_PREFIX} \ @@ -124,6 +118,7 @@ EXTRA_OECONF = " \ --libdir=${libdir} \ --shlibdir=${libdir} \ --datadir=${datadir}/ffmpeg \ + ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \ --cpu=${@cpu(d)} \ --pkg-config=pkg-config \ " @@ -135,19 +130,26 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \ - --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa --disable-msa2" -EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic" + --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa" +EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm" EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic" +EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" +EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" +EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" # gold crashes on x86, another solution is to --disable-asm but thats more hacky # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" +LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}" EXTRA_OEMAKE = "V=1" do_configure() { + export TMPDIR="${B}/tmp" + mkdir -p ${B}/tmp ${S}/configure ${EXTRA_OECONF} + sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=${TARGET_DBGSRC_DIR} --debug-prefix-map=${B}=${TARGET_DBGSRC_DIR},g" ${B}/ffbuild/config.mak } # patch out build host paths for reproducibility @@ -159,7 +161,6 @@ PACKAGES =+ "libavcodec \ libavdevice \ libavfilter \ libavformat \ - libavresample \ libavutil \ libpostproc \ libswresample \ @@ -169,7 +170,6 @@ FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" FILES:libavformat = "${libdir}/libavformat${SOLIBS}" -FILES:libavresample = "${libdir}/libavresample${SOLIBS}" FILES:libavutil = "${libdir}/libavutil${SOLIBS}" FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" FILES:libswresample = "${libdir}/libswresample${SOLIBS}" @@ -181,7 +181,6 @@ INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" INSANE_SKIP:${MLPREFIX}libavformat = "textrel" INSANE_SKIP:${MLPREFIX}libavutil = "textrel" -INSANE_SKIP:${MLPREFIX}libavresample = "textrel" INSANE_SKIP:${MLPREFIX}libswscale = "textrel" INSANE_SKIP:${MLPREFIX}libswresample = "textrel" INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" diff --git a/meta/recipes-multimedia/flac/flac_1.3.3.bb b/meta/recipes-multimedia/flac/flac_1.3.3.bb deleted file mode 100644 index c796cacd2c..0000000000 --- a/meta/recipes-multimedia/flac/flac_1.3.3.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "Free Lossless Audio Codec" -DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format." -HOMEPAGE = "https://xiph.org/flac/" -BUGTRACKER = "http://sourceforge.net/p/flac/bugs/" -SECTION = "libs" -LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ - file://src/Makefile.am;beginline=1;endline=17;md5=09501c864f89dfc7ead65553129817ca \ - file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://src/flac/main.c;beginline=1;endline=18;md5=09777e2934947a36f13568d0beb81199 \ - file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \ - file://src/plugin_common/all.h;beginline=1;endline=18;md5=f56cb4ba9a3bc9ec6102e8df03215271 \ - file://COPYING.Xiph;md5=b59c1b6d7fc0fb7965f821a3d36505e3 \ - file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48" -DEPENDS = "libogg" - -SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \ -" - -SRC_URI[md5sum] = "26703ed2858c1fc9ffc05136d13daa69" -SRC_URI[sha256sum] = "213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748" - -CVE_PRODUCT = "libflac flac" - -inherit autotools gettext - -EXTRA_OECONF = "--disable-oggtest \ - --with-ogg-libraries=${STAGING_LIBDIR} \ - --with-ogg-includes=${STAGING_INCDIR} \ - --disable-xmms-plugin \ - --without-libiconv-prefix \ - ac_cv_prog_NASM="" \ - " - -EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}" -EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "vsx", " --enable-vsx", " --disable-vsx", d)}" -EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}" -EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}" - -PACKAGES += "libflac libflac++ liboggflac liboggflac++" -FILES:${PN} = "${bindir}/*" -FILES:libflac = "${libdir}/libFLAC.so.*" -FILES:libflac++ = "${libdir}/libFLAC++.so.*" -FILES:liboggflac = "${libdir}/libOggFLAC.so.*" -FILES:liboggflac++ = "${libdir}/libOggFLAC++.so.*" - diff --git a/meta/recipes-multimedia/flac/flac_1.4.3.bb b/meta/recipes-multimedia/flac/flac_1.4.3.bb new file mode 100644 index 0000000000..d4e463cda5 --- /dev/null +++ b/meta/recipes-multimedia/flac/flac_1.4.3.bb @@ -0,0 +1,36 @@ +SUMMARY = "Free Lossless Audio Codec" +DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format." +HOMEPAGE = "https://xiph.org/flac/" +BUGTRACKER = "https://github.com/xiph/flac/issues" +SECTION = "libs" +LICENSE = "GFDL-1.2 & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ + file://src/Makefile.am;beginline=1;endline=17;md5=b1dab2704be7f01bfbd9b7f6d5f000a9 \ + file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/flac/main.c;beginline=1;endline=18;md5=23099119c034d894bd1bf7ef5bd22101 \ + file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \ + file://COPYING.Xiph;md5=0c90e41ab2fa7e69ca9391330d870221 \ + file://include/FLAC/all.h;beginline=65;endline=70;md5=39aaf5e03c7364363884c8b8ddda8eea" + +SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz" +SRC_URI[sha256sum] = "6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70" + +CVE_PRODUCT = "libflac flac" + +inherit autotools gettext + +EXTRA_OECONF = "--disable-oggtest \ + --without-libiconv-prefix \ + ac_cv_prog_NASM="" \ + " + +PACKAGECONFIG ??= " \ + ogg \ +" +PACKAGECONFIG[avx] = "--enable-avx,--disable-avx" +PACKAGECONFIG[ogg] = "--enable-ogg --with-ogg-libraries=${STAGING_LIBDIR} --with-ogg-includes=${STAGING_INCDIR},--disable-ogg,libogg" + +PACKAGES += "libflac libflac++" +FILES:${PN} = "${bindir}/*" +FILES:libflac = "${libdir}/libFLAC.so.*" +FILES:libflac++ = "${libdir}/libFLAC++.so.*" diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch b/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch index c0e4581358..21e30d6d46 100644 --- a/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch +++ b/meta/recipes-multimedia/gstreamer/gst-devtools/0001-connect-has-a-different-signature-on-musl.patch @@ -1,4 +1,4 @@ -From 73b1002eda17451db1f58431b42c25203f1d3097 Mon Sep 17 00:00:00 2001 +From 0c73b8131efba63c5cd37ea8c7551434c3b57304 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 9 Sep 2018 17:38:10 -0700 Subject: [PATCH] connect has a different signature on musl @@ -11,6 +11,7 @@ typcasted to struct sockaddr_in* type inside the function before use Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- validate/plugins/fault_injection/socket_interposer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/recipes-multimedia/gstreamer/gst-devtools_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb index 1b46b89cb9..2be406192f 100644 --- a/meta/recipes-multimedia/gstreamer/gst-devtools_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb @@ -3,7 +3,7 @@ DESCRIPTION = "A Tool to test GStreamer components" HOMEPAGE = "https://gstreamer.freedesktop.org/documentation/gst-devtools/index.html" SECTION = "multimedia" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://validate/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" #S = "${WORKDIR}/gst-devtools-${PV}" @@ -12,7 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV} file://0001-connect-has-a-different-signature-on-musl.patch \ " -SRC_URI[sha256sum] = "fecffc86447daf5c2a06843c757a991d745caa2069446a0d746e99b13f7cb079" +SRC_URI[sha256sum] = "07766425ecb5bf857ab5ad3962321c55cd89f9386b720843f9df71c0a455eb9b" DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" RRECOMMENDS:${PN} = "git" @@ -30,6 +30,9 @@ def gettext_oemeson(d): return '-Dnls=disabled' return '-Dnls=enabled' +# Build GstValidateVideo +PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo" + EXTRA_OEMESON += " \ -Ddoc=disabled \ -Ddebug_viewer=disabled \ diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop index 7ddd456a1e..d165e5d910 100644 --- a/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop +++ b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=Media Player Comment=Basic media player -Icon=multimedia-player +Icon=video-player TryExec=gtk-play Exec=gtk-play StartupNotify=true diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb index a720bb73ff..02282ac5d9 100644 --- a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb @@ -2,7 +2,7 @@ SUMMARY = "GStreamer examples (including gtk-play, gst-play)" DESCRIPTION = "GStreamer example applications" HOMEPAGE = "https://gitlab.freedesktop.org/gstreamer/gst-examples" BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues" -LICENSE = "LGPL-2.0+" +LICENSE = "LGPL-2.0-or-later" LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9" DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 libsoup-2.4 json-glib glib-2.0-native" @@ -12,7 +12,7 @@ SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=http file://gst-player.desktop \ " -SRCREV = "fe9a365dc0f1ff632abcfe3322ac5527a2cf30a0" +SRCREV = "70e4fcf4fc8ae19641aa990de5f37d758cdfcea4" S = "${WORKDIR}/git" @@ -30,6 +30,6 @@ RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback" RRECOMMENDS:${PN} = "gstreamer1.0-plugins-base-meta \ gstreamer1.0-plugins-good-meta \ gstreamer1.0-plugins-bad-meta \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}" + ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-libav", "", d)} \ + ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}" RPROVIDES:${PN} += "gst-player gst-player-bin" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb index a77ec62759..f3287efa96 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb @@ -6,13 +6,13 @@ SECTION = "multimedia" # ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency LICENSE_FLAGS = "commercial" -LICENSE = "LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ " SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz" -SRC_URI[sha256sum] = "822e008a910e9dd13aedbdd8dc63fedef4040c0ee2e927bab3112e9de693a548" +SRC_URI[sha256sum] = "6b13dcc9332ef27a7c1e7005c0196883874f91622f8aa6e52f218b05b15d2bf5" S = "${WORKDIR}/gst-libav-${PV}" @@ -20,5 +20,9 @@ DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg" inherit meson pkgconfig upstream-version-is-even +EXTRA_OEMESON += " \ + -Dtests=disabled \ +" + FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb index 57a9adbaec..6cc11e1928 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb @@ -34,8 +34,7 @@ RDEPENDS:gstreamer1.0-meta-base = "\ gstreamer1.0-plugins-base-audioconvert \ gstreamer1.0-plugins-base-audioresample \ gstreamer1.0-plugins-base-typefindfunctions \ - gstreamer1.0-plugins-base-videoscale \ - gstreamer1.0-plugins-base-videoconvert \ + gstreamer1.0-plugins-base-videoconvertscale \ gstreamer1.0-plugins-good-autodetect \ gstreamer1.0-plugins-good-soup" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb index b2c1eb3ea0..97348fb398 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb @@ -3,14 +3,14 @@ DESCRIPTION = "Wraps available OpenMAX IL components and makes them available as HOMEPAGE = "http://gstreamer.freedesktop.org/" SECTION = "multimedia" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-or-later" LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" -SRC_URI[sha256sum] = "2cd457c1e8deb1a9b39608048fb36a44f6c9a864a6b6115b1453a32e7be93b42" +SRC_URI[sha256sum] = "18dfdf5f6b773d67e62a315c6cf6247da320b83603a5819493f53c69ed2eeef6" S = "${WORKDIR}/gst-omx-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch index 13a673cd50..a57fcd7d21 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch @@ -1,11 +1,12 @@ -From f08ab3ac2ce43ac91d3bf65b26f26436690f499b Mon Sep 17 00:00:00 2001 +From 8be0c6ac60c96e87d8aa443be9c431844dc3d92a Mon Sep 17 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Tue, 26 Jan 2016 15:16:01 -0800 -Subject: [PATCH 1/4] fix maybe-uninitialized warnings when compiling with -Os +Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os Upstream-Status: Pending Signed-off-by: Andre McCurdy <armccurdy@gmail.com> + --- gst-libs/gst/codecparsers/gstvc1parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -23,6 +24,3 @@ index 2c60ced..e8226d8 100644 guint8 structA[8] = { 0, }; guint8 structB[12] = { 0, }; GstBitReader br; --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch index ead6897f67..6509a293b7 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-avoid-including-sys-poll.h-directly.patch @@ -1,22 +1,23 @@ -From 3b05e91720c10fcf6e0e408595b7217f6fa145c2 Mon Sep 17 00:00:00 2001 +From 426ee79adeecc24605426030a486d7c5a755048c Mon Sep 17 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Wed, 3 Feb 2016 18:05:41 -0800 -Subject: [PATCH 2/4] avoid including <sys/poll.h> directly +Subject: [PATCH] avoid including <sys/poll.h> directly musl libc generates warnings if <sys/poll.h> is included directly. Upstream-Status: Pending Signed-off-by: Andre McCurdy <armccurdy@gmail.com> + --- sys/dvb/gstdvbsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c -index ca6b92a..b2772db 100644 +index b8e5b1a..5bca6e5 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c -@@ -97,7 +97,7 @@ +@@ -98,7 +98,7 @@ #include <gst/gst.h> #include <gst/glib-compat-private.h> #include <sys/ioctl.h> @@ -25,6 +26,3 @@ index ca6b92a..b2772db 100644 #include <fcntl.h> #include <errno.h> #include <stdio.h> --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch deleted file mode 100644 index 88fbc40dcd..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 5ed27de9f662fe063b8b3d5d4335aa64cd4718c9 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 9 Feb 2016 14:00:00 -0800 -Subject: [PATCH 3/4] ensure valid sentinals for gst_structure_get() etc - -For GStreamer functions declared with G_GNUC_NULL_TERMINATED, -ie __attribute__((__sentinel__)), gcc will generate a warning if the -last parameter passed to the function is not NULL (where a valid NULL -in this context is defined as zero with any pointer type). - -The C callers to such functions within gst-plugins-bad use the C NULL -definition (ie ((void*)0)), which is a valid sentinel. - -However the C++ NULL definition (ie 0L), is not a valid sentinel -without an explicit cast to a pointer type. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - sys/decklink/gstdecklink.cpp | 10 +++++----- - sys/decklink/gstdecklinkaudiosrc.cpp | 2 +- - sys/decklink/gstdecklinkvideosink.cpp | 2 +- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp -index 4dac7e1..43762ce 100644 ---- a/sys/decklink/gstdecklink.cpp -+++ b/sys/decklink/gstdecklink.cpp -@@ -674,7 +674,7 @@ gst_decklink_mode_get_generic_structure (GstDecklinkModeEnum e) - "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, - "interlace-mode", G_TYPE_STRING, - mode->interlaced ? "interleaved" : "progressive", -- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); -+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL); - - return s; - } -@@ -699,16 +699,16 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f, - case bmdFormat8BitYUV: /* '2vuy' */ - gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", - "colorimetry", G_TYPE_STRING, mode->colorimetry, -- "chroma-site", G_TYPE_STRING, "mpeg2", NULL); -+ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL); - break; - case bmdFormat10BitYUV: /* 'v210' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL); - break; - case bmdFormat8BitARGB: /* 'ARGB' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL); - break; - case bmdFormat8BitBGRA: /* 'BGRA' */ -- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); -+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL); - break; - case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ - case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ -diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp -index 2fef934..c47229a 100644 ---- a/sys/decklink/gstdecklinkaudiosrc.cpp -+++ b/sys/decklink/gstdecklinkaudiosrc.cpp -@@ -379,7 +379,7 @@ gst_decklink_audio_src_start (GstDecklinkAudioSrc * self) - g_mutex_unlock (&self->input->lock); - - if (videosrc) { -- g_object_get (videosrc, "connection", &vconn, NULL); -+ g_object_get (videosrc, "connection", &vconn, (void *) NULL); - gst_object_unref (videosrc); - - switch (vconn) { -diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp -index e3a6775..f1a5aae 100644 ---- a/sys/decklink/gstdecklinkvideosink.cpp -+++ b/sys/decklink/gstdecklinkvideosink.cpp -@@ -286,7 +286,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure, - gpointer user_data) - { - gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, -- G_MAXINT, 1, NULL); -+ G_MAXINT, 1, (void *) NULL); - - return TRUE; - } --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch index b816709066..50a3143eca 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch @@ -1,7 +1,7 @@ -From f19ff66640f2f472c4e9d9055253032d34e125c6 Mon Sep 17 00:00:00 2001 +From e6eb7536fcfc2c75f7831f67b1f16f3f36ef2545 Mon Sep 17 00:00:00 2001 From: Andrey Zhizhikin <andrey.z@gmail.com> Date: Mon, 27 Jan 2020 10:22:35 +0000 -Subject: [PATCH 4/4] opencv: resolve missing opencv data dir in yocto build +Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build When Yocto build is performed, opencv searches for data dir using simple 'test' command, this fails because pkg-config provides an absolute @@ -11,39 +11,23 @@ in order for the 'test' utility to pick up the absolute path. Upstream-Status: Inappropriate [OE-specific] Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- - ext/opencv/meson.build | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + ext/opencv/meson.build | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build -index 0b0b3fc..0ed3344 100644 +index 37e2015..326f737 100644 --- a/ext/opencv/meson.build +++ b/ext/opencv/meson.build -@@ -78,20 +78,21 @@ else - endif - - if opencv_found -+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() - opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix') +@@ -87,6 +87,9 @@ if opencv_found + opencv_prefix = opencv_dep.get_variable('prefix') gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] ++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() ++ opencv_prefix = pkgconf_sysroot + opencv_prefix ++ # Check the data dir used by opencv for its xml data files # Use prefix from pkg-config to be compatible with cross-compilation -- r = run_command('test', '-d', opencv_prefix + '/share/opencv') -+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv') - if r.returncode() == 0 - gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"' - else -- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV') -+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV') - if r.returncode() == 0 - gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"' - else -- r = run_command('test', '-d', opencv_prefix + '/share/opencv4') -+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4') - if r.returncode() == 0 - gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"' - else --- -2.28.0 - + r = run_command('test', '-d', opencv_prefix + '/share/opencv', check: false) diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch deleted file mode 100644 index cb3bb7d361..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1f00d5026118ebd48e4ccf83d32d67155c4e7f60 Mon Sep 17 00:00:00 2001 -From: Naveen Saini <naveen.kumar.saini@intel.com> -Date: Wed, 30 Dec 2020 16:37:47 +0800 -Subject: [PATCH] msdk: fix includedir path - -In cross compilation, need to prepend PKG_CONFIG_SYSROOT_DIR to the dir path. - -Upstream-Status: Inappropriate [OE-specific] - -Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> ---- - sys/msdk/meson.build | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build -index 6346c9451..068f38548 100644 ---- a/sys/msdk/meson.build -+++ b/sys/msdk/meson.build -@@ -40,7 +40,9 @@ endif - - mfx_dep = dependency('libmfx', required: false) - if mfx_dep.found() -+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() - mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir') -+ mfx_incdir = pkgconf_sysroot + mfx_incdir - mfx_inc = [] - else - # Old versions of MediaSDK don't provide a pkg-config file --- -2.17.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb index f3ea6f7293..523ee7a5ae 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb @@ -1,21 +1,20 @@ require gstreamer1.0-plugins-common.inc +require gstreamer1.0-plugins-license.inc -DESCRIPTION = "'Bad' GStreamer plugins and helper libraries " +SUMMARY = "'Bad' GStreamer plugins and helper libraries " HOMEPAGE = "https://gstreamer.freedesktop.org/" BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues" SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ file://0002-avoid-including-sys-poll.h-directly.patch \ - file://0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch \ file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ - file://0005-msdk-fix-includedir-path.patch \ " -SRC_URI[sha256sum] = "a164923b94f0d08578a6fcaeaac6e0c05da788a46903a1086870e9ca45ad678e" +SRC_URI[sha256sum] = "808d3b33fc4c71aeb2561c364a87c2e8a3e2343319a83244c8391be4b09499c8" S = "${WORKDIR}/gst-plugins-bad-${PV}" -LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" +LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS += "gstreamer1.0-plugins-base" @@ -25,7 +24,7 @@ inherit gobject-introspection PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ @@ -35,6 +34,7 @@ PACKAGECONFIG ??= " \ PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom" PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" +PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp" PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5" PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo" @@ -57,11 +57,10 @@ PACKAGECONFIG[gcrypt] = "-Dhls-crypto=libgcrypt,,libgcrypt" PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled," PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm" PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265" -PACKAGECONFIG[libmms] = "-Dlibmms=enabled,-Dlibmms=disabled,libmms" PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2" PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms" PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" -PACKAGECONFIG[msdk] = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk" +PACKAGECONFIG[msdk] = "-Dmsdk=enabled -Dmfx_api=oneVPL,-Dmsdk=disabled,onevpl-intel-gpu" PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon" PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv" @@ -83,6 +82,8 @@ PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp" PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa" PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo" PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev" +# this enables support for stateless V4L2 mem2mem codecs, which is a newer form of +# V4L2 codec; the V4L2 code in -base supports the older stateful V4L2 mem2mem codecs PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev" PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva" PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc" @@ -93,10 +94,15 @@ PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp" PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice" PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing" PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar" +PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon" PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265" +GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}" + EXTRA_OEMESON += " \ -Ddoc=disabled \ + -Daes=enabled \ + -Dcodecalpha=enabled \ -Ddecklink=enabled \ -Ddvb=enabled \ -Dfbdev=enabled \ @@ -105,7 +111,7 @@ EXTRA_OEMESON += " \ -Dtranscode=enabled \ -Dandroidmedia=disabled \ -Dapplemedia=disabled \ - -Davtp=disabled \ + -Dasio=disabled \ -Dbs2b=disabled \ -Dchromaprint=disabled \ -Dd3dvideosink=disabled \ @@ -115,10 +121,12 @@ EXTRA_OEMESON += " \ -Dfdkaac=disabled \ -Dflite=disabled \ -Dgme=disabled \ + -Dgs=disabled \ -Dgsm=disabled \ -Diqa=disabled \ -Dkate=disabled \ -Dladspa=disabled \ + -Dldac=disabled \ -Dlv2=disabled \ -Dmagicleap=disabled \ -Dmediafoundation=disabled \ @@ -127,10 +135,12 @@ EXTRA_OEMESON += " \ -Dmplex=disabled \ -Dmusepack=disabled \ -Dnvcodec=disabled \ - -Dofa=disabled \ -Dopenexr=disabled \ -Dopenni2=disabled \ + -Dopenaptx=disabled \ -Dopensles=disabled \ + -Donnx=disabled \ + -Dqroverlay=disabled \ -Dsoundtouch=disabled \ -Dspandsp=disabled \ -Dsvthevcenc=disabled \ diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch index d5d9838372..34c99ded42 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch @@ -1,13 +1,14 @@ -From f9d48cd85ee68207733b1b91a00453462c33524a Mon Sep 17 00:00:00 2001 +From 63fe5a7b4ef70e2c490bad3b0838329935a8d77c Mon Sep 17 00:00:00 2001 From: zhouming <b42586@freescale.com> Date: Wed, 14 May 2014 10:16:20 +0800 -Subject: [PATCH 1/4] ENGR00312515: get caps from src pad when query caps +Subject: [PATCH] ENGR00312515: get caps from src pad when query caps https://bugzilla.gnome.org/show_bug.cgi?id=728312 Upstream-Status: Pending Signed-off-by: zhouming <b42586@freescale.com> + --- gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) @@ -16,10 +17,10 @@ Signed-off-by: zhouming <b42586@freescale.com> diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c old mode 100644 new mode 100755 -index f545857..62d10ef +index 173da37..2b7f34c --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c -@@ -1777,6 +1777,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) +@@ -1796,6 +1796,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query) } break; } @@ -39,6 +40,3 @@ index f545857..62d10ef default: res = gst_pad_query_default (pad, parent, query); break; --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch index e453a500c9..2adeae93d6 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-ssaparse-enhance-SSA-text-lines-parsing.patch @@ -1,14 +1,15 @@ -From f587861bbe12ad0b10370f835592746aafedbf56 Mon Sep 17 00:00:00 2001 +From 7bf9525528c8f4a47413d7f82214d76f95f0c5f6 Mon Sep 17 00:00:00 2001 From: Mingke Wang <mingke.wang@freescale.com> Date: Thu, 19 Mar 2015 14:17:10 +0800 -Subject: [PATCH 2/4] ssaparse: enhance SSA text lines parsing. +Subject: [PATCH] ssaparse: enhance SSA text lines parsing. some parser will pass in the original ssa text line which starts with "Dialog:" and there's are maybe multiple Dialog lines in one input buffer. -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496] +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/178] Signed-off-by: Mingke Wang <mingke.wang@freescale.com> + --- gst/subparse/gstssaparse.c | 150 +++++++++++++++++++++++++++++++++---- 1 file changed, 134 insertions(+), 16 deletions(-) @@ -17,10 +18,10 @@ Signed-off-by: Mingke Wang <mingke.wang@freescale.com> diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c old mode 100644 new mode 100755 -index c849c08..4b9636c +index d6fdb9c..5ebe678 --- a/gst/subparse/gstssaparse.c +++ b/gst/subparse/gstssaparse.c -@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) +@@ -270,6 +270,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) * gst_ssa_parse_push_line: * @parse: caller element * @txt: text to push @@ -28,7 +29,7 @@ index c849c08..4b9636c * @start: timestamp for the buffer * @duration: duration for the buffer * -@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) +@@ -279,27 +280,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) * Returns: result of the push of the created buffer */ static GstFlowReturn @@ -173,7 +174,7 @@ index c849c08..4b9636c GST_LOG_OBJECT (parse, "Text : %s", t); if (gst_ssa_parse_remove_override_codes (parse, t)) { -@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, +@@ -317,13 +424,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gst_buffer_fill (buf, 0, escaped, len + 1); gst_buffer_set_size (buf, len); g_free (escaped); @@ -200,7 +201,7 @@ index c849c08..4b9636c ret = gst_pad_push (parse->srcpad, buf); -@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) +@@ -343,6 +459,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) GstClockTime ts; gchar *txt; GstMapInfo map; @@ -208,7 +209,7 @@ index c849c08..4b9636c if (G_UNLIKELY (!parse->framed)) goto not_framed; -@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) +@@ -360,13 +477,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) /* make double-sure it's 0-terminated and all */ gst_buffer_map (buf, &map, GST_MAP_READ); txt = g_strndup ((gchar *) map.data, map.size); @@ -224,6 +225,3 @@ index c849c08..4b9636c if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { GstSegment segment; --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch index 2af83ff8b9..a605533be8 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-viv-fb-Make-sure-config.h-is-included.patch @@ -1,19 +1,20 @@ -From 153f3b83a3fed77785bd1420bed8bbafa2d791b3 Mon Sep 17 00:00:00 2001 +From 2b07840122bc2e83bd23dad59aa80d9479f2e1e4 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani <crg7475@mailbox.org> Date: Tue, 21 May 2019 14:01:11 +0200 -Subject: [PATCH 3/4] viv-fb: Make sure config.h is included +Subject: [PATCH] viv-fb: Make sure config.h is included This prevents build errors due to missing GST_API_* symbols Upstream-Status: Pending Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> + --- gst-libs/gst/gl/gl-prelude.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h -index 05e1f62..96ce5e6 100644 +index 85fca5a..946c729 100644 --- a/gst-libs/gst/gl/gl-prelude.h +++ b/gst-libs/gst/gl/gl-prelude.h @@ -22,6 +22,10 @@ @@ -27,6 +28,3 @@ index 05e1f62..96ce5e6 100644 #include <gst/gst.h> #ifdef BUILDING_GST_GL --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch deleted file mode 100644 index f45ea65ef3..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-glimagesink-Downrank-to-marginal.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 79841a02ee754eba736cb32aaf2ed2b2fc0483d4 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 24 Sep 2015 19:47:32 +0300 -Subject: [PATCH 4/4] glimagesink: Downrank to marginal - -On desktop, where there is good OpenGL, xvimagesink will come up first, -on other platforms, OpenGL can't be trusted because it's either software (like -in a VM) or broken (like on embedded)., so let ximagesink come above. - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684] - -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - ext/gl/gstopengl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c -index 302e845..463be9c 100644 ---- a/ext/gl/gstopengl.c -+++ b/ext/gl/gstopengl.c -@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin) - #endif - - if (!gst_element_register (plugin, "glimagesink", -- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) { -+ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) { - return FALSE; - } - --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb index 5e2cca3864..7aa10eb646 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb @@ -1,18 +1,17 @@ require gstreamer1.0-plugins-common.inc -DESCRIPTION = "'Base' GStreamer plugins and helper libraries" +SUMMARY = "'Base' GStreamer plugins and helper libraries" HOMEPAGE = "https://gstreamer.freedesktop.org/" BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues" -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770" SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ file://0003-viv-fb-Make-sure-config.h-is-included.patch \ file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ - file://0004-glimagesink-Downrank-to-marginal.patch \ " -SRC_URI[sha256sum] = "960b7af4585700db0fdd5b843554e11e2564fed9e061f591fae88a7be6446fa3" +SRC_URI[sha256sum] = "65eaf72296cc5edc985695a4d80affc931e64a79f4879d05615854f7a2cf5bd1" S = "${WORKDIR}/gst-plugins-base-${PV}" @@ -20,11 +19,10 @@ DEPENDS += "iso-codes util-linux zlib" inherit gobject-introspection -PACKAGES_DYNAMIC =+ "^libgst.*" - # opengl packageconfig factored out to make it easy for distros # and BSP layers to choose OpenGL APIs/platforms/window systems -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" +PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}" +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}" PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ @@ -35,7 +33,7 @@ PACKAGECONFIG ??= " \ " OPENGL_APIS = 'opengl gles2' -OPENGL_PLATFORMS = 'egl' +OPENGL_PLATFORMS = 'egl glx' X11DEPENDS = "virtual/libx11 libsm libxrender libxv" X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" @@ -43,11 +41,15 @@ X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" +PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene" PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" +# This enables Qt5 QML examples in -base. The Qt5 GStreamer +# qmlglsink and qmlglsrc plugins still exist in -good. +PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native" PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" @@ -60,6 +62,7 @@ PACKAGECONFIG[gles2] = ",,virtual/libgles2" # OpenGL platform packageconfigs PACKAGECONFIG[egl] = ",,virtual/egl" +PACKAGECONFIG[glx] = ",,virtual/libgl" # OpenGL window systems (except for X11) PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" @@ -71,7 +74,6 @@ OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx e EXTRA_OEMESON += " \ -Ddoc=disabled \ - -Dgl-graphene=disabled \ ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch deleted file mode 100644 index 788d752058..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch +++ /dev/null @@ -1,56 +0,0 @@ -From bf8b2fa0f6870589d036f0f33c140a3f85b530a0 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 31 Mar 2020 21:23:28 -0700 -Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h - -gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to -prefer qt headers definitions for GLsync - -This helps in fixing build errors like below - -/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync' - 24 | typedef struct __GLsync *GLsync; - | ^~~~~~ -In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84, - from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30: -/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync -' - 40 | typedef gpointer GLsync; - | ^~~~~~ - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - ext/qt/gstqsgtexture.cc | 2 +- - ext/qt/qtwindow.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc -index a05d26e..4cc9fc6 100644 ---- a/ext/qt/gstqsgtexture.cc -+++ b/ext/qt/gstqsgtexture.cc -@@ -27,7 +27,7 @@ - - #include <gst/video/video.h> - #include <gst/gl/gl.h> --#include <gst/gl/gstglfuncs.h> -+#include <ext/qt/gstqtgl.h> - #include "gstqsgtexture.h" - - #define GST_CAT_DEFAULT gst_qsg_texture_debug -diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc -index 9360c33..0dfd3f1 100644 ---- a/ext/qt/qtwindow.cc -+++ b/ext/qt/qtwindow.cc -@@ -25,7 +25,7 @@ - #include <stdio.h> - - #include <gst/video/video.h> --#include <gst/gl/gstglfuncs.h> -+#include <ext/qt/gstqtgl.h> - #include "qtwindow.h" - #include "gstqsgtexture.h" - #include "gstqtglutility.h" --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch new file mode 100644 index 0000000000..33bd4200f6 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch @@ -0,0 +1,38 @@ +From b77d4806fd5de50d0b017a3e6a19c5bfdef7b3e4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Feb 2023 12:47:31 -0800 +Subject: [PATCH] v4l2: Define ioctl_req_t for posix/linux case + +this is an issue seen with musl based linux distros e.g. alpine [1] +musl is not going to change this since it breaks ABI/API interfaces +Newer compilers are stringent ( e.g. clang16 ) which can now detect +signature mismatches in function pointers too, existing code warned but +did not error with older clang + +Fixes +gstv4l2object.c:544:23: error: incompatible function pointer types assigning to 'gint (*)(gint, ioctl_req_t, ...)' (aka 'int (*)(int, unsigned long, ...)') from 'int (int, int, ...)' [-Wincompatible-function-pointer-types] + v4l2object->ioctl = ioctl; + ^ ~~~~~ + +[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3950] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + sys/v4l2/gstv4l2object.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h +index d95b375..5223cbb 100644 +--- a/sys/v4l2/gstv4l2object.h ++++ b/sys/v4l2/gstv4l2object.h +@@ -76,6 +76,8 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object); + * 'unsigned long' for the 2nd parameter */ + #ifdef __ANDROID__ + typedef unsigned ioctl_req_t; ++#elif defined(__linux__) && !defined(__GLIBC__) /* musl/linux */ ++typedef int ioctl_req_t; + #else + typedef gulong ioctl_req_t; + #endif diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb index ade935df9e..9ce3f73f7c 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb @@ -1,30 +1,33 @@ require gstreamer1.0-plugins-common.inc -DESCRIPTION = "'Good' GStreamer plugins" +SUMMARY = "'Good' GStreamer plugins" HOMEPAGE = "https://gstreamer.freedesktop.org/" BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues" SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ - file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ - " + file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch" -SRC_URI[sha256sum] = "3aaeeea7765fbf8801acce4a503a9b05f73f04e8a35352e9d00232cfd555796b" +SRC_URI[sha256sum] = "6ddd032381827d31820540735f0004b429436b0bdac19aaeab44fa22faad52e2" S = "${WORKDIR}/gst-plugins-good-${PV}" -LICENSE = "GPLv2+ & LGPLv2.1+" +LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" DEPENDS += "gstreamer1.0-plugins-base libcap zlib" RPROVIDES:${PN}-pulseaudio += "${PN}-pulse" RPROVIDES:${PN}-soup += "${PN}-souphttpsrc" +RDEPENDS:${PN}-soup += "${MLPREFIX}${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}" + +PACKAGECONFIG_SOUP ?= "soup3" PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ + ${PACKAGECONFIG_SOUP} \ ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \ - bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 \ + bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \ " X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" @@ -48,8 +51,9 @@ PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng" PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils" PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio" -PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}" -PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4" +PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QT5WAYLANDDEPENDS}" +PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,,,soup3" +PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,,,soup2" PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex" PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland" PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc new file mode 100644 index 0000000000..8b1c001111 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc @@ -0,0 +1,19 @@ +# This .inc file contains functionality for automatically setting +# the the license of all plugins according to the GSTREAMER_GPL. + +PACKAGESPLITFUNCS += "set_gstreamer_license" + +python set_gstreamer_license () { + import oe.utils + pn = d.getVar('PN') + '-' + gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()] + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in gpl_plugins_names: + d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later') + else: + d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later') +} + +EXTRA_OEMESON += " \ + ${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \ + " diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc index e906053ac0..d77aeed8a2 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc @@ -9,8 +9,8 @@ # Dynamically generate packages for all enabled plugins PACKAGES_DYNAMIC = "^${PN}-.* ^libgst.*" -PACKAGESPLITFUNCS:prepend = " split_gstreamer10_packages " -PACKAGESPLITFUNCS:append = " set_gstreamer10_metapkg_rdepends " +PACKAGESPLITFUNCS =+ "split_gstreamer10_packages" +PACKAGESPLITFUNCS += "set_gstreamer10_metapkg_rdepends" python split_gstreamer10_packages () { gst_libdir = d.expand('${libdir}/gstreamer-1.0') @@ -38,11 +38,11 @@ python set_gstreamer10_metapkg_rdepends () { metapkg = pn + '-meta' d.setVar('ALLOW_EMPTY:' + metapkg, "1") d.setVar('FILES:' + metapkg, "") - blacklist = [ pn, pn + '-meta' ] + exclude = [ pn, pn + '-meta' ] metapkg_rdepends = [] pkgdest = d.getVar('PKGDEST') for pkg in oe.utils.packages_filter_out_system(d): - if pkg not in blacklist and pkg not in metapkg_rdepends: + if pkg not in exclude and pkg not in metapkg_rdepends: # See if the package is empty by looking at the contents of its PKGDEST subdirectory. # If this subdirectory is empty, then the package is. # Empty packages do not get added to the meta package's RDEPENDS diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb index 9777aaee19..99f41d4f3d 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb @@ -1,19 +1,21 @@ require gstreamer1.0-plugins-common.inc +require gstreamer1.0-plugins-license.inc -DESCRIPTION = "'Ugly GStreamer plugins" +SUMMARY = "'Ugly GStreamer plugins" HOMEPAGE = "https://gstreamer.freedesktop.org/" BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues" LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" + " -LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" +LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" LICENSE_FLAGS = "commercial" SRC_URI = " \ https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ " -SRC_URI[sha256sum] = "df32803e98f8a9979373fa2ca7e05e62f977b1097576d3a80619d9f5c69f66d9" + +SRC_URI[sha256sum] = "7758b7decfd20c00cae5700822bcbbf03f98c723e33e17634db2e07ca1da60bf" S = "${WORKDIR}/gst-plugins-ugly-${PV}" @@ -23,17 +25,18 @@ GST_PLUGIN_SET_HAS_EXAMPLES = "0" PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ - a52dec mpeg2dec \ " -PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52" PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr" PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr" +PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52" PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio" PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread" PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec" PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264" +GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}" + EXTRA_OEMESON += " \ -Ddoc=disabled \ -Dsidplay=disabled \ diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb index 74dd15b3eb..0fbb03f757 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb @@ -4,11 +4,11 @@ provided by python-gi) " HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/" SECTION = "multimedia" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" -SRC_URI[sha256sum] = "533685871305959d6db89507f3b3aa6c765c2f2b0dacdc32c5a6543e72e5bc52" +SRC_URI[sha256sum] = "f7a5450d93fd81bf46060dca7f4a048d095b6717961fec211731a11a994c99a7" DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" @@ -17,10 +17,14 @@ PNREAL = "gst-python" S = "${WORKDIR}/${PNREAL}-${PV}" -EXTRA_OEMESON += "-Dlibpython-dir=${libdir}" +EXTRA_OEMESON += "\ + -Dtests=disabled \ + -Dplugin=enabled \ + -Dlibpython-dir=${libdir} \ +" -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" -UNKNOWN_CONFIGURE_WHITELIST:append = " introspection" +inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check + +FILES:${PN} += "${libdir}/gstreamer-1.0" -inherit meson pkgconfig distutils3-base upstream-version-is-even gobject-introspection features_check +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb index 50426ad46d..554ed9ec8f 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb @@ -1,8 +1,8 @@ SUMMARY = "A library on top of GStreamer for building an RTSP server" HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" SECTION = "multimedia" -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770" DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" @@ -10,7 +10,7 @@ PNREAL = "gst-rtsp-server" SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" -SRC_URI[sha256sum] = "04d63bf48816c6f41c73f6de0f912a7cef0aab39c44162a7bcece1923dfc9d1f" +SRC_URI[sha256sum] = "ec49d474750a6ff6729c85b448abc607fb6840b21717ad7abc967e2adbf07a24" S = "${WORKDIR}/${PNREAL}-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb index 9a68a3fadf..87eb8484a1 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb @@ -6,12 +6,12 @@ based plugins for GStreamer and helper libraries: `vaapidecode', \ REALPN = "gstreamer-vaapi" -LICENSE = "LGPLv2.1+" +LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "4a460fb95559f41444eb24864ad2d9e37922b6eea941510310319fc3e0ba727b" +SRC_URI[sha256sum] = "6eae1360658302b9b512fa46b4d06f5b818dfce5f2f43d7d710ca8142719d8ad" S = "${WORKDIR}/${REALPN}-${PV}" DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" @@ -40,12 +40,12 @@ PACKAGECONFIG ??= "drm encoders \ ${PACKAGECONFIG_GL} \ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" -PACKAGECONFIG[drm] = "-Dwith_drm=yes,-Dwith_drm=no,udev libdrm" -PACKAGECONFIG[egl] = "-Dwith_egl=yes,-Dwith_egl=no,virtual/egl" -PACKAGECONFIG[encoders] = "-Dwith_encoders=yes,-Dwith_encoders=no" -PACKAGECONFIG[glx] = "-Dwith_glx=yes,-Dwith_glx=no,virtual/libgl" -PACKAGECONFIG[wayland] = "-Dwith_wayland=yes,-Dwith_wayland=no,wayland-native wayland wayland-protocols" -PACKAGECONFIG[x11] = "-Dwith_x11=yes,-Dwith_x11=no,virtual/libx11 libxrandr libxrender" +PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm" +PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl" +PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled" +PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl" +PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols" +PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender" FILES:${PN} += "${libdir}/gstreamer-*/*.so" FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch deleted file mode 100644 index 23ebd5c600..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ /dev/null @@ -1,69 +0,0 @@ -From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma <quaresma.jose@gmail.com> -Date: Sat, 10 Oct 2020 19:09:03 +0000 -Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through - to system plugin scanner - -If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. - -Falling through to the one installed on the system is problamatic in cross-compilation -environemnts, regardless of whether one pointed to by the env var succeeded or failed. - -taken from: -http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669> - -Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - gst/gstpluginloader.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c -index d1e404d98..c626bf263 100644 ---- a/gst/gstpluginloader.c -+++ b/gst/gstpluginloader.c -@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - if (loader->child_running) - return TRUE; - -- /* Find the gst-plugin-scanner: first try the env-var if it is set, -- * otherwise use the installed version */ -+ /* Find the gst-plugin-scanner */ - env = g_getenv ("GST_PLUGIN_SCANNER_1_0"); - if (env == NULL) - env = g_getenv ("GST_PLUGIN_SCANNER"); - - if (env != NULL && *env != '\0') { -+ /* use the env-var if it is set */ - GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env); - helper_bin = g_strdup (env); - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -- } -- -- if (!res) { -+ } else { -+ /* use the installed version */ - GST_LOG ("Trying installed plugin scanner"); - - #ifdef G_OS_WIN32 -@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - #endif - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -+ } - -- if (!res) { -- GST_INFO ("No gst-plugin-scanner available, or not working"); -- } -+ if (!res) { -+ GST_INFO ("No gst-plugin-scanner available, or not working"); - } - - return loader->child_running; --- -2.29.2 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch index 6f571a12d8..0d839bd6c8 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch @@ -1,20 +1,21 @@ -From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d Mon Sep 17 00:00:00 2001 +From 5372cd5bf2a9dd247b9c5fc6e4fe248046dbb085 Mon Sep 17 00:00:00 2001 From: Jose Quaresma <quaresma.jose@gmail.com> Date: Sun, 11 Apr 2021 19:48:13 +0100 -Subject: [PATCH 1/4] tests: respect the idententaion used in meson +Subject: [PATCH] tests: respect the idententaion used in meson Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- tests/check/meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/check/meson.build b/tests/check/meson.build -index a617cf159..b2636714b 100644 +index 9787b0a..16caac7 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build -@@ -146,11 +146,11 @@ foreach t : core_tests +@@ -145,11 +145,11 @@ foreach t : core_tests if not skip_test exe = executable(test_name, fname, @@ -22,15 +23,12 @@ index a617cf159..b2636714b 100644 - cpp_args : gst_c_args + test_defines, - include_directories : [configinc], - link_with : link_with_libs, -- dependencies : test_deps + glib_deps + gst_deps, +- dependencies : gst_deps + test_deps, + c_args : gst_c_args + test_defines, + cpp_args : gst_c_args + test_defines, + include_directories : [configinc], + link_with : link_with_libs, -+ dependencies : test_deps + glib_deps + gst_deps, ++ dependencies : gst_deps + test_deps, ) env = environment() --- -2.31.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch deleted file mode 100644 index 5121044734..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch +++ /dev/null @@ -1,112 +0,0 @@ -From e275ba2bd854ac15a4b65a8f07d9f042021950da Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Fri, 14 Aug 2020 16:38:26 +0100 -Subject: [PATCH 2/3] Remove unused valgrind detection - -Having this just to log a debug message in case we're -running inside valgrind doesn't seem very useful, and -the code that used to use this no longer exists it seems. - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595> - -Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - gst/gst_private.h | 2 -- - gst/gstinfo.c | 39 --------------------------------------- - meson.build | 1 - - 3 files changed, 42 deletions(-) - -diff --git a/gst/gst_private.h b/gst/gst_private.h -index eefd044..8252ede 100644 ---- a/gst/gst_private.h -+++ b/gst/gst_private.h -@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin - - G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin); - --G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void); -- - /* init functions called from gst_init(). */ - G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void); - G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void); -diff --git a/gst/gstinfo.c b/gst/gstinfo.c -index eea1a21..d3035d6 100644 ---- a/gst/gstinfo.c -+++ b/gst/gstinfo.c -@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; - static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; - static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON; - --/* FIXME: export this? */ --gboolean --_priv_gst_in_valgrind (void) --{ -- static enum -- { -- GST_VG_UNCHECKED, -- GST_VG_NO_VALGRIND, -- GST_VG_INSIDE -- } -- in_valgrind = GST_VG_UNCHECKED; -- -- if (in_valgrind == GST_VG_UNCHECKED) { --#ifdef HAVE_VALGRIND_VALGRIND_H -- if (RUNNING_ON_VALGRIND) { -- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind"); -- in_valgrind = GST_VG_INSIDE; -- } else { -- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff"); -- in_valgrind = GST_VG_NO_VALGRIND; -- } --#else -- in_valgrind = GST_VG_NO_VALGRIND; --#endif -- g_assert (in_valgrind == GST_VG_NO_VALGRIND || -- in_valgrind == GST_VG_INSIDE); -- } -- return (in_valgrind == GST_VG_INSIDE); --} -- - static gchar * - _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token, - guint val) -@@ -463,9 +433,6 @@ _priv_gst_debug_init (void) - _priv_GST_CAT_PROTECTION = - _gst_debug_category_new ("GST_PROTECTION", 0, "protection"); - -- /* print out the valgrind message if we're in valgrind */ -- _priv_gst_in_valgrind (); -- - env = g_getenv ("GST_DEBUG_OPTIONS"); - if (env != NULL) { - if (strstr (env, "full_tags") || strstr (env, "full-tags")) -@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo) - return 0; - } - --gboolean --_priv_gst_in_valgrind (void) --{ -- return FALSE; --} -- - void - _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file, - const gchar * func, gint line, GObject * obj, const gchar * msg, -diff --git a/meson.build b/meson.build -index 82a1728..42ae617 100644 ---- a/meson.build -+++ b/meson.build -@@ -200,7 +200,6 @@ check_headers = [ - 'sys/wait.h', - 'ucontext.h', - 'unistd.h', -- 'valgrind/valgrind.h', - 'sys/resource.h', - 'sys/uio.h', - ] --- -2.29.2 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch index b77fb5797f..64717e66c3 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch @@ -1,7 +1,7 @@ -From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 Mon Sep 17 00:00:00 2001 +From 27e977d03b0f7c1d0bf19621ef0cec0585410e7b Mon Sep 17 00:00:00 2001 From: Jose Quaresma <quaresma.jose@gmail.com> Date: Sun, 11 Apr 2021 19:48:13 +0100 -Subject: [PATCH 2/4] tests: add support for install the tests +Subject: [PATCH] tests: add support for install the tests This will provide to run the tests using the gnome-desktop-testing [1] @@ -10,53 +10,44 @@ This will provide to run the tests using the gnome-desktop-testing [1] Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- - meson.build | 5 +++++ - meson_options.txt | 1 + - template.test.in | 3 +++ - tests/check/meson.build | 22 +++++++++++++++++++++- - 4 files changed, 30 insertions(+), 1 deletion(-) - create mode 100644 template.test.in + meson.build | 4 ++++ + meson_options.txt | 1 + + tests/check/meson.build | 22 +++++++++++++++++++++- + tests/check/template.test.in | 3 +++ + 4 files changed, 29 insertions(+), 1 deletion(-) + create mode 100644 tests/check/template.test.in diff --git a/meson.build b/meson.build -index c4e8774f5..1abf4eb26 100644 +index 60c7bec..f7650b1 100644 --- a/meson.build +++ b/meson.build -@@ -562,6 +562,11 @@ if bashcomp_dep.found() +@@ -606,6 +606,10 @@ if bashcomp_dep.found() endif endif ++installed_tests_enabled = get_option('installed_tests') +installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name()) +installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name()) -+installed_tests_enabled = get_option('installed-tests') -+installed_tests_template = files('template.test.in') + plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') pkgconfig = import('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt -index c8cee3762..b5da40eaa 100644 +index 7363bdb..a34ba37 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso option('memory-alignment', type: 'combo', choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], value: 'malloc') -+option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests') ++option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests') # Feature options option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') -diff --git a/template.test.in b/template.test.in -new file mode 100644 -index 000000000..f701627f8 ---- /dev/null -+++ b/template.test.in -@@ -0,0 +1,3 @@ -+[Test] -+Type=session -+Exec=@installed_tests_dir@/@program@ diff --git a/tests/check/meson.build b/tests/check/meson.build -index b2636714b..a697a7b06 100644 +index 16caac7..f2d400f 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build @@ -124,10 +124,16 @@ test_defines = [ @@ -77,16 +68,16 @@ index b2636714b..a697a7b06 100644 # sanity checking if get_option('check').disabled() if get_option('tests').enabled() -@@ -151,6 +157,8 @@ foreach t : core_tests +@@ -150,6 +156,8 @@ foreach t : core_tests include_directories : [configinc], link_with : link_with_libs, - dependencies : test_deps + glib_deps + gst_deps, + dependencies : gst_deps + test_deps, + install_dir: installed_tests_execdir, + install: installed_tests_enabled, ) env = environment() -@@ -162,6 +170,18 @@ foreach t : core_tests +@@ -161,6 +169,18 @@ foreach t : core_tests env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') @@ -95,7 +86,7 @@ index b2636714b..a697a7b06 100644 + test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) + test_conf.set('program', test_name) + configure_file( -+ input: installed_tests_template, ++ input: 'template.test.in', + output: test_name + '.test', + install_dir: installed_tests_metadir, + configuration: test_conf @@ -105,6 +96,12 @@ index b2636714b..a697a7b06 100644 test(test_name, exe, env: env, timeout : 3 * 60) endif endforeach --- -2.31.1 - +diff --git a/tests/check/template.test.in b/tests/check/template.test.in +new file mode 100644 +index 0000000..f701627 +--- /dev/null ++++ b/tests/check/template.test.in +@@ -0,0 +1,3 @@ ++[Test] ++Type=session ++Exec=@installed_tests_dir@/@program@ diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch deleted file mode 100644 index e0e64e2c7a..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001 -From: Seungha Yang <seungha@centricular.com> -Date: Tue, 15 Sep 2020 00:54:58 +0900 -Subject: [PATCH] tests: seek: Don't use too strict timeout for validation - -Expected segment-done message might not be seen within expected -time if system is not powerful enough. - -Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625> - -Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c] -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - tests/check/pipelines/seek.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c -index 28bb8846d..5f7447bc5 100644 ---- a/tests/check/pipelines/seek.c -+++ b/tests/check/pipelines/seek.c -@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2) - - GST_INFO ("wait for segment done message"); - -- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND, -+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, - GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR); - fail_unless (msg, "no message within the timed window"); - fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done"); --- -2.29.2 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch index 46813cec3d..0fd830f150 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch @@ -1,7 +1,7 @@ -From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001 +From 7041bc5adf9501beb1428d8bbae6b351a6bf07f9 Mon Sep 17 00:00:00 2001 From: Jose Quaresma <quaresma.jose@gmail.com> Date: Sat, 24 Apr 2021 10:34:47 +0100 -Subject: [PATCH 3/4] tests: use a dictionaries for environment +Subject: [PATCH] tests: use a dictionaries for environment meson environment() can't be passed to configure_file and it is needed for installed_tests, use a dictionary as this is simplest solution to install the environment. @@ -9,30 +9,33 @@ use a dictionary as this is simplest solution to install the environment. Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- - tests/check/meson.build | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) + tests/check/meson.build | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/check/meson.build b/tests/check/meson.build -index a697a7b06..f64524904 100644 +index f2d400f..50dff7f 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build -@@ -161,14 +161,17 @@ foreach t : core_tests +@@ -160,14 +160,19 @@ foreach t : core_tests install: installed_tests_enabled, ) - env = environment() -- env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) +- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root()) - env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') - env.set('GST_STATE_IGNORE_ELEMENTS', '') - env.set('CK_DEFAULT_TIMEOUT', '20') - env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) - env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') - env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') -+ # environment() can't be passed to configure_file and it is needed for installed_tests -+ # use a dictionary as this is simplest solution to install the environment ++ # meson environment object can't be passed to configure_file and ++ # installed tests uses configure_file to install the environment. ++ # use a dictionary as this is the simplest solution ++ # to install the environment. + env = { -+ 'GST_PLUGIN_PATH_1_0': meson.build_root(), ++ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(), + 'GST_PLUGIN_SYSTEM_PATH_1_0': '', + 'GST_STATE_IGNORE_ELEMENTS': '', + 'CK_DEFAULT_TIMEOUT': '20', @@ -43,6 +46,3 @@ index a697a7b06..f64524904 100644 if installed_tests_enabled test_conf = configuration_data() --- -2.31.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch new file mode 100644 index 0000000000..5689dc9fbb --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch @@ -0,0 +1,72 @@ +From 1b1d1ce4227b6bea7c7def5dac4a663486e070c2 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sun, 2 May 2021 01:58:01 +0100 +Subject: [PATCH] tests: add helper script to run the installed_tests + +- this is a bash script that will run the installed_tests +with some of the environment variables used in the meson +testing framework. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + +--- + tests/check/meson.build | 17 +++++++++++++++++ + tests/check/template.sh.in | 9 +++++++++ + tests/check/template.test.in | 2 +- + 3 files changed, 27 insertions(+), 1 deletion(-) + create mode 100755 tests/check/template.sh.in + +diff --git a/tests/check/meson.build b/tests/check/meson.build +index 50dff7f..2b9e979 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -184,6 +184,23 @@ foreach t : core_tests + install_dir: installed_tests_metadir, + configuration: test_conf + ) ++ ++ # All the tests will be deployed on the target machine and ++ # we use the home folder ~ for the registry which will then expand at runtime. ++ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly ++ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry ++ # that is useful for debug propose of the tests itself. ++ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} ++ ++ # Set the full path for the test it self. ++ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)} ++ ++ configure_file( ++ input : 'template.sh.in', ++ output: test_name + '.sh', ++ install_dir: installed_tests_execdir, ++ configuration : env, ++ ) + endif + + test(test_name, exe, env: env, timeout : 3 * 60) +diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in +new file mode 100755 +index 0000000..cf7d31b +--- /dev/null ++++ b/tests/check/template.sh.in +@@ -0,0 +1,9 @@ ++#!/bin/sh ++ ++set -ax ++ ++CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@" ++GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" ++GST_REGISTRY=@GST_REGISTRY@ ++GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" ++exec @TEST@ +diff --git a/tests/check/template.test.in b/tests/check/template.test.in +index f701627..b74ef6a 100644 +--- a/tests/check/template.test.in ++++ b/tests/check/template.test.in +@@ -1,3 +1,3 @@ + [Test] + Type=session +-Exec=@installed_tests_dir@/@program@ ++Exec=@installed_tests_dir@/@program@.sh diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch deleted file mode 100644 index eabe7bcbe1..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 57d2965e979f886e03eecd7e351bf01812053971 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma <quaresma.jose@gmail.com> -Date: Sun, 2 May 2021 01:58:01 +0100 -Subject: [PATCH 4/4] tests: install the environment for installed_tests - -- adapt the test environment for installed_tests -- install the test environment for installed_tests -- run the tests using the installed environment - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - template.test.in | 2 +- - tests/check/meson.build | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/template.test.in b/template.test.in -index f701627f8..9a3fbdd09 100644 ---- a/template.test.in -+++ b/template.test.in -@@ -1,3 +1,3 @@ - [Test] - Type=session --Exec=@installed_tests_dir@/@program@ -+Exec=sh -c 'set -aex && source @installed_tests_dir@/@program@.env && exec @installed_tests_dir@/@program@' -diff --git a/tests/check/meson.build b/tests/check/meson.build -index f64524904..a67e0f8dd 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -183,6 +183,24 @@ foreach t : core_tests - install_dir: installed_tests_metadir, - configuration: test_conf - ) -+ -+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} -+ configure_file( -+ output: test_name + '.env', -+ install_dir: installed_tests_execdir, -+ configuration : env, -+ ) -+ # helper to convert a meson environment dictionay object exported with configure_file -+ # this also remove not needed variables for the installed tests -+ meson.add_postconf_script('sed', '-i', -+ '-e', '/^#define/!d', -+ '-e', 's/^#define //g', -+ '-e', '/^GST_PLUGIN_PATH_1_0/d', -+ '-e', '/^GST_PLUGIN_SYSTEM_PATH_1_0/d', -+ '-e', '/^GST_PLUGIN_SCANNER_1_0/d', -+ '-e', 's/ /=/', -+ join_paths(meson.current_build_dir(), test_name + '.env') -+ ) - endif - - test(test_name, exe, env: env, timeout : 3 * 60) --- -2.31.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest index 0cfa955f03..7d0312005f 100755 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest @@ -1,2 +1,16 @@ -#!/usr/bin/env sh +#! /bin/sh + +# Multiply all timeouts by ten so they're more likely to work +# on a loaded system. +export CK_TIMEOUT_MULTIPLIER=5 + +# Skip some tests that we know are problematic +export GST_CHECKS_IGNORE="" +# gstnetclientclock.c:test_functioning is very sensitive to load +GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_functioning" + +# aggregator.c:test_infinite_seek_50_src_live is known to be flaky +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/410 +GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_infinite_seek_50_src_live" + gnome-desktop-testing-runner gstreamer diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb index 0d82dd338c..8965497d01 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb @@ -4,28 +4,25 @@ It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime. HOMEPAGE = "http://gstreamer.freedesktop.org/" BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" SECTION = "multimedia" -LICENSE = "LGPLv2+" +LICENSE = "LGPL-2.1-or-later" DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native" inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ +LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" S = "${WORKDIR}/gstreamer-${PV}" SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ file://run-ptest \ - file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ - file://0002-Remove-unused-valgrind-detection.patch \ - file://0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \ - file://0004-tests-respect-the-idententaion-used-in-meson.patch \ - file://0005-tests-add-support-for-install-the-tests.patch \ - file://0006-tests-use-a-dictionaries-for-environment.patch \ - file://0007-tests-install-the-environment-for-installed_tests.patch \ + file://0001-tests-respect-the-idententaion-used-in-meson.patch \ + file://0002-tests-add-support-for-install-the-tests.patch \ + file://0003-tests-use-a-dictionaries-for-environment.patch \ + file://0004-tests-add-helper-script-to-run-the-installed_tests.patch \ " -SRC_URI[sha256sum] = "55862232a63459bbf56abebde3085ca9aec211b478e891dacea4d6df8cafe80a" +SRC_URI[sha256sum] = "3d16259e9dab8b002c57ce208a09b350d8282f5b0197306c0cdba9a0d0799744" PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ check \ @@ -36,7 +33,7 @@ PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled" PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" -PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" +PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled_tests=true,-Dtests=disabled -Dinstalled_tests=false" PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" @@ -70,6 +67,8 @@ FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-5" + CVE_PRODUCT = "gstreamer" PTEST_BUILD_HOST_FILES = "" diff --git a/meta/recipes-multimedia/lame/lame_3.100.bb b/meta/recipes-multimedia/lame/lame_3.100.bb index 4927c9f2b3..5b42795f4e 100644 --- a/meta/recipes-multimedia/lame/lame_3.100.bb +++ b/meta/recipes-multimedia/lame/lame_3.100.bb @@ -3,7 +3,7 @@ DESCRIPTION = "LAME is an educational tool to be used for learning about MP3 enc HOMEPAGE = "https://lame.sourceforge.io/" BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290" SECTION = "console/utils" -LICENSE = "LGPLv2+" +LICENSE = "LGPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \ file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \ " diff --git a/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch b/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch deleted file mode 100644 index 5168100f3a..0000000000 --- a/meta/recipes-multimedia/liba52/liba52/buildcleanup.patch +++ /dev/null @@ -1,89 +0,0 @@ -It makes much more sense to control our own CFLAGS and avoiding fPIC breaks -some arches too. Assume we know what we're doing and remove all the messing -around. - -RP 23/2/10 - -Upstream-Status: Inappropriate [configuration] - -Index: a52dec-0.7.4/configure.in -=================================================================== ---- a52dec-0.7.4.orig/configure.in 2010-02-23 14:51:50.000000000 +0000 -+++ a52dec-0.7.4/configure.in 2010-02-23 14:52:36.000000000 +0000 -@@ -14,62 +14,6 @@ - AC_PROG_CC - AC_PROG_GCC_TRADITIONAL - --if test x"$GCC" = x"yes"; then -- -- dnl GCC-specific flags - try to optimize them sometime -- dnl -Wall -Werror moved to the end to not disturb the configure script -- -- dnl -O3 -- changequote(<<,>>) -- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"` -- changequote([,]) -- OPT_CFLAGS="$OPT_CFLAGS -O3" -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]) -- -- dnl -fomit-frame-pointer -- OPT_CFLAGS="$CFLAGS -fomit-frame-pointer" -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]) -- -- dnl arch-specific flags -- case "$host" in -- i?86-* | k?-*) -- case "$host" in -- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";; -- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";; -- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";; -- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";; -- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";; -- esac -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; -- sparc-* | sparc64-*) -- OPT_CFLAGS="$CFLAGS -mtune=ultrasparc" -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; -- mips-sgi-irix6.*) dnl do we need to be that specific ? -- OPT_CFLAGS="$CFLAGS -mabi=64" -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; -- esac --elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then -- dnl TenDRA portability checking compiler -- TENDRA=yes -- CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE" -- enable_mlib=no -- enable_oss=no -- enable_solaris_audio=no --elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then -- dnl Intel C++ compiler -- CFLAGS="-g -O3 -unroll -ip" --else -- dnl non-gcc flags - we probably need exact configuration triplets here. -- case "$host" in -- mips-sgi-irix6.*) -- OPT_CFLAGS="$CFLAGS -64" -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; -- sparc-sun-solaris*) -- OPT_CFLAGS="$CFLAGS -xCC -fast -xO5" -- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; -- esac --fi -- - dnl Checks for libtool - this must be done after we set cflags - AC_DISABLE_SHARED - AC_LIBTOOL_WIN32_DLL -Index: a52dec-0.7.4/liba52/configure.incl -=================================================================== ---- a52dec-0.7.4.orig/liba52/configure.incl 2010-02-23 14:51:44.000000000 +0000 -+++ a52dec-0.7.4/liba52/configure.incl 2010-02-23 14:51:59.000000000 +0000 -@@ -1,9 +1,6 @@ - AC_SUBST([LIBA52_CFLAGS]) - AC_SUBST([LIBA52_LIBS]) - --dnl avoid -fPIC when possible --LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic" -- - AC_ARG_ENABLE([double], - [ --enable-double use double-precision samples]) - if test x"$enable_double" = x"yes"; then diff --git a/meta/recipes-multimedia/liba52/liba52_0.7.4.bb b/meta/recipes-multimedia/liba52/liba52_0.7.4.bb deleted file mode 100644 index ea16270cf8..0000000000 --- a/meta/recipes-multimedia/liba52/liba52_0.7.4.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "ATSC A/52 surround sound stream decoder" -DESCRIPTION = "Library for decoding ATSC A/52 streams. The A/52 standard \ -is used in a variety of applications, including digital television \ -and DVD. It is also known as AC-3." -HOMEPAGE = "http://liba52.sourceforge.net/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://include/a52.h;beginline=1;endline=12;md5=81152ceb3562bf20a60d1b6018175dd1" -SECTION = "libs" -PR = "r4" - -inherit autotools - -SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \ - file://buildcleanup.patch" - -SRC_URI[md5sum] = "caa9f5bc44232dc8aeea773fea56be80" -SRC_URI[sha256sum] = "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33" - -UPSTREAM_CHECK_URI = "http://liba52.sourceforge.net/downloads.html" - -S = "${WORKDIR}/a52dec-${PV}" - -EXTRA_OECONF = " --enable-shared " - -PACKAGES =+ "a52dec a52dec-doc" - -FILES:a52dec = " ${bindir}/* " -FILES:a52dec-doc = " ${mandir}/man1/* " diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch b/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch deleted file mode 100644 index 54f49f6f23..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag/0001-Fix-gperf-3.1-incompatibility.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 91fcf66b9182c75cd2b96d88991d5a1c6307d4b4 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 2 Aug 2017 16:27:52 +0300 -Subject: [PATCH] Fix gperf 3.1 incompatibility. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - compat.h | 2 +- - frametype.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/compat.h b/compat.h -index 8af71ec..b3d80d9 100644 ---- a/compat.h -+++ b/compat.h -@@ -34,7 +34,7 @@ struct id3_compat { - }; - - struct id3_compat const *id3_compat_lookup(register char const *, -- register unsigned int); -+ register size_t); - - int id3_compat_fixup(struct id3_tag *); - -diff --git a/frametype.h b/frametype.h -index dd064b2..b5b7593 100644 ---- a/frametype.h -+++ b/frametype.h -@@ -37,6 +37,6 @@ extern struct id3_frametype const id3_frametype_unknown; - extern struct id3_frametype const id3_frametype_obsolete; - - struct id3_frametype const *id3_frametype_lookup(register char const *, -- register unsigned int); -+ register size_t); - - # endif --- -2.13.2 - diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch b/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch deleted file mode 100644 index 10e089018c..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch +++ /dev/null @@ -1,34 +0,0 @@ -libid3tag: patch for CVE-2004-2779 - -The patch comes from -https://sources.debian.org/patches/libid3tag/0.15.1b-13/10_utf16.dpatch - -Upstream-Status: Pending - -CVE: CVE-2004-2779 -CVE: CVE-2017-11551 - -Signed-off-by: Changqing Li <changqing.li@windriver.com> - -diff -urNad libid3tag-0.15.1b/utf16.c /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c ---- libid3tag-0.15.1b/utf16.c 2006-01-13 15:26:29.000000000 +0100 -+++ /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c 2006-01-13 15:27:19.000000000 +0100 -@@ -282,5 +282,18 @@ - - free(utf16); - -+ if (end == *ptr && length % 2 != 0) -+ { -+ /* We were called with a bogus length. It should always -+ * be an even number. We can deal with this in a few ways: -+ * - Always give an error. -+ * - Try and parse as much as we can and -+ * - return an error if we're called again when we -+ * already tried to parse everything we can. -+ * - tell that we parsed it, which is what we do here. -+ */ -+ (*ptr)++; -+ } -+ - return ucs4; - } diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch b/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch deleted file mode 100644 index 38d40c3632..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch +++ /dev/null @@ -1,43 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Index: libid3tag-0.15.1b/Makefile.am -=================================================================== ---- libid3tag-0.15.1b.orig/Makefile.am 2009-07-29 09:29:20.000000000 +0100 -+++ libid3tag-0.15.1b/Makefile.am 2009-07-29 09:29:47.000000000 +0100 -@@ -27,6 +27,9 @@ - lib_LTLIBRARIES = libid3tag.la - include_HEADERS = id3tag.h - -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = id3tag.pc -+ - ## From the libtool documentation on library versioning: - ## - ## CURRENT -Index: libid3tag-0.15.1b/configure.ac -=================================================================== ---- libid3tag-0.15.1b.orig/configure.ac 2009-07-29 09:27:15.000000000 +0100 -+++ libid3tag-0.15.1b/configure.ac 2009-07-29 09:27:45.000000000 +0100 -@@ -201,5 +201,5 @@ - dnl AC_SUBST(LTLIBOBJS) - - AC_CONFIG_FILES([Makefile msvc++/Makefile \ -- libid3tag.list]) -+ libid3tag.list id3tag.pc]) - AC_OUTPUT -Index: libid3tag-0.15.1b/id3tag.pc.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ libid3tag-0.15.1b/id3tag.pc.in 2009-07-29 09:29:10.000000000 +0100 -@@ -0,0 +1,11 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+Name: id3tag -+Description: ID3 tag reading library -+Requires: -+Version: @VERSION@ -+Libs: -L${libdir} -lid3tag -lz -+Cflags: -I${includedir} diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/cflags_filter.patch b/meta/recipes-multimedia/libid3tag/libid3tag/cflags_filter.patch deleted file mode 100644 index 1895748d1d..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag/cflags_filter.patch +++ /dev/null @@ -1,19 +0,0 @@ -configure contains CFLAGS filtering code which was removing our prefix-map -flags. We need those to generate reproducible binaries. Allow them through. - -Upstream-Status: Pending -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> - ---- a/configure.ac -+++ b/configure.ac -@@ -99,6 +99,10 @@ do - -mno-cygwin) - shift - ;; -+ -fmacro-prefix-map*|-fdebug-prefix-map*|-ffile-prefix-map*) -+ CFLAGS="$CFLAGS $1" -+ shift -+ ;; - -m*) - arch="$arch $1" - shift diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch b/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch deleted file mode 100644 index 2845fb1d3a..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Submitted [https://sourceforge.net/tracker/?func=detail&aid=3599280&group_id=12349&atid=112349] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -diff -Nurd libid3tag-0.15.1b/configure.ac libid3tag-0.15.1b/configure.ac ---- libid3tag-0.15.1b/configure.ac 2004-01-24 01:22:46.000000000 +0200 -+++ libid3tag-0.15.1b/configure.ac 2013-01-03 06:41:02.734835014 +0200 -@@ -28,7 +28,7 @@ - --AM_INIT_AUTOMAKE -+AM_INIT_AUTOMAKE([foreign]) - --AM_CONFIG_HEADER([config.h]) -+AC_CONFIG_HEADERS([config.h]) - - dnl System type. diff --git a/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch deleted file mode 100644 index f0867b5f01..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch +++ /dev/null @@ -1,39 +0,0 @@ -In case of an unknown/invalid encoding, id3_parse_string() will -return NULL, but the return value wasn't checked resulting -in segfault in id3_ucs4_length(). This is the only place -the return value wasn't checked. - -Patch taken from Debian: -https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/ - -CVE: CVE-2017-11550 -Upstream-Status: Pending -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf ---- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000 -+++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000 -@@ -236,6 +236,10 @@ - - encoding = id3_parse_uint(&data, 1); - string = id3_parse_string(&data, end - data, encoding, 0); -+ if (!string) -+ { -+ continue; -+ } - - if (id3_ucs4_length(string) < 4) { - free(string); -diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c ---- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000 -+++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000 -@@ -165,6 +165,9 @@ - case ID3_FIELD_TEXTENCODING_UTF_8: - ucs4 = id3_utf8_deserialize(ptr, length); - break; -+ default: -+ /* FIXME: Unknown encoding! Print warning? */ -+ return NULL; - } - - if (ucs4 && !full) { diff --git a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb deleted file mode 100644 index 80581765ac..0000000000 --- a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Library for interacting with ID3 tags in MP3 files" -HOMEPAGE = "http://sourceforge.net/projects/mad/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYRIGHT;md5=5e6279efb87c26c6e5e7a68317a6a87a \ - file://version.h;beginline=1;endline=8;md5=86ac68b67f054b7afde9e149bbc3fe63" -SECTION = "libs" -DEPENDS = "zlib gperf-native" -PR = "r7" - -SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \ - file://addpkgconfig.patch \ - file://obsolete_automake_macros.patch \ - file://0001-Fix-gperf-3.1-incompatibility.patch \ - file://10_utf16.patch \ - file://unknown-encoding.patch \ - file://cflags_filter.patch \ - " -UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/" -UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$" - -SRC_URI[md5sum] = "e5808ad997ba32c498803822078748c3" -SRC_URI[sha256sum] = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151" - -S = "${WORKDIR}/libid3tag-${PV}" - -inherit autotools pkgconfig diff --git a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb index 864d6bbeea..4564d619ae 100644 --- a/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb +++ b/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb @@ -3,7 +3,7 @@ DESCRIPTION = "Bellagio is an opensource implementation of the Khronos OpenMAX \ Integration Layer API to access multimedia components." HOMEPAGE = "http://omxil.sourceforge.net/" -LICENSE = "LGPLv2.1+" +LICENSE = "LGPL-2.1-or-later" LICENSE_FLAGS = "${@bb.utils.contains('PACKAGECONFIG', 'amr', 'commercial', '', d)}" LIC_FILES_CHKSUM = "file://COPYING;md5=ae6f0f4dbc7ac193b50f323a6ae191cb \ file://src/omxcore.h;beginline=1;endline=27;md5=806b1e5566c06486fe8e42b461e03a90" diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.37.bb b/meta/recipes-multimedia/libpng/libpng_1.6.43.bb index 7791b0eecf..f1febd0a02 100644 --- a/meta/recipes-multimedia/libpng/libpng_1.6.37.bb +++ b/meta/recipes-multimedia/libpng/libpng_1.6.43.bb @@ -5,16 +5,15 @@ library for use in applications that read, create, and manipulate PNG \ HOMEPAGE = "http://www.libpng.org/" SECTION = "libs" LICENSE = "Libpng" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b0085051bf265bac2bfc38bc89f50000" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0fdbfbe10fc294a6fca24dc76134222a" DEPENDS = "zlib" LIBV = "16" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz" -SRC_URI[md5sum] = "015e8e15db1eecde5f2eb9eb5b6e59e9" -SRC_URI[sha256sum] = "505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca" +SRC_URI[sha256sum] = "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c" -MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/" +MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/" UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" @@ -23,13 +22,12 @@ BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" inherit autotools binconfig-disabled pkgconfig # Work around missing symbols -EXTRA_OECONF:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" +ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" +ARMNEON:aarch64 = "--enable-hardware-optimizations=on" +EXTRA_OECONF += "${ARMNEON}" PACKAGES =+ "${PN}-tools" FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" BBCLASSEXTEND = "native nativesdk" - -# CVE-2019-17371 is actually a memory leak in gif2png 2.x -CVE_CHECK_WHITELIST += "CVE-2019-17371" diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch b/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch deleted file mode 100644 index d19b514e6b..0000000000 --- a/meta/recipes-multimedia/libsamplerate/libsamplerate0/0001-configure.ac-improve-alsa-handling.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 957ebce3837588f71016e37ffaf9aad0a9d41cec Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen <tanuk@iki.fi> -Date: Fri, 23 Sep 2016 12:02:06 +0300 -Subject: [PATCH] configure.ac: improve alsa handling - -Three improvements: - -1) "--enable-alsa" or "--disable-alsa" caused a warning about an -unsupported configure option, because AC_ARG_ENABLE was not used. - -2) If alsa was disabled, the "Have ALSA" item in the summary would print -an empty string instead of "no". - -3) If "--enable-alsa" was passed to configure, but the headers were not -found, configure would still succeed (with alsa disabled). It's better -to fail and abort configure if a feature that was explicitly requested -can't be enabled. - -Upstream-Status: Submitted [sent to src@mega-nerd.com] - -Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> ---- - configure.ac | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 474c6ab..bad597e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -101,6 +101,9 @@ AC_ARG_ENABLE(cpu-clip, - AC_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]), - ac_arg_cpu_clip="N", ac_arg_cpu_clip="Y") - -+AC_ARG_ENABLE(alsa, -+ AC_HELP_STRING([--disable-alsa], [disable ALSA support in the varispeed-play example program])) -+ - #==================================================================================== - # Check types and their sizes. - -@@ -194,6 +197,10 @@ if test x$enable_alsa != xno ; then - if test x$ac_cv_header_alsa_asoundlib_h = xyes ; then - ALSA_LIBS="-lasound" - enable_alsa=yes -+ elif test x$enable_alsa = xyes ; then -+ AC_MSG_ERROR(["ALSA headers not found"]) -+ else -+ enable_alsa=no - fi - fi - -@@ -340,7 +347,7 @@ AC_MSG_RESULT([ - Have FFTW : ................... ${ac_cv_fftw3}]) - - AC_MSG_RESULT([ Have libsndfile : ............. ${ac_cv_sndfile}]) --AC_MSG_RESULT([ Have ALSA : ................... ${ac_cv_header_alsa_asoundlib_h} -+AC_MSG_RESULT([ Have ALSA : ................... ${enable_alsa} - ]) - - AC_MSG_RESULT([ Installation directories : --- -2.9.3 - diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch b/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch deleted file mode 100644 index b42d564b4b..0000000000 --- a/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libsamplerate-0.1.8/configure.ac -=================================================================== ---- libsamplerate-0.1.8.orig/configure.ac -+++ libsamplerate-0.1.8/configure.ac -@@ -53,7 +53,7 @@ AC_PROG_LN_S - # 6. If any interfaces have been removed since the last public release, then set age - # to 0. - --SHARED_VERSION_INFO="1:8:1" -+SHARED_VERSION_INFO="1:9:1" - - - diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb index 8345d6880f..29d48fd333 100644 --- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb +++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb @@ -1,28 +1,24 @@ SUMMARY = "Audio Sample Rate Conversion library" DESCRIPTION = "Also known as Secret Rabbit Code - a library for performing sample rate conversion of audio data." -HOMEPAGE = "http://www.mega-nerd.com/SRC/" +HOMEPAGE = "https://libsndfile.github.io/libsamplerate/" SECTION = "libs" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \ - file://src/samplerate.c;beginline=1;endline=7;md5=5b6982a8c2811c7312c13cccbf55f55e" + file://src/samplerate.c;beginline=1;endline=7;md5=7a4238289dc36bfb70968ccaa5bd0d4f" DEPENDS = "libsndfile1" -PR = "r1" -SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz \ - file://0001-configure.ac-improve-alsa-handling.patch \ - file://shared_version_info.patch \ +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsamplerate-${PV}.tar.xz \ " -SRC_URI[md5sum] = "2b78ae9fe63b36b9fbb6267fad93f259" -SRC_URI[sha256sum] = "0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1" +SRC_URI[sha256sum] = "3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893" CVE_PRODUCT = "libsamplerate" -UPSTREAM_CHECK_URI = "http://www.mega-nerd.com/SRC/download.html" +GITHUB_BASE_URI = "https://github.com/libsndfile/libsamplerate/releases" S = "${WORKDIR}/libsamplerate-${PV}" -inherit autotools pkgconfig +inherit autotools pkgconfig github-releases # FFTW and ALSA are only used in tests and examples, so they don't affect # normal builds. It should be safe to ignore these, but explicitly disabling diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch deleted file mode 100644 index a4679cef2a..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch +++ /dev/null @@ -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 <ross.burton@intel.com> - -From 39453899fe1bb39b2e041fdf51a85aecd177e9c7 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -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 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch deleted file mode 100644 index 491dae3114..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-12562.patch +++ /dev/null @@ -1,96 +0,0 @@ -Heap-based Buffer Overflow in the psf_binheader_writef function in common.c in -libsndfile through 1.0.28 allows remote attackers to cause a denial of service -(application crash) or possibly have unspecified other impact. - -CVE: CVE-2017-12562 -Upstream-Status: Backport [cf7a8182c2642c50f1cf90dddea9ce96a8bad2e8] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From b6a9d7e95888ffa77d8c75ce3f03e6c7165587cd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= <osmanx@problemloesungsmaschine.de> -Date: Wed, 14 Jun 2017 12:25:40 +0200 -Subject: [PATCH] src/common.c: Fix heap buffer overflows when writing strings - in binheader - -Fixes the following problems: - 1. Case 's' only enlarges the buffer by 16 bytes instead of size bytes. - 2. psf_binheader_writef() enlarges the header buffer (if needed) prior to the - big switch statement by an amount (16 bytes) which is enough for all cases - where only a single value gets added. Cases 's', 'S', 'p' however - additionally write an arbitrary length block of data and again enlarge the - buffer to the required amount. However, the required space calculation does - not take into account the size of the length field which gets output before - the data. - 3. Buffer size requirement calculation in case 'S' does not account for the - padding byte ("size += (size & 1) ;" happens after the calculation which - uses "size"). - 4. Case 'S' can overrun the header buffer by 1 byte when no padding is - involved - ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;" while - the buffer is only guaranteed to have "size" space available). - 5. "psf->header.ptr [psf->header.indx] = 0 ;" in case 'S' always writes 1 byte - beyond the space which is guaranteed to be allocated in the header buffer. - 6. Case 's' can overrun the provided source string by 1 byte if padding is - involved ("memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;" - where "size" is "strlen (strptr) + 1" (which includes the 0 terminator, - plus optionally another 1 which is padding and not guaranteed to be - readable via the source string pointer). - -Closes: https://github.com/erikd/libsndfile/issues/292 ---- - src/common.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/src/common.c b/src/common.c -index 1a6204ca..6b2a2ee9 100644 ---- a/src/common.c -+++ b/src/common.c -@@ -681,16 +681,16 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...) - /* Write a C string (guaranteed to have a zero terminator). */ - strptr = va_arg (argptr, char *) ; - size = strlen (strptr) + 1 ; -- size += (size & 1) ; - -- if (psf->header.indx + (sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, 16)) -+ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1))) - return count ; - - if (psf->rwf_endian == SF_ENDIAN_BIG) -- header_put_be_int (psf, size) ; -+ header_put_be_int (psf, size + (size & 1)) ; - else -- header_put_le_int (psf, size) ; -+ header_put_le_int (psf, size + (size & 1)) ; - memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ; -+ size += (size & 1) ; - psf->header.indx += size ; - psf->header.ptr [psf->header.indx - 1] = 0 ; - count += 4 + size ; -@@ -703,16 +703,15 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...) - */ - strptr = va_arg (argptr, char *) ; - size = strlen (strptr) ; -- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size)) -+ if (psf->header.indx + 4 + (sf_count_t) size + (sf_count_t) (size & 1) > psf->header.len && psf_bump_header_allocation (psf, 4 + size + (size & 1))) - return count ; - if (psf->rwf_endian == SF_ENDIAN_BIG) - header_put_be_int (psf, size) ; - else - header_put_le_int (psf, size) ; -- memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ; -+ memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + (size & 1)) ; - size += (size & 1) ; - psf->header.indx += size ; -- psf->header.ptr [psf->header.indx] = 0 ; - count += 4 + size ; - break ; - -@@ -724,7 +723,7 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...) - size = (size & 1) ? size : size + 1 ; - size = (size > 254) ? 254 : size ; - -- if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size)) -+ if (psf->header.indx + 1 + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, 1 + size)) - return count ; - - header_put_byte (psf, size) ; diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch deleted file mode 100644 index 39b4ec1101..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 85c877d5072866aadbe8ed0c3e0590fbb5e16788 Mon Sep 17 00:00:00 2001 -From: Fabian Greffrath <fabian@greffrath.com> -Date: Thu, 28 Sep 2017 12:15:04 +0200 -Subject: [PATCH] double64_init: Check psf->sf.channels against upper bound - -This prevents division by zero later in the code. - -While the trivial case to catch this (i.e. sf.channels < 1) has already -been covered, a crafted file may report a number of channels that is -so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets -miscalculated to zero (if this makes sense) in the determination of the -blockwidth. Since we only support a limited number of channels anyway, -make sure to check here as well. - -CVE: CVE-2017-14634 - -Closes: https://github.com/erikd/libsndfile/issues/318 - -Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/85c877d5072866aadbe8ed0c3e0590fbb5e16788] - -Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com> -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - src/double64.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/double64.c b/src/double64.c -index b318ea8..78dfef7 100644 ---- a/src/double64.c -+++ b/src/double64.c -@@ -91,7 +91,7 @@ int - double64_init (SF_PRIVATE *psf) - { static int double64_caps ; - -- if (psf->sf.channels < 1) -+ if (psf->sf.channels < 1 || psf->sf.channels > SF_MAX_CHANNELS) - { psf_log_printf (psf, "double64_init : internal error : channels = %d\n", psf->sf.channels) ; - return SFE_INTERNAL ; - } ; --- -2.13.3 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch deleted file mode 100644 index 89552ac2d9..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-6892.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f833c53cb596e9e1792949f762e0b33661822748 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -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 <fan.xin@jp.fujitsu.com> - ---- - 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 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch deleted file mode 100644 index ac99516bb3..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8361-8365.patch +++ /dev/null @@ -1,73 +0,0 @@ -From fd0484aba8e51d16af1e3a880f9b8b857b385eb3 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -Date: Wed, 12 Apr 2017 19:45:30 +1000 -Subject: [PATCH] FLAC: Fix a buffer read overrun - -Buffer read overrun occurs when reading a FLAC file that switches -from 2 channels to one channel mid-stream. Only option is to -abort the read. - -Closes: https://github.com/erikd/libsndfile/issues/230 - -CVE: CVE-2017-8361 CVE-2017-8365 - -Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/fd0484aba8e51d16af1e3a880f9b8b857b385eb3] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - src/common.h | 1 + - src/flac.c | 13 +++++++++++++ - src/sndfile.c | 1 + - 3 files changed, 15 insertions(+) - -diff --git a/src/common.h b/src/common.h -index 0bd810c..e2669b6 100644 ---- a/src/common.h -+++ b/src/common.h -@@ -725,6 +725,7 @@ enum - SFE_FLAC_INIT_DECODER, - SFE_FLAC_LOST_SYNC, - SFE_FLAC_BAD_SAMPLE_RATE, -+ SFE_FLAC_CHANNEL_COUNT_CHANGED, - SFE_FLAC_UNKOWN_ERROR, - - SFE_WVE_NOT_WVE, -diff --git a/src/flac.c b/src/flac.c -index 84de0e2..986a7b8 100644 ---- a/src/flac.c -+++ b/src/flac.c -@@ -434,6 +434,19 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_ - - switch (metadata->type) - { case FLAC__METADATA_TYPE_STREAMINFO : -+ if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels) -+ { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n" -+ "Nothing to be but to error out.\n" , -+ psf->sf.channels, metadata->data.stream_info.channels) ; -+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; -+ return ; -+ } ; -+ -+ if (psf->sf.channels > 0 && psf->sf.samplerate != (int) metadata->data.stream_info.sample_rate) -+ { psf_log_printf (psf, "Warning: FLAC stream changed sample rates from %d to %d.\n" -+ "Carrying on as if nothing happened.", -+ psf->sf.samplerate, metadata->data.stream_info.sample_rate) ; -+ } ; - psf->sf.channels = metadata->data.stream_info.channels ; - psf->sf.samplerate = metadata->data.stream_info.sample_rate ; - psf->sf.frames = metadata->data.stream_info.total_samples ; -diff --git a/src/sndfile.c b/src/sndfile.c -index 4187561..e2a87be 100644 ---- a/src/sndfile.c -+++ b/src/sndfile.c -@@ -245,6 +245,7 @@ ErrorStruct SndfileErrors [] = - { SFE_FLAC_INIT_DECODER , "Error : problem with initialization of the flac decoder." }, - { SFE_FLAC_LOST_SYNC , "Error : flac decoder lost sync." }, - { SFE_FLAC_BAD_SAMPLE_RATE, "Error : flac does not support this sample rate." }, -+ { SFE_FLAC_CHANNEL_COUNT_CHANGED, "Error : flac channel changed mid stream." }, - { SFE_FLAC_UNKOWN_ERROR , "Error : unknown error in flac decoder." }, - - { SFE_WVE_NOT_WVE , "Error : not a WVE file." }, --- -2.7.4 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch deleted file mode 100644 index 9ee7e46a6d..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch +++ /dev/null @@ -1,59 +0,0 @@ -From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -Date: Fri, 14 Apr 2017 15:19:16 +1000 -Subject: [PATCH] src/flac.c: Fix a buffer read overflow - -A file (generated by a fuzzer) which increased the number of channels -from one frame to the next could cause a read beyond the end of the -buffer provided by libFLAC. Only option is to abort the read. - -Closes: https://github.com/erikd/libsndfile/issues/231 - -CVE: CVE-2017-8362 - -Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/ef1dbb2df1c0e741486646de40bd638a9c4cd808] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - src/flac.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/src/flac.c b/src/flac.c -index 5a4f8c2..e4f9aaa 100644 ---- a/src/flac.c -+++ b/src/flac.c -@@ -169,6 +169,14 @@ flac_buffer_copy (SF_PRIVATE *psf) - const int32_t* const *buffer = pflac->wbuffer ; - unsigned i = 0, j, offset, channels, len ; - -+ if (psf->sf.channels != (int) frame->header.channels) -+ { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n" -+ "Nothing to do but to error out.\n" , -+ psf->sf.channels, frame->header.channels) ; -+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; -+ return 0 ; -+ } ; -+ - /* - ** frame->header.blocksize is variable and we're using a constant blocksize - ** of FLAC__MAX_BLOCK_SIZE. -@@ -202,7 +210,6 @@ flac_buffer_copy (SF_PRIVATE *psf) - return 0 ; - } ; - -- - len = SF_MIN (pflac->len, frame->header.blocksize) ; - - if (pflac->remain % channels != 0) -@@ -436,7 +443,7 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_ - { case FLAC__METADATA_TYPE_STREAMINFO : - if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels) - { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n" -- "Nothing to be but to error out.\n" , -+ "Nothing to do but to error out.\n" , - psf->sf.channels, metadata->data.stream_info.channels) ; - psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; - return ; --- -2.7.4 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch deleted file mode 100644 index e526e5a346..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8363.patch +++ /dev/null @@ -1,37 +0,0 @@ -From cd7da8dbf6ee4310d21d9e44b385d6797160d9e8 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -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 <jackie.huang@windriver.com> ---- - 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 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch deleted file mode 100644 index 707373d414..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-13139.patch +++ /dev/null @@ -1,37 +0,0 @@ -CVE: CVE-2018-13139 -Upstream-Status: Backport [9dc989eb89cd697e19897afa616d6ab0debe4822] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 9dc989eb89cd697e19897afa616d6ab0debe4822 Mon Sep 17 00:00:00 2001 -From: "Brett T. Warden" <brett.t.warden@intel.com> -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 diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch deleted file mode 100644 index 8ded2c0f85..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19432.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 6f3266277bed16525f0ac2f0f03ff4626f1923e5 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -Date: Thu, 8 Mar 2018 18:00:21 +1100 -Subject: [PATCH] Fix max channel count bug - -The code was allowing files to be written with a channel count of exactly -`SF_MAX_CHANNELS` but was failing to read some file formats with the same -channel count. - -Upstream-Status: Backport [https://github.com/erikd/libsndfile/ -commit/6f3266277bed16525f0ac2f0f03ff4626f1923e5] - -CVE: CVE-2018-19432 - -Signed-off-by: Changqing Li <changqing.li@windriver.com> - ---- - src/aiff.c | 6 +++--- - src/rf64.c | 4 ++-- - src/w64.c | 4 ++-- - src/wav.c | 4 ++-- - 4 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/aiff.c b/src/aiff.c -index fbd43cb..6386bce 100644 ---- a/src/aiff.c -+++ b/src/aiff.c -@@ -1,5 +1,5 @@ - /* --** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> -+** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com> - ** Copyright (C) 2005 David Viens <davidv@plogue.com> - ** - ** This program is free software; you can redistribute it and/or modify -@@ -950,7 +950,7 @@ aiff_read_header (SF_PRIVATE *psf, COMM_ - if (psf->sf.channels < 1) - return SFE_CHANNEL_COUNT_ZERO ; - -- if (psf->sf.channels >= SF_MAX_CHANNELS) -+ if (psf->sf.channels > SF_MAX_CHANNELS) - return SFE_CHANNEL_COUNT ; - - if (! (found_chunk & HAVE_FORM)) -@@ -1030,7 +1030,7 @@ aiff_read_comm_chunk (SF_PRIVATE *psf, C - psf_log_printf (psf, " Sample Rate : %d\n", samplerate) ; - psf_log_printf (psf, " Frames : %u%s\n", comm_fmt->numSampleFrames, (comm_fmt->numSampleFrames == 0 && psf->filelength > 104) ? " (Should not be 0)" : "") ; - -- if (comm_fmt->numChannels < 1 || comm_fmt->numChannels >= SF_MAX_CHANNELS) -+ if (comm_fmt->numChannels < 1 || comm_fmt->numChannels > SF_MAX_CHANNELS) - { psf_log_printf (psf, " Channels : %d (should be >= 1 and < %d)\n", comm_fmt->numChannels, SF_MAX_CHANNELS) ; - return SFE_CHANNEL_COUNT_BAD ; - } ; -diff --git a/src/rf64.c b/src/rf64.c -index d57f0f3..876cd45 100644 ---- a/src/rf64.c -+++ b/src/rf64.c -@@ -1,5 +1,5 @@ - /* --** Copyright (C) 2008-2017 Erik de Castro Lopo <erikd@mega-nerd.com> -+** Copyright (C) 2008-2018 Erik de Castro Lopo <erikd@mega-nerd.com> - ** Copyright (C) 2009 Uli Franke <cls@nebadje.org> - ** - ** This program is free software; you can redistribute it and/or modify -@@ -382,7 +382,7 @@ rf64_read_header (SF_PRIVATE *psf, int * - if (psf->sf.channels < 1) - return SFE_CHANNEL_COUNT_ZERO ; - -- if (psf->sf.channels >= SF_MAX_CHANNELS) -+ if (psf->sf.channels > SF_MAX_CHANNELS) - return SFE_CHANNEL_COUNT ; - - /* WAVs can be little or big endian */ -diff --git a/src/w64.c b/src/w64.c -index 939b716..a37d2c5 100644 ---- a/src/w64.c -+++ b/src/w64.c -@@ -1,5 +1,5 @@ - /* --** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> -+** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com> - ** - ** This program is free software; you can redistribute it and/or modify - ** it under the terms of the GNU Lesser General Public License as published by -@@ -383,7 +383,7 @@ w64_read_header (SF_PRIVATE *psf, int *b - if (psf->sf.channels < 1) - return SFE_CHANNEL_COUNT_ZERO ; - -- if (psf->sf.channels >= SF_MAX_CHANNELS) -+ if (psf->sf.channels > SF_MAX_CHANNELS) - return SFE_CHANNEL_COUNT ; - - psf->endian = SF_ENDIAN_LITTLE ; /* All W64 files are little endian. */ -diff --git a/src/wav.c b/src/wav.c -index 7bd97bc..dc97545 100644 ---- a/src/wav.c -+++ b/src/wav.c -@@ -1,5 +1,5 @@ - /* --** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com> -+** Copyright (C) 1999-2018 Erik de Castro Lopo <erikd@mega-nerd.com> - ** Copyright (C) 2004-2005 David Viens <davidv@plogue.com> - ** - ** This program is free software; you can redistribute it and/or modify -@@ -627,7 +627,7 @@ wav_read_header (SF_PRIVATE *psf, int *b - if (psf->sf.channels < 1) - return SFE_CHANNEL_COUNT_ZERO ; - -- if (psf->sf.channels >= SF_MAX_CHANNELS) -+ if (psf->sf.channels > SF_MAX_CHANNELS) - return SFE_CHANNEL_COUNT ; - - if (format != WAVE_FORMAT_PCM && (parsestage & HAVE_fact) == 0) --- -1.7.9.5 - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch deleted file mode 100644 index c3586f9dfc..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2018-19758.patch +++ /dev/null @@ -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 <ross.burton@intel.com> - -From c12173b0197dd0c5cfa2cd27977e982d2ae59486 Mon Sep 17 00:00:00 2001 -From: Erik de Castro Lopo <erikd@mega-nerd.com> -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 diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch deleted file mode 100644 index ab37211399..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 43886efc408c21e1e329086ef70c88860310f25b Mon Sep 17 00:00:00 2001 -From: Emilio Pozuelo Monfort <pochu27@gmail.com> -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 <ross.burton@intel.com> - -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 ; - diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch new file mode 100644 index 0000000000..fa4b2fc08b --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/cve-2022-33065.patch @@ -0,0 +1,739 @@ +From c7ce5b0ebeeb58934825077d1324960aa0747718 Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Tue, 10 Oct 2023 16:10:34 -0400 +Subject: [PATCH] mat4/mat5: fix int overflow in dataend calculation + +The clang sanitizer warns of a possible signed integer overflow when +calculating the `dataend` value in `mat4_read_header()`. + +``` +src/mat4.c:323:41: runtime error: signed integer overflow: 205 * -100663296 cannot be represented in type 'int' +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:41 in +src/mat4.c:323:48: runtime error: signed integer overflow: 838860800 * 4 cannot be represented in type 'int' +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:48 in +``` + +Cast the offending `rows` and `cols` ints to `sf_count_t` (the type of +`dataend` before performing the calculation, to avoid the issue. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/789 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Upstream-Status: Backport [9a829113c88a51e57c1e46473e90609e4b7df151] + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/mat4.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mat4.c b/src/mat4.c +index 0b1b414b..575683ba 100644 +--- a/src/mat4.c ++++ b/src/mat4.c +@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf) + psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ; + } + else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth) +- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ; ++ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ; + + psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ; + +From 842303f984b2081481e74cb84a9a24ecbe3dec1a Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Wed, 11 Oct 2023 16:36:02 -0400 +Subject: [PATCH] au: avoid int overflow while calculating data_end + +At several points in au_read_header(), we calculate the functional end +of the data segment by adding the (int)au_fmt.dataoffset and the +(int)au_fmt.datasize. This can overflow the implicit int_32 return value +and cause undefined behavior. + +Instead, precalculate the value and assign it to a 64-bit +(sf_count_t)data_end variable. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/au.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/au.c b/src/au.c +index 62bd691d..f68f2587 100644 +--- a/src/au.c ++++ b/src/au.c +@@ -291,6 +291,7 @@ static int + au_read_header (SF_PRIVATE *psf) + { AU_FMT au_fmt ; + int marker, dword ; ++ sf_count_t data_end ; + + memset (&au_fmt, 0, sizeof (au_fmt)) ; + psf_binheader_readf (psf, "pm", 0, &marker) ; +@@ -317,14 +318,15 @@ au_read_header (SF_PRIVATE *psf) + return SFE_AU_EMBED_BAD_LEN ; + } ; + ++ data_end = (sf_count_t) au_fmt.dataoffset + (sf_count_t) au_fmt.datasize ; + if (psf->fileoffset > 0) +- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ; ++ { psf->filelength = data_end ; + psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ; + } +- else if (au_fmt.datasize == -1 || au_fmt.dataoffset + au_fmt.datasize == psf->filelength) ++ else if (au_fmt.datasize == -1 || data_end == psf->filelength) + psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ; +- else if (au_fmt.dataoffset + au_fmt.datasize < psf->filelength) +- { psf->filelength = au_fmt.dataoffset + au_fmt.datasize ; ++ else if (data_end < psf->filelength) ++ { psf->filelength = data_end ; + psf_log_printf (psf, " Data Size : %d\n", au_fmt.datasize) ; + } + else +From 0754d3380a54e3fbdde0f684b88955c80c79f58f Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Wed, 11 Oct 2023 16:46:29 -0400 +Subject: [PATCH] avr: fix int overflow in avr_read_header() + +Pre-cast hdr.frames to sf_count_t, to provide the calculation with +enough numeric space to avoid an int-overflow. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/avr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/avr.c b/src/avr.c +index 6c78ff69..1bc1ffc9 100644 +--- a/src/avr.c ++++ b/src/avr.c +@@ -162,7 +162,7 @@ avr_read_header (SF_PRIVATE *psf) + psf->endian = SF_ENDIAN_BIG ; + + psf->dataoffset = AVR_HDR_SIZE ; +- psf->datalength = hdr.frames * (hdr.rez / 8) ; ++ psf->datalength = (sf_count_t) hdr.frames * (hdr.rez / 8) ; + + if (psf->fileoffset > 0) + psf->filelength = AVR_HDR_SIZE + psf->datalength ; +From 6ac31a68a614e2bba4a05b54e5558d6270c98376 Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Wed, 11 Oct 2023 16:54:21 -0400 +Subject: [PATCH] sds: fix int overflow warning in sample calculations + +The sds_*byte_read() functions compose their uint_32 sample buffers by +shifting 7bit samples into a 32bit wide buffer, and adding them +together. Because the 7bit samples are stored in 32bit ints, code +fuzzers become concerned that the addition operation can overflow and +cause undefined behavior. + +Instead, bitwise-OR the bytes together - which should accomplish the +same arithmetic operation, without risking an int-overflow. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> + +Do the same for the 3byte and 4byte read functions. +--- + src/sds.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/sds.c b/src/sds.c +index 6bc76171..2a0f164c 100644 +--- a/src/sds.c ++++ b/src/sds.c +@@ -454,7 +454,7 @@ sds_2byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds) + + ucptr = psds->read_data + 5 ; + for (k = 0 ; k < 120 ; k += 2) +- { sample = arith_shift_left (ucptr [k], 25) + arith_shift_left (ucptr [k + 1], 18) ; ++ { sample = arith_shift_left (ucptr [k], 25) | arith_shift_left (ucptr [k + 1], 18) ; + psds->read_samples [k / 2] = (int) (sample - 0x80000000) ; + } ; + +@@ -498,7 +498,7 @@ sds_3byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds) + + ucptr = psds->read_data + 5 ; + for (k = 0 ; k < 120 ; k += 3) +- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) ; ++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) ; + psds->read_samples [k / 3] = (int) (sample - 0x80000000) ; + } ; + +@@ -542,7 +542,7 @@ sds_4byte_read (SF_PRIVATE *psf, SDS_PRIVATE *psds) + + ucptr = psds->read_data + 5 ; + for (k = 0 ; k < 120 ; k += 4) +- { sample = (((uint32_t) ucptr [k]) << 25) + (ucptr [k + 1] << 18) + (ucptr [k + 2] << 11) + (ucptr [k + 3] << 4) ; ++ { sample = (((uint32_t) ucptr [k]) << 25) | (ucptr [k + 1] << 18) | (ucptr [k + 2] << 11) | (ucptr [k + 3] << 4) ; + psds->read_samples [k / 4] = (int) (sample - 0x80000000) ; + } ; + +From 96428e1dd4998f1cd47df24f8fe9b0da35d7b947 Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Wed, 11 Oct 2023 17:26:51 -0400 +Subject: [PATCH] aiff: fix int overflow when counting header elements + +aiff_read_basc_chunk() tries to count the AIFF header size by keeping +track of the bytes returned by psf_binheader_readf(). Though improbable, +it is technically possible for these added bytes to exceed the int-sized +`count` accumulator. + +Use a 64-bit sf_count_t type for `count`, to ensure that it always has +enough numeric space. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/aiff.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/aiff.c b/src/aiff.c +index a2bda8f4..6b244302 100644 +--- a/src/aiff.c ++++ b/src/aiff.c +@@ -1702,7 +1702,7 @@ static int + aiff_read_basc_chunk (SF_PRIVATE * psf, int datasize) + { const char * type_str ; + basc_CHUNK bc ; +- int count ; ++ sf_count_t count ; + + count = psf_binheader_readf (psf, "E442", &bc.version, &bc.numBeats, &bc.rootNote) ; + count += psf_binheader_readf (psf, "E222", &bc.scaleType, &bc.sigNumerator, &bc.sigDenominator) ; +From b352c350d35bf978e4d3a32e5d9df1f2284445f4 Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Wed, 11 Oct 2023 17:43:02 -0400 +Subject: [PATCH] ircam: fix int overflow in ircam_read_header() + +When reading the IRCAM header, it is possible for the calculated +blockwidth to exceed the bounds of a signed int32. + +Use a 64bit sf_count_t to store the blockwidth. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/common.h | 2 +- + src/ircam.c | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/common.h b/src/common.h +index d92eabde..5369cb67 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -439,7 +439,7 @@ typedef struct sf_private_tag + sf_count_t datalength ; /* Length in bytes of the audio data. */ + sf_count_t dataend ; /* Offset to file tailer. */ + +- int blockwidth ; /* Size in bytes of one set of interleaved samples. */ ++ sf_count_t blockwidth ; /* Size in bytes of one set of interleaved samples. */ + int bytewidth ; /* Size in bytes of one sample (one channel). */ + + void *dither ; +diff --git a/src/ircam.c b/src/ircam.c +index 8e7cdba8..3d73ba44 100644 +--- a/src/ircam.c ++++ b/src/ircam.c +@@ -171,35 +171,35 @@ ircam_read_header (SF_PRIVATE *psf) + switch (encoding) + { case IRCAM_PCM_16 : + psf->bytewidth = 2 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_16 ; + break ; + + case IRCAM_PCM_32 : + psf->bytewidth = 4 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_PCM_32 ; + break ; + + case IRCAM_FLOAT : + psf->bytewidth = 4 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_FLOAT ; + break ; + + case IRCAM_ALAW : + psf->bytewidth = 1 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ALAW ; + break ; + + case IRCAM_ULAW : + psf->bytewidth = 1 ; +- psf->blockwidth = psf->sf.channels * psf->bytewidth ; ++ psf->blockwidth = (sf_count_t) psf->sf.channels * psf->bytewidth ; + + psf->sf.format = SF_FORMAT_IRCAM | SF_FORMAT_ULAW ; + break ; +From 3bcd291e57867f88f558fa6f80990e84311df78c Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Wed, 11 Oct 2023 16:12:22 -0400 +Subject: [PATCH] mat4/mat5: fix int overflow when calculating blockwidth + +Pre-cast the components of the blockwidth calculation to sf_count_t to +avoid overflowing integers during calculation. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/mat4.c | 2 +- + src/mat5.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mat4.c b/src/mat4.c +index 575683ba..9f046f0c 100644 +--- a/src/mat4.c ++++ b/src/mat4.c +@@ -104,7 +104,7 @@ mat4_open (SF_PRIVATE *psf) + + psf->container_close = mat4_close ; + +- psf->blockwidth = psf->bytewidth * psf->sf.channels ; ++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ; + + switch (subformat) + { case SF_FORMAT_PCM_16 : +diff --git a/src/mat5.c b/src/mat5.c +index da5a6eca..20f0ea64 100644 +--- a/src/mat5.c ++++ b/src/mat5.c +@@ -114,7 +114,7 @@ mat5_open (SF_PRIVATE *psf) + + psf->container_close = mat5_close ; + +- psf->blockwidth = psf->bytewidth * psf->sf.channels ; ++ psf->blockwidth = (sf_count_t) psf->bytewidth * psf->sf.channels ; + + switch (subformat) + { case SF_FORMAT_PCM_U8 : +From c177e292d47ef73b1d3c1bb391320299a0ed2ff9 Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Mon, 16 Oct 2023 12:37:47 -0400 +Subject: [PATCH] common: fix int overflow in psf_binheader_readf() + +The psf_binheader_readf() function attempts to count and return the +number of bytes traversed in the header. During this accumulation, it is +possible to overflow the int-sized byte_count variable. + +Avoid this overflow by checking that the accumulated bytes do not exceed +INT_MAX and throwing an error if they do. This implies that files with +multi-gigabyte headers threaten to produce this error, but I imagine +those files don't really exist - and this error is better than the +undefined behavior which would have resulted previously. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +--- + src/common.c | 36 ++++++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 12 deletions(-) + +diff --git a/src/common.c b/src/common.c +index 1c3d951d..7f6cceca 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -18,6 +18,7 @@ + + #include <config.h> + ++#include <limits.h> + #include <stdarg.h> + #include <string.h> + #if HAVE_UNISTD_H +@@ -990,6 +991,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + double *doubleptr ; + char c ; + int byte_count = 0, count = 0 ; ++ int read_bytes = 0 ; + + if (! format) + return psf_ftell (psf) ; +@@ -998,6 +1000,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + + while ((c = *format++)) + { ++ read_bytes = 0 ; + if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16)) + break ; + +@@ -1014,7 +1017,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; + ucptr = (unsigned char*) intptr ; +- byte_count += header_read (psf, ucptr, sizeof (int)) ; ++ read_bytes = header_read (psf, ucptr, sizeof (int)) ; + *intptr = GET_MARKER (ucptr) ; + break ; + +@@ -1022,7 +1025,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; + ucptr = (unsigned char*) intptr ; +- byte_count += header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ; ++ read_bytes = header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ; + { int k ; + intdata = 0 ; + for (k = 0 ; k < 16 ; k++) +@@ -1034,14 +1037,14 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case '1' : + charptr = va_arg (argptr, char*) ; + *charptr = 0 ; +- byte_count += header_read (psf, charptr, sizeof (char)) ; ++ read_bytes = header_read (psf, charptr, sizeof (char)) ; + break ; + + case '2' : /* 2 byte value with the current endian-ness */ + shortptr = va_arg (argptr, unsigned short*) ; + *shortptr = 0 ; + ucptr = (unsigned char*) shortptr ; +- byte_count += header_read (psf, ucptr, sizeof (short)) ; ++ read_bytes = header_read (psf, ucptr, sizeof (short)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *shortptr = GET_BE_SHORT (ucptr) ; + else +@@ -1051,7 +1054,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case '3' : /* 3 byte value with the current endian-ness */ + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; +- byte_count += header_read (psf, sixteen_bytes, 3) ; ++ read_bytes = header_read (psf, sixteen_bytes, 3) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *intptr = GET_BE_3BYTE (sixteen_bytes) ; + else +@@ -1062,7 +1065,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + intptr = va_arg (argptr, unsigned int*) ; + *intptr = 0 ; + ucptr = (unsigned char*) intptr ; +- byte_count += header_read (psf, ucptr, sizeof (int)) ; ++ read_bytes = header_read (psf, ucptr, sizeof (int)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *intptr = psf_get_be32 (ucptr, 0) ; + else +@@ -1072,7 +1075,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case '8' : /* 8 byte value with the current endian-ness */ + countptr = va_arg (argptr, sf_count_t *) ; + *countptr = 0 ; +- byte_count += header_read (psf, sixteen_bytes, 8) ; ++ read_bytes = header_read (psf, sixteen_bytes, 8) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + countdata = psf_get_be64 (sixteen_bytes, 0) ; + else +@@ -1083,7 +1086,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'f' : /* Float conversion */ + floatptr = va_arg (argptr, float *) ; + *floatptr = 0.0 ; +- byte_count += header_read (psf, floatptr, sizeof (float)) ; ++ read_bytes = header_read (psf, floatptr, sizeof (float)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *floatptr = float32_be_read ((unsigned char*) floatptr) ; + else +@@ -1093,7 +1096,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'd' : /* double conversion */ + doubleptr = va_arg (argptr, double *) ; + *doubleptr = 0.0 ; +- byte_count += header_read (psf, doubleptr, sizeof (double)) ; ++ read_bytes = header_read (psf, doubleptr, sizeof (double)) ; + if (psf->rwf_endian == SF_ENDIAN_BIG) + *doubleptr = double64_be_read ((unsigned char*) doubleptr) ; + else +@@ -1117,7 +1120,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + charptr = va_arg (argptr, char*) ; + count = va_arg (argptr, size_t) ; + memset (charptr, 0, count) ; +- byte_count += header_read (psf, charptr, count) ; ++ read_bytes = header_read (psf, charptr, count) ; + break ; + + case 'G' : +@@ -1128,7 +1131,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count)) + break ; + +- byte_count += header_gets (psf, charptr, count) ; ++ read_bytes = header_gets (psf, charptr, count) ; + break ; + + case 'z' : +@@ -1152,7 +1155,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'j' : /* Seek to position from current position. */ + count = va_arg (argptr, size_t) ; + header_seek (psf, count, SEEK_CUR) ; +- byte_count += count ; ++ read_bytes = count ; + break ; + + case '!' : /* Clear buffer, forcing re-read. */ +@@ -1164,8 +1167,17 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + psf->error = SFE_INTERNAL ; + break ; + } ; ++ ++ if (read_bytes > 0 && byte_count > (INT_MAX - read_bytes)) ++ { psf_log_printf (psf, "Header size exceeds INT_MAX. Aborting.", c) ; ++ psf->error = SFE_INTERNAL ; ++ break ; ++ } else ++ { byte_count += read_bytes ; + } ; + ++ } ; /*end while*/ ++ + va_end (argptr) ; + + return byte_count ; +From a23d563386e7c8d93dcdbe7d5b1d63cad6009116 Mon Sep 17 00:00:00 2001 +From: Alex Stewart <alex.stewart@ni.com> +Date: Thu, 19 Oct 2023 14:07:19 -0400 +Subject: [PATCH] nms_adpcm: fix int overflow in signal estimate + +It is possible (though functionally incorrect) for the signal estimate +calculation in nms_adpcm_update() to overflow the int value of s_e, +resulting in undefined behavior. + +Since adpcm state signal values are never practically larger than +16 bits, use smaller numeric sizes throughout the file to avoid the +overflow. + +CVE: CVE-2022-33065 +Fixes: https://github.com/libsndfile/libsndfile/issues/833 + +Authored-by: Arthur Taylor <art@ified.ca> +Signed-off-by: Alex Stewart <alex.stewart@ni.com> +Rebased-by: Alex Stewart <alex.stewart@ni.com> +--- + src/nms_adpcm.c | 85 ++++++++++++++++++++++++------------------------- + 1 file changed, 42 insertions(+), 43 deletions(-) + +diff --git a/src/nms_adpcm.c b/src/nms_adpcm.c +index 96d6ad26..460ea077 100644 +--- a/src/nms_adpcm.c ++++ b/src/nms_adpcm.c +@@ -48,36 +48,36 @@ + /* Variable names from ITU G.726 spec */ + struct nms_adpcm_state + { /* Log of the step size multiplier. Operated on by codewords. */ +- int yl ; ++ short yl ; + + /* Quantizer step size multiplier. Generated from yl. */ +- int y ; ++ short y ; + +- /* Coefficents of the pole predictor */ +- int a [2] ; ++ /* Coefficients of the pole predictor */ ++ short a [2] ; + +- /* Coefficents of the zero predictor */ +- int b [6] ; ++ /* Coefficients of the zero predictor */ ++ short b [6] ; + + /* Previous quantized deltas (multiplied by 2^14) */ +- int d_q [7] ; ++ short d_q [7] ; + + /* d_q [x] + s_ez [x], used by the pole-predictor for signs only. */ +- int p [3] ; ++ short p [3] ; + + /* Previous reconstructed signal values. */ +- int s_r [2] ; ++ short s_r [2] ; + + /* Zero predictor components of the signal estimate. */ +- int s_ez ; ++ short s_ez ; + + /* Signal estimate, (including s_ez). */ +- int s_e ; ++ short s_e ; + + /* The most recent codeword (enc:generated, dec:inputted) */ +- int Ik ; ++ char Ik ; + +- int parity ; ++ char parity ; + + /* + ** Offset into code tables for the bitrate. +@@ -109,7 +109,7 @@ typedef struct + } NMS_ADPCM_PRIVATE ; + + /* Pre-computed exponential interval used in the antilog approximation. */ +-static unsigned int table_expn [] = ++static unsigned short table_expn [] = + { 0x4000, 0x4167, 0x42d5, 0x444c, 0x45cb, 0x4752, 0x48e2, 0x4a7a, + 0x4c1b, 0x4dc7, 0x4f7a, 0x5138, 0x52ff, 0x54d1, 0x56ac, 0x5892, + 0x5a82, 0x5c7e, 0x5e84, 0x6096, 0x62b4, 0x64dd, 0x6712, 0x6954, +@@ -117,21 +117,21 @@ static unsigned int table_expn [] = + } ; + + /* Table mapping codewords to scale factor deltas. */ +-static int table_scale_factor_step [] = ++static short table_scale_factor_step [] = + { 0x0, 0x0, 0x0, 0x0, 0x4b0, 0x0, 0x0, 0x0, /* 2-bit */ + -0x3c, 0x0, 0x90, 0x0, 0x2ee, 0x0, 0x898, 0x0, /* 3-bit */ + -0x30, 0x12, 0x6b, 0xc8, 0x188, 0x2e0, 0x551, 0x1150, /* 4-bit */ + } ; + + /* Table mapping codewords to quantized delta interval steps. */ +-static unsigned int table_step [] = ++static unsigned short table_step [] = + { 0x73F, 0, 0, 0, 0x1829, 0, 0, 0, /* 2-bit */ + 0x3EB, 0, 0xC18, 0, 0x1581, 0, 0x226E, 0, /* 3-bit */ + 0x20C, 0x635, 0xA83, 0xF12, 0x1418, 0x19E3, 0x211A, 0x2BBA, /* 4-bit */ + } ; + + /* Binary search lookup table for quantizing using table_step. */ +-static int table_step_search [] = ++static short table_step_search [] = + { 0, 0x1F6D, 0, -0x1F6D, 0, 0, 0, 0, /* 2-bit */ + 0x1008, 0x1192, 0, -0x219A, 0x1656, -0x1656, 0, 0, /* 3-bit */ + 0x872, 0x1277, -0x8E6, -0x232B, 0xD06, -0x17D7, -0x11D3, 0, /* 4-bit */ +@@ -179,23 +179,23 @@ static sf_count_t nms_adpcm_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) + ** Maps [1,20480] to [1,1024] in an exponential relationship. This is + ** approximately ret = b^exp where b = e^(ln(1024)/ln(20480)) ~= 1.0003385 + */ +-static inline int +-nms_adpcm_antilog (int exp) +-{ int ret ; ++static inline short ++nms_adpcm_antilog (short exp) ++{ int_fast32_t r ; + +- ret = 0x1000 ; +- ret += (((exp & 0x3f) * 0x166b) >> 12) ; +- ret *= table_expn [(exp & 0x7c0) >> 6] ; +- ret >>= (26 - (exp >> 11)) ; ++ r = 0x1000 ; ++ r += (((int_fast32_t) (exp & 0x3f) * 0x166b) >> 12) ; ++ r *= table_expn [(exp & 0x7c0) >> 6] ; ++ r >>= (26 - (exp >> 11)) ; + +- return ret ; ++ return (short) r ; + } /* nms_adpcm_antilog */ + + static void + nms_adpcm_update (struct nms_adpcm_state *s) + { /* Variable names from ITU G.726 spec */ +- int a1ul ; +- int fa1 ; ++ short a1ul, fa1 ; ++ int_fast32_t se ; + int i ; + + /* Decay and Modify the scale factor in the log domain based on the codeword. */ +@@ -222,7 +222,7 @@ nms_adpcm_update (struct nms_adpcm_state *s) + else if (fa1 > 256) + fa1 = 256 ; + +- s->a [0] = (0xff * s->a [0]) >> 8 ; ++ s->a [0] = (s->a [0] * 0xff) >> 8 ; + if (s->p [0] != 0 && s->p [1] != 0 && ((s->p [0] ^ s->p [1]) < 0)) + s->a [0] -= 192 ; + else +@@ -230,7 +230,7 @@ nms_adpcm_update (struct nms_adpcm_state *s) + fa1 = -fa1 ; + } + +- s->a [1] = fa1 + ((0xfe * s->a [1]) >> 8) ; ++ s->a [1] = fa1 + ((s->a [1] * 0xfe) >> 8) ; + if (s->p [0] != 0 && s->p [2] != 0 && ((s->p [0] ^ s->p [2]) < 0)) + s->a [1] -= 128 ; + else +@@ -250,19 +250,18 @@ nms_adpcm_update (struct nms_adpcm_state *s) + s->a [0] = a1ul ; + } ; + +- /* Compute the zero predictor estimate. Rotate past deltas too. */ +- s->s_ez = 0 ; ++ /* Compute the zero predictor estimate and rotate past deltas. */ ++ se = 0 ; + for (i = 5 ; i >= 0 ; i--) +- { s->s_ez += s->d_q [i] * s->b [i] ; ++ { se += (int_fast32_t) s->d_q [i] * s->b [i] ; + s->d_q [i + 1] = s->d_q [i] ; + } ; ++ s->s_ez = se >> 14 ; + +- /* Compute the signal estimate. */ +- s->s_e = s->a [0] * s->s_r [0] + s->a [1] * s->s_r [1] + s->s_ez ; +- +- /* Return to scale */ +- s->s_ez >>= 14 ; +- s->s_e >>= 14 ; ++ /* Complete the signal estimate. */ ++ se += (int_fast32_t) s->a [0] * s->s_r [0] ; ++ se += (int_fast32_t) s->a [1] * s->s_r [1] ; ++ s->s_e = se >> 14 ; + + /* Rotate members to prepare for next iteration. */ + s->s_r [1] = s->s_r [0] ; +@@ -274,7 +273,7 @@ nms_adpcm_update (struct nms_adpcm_state *s) + static int16_t + nms_adpcm_reconstruct_sample (struct nms_adpcm_state *s, uint8_t I) + { /* Variable names from ITU G.726 spec */ +- int dqx ; ++ int_fast32_t dqx ; + + /* + ** The ordering of the 12-bit right-shift is a precision loss. It agrees +@@ -308,17 +307,17 @@ nms_adpcm_codec_init (struct nms_adpcm_state *s, enum nms_enc_type type) + /* + ** nms_adpcm_encode_sample() + ** +-** Encode a linear 16-bit pcm sample into a 2,3, or 4 bit NMS-ADPCM codeword ++** Encode a linear 16-bit pcm sample into a 2, 3, or 4 bit NMS-ADPCM codeword + ** using and updating the predictor state. + */ + static uint8_t + nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl) + { /* Variable names from ITU G.726 spec */ +- int d ; ++ int_fast32_t d ; + uint8_t I ; + + /* Down scale the sample from 16 => ~14 bits. */ +- sl = (sl * 0x1fdf) / 0x7fff ; ++ sl = ((int_fast32_t) sl * 0x1fdf) / 0x7fff ; + + /* Compute estimate, and delta from actual value */ + nms_adpcm_update (s) ; +@@ -407,7 +406,7 @@ nms_adpcm_encode_sample (struct nms_adpcm_state *s, int16_t sl) + */ + static int16_t + nms_adpcm_decode_sample (struct nms_adpcm_state *s, uint8_t I) +-{ int sl ; ++{ int_fast32_t sl ; + + nms_adpcm_update (s) ; + sl = nms_adpcm_reconstruct_sample (s, I) ; diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch new file mode 100644 index 0000000000..cb1778bede --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/noopus.patch @@ -0,0 +1,68 @@ +From 593256a3e386a4e17fe26cfbfb813cf4996447d7 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Mon, 4 Apr 2022 19:46:44 +0200 +Subject: [PATCH] Disable opus library + +We don't have opus in OE-Core which causes all the external libs to be disabled +silently. The silent issue is discussed in the link below and hints a patch +to make things configurable may be accepted. + +This patch removing the opus piece at least gets most of the functionality +we previously used back whilst the issue is discussed. + +Upstream-Status: Denied [https://github.com/libsndfile/libsndfile/pull/812] + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + configure.ac | 10 +++++----- + src/ogg_opus.c | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 727b67bc..f9d2e447 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -373,13 +373,13 @@ AS_IF([test -n "$PKG_CONFIG"], [ + enable_external_libs=yes + ]) + +- AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc$ac_cv_opus" = "xyesyesyesyesyes"], [ ++ AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc" = "xyesyesyesyes"], [ + HAVE_EXTERNAL_XIPH_LIBS=1 + enable_external_libs=yes + +- EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OPUS_CFLAGS $OGG_CFLAGS " +- EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OPUS_LIBS $OGG_LIBS " +- EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc opus" ++ EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OGG_CFLAGS " ++ EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OGG_LIBS " ++ EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc" + + if test x$ac_cv_speex = "xyes" ; then + EXTERNAL_XIPH_REQUIRE="$EXTERNAL_XIPH_REQUIRE speex" +@@ -788,7 +788,7 @@ AC_MSG_RESULT([ + + Experimental code : ................... ${enable_experimental:-no} + Using ALSA in example programs : ...... ${enable_alsa:-no} +- External FLAC/Ogg/Vorbis/Opus : ....... ${enable_external_libs:-no} ++ External FLAC/Ogg/Vorbis : ....... ${enable_external_libs:-no} + External MPEG Lame/MPG123 : ........... ${enable_mpeg:-no} + Building Octave interface : ........... ${OCTAVE_BUILD} + +diff --git a/src/ogg_opus.c b/src/ogg_opus.c +index dfa446ee..0d4fe57b 100644 +--- a/src/ogg_opus.c ++++ b/src/ogg_opus.c +@@ -159,7 +159,7 @@ + #include "sfendian.h" + #include "common.h" + +-#if HAVE_EXTERNAL_XIPH_LIBS ++#if 0 + + #include <ogg/ogg.h> + #include <opus/opus.h> +-- +2.30.2 + diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb deleted file mode 100644 index 443ca95e32..0000000000 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb +++ /dev/null @@ -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 = "LGPLv2.1" - -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_WHITELIST += "CVE-2018-13419" diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb new file mode 100644 index 0000000000..a9ee7c3575 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb @@ -0,0 +1,32 @@ +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/" +DEPENDS = "flac libogg libvorbis" +SECTION = "libs/multimedia" +LICENSE = "LGPL-2.1-only" + +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ + file://noopus.patch \ + file://cve-2022-33065.patch \ + " +GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" + +SRC_URI[sha256sum] = "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e" + +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 github-releases + +do_install:append() { + oe_multilib_header sndfile.h +} diff --git a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb index 178e1a9240..11674af379 100644 --- a/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb +++ b/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb @@ -7,7 +7,6 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132" DEPENDS = "libogg" -PR = "r1" SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.bz2 \ file://no-docs.patch" diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch new file mode 100644 index 0000000000..f5520fcafd --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0001.patch @@ -0,0 +1,238 @@ +From 335947359ce2dd3862cd9f7c49f92eba065dfed4 Mon Sep 17 00:00:00 2001 +From: Su_Laus <sulau@freenet.de> +Date: Thu, 1 Feb 2024 13:06:08 +0000 +Subject: [PATCH] manpage: Update TIFF documentation about TIFFOpenOptions.rst + and TIFFOpenOptionsSetMaxSingleMemAlloc() usage and some other small fixes. + +CVE: CVE-2023-52355 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/335947359ce2dd3862cd9f7c49f92eba065dfed4] + +Signed-off-by: Yogita Urade <yogita.urade@windriver.com> +--- + doc/functions/TIFFDeferStrileArrayWriting.rst | 5 +++ + doc/functions/TIFFError.rst | 3 ++ + doc/functions/TIFFOpen.rst | 13 +++--- + doc/functions/TIFFOpenOptions.rst | 44 ++++++++++++++++++- + doc/functions/TIFFStrileQuery.rst | 5 +++ + doc/libtiff.rst | 31 ++++++++++++- + 6 files changed, 91 insertions(+), 10 deletions(-) + +diff --git a/doc/functions/TIFFDeferStrileArrayWriting.rst b/doc/functions/TIFFDeferStrileArrayWriting.rst +index 60ee746..705aebc 100644 +--- a/doc/functions/TIFFDeferStrileArrayWriting.rst ++++ b/doc/functions/TIFFDeferStrileArrayWriting.rst +@@ -61,6 +61,11 @@ Diagnostics + All error messages are directed to the :c:func:`TIFFErrorExtR` routine. + Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. + ++Note ++---- ++ ++This functionality was introduced with libtiff 4.1. ++ + See also + -------- + +diff --git a/doc/functions/TIFFError.rst b/doc/functions/TIFFError.rst +index 99924ad..cf4b37c 100644 +--- a/doc/functions/TIFFError.rst ++++ b/doc/functions/TIFFError.rst +@@ -65,6 +65,9 @@ or :c:func:`TIFFClientOpenExt`. + Furthermore, a **custom defined data structure** *user_data* for the + error handler can be given along. + ++Please refer to :doc:`/functions/TIFFOpenOptions` for how to setup the ++application-specific handler introduced with libtiff 4.5. ++ + Note + ---- + +diff --git a/doc/functions/TIFFOpen.rst b/doc/functions/TIFFOpen.rst +index db79d7b..adc474f 100644 +--- a/doc/functions/TIFFOpen.rst ++++ b/doc/functions/TIFFOpen.rst +@@ -94,8 +94,9 @@ TIFF structure without closing the file handle and afterwards the + file should be closed using its file descriptor *fd*. + + :c:func:`TIFFOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFOpen`, +-but options, such as re-entrant error and warning handlers may be passed +-with the *opts* argument. The *opts* argument may be NULL. ++but options, such as re-entrant error and warning handlers and a limit in byte ++that libtiff internal memory allocation functions are allowed to request per call ++may be passed with the *opts* argument. The *opts* argument may be NULL. + Refer to :doc:`TIFFOpenOptions` for allocating and filling the *opts* argument + parameters. The allocated memory for :c:type:`TIFFOpenOptions` + can be released straight after successful execution of the related +@@ -105,9 +106,7 @@ can be released straight after successful execution of the related + but opens a TIFF file with a Unicode filename. + + :c:func:`TIFFFdOpenExt` (added in libtiff 4.5) is like :c:func:`TIFFFdOpen`, +-but options, such as re-entrant error and warning handlers may be passed +-with the *opts* argument. The *opts* argument may be NULL. +-Refer to :doc:`TIFFOpenOptions` for filling the *opts* argument. ++but options argument *opts* like for :c:func:`TIFFOpenExt` can be passed. + + :c:func:`TIFFSetFileName` sets the file name in the tif-structure + and returns the old file name. +@@ -326,5 +325,5 @@ See also + + :doc:`libtiff` (3tiff), + :doc:`TIFFClose` (3tiff), +-:doc:`TIFFStrileQuery`, +-:doc:`TIFFOpenOptions` +\ No newline at end of file ++:doc:`TIFFStrileQuery` (3tiff), ++:doc:`TIFFOpenOptions` +diff --git a/doc/functions/TIFFOpenOptions.rst b/doc/functions/TIFFOpenOptions.rst +index 5c67566..23f2975 100644 +--- a/doc/functions/TIFFOpenOptions.rst ++++ b/doc/functions/TIFFOpenOptions.rst +@@ -38,12 +38,17 @@ opaque structure and returns a :c:type:`TIFFOpenOptions` pointer. + :c:func:`TIFFOpenOptionsFree` releases the allocated memory for + :c:type:`TIFFOpenOptions`. The allocated memory for :c:type:`TIFFOpenOptions` + can be released straight after successful execution of the related +-TIFF open"Ext" functions like :c:func:`TIFFOpenExt`. ++TIFFOpen"Ext" functions like :c:func:`TIFFOpenExt`. + + :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` sets parameter for the + maximum single memory limit in byte that ``libtiff`` internal memory allocation + functions are allowed to request per call. + ++.. note:: ++ However, the ``libtiff`` external functions :c:func:`_TIFFmalloc` ++ and :c:func:`_TIFFrealloc` **do not apply** this internal memory ++ allocation limit set by :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`! ++ + :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` sets the function pointer to + an application-specific and per-TIFF handle (re-entrant) error handler. + Furthermore, a pointer to a **custom defined data structure** *errorhandler_user_data* +@@ -55,6 +60,43 @@ The *errorhandler_user_data* argument may be NULL. + :c:func:`TIFFOpenOptionsSetErrorHandlerExtR` but for the warning handler, + which is invoked through :c:func:`TIFFWarningExtR` + ++Example ++------- ++ ++:: ++ ++ #include "tiffio.h" ++ ++ typedef struct MyErrorHandlerUserDataStruct ++ { ++ /* ... any user data structure ... */ ++ } MyErrorHandlerUserDataStruct; ++ ++ static int myErrorHandler(TIFF *tiff, void *user_data, const char *module, ++ const char *fmt, va_list ap) ++ { ++ MyErrorHandlerUserDataStruct *errorhandler_user_data = ++ (MyErrorHandlerUserDataStruct *)user_data; ++ /*... code of myErrorHandler ...*/ ++ return 1; ++ } ++ ++ ++ main() ++ { ++ tmsize_t limit = (256 * 1024 * 1024); ++ MyErrorHandlerUserDataStruct user_data = { /* ... any data ... */}; ++ ++ TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); ++ TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); ++ TIFFOpenOptionsSetErrorHandlerExtR(opts, myErrorHandler, &user_data); ++ TIFF *tif = TIFFOpenExt("foo.tif", "r", opts); ++ TIFFOpenOptionsFree(opts); ++ /* ... go on here ... */ ++ ++ TIFFClose(tif); ++ } ++ + Note + ---- + +diff --git a/doc/functions/TIFFStrileQuery.rst b/doc/functions/TIFFStrileQuery.rst +index f8631af..7931fe4 100644 +--- a/doc/functions/TIFFStrileQuery.rst ++++ b/doc/functions/TIFFStrileQuery.rst +@@ -66,6 +66,11 @@ Diagnostics + All error messages are directed to the :c:func:`TIFFErrorExtR` routine. + Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine. + ++Note ++---- ++ ++This functionality was introduced with libtiff 4.1. ++ + See also + -------- + +diff --git a/doc/libtiff.rst b/doc/libtiff.rst +index 6a0054c..d96a860 100644 +--- a/doc/libtiff.rst ++++ b/doc/libtiff.rst +@@ -90,11 +90,15 @@ compatibility on machines with a segmented architecture. + :c:func:`realloc`, and :c:func:`free` routines in the C library.) + + To deal with segmented pointer issues ``libtiff`` also provides +-:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemmove` ++:c:func:`_TIFFmemcpy`, :c:func:`_TIFFmemset`, and :c:func:`_TIFFmemcmp` + routines that mimic the equivalent ANSI C routines, but that are + intended for use with memory allocated through :c:func:`_TIFFmalloc` + and :c:func:`_TIFFrealloc`. + ++With ``libtiff`` 4.5 a method was introduced to limit the internal ++memory allocation that functions are allowed to request per call ++(see :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc` and :c:func:`TIFFOpenExt`). ++ + Error Handling + -------------- + +@@ -106,6 +110,10 @@ routine that can be specified with a call to :c:func:`TIFFSetErrorHandler`. + Likewise warning messages are directed to a single handler routine + that can be specified with a call to :c:func:`TIFFSetWarningHandler` + ++Further application-specific and per-TIFF handle (re-entrant) error handler ++and warning handler can be set. Please refer to :doc:`/functions/TIFFError` ++and :doc:`/functions/TIFFOpenOptions`. ++ + Basic File Handling + ------------------- + +@@ -139,7 +147,7 @@ a ``"w"`` argument: + main() + { + TIFF* tif = TIFFOpen("foo.tif", "w"); +- ... do stuff ... ++ /* ... do stuff ... */ + TIFFClose(tif); + } + +@@ -157,6 +165,25 @@ to always call :c:func:`TIFFClose` or :c:func:`TIFFFlush` to flush any + buffered information to a file. Note that if you call :c:func:`TIFFClose` + you do not need to call :c:func:`TIFFFlush`. + ++.. warning:: ++ ++ In order to prevent out-of-memory issues when opening a TIFF file ++ :c:func:`TIFFOpenExt` can be used and then the maximum single memory ++ limit in byte that ``libtiff`` internal memory allocation functions ++ are allowed to request per call can be set with ++ :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`. ++ ++Example ++ ++:: ++ ++ tmsize_t limit = (256 * 1024 * 1024); ++ TIFFOpenOptions *opts = TIFFOpenOptionsAlloc(); ++ TIFFOpenOptionsSetMaxSingleMemAlloc(opts, limit); ++ TIFF *tif = TIFFOpenExt("foo.tif", "w", opts); ++ TIFFOpenOptionsFree(opts); ++ /* ... go on here ... */ ++ + TIFF Directories + ---------------- + +-- +2.40.0 + diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch new file mode 100644 index 0000000000..19a1ef727a --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52355-0002.patch @@ -0,0 +1,28 @@ +From 16ab4a205cfc938c32686e8d697d048fabf97ed4 Mon Sep 17 00:00:00 2001 +From: Timothy Lyanguzov <theta682@gmail.com> +Date: Thu, 1 Feb 2024 11:19:06 +0000 +Subject: [PATCH] Fix typo. + +CVE: CVE-2023-52355 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/16ab4a205cfc938c32686e8d697d048fabf97ed4] + +Signed-off-by: Yogita Urade <yogita.urade@windriver.com> +--- + doc/libtiff.rst | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/libtiff.rst b/doc/libtiff.rst +index d96a860..4fedc3e 100644 +--- a/doc/libtiff.rst ++++ b/doc/libtiff.rst +@@ -169,7 +169,7 @@ you do not need to call :c:func:`TIFFFlush`. + + In order to prevent out-of-memory issues when opening a TIFF file + :c:func:`TIFFOpenExt` can be used and then the maximum single memory +- limit in byte that ``libtiff`` internal memory allocation functions ++ limit in bytes that ``libtiff`` internal memory allocation functions + are allowed to request per call can be set with + :c:func:`TIFFOpenOptionsSetMaxSingleMemAlloc`. + +-- +2.40.0 diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch new file mode 100644 index 0000000000..75f5d8946a --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-52356.patch @@ -0,0 +1,49 @@ +From 51558511bdbbcffdce534db21dbaf5d54b31638a Mon Sep 17 00:00:00 2001 +From: Even Rouault <even.rouault@spatialys.com> +Date: Thu, 1 Feb 2024 11:38:14 +0000 +Subject: [PATCH] TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of + col/row (fixes #622) + +CVE: CVE-2023-52356 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/51558511bdbbcffdce534db21dbaf5d54b31638a] + +Signed-off-by: Yogita Urade <yogita.urade@windriver.com> +--- + libtiff/tif_getimage.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c +index 41f7dfd..9cd6eee 100644 +--- a/libtiff/tif_getimage.c ++++ b/libtiff/tif_getimage.c +@@ -3224,6 +3224,13 @@ int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, + if (TIFFRGBAImageOK(tif, emsg) && + TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) + { ++ if (row >= img.height) ++ { ++ TIFFErrorExtR(tif, TIFFFileName(tif), ++ "Invalid row passed to TIFFReadRGBAStrip()."); ++ TIFFRGBAImageEnd(&img); ++ return (0); ++ } + + img.row_offset = row; + img.col_offset = 0; +@@ -3301,6 +3308,14 @@ int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, + return (0); + } + ++ if (col >= img.width || row >= img.height) ++ { ++ TIFFErrorExtR(tif, TIFFFileName(tif), ++ "Invalid row/col passed to TIFFReadRGBATile()."); ++ TIFFRGBAImageEnd(&img); ++ return (0); ++ } ++ + /* + * The TIFFRGBAImageGet() function doesn't allow us to get off the + * edge of the image, even to fill an otherwise valid tile. So we +-- +2.40.0 diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch new file mode 100644 index 0000000000..2020508fdf --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6228.patch @@ -0,0 +1,31 @@ +From 1e7d217a323eac701b134afc4ae39b6bdfdbc96a Mon Sep 17 00:00:00 2001 +From: Su_Laus <sulau@freenet.de> +Date: Wed, 17 Jan 2024 06:57:08 +0000 +Subject: [PATCH] codec of input image is available, independently from codec + check of output image and return with error if not. + +Fixes #606. + +CVE: CVE-2023-6228 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/1e7d217a323eac701b134afc4ae39b6bdfdbc96a] + +Signed-off-by: Yogita Urade <yogita.urade@windriver.com> +--- + tools/tiffcp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/tiffcp.c b/tools/tiffcp.c +index aff0626..a4f7f6b 100644 +--- a/tools/tiffcp.c ++++ b/tools/tiffcp.c +@@ -846,6 +846,8 @@ static int tiffcp(TIFF *in, TIFF *out) + if (!TIFFIsCODECConfigured(compression)) + return FALSE; + TIFFGetFieldDefaulted(in, TIFFTAG_COMPRESSION, &input_compression); ++ if (!TIFFIsCODECConfigured(input_compression)) ++ return FALSE; + TIFFGetFieldDefaulted(in, TIFFTAG_PHOTOMETRIC, &input_photometric); + if (input_compression == COMPRESSION_JPEG) + { +-- +2.40.0 diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch new file mode 100644 index 0000000000..5d15dff1d9 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch @@ -0,0 +1,27 @@ +From e1640519208121f916da1772a5efb6ca28971b86 Mon Sep 17 00:00:00 2001 +From: Even Rouault <even.rouault@spatialys.com> +Date: Tue, 31 Oct 2023 15:04:37 +0000 +Subject: [PATCH 3/3] Apply 1 suggestion(s) to 1 file(s) + +CVE: CVE-2023-6277 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libtiff/tif_dirread.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c +index fe8d6f8..58a4276 100644 +--- a/libtiff/tif_dirread.c ++++ b/libtiff/tif_dirread.c +@@ -5306,7 +5306,6 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, + { + uint64_t space; + uint16_t n; +- filesize = TIFFGetFileSize(tif); + if (!(tif->tif_flags & TIFF_BIGTIFF)) + space = sizeof(TIFFHeaderClassic) + 2 + dircount * 12 + 4; + else +-- +2.43.0 + diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch new file mode 100644 index 0000000000..9fc8182fef --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch @@ -0,0 +1,36 @@ +From f500facf7723f1cae725dd288b2daad15e45131c Mon Sep 17 00:00:00 2001 +From: Su_Laus <sulau@freenet.de> +Date: Mon, 30 Oct 2023 21:21:57 +0100 +Subject: [PATCH 2/3] At image reading, compare data size of some tags / data + structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) with + file size to prevent provoked out-of-memory attacks. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See issue #614. + +Correct declaration of ‘filesize’ shadows a previous local. + +CVE: CVE-2023-6277 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libtiff/tif_dirread.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c +index c52d41f..fe8d6f8 100644 +--- a/libtiff/tif_dirread.c ++++ b/libtiff/tif_dirread.c +@@ -5305,7 +5305,6 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, + if (td->td_compression != COMPRESSION_NONE) + { + uint64_t space; +- uint64_t filesize; + uint16_t n; + filesize = TIFFGetFileSize(tif); + if (!(tif->tif_flags & TIFF_BIGTIFF)) +-- +2.43.0 + diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch new file mode 100644 index 0000000000..d5854a9059 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch @@ -0,0 +1,162 @@ +From b33baa5d9c6aac8ce49b5180dd48e39697ab7a11 Mon Sep 17 00:00:00 2001 +From: Su_Laus <sulau@freenet.de> +Date: Fri, 27 Oct 2023 22:11:10 +0200 +Subject: [PATCH 1/3] At image reading, compare data size of some tags / data + structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) with + file size to prevent provoked out-of-memory attacks. + +See issue #614. + +CVE: CVE-2023-6277 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/merge_requests/545] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libtiff/tif_dirread.c | 90 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 90 insertions(+) + +diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c +index 2c49dc6..c52d41f 100644 +--- a/libtiff/tif_dirread.c ++++ b/libtiff/tif_dirread.c +@@ -1308,6 +1308,21 @@ TIFFReadDirEntryArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry, + datasize = (*count) * typesize; + assert((tmsize_t)datasize > 0); + ++ /* Before allocating a huge amount of memory for corrupted files, check if ++ * size of requested memory is not greater than file size. ++ */ ++ uint64_t filesize = TIFFGetFileSize(tif); ++ if (datasize > filesize) ++ { ++ TIFFWarningExtR(tif, "ReadDirEntryArray", ++ "Requested memory size for tag %d (0x%x) %" PRIu32 ++ " is greather than filesize %" PRIu64 ++ ". Memory not allocated, tag not read", ++ direntry->tdir_tag, direntry->tdir_tag, datasize, ++ filesize); ++ return (TIFFReadDirEntryErrAlloc); ++ } ++ + if (isMapped(tif) && datasize > (uint64_t)tif->tif_size) + return TIFFReadDirEntryErrIo; + +@@ -5266,6 +5281,20 @@ static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, + if (!_TIFFFillStrilesInternal(tif, 0)) + return -1; + ++ /* Before allocating a huge amount of memory for corrupted files, check if ++ * size of requested memory is not greater than file size. */ ++ uint64_t filesize = TIFFGetFileSize(tif); ++ uint64_t allocsize = (uint64_t)td->td_nstrips * sizeof(uint64_t); ++ if (allocsize > filesize) ++ { ++ TIFFWarningExtR(tif, module, ++ "Requested memory size for StripByteCounts of %" PRIu64 ++ " is greather than filesize %" PRIu64 ++ ". Memory not allocated", ++ allocsize, filesize); ++ return -1; ++ } ++ + if (td->td_stripbytecount_p) + _TIFFfreeExt(tif, td->td_stripbytecount_p); + td->td_stripbytecount_p = (uint64_t *)_TIFFCheckMalloc( +@@ -5807,6 +5836,20 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, + dircount16 = (uint16_t)dircount64; + dirsize = 20; + } ++ /* Before allocating a huge amount of memory for corrupted files, check ++ * if size of requested memory is not greater than file size. */ ++ uint64_t filesize = TIFFGetFileSize(tif); ++ uint64_t allocsize = (uint64_t)dircount16 * dirsize; ++ if (allocsize > filesize) ++ { ++ TIFFWarningExtR( ++ tif, module, ++ "Requested memory size for TIFF directory of %" PRIu64 ++ " is greather than filesize %" PRIu64 ++ ". Memory not allocated, TIFF directory not read", ++ allocsize, filesize); ++ return 0; ++ } + origdir = _TIFFCheckMalloc(tif, dircount16, dirsize, + "to read TIFF directory"); + if (origdir == NULL) +@@ -5921,6 +5964,20 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, + "directories not supported"); + return 0; + } ++ /* Before allocating a huge amount of memory for corrupted files, check ++ * if size of requested memory is not greater than file size. */ ++ uint64_t filesize = TIFFGetFileSize(tif); ++ uint64_t allocsize = (uint64_t)dircount16 * dirsize; ++ if (allocsize > filesize) ++ { ++ TIFFWarningExtR( ++ tif, module, ++ "Requested memory size for TIFF directory of %" PRIu64 ++ " is greather than filesize %" PRIu64 ++ ". Memory not allocated, TIFF directory not read", ++ allocsize, filesize); ++ return 0; ++ } + origdir = _TIFFCheckMalloc(tif, dircount16, dirsize, + "to read TIFF directory"); + if (origdir == NULL) +@@ -5968,6 +6025,8 @@ static uint16_t TIFFFetchDirectory(TIFF *tif, uint64_t diroff, + } + } + } ++ /* No check against filesize needed here because "dir" should have same size ++ * than "origdir" checked above. */ + dir = (TIFFDirEntry *)_TIFFCheckMalloc( + tif, dircount16, sizeof(TIFFDirEntry), "to read TIFF directory"); + if (dir == 0) +@@ -7164,6 +7223,20 @@ static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, uint32_t nstrips, + return (0); + } + ++ /* Before allocating a huge amount of memory for corrupted files, check ++ * if size of requested memory is not greater than file size. */ ++ uint64_t filesize = TIFFGetFileSize(tif); ++ uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t); ++ if (allocsize > filesize) ++ { ++ TIFFWarningExtR(tif, module, ++ "Requested memory size for StripArray of %" PRIu64 ++ " is greather than filesize %" PRIu64 ++ ". Memory not allocated", ++ allocsize, filesize); ++ _TIFFfreeExt(tif, data); ++ return (0); ++ } + resizeddata = (uint64_t *)_TIFFCheckMalloc( + tif, nstrips, sizeof(uint64_t), "for strip array"); + if (resizeddata == 0) +@@ -7263,6 +7336,23 @@ static void allocChoppedUpStripArrays(TIFF *tif, uint32_t nstrips, + } + bytecount = last_offset + last_bytecount - offset; + ++ /* Before allocating a huge amount of memory for corrupted files, check if ++ * size of StripByteCount and StripOffset tags is not greater than ++ * file size. ++ */ ++ uint64_t allocsize = (uint64_t)nstrips * sizeof(uint64_t) * 2; ++ uint64_t filesize = TIFFGetFileSize(tif); ++ if (allocsize > filesize) ++ { ++ TIFFWarningExtR(tif, "allocChoppedUpStripArrays", ++ "Requested memory size for StripByteCount and " ++ "StripOffsets %" PRIu64 ++ " is greather than filesize %" PRIu64 ++ ". Memory not allocated", ++ allocsize, filesize); ++ return; ++ } ++ + newcounts = + (uint64_t *)_TIFFCheckMalloc(tif, nstrips, sizeof(uint64_t), + "for chopped \"StripByteCounts\" array"); +-- +2.43.0 + diff --git a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb index 6852758c6a..d42ea6a6e5 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb @@ -4,20 +4,27 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - " -SRC_URI[sha256sum] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" + file://CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data.patch \ + file://CVE-2023-6277-At-image-reading-compare-data-size-of-some-tags-data-2.patch \ + file://CVE-2023-6277-Apply-1-suggestion-s-to-1-file-s.patch \ + file://CVE-2023-6228.patch \ + file://CVE-2023-52355-0001.patch \ + file://CVE-2023-52355-0002.patch \ + file://CVE-2023-52356.patch \ + " + +SRC_URI[sha256sum] = "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" -# Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313 -# and 4.3.0 doesn't have the issue -CVE_CHECK_WHITELIST += "CVE-2015-7313" +CVE_STATUS[CVE-2015-7313] = "fixed-version: Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313 and already 4.3.0 doesn't have the issue" +CVE_STATUS[CVE-2023-3164] = "cpe-incorrect: Issue only affects the tiffcrop tool not compiled by default since 4.6.0" inherit autotools multilib_header @@ -27,9 +34,13 @@ PACKAGECONFIG ?= "cxx jpeg zlib lzma \ strip-chopping extrasample-as-alpha check-ycbcr-subsampling" PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,," +PACKAGECONFIG[jbig] = "--enable-jbig,--disable-jbig,jbig," PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg," PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib," PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz," +PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp," +PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd," +PACKAGECONFIG[libdeflate] = "--enable-libdeflate,--disable-libdeflate,libdeflate," # Convert single-strip uncompressed images to multiple strips of specified # size (default: 8192) to reduce memory usage diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch deleted file mode 100644 index b2544cb44d..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch +++ /dev/null @@ -1,156 +0,0 @@ -From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001 -From: Jan Schmidt <thaytan@noraisin.net> -Date: Sun, 10 Nov 2013 00:49:52 +1100 -Subject: [PATCH] Import revision 1206 from upstream to fix PIE build. - -Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm -in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad -for shared libraries. Some environments demand that .text actually be -read-only all the time, yet MC_put_o_16_arm etc require that the addresses -be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.) -Even in those environments which permit the dynamic linker to modify the -.text segment, the runtime cost of doing the relocation can be noticeable. - -This commit rewrites the linkage, discarding the tables of addresses -in favor of tables of offsets. All transfers are local within each individual -function, so there can be no interference by processing that occurs -after assembly, such as link-time re-ordering (even of individual functions.) - -Patch by John Reiser <jreiser@bitwagon.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499] ---- - libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++------------------- - 1 file changed, 33 insertions(+), 37 deletions(-) - -diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S -index c921f7c..82143f8 100644 ---- a/libmpeg2/motion_comp_arm_s.S -+++ b/libmpeg2/motion_comp_arm_s.S -@@ -30,9 +30,13 @@ MC_put_o_16_arm: - pld [r1] - stmfd sp!, {r4-r11, lr} @ R14 is also called LR - and r4, r1, #3 -- adr r5, MC_put_o_16_arm_align_jt -- add r5, r5, r4, lsl #2 -- ldr pc, [r5] -+ ldrb r4, [pc, r4] -+ add pc, pc, r4, lsl #2 -+ .byte (MC_put_o_16_arm_align0 - 0f)>>2 -+ .byte (MC_put_o_16_arm_align1 - 0f)>>2 -+ .byte (MC_put_o_16_arm_align2 - 0f)>>2 -+ .byte (MC_put_o_16_arm_align3 - 0f)>>2 -+0: - - MC_put_o_16_arm_align0: - ldmia r1, {r4-r7} -@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3: - 1: PROC(24) - bne 1b - ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. --MC_put_o_16_arm_align_jt: -- .word MC_put_o_16_arm_align0 -- .word MC_put_o_16_arm_align1 -- .word MC_put_o_16_arm_align2 -- .word MC_put_o_16_arm_align3 - - @ ---------------------------------------------------------------- - .align -@@ -91,9 +90,14 @@ MC_put_o_8_arm: - pld [r1] - stmfd sp!, {r4-r10, lr} @ R14 is also called LR - and r4, r1, #3 -- adr r5, MC_put_o_8_arm_align_jt -- add r5, r5, r4, lsl #2 -- ldr pc, [r5] -+ ldrb r4, [pc, r4] -+ add pc, pc, r4, lsl #2 -+ .byte (MC_put_o_8_arm_align0 - 0f)>>2 -+ .byte (MC_put_o_8_arm_align1 - 0f)>>2 -+ .byte (MC_put_o_8_arm_align2 - 0f)>>2 -+ .byte (MC_put_o_8_arm_align3 - 0f)>>2 -+0: -+ - MC_put_o_8_arm_align0: - ldmia r1, {r4-r5} - add r1, r1, r2 -@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3: - bne 1b - ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. - --MC_put_o_8_arm_align_jt: -- .word MC_put_o_8_arm_align0 -- .word MC_put_o_8_arm_align1 -- .word MC_put_o_8_arm_align2 -- .word MC_put_o_8_arm_align3 -- - @ ---------------------------------------------------------------- - .macro AVG_PW rW1, rW2 - mov \rW2, \rW2, lsl #24 -@@ -160,12 +158,17 @@ MC_put_x_16_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] - stmfd sp!, {r4-r11,lr} @ R14 is also called LR -+ ldr r11, 0f - and r4, r1, #3 -- adr r5, MC_put_x_16_arm_align_jt -- ldr r11, [r5] - mvn r12, r11 -- add r5, r5, r4, lsl #2 -- ldr pc, [r5, #4] -+ ldrb r4, [pc, r4] -+ add pc, pc, r4, lsl #2 -+ .byte (MC_put_x_16_arm_align0 - 0f)>>2 -+ .byte (MC_put_x_16_arm_align1 - 0f)>>2 -+ .byte (MC_put_x_16_arm_align2 - 0f)>>2 -+ .byte (MC_put_x_16_arm_align3 - 0f)>>2 -+0: -+ .word 0x01010101 - - .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4 - mov \R0, \R0, lsr #(\shift) -@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3: - add r0, r0, r2 - bne 1b - ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. --MC_put_x_16_arm_align_jt: -- .word 0x01010101 -- .word MC_put_x_16_arm_align0 -- .word MC_put_x_16_arm_align1 -- .word MC_put_x_16_arm_align2 -- .word MC_put_x_16_arm_align3 - - @ ---------------------------------------------------------------- - .align -@@ -253,12 +250,17 @@ MC_put_x_8_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] - stmfd sp!, {r4-r11,lr} @ R14 is also called LR -+ ldr r11, 0f - and r4, r1, #3 -- adr r5, MC_put_x_8_arm_align_jt -- ldr r11, [r5] - mvn r12, r11 -- add r5, r5, r4, lsl #2 -- ldr pc, [r5, #4] -+ ldrb r4, [pc, r4] -+ add pc, pc, r4, lsl #2 -+ .byte (MC_put_x_8_arm_align0 - 0f)>>2 -+ .byte (MC_put_x_8_arm_align1 - 0f)>>2 -+ .byte (MC_put_x_8_arm_align2 - 0f)>>2 -+ .byte (MC_put_x_8_arm_align3 - 0f)>>2 -+0: -+ .word 0x01010101 - - .macro ADJ_ALIGN_DW shift, R0, R1, R2 - mov \R0, \R0, lsr #(\shift) -@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3: - add r0, r0, r2 - bne 1b - ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. --MC_put_x_8_arm_align_jt: -- .word 0x01010101 -- .word MC_put_x_8_arm_align0 -- .word MC_put_x_8_arm_align1 -- .word MC_put_x_8_arm_align2 -- .word MC_put_x_8_arm_align3 diff --git a/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch b/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch deleted file mode 100644 index 5bf68b39ee..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/files/0001-check-for-available-arm-optimizations.patch +++ /dev/null @@ -1,55 +0,0 @@ -From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 5 Jul 2017 18:49:21 -0700 -Subject: [PATCH 1/2] check for available arm optimizations - -Taken From -http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.ac | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index acdcb1e..2c0a721 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then - AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) - - dnl arch-specific flags -- arm_conditional=false -+ build_arm_opt=false - case "$host" in - i?86-* | k?-* | x86_64-* | amd64-*) - AC_DEFINE([ARCH_X86],,[x86 architecture]) -@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then - alpha*) - AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);; - arm*) -- arm_conditional=: -- AC_DEFINE([ARCH_ARM],,[ARM architecture]);; -+ AC_LANG(C) -+ AC_COMPILE_IFELSE( -+ [AC_LANG_SOURCE([[ -+ void foo(void) { __asm__ volatile("pld [r1]"); }]])], -+ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]), -+ build_arm_opt=false);; - esac - elif test x"$CC" = x"tendracc"; then - dnl TenDRA portability checking compiler -@@ -123,7 +127,7 @@ else - esac - fi - --AM_CONDITIONAL(ARCH_ARM, ${arm_conditional}) -+AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue) - - dnl Checks for libtool - this must be done after we set cflags - AC_LIBTOOL_WIN32_DLL --- -2.13.2 - diff --git a/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch b/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch deleted file mode 100644 index 8301692368..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/files/0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch +++ /dev/null @@ -1,63 +0,0 @@ -From f9d9dc92d75f8910e3cd5fdcbea72e505cdf3493 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 5 Jul 2017 19:03:36 -0700 -Subject: [PATCH 2/2] Set visibility of global symbols used in ARM specific - assembly file to internal - -Taken from -http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/60_arm-private-symbols.patch/ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libmpeg2/motion_comp_arm_s.S | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S -index f6c3d7d..c921f7c 100644 ---- a/libmpeg2/motion_comp_arm_s.S -+++ b/libmpeg2/motion_comp_arm_s.S -@@ -23,7 +23,8 @@ - - @ ---------------------------------------------------------------- - .align -- .global MC_put_o_16_arm -+ .global MC_put_o_16_arm -+ .internal MC_put_o_16_arm - MC_put_o_16_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] -@@ -83,7 +84,8 @@ MC_put_o_16_arm_align_jt: - - @ ---------------------------------------------------------------- - .align -- .global MC_put_o_8_arm -+ .global MC_put_o_8_arm -+ .internal MC_put_o_8_arm - MC_put_o_8_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] -@@ -152,7 +154,8 @@ MC_put_o_8_arm_align_jt: - .endm - - .align -- .global MC_put_x_16_arm -+ .global MC_put_x_16_arm -+ .internal MC_put_x_16_arm - MC_put_x_16_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] -@@ -244,7 +247,8 @@ MC_put_x_16_arm_align_jt: - - @ ---------------------------------------------------------------- - .align -- .global MC_put_x_8_arm -+ .global MC_put_x_8_arm -+ .internal MC_put_x_8_arm - MC_put_x_8_arm: - @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) - pld [r1] --- -2.13.2 - diff --git a/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch b/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch deleted file mode 100644 index 00b667d336..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch +++ /dev/null @@ -1,70 +0,0 @@ -Rewrite the public symbol check to verify the shared libraries, to check for -more things, and to avoid duplication; fixes make check on ARM - -Taken From -https://sources.debian.org/src/mpeg2dec/0.5.1-8/debian/patches/61_global-symbol-test.patch/ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - test/globals | 42 +++++++++++++++++++++++++++--------------- - 1 file changed, 27 insertions(+), 15 deletions(-) - ---- mpeg2dec.orig/test/globals -+++ mpeg2dec/test/globals -@@ -1,4 +1,8 @@ - #!/bin/sh -+# TODO -+# - fix checking of .a libs; problem is that "nm -g --defined-only" lists -+# internal symbols; this can be solved by using objdump, but it's probably -+# good enough to just run the tests on the shared lib - - if test x"$srcdir" != x""; then - builddir="." # running from make check, but it does not define that -@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd` - - error=0 - --bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\ -- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'` -- --if test x"$bad_globals" != x""; then -- echo BAD GLOBAL SYMBOLS: -- for s in $bad_globals; do echo $s; done -+# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...] -+# -+# checks public symbols in shared libs: -+# - allow prefix_anything -+# - reject _prefixanything -+# - allow _anything -+# - reject anything else -+# -+# NB: skips missing files -+check_bad_public_symbols() { -+ symbols_prefix="$1" -+ shift -+ lib_files=`ls "$@" 2>/dev/null` -+ [ -z "$lib_files" ] && return -+ bad_globals=`nm -g --defined-only $lib_files | -+ awk '{if ($3) print $3}' | -+ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"` -+ [ -z "$bad_globals" ] && return - error=1 --fi -- --bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\ -- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'` -+ echo BAD GLOBAL SYMBOLS in $lib_files: -+ echo "$bad_globals" -+} - --if test x"$bad_globals" != x""; then -- echo BAD GLOBAL SYMBOLS: -- for s in $bad_globals; do echo $s; done -- error=1 --fi -+check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so -+check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so - - exit $error diff --git a/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch deleted file mode 100644 index 5113ad44fe..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch +++ /dev/null @@ -1,43 +0,0 @@ -Add new method to judge whether <altivec.h> is needed - -The original logic will use "typedef vector int t;" to judge -whether <altivec.h> is needed. altivec.h contains the following -statement: - - #if !defined(__APPLE_ALTIVEC__) - #define vector __vector - #define pixel __pixel - #define bool - #endif - -In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither -as vector, pixel, and bool. In order to make "typedef vector int t;" -pass the compilation, we need to include altivec.h. - -However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler, -so as vector, pixel, and bool. We could not judge whether -altivec.h is needed by "typedef vector int t;". -Here we include another statement "int tmp = __CR6_EQ;", in -which __CR6_EQ is defined in altivec.h. - -Upstream-Status: Pending - -Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> - -diff -ruN a/configure.in b/configure.in ---- a/configure.ac 2010-09-14 20:55:42.399687663 +0800 -+++ b/configure.ac 2010-09-14 20:56:43.403204648 +0800 -@@ -79,11 +79,11 @@ - CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" - AC_MSG_CHECKING([if <altivec.h> is needed]) - AC_TRY_COMPILE([], -- [typedef vector int t; -+ [typedef vector int t; int tmp = __CR6_EQ; - vec_ld(0, (unsigned char *)0);], - [have_altivec=yes; AC_MSG_RESULT(no)], - [AC_TRY_COMPILE([#include <altivec.h>], -- [typedef vector int t; vec_ld(0, (unsigned char *)0);], -+ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);], - [AC_DEFINE([HAVE_ALTIVEC_H],, - [Define to 1 if you have the <altivec.h> header.]) - have_altivec=yes; AC_MSG_RESULT(yes)], diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb deleted file mode 100644 index ee4b754c12..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams" -DESCRIPTION = "mpeg2dec is a test program for libmpeg2. It decodes \ -mpeg-1 and mpeg-2 video streams, and also includes a demultiplexer \ -for mpeg-1 and mpeg-2 program streams. The main purpose of mpeg2dec \ -is to have a simple test bed for libmpeg2." -HOMEPAGE = "https://libmpeg2.sourceforge.io/" -SECTION = "libs" -LICENSE = "GPLv2+" -LICENSE_FLAGS = "commercial" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://include/mpeg2.h;beginline=1;endline=22;md5=7766f4fcb58f0f8413c49a746f2ab89b" - -SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \ - file://altivec_h_needed.patch \ - file://0001-check-for-available-arm-optimizations.patch \ - file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \ - file://61_global-symbol-test.patch \ - file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \ - " - -S = "${WORKDIR}/libmpeg2-${PV}" - -SRC_URI[md5sum] = "0f92c7454e58379b4a5a378485bbd8ef" -SRC_URI[sha256sum] = "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4" - -UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--enable-shared --disable-sdl" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv" - -PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev" - -FILES:${PN} = "${bindir}/*" -FILES:libmpeg2 = "${libdir}/libmpeg2.so.*" -FILES:libmpeg2convert = "${libdir}/libmpeg2convert.so.*" -FILES:libmpeg2-dev = "${libdir}/libmpeg2.so \ - ${libdir}/libmpeg2.la \ - ${libdir}/libmpeg2arch.la \ - ${libdir}/pkgconfig/libmpeg2.pc \ - ${includedir}/mpeg2dec/mpeg2.h" -FILES:libmpeg2-staticdev = "${libdir}/libmpeg2.a" -FILES:libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \ - ${libdir}/libmpeg2convert.la \ - ${libdir}/libmpeg2convertarch.la \ - ${libdir}/pkgconfig/libmpeg2convert.pc \ - ${includedir}/mpeg2dec/mpeg2convert.h" -FILES:libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a" diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.28.2.bb b/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb index 896162a251..f7786e8588 100644 --- a/meta/recipes-multimedia/mpg123/mpg123_1.28.2.bb +++ b/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb @@ -6,11 +6,11 @@ HOMEPAGE = "http://mpg123.de/" BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/" SECTION = "multimedia" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169" SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2" -SRC_URI[sha256sum] = "7eefd4b68fdac7e138d04c37efe12155a8ebf25a5bccf0fb7e775af22d21db00" +SRC_URI[sha256sum] = "ccdd1d0abc31d73d8b435fc658c79049d0a905b30669b6a42a03ad169dc609e6" UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar" @@ -35,8 +35,11 @@ PACKAGECONFIG[sdl] = ",,libsdl2" AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}" AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}" +CACHED_CONFIGUREVARS:libc-musl = "ac_cv_sys_file_offset_bits=no" + EXTRA_OECONF = " \ --enable-shared \ + --enable-largefile \ --with-audio='${AUDIOMODS}' \ ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \ ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \ diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index 4a1456d407..ae16056d24 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -2,10 +2,10 @@ SUMMARY = "Sound server for Linux and Unix-like operating systems" DESCRIPTION = "A general purpose sound server intended to run as a middleware \ between your applications and your hardware devices, either using ALSA or OSS." HOMEPAGE = "http://www.pulseaudio.org" -AUTHOR = "Lennart Poettering" SECTION = "libs/multimedia" -# Most of PulseAudio code is under LGPLv2.1+. There are a few exceptions: +# Most of PulseAudio code is under LGPL-2.1-or-later. There are a few +# exceptions: # # The "adrian" echo canceller variant has code under a non-standard permissive # license. See src/modules/echo-cancel/adrian-license.txt for details. This @@ -39,12 +39,13 @@ SECTION = "libs/multimedia" # The dependency with the most complicated licensing considerations is libdbus. # When PACKAGECONFIG[dbus] is enabled (like it is by default), libdbus will be # used by both the server and the client library (libpulse). Does this affect -# applications that use libpulse? It should be also noted that libdbus is -# dual-licensed: either GPLv2+ or AFL-2 terms apply. Whose decision is it which -# of the licenses apply? What a mess. Some people hold the view that libdbus is -# a system library that is covered by the "special exception" in GPLv2's -# section 3, and therefore libdbus's GPL license doesn't affect PulseAudio. -LICENSE = "LGPLv2.1+ & MIT & BSD-3-Clause" +# applications that use libpulse? It should also be noted that libdbus is +# dual-licensed: either GPL-2.0-or-later or AFL-2.0 terms apply. Whose decision +# is it which of the licenses apply? What a mess. Some people hold the view that +# libdbus is a system library that is covered by the "special exception" in +# GPLv2's section 3, and therefore libdbus's GPL license doesn't affect +# PulseAudio. +LICENSE = "LGPL-2.1-or-later & MIT & BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \ file://GPL;md5=4325afd396febcb659c36b49533135d4 \ @@ -59,7 +60,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \ " # libtool is needed for libltdl, used in module loading. -DEPENDS = "libatomic-ops libsndfile1 libtool" +DEPENDS = "m4-native libatomic-ops libsndfile1 libtool" # optional DEPENDS += "udev alsa-lib glib-2.0" DEPENDS += "speexdsp libxml-parser-perl-native libcap" @@ -186,6 +187,7 @@ FILES:${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala" FILES:${PN}-bin += "${sysconfdir}/default/volatiles/04_pulse" FILES:${PN}-pa-info = "${bindir}/pa-info" FILES:${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*" +FILES:${PN}-server += "${datadir}/dbus-1/system.d/pulseaudio-system.conf" #SYSTEMD_PACKAGES = "${PN}-server" SYSTEMD_SERVICE:${PN}-server = "pulseaudio.service" @@ -211,7 +213,7 @@ pkg_postinst:${PN}-server() { } python populate_packages:prepend() { - plugindir = d.expand('${libdir}/pulse-${PV}/modules/') + plugindir = d.expand('${libdir}/pulseaudio/modules/') do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True) do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True) } @@ -252,11 +254,11 @@ RDEPENDS:pulseaudio-server = " \ # If the server is installed, it's usually desirable to make ALSA applications # use PulseAudio. alsa-plugins-pulseaudio-conf will install the configuration # that makes the PulseAudio plugin the default ALSA device. -RDEPENDS:pulseaudio-server += "alsa-plugins-pulseaudio-conf" +RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" # pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG # but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES -RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" +RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit x11', 'consolekit', '', d)}" RDEPENDS:pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" FILES:${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-meson-Check-for-__get_cpuid.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-meson-Check-for-__get_cpuid.patch deleted file mode 100644 index c9d8abcbf2..0000000000 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-meson-Check-for-__get_cpuid.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 9d0dc8aedd08d77797f90fa6075a59613f18bf0d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 20 Dec 2020 07:56:07 -0800 -Subject: [PATCH] meson: Check for __get_cpuid - -checking for presence of cpuid.h header alone is not sufficient in some case to use -cpuid related functions. e.g. when using clang which is built for -multiple targets will have cpuid.h header as part of compiler headers in -distribution but one maybe compiling pulseaudion for non-x86 target. The -current check in meson succeeds and then compile fails later because -cpuid.h is x86-specific header. Therefore checking for symbol that is -needed makes this robust, so even if header exist it will try to ensure -the given symbol can be used - -Fixes -src/pulsecore/core-util.c:113: -| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/clang/11.0.1/include/cpuid.h:11:2: error: this header is for x86 only -| #error this header is for x86 only -| ^ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Cc: Tanu Kaskinen <tanuk@iki.fi> ---- - meson.build | 5 ++++- - src/pulsecore/core-util.c | 2 +- - src/pulsecore/cpu-x86.c | 2 +- - 3 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 2589627..5f5127e 100644 ---- a/meson.build -+++ b/meson.build -@@ -185,7 +185,6 @@ endif - check_headers = [ - 'arpa/inet.h', - 'byteswap.h', -- 'cpuid.h', - 'dlfcn.h', - 'execinfo.h', - 'grp.h', -@@ -243,6 +242,10 @@ if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT') - cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1) - endif - -+if cc.has_header_symbol('cpuid.h', '__get_cpuid') -+ cdata.set('HAVE_GET_CPUID', 1) -+endif -+ - # Functions - - check_functions = [ -diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c -index 601b1d1..6f34e7c 100644 ---- a/src/pulsecore/core-util.c -+++ b/src/pulsecore/core-util.c -@@ -109,7 +109,7 @@ - #include <sys/personality.h> - #endif - --#ifdef HAVE_CPUID_H -+#ifdef HAVE_GET_CPUID - #include <cpuid.h> - #endif - -diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c -index 4e59e14..86595d4 100644 ---- a/src/pulsecore/cpu-x86.c -+++ b/src/pulsecore/cpu-x86.c -@@ -24,7 +24,7 @@ - - #include <stdint.h> - --#ifdef HAVE_CPUID_H -+#ifdef HAVE_GET_CPUID - #include <cpuid.h> - #endif - --- -2.29.2 - diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_15.0.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb index 239d31810b..54c79b4097 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_15.0.bb +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_17.0.bb @@ -3,9 +3,8 @@ require pulseaudio.inc SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ file://0001-client-conf-Add-allow-autospawn-for-root.patch \ file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \ - file://0001-meson-Check-for-__get_cpuid.patch \ file://volatiles.04_pulse \ file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \ " -SRC_URI[sha256sum] = "a40b887a3ba98cc26976eb11bdb6613988f145b19024d1b6555c6a03c9cba1a0" +SRC_URI[sha256sum] = "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5" UPSTREAM_CHECK_REGEX = "pulseaudio-(?P<pver>\d+(\.(?!99)\d+)+)\.tar" diff --git a/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch b/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch deleted file mode 100644 index 11cec74fbb..0000000000 --- a/meta/recipes-multimedia/sbc/sbc/0001-sbc_primitives-Fix-build-on-non-x86.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f4a1224323e386090a44bf70ee0ac9877ba7fb0d Mon Sep 17 00:00:00 2001 -From: Marius Bakke <marius@gnu.org> -Date: Tue, 22 Dec 2020 11:04:26 +0000 -Subject: [PATCH] sbc_primitives: Fix build on non-x86. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Don't call __builtin_cpu_init unless targeting i386 or x86_64. -Otherwise we get an error at link time: - - CC sbc/sbc_primitives.lo -sbc/sbc_primitives.c: In function ‘sbc_init_primitives_x86’: -sbc/sbc_primitives.c:596:2: warning: implicit declaration of function ‘__builtin_cpu_init’; did you mean ‘__builtin_irint’? [-Wimplicit-function-declaration] -[...] - CCLD src/sbcdec -ld: sbc/.libs/libsbc-private.a(sbc_primitives.o): in function `sbc_init_primitives': -sbc_primitives.c:(.text+0x3a30): undefined reference to `__builtin_cpu_init' - -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - sbc/sbc_primitives.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c -index 97a75be..09c214a 100644 ---- a/sbc/sbc_primitives.c -+++ b/sbc/sbc_primitives.c -@@ -593,6 +593,7 @@ static int sbc_calc_scalefactors_j( - - static void sbc_init_primitives_x86(struct sbc_encoder_state *state) - { -+#if defined(__x86_64__) || defined(__i386__) - __builtin_cpu_init(); - - #ifdef SBC_BUILD_WITH_MMX_SUPPORT -@@ -604,6 +605,7 @@ static void sbc_init_primitives_x86(struct sbc_encoder_state *state) - if (__builtin_cpu_supports("sse4.2")) - sbc_init_primitives_sse(state); - #endif -+#endif - } - - /* diff --git a/meta/recipes-multimedia/sbc/sbc_1.5.bb b/meta/recipes-multimedia/sbc/sbc_2.0.bb index 13bba6b6b3..d25be9e80c 100644 --- a/meta/recipes-multimedia/sbc/sbc_1.5.bb +++ b/meta/recipes-multimedia/sbc/sbc_2.0.bb @@ -2,9 +2,9 @@ SUMMARY = "SBC Audio Codec" DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library." HOMEPAGE = "https://www.bluez.org" SECTION = "libs" -LICENSE = "GPLv2+ & LGPLv2.1+" -LICENSE:${PN} = "LGPLv2.1+" -LICENSE:${PN}-examples = "GPLv2+" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LICENSE:${PN} = "LGPL-2.1-or-later" +LICENSE:${PN}-examples = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ file://src/sbcenc.c;beginline=1;endline=24;md5=08e7a70b127f4100ff2cd7d629147d8d \ @@ -12,11 +12,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ DEPENDS = "libsndfile1" -SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz \ - file://0001-sbc_primitives-Fix-build-on-non-x86.patch \ - " +SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" -SRC_URI[sha256sum] = "0cbad69823a99e8421fe0700e8cf9eeb8fa0c1ad28e8dbc2182b3353507931d2" +SRC_URI[sha256sum] = "8f12368e1dbbf55e14536520473cfb338c84b392939cc9b64298360fd4a07992" inherit autotools pkgconfig diff --git a/meta/recipes-multimedia/speex/speex_1.2.0.bb b/meta/recipes-multimedia/speex/speex_1.2.1.bb index 3a0911d6f8..c40198fa8f 100644 --- a/meta/recipes-multimedia/speex/speex_1.2.0.bb +++ b/meta/recipes-multimedia/speex/speex_1.2.1.bb @@ -3,15 +3,15 @@ DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compressi HOMEPAGE = "http://www.speex.org" SECTION = "libs" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \ - file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50" +LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a \ + file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50 \ + " DEPENDS = "libogg speexdsp" SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz" UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar" -SRC_URI[md5sum] = "8ab7bb2589110dfaf0ed7fa7757dc49c" -SRC_URI[sha256sum] = "eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094" +SRC_URI[sha256sum] = "4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea" inherit autotools pkgconfig lib_package diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb index bb7bc9aade..435b56bbb8 100644 --- a/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb +++ b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb @@ -3,14 +3,13 @@ DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library. HOMEPAGE = "http://www.speex.org" SECTION = "libs" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8" +LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a" SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz" UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar" -SRC_URI[md5sum] = "b722df341576dc185d897131321008fc" -SRC_URI[sha256sum] = "682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771" +SRC_URI[sha256sum] = "8c777343e4a6399569c72abc38a95b24db56882c83dbdb6c6424a5f4aeb54d3d" inherit autotools pkgconfig @@ -25,3 +24,5 @@ RCONFLICTS:${PN} = "speex (< 1.2rc2)" RCONFLICTS:${PN}-dbg = "speex-dbg (< 1.2rc2)" RCONFLICTS:${PN}-dev = "speex-dev (< 1.2rc2)" RCONFLICTS:${PN}-staticdev = "speex-staticdev (< 1.2rc2)" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-multimedia/webp/libwebp_1.2.1.bb b/meta/recipes-multimedia/webp/libwebp_1.4.0.bb index d634e02180..d922970479 100644 --- a/meta/recipes-multimedia/webp/libwebp_1.2.1.bb +++ b/meta/recipes-multimedia/webp/libwebp_1.4.0.bb @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \ file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7" SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz" -SRC_URI[sha256sum] = "808b98d2f5b84e9b27fdef6c5372dac769c3bda4502febbfa5031bd3c4d7d018" +SRC_URI[sha256sum] = "61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5" UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html" @@ -53,3 +53,5 @@ PACKAGES =+ "${PN}-gif2webp" DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP" FILES:${PN}-gif2webp = "${bindir}/gif2webp" + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb index 9f23794df1..e7d9e75e8d 100644 --- a/meta/recipes-multimedia/x264/x264_git.bb +++ b/meta/recipes-multimedia/x264/x264_git.bb @@ -2,21 +2,21 @@ SUMMARY = "H.264/MPEG-4 AVC video encoder" DESCRIPTION = "A free software library and application for encoding video streams into the H.264/MPEG-4 AVC format." HOMEPAGE = "http://www.videolan.org/developers/x264.html" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "nasm-native" -SRC_URI = "git://github.com/mirror/x264;branch=stable \ +SRC_URI = "git://github.com/mirror/x264;branch=stable;protocol=https \ file://don-t-default-to-cortex-a9-with-neon.patch \ file://Fix-X32-build-by-disabling-asm.patch \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "5db6aa6cab1b146e07b60cc1736a01f21da01154" +SRCREV = "baee400fa9ced6f5481a728138fed6e867b0ff7f" -PV = "r3039+git${SRCPV}" +PV = "r3039+git" S = "${WORKDIR}/git" |