GNU bug report logs - #69495
[PATCH 0/2] gnu: cairo: Update to 1.18.0.

Previous Next

Package: guix-patches;

Reported by: John Kehayias <john.kehayias <at> protonmail.com>

Date: Sat, 2 Mar 2024 01:52:02 UTC

Severity: normal

Tags: patch

Done: John Kehayias <john.kehayias <at> protonmail.com>

To reply to this bug, email your comments to 69495 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Sat, 02 Mar 2024 01:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Kehayias <john.kehayias <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 02 Mar 2024 01:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: guix-patches <at> gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>
Subject: [PATCH 0/2] gnu: cairo: Update to 1.18.0.
Date: Sat, 02 Mar 2024 01:50:54 +0000
Hi gnome-team and guix,

I'm cc'ing the gnome-team as this would normally fall to them, but with their
pending merge and the builds upcoming on mesa-updates (libdrm, which cairo
depends on), I think this will go on mesa-updates. The patch is based on
master, not gnome-team. Still, thought it would be good to have a review as
this was non-trivial. Thanks to lilyp on #guix for tips!

Please see the patches to update cairo to the new release (after many years!)
of 1.18.0. An update to python-pycairo was needed first. The end result is
that our cairo package is quite a bit simpler as the defaults include the tee
backend that we had enabled before. I removed all the old configure flags and
propagated-inputs which were commented out and now obsolete.

The docs require gtk-doc which depends on cairo. To break the cycle cairo is
hidden (but exported) and built without docs, with the public cairo-with-docs
including them. I followed what was done for glib with a similar issue.

I did not try too much enable tests, which may have been revamped? The quick
look I took in the source docs suggested that it is very system dependent
(reference images) though does run on their GitLab CI. When enabling
test/ps2png.p/ps2png.c.o fails to build as it can't find cairo.h. Perhaps it
needs to build tests in a phase after cairo has built and set in a way to find
this just build version?

Anyway, this built locally for me on x86_64. I built up to icecat, which needs
the tee backend we previously manually enabled, and it built and ran
successfully.

Let me know of any issues or changes wanted or if someone wants to take this
on a different branch. I think it makes sense on mesa-updates due to the
libdrm update I will take there.

Thanks!
John


John Kehayias (2):
  gnu: python-pycairo: Update to 1.26.0.
  gnu: cairo: Update to 1.18.0.

 gnu/local.mk                                  |  2 -
 gnu/packages/gtk.scm                          | 85 ++++++++++---------
 .../patches/cairo-CVE-2018-19876.patch        | 37 --------
 .../patches/cairo-CVE-2020-35492.patch        | 49 -----------
 4 files changed, 47 insertions(+), 126 deletions(-)
 delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch
 delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch


base-commit: b386c11e7804e0b577411d930b60f1e0a4a0382c
prerequisite-patch-id: 2889be19c4a046760f2f608cefff987b11b65a31
--
2.41.0






Information forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Sat, 02 Mar 2024 01:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 69495 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: 69495 <at> debbugs.gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>
Subject: [PATCH 1/2] gnu: python-pycairo: Update to 1.26.0.
Date: Sat, 02 Mar 2024 01:53:35 +0000
* gnu/packages/gtk.scm (python-pycairo): Update to 1.26.0.

Change-Id: I7349bd0c68b061d0f3fe46db52b7fdc63acbd69b
---
 gnu/packages/gtk.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1a3bb56945..67a0c0727e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1941,7 +1941,7 @@ (define-public gtksourceviewmm
 (define-public python-pycairo
   (package
     (name "python-pycairo")
-    (version "1.21.0")
+    (version "1.26.0")
     (source
      (origin
       (method url-fetch)
@@ -1949,7 +1949,7 @@ (define-public python-pycairo
                           version "/pycairo-" version ".tar.gz"))
       (sha256
        (base32
-        "0jxpyibpjadw8ah1mqbhvryr795myiznb1ikm8wgjbamibqhf695"))))
+        "1sybz43sj4ynjahlkidrcdpdrq8yi1avkndc2hgb5pgvfjld1p9d"))))
     (build-system python-build-system)
     (native-inputs
      (list pkg-config python-pytest))
--
2.41.0






Information forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Sat, 02 Mar 2024 01:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 69495 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: 69495 <at> debbugs.gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>
Subject: [PATCH 2/2] gnu: cairo: Update to 1.18.0.
Date: Sat, 02 Mar 2024 01:53:41 +0000
With this new release of cairo many old configure options were removed and now
meson is used to build it.  The defaults include the tee backend which we had
previously enabled while the xml backend has been dropped from cairo
completely.  Old configure options where were commented out to be enabled have
been removed as they no longer apply to version 1.18.0.

