diff options
Diffstat (limited to 'meta/recipes-multimedia')
85 files changed, 1721 insertions, 1971 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.6.1.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb index ca6bedae97..c212b17aa3 100644 --- a/meta/recipes-multimedia/alsa/alsa-lib_1.2.6.1.bb +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.2.11.bb @@ -9,14 +9,16 @@ 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] = "ad582993d52cdb5fb159a0beab60a6ac57eab0cc1bdf85dc4db6d6197f02333f" +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.6.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb index c435f61d4c..9500462d5c 100644 --- a/meta/recipes-multimedia/alsa/alsa-plugins_1.2.6.bb +++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.2.7.1.bb @@ -22,8 +22,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ 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] = "068818a4b55d8c029daa00015d853d45113f56b224b7c64e1e117988c825b2a0" +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 56acc84559..53868041c0 100644 --- a/meta/recipes-multimedia/alsa/alsa-tools_1.2.5.bb +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.2.11.bb @@ -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 diff --git a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.6.3.bb b/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.11.bb index a493269063..ce1a42c9b8 100644 --- a/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.6.3.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] = "b8a03aa387a624a2f65edc201bf777421190b60529a92087646823afbd96c5cd" +SRC_URI[sha256sum] = "387c01cf30e2a1676d7b8f72b2681cf219abca70dd1ec2a9e33add5bf3feae81" # Something went wrong at upstream tarballing inherit allarch diff --git a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.6.bb b/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.6.bb deleted file mode 100644 index 000e984a7d..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.6.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 bca7cdd3bd..e598fac9f8 100644 --- a/meta/recipes-multimedia/alsa/alsa-utils.inc +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.2.11.bb @@ -24,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] = "6a1efd8a1f1d9d38e489633eaec1fffa5c315663b316cab804be486887e6145d" +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 @@ -53,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}" @@ -61,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" @@ -74,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" @@ -89,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.6.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.2.6.bb deleted file mode 100644 index 3430288da4..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-utils_1.2.6.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 7d0a06f85b..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 4a891e1eddbf63f32fe769b5bff289f6748abf45 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: Submitted [http://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/291781.html] -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 +- - libavutil/x86/tx_float.asm | 2 +- - 7 files changed, 7 insertions(+), 7 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/libavutil/x86/tx_float.asm b/libavutil/x86/tx_float.asm -index 4d2283f..ea39f21 100644 ---- a/libavutil/x86/tx_float.asm -+++ b/libavutil/x86/tx_float.asm -@@ -29,7 +29,7 @@ - ; replace some shuffles with vblends? - ; avx512 split-radix - --%include "x86util.asm" -+%include "libavutil/x86/x86util.asm" - - %if ARCH_X86_64 - %define ptr resq diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb index dd14f8df6f..aa59755034 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb @@ -22,10 +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 \ - " -SRC_URI[sha256sum] = "ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b" +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" @@ -41,8 +47,7 @@ DEPENDS = "nasm-native" inherit autotools pkgconfig PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \ - alsa bzlib lzma pic pthreads shared theora zlib \ - ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ + alsa bzlib lzma theora zlib \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" # libraries to build in addition to avutil @@ -72,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" @@ -81,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)}" @@ -98,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} \ @@ -115,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 \ " @@ -127,19 +131,25 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mi 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" -EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic" +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 diff --git a/meta/recipes-multimedia/flac/flac_1.3.4.bb b/meta/recipes-multimedia/flac/flac_1.3.4.bb deleted file mode 100644 index 012da0a0a0..0000000000 --- a/meta/recipes-multimedia/flac/flac_1.3.4.bb +++ /dev/null @@ -1,45 +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 & 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=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[sha256sum] = "8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737" - -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.20.1.bb b/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb index ade7cb7dc3..2be406192f 100644 --- a/meta/recipes-multimedia/gstreamer/gst-devtools_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gst-devtools_1.22.11.bb @@ -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] = "81f1c7ef105b8bdb63412638952f6320723b3161c96a80f113b020e2de554b2b" +SRC_URI[sha256sum] = "07766425ecb5bf857ab5ad3962321c55cd89f9386b720843f9df71c0a455eb9b" DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" RRECOMMENDS:${PN} = "git" 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/gstreamer1.0-libav_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb index 16a298ab14..f3287efa96 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.11.bb @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ " SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz" -SRC_URI[sha256sum] = "91a71fb633b75e1bd52e22a457845cb0ba563a2972ba5954ec88448f443a9fc7" +SRC_URI[sha256sum] = "6b13dcc9332ef27a7c1e7005c0196883874f91622f8aa6e52f218b05b15d2bf5" S = "${WORKDIR}/gst-libav-${PV}" 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.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb index 835f9a31fd..97348fb398 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.11.bb @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" -SRC_URI[sha256sum] = "86b52e30ebd0f59fcb5cf81a163211975f73ef32e5a6782562804646316bcd7c" +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 4b3451d321..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,4 +1,4 @@ -From 6c3eeaf6435608f744303c17d52245f926cd28ac 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] fix maybe-uninitialized warnings when compiling with -Os 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 e3e5d9fb60..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,4 +1,4 @@ -From 701255c5797f222f0c47ace6437d213607b98d1e 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] avoid including <sys/poll.h> directly @@ -14,7 +14,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c -index 92c918c..5e27871 100644 +index b8e5b1a..5bca6e5 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -98,7 +98,7 @@ 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 280cbf984a..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 001fa08542dd5fc79571f7c803b2d3dd59c04a06 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 9 Feb 2016 14:00:00 -0800 -Subject: [PATCH] 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 3f79deb..96600c6 100644 ---- a/sys/decklink/gstdecklink.cpp -+++ b/sys/decklink/gstdecklink.cpp -@@ -680,7 +680,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; - } -@@ -705,16 +705,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 50ad5cc..d209180 100644 ---- a/sys/decklink/gstdecklinkaudiosrc.cpp -+++ b/sys/decklink/gstdecklinkaudiosrc.cpp -@@ -388,7 +388,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 a64c046..07a09e8 100644 ---- a/sys/decklink/gstdecklinkvideosink.cpp -+++ b/sys/decklink/gstdecklinkvideosink.cpp -@@ -288,7 +288,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; - } 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 029b80e174..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,4 +1,4 @@ -From 3bc5d48257032b6bbee532aad15062fbbcc43bfe 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] opencv: resolve missing opencv data dir in yocto build @@ -18,7 +18,7 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> 1 file changed, 3 insertions(+) diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build -index 1d86b90..b5c8b95 100644 +index 37e2015..326f737 100644 --- a/ext/opencv/meson.build +++ b/ext/opencv/meson.build @@ -87,6 +87,9 @@ if opencv_found diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb index 7c4665ae80..523ee7a5ae 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.11.bb @@ -1,17 +1,16 @@ 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 \ " -SRC_URI[sha256sum] = "09d3c2cf5911f0bc7da6bf557a55251779243d3de216b6a26cc90c445b423848" +SRC_URI[sha256sum] = "808d3b33fc4c71aeb2561c364a87c2e8a3e2343319a83244c8391be4b09499c8" S = "${WORKDIR}/gst-plugins-bad-${PV}" @@ -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" @@ -60,7 +60,7 @@ PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde26 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" @@ -112,7 +112,6 @@ EXTRA_OEMESON += " \ -Dandroidmedia=disabled \ -Dapplemedia=disabled \ -Dasio=disabled \ - -Davtp=disabled \ -Dbs2b=disabled \ -Dchromaprint=disabled \ -Dd3dvideosink=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_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb index 0953261a98..7aa10eb646 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.11.bb @@ -1,6 +1,6 @@ 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 = "LGPL-2.1-or-later" @@ -11,7 +11,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba file://0003-viv-fb-Make-sure-config.h-is-included.patch \ file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ " -SRC_URI[sha256sum] = "96d8a6413ba9394fbec1217aeef63741a729d476a505a797c1d5337d8fa7c204" +SRC_URI[sha256sum] = "65eaf72296cc5edc985695a4d80affc931e64a79f4879d05615854f7a2cf5bd1" S = "${WORKDIR}/gst-plugins-base-${PV}" @@ -21,7 +21,8 @@ inherit gobject-introspection # 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} \ @@ -32,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" @@ -61,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" 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.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb index 1f61d9a10e..9ce3f73f7c 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb @@ -1,14 +1,13 @@ 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] = "3c66876f821d507bcdbebffb08b4f31a322727d6753f65a0f02c905ecb7084aa" +SRC_URI[sha256sum] = "6ddd032381827d31820540735f0004b429436b0bdac19aaeab44fa22faad52e2" S = "${WORKDIR}/gst-plugins-good-${PV}" @@ -19,12 +18,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 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,13 +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}" -# Starting with version 1.20, the GStreamer soup plugin loads libsoup with dlopen() -# instead of linking to it. And instead of using the default libsoup C headers, it -# uses its own stub header. Consequently, objdump will not show the libsoup .so as -# a dependency, and libsoup won't be added to an image. Fix this by setting libsoup -# as RDEPEND instead of DEPEND. -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 index 6638f13540..8b1c001111 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc @@ -1,7 +1,7 @@ # This .inc file contains functionality for automatically setting # the the license of all plugins according to the GSTREAMER_GPL. -PACKAGESPLITFUNCS:append = " set_gstreamer_license " +PACKAGESPLITFUNCS += "set_gstreamer_license" python set_gstreamer_license () { import oe.utils diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc index afc7be40c8..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') diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb index b0746c087a..99f41d4f3d 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.11.bb @@ -1,12 +1,12 @@ 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 = "LGPL-2.1-or-later & GPL-2.0-or-later" LICENSE_FLAGS = "commercial" @@ -14,7 +14,8 @@ LICENSE_FLAGS = "commercial" SRC_URI = " \ https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ " -SRC_URI[sha256sum] = "42035145e29983308d2828207bb4ef933ed0407bb587fb3a569738c6a57fdb19" + +SRC_URI[sha256sum] = "7758b7decfd20c00cae5700822bcbbf03f98c723e33e17634db2e07ca1da60bf" S = "${WORKDIR}/gst-plugins-ugly-${PV}" @@ -24,7 +25,6 @@ GST_PLUGIN_SET_HAS_EXAMPLES = "0" PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ - a52dec mpeg2dec \ " PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb index a8ae274631..0fbb03f757 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.11.bb @@ -8,7 +8,7 @@ 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] = "ba6cd59faa3db3981d8c6982351c239d823c0b8e80b1acf58d2997b050289422" +SRC_URI[sha256sum] = "f7a5450d93fd81bf46060dca7f4a048d095b6717961fec211731a11a994c99a7" DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject" @@ -23,8 +23,8 @@ EXTRA_OEMESON += "\ -Dlibpython-dir=${libdir} \ " -# gobject-introspection is mandatory and cannot be configured -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" -GIR_MESON_OPTION = "" +inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check + +FILES:${PN} += "${libdir}/gstreamer-1.0" -inherit meson pkgconfig setuptools3-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.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb index 90d788ab80..554ed9ec8f 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.11.bb @@ -10,7 +10,7 @@ PNREAL = "gst-rtsp-server" SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" -SRC_URI[sha256sum] = "4745bc528ad7de711a41d576ddce7412266e66d05c4cfcc636c9ba4da5521509" +SRC_URI[sha256sum] = "ec49d474750a6ff6729c85b448abc607fb6840b21717ad7abc967e2adbf07a24" S = "${WORKDIR}/${PNREAL}-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb index 48b571f563..87eb8484a1 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.11.bb @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "87fbf6c537af9079c99a9aefe951da119e16e5bcc9cc8614f5035f062bf21137" +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-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 312c04fbfd..0d839bd6c8 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-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 1eb77a4ea5a3967c688d8f1192f99c605badc7e2 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> + --- - subprojects/gstreamer/tests/check/meson.build | 10 +++++----- + tests/check/meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build -index 9c4228b6e4..506606684d 100644 ---- a/subprojects/gstreamer/tests/check/meson.build -+++ b/subprojects/gstreamer/tests/check/meson.build -@@ -146,11 +146,11 @@ foreach t : core_tests +diff --git a/tests/check/meson.build b/tests/check/meson.build +index 9787b0a..16caac7 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -145,11 +145,11 @@ foreach t : core_tests if not skip_test exe = executable(test_name, fname, @@ -22,15 +23,12 @@ index 9c4228b6e4..506606684d 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.33.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-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 d18c19c397..64717e66c3 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-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 62f5bb7bfc2498219df7280e73480d8ed2378ce5 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,19 +10,20 @@ 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> + --- - subprojects/gstreamer/meson.build | 4 ++++ - subprojects/gstreamer/meson_options.txt | 1 + - subprojects/gstreamer/tests/check/meson.build | 22 ++++++++++++++++++- - .../gstreamer/tests/check/template.test.in | 3 +++ + 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 subprojects/gstreamer/tests/check/template.test.in + create mode 100644 tests/check/template.test.in -diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build -index d20fe0040f..b595d8f990 100644 ---- a/subprojects/gstreamer/meson.build -+++ b/subprojects/gstreamer/meson.build -@@ -562,6 +562,10 @@ if bashcomp_dep.found() +diff --git a/meson.build b/meson.build +index 60c7bec..f7650b1 100644 +--- a/meson.build ++++ b/meson.build +@@ -606,6 +606,10 @@ if bashcomp_dep.found() endif endif @@ -33,10 +34,10 @@ index d20fe0040f..b595d8f990 100644 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') pkgconfig = import('pkgconfig') -diff --git a/subprojects/gstreamer/meson_options.txt b/subprojects/gstreamer/meson_options.txt -index 7363bdb7a1..a34ba37dad 100644 ---- a/subprojects/gstreamer/meson_options.txt -+++ b/subprojects/gstreamer/meson_options.txt +diff --git a/meson_options.txt b/meson_options.txt +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'], @@ -45,10 +46,10 @@ index 7363bdb7a1..a34ba37dad 100644 # Feature options option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') -diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build -index 506606684d..00a138a568 100644 ---- a/subprojects/gstreamer/tests/check/meson.build -+++ b/subprojects/gstreamer/tests/check/meson.build +diff --git a/tests/check/meson.build b/tests/check/meson.build +index 16caac7..f2d400f 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build @@ -124,10 +124,16 @@ test_defines = [ '-UG_DISABLE_ASSERT', '-UG_DISABLE_CAST_CHECKS', @@ -67,16 +68,16 @@ index 506606684d..00a138a568 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,15 +96,12 @@ index 506606684d..00a138a568 100644 test(test_name, exe, env: env, timeout : 3 * 60) endif endforeach -diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in +diff --git a/tests/check/template.test.in b/tests/check/template.test.in new file mode 100644 -index 0000000000..f701627f87 +index 0000000..f701627 --- /dev/null -+++ b/subprojects/gstreamer/tests/check/template.test.in ++++ b/tests/check/template.test.in @@ -0,0 +1,3 @@ +[Test] +Type=session +Exec=@installed_tests_dir@/@program@ --- -2.33.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch index 10a6dcc619..0fd830f150 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-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 fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 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,15 +9,16 @@ 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> + --- - subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++------- + tests/check/meson.build | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) -diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build -index 00a138a568..48ec2532f8 100644 ---- a/subprojects/gstreamer/tests/check/meson.build -+++ b/subprojects/gstreamer/tests/check/meson.build -@@ -161,14 +161,19 @@ foreach t : core_tests +diff --git a/tests/check/meson.build b/tests/check/meson.build +index f2d400f..50dff7f 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -160,14 +160,19 @@ foreach t : core_tests install: installed_tests_enabled, ) @@ -45,6 +46,3 @@ index 00a138a568..48ec2532f8 100644 if installed_tests_enabled test_conf = configuration_data() --- -2.33.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 index efa004f8ce..5689dc9fbb 100644 --- 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 @@ -1,7 +1,7 @@ -From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001 +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 4/4] tests: add helper script to run the installed_tests +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 @@ -10,18 +10,19 @@ testing framework. Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + --- - subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++ - .../gstreamer/tests/check/template.sh.in | 9 +++++++++ - .../gstreamer/tests/check/template.test.in | 2 +- + 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 subprojects/gstreamer/tests/check/template.sh.in + create mode 100755 tests/check/template.sh.in -diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build -index 48ec2532f8..7dc4990d4e 100644 ---- a/subprojects/gstreamer/tests/check/meson.build -+++ b/subprojects/gstreamer/tests/check/meson.build -@@ -185,6 +185,23 @@ foreach t : core_tests +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 ) @@ -45,11 +46,11 @@ index 48ec2532f8..7dc4990d4e 100644 endif test(test_name, exe, env: env, timeout : 3 * 60) -diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in +diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in new file mode 100755 -index 0000000000..cf7d31b0ea +index 0000000..cf7d31b --- /dev/null -+++ b/subprojects/gstreamer/tests/check/template.sh.in ++++ b/tests/check/template.sh.in @@ -0,0 +1,9 @@ +#!/bin/sh + @@ -60,15 +61,12 @@ index 0000000000..cf7d31b0ea +GST_REGISTRY=@GST_REGISTRY@ +GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" +exec @TEST@ -diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in -index f701627f87..b74ef6ad73 100644 ---- a/subprojects/gstreamer/tests/check/template.test.in -+++ b/subprojects/gstreamer/tests/check/template.test.in +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 --- -2.33.1 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch deleted file mode 100644 index f51df6d20b..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch +++ /dev/null @@ -1,107 +0,0 @@ -From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001 -From: Claudius Heine <ch@denx.de> -Date: Wed, 2 Feb 2022 13:47:02 +0100 -Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase - -This testcase seems to be flaky, and upstream marked it as such: -https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778 - -This patch removes the testcase to avoid it interfering with out ptest. - -Signed-off-by: Claudius Heine <ch@denx.de> - -Upstream-Status: Inappropriate [needs proper upstream fix] ---- - tests/check/gst/gstbin.c | 69 ------------------- - 1 file changed, 69 deletions(-) - -diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c -index e366d5fe20..ac29d81474 100644 ---- a/tests/check/gst/gstbin.c -+++ b/tests/check/gst/gstbin.c -@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children) - - GST_END_TEST; - --GST_START_TEST (test_watch_for_state_change) --{ -- GstElement *src, *sink, *bin; -- GstBus *bus; -- GstStateChangeReturn ret; -- -- bin = gst_element_factory_make ("bin", NULL); -- fail_unless (bin != NULL, "Could not create bin"); -- -- bus = g_object_new (gst_bus_get_type (), NULL); -- gst_object_ref_sink (bus); -- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus); -- -- src = gst_element_factory_make ("fakesrc", NULL); -- fail_if (src == NULL, "Could not create fakesrc"); -- sink = gst_element_factory_make ("fakesink", NULL); -- fail_if (sink == NULL, "Could not create fakesink"); -- -- gst_bin_add (GST_BIN (bin), sink); -- gst_bin_add (GST_BIN (bin), src); -- -- fail_unless (gst_element_link (src, sink), "could not link src and sink"); -- -- /* change state, spawning two times three messages */ -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); -- fail_unless (ret == GST_STATE_CHANGE_ASYNC); -- ret = -- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, -- GST_CLOCK_TIME_NONE); -- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); -- -- pop_state_changed (bus, 6); -- pop_async_done (bus); -- pop_latency (bus); -- -- fail_unless (gst_bus_have_pending (bus) == FALSE, -- "Unexpected messages on bus"); -- -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); -- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); -- -- pop_state_changed (bus, 3); -- -- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */ -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); -- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE); -- -- pop_state_changed (bus, 3); -- if (ret == GST_STATE_CHANGE_ASYNC) { -- pop_async_done (bus); -- pop_latency (bus); -- } -- -- fail_unless (gst_bus_have_pending (bus) == FALSE, -- "Unexpected messages on bus"); -- -- gst_bus_set_flushing (bus, TRUE); -- -- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL); -- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); -- -- /* clean up */ -- gst_object_unref (bus); -- gst_object_unref (bin); --} -- --GST_END_TEST; -- - GST_START_TEST (test_state_change_error_message) - { - GstElement *src, *sink, *bin; -@@ -1956,7 +1888,6 @@ gst_bin_suite (void) - tcase_add_test (tc_chain, test_message_state_changed); - tcase_add_test (tc_chain, test_message_state_changed_child); - tcase_add_test (tc_chain, test_message_state_changed_children); -- tcase_add_test (tc_chain, test_watch_for_state_change); - tcase_add_test (tc_chain, test_state_change_error_message); - tcase_add_test (tc_chain, test_add_linked); - tcase_add_test (tc_chain, test_add_self); --- -2.33.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.20.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb index 81b94928d9..8965497d01 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.1.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.22.11.bb @@ -17,13 +17,12 @@ S = "${WORKDIR}/gstreamer-${PV}" SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ file://run-ptest \ - file://0001-tests-respect-the-idententaion-used-in-meson.patch;striplevel=3 \ - file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \ - file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \ - file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \ - file://0005-tests-remove-gstbin-test_watch_for_state_change-test.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] = "de094a404a3ad8f4977829ea87edf695a4da0b5c8f613ebe54ab414bac89f031" +SRC_URI[sha256sum] = "3d16259e9dab8b002c57ce208a09b350d8282f5b0197306c0cdba9a0d0799744" PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ check \ @@ -68,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/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 f6bca4e730..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 = "GPL-2.0-or-later" -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/libpng/libpng_1.6.37.bb b/meta/recipes-multimedia/libpng/libpng_1.6.43.bb index 61e3d92e95..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_IGNORE += "CVE-2019-17371" diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb index ed2b6437dd..29d48fd333 100644 --- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb +++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.2.2.bb @@ -7,18 +7,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \ file://src/samplerate.c;beginline=1;endline=7;md5=7a4238289dc36bfb70968ccaa5bd0d4f" DEPENDS = "libsndfile1" -SRC_URI = "https://github.com/libsndfile/libsamplerate/releases/download/${PV}/libsamplerate-${PV}.tar.xz \ +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsamplerate-${PV}.tar.xz \ " SRC_URI[sha256sum] = "3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893" CVE_PRODUCT = "libsamplerate" -UPSTREAM_CHECK_URI = "https://github.com/libsndfile/libsamplerate/releases" +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/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_1.1.0.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb index 70626b3c16..a9ee7c3575 100644 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb @@ -3,17 +3,17 @@ DESCRIPTION = "Library for reading and writing files containing sampled \ sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \ one standard library interface." HOMEPAGE = "https://libsndfile.github.io/libsndfile/" -AUTHOR = "Erik de Castro Lopo" DEPENDS = "flac libogg libvorbis" SECTION = "libs/multimedia" LICENSE = "LGPL-2.1-only" -SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.xz \ +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ file://noopus.patch \ + file://cve-2022-33065.patch \ " -UPSTREAM_CHECK_URI = "https://github.com/libsndfile/libsndfile/releases/" +GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" -SRC_URI[sha256sum] = "0f98e101c0f7c850a71225fb5feaf33b106227b3d331333ddc9bacee190bcf41" +SRC_URI[sha256sum] = "3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e" LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a" @@ -25,7 +25,7 @@ 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 +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/0001-tif_jbig.c-fix-crash-when-reading-a-file-with-multip.patch b/meta/recipes-multimedia/libtiff/tiff/0001-tif_jbig.c-fix-crash-when-reading-a-file-with-multip.patch deleted file mode 100644 index f1a4ab4251..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0001-tif_jbig.c-fix-crash-when-reading-a-file-with-multip.patch +++ /dev/null @@ -1,38 +0,0 @@ -CVE: CVE-2022-0865 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From 88da11ae3c4db527cb870fb1017456cc8fbac2e7 Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Thu, 24 Feb 2022 22:26:02 +0100 -Subject: [PATCH 1/6] tif_jbig.c: fix crash when reading a file with multiple - IFD in memory-mapped mode and when bit reversal is needed (fixes #385) - ---- - libtiff/tif_jbig.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libtiff/tif_jbig.c b/libtiff/tif_jbig.c -index 74086338..8bfa4cef 100644 ---- a/libtiff/tif_jbig.c -+++ b/libtiff/tif_jbig.c -@@ -209,6 +209,16 @@ int TIFFInitJBIG(TIFF* tif, int scheme) - */ - tif->tif_flags |= TIFF_NOBITREV; - tif->tif_flags &= ~TIFF_MAPPED; -+ /* We may have read from a previous IFD and thus set TIFF_BUFFERMMAP and -+ * cleared TIFF_MYBUFFER. It is necessary to restore them to their initial -+ * value to be consistent with the state of a non-memory mapped file. -+ */ -+ if (tif->tif_flags&TIFF_BUFFERMMAP) { -+ tif->tif_rawdata = NULL; -+ tif->tif_rawdatasize = 0; -+ tif->tif_flags &= ~TIFF_BUFFERMMAP; -+ tif->tif_flags |= TIFF_MYBUFFER; -+ } - - /* Setup the function pointers for encode, decode, and cleanup. */ - tif->tif_setupdecode = JBIGSetupDecode; --- -2.25.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff/0001-tiffset-fix-global-buffer-overflow-for-ASCII-tags-wh.patch b/meta/recipes-multimedia/libtiff/tiff/0001-tiffset-fix-global-buffer-overflow-for-ASCII-tags-wh.patch deleted file mode 100644 index 72776f09ba..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0001-tiffset-fix-global-buffer-overflow-for-ASCII-tags-wh.patch +++ /dev/null @@ -1,43 +0,0 @@ -CVE: CVE-2022-22844 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From b12a0326e6064b6e0b051d1184a219877472f69b Mon Sep 17 00:00:00 2001 -From: 4ugustus <wangdw.augustus@qq.com> -Date: Tue, 25 Jan 2022 16:25:28 +0000 -Subject: [PATCH] tiffset: fix global-buffer-overflow for ASCII tags where - count is required (fixes #355) - ---- - tools/tiffset.c | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/tools/tiffset.c b/tools/tiffset.c -index 8c9e23c5..e7a88c09 100644 ---- a/tools/tiffset.c -+++ b/tools/tiffset.c -@@ -146,9 +146,19 @@ main(int argc, char* argv[]) - - arg_index++; - if (TIFFFieldDataType(fip) == TIFF_ASCII) { -- if (TIFFSetField(tiff, TIFFFieldTag(fip), argv[arg_index]) != 1) -- fprintf( stderr, "Failed to set %s=%s\n", -- TIFFFieldName(fip), argv[arg_index] ); -+ if(TIFFFieldPassCount( fip )) { -+ size_t len; -+ len = strlen(argv[arg_index]) + 1; -+ if (len > UINT16_MAX || TIFFSetField(tiff, TIFFFieldTag(fip), -+ (uint16_t)len, argv[arg_index]) != 1) -+ fprintf( stderr, "Failed to set %s=%s\n", -+ TIFFFieldName(fip), argv[arg_index] ); -+ } else { -+ if (TIFFSetField(tiff, TIFFFieldTag(fip), -+ argv[arg_index]) != 1) -+ fprintf( stderr, "Failed to set %s=%s\n", -+ TIFFFieldName(fip), argv[arg_index] ); -+ } - } else if (TIFFFieldWriteCount(fip) > 0 - || TIFFFieldWriteCount(fip) == TIFF_VARIABLE) { - int ret = 1; --- -2.25.1 diff --git a/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch b/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch deleted file mode 100644 index 812ffb232d..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch +++ /dev/null @@ -1,219 +0,0 @@ -CVE: CVE-2022-0891 -CVE: CVE-2022-1056 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From e46b49e60fddb2e924302fb1751f79eb9cfb2253 Mon Sep 17 00:00:00 2001 -From: Su Laus <sulau@freenet.de> -Date: Tue, 8 Mar 2022 17:02:44 +0000 -Subject: [PATCH 2/6] tiffcrop: fix issue #380 and #382 heap buffer overflow in - extractImageSection - ---- - tools/tiffcrop.c | 92 +++++++++++++++++++----------------------------- - 1 file changed, 36 insertions(+), 56 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index b85c2ce7..302a7e91 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -105,8 +105,8 @@ - * of messages to monitor progress without enabling dump logs. - */ - --static char tiffcrop_version_id[] = "2.4"; --static char tiffcrop_rev_date[] = "12-13-2010"; -+static char tiffcrop_version_id[] = "2.4.1"; -+static char tiffcrop_rev_date[] = "03-03-2010"; - - #include "tif_config.h" - #include "libport.h" -@@ -6710,10 +6710,10 @@ extractImageSection(struct image_data *image, struct pageseg *section, - #ifdef DEVELMODE - uint32_t img_length; - #endif -- uint32_t j, shift1, shift2, trailing_bits; -+ uint32_t j, shift1, trailing_bits; - uint32_t row, first_row, last_row, first_col, last_col; - uint32_t src_offset, dst_offset, row_offset, col_offset; -- uint32_t offset1, offset2, full_bytes; -+ uint32_t offset1, full_bytes; - uint32_t sect_width; - #ifdef DEVELMODE - uint32_t sect_length; -@@ -6723,7 +6723,6 @@ extractImageSection(struct image_data *image, struct pageseg *section, - #ifdef DEVELMODE - int k; - unsigned char bitset; -- static char *bitarray = NULL; - #endif - - img_width = image->width; -@@ -6741,17 +6740,12 @@ extractImageSection(struct image_data *image, struct pageseg *section, - dst_offset = 0; - - #ifdef DEVELMODE -- if (bitarray == NULL) -- { -- if ((bitarray = (char *)malloc(img_width)) == NULL) -- { -- TIFFError ("", "DEBUG: Unable to allocate debugging bitarray"); -- return (-1); -- } -- } -+ char bitarray[39]; - #endif - -- /* rows, columns, width, length are expressed in pixels */ -+ /* rows, columns, width, length are expressed in pixels -+ * first_row, last_row, .. are index into image array starting at 0 to width-1, -+ * last_col shall be also extracted. */ - first_row = section->y1; - last_row = section->y2; - first_col = section->x1; -@@ -6761,9 +6755,14 @@ extractImageSection(struct image_data *image, struct pageseg *section, - #ifdef DEVELMODE - sect_length = last_row - first_row + 1; - #endif -- img_rowsize = ((img_width * bps + 7) / 8) * spp; -- full_bytes = (sect_width * spp * bps) / 8; /* number of COMPLETE bytes per row in section */ -- trailing_bits = (sect_width * bps) % 8; -+ /* The read function loadImage() used copy separate plane data into a buffer as interleaved -+ * samples rather than separate planes so the same logic works to extract regions -+ * regardless of the way the data are organized in the input file. -+ * Furthermore, bytes and bits are arranged in buffer according to COMPRESSION=1 and FILLORDER=1 -+ */ -+ img_rowsize = (((img_width * spp * bps) + 7) / 8); /* row size in full bytes of source image */ -+ full_bytes = (sect_width * spp * bps) / 8; /* number of COMPLETE bytes per row in section */ -+ trailing_bits = (sect_width * spp * bps) % 8; /* trailing bits within the last byte of destination buffer */ - - #ifdef DEVELMODE - TIFFError ("", "First row: %"PRIu32", last row: %"PRIu32", First col: %"PRIu32", last col: %"PRIu32"\n", -@@ -6776,10 +6775,9 @@ extractImageSection(struct image_data *image, struct pageseg *section, - - if ((bps % 8) == 0) - { -- col_offset = first_col * spp * bps / 8; -+ col_offset = (first_col * spp * bps) / 8; - for (row = first_row; row <= last_row; row++) - { -- /* row_offset = row * img_width * spp * bps / 8; */ - row_offset = row * img_rowsize; - src_offset = row_offset + col_offset; - -@@ -6792,14 +6790,12 @@ extractImageSection(struct image_data *image, struct pageseg *section, - } - else - { /* bps != 8 */ -- shift1 = spp * ((first_col * bps) % 8); -- shift2 = spp * ((last_col * bps) % 8); -+ shift1 = ((first_col * spp * bps) % 8); /* shift1 = bits to skip in the first byte of source buffer*/ - for (row = first_row; row <= last_row; row++) - { - /* pull out the first byte */ - row_offset = row * img_rowsize; -- offset1 = row_offset + (first_col * bps / 8); -- offset2 = row_offset + (last_col * bps / 8); -+ offset1 = row_offset + ((first_col * spp * bps) / 8); /* offset1 = offset into source of byte with first bits to be extracted */ - - #ifdef DEVELMODE - for (j = 0, k = 7; j < 8; j++, k--) -@@ -6811,12 +6807,12 @@ extractImageSection(struct image_data *image, struct pageseg *section, - sprintf(&bitarray[9], " "); - for (j = 10, k = 7; j < 18; j++, k--) - { -- bitset = *(src_buff + offset2) & (((unsigned char)1 << k)) ? 1 : 0; -+ bitset = *(src_buff + offset1 + full_bytes) & (((unsigned char)1 << k)) ? 1 : 0; - sprintf(&bitarray[j], (bitset) ? "1" : "0"); - } - bitarray[18] = '\0'; -- TIFFError ("", "Row: %3d Offset1: %"PRIu32", Shift1: %"PRIu32", Offset2: %"PRIu32", Shift2: %"PRIu32"\n", -- row, offset1, shift1, offset2, shift2); -+ TIFFError ("", "Row: %3d Offset1: %"PRIu32", Shift1: %"PRIu32", Offset2: %"PRIu32", Trailing_bits: %"PRIu32"\n", -+ row, offset1, shift1, offset1+full_bytes, trailing_bits); - #endif - - bytebuff1 = bytebuff2 = 0; -@@ -6840,11 +6836,12 @@ extractImageSection(struct image_data *image, struct pageseg *section, - - if (trailing_bits != 0) - { -- bytebuff2 = src_buff[offset2] & ((unsigned char)255 << (7 - shift2)); -+ /* Only copy higher bits of samples and mask lower bits of not wanted column samples to zero */ -+ bytebuff2 = src_buff[offset1 + full_bytes] & ((unsigned char)255 << (8 - trailing_bits)); - sect_buff[dst_offset] = bytebuff2; - #ifdef DEVELMODE - TIFFError ("", " Trailing bits src offset: %8"PRIu32", Dst offset: %8"PRIu32"\n", -- offset2, dst_offset); -+ offset1 + full_bytes, dst_offset); - for (j = 30, k = 7; j < 38; j++, k--) - { - bitset = *(sect_buff + dst_offset) & (((unsigned char)1 << k)) ? 1 : 0; -@@ -6863,8 +6860,10 @@ extractImageSection(struct image_data *image, struct pageseg *section, - #endif - for (j = 0; j <= full_bytes; j++) - { -- bytebuff1 = src_buff[offset1 + j] & ((unsigned char)255 >> shift1); -- bytebuff2 = src_buff[offset1 + j + 1] & ((unsigned char)255 << (7 - shift1)); -+ /* Skip the first shift1 bits and shift the source up by shift1 bits before save to destination.*/ -+ /* Attention: src_buff size needs to be some bytes larger than image size, because could read behind image here. */ -+ bytebuff1 = src_buff[offset1 + j] & ((unsigned char)255 >> shift1); -+ bytebuff2 = src_buff[offset1 + j + 1] & ((unsigned char)255 << (8 - shift1)); - sect_buff[dst_offset + j] = (bytebuff1 << shift1) | (bytebuff2 >> (8 - shift1)); - } - #ifdef DEVELMODE -@@ -6880,36 +6879,17 @@ extractImageSection(struct image_data *image, struct pageseg *section, - #endif - dst_offset += full_bytes; - -+ /* Copy the trailing_bits for the last byte in the destination buffer. -+ Could come from one ore two bytes of the source buffer. */ - if (trailing_bits != 0) - { - #ifdef DEVELMODE -- TIFFError ("", " Trailing bits src offset: %8"PRIu32", Dst offset: %8"PRIu32"\n", offset1 + full_bytes, dst_offset); --#endif -- if (shift2 > shift1) -- { -- bytebuff1 = src_buff[offset1 + full_bytes] & ((unsigned char)255 << (7 - shift2)); -- bytebuff2 = bytebuff1 & ((unsigned char)255 << shift1); -- sect_buff[dst_offset] = bytebuff2; --#ifdef DEVELMODE -- TIFFError ("", " Shift2 > Shift1\n"); -+ TIFFError("", " Trailing bits %4"PRIu32" src offset: %8"PRIu32", Dst offset: %8"PRIu32"\n", trailing_bits, offset1 + full_bytes, dst_offset); - #endif -+ /* More than necessary bits are already copied into last destination buffer, -+ * only masking of last byte in destination buffer is necessary.*/ -+ sect_buff[dst_offset] &= ((uint8_t)0xFF << (8 - trailing_bits)); - } -- else -- { -- if (shift2 < shift1) -- { -- bytebuff2 = ((unsigned char)255 << (shift1 - shift2 - 1)); -- sect_buff[dst_offset] &= bytebuff2; --#ifdef DEVELMODE -- TIFFError ("", " Shift2 < Shift1\n"); --#endif -- } --#ifdef DEVELMODE -- else -- TIFFError ("", " Shift2 == Shift1\n"); --#endif -- } -- } - #ifdef DEVELMODE - sprintf(&bitarray[28], " "); - sprintf(&bitarray[29], " "); -@@ -7062,7 +7042,7 @@ writeImageSections(TIFF *in, TIFF *out, struct image_data *image, - width = sections[i].x2 - sections[i].x1 + 1; - length = sections[i].y2 - sections[i].y1 + 1; - sectsize = (uint32_t) -- ceil((width * image->bps + 7) / (double)8) * image->spp * length; -+ ceil((width * image->bps * image->spp + 7) / (double)8) * length; - /* allocate a buffer if we don't have one already */ - if (createImageSection(sectsize, sect_buff_ptr)) - { --- -2.25.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff/0003-add-checks-for-return-value-of-limitMalloc-392.patch b/meta/recipes-multimedia/libtiff/tiff/0003-add-checks-for-return-value-of-limitMalloc-392.patch deleted file mode 100644 index a0b856b9e1..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0003-add-checks-for-return-value-of-limitMalloc-392.patch +++ /dev/null @@ -1,93 +0,0 @@ -CVE: CVE-2022-0907 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From a139191cc86f4dc44c74a0f22928e0fb38ed2485 Mon Sep 17 00:00:00 2001 -From: Augustus <wangdw.augustus@qq.com> -Date: Mon, 7 Mar 2022 18:21:49 +0800 -Subject: [PATCH 3/6] add checks for return value of limitMalloc (#392) - ---- - tools/tiffcrop.c | 33 +++++++++++++++++++++------------ - 1 file changed, 21 insertions(+), 12 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 302a7e91..e407bf51 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -7357,7 +7357,11 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - if (!sect_buff) - { - sect_buff = (unsigned char *)limitMalloc(sectsize); -- *sect_buff_ptr = sect_buff; -+ if (!sect_buff) -+ { -+ TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); -+ return (-1); -+ } - _TIFFmemset(sect_buff, 0, sectsize); - } - else -@@ -7373,15 +7377,15 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - else - sect_buff = new_buff; - -+ if (!sect_buff) -+ { -+ TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); -+ return (-1); -+ } - _TIFFmemset(sect_buff, 0, sectsize); - } - } - -- if (!sect_buff) -- { -- TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); -- return (-1); -- } - prev_sectsize = sectsize; - *sect_buff_ptr = sect_buff; - -@@ -7648,7 +7652,11 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - if (!crop_buff) - { - crop_buff = (unsigned char *)limitMalloc(cropsize); -- *crop_buff_ptr = crop_buff; -+ if (!crop_buff) -+ { -+ TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); -+ return (-1); -+ } - _TIFFmemset(crop_buff, 0, cropsize); - prev_cropsize = cropsize; - } -@@ -7664,15 +7672,15 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - } - else - crop_buff = new_buff; -+ if (!crop_buff) -+ { -+ TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); -+ return (-1); -+ } - _TIFFmemset(crop_buff, 0, cropsize); - } - } - -- if (!crop_buff) -- { -- TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); -- return (-1); -- } - *crop_buff_ptr = crop_buff; - - if (crop->crop_mode & CROP_INVERT) -@@ -9231,3 +9239,4 @@ invertImage(uint16_t photometric, uint16_t spp, uint16_t bps, uint32_t width, ui - * fill-column: 78 - * End: - */ -+ --- -2.25.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff/0004-TIFFFetchNormalTag-avoid-calling-memcpy-with-a-null-.patch b/meta/recipes-multimedia/libtiff/tiff/0004-TIFFFetchNormalTag-avoid-calling-memcpy-with-a-null-.patch deleted file mode 100644 index 719dabaecc..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0004-TIFFFetchNormalTag-avoid-calling-memcpy-with-a-null-.patch +++ /dev/null @@ -1,33 +0,0 @@ -CVE: CVE-2022-0908 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From ef5a0bf271823df168642444d051528a68205cb0 Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Thu, 17 Feb 2022 15:28:43 +0100 -Subject: [PATCH 4/6] TIFFFetchNormalTag(): avoid calling memcpy() with a null - source pointer and size of zero (fixes #383) - ---- - libtiff/tif_dirread.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c -index d84147a0..4e8ce729 100644 ---- a/libtiff/tif_dirread.c -+++ b/libtiff/tif_dirread.c -@@ -5079,7 +5079,10 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) - _TIFFfree(data); - return(0); - } -- _TIFFmemcpy(o,data,(uint32_t)dp->tdir_count); -+ if (dp->tdir_count > 0 ) -+ { -+ _TIFFmemcpy(o,data,(uint32_t)dp->tdir_count); -+ } - o[(uint32_t)dp->tdir_count]=0; - if (data!=0) - _TIFFfree(data); --- -2.25.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff/0005-fix-the-FPE-in-tiffcrop-393.patch b/meta/recipes-multimedia/libtiff/tiff/0005-fix-the-FPE-in-tiffcrop-393.patch deleted file mode 100644 index 64dbe9ef92..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0005-fix-the-FPE-in-tiffcrop-393.patch +++ /dev/null @@ -1,36 +0,0 @@ -CVE: CVE-2022-0909 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From 4768355a074d562177e0a8b551c561d1af7eb74a Mon Sep 17 00:00:00 2001 -From: 4ugustus <wangdw.augustus@qq.com> -Date: Tue, 8 Mar 2022 16:22:04 +0000 -Subject: [PATCH 5/6] fix the FPE in tiffcrop (#393) - ---- - libtiff/tif_dir.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index a6c254fc..77da6ea4 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -335,13 +335,13 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - break; - case TIFFTAG_XRESOLUTION: - dblval = va_arg(ap, double); -- if( dblval < 0 ) -+ if( dblval != dblval || dblval < 0 ) - goto badvaluedouble; - td->td_xresolution = _TIFFClampDoubleToFloat( dblval ); - break; - case TIFFTAG_YRESOLUTION: - dblval = va_arg(ap, double); -- if( dblval < 0 ) -+ if( dblval != dblval || dblval < 0 ) - goto badvaluedouble; - td->td_yresolution = _TIFFClampDoubleToFloat( dblval ); - break; --- -2.25.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff/0006-fix-heap-buffer-overflow-in-tiffcp-278.patch b/meta/recipes-multimedia/libtiff/tiff/0006-fix-heap-buffer-overflow-in-tiffcp-278.patch deleted file mode 100644 index afd5e59960..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/0006-fix-heap-buffer-overflow-in-tiffcp-278.patch +++ /dev/null @@ -1,57 +0,0 @@ -CVE: CVE-2022-0924 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From 1074b9691322b1e3671cd8ea0b6b3509d08978fb Mon Sep 17 00:00:00 2001 -From: 4ugustus <wangdw.augustus@qq.com> -Date: Thu, 10 Mar 2022 08:48:00 +0000 -Subject: [PATCH 6/6] fix heap buffer overflow in tiffcp (#278) - ---- - tools/tiffcp.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/tools/tiffcp.c b/tools/tiffcp.c -index 1f889516..552d8fad 100644 ---- a/tools/tiffcp.c -+++ b/tools/tiffcp.c -@@ -1661,12 +1661,27 @@ DECLAREwriteFunc(writeBufferToSeparateStrips) - tdata_t obuf; - tstrip_t strip = 0; - tsample_t s; -+ uint16_t bps = 0, bytes_per_sample; - - obuf = limitMalloc(stripsize); - if (obuf == NULL) - return (0); - _TIFFmemset(obuf, 0, stripsize); - (void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); -+ (void) TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); -+ if( bps == 0 ) -+ { -+ TIFFError(TIFFFileName(out), "Error, cannot read BitsPerSample"); -+ _TIFFfree(obuf); -+ return 0; -+ } -+ if( (bps % 8) != 0 ) -+ { -+ TIFFError(TIFFFileName(out), "Error, cannot handle BitsPerSample that is not a multiple of 8"); -+ _TIFFfree(obuf); -+ return 0; -+ } -+ bytes_per_sample = bps/8; - for (s = 0; s < spp; s++) { - uint32_t row; - for (row = 0; row < imagelength; row += rowsperstrip) { -@@ -1676,7 +1691,7 @@ DECLAREwriteFunc(writeBufferToSeparateStrips) - - cpContigBufToSeparateBuf( - obuf, (uint8_t*) buf + row * rowsize + s, -- nrows, imagewidth, 0, 0, spp, 1); -+ nrows, imagewidth, 0, 0, spp, bytes_per_sample); - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) { - TIFFError(TIFFFileName(out), - "Error, can't write strip %"PRIu32, --- -2.25.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff/561599c99f987dc32ae110370cfdd7df7975586b.patch b/meta/recipes-multimedia/libtiff/tiff/561599c99f987dc32ae110370cfdd7df7975586b.patch deleted file mode 100644 index 0b41dde606..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/561599c99f987dc32ae110370cfdd7df7975586b.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 561599c99f987dc32ae110370cfdd7df7975586b Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Sat, 5 Feb 2022 20:36:41 +0100 -Subject: [PATCH] TIFFReadDirectory(): avoid calling memcpy() with a null - source pointer and size of zero (fixes #362) - -Upstream-Status: Backport -CVE: CVE-2022-0562 - ---- - libtiff/tif_dirread.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c -index 2bbc4585..23194ced 100644 ---- a/libtiff/tif_dirread.c -+++ b/libtiff/tif_dirread.c -@@ -4177,7 +4177,8 @@ TIFFReadDirectory(TIFF* tif) - goto bad; - } - -- memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16_t)); -+ if (old_extrasamples > 0) -+ memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16_t)); - _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples); - _TIFFfree(new_sampleinfo); - } --- -GitLab - 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/eecb0712f4c3a5b449f70c57988260a667ddbdef.patch b/meta/recipes-multimedia/libtiff/tiff/eecb0712f4c3a5b449f70c57988260a667ddbdef.patch deleted file mode 100644 index 74f9649fdf..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff/eecb0712f4c3a5b449f70c57988260a667ddbdef.patch +++ /dev/null @@ -1,32 +0,0 @@ -From eecb0712f4c3a5b449f70c57988260a667ddbdef Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Sun, 6 Feb 2022 13:08:38 +0100 -Subject: [PATCH] TIFFFetchStripThing(): avoid calling memcpy() with a null - source pointer and size of zero (fixes #362) - -Upstream-Status: Backport -CVE: CVE-2022-0561 - ---- - libtiff/tif_dirread.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c -index 23194ced..50ebf8ac 100644 ---- a/libtiff/tif_dirread.c -+++ b/libtiff/tif_dirread.c -@@ -5777,8 +5777,9 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32_t nstrips, uint64_t** l - _TIFFfree(data); - return(0); - } -- _TIFFmemcpy(resizeddata,data, (uint32_t)dir->tdir_count * sizeof(uint64_t)); -- _TIFFmemset(resizeddata+(uint32_t)dir->tdir_count, 0, (nstrips - (uint32_t)dir->tdir_count) * sizeof(uint64_t)); -+ if( dir->tdir_count ) -+ _TIFFmemcpy(resizeddata,data, (uint32_t)dir->tdir_count * sizeof(uint64_t)); -+ _TIFFmemset(resizeddata+(uint32_t)dir->tdir_count, 0, (nstrips - (uint32_t)dir->tdir_count) * sizeof(uint64_t)); - _TIFFfree(data); - data=resizeddata; - } --- -GitLab - diff --git a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb index 9c9108a6af..d42ea6a6e5 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb @@ -4,30 +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 \ - file://0001-tiffset-fix-global-buffer-overflow-for-ASCII-tags-wh.patch \ - file://561599c99f987dc32ae110370cfdd7df7975586b.patch \ - file://eecb0712f4c3a5b449f70c57988260a667ddbdef.patch \ - file://0001-tif_jbig.c-fix-crash-when-reading-a-file-with-multip.patch \ - file://0002-tiffcrop-fix-issue-380-and-382-heap-buffer-overflow-.patch \ - file://0003-add-checks-for-return-value-of-limitMalloc-392.patch \ - file://0004-TIFFFetchNormalTag-avoid-calling-memcpy-with-a-null-.patch \ - file://0005-fix-the-FPE-in-tiffcrop-393.patch \ - file://0006-fix-heap-buffer-overflow-in-tiffcp-278.patch \ + 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] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" +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_IGNORE += "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 @@ -37,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 fd8b561657..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 = "GPL-2.0-or-later" -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.29.3.bb b/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb index 0baa7aa4a1..f7786e8588 100644 --- a/meta/recipes-multimedia/mpg123/mpg123_1.29.3.bb +++ b/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb @@ -10,7 +10,7 @@ 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] = "963885d8cc77262f28b77187c7d189e32195e64244de2530b798ddf32183e847" +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 821ce7d1df..ae16056d24 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -2,7 +2,6 @@ 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 LGPL-2.1-or-later. There are a few @@ -61,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" @@ -188,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" @@ -213,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) } @@ -258,7 +258,7 @@ RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaud # 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 e5c72ec0b4..d25be9e80c 100644 --- a/meta/recipes-multimedia/sbc/sbc_1.5.bb +++ b/meta/recipes-multimedia/sbc/sbc_2.0.bb @@ -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/CVE-2020-23903.patch b/meta/recipes-multimedia/speex/speex/CVE-2020-23903.patch deleted file mode 100644 index eb16e95ffc..0000000000 --- a/meta/recipes-multimedia/speex/speex/CVE-2020-23903.patch +++ /dev/null @@ -1,30 +0,0 @@ -Backport patch to fix CVE-2020-23903. - -CVE: CVE-2020-23903 -Upstream-Status: Backport [https://github.com/xiph/speex/commit/870ff84] - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - -From 870ff845b32f314aec0036641ffe18aba4916887 Mon Sep 17 00:00:00 2001 -From: Tristan Matthews <tmatth@videolan.org> -Date: Mon, 13 Jul 2020 23:25:03 -0400 -Subject: [PATCH] wav_io: guard against invalid channel numbers - -Fixes #13 ---- - src/wav_io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/wav_io.c b/src/wav_io.c -index b5183015..09d62eb0 100644 ---- a/src/wav_io.c -+++ b/src/wav_io.c -@@ -111,7 +111,7 @@ int read_wav_header(FILE *file, int *rate, int *channels, int *format, spx_int32 - stmp = le_short(stmp); - *channels = stmp; - -- if (stmp>2) -+ if (stmp>2 || stmp<1) - { - fprintf (stderr, "Only mono and (intensity) stereo supported\n"); - return -1; diff --git a/meta/recipes-multimedia/speex/speex_1.2.0.bb b/meta/recipes-multimedia/speex/speex_1.2.1.bb index ea475f0f1b..c40198fa8f 100644 --- a/meta/recipes-multimedia/speex/speex_1.2.0.bb +++ b/meta/recipes-multimedia/speex/speex_1.2.1.bb @@ -3,17 +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 \ - file://CVE-2020-23903.patch \ - " +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.2.bb b/meta/recipes-multimedia/webp/libwebp_1.4.0.bb index 281cff1bf2..d922970479 100644 --- a/meta/recipes-multimedia/webp/libwebp_1.2.2.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] = "7656532f837af5f4cec3ff6bafe552c044dc39bf453587bd5b77450802f4aee6" +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 51ae9d1179..e7d9e75e8d 100644 --- a/meta/recipes-multimedia/x264/x264_git.bb +++ b/meta/recipes-multimedia/x264/x264_git.bb @@ -14,9 +14,9 @@ SRC_URI = "git://github.com/mirror/x264;branch=stable;protocol=https \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "5db6aa6cab1b146e07b60cc1736a01f21da01154" +SRCREV = "baee400fa9ced6f5481a728138fed6e867b0ff7f" -PV = "r3039+git${SRCPV}" +PV = "r3039+git" S = "${WORKDIR}/git" |