Skip to contentSkip to conversation

cairo: upgrade 1.16.0 -> 1.18.0

PATCH Superseded [email protected] 5 participants 6 messages Nov 6, 2023

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cairo: upgrade 1.16.0 -> 1.18.0

From: qiutt <[email protected]>

Changelog for 1.18.0 [1]:
The cairo-sphinx tool has been removed
Cairo now implements Type 3 color fonts for PDF
The XML surface has been removed
The Tee surface is now automatically enabled
The Quartz surface is improved
Cairo now hides all private symbols by default on every platform Fixed multiple issues

[1] https://www.cairographics.org/news/cairo-1.18.0/

---
 .../cairo/cairo/CVE-2018-19876.patch          | 34 -----------
 .../cairo/cairo/CVE-2019-6461.patch           | 13 ++--
 .../cairo/cairo/CVE-2019-6462.patch           | 40 -------------
 .../cairo/cairo/CVE-2020-35492.patch          | 60 -------------------
 .../{cairo_1.16.0.bb => cairo_1.18.0.bb}      | 41 ++++---------
 5 files changed, 18 insertions(+), 170 deletions(-)
 delete mode 100644 meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch
 delete mode 100644 meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch
 delete mode 100644 meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch
 rename meta/recipes-graphics/cairo/{cairo_1.16.0.bb => cairo_1.18.0.bb} (68%)
meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch deleted +0 -34
deleted file mode 100644
index 4252a5663b..0000000000
@@ -1,34 +0,0 @@
-CVE: CVE-2018-19876
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
-From: Carlos Garcia Campos <[email protected]>
-Date: Mon, 19 Nov 2018 12:33:07 +0100
-Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
- cairo_ft_apply_variations
-
-Fixes a crash when using freetype >= 2.9
----
- src/cairo-ft-font.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
-index 325dd61b4..981973f78 100644
---- a/src/cairo-ft-font.c
-+++ b/src/cairo-ft-font.c
-@@ -2393,7 +2393,11 @@ skip:
- done:
-         free (coords);
-         free (current_coords);
-+#if HAVE_FT_DONE_MM_VAR
-+        FT_Done_MM_Var (face->glyph->library, ft_mm_var);
-+#else
-         free (ft_mm_var);
-+#endif
-     }
- }
- 
--- 
-2.11.0
-
meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch +7 -6
index a2dba6cb20..fab514332c 100644
@@ -1,15 +1,16 @@
 There is an assertion in function _cairo_arc_in_direction().
+backport for 1.18.0 version.
+Signed-off-by: Qiu Tingting <[email protected]>
 
 CVE: CVE-2019-6461
 Upstream-Status: Pending
 Signed-off-by: Ross Burton <[email protected]>
 
-diff --git a/src/cairo-arc.c b/src/cairo-arc.c
-index 390397bae..1bde774a4 100644
---- a/src/cairo-arc.c
-+++ b/src/cairo-arc.c
-@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t	  *cr,
-     if (cairo_status (cr))
+diff -rNu c/src/cairo-arc.c d/src/cairo-arc.c
+--- c/src/cairo-arc.c	2023-10-25 08:30:04.502179244 +0800
++++ d/src/cairo-arc.c	2023-10-25 08:30:25.122179639 +0800
+@@ -191,7 +191,8 @@
+     if (! ISFINITE (angle_max) || ! ISFINITE (angle_min))
          return;
  
 -    assert (angle_max >= angle_min);
meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch deleted +0 -40
deleted file mode 100644
index 7c3209291b..0000000000
@@ -1,40 +0,0 @@
-CVE: CVE-2019-6462
-Upstream-Status: Backport
-Signed-off-by: Quentin Schulz <[email protected]>
-
-From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001
-From: Heiko Lewin <[email protected]>
-Date: Sun, 1 Aug 2021 11:16:03 +0000
-Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop
-
----
- src/cairo-arc.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/cairo-arc.c b/src/cairo-arc.c
-index 390397bae..1c891d1a0 100644
---- a/src/cairo-arc.c
-+++ b/src/cairo-arc.c
-@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
- 	{ M_PI / 11.0,  9.81410988043554039085e-09 },
-     };
-     int table_size = ARRAY_LENGTH (table);
-+    const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */
- 
-     for (i = 0; i < table_size; i++)
- 	if (table[i].error < tolerance)
- 	    return table[i].angle;
- 
-     ++i;
-+
-     do {
- 	angle = M_PI / i++;
- 	error = _arc_error_normalized (angle);
--    } while (error > tolerance);
-+    } while (error > tolerance && i < max_segments);
- 
-     return angle;
- }
--- 
-2.38.1
-
meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch deleted +0 -60

60 lines not on this page · raw message

meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +11 -30

65 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