The variable 'cairo' is now a hidden package to work around a dependency cycle
where gtk-doc is needed to build the documentation (which itself depends on
cairo).  The new variable 'cairo-with-documentation' is now the public package
and the module exports 'cairo' for use in other packages.  This follows what
was done for glib.

* gnu/packages/gtk.scm: Export 'cairo'.
(cairo): Update to 1.18.0.
[source]: Remove 'patches' field.
[properties]: Hide package.
[outputs]: Remove (doc output is now in cairo-with-documentation).
[build-system]: Change to meson-build-system.
[arguments]: Add #:glib-or-gtk?.  Remove old flags from #:configure-flags and
add '-Dtests=disabled' to match #:tests?.
[propagated-inputs]: Remove commented out packages.
(cairo-with-documentation): New variable.
(cairo-sans-poppler)[properties]: No longer set hidden as it is now inherited
from cairo.
(cairo-xcb)[properties]: Unhide (inherited from cairo).
[arguments]: Remove obsolete #:configure-flags and properly inherit from cairo.
* gnu/packages/patches/cairo-CVE-2018-19876.patch: Remove.
* gnu/packages/patches/cairo-CVE-2020-35492.patch: Remove.
* gnu/local.mk (dist_patch_DATA): Remove them.

Change-Id: I2f4c953b23c6b32b1fafaf03db89d7a475fc6956
---
 gnu/local.mk                                  |  2 -
 gnu/packages/gtk.scm                          | 81 ++++++++++---------
 .../patches/cairo-CVE-2018-19876.patch        | 37 ---------
 .../patches/cairo-CVE-2020-35492.patch        | 49 -----------
 4 files changed, 45 insertions(+), 124 deletions(-)
 delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch
 delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index bed0c181e4..108cbe83ba 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1000,8 +1000,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/breezy-fix-gio.patch			\
   %D%/packages/patches/byobu-writable-status.patch		\
   %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch	\
