Patch review
cover Patch review
Please review this next set of patches for dunfell and have changes back by end of day Thursday.
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1514
The following changes since commit 89e6fc44a378cb3489376d7193672cdf94c504b6:
qemu: change TLBs number to 64 in 34Kf mips cpu model (2020-10-21 04:42:42 -1000)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib stable/dunfell-nut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut
Jose Quaresma (12):
gstreamer1.0: Fix reproducibility issue around libcap gstreamer1.0: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-plugins-base: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-plugins-good: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-plugins-bad: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-plugins-ugly: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-libav: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-vaapi: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-rtsp-server: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-omx: Update 1.16.2 -> Update 1.16.3 gstreamer1.0-python: Update 1.16.2 -> Update 1.16.3
gst-validate: Update 1.16.2 -> Update 1.16.3
Lee Chee Yang (1):
ffmpeg: fix CVE-2020-12284
Richard Purdie (1):
oeqa: Add sync call to command execution
Ross Burton (2):
gcc: mitigate the Straight-line Speculation attack glib-2.0: fix parsing of slim encoded tzdata
meta/lib/oeqa/selftest/cases/runcmd.py | 16 +-
meta/lib/oeqa/utils/commands.py | 8 +-
.../glib-2.0/glib-2.0/tzdata-update.patch | 458 ++++++++++++
meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb | 1 +
meta/recipes-devtools/gcc/gcc-9.3.inc | 3 +
...ight-Line-Speculation-SLS-mitigation.patch | 204 ++++++
...e-SLS-mitigation-for-RET-and-BR-inst.patch | 600 ++++++++++++++++
...h64-Mitigate-SLS-for-BLR-instruction.patch | 659 ++++++++++++++++++
.../ffmpeg/ffmpeg/CVE-2020-12284.patch | 36 +
.../recipes-multimedia/ffmpeg/ffmpeg_4.2.2.bb | 1 +
...idate_1.16.2.bb => gst-validate_1.16.3.bb} | 4 +-
...1.16.2.bb => gstreamer1.0-libav_1.16.3.bb} | 4 +-
...x_1.16.2.bb => gstreamer1.0-omx_1.16.3.bb} | 4 +-
....bb => gstreamer1.0-plugins-bad_1.16.3.bb} | 4 +-
...bb => gstreamer1.0-plugins-base_1.16.3.bb} | 4 +-
...bb => gstreamer1.0-plugins-good_1.16.3.bb} | 4 +-
...bb => gstreamer1.0-plugins-ugly_1.16.3.bb} | 4 +-
...son.build-fix-builds-with-python-3.8.patch | 24 -
....16.2.bb => gstreamer1.0-python_1.16.3.bb} | 8 +-
....bb => gstreamer1.0-rtsp-server_1.16.3.bb} | 4 +-
...1.16.2.bb => gstreamer1.0-vaapi_1.16.3.bb} | 4 +-
.../gstreamer/gstreamer1.0/capfix.patch | 37 -
...er1.0_1.16.2.bb => gstreamer1.0_1.16.3.bb} | 9 +-
23 files changed, 2002 insertions(+), 98 deletions(-)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/tzdata-update.patch
create mode 100644 meta/recipes-devtools/gcc/gcc-9.3/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch
create mode 100644 meta/recipes-devtools/gcc/gcc-9.3/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch
create mode 100644 meta/recipes-devtools/gcc/gcc-9.3/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-12284.patch
rename meta/recipes-multimedia/gstreamer/{gst-validate_1.16.2.bb => gst-validate_1.16.3.bb} (87%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-libav_1.16.2.bb => gstreamer1.0-libav_1.16.3.bb} (90%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-omx_1.16.2.bb => gstreamer1.0-omx_1.16.3.bb} (92%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-bad_1.16.2.bb => gstreamer1.0-plugins-bad_1.16.3.bb} (98%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-base_1.16.2.bb => gstreamer1.0-plugins-base_1.16.3.bb} (96%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-good_1.16.2.bb => gstreamer1.0-plugins-good_1.16.3.bb} (96%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-ugly_1.16.2.bb => gstreamer1.0-plugins-ugly_1.16.3.bb} (90%)
delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-fix-builds-with-python-3.8.patch
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-python_1.16.2.bb => gstreamer1.0-python_1.16.3.bb} (80%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-rtsp-server_1.16.2.bb => gstreamer1.0-rtsp-server_1.16.3.bb} (86%)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-vaapi_1.16.2.bb => gstreamer1.0-vaapi_1.16.3.bb} (93%)
delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.16.2.bb => gstreamer1.0_1.16.3.bb} (90%)Signature · 1 line
2.17.1
PATCH 1/16 oeqa: Add sync call to command execution
From: Richard Purdie <[email protected]>
We previously put a sync call into devtool to try and combat the bitbake timeout issues on the autobuilder. It isn't enough as the timeouts occur mid test. They are also occurring on non-devtool tests.
Add in sync calls around command execution instead.
--- meta/lib/oeqa/selftest/cases/runcmd.py | 16 ++++++++-------- meta/lib/oeqa/utils/commands.py | 8 +++++++- 2 files changed, 15 insertions(+), 9 deletions(-)
meta/lib/oeqa/selftest/cases/runcmd.py +8 -8
@@ -64,12 +64,12 @@ class RunCmdTests(OESelftestTestCase): runCmd, "echo foobar >&2; false", shell=True, assert_error=False) def test_output(self): - result = runCmd("echo stdout; echo stderr >&2", shell=True) + result = runCmd("echo stdout; echo stderr >&2", shell=True, sync=False) self.assertEqual("stdout\nstderr", result.output) self.assertEqual("", result.error) def test_output_split(self): - result = runCmd("echo stdout; echo stderr >&2", shell=True, stderr=subprocess.PIPE) + result = runCmd("echo stdout; echo stderr >&2", shell=True, stderr=subprocess.PIPE, sync=False) self.assertEqual("stdout", result.output) self.assertEqual("stderr", result.error)
@@ -77,7 +77,7 @@ class RunCmdTests(OESelftestTestCase): numthreads = threading.active_count() start = time.time() # Killing a hanging process only works when not using a shell?! - result = runCmd(['sleep', '60'], timeout=self.TIMEOUT, ignore_status=True) + result = runCmd(['sleep', '60'], timeout=self.TIMEOUT, ignore_status=True, sync=False) self.assertEqual(result.status, -signal.SIGTERM) end = time.time() self.assertLess(end - start, self.TIMEOUT + self.DELTA)
@@ -87,7 +87,7 @@ class RunCmdTests(OESelftestTestCase): numthreads = threading.active_count() start = time.time() # Killing a hanging process only works when not using a shell?! - result = runCmd(['sleep', '60'], timeout=self.TIMEOUT, ignore_status=True, stderr=subprocess.PIPE) + result = runCmd(['sleep', '60'], timeout=self.TIMEOUT, ignore_status=True, stderr=subprocess.PIPE, sync=False) self.assertEqual(result.status, -signal.SIGTERM) end = time.time() self.assertLess(end - start, self.TIMEOUT + self.DELTA)
@@ -95,7 +95,7 @@ class RunCmdTests(OESelftestTestCase): def test_stdin(self): numthreads = threading.active_count() - result = runCmd("cat", data=b"hello world", timeout=self.TIMEOUT) + result = runCmd("cat", data=b"hello world", timeout=self.TIMEOUT, sync=False) self.assertEqual("hello world", result.output) self.assertEqual(numthreads, threading.active_count(), msg="Thread counts were not equal before (%s) and after (%s), active threads: %s" % (numthreads, threading.active_count(), threading.enumerate())) self.assertEqual(numthreads, 1)
@@ -103,7 +103,7 @@ class RunCmdTests(OESelftestTestCase): def test_stdin_timeout(self): numthreads = threading.active_count() start = time.time() - result = runCmd(['sleep', '60'], data=b"hello world", timeout=self.TIMEOUT, ignore_status=True) + result = runCmd(['sleep', '60'], data=b"hello world", timeout=self.TIMEOUT, ignore_status=True, sync=False) self.assertEqual(result.status, -signal.SIGTERM) end = time.time() self.assertLess(end - start, self.TIMEOUT + self.DELTA)
@@ -111,12 +111,12 @@ class RunCmdTests(OESelftestTestCase): def test_log(self): log = MemLogger() - result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log) + result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log, sync=False) self.assertEqual(["Running: echo stdout; echo stderr >&2", "stdout", "stderr"], log.info_msgs) self.assertEqual([], log.error_msgs) def test_log_split(self): log = MemLogger() - result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log, stderr=subprocess.PIPE) + result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log, stderr=subprocess.PIPE, sync=False) self.assertEqual(["Running: echo stdout; echo stderr >&2", "stdout"], log.info_msgs) self.assertEqual(["stderr"], log.error_msgs)
meta/lib/oeqa/utils/commands.py +7 -1
@@ -167,7 +167,7 @@ class Result(object): pass -def runCmd(command, ignore_status=False, timeout=None, assert_error=True, +def runCmd(command, ignore_status=False, timeout=None, assert_error=True, sync=True, native_sysroot=None, limit_exc_output=0, output_log=None, **options): result = Result()
@@ -184,6 +184,12 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, cmd = Command(command, timeout=timeout, output_log=output_log, **options) cmd.run() + # tests can be heavy on IO and if bitbake can't write out its caches, we see timeouts. + # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO + # hit here rather than in bitbake shutdown. + if sync: + os.system("sync") + result.command = command result.status = cmd.status result.output = cmd.output
Signature · 1 line
2.17.1
PATCH 2/16 gcc: mitigate the Straight-line Speculation attack
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
Straight-line Speculation is a SPECTRE-like attack on Armv8-A, further details can be found in the white paper here:
Backport the GCC patches to mitigate the attack.
CVE: CVE-2020-13844
--- meta/recipes-devtools/gcc/gcc-9.3.inc | 3 + ...ight-Line-Speculation-SLS-mitigation.patch | 204 ++++++ ...e-SLS-mitigation-for-RET-and-BR-inst.patch | 600 ++++++++++++++++ ...h64-Mitigate-SLS-for-BLR-instruction.patch | 659 ++++++++++++++++++ 4 files changed, 1466 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-9.3/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch create mode 100644 meta/recipes-devtools/gcc/gcc-9.3/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch create mode 100644 meta/recipes-devtools/gcc/gcc-9.3/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
meta/recipes-devtools/gcc/gcc-9.3.inc +3 -0
@@ -69,6 +69,9 @@ SRC_URI = "\ file://0037-CVE-2019-14250-Check-zero-value-in-simple_object_elf.patch \ file://0038-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \ file://0039-process_alt_operands-Don-t-match-user-defined-regs-o.patch \ + file://0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch \ + file://0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch \ + file://0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch \ " S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" SRC_URI[sha256sum] = "71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1"
meta/recipes-devtools/gcc/gcc-9.3/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch new file +204 -0
204 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-9.3/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch new file +600 -0
600 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-9.3/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch new file +659 -0
659 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 3/16 ffmpeg: fix CVE-2020-12284
In reply to Steve SakomanFrom: Lee Chee Yang <[email protected]>
--- .../ffmpeg/ffmpeg/CVE-2020-12284.patch | 36 +++++++++++++++++++ .../recipes-multimedia/ffmpeg/ffmpeg_4.2.2.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-12284.patch
meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2020-12284.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 1812352d767ccf5431aa440123e2e260a4db2726 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <[email protected]> +Date: Sat, 7 Mar 2020 15:42:58 +0100 +Subject: [PATCH] avcodec/cbs_jpeg: Check length for SOS + +Fixes: out of array access +Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584 +Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680 + +Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg +Signed-off-by: Michael Niedermayer <[email protected]> + +Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/1812352d767ccf5431aa440123e2e260a4db2726] +CVE: CVE-2020-12284 +Signed-off-by: Chee Yang Lee <[email protected]> +--- + libavcodec/cbs_jpeg.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c +index 6bbce5f..89512a2 100644 +--- a/libavcodec/cbs_jpeg.c ++++ b/libavcodec/cbs_jpeg.c +@@ -197,6 +197,9 @@ static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx, + if (marker == JPEG_MARKER_SOS) { + length = AV_RB16(frag->data + start); + ++ if (length > end - start) ++ return AVERROR_INVALIDDATA; ++ + data_ref = NULL; + data = av_malloc(end - start + + AV_INPUT_BUFFER_PADDING_SIZE); +-- +2.7.4 +
meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.2.bb +1 -0
@@ -25,6 +25,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ file://mips64_cpu_detection.patch \ + file://CVE-2020-12284.patch \ " SRC_URI[md5sum] = "348956fc2faa57a2f79bbb84ded9fbc3" SRC_URI[sha256sum] = "cb754255ab0ee2ea5f66f8850e1bd6ad5cac1cd855d0a2f4990fb8c668b0d29c"
Signature · 1 line
2.17.1
PATCH 4/16 gstreamer1.0: Fix reproducibility issue around libcap
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
Currently gstreamer configuration depends libcap and on whether setcap is found on the host system.
Removing libcap from DEPENDS and only use it when the 'setcap' is enabled.
* 0004-capfix.patch
Removed as the same goals can be achieved only with the PACKAGECONFIG 'setcap'
--- .../gstreamer/gstreamer1.0/capfix.patch | 37 ------------------- .../gstreamer/gstreamer1.0_1.16.2.bb | 5 +-- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch deleted +0 -37
@@ -1,37 +0,0 @@ -Currently gstreamer configuration depends on whether setcap is found on the host -system. Turn this into a configure option to make builds deterinistic. - -RP 2020/2/19 -Signed-off-by: Richard Purdie <[email protected]> -Upstream-Status: Pending - -Index: gstreamer-1.16.1/libs/gst/helpers/meson.build -=================================================================== ---- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build -+++ gstreamer-1.16.1/libs/gst/helpers/meson.build -@@ -73,7 +73,12 @@ if have_ptp - endif - endif - -- setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) -+ setcap_feature = get_option('setcap') -+ if setcap_feature.disabled() -+ setcap = find_program('dontexist', required : false) -+ else -+ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) -+ endif - - # user/group to change to in gst-ptp-helper - ptp_helper_setuid_user = get_option('ptp-helper-setuid-user') -Index: gstreamer-1.16.1/meson_options.txt -=================================================================== ---- gstreamer-1.16.1.orig/meson_options.txt -+++ gstreamer-1.16.1/meson_options.txt -@@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va - option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') - option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') - option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files') -+option('setcap', type : 'feature', value : 'auto', description : 'Use setcap') - - # Common feature options - option('examples', type : 'feature', value : 'auto', yield : true)
meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.bb +2 -3
@@ -6,7 +6,7 @@ BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" SECTION = "multimedia" LICENSE = "LGPLv2+" -DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" +DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native" inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
@@ -21,7 +21,6 @@ SRC_URI = " \ file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ file://0003-meson-Add-valgrind-feature.patch \ file://0004-meson-Add-option-for-installed-tests.patch \ - file://capfix.patch \ " SRC_URI[md5sum] = "0e661ed5bdf1d8996e430228d022628e" SRC_URI[sha256sum] = "e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e"
@@ -40,7 +39,7 @@ PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" -PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native" +PACKAGECONFIG[setcap] = ",,libcap libcap-native" # TODO: put this in a gettext.bbclass patch def gettext_oemeson(d):
Signature · 1 line
2.17.1
PATCH 5/16 gstreamer1.0: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
.../{gstreamer1.0_1.16.2.bb => gstreamer1.0_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.16.2.bb => gstreamer1.0_1.16.3.bb} (95%)meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.bb +2 -2
@@ -22,8 +22,8 @@ SRC_URI = " \ file://0003-meson-Add-valgrind-feature.patch \ file://0004-meson-Add-option-for-installed-tests.patch \ " -SRC_URI[md5sum] = "0e661ed5bdf1d8996e430228d022628e" -SRC_URI[sha256sum] = "e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e" +SRC_URI[md5sum] = "beecf6965a17fb17fa3b262fd36df70a" +SRC_URI[sha256sum] = "692f037968e454e508b0f71d9674e2e26c78475021407fcf8193b1c7e59543c7" PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ check \
Signature · 1 line
2.17.1
PATCH 6/16 gstreamer1.0-plugins-base: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...ins-base_1.16.2.bb => gstreamer1.0-plugins-base_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-base_1.16.2.bb => gstreamer1.0-plugins-base_1.16.3.bb} (96%)meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb +2 -2
@@ -13,8 +13,8 @@ SRC_URI = " \ file://0005-viv-fb-Make-sure-config.h-is-included.patch \ file://0009-glimagesink-Downrank-to-marginal.patch \ " -SRC_URI[md5sum] = "3fdb32823535799a748c1fc14f978e2c" -SRC_URI[sha256sum] = "b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a" +SRC_URI[md5sum] = "e3ddb1bae9fb510b49a295f212f1e6e4" +SRC_URI[sha256sum] = "9f02678b0bbbcc9eff107d3bd89d83ce92fec2154cd607c7c8bd34dc7fee491c" S = "${WORKDIR}/gst-plugins-base-${PV}"
Signature · 1 line
2.17.1
PATCH 7/16 gstreamer1.0-plugins-good: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...ins-good_1.16.2.bb => gstreamer1.0-plugins-good_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-good_1.16.2.bb => gstreamer1.0-plugins-good_1.16.3.bb} (96%)meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb +2 -2
@@ -6,8 +6,8 @@ SRC_URI = " \ file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ " -SRC_URI[md5sum] = "bd025f8f14974f94b75ac69a9d1b9c93" -SRC_URI[sha256sum] = "40bb3bafda25c0b739c8fc36e48380fccf61c4d3f83747e97ac3f9b0171b1319" +SRC_URI[md5sum] = "c79b6c2f8eaadb2bb66615b694db399e" +SRC_URI[sha256sum] = "d3a23a3fe73de673f591b7655494990c9e8a0e22a3c70d6f1dbf50198b29f85f" S = "${WORKDIR}/gst-plugins-good-${PV}"
Signature · 1 line
2.17.1
PATCH 8/16 gstreamer1.0-plugins-bad: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...ugins-bad_1.16.2.bb => gstreamer1.0-plugins-bad_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-bad_1.16.2.bb => gstreamer1.0-plugins-bad_1.16.3.bb} (98%)meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bb +2 -2
@@ -8,8 +8,8 @@ SRC_URI = " \ file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ file://opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ " -SRC_URI[md5sum] = "ccc7404230afddec723bbdb63c89feec" -SRC_URI[sha256sum] = "f1cb7aa2389569a5343661aae473f0a940a90b872001824bc47fa8072a041e74" +SRC_URI[md5sum] = "8969ea1aec3411c13d0e7dd27ccaaef1" +SRC_URI[sha256sum] = "84efe57011658f0a53a5d5b20f64ef109f5105dccb0808c21e069e946673514d" S = "${WORKDIR}/gst-plugins-bad-${PV}"
Signature · 1 line
2.17.1
PATCH 9/16 gstreamer1.0-plugins-ugly: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...ins-ugly_1.16.2.bb => gstreamer1.0-plugins-ugly_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-ugly_1.16.2.bb => gstreamer1.0-plugins-ugly_1.16.3.bb} (90%)meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.2.bb +2 -2
@@ -9,8 +9,8 @@ LICENSE_FLAGS = "commercial" SRC_URI = " \ https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ " -SRC_URI[md5sum] = "10283ff5ef1e34d462dde77042e329bd" -SRC_URI[sha256sum] = "5500415b865e8b62775d4742cbb9f37146a50caecfc0e7a6fc0160d3c560fbca" +SRC_URI[md5sum] = "b025125a6c928024cbd300cc27b5d712" +SRC_URI[sha256sum] = "403c21688065f41e53008874402b5c07832567cc1309a60df597eab7ff5843f0" S = "${WORKDIR}/gst-plugins-ugly-${PV}"
Signature · 1 line
2.17.1
PATCH 10/16 gstreamer1.0-libav: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...reamer1.0-libav_1.16.2.bb => gstreamer1.0-libav_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-libav_1.16.2.bb => gstreamer1.0-libav_1.16.3.bb} (90%)meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.2.bb +2 -2
@@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ " -SRC_URI[md5sum] = "eacebd0136ede3a9bd3672eeb338806b" -SRC_URI[sha256sum] = "c724f612700c15a933c7356fbeabb0bb9571fb5538f8b1b54d4d2d94188deef2" +SRC_URI[md5sum] = "d08fb5429f102d5a3f1eca3dee2a0add" +SRC_URI[sha256sum] = "d10c5eb1a00a91de97c85c0956c663aa6e99d268195cdec4534c179b831538ec" S = "${WORKDIR}/gst-libav-${PV}"
Signature · 1 line
2.17.1
PATCH 11/16 gstreamer1.0-vaapi: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...reamer1.0-vaapi_1.16.2.bb => gstreamer1.0-vaapi_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-vaapi_1.16.2.bb => gstreamer1.0-vaapi_1.16.3.bb} (93%)meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.2.bb +2 -2
@@ -12,8 +12,8 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.x file://0001-vaapsink-downgrade-to-marginal.patch \ " -SRC_URI[md5sum] = "13f7cb6a64bde24e67f563377487dcce" -SRC_URI[sha256sum] = "191de7b0ab64a85dd0875c990721e7be95518f60e2a9106beca162004ed7c601" +SRC_URI[md5sum] = "8c9b5a4d20afc04bc5e1536e81511f27" +SRC_URI[sha256sum] = "77200b3c183fe97cd987deb5544e615873cff5e98ec87573583771e5f1fb9ebe" S = "${WORKDIR}/${REALPN}-${PV}" DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
Signature · 1 line
2.17.1
PATCH 12/16 gstreamer1.0-rtsp-server: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...sp-server_1.16.2.bb => gstreamer1.0-rtsp-server_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-rtsp-server_1.16.2.bb => gstreamer1.0-rtsp-server_1.16.3.bb} (86%)meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.2.bb +2 -2
@@ -12,8 +12,8 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.x file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ " -SRC_URI[md5sum] = "8a998725820c771ba45be6e18bfdf73a" -SRC_URI[sha256sum] = "de07a2837b3b04820ce68264a4909f70c221b85dbff0cede7926e9cdbb1dc26e" +SRC_URI[md5sum] = "f0d8263c9d61f6f05b59ae0f676a6406" +SRC_URI[sha256sum] = "67886b872826d513c58f88d559d4dc4aa63382d03fb64ceac91a09537fe6fea0" S = "${WORKDIR}/${PNREAL}-${PV}"
Signature · 1 line
2.17.1
PATCH 13/16 gstreamer1.0-omx: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...{gstreamer1.0-omx_1.16.2.bb => gstreamer1.0-omx_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-omx_1.16.2.bb => gstreamer1.0-omx_1.16.3.bb} (92%)meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bb +2 -2
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" -SRC_URI[md5sum] = "6362786d2b6cce34de08c86b7847f782" -SRC_URI[sha256sum] = "11ed411a2eba75610d72331eeb14ff05e2df28f4fd05cb69225a88bec6d27439" +SRC_URI[md5sum] = "d4d89dd44362c1d262186c60437cdbee" +SRC_URI[sha256sum] = "60603b7889528ef8539d36cb3284b648c46aa0cf980a28cba4d3fe3a44988ff9" S = "${WORKDIR}/gst-omx-${PV}"
Signature · 1 line
2.17.1
PATCH 14/16 gstreamer1.0-python: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
...son.build-fix-builds-with-python-3.8.patch | 24 -------------------
....16.2.bb => gstreamer1.0-python_1.16.3.bb} | 8 +++----
2 files changed, 3 insertions(+), 29 deletions(-)
delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-fix-builds-with-python-3.8.patch
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-python_1.16.2.bb => gstreamer1.0-python_1.16.3.bb} (80%)meta/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-fix-builds-with-python-3.8.patch deleted +0 -24
@@ -1,24 +0,0 @@ -From 61cfd1b49dc82baf14bb36d88b6c5be7b8c3d23a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Mon, 2 Dec 2019 18:16:41 +0100 -Subject: [PATCH] meson.build: fix builds with python 3.8 - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gst-python/merge_requests/14] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 1da81d5..3e0db38 100644 ---- a/meson.build -+++ b/meson.build -@@ -24,7 +24,7 @@ pygobject_dep = dependency('pygobject-3.0', fallback: ['pygobject', 'pygobject_d - - pymod = import('python') - python = pymod.find_installation(get_option('python')) --python_dep = python.dependency(required : true) -+python_dep = dependency('python3-embed', required : true) - - python_abi_flags = python.get_variable('ABIFLAGS', '') - pylib_loc = get_option('libpython-dir')
meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.2.bb +3 -5
@@ -5,11 +5,9 @@ SECTION = "multimedia" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" -SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ - file://0001-meson.build-fix-builds-with-python-3.8.patch \ - " -SRC_URI[md5sum] = "6ac709767334d8d0a71cb4e016f6abeb" -SRC_URI[sha256sum] = "208df3148d73d9f416d016564737585d8ea763d91201732d44b5fe688c6288a8" +SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" +SRC_URI[md5sum] = "326f4f4c23e2477bf3d5839c465a42ca" +SRC_URI[sha256sum] = "36a00a256c25ccaaa9b965a6f09d6158dfb77558145ab6b25809938732c7161f" DEPENDS = "gstreamer1.0 python3-pygobject" RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject"
Signature · 1 line
2.17.1
PATCH 15/16 gst-validate: Update 1.16.2 -> Update 1.16.3
In reply to Steve SakomanFrom: Jose Quaresma <[email protected]>
---
.../{gst-validate_1.16.2.bb => gst-validate_1.16.3.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-multimedia/gstreamer/{gst-validate_1.16.2.bb => gst-validate_1.16.3.bb} (87%)meta/recipes-multimedia/gstreamer/gst-validate_1.16.3.bb renamed from meta/recipes-multimedia/gstreamer/gst-validate_1.16.2.bb +2 -2
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \ file://0001-connect-has-a-different-signature-on-musl.patch \ " -SRC_URI[md5sum] = "688f42c52d62e8c5e506df911553fb2c" -SRC_URI[sha256sum] = "4861ccb9326200e74d98007e316b387d48dd49f072e0b78cb9d3303fdecfeeca" +SRC_URI[md5sum] = "740a436f5b9bf17ea7de0e62c92ec264" +SRC_URI[sha256sum] = "c2064e887324af6aa476ca669234936711f253b29042f617f1d9f2597c4bf92b" DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" RRECOMMENDS_${PN} = "git"
Signature · 1 line
2.17.1
PATCH 16/16 glib-2.0: fix parsing of slim encoded tzdata
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
As of tzcode 2020b the timezone data is encoded using the 'slim' format instead of the previous 'fat'. This exposes a number of bugs in GLib, so backport the fixes to improve the parser.
[ YOCTO #14106 ]
--- .../glib-2.0/glib-2.0/tzdata-update.patch | 458 ++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb | 1 + 2 files changed, 459 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/tzdata-update.patch
meta/recipes-core/glib-2.0/glib-2.0/tzdata-update.patch new file +458 -0
@@ -0,0 +1,458 @@ +Backport a number of patches from upstream to fix reading of the new 'slim' +encoding for tzdata files. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <[email protected]> + +commit 18cbd5e5a4812e9bd0b06a058322d2b44ed2ad92 +Author: Paul Eggert <[email protected]> +Date: Thu Jul 16 12:41:49 2020 -0700 + + Clarify memset in set_tz_name + + * glib/gtimezone.c (set_tz_name): Use size, not NAME_SIZE, + to clear the buffer. Suggested by Philip Withnall in: + https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1533#note_867859 + +commit 1ab3f927d6d09a8cf3349a3545f5351446f43d47 +Author: Paul Eggert <[email protected]> +Date: Thu Jul 16 12:41:49 2020 -0700 + + gtimezone: support footers in TZif files + + Since tzcode95f (1995), TZif files have had a trailing + TZ string, used for timestamps after the last transition. + This string is specified in Internet RFC 8536 section 3.3. + init_zone_from_iana_info has ignored this string, causing it + to mishandle timestamps past the year 2038. With zic's new -b + slim flag, init_zone_from_iana_info would even mishandle current + timestamps. Fix this by parsing the trailing TZ string and adding + its transitions. + + Closes #2129 + +commit e8b763e35235a2c6b4bdd48a5099c00f72741059 +Author: Paul Eggert <[email protected]> +Date: Thu Jul 16 12:41:49 2020 -0700 + + gtimezone: add support for RFC 8536 time zone transitions + + Time zone transition times can range from -167:59:59 through + +167:59:59, according to Internet RFC 8536 section 3.3.1; + this is an extension to POSIX. It is needed for proper + support of TZif version 3 files. + +commit 1c65dd48b8ebd31af8bc9b2263f83c0c411f7519 +Author: Paul Eggert <[email protected]> +Date: Thu Jul 16 12:41:49 2020 -0700 + + gtimezone: allow hh to be 24, as per POSIX + + POSIX allows hh to be 24; see + https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 + +commit 368b65cb4cb17e29a4f55654149f554a14f48bc6 +Author: Paul Eggert <[email protected]> +Date: Thu Jul 16 12:41:49 2020 -0700 + + gtimezone: support POSIX 1003.1-2001 quoted TZ abbreviations + + TZ strings like '<-03>3' were introduced in POSIX 1003.1-2001 and + are currently specified in: + https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 + +commit fd528aaab6bb077c6d217e62f2228ec9fe3ed760 +Author: Paul Eggert <[email protected]> +Date: Thu Jul 16 12:41:49 2020 -0700 + + gtimezone: get 64-bit data from version-3 TZif files + + Version 3 was introduced in tzdb 2013e (2013). + See Internet RFC 8536 section 3.1 under "ver(sion)". + +diff --git a/glib/gtimezone.c b/glib/gtimezone.c +index 5a835dea9..f9eee1967 100644 +--- a/glib/gtimezone.c ++++ b/glib/gtimezone.c +@@ -142,9 +142,7 @@ typedef struct + gint mday; + gint wday; + gint week; +- gint hour; +- gint min; +- gint sec; ++ gint32 offset; /* hour*3600 + min*60 + sec; can be negative. */ + } TimeZoneDate; + + /* POSIX Timezone abbreviations are typically 3 or 4 characters, but +@@ -205,6 +203,10 @@ static GTimeZone *tz_local = NULL; + there's no point in getting carried + away. */ + ++#ifdef G_OS_UNIX ++static GTimeZone *parse_footertz (const gchar *, size_t); ++#endif ++ + /** + * g_time_zone_unref: + * @tz: a #GTimeZone +@@ -286,13 +288,20 @@ g_time_zone_ref (GTimeZone *tz) + /* fake zoneinfo creation (for RFC3339/ISO 8601 timezones) {{{1 */ + /* + * parses strings of the form h or hh[[:]mm[[[:]ss]]] where: +- * - h[h] is 0 to 23 ++ * - h[h] is 0 to 24 + * - mm is 00 to 59 + * - ss is 00 to 59 ++ * If RFC8536, TIME_ is a transition time sans sign, ++ * so colons are required before mm and ss, and hh can be up to 167. ++ * See Internet RFC 8536 section 3.3.1: ++ * https://tools.ietf.org/html/rfc8536#section-3.3.1 ++ * and POSIX Base Definitions 8.3 TZ rule time: ++ * https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 + */ + static gboolean + parse_time (const gchar *time_, +- gint32 *offset) ++ gint32 *offset, ++ gboolean rfc8536) + { + if (*time_ < '0' || '9' < *time_) + return FALSE; +@@ -310,7 +319,20 @@ parse_time (const gchar *time_, + *offset *= 10; + *offset += 60 * 60 * (*time_++ - '0'); + +- if (*offset > 23 * 60 * 60) ++ if (rfc8536) ++ { ++ /* Internet RFC 8536 section 3.3.1 and POSIX 8.3 TZ together say ++ that a transition time must be of the form [+-]hh[:mm[:ss]] where ++ the hours part can range from -167 to 167. */ ++ if ('0' <= *time_ && *time_ <= '9') ++ { ++ *offset *= 10; ++ *offset += 60 * 60 * (*time_++ - '0'); ++ } ++ if (*offset > 167 * 60 * 60) ++ return FALSE; ++ } ++ else if (*offset > 24 * 60 * 60) + return FALSE; + + if (*time_ == '\0') +@@ -319,6 +341,8 @@ parse_time (const gchar *time_, + + if (*time_ == ':') + time_++; ++ else if (rfc8536) ++ return FALSE; + + if (*time_ < '0' || '5' < *time_) + return FALSE; +@@ -335,6 +359,8 @@ parse_time (const gchar *time_, + + if (*time_ == ':') + time_++; ++ else if (rfc8536) ++ return FALSE; + + if (*time_ < '0' || '5' < *time_) + return FALSE; +@@ -351,28 +377,32 @@ parse_time (const gchar *time_, + + static gboolean + parse_constant_offset (const gchar *name, +- gint32 *offset) ++ gint32 *offset, ++ gboolean rfc8536) + { +- if (g_strcmp0 (name, "UTC") == 0) ++ /* Internet RFC 8536 section 3.3.1 and POSIX 8.3 TZ together say ++ that a transition time must be numeric. */ ++ if (!rfc8536 && g_strcmp0 (name, "UTC") == 0) + { + *offset = 0; + return TRUE; + } + + if (*name >= '0' && '9' >= *name) +- return parse_time (name, offset); ++ return parse_time (name, offset, rfc8536); + + switch (*name++) + { + case 'Z': + *offset = 0; +- return !*name; ++ /* Internet RFC 8536 section 3.3.1 requires a numeric zone. */ ++ return !rfc8536 && !*name; + + case '+': +- return parse_time (name, offset); ++ return parse_time (name, offset, rfc8536); + + case '-': +- if (parse_time (name, offset)) ++ if (parse_time (name, offset, rfc8536)) + { + *offset = -*offset; + return TRUE; +@@ -391,7 +421,7 @@ zone_for_constant_offset (GTimeZone *gtz, const gchar *name) + gint32 offset; + TransitionInfo info; + +- if (name == NULL || !parse_constant_offset (name, &offset)) ++ if (name == NULL || !parse_constant_offset (name, &offset, FALSE)) + return; + + info.gmt_offset = offset; +@@ -529,12 +559,17 @@ init_zone_from_iana_info (GTimeZone *gtz, + guint8 *tz_transitions, *tz_type_index, *tz_ttinfo; + guint8 *tz_abbrs; + gsize timesize = sizeof (gint32); +- const struct tzhead *header = g_bytes_get_data (zoneinfo, &size); ++ gconstpointer header_data = g_bytes_get_data (zoneinfo, &size); ++ const gchar *data = header_data; ++ const struct tzhead *header = header_data; ++ GTimeZone *footertz = NULL; ++ guint extra_time_count = 0, extra_type_count = 0; ++ gint64 last_explicit_transition_time; + + g_return_if_fail (size >= sizeof (struct tzhead) && + memcmp (header, "TZif", 4) == 0); + +- if (header->tzh_version == '2') ++ if (header->tzh_version >= '2') + { + /* Skip ahead to the newer 64-bit data if it's available. */ + header = (const struct tzhead *) +@@ -550,6 +585,30 @@ init_zone_from_iana_info (GTimeZone *gtz, + time_count = guint32_from_be(header->tzh_timecnt); + type_count = guint32_from_be(header->tzh_typecnt); + ++ if (header->tzh_version >= '2') ++ { ++ const gchar *footer = (((const gchar *) (header + 1)) ++ + guint32_from_be(header->tzh_ttisgmtcnt) ++ + guint32_from_be(header->tzh_ttisstdcnt) ++ + 12 * guint32_from_be(header->tzh_leapcnt) ++ + 9 * time_count ++ + 6 * type_count ++ + guint32_from_be(header->tzh_charcnt)); ++ const gchar *footerlast; ++ size_t footerlen; ++ g_return_if_fail (footer <= data + size - 2 && footer[0] == '\n'); ++ footerlast = memchr (footer + 1, '\n', data + size - (footer + 1)); ++ g_return_if_fail (footerlast); ++ footerlen = footerlast + 1 - footer; ++ if (footerlen != 2) ++ { ++ footertz = parse_footertz (footer, footerlen); ++ g_return_if_fail (footertz); ++ extra_type_count = footertz->t_info->len; ++ extra_time_count = footertz->transitions->len; ++ } ++ } ++ + tz_transitions = ((guint8 *) (header) + sizeof (*header)); + tz_type_index = tz_transitions + timesize * time_count; + tz_ttinfo = tz_type_index + time_count; +@@ -557,9 +616,9 @@ init_zone_from_iana_info (GTimeZone *gtz, + + gtz->name = g_steal_pointer (&identifier); + gtz->t_info = g_array_sized_new (FALSE, TRUE, sizeof (TransitionInfo), +- type_count); ++ type_count + extra_type_count); + gtz->transitions = g_array_sized_new (FALSE, TRUE, sizeof (Transition), +- time_count); ++ time_count + extra_time_count); + + for (index = 0; index < type_count; index++) + { +@@ -574,15 +633,50 @@ init_zone_from_iana_info (GTimeZone *gtz, + for (index = 0; index < time_count; index++) + { + Transition trans; +- if (header->tzh_version == '2') ++ if (header->tzh_version >= '2') + trans.time = gint64_from_be (((gint64_be*)tz_transitions)[index]); + else + trans.time = gint32_from_be (((gint32_be*)tz_transitions)[index]); ++ last_explicit_transition_time = trans.time; + trans.info_index = tz_type_index[index]; + g_assert (trans.info_index >= 0); + g_assert ((guint) trans.info_index < gtz->t_info->len); + g_array_append_val (gtz->transitions, trans); + } ++ ++ if (footertz) ++ { ++ /* Append footer time types. Don't bother to coalesce ++ duplicates with existing time types. */ ++ for (index = 0; index < extra_type_count; index++) ++ { ++ TransitionInfo t_info; ++ TransitionInfo *footer_t_info ++ = &g_array_index (footertz->t_info, TransitionInfo, index); ++ t_info.gmt_offset = footer_t_info->gmt_offset; ++ t_info.is_dst = footer_t_info->is_dst; ++ t_info.abbrev = g_steal_pointer (&footer_t_info->abbrev); ++ g_array_append_val (gtz->t_info, t_info); ++ } ++ ++ /* Append footer transitions that follow the last explicit ++ transition. */ ++ for (index = 0; index < extra_time_count; index++) ++ { ++ Transition *footer_transition ++ = &g_array_index (footertz->transitions, Transition, index); ++ if (time_count <= 0 ++ || last_explicit_transition_time < footer_transition->time) ++ { ++ Transition trans; ++ trans.time = footer_transition->time; ++ trans.info_index = type_count + footer_transition->info_index; ++ g_array_append_val (gtz->transitions, trans); ++ } ++ } ++ ++ g_time_zone_unref (footertz); ++ } + } + + #elif defined (G_OS_WIN32) +@@ -590,9 +684,8 @@ init_zone_from_iana_info (GTimeZone *gtz, + static void + copy_windows_systemtime (SYSTEMTIME *s_time, TimeZoneDate *tzdate) + { +- tzdate->sec = s_time->wSecond; +- tzdate->min = s_time->wMinute; +- tzdate->hour = s_time->wHour; ++ tzdate->offset ++ = s_time->wHour * 3600 + s_time->wMinute * 60 + s_time->wSecond; + tzdate->mon = s_time->wMonth; + tzdate->year = s_time->wYear; + tzdate->wday = s_time->wDayOfWeek ? s_time->wDayOfWeek : 7; +@@ -979,7 +1072,7 @@ boundary_for_year (TimeZoneDate *boundary, + g_date_clear (&date, 1); + g_date_set_dmy (&date, buffer.mday, buffer.mon, buffer.year); + return ((g_date_get_julian (&date) - unix_epoch_start) * seconds_per_day + +- buffer.hour * 3600 + buffer.min * 60 + buffer.sec - offset); ++ buffer.offset - offset); + } + + static void +@@ -1156,7 +1249,7 @@ init_zone_from_rules (GTimeZone *gtz, + * - N is 0 to 365 + * + * time is either h or hh[[:]mm[[[:]ss]]] +- * - h[h] is 0 to 23 ++ * - h[h] is 0 to 24 + * - mm is 00 to 59 + * - ss is 00 to 59 + */ +@@ -1289,25 +1382,10 @@ parse_tz_boundary (const gchar *identifier, + /* Time */ + + if (*pos == '/') +- { +- gint32 offset; +- +- if (!parse_time (++pos, &offset)) +- return FALSE; +- +- boundary->hour = offset / 3600; +- boundary->min = (offset / 60) % 60; +- boundary->sec = offset % 3600; +- +- return TRUE; +- } +- ++ return parse_constant_offset (pos + 1, &boundary->offset, TRUE); + else + { +- boundary->hour = 2; +- boundary->min = 0; +- boundary->sec = 0; +- ++ boundary->offset = 2 * 60 * 60; + return *pos == '\0'; + } + } +@@ -1341,7 +1419,7 @@ parse_offset (gchar **pos, gint32 *target) + ++(*pos); + + buffer = g_strndup (target_pos, *pos - target_pos); +- ret = parse_constant_offset (buffer, target); ++ ret = parse_constant_offset (buffer, target, FALSE); + g_free (buffer); + + return ret; +@@ -1366,21 +1444,32 @@ parse_identifier_boundary (gchar **pos, TimeZoneDate *target) + static gboolean + set_tz_name (gchar **pos, gchar *buffer, guint size) + { ++ gboolean quoted = **pos == '<'; + gchar *name_pos = *pos; + guint len; + +- /* Name is ASCII alpha (Is this necessarily true?) */ +- while (g_ascii_isalpha (**pos)) +- ++(*pos); ++ if (quoted) ++ { ++ name_pos++; ++ do ++ ++(*pos); ++ while (g_ascii_isalnum (**pos) || **pos == '-' || **pos == '+'); ++ if (**pos != '>') ++ return FALSE; ++ } ++ else ++ while (g_ascii_isalpha (**pos)) ++ ++(*pos); + +- /* Name should be three or more alphabetic characters */ ++ /* Name should be three or more characters */ + if (*pos - name_pos < 3) + return FALSE; + +- memset (buffer, 0, NAME_SIZE); ++ memset (buffer, 0, size); + /* name_pos isn't 0-terminated, so we have to limit the length expressly */ + len = *pos - name_pos > size - 1 ? size - 1 : *pos - name_pos; + strncpy (buffer, name_pos, len); ++ *pos += quoted; + return TRUE; + } + +@@ -1483,6 +1572,28 @@ rules_from_identifier (const gchar *identifier, + return create_ruleset_from_rule (rules, &tzr); + } + ++#ifdef G_OS_UNIX ++static GTimeZone * ++parse_footertz (const gchar *footer, size_t footerlen) ++{ ++ gchar *tzstring = g_strndup (footer + 1, footerlen - 2); ++ GTimeZone *footertz = NULL; ++ gchar *ident; ++ TimeZoneRule *rules; ++ guint rules_num = rules_from_identifier (tzstring, &ident, &rules); ++ g_free (ident); ++ g_free (tzstring); ++ if (rules_num > 1) ++ { ++ footertz = g_slice_new0 (GTimeZone); ++ init_zone_from_rules (footertz, rules, rules_num, NULL); ++ footertz->ref_count++; ++ } ++ g_free (rules); ++ return footertz; ++} ++#endif ++ + /* Construction {{{1 */ + /** + * g_time_zone_new:
meta/recipes-core/glib-2.0/glib-2.0_2.62.6.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://tzdata-update.patch \ " SRC_URI_append_class-native = " file://relocate-modules.patch"
Signature · 1 line
2.17.1