Patchtest results for [PATCH] cairo: upgrade 1.16.0 -> 1.18.0

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/cairo-upgrade-1.16.0---1.18.0.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

PASS: pretest lic files chksum modified not mentioned (test_metadata.TestMetadata.pretest_lic_files_chksum_modified_not_mentioned)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#2 lore raw

Re: [OE-core] Patchtest results for [PATCH] cairo: upgrade 1.16.0 -> 1.18.0

Quoted 3 lines · Patchtest

Testing patch /home/patchtest/share/mboxes/cairo-upgrade-1.16.0---1.18.0.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

This doesn't seem correct, as the patch doesn't touch LIC_FILES_CHKSUM.

Alex

#3 lore raw

Re: [OE-core] Patchtest results for [PATCH] cairo: upgrade 1.16.0 -> 1.18.0

Quoted 6 lines · Alexander Kanavin
Quoted 3 lines · Patchtest

Testing patch /home/patchtest/share/mboxes/cairo-upgrade-1.16.0---1.18.0.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

This doesn't seem correct, as the patch doesn't touch LIC_FILES_CHKSUM.

You're right. Having a look...

Quoted 2 lines

Alex

#4 lore raw
In reply to [email protected]

Thanks for working on this. Some comments below.

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 36

Quoted 10 lines · On Mon, 6 Nov 2023 at 03:34, [email protected] <[email protected]> wrote:
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +0 -3
@@ -30,47 +30,28 @@ DEPENDS = "fontconfig glib-2.0 libpng pixman zlib"
 
 SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \
            file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \
-           file://CVE-2018-19876.patch \
            file://CVE-2019-6461.patch \
-           file://CVE-2019-6462.patch \
-           file://CVE-2020-35492.patch \

I think CVE-2019-6461.patch in particular can be dropped too:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6461
points to
https://gitlab.freedesktop.org/cairo/cairo/-/issues/352
which points to
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/515
which is a part of 1.18.0.

Please include the links into the revised commit message.

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 37

Quoted 4 lines
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +2 -2
-SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
-SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
+SRC_URI[md5sum] = "3f0685fbadc530606f965b9645bb51d9"
+SRC_URI[sha256sum] = "243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64"

md5sum can be dropped, as it hasn't been used by fetcher for a long time.

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 39

Quoted 2 lines
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +1 -1
-inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script
+inherit meson pkgconfig

All of the removed inherits need to be explained, or kept. Particularly, upstream-version-is-even rule still applies, and gtk-doc support should be kept as well:
https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/meson_options.txt

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 40

Quoted 1 line
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +1 -0
+EXTRA_OEMESON = "-Dglib=enabled -Dpng=enabled -Dfontconfig=enabled -Dzlib=enabled"

How were these picked? Should they be PACKAGECONFIG options, enabled by default?

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 42

Quoted 1 line
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +0 -0
 MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace"

This implies that 'inherit multilib_script' should be kept too.

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 63

Quoted 7 lines
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +0 -7
-PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
-PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
-PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
-PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
-PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
-# trace is under GPLv3
-PACKAGECONFIG[trace] = "--enable-trace,--disable-trace"

Please mention that these options are all gone:
https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/meson_options.txt

Alex

#5 lore raw
In reply to [email protected]

Comparing this to my WIP patch of the snapshot in September:

https://git.yoctoproject.org/poky-contrib/commit/?h=ross/cairo&id=9216e710b322581e2ebec5f763fa345cb16e0409

The BUGTRACKER field needs updating.

Quoted 1 line

+SRC_URI[md5sum] = "3f0685fbadc530606f965b9645bb51d9"

Drop.

Quoted 1 line

X11DEPENDS = "virtual/libx11 libsm libxrender libxext"

This list of dependencies is smaller now, so I inlined it.

Quoted 6 lines
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +4 -0
+PACKAGECONFIG ??= " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
+"
+

PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}”

Same line three times, no need for the overrides.

meta/recipes-graphics/cairo/cairo_1.18.0.bb DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" · line 54

Quoted 2 lines
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +2 -0
+PACKAGECONFIG[x11] = "-Dxlib=enabled,-Dxlib=disabled,${X11DEPENDS}"
+PACKAGECONFIG[xcb] = "-Dxcb=enabled,-Dxcb=disabled,libxcb"

Inline the dependencies, and rename x11 to xlib, as that’s what the option is called.

The do_install:append can be trimmed, see my WIP.

Quoted 5 lines
meta/recipes-graphics/cairo/cairo_1.18.0.bb renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb +1 -1
-FILES:${PN} = "${libdir}/libcairo.so.*"
+FILES:${PN} = "${libdir}/libcairo.so.* ${libdir}/cairo/libcairo-fdr.so*"

FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*" FILES:${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so”

cairo-fdr should be in perf-utils, not the core library.

Ross