-  %D%/packages/patches/cairo-CVE-2018-19876.patch		\
-  %D%/packages/patches/cairo-CVE-2020-35492.patch		\
   %D%/packages/patches/calibre-no-updates-dialog.patch		\
   %D%/packages/patches/calibre-remove-test-sqlite.patch		\
   %D%/packages/patches/calibre-remove-test-unrar.patch		\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 67a0c0727e..b5312b4575 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -36,6 +36,7 @@
 ;;; Copyright © 2023 Sergiu Ivanov <sivanov <at> colimite.fr>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2024 John Kehayias <john.kehayias <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,7 +121,11 @@ (define-module (gnu packages gtk)
   #:use-module (gnu packages pulseaudio)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
-  #:use-module (ice-9 match))
+  #:use-module (ice-9 match)
+  ;; Export cairo to break a dependency cycle, as gtk-doc is needed to build
+  ;; the documentation.  Use cairo for other packages and
+  ;; cairo-with-documentation as the public package.
+  #:export (cairo))

 (define-public appmenu-gtk-module
   (package
@@ -159,10 +164,10 @@ (define-public appmenu-gtk-module
     (home-page "https://gitlab.com/vala-panel-project/vala-panel-appmenu")
     (license (list license:lgpl3))))

-(define-public cairo
+(define cairo
   (package
     (name "cairo")
-    (version "1.16.0")
+    (version "1.18.0")
     (source
      (origin
        (method url-fetch)
@@ -170,30 +175,13 @@ (define-public cairo
         (string-append "https://cairographics.org/releases/cairo-"
                        version ".tar.xz"))
        (sha256
-        (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))
-       (patches (search-patches
-		 "cairo-CVE-2018-19876.patch"
-		 "cairo-CVE-2020-35492.patch"))))
-    (build-system glib-or-gtk-build-system)
-    (outputs '("out" "doc"))
+        (base32 "0r0by563s75xyzz0d0j1nmjqmdrk2x9agk7r57p3v8vqp4v0ffi4"))))
+    (build-system meson-build-system)
     (arguments
      `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
+       #:glib-or-gtk? #t
        #:configure-flags
-       (list
-        "--disable-static"
-        ;; XXX: To be enabled.
-        ;; "--enable-gallium=yes"
-        ;; "--enable-gl=yes"
-        ;; " --enable-glesv2=yes"
-        ;; "--enable-glesv3=yes"
-        ;; "--enable-cogl=yes"
-        ;; "--enable-directfb=yes"
-        ;; "--enable-vg=yes"
-        "--enable-tee=yes"              ;needed for GNU IceCat
-        "--enable-xml=yes"              ;for cairo-xml support
-        (string-append "--with-html-dir="
-                       (assoc-ref %outputs "doc")
-                       "/share/gtk-doc/html"))))
+       (list "-Dtests=disabled")))
     (native-inputs
      `(,@(if (target-hurd?)
              '()
@@ -211,15 +199,10 @@ (define-public cairo
              '()
              `(("poppler" ,poppler)))))
     (propagated-inputs
-     `( ;; ("cogl" ,cogl)
-       ;; ("directfb" ,directfb)
-       ("fontconfig" ,fontconfig)
+     `(("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("glib" ,glib)
-       ;; ("gtk+" ,gtk+)
        ("libpng" ,libpng)
-       ;; ("librsvg" ,librsvg)
-       ;; ("opengl" ,mesa)
        ("pixman" ,pixman)
        ("x11" ,libx11)
        ("xcb" ,libxcb)
@@ -235,24 +218,50 @@ (define-public cairo
      ;; This project is dual-licensed.
      (list
       license:lgpl2.1+
-      license:mpl1.1))))
+      license:mpl1.1))
+    ;; Hide and have cairo-with-documentation public.
+    (properties '((hidden? . #t)))))
+
+(define-public cairo-with-documentation
+  ;; cairo's docs must be built in a separate package since it requires
+  ;; gtk-doc, which in turn depends on cairo.
+  (package/inherit cairo
+    (properties (alist-delete 'hidden? (package-properties cairo)))
+    (outputs (cons "doc" (package-outputs cairo)))
+    (native-inputs
+     (modify-inputs (package-native-inputs cairo)
+       (prepend gtk-doc)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments cairo)
+       ((#:configure-flags flags ''())
+        #~(cons "-Dgtk_doc=true" #$flags))
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            (add-after 'install 'move-doc
+              (lambda* (#:key outputs #:allow-other-keys)
+                (mkdir-p (string-append #$output:doc "/share"))
+                (rename-file
+                 (string-append #$output "/share/gtk-doc")
+                 (string-append #$output:doc "/share/gtk-doc"))
+                ;; This directory is now empty so remove it.
+                (rmdir (string-append #$output "/share"))))))))))

 (define-public cairo-sans-poppler
   ;; Variant used to break the dependency cycle between Poppler and Cairo.
   (package/inherit cairo
-    (inputs (alist-delete "poppler" (package-inputs cairo)))
-    (properties `((hidden? . #t)))))
+    (inputs (alist-delete "poppler" (package-inputs cairo)))))

 (define-public cairo-xcb
   (package/inherit cairo
+    (properties (alist-delete 'hidden? (package-properties cairo)))
     (name "cairo-xcb")
     (inputs
      `(("mesa" ,mesa)
        ,@(package-inputs cairo)))
     (arguments
-     `(#:tests? #f
-       #:configure-flags
-       '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
+     (substitute-keyword-arguments (package-arguments cairo)
+       ((#:configure-flags flags ''())
+        #~(cons "-Dxlib-xcb=enabled" #$flags))))
     (synopsis "2D graphics library (with X11 support)")))

 (define-public harfbuzz
diff --git a/gnu/packages/patches/cairo-CVE-2018-19876.patch b/gnu/packages/patches/cairo-CVE-2018-19876.patch
deleted file mode 100644
index c0fba2ecaa..0000000000
--- a/gnu/packages/patches/cairo-CVE-2018-19876.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Copied from Debian.
-
-From: Carlos Garcia Campos <cgarcia <at> igalia.com>
-Date: Mon, 19 Nov 2018 12:33:07 +0100
-Subject: ft: Use FT_Done_MM_Var instead of free when available in
- cairo_ft_apply_variations
-
-Fixes a crash when using freetype >= 2.9
-
-[This is considered to be security-sensitive because WebKitGTK+ sets its
-own memory allocator, which is not compatible with system free(), making
-this a remotely triggerable denial of service or memory corruption.]
-
-Origin: upstream, commit:90e85c2493fdfa3551f202ff10282463f1e36645
-Bug: https://gitlab.freedesktop.org/cairo/cairo/merge_requests/5
-Bug-Debian: https://bugs.debian.org/916389
-Bug-CVE: CVE-2018-19876
----
- 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 325dd61..981973f 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
-     }
- }
-
diff --git a/gnu/packages/patches/cairo-CVE-2020-35492.patch b/gnu/packages/patches/cairo-CVE-2020-35492.patch
deleted file mode 100644
index e8b90fa5c5..0000000000
--- a/gnu/packages/patches/cairo-CVE-2020-35492.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Copied from Debian.
-
-From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001
-From: Heiko Lewin <heiko.lewin <at> worldiety.de>
-Date: Tue, 15 Dec 2020 16:48:19 +0100
-Subject: [PATCH] Fix mask usage in image-compositor
-
-[trimmed test case, since not used in Debian build]
-
----
- src/cairo-image-compositor.c                |   8 ++--
-
---- cairo-1.16.0.orig/src/cairo-image-compositor.c
-+++ cairo-1.16.0/src/cairo-image-compositor.c
-@@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_rende
- 		    unsigned num_spans)
- {
-     cairo_image_span_renderer_t *r = abstract_renderer;
--    uint8_t *m;
-+    uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask);
-     int x0;
-
-     if (num_spans == 0)
- 	return CAIRO_STATUS_SUCCESS;
-
-     x0 = spans[0].x;
--    m = r->_buf;
-+    m = base;
-     do {
- 	int len = spans[1].x - spans[0].x;
- 	if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) {
-@@ -2646,7 +2646,7 @@ _inplace_src_spans (void *abstract_rende
- 				      spans[0].x, y,
- 				      spans[1].x - spans[0].x, h);
-
--	    m = r->_buf;
-+	    m = base;
- 	    x0 = spans[1].x;
- 	} else if (spans[0].coverage == 0x0) {
- 	    if (spans[0].x != x0) {
-@@ -2675,7 +2675,7 @@ _inplace_src_spans (void *abstract_rende
- #endif
- 	    }
-
--	    m = r->_buf;
-+	    m = base;
- 	    x0 = spans[1].x;
- 	} else {
- 	    *m++ = spans[0].coverage;
--
2.41.0






Information forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Wed, 27 Mar 2024 05:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 69495 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: 69495 <at> debbugs.gnu.org
Cc: Raghav Gururajan <rg <at> raghavgururajan.name>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Efraim Flashner <efraim <at> flashner.co.il>
Subject: Re: [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
Date: Wed, 27 Mar 2024 05:08:02 +0000
[Message part 1 (text/plain, inline)]
Hello,

Arg, I don't know if this ever was actually sent to the gnome-team! Also
adding Efraim due to a librsvg issue (below).

Apologies if it didn't go through originally (or if you are getting it
again).

On Sat, Mar 02, 2024 at 01:50 AM, John Kehayias wrote:

> Hi gnome-team and guix,
>
> I'm cc'ing the gnome-team as this would normally fall to them, but with their
> pending merge and the builds upcoming on mesa-updates (libdrm, which cairo
> depends on), I think this will go on mesa-updates. The patch is based on
> master, not gnome-team. Still, thought it would be good to have a review as
> this was non-trivial. Thanks to lilyp on #guix for tips!
>
> Please see the patches to update cairo to the new release (after many years!)
> of 1.18.0. An update to python-pycairo was needed first. The end result is
> that our cairo package is quite a bit simpler as the defaults include the tee
> backend that we had enabled before. I removed all the old configure flags and
> propagated-inputs which were commented out and now obsolete.
>
> The docs require gtk-doc which depends on cairo. To break the cycle cairo is
> hidden (but exported) and built without docs, with the public cairo-with-docs
> including them. I followed what was done for glib with a similar issue.
>
> I did not try too much enable tests, which may have been revamped? The quick
> look I took in the source docs suggested that it is very system dependent
> (reference images) though does run on their GitLab CI. When enabling
> test/ps2png.p/ps2png.c.o fails to build as it can't find cairo.h. Perhaps it
> needs to build tests in a phase after cairo has built and set in a way to find
> this just build version?
>
> Anyway, this built locally for me on x86_64. I built up to icecat, which needs
> the tee backend we previously manually enabled, and it built and ran
> successfully.
>
> Let me know of any issues or changes wanted or if someone wants to take this
> on a different branch. I think it makes sense on mesa-updates due to the
> libdrm update I will take there.
>
> Thanks!
> John
>
>
> John Kehayias (2):
>   gnu: python-pycairo: Update to 1.26.0.
>   gnu: cairo: Update to 1.18.0.
>
>  gnu/local.mk                                  |  2 -
>  gnu/packages/gtk.scm                          | 85 ++++++++++---------
>  .../patches/cairo-CVE-2018-19876.patch        | 37 --------
>  .../patches/cairo-CVE-2020-35492.patch        | 49 -----------
>  4 files changed, 47 insertions(+), 126 deletions(-)
>  delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch
>  delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch
>
>
> base-commit: b386c11e7804e0b577411d930b60f1e0a4a0382c
> prerequisite-patch-id: 2889be19c4a046760f2f608cefff987b11b65a31
> --
> 2.41.0

I've applied this series locally and haven't run into issues in building
(and trying a few random packages). Happy to take feedback before I push
this to mesa-updates, and even then will be some time before the branch
will be built to be merged to master. Other updates include mesa, sdl2,
and vulkan.

I did run into two test failures for the older librsvg-2.40. Since that
is an old version, I guess we might expect issues as dependencies are
updated. I disabled the two failing tests with the attached patch. One
referred to a bug fix that had something to do with calling cairo, not
sure about the other.

Apologies if the CCing with teams didn't go through properly! And thanks
to Liliana for initial help on #guix with sorting out what was needed
for the circular dependency between cairo and gtk-doc.

John
[0001-gnu-librsvg-2.40-Skip-tests-that-fail-with-cairo-1.1.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Wed, 27 Mar 2024 08:49:02 GMT) Full text and rfc822 format available.

Message #17 received at 69495 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: 69495 <at> debbugs.gnu.org, Raghav Gururajan <rg <at> raghavgururajan.name>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
Date: Wed, 27 Mar 2024 10:47:57 +0200
[Message part 1 (text/plain, inline)]
On Wed, Mar 27, 2024 at 05:08:02AM +0000, John Kehayias wrote:
> Hello,
> 
> Arg, I don't know if this ever was actually sent to the gnome-team! Also
> adding Efraim due to a librsvg issue (below).
> 
> Apologies if it didn't go through originally (or if you are getting it
> again).
> 
> On Sat, Mar 02, 2024 at 01:50 AM, John Kehayias wrote:
> 
> > Hi gnome-team and guix,
> >
> > I'm cc'ing the gnome-team as this would normally fall to them, but with their
> > pending merge and the builds upcoming on mesa-updates (libdrm, which cairo
> > depends on), I think this will go on mesa-updates. The patch is based on
> > master, not gnome-team. Still, thought it would be good to have a review as
> > this was non-trivial. Thanks to lilyp on #guix for tips!
> >
> > Please see the patches to update cairo to the new release (after many years!)
> > of 1.18.0. An update to python-pycairo was needed first. The end result is
> > that our cairo package is quite a bit simpler as the defaults include the tee
> > backend that we had enabled before. I removed all the old configure flags and
> > propagated-inputs which were commented out and now obsolete.
> >
> > The docs require gtk-doc which depends on cairo. To break the cycle cairo is
> > hidden (but exported) and built without docs, with the public cairo-with-docs
> > including them. I followed what was done for glib with a similar issue.
> >
> > I did not try too much enable tests, which may have been revamped? The quick
> > look I took in the source docs suggested that it is very system dependent
> > (reference images) though does run on their GitLab CI. When enabling
> > test/ps2png.p/ps2png.c.o fails to build as it can't find cairo.h. Perhaps it
> > needs to build tests in a phase after cairo has built and set in a way to find
> > this just build version?
> >
> > Anyway, this built locally for me on x86_64. I built up to icecat, which needs
> > the tee backend we previously manually enabled, and it built and ran
> > successfully.
> >
> > Let me know of any issues or changes wanted or if someone wants to take this
> > on a different branch. I think it makes sense on mesa-updates due to the
> > libdrm update I will take there.
> >
> > Thanks!
> > John
> >
> >
> > John Kehayias (2):
> >   gnu: python-pycairo: Update to 1.26.0.
> >   gnu: cairo: Update to 1.18.0.
> >
> >  gnu/local.mk                                  |  2 -
> >  gnu/packages/gtk.scm                          | 85 ++++++++++---------
> >  .../patches/cairo-CVE-2018-19876.patch        | 37 --------
> >  .../patches/cairo-CVE-2020-35492.patch        | 49 -----------
> >  4 files changed, 47 insertions(+), 126 deletions(-)
> >  delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch
> >  delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch
> >
> >
> > base-commit: b386c11e7804e0b577411d930b60f1e0a4a0382c
> > prerequisite-patch-id: 2889be19c4a046760f2f608cefff987b11b65a31
> > --
> > 2.41.0
> 
> I've applied this series locally and haven't run into issues in building
> (and trying a few random packages). Happy to take feedback before I push
> this to mesa-updates, and even then will be some time before the branch
> will be built to be merged to master. Other updates include mesa, sdl2,
> and vulkan.
> 
> I did run into two test failures for the older librsvg-2.40. Since that
> is an old version, I guess we might expect issues as dependencies are
> updated. I disabled the two failing tests with the attached patch. One
> referred to a bug fix that had something to do with calling cairo, not
> sure about the other.
> 
> Apologies if the CCing with teams didn't go through properly! And thanks
> to Liliana for initial help on #guix with sorting out what was needed
> for the circular dependency between cairo and gtk-doc.

Currently x86_64, aarch64 and riscv64 are the only architectures using
the newer librsvg. Can you test the older librsvg-2.40 with the newer
cairo on x86_64 to see if the tests also fail there? I'm curious if it's
a 32-bit problem or if its just that old.

Overall I have no issues with skipping those two tests.

> From 0f3e6653a65a5a7031f245260b6641aedc8f43f2 Mon Sep 17 00:00:00 2001
> Message-ID: <0f3e6653a65a5a7031f245260b6641aedc8f43f2.1711514951.git.john.kehayias <at> protonmail.com>
> From: John Kehayias <john.kehayias <at> protonmail.com>
> Date: Wed, 27 Mar 2024 00:45:59 -0400
> Subject: [PATCH] gnu: librsvg-2.40: Skip tests that fail with cairo 1.18.0.
> 
> * gnu/packages/gnome.scm (librsvg-2.40)[arguments]: Skip two tests which fail
> after cairo was updated to version 1.18.0.
> 
> Change-Id: If3867a9fdee6481da819954d77341f411e85e78b
> ---
>  gnu/packages/gnome.scm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 06256066bc..55b60b7b12 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -3717,12 +3717,15 @@ (define-public librsvg-2.40
>                             "svg1.1/masking-mask-01-b.svg"
>                             ;; This test fails on aarch64:
>                             "bugs/777834-empty-text-children.svg"
> -
>                             ;; These two tests fail due to slightly different
>                             ;; text rendering (different kerning or similar),
>                             ;; nothing alarming.
>                             "bugs/340047.svg"
> -                           "bugs/749415.svg"))))))))
> +                           "bugs/749415.svg"
> +                           ;; These two tests fail with the update to cairo
> +                           ;; version 1.18.0.
> +                           "bugs/587721-text-transform.svg"
> +                           "svg1.1/masking-path-03-b.svg"))))))))
>      (native-inputs
>       (list pkg-config
>             `(,glib "bin") ; glib-mkenums, etc.
> 
> base-commit: c3f15443bc6d457758aad1326dcc6dcad9cf8d6e
> prerequisite-patch-id: fa1f23e1340a3eeb9f347ed719b9b0fa0558fb3f
> prerequisite-patch-id: a1eb5f0955b9988d3bfe3be8403c75999a1cae5f
> prerequisite-patch-id: 2889be19c4a046760f2f608cefff987b11b65a31
> prerequisite-patch-id: ea93b6662275aeec1e014a9bc9fe7a96f26ac600
> prerequisite-patch-id: 177440a12b7c797d22f8bb1253db133d2fbad348
> prerequisite-patch-id: 3a5189c1e8e4612ceb6f1b70cc3c83e39a977eb9
> -- 
> 2.41.0
> 


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Wed, 27 Mar 2024 14:57:01 GMT) Full text and rfc822 format available.

Message #20 received at 69495 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 69495 <at> debbugs.gnu.org, Raghav Gururajan <rg <at> raghavgururajan.name>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
Date: Wed, 27 Mar 2024 14:55:48 +0000
Hi Efraim,

On Wed, Mar 27, 2024 at 10:47 AM, Efraim Flashner wrote:

>
> Currently x86_64, aarch64 and riscv64 are the only architectures using
> the newer librsvg. Can you test the older librsvg-2.40 with the newer
> cairo on x86_64 to see if the tests also fail there? I'm curious if it's
> a 32-bit problem or if its just that old.
>

Yes, those tests fail on both x86_64 and i686. I should have specified
that I probably ran into the issue building something for i686, but
then confirmed the tests fail and the patch skipping them works on
x86_64 and i686. But this was due to building something else so I just
double checked explicitly.

> Overall I have no issues with skipping those two tests.
>

Thanks! I'll keep this locally while I wait to see how to do the
vulkan upgrades.

Though maybe I should get the build farm moving on the rebuild from
cairo at least. The vulkan upgrade will also rebuild mesa dependents
as vulkan was needed for a fix in mesa (cherry picked from
core-updates).

John





Information forwarded to guix-patches <at> gnu.org:
bug#69495; Package guix-patches. (Wed, 27 Mar 2024 17:54:03 GMT) Full text and rfc822 format available.

Message #23 received at 69495 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: John Kehayias <john.kehayias <at> protonmail.com>, 69495 <at> debbugs.gnu.org
Cc: Raghav Gururajan <rg <at> raghavgururajan.name>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Efraim Flashner <efraim <at> flashner.co.il>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
Date: Wed, 27 Mar 2024 18:52:58 +0100
Am Mittwoch, dem 27.03.2024 um 05:08 +0000 schrieb John Kehayias:
> Hello,
> 
> Arg, I don't know if this ever was actually sent to the gnome-team!
> Also
> adding Efraim due to a librsvg issue (below).
> 
> Apologies if it didn't go through originally (or if you are getting
> it
> again).
> 
> On Sat, Mar 02, 2024 at 01:50 AM, John Kehayias wrote:
> 
> > Hi gnome-team and guix,
> > 
> > I'm cc'ing the gnome-team as this would normally fall to them, but
> > with their
> > pending merge and the builds upcoming on mesa-updates (libdrm,
> > which cairo
> > depends on), I think this will go on mesa-updates. The patch is
> > based on
> > master, not gnome-team. Still, thought it would be good to have a
> > review as
> > this was non-trivial. Thanks to lilyp on #guix for tips!
> > 
> > Please see the patches to update cairo to the new release (after
> > many years!)
> > of 1.18.0. An update to python-pycairo was needed first. The end
> > result is
> > that our cairo package is quite a bit simpler as the defaults
> > include the tee
> > backend that we had enabled before. I removed all the old configure
> > flags and
> > propagated-inputs which were commented out and now obsolete.
> > 
> > The docs require gtk-doc which depends on cairo. To break the cycle
> > cairo is
> > hidden (but exported) and built without docs, with the public
> > cairo-with-docs
> > including them. I followed what was done for glib with a similar
> > issue.
> > 
> > I did not try too much enable tests, which may have been revamped?
> > The quick
> > look I took in the source docs suggested that it is very system
> > dependent
> > (reference images) though does run on their GitLab CI. When
> > enabling
> > test/ps2png.p/ps2png.c.o fails to build as it can't find cairo.h.
> > Perhaps it
> > needs to build tests in a phase after cairo has built and set in a
> > way to find
> > this just build version?
> > 
> > Anyway, this built locally for me on x86_64. I built up to icecat,
> > which needs
> > the tee backend we previously manually enabled, and it built and
> > ran
> > successfully.
> > 
> > Let me know of any issues or changes wanted or if someone wants to
> > take this
> > on a different branch. I think it makes sense on mesa-updates due
> > to the
> > libdrm update I will take there.
> > 
> > Thanks!
> > John
> > 
> > 
> > John Kehayias (2):
> >   gnu: python-pycairo: Update to 1.26.0.
> >   gnu: cairo: Update to 1.18.0.
> > 
> >  gnu/local.mk                                  |  2 -
> >  gnu/packages/gtk.scm                          | 85 ++++++++++-----
> > ----
> >  .../patches/cairo-CVE-2018-19876.patch        | 37 --------
> >  .../patches/cairo-CVE-2020-35492.patch        | 49 -----------
> >  4 files changed, 47 insertions(+), 126 deletions(-)
> >  delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch
> >  delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch
> > 
> > 
> > base-commit: b386c11e7804e0b577411d930b60f1e0a4a0382c
> > prerequisite-patch-id: 2889be19c4a046760f2f608cefff987b11b65a31
> > --
> > 2.41.0
> 
> I've applied this series locally and haven't run into issues in
> building (and trying a few random packages). Happy to take feedback
> before I push this to mesa-updates, and even then will be some time
> before the branch will be built to be merged to master. Other updates
> include mesa, sdl2, and vulkan.
I think mesa-updates would be the right place – gnome-team is quite
close to merge, so we can't do a world rebuild there right now.


Cheers




Reply sent to John Kehayias <john.kehayias <at> protonmail.com>:
You have taken responsibility. (Thu, 18 Apr 2024 04:43:03 GMT) Full text and rfc822 format available.

Notification sent to John Kehayias <john.kehayias <at> protonmail.com>:
bug acknowledged by developer. (Thu, 18 Apr 2024 04:43:04 GMT) Full text and rfc822 format available.

Message #28 received at 69495-done <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 69495-done <at> debbugs.gnu.org, Raghav Gururajan <rg <at> raghavgururajan.name>,
 Vivien Kraus <vivien <at> planete-kraus.eu>,
 Efraim Flashner <efraim <at> flashner.co.il>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
Date: Thu, 18 Apr 2024 04:41:38 +0000
On Wed, Mar 27, 2024 at 06:52 PM, Liliana Marie Prikler wrote:

> Am Mittwoch, dem 27.03.2024 um 05:08 +0000 schrieb John Kehayias:
>> Hello,
>>
>> Arg, I don't know if this ever was actually sent to the gnome-team!
>> Also
>> adding Efraim due to a librsvg issue (below).
>>
>> Apologies if it didn't go through originally (or if you are getting
>> it
>> again).
>>
>> On Sat, Mar 02, 2024 at 01:50 AM, John Kehayias wrote:
>>
>> > Hi gnome-team and guix,
>> >
>> > I'm cc'ing the gnome-team as this would normally fall to them, but
>> > with their
>> > pending merge and the builds upcoming on mesa-updates (libdrm,
>> > which cairo
>> > depends on), I think this will go on mesa-updates. The patch is
>> > based on
>> > master, not gnome-team. Still, thought it would be good to have a
>> > review as
>> > this was non-trivial. Thanks to lilyp on #guix for tips!
>> >
>> > Please see the patches to update cairo to the new release (after
>> > many years!)
>> > of 1.18.0. An update to python-pycairo was needed first. The end
>> > result is
>> > that our cairo package is quite a bit simpler as the defaults
>> > include the tee
>> > backend that we had enabled before. I removed all the old configure
>> > flags and
>> > propagated-inputs which were commented out and now obsolete.
>> >
>> > The docs require gtk-doc which depends on cairo. To break the cycle
>> > cairo is
>> > hidden (but exported) and built without docs, with the public
>> > cairo-with-docs
>> > including them. I followed what was done for glib with a similar
>> > issue.
>> >
>> > I did not try too much enable tests, which may have been revamped?
>> > The quick
>> > look I took in the source docs suggested that it is very system
>> > dependent
>> > (reference images) though does run on their GitLab CI. When
>> > enabling
>> > test/ps2png.p/ps2png.c.o fails to build as it can't find cairo.h.
>> > Perhaps it
>> > needs to build tests in a phase after cairo has built and set in a
>> > way to find
>> > this just build version?
>> >
>> > Anyway, this built locally for me on x86_64. I built up to icecat,
>> > which needs
>> > the tee backend we previously manually enabled, and it built and
>> > ran
>> > successfully.
>> >
>> > Let me know of any issues or changes wanted or if someone wants to
>> > take this
>> > on a different branch. I think it makes sense on mesa-updates due
>> > to the
>> > libdrm update I will take there.
>> >
>> > Thanks!
>> > John
>> >
>> >
>> > John Kehayias (2):
>> >   gnu: python-pycairo: Update to 1.26.0.
>> >   gnu: cairo: Update to 1.18.0.
>> >
>> >  gnu/local.mk                                  |  2 -
>> >  gnu/packages/gtk.scm                          | 85 ++++++++++-----
>> > ----
>> >  .../patches/cairo-CVE-2018-19876.patch        | 37 --------
>> >  .../patches/cairo-CVE-2020-35492.patch        | 49 -----------
>> >  4 files changed, 47 insertions(+), 126 deletions(-)
>> >  delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch
>> >  delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch
>> >
>> >
>> > base-commit: b386c11e7804e0b577411d930b60f1e0a4a0382c
>> > prerequisite-patch-id: 2889be19c4a046760f2f608cefff987b11b65a31
>> > --
>> > 2.41.0
>>
>> I've applied this series locally and haven't run into issues in
>> building (and trying a few random packages). Happy to take feedback
>> before I push this to mesa-updates, and even then will be some time
>> before the branch will be built to be merged to master. Other updates
>> include mesa, sdl2, and vulkan.
> I think mesa-updates would be the right place – gnome-team is quite
> close to merge, so we can't do a world rebuild there right now.
>
>
> Cheers

Thanks, and sorry for not updating sooner here.

Pushed on mesa-updates 51ae492e8bde8c5465ac1b7bab72944aaf798e3f and
merged to master with 2d5736cc3e869fadd2592cc13a8d332fac63b144

John






This bug report was last modified 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.