all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
@ 2024-03-02  1:50 John Kehayias via Guix-patches via
  2024-03-02  1:53 ` [bug#69495] [PATCH 1/2] gnu: python-pycairo: Update to 1.26.0 John Kehayias via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-02  1:50 UTC (permalink / raw)
  To: 69495; +Cc: John Kehayias

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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#69495] [PATCH 1/2] gnu: python-pycairo: Update to 1.26.0.
  2024-03-02  1:50 [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
@ 2024-03-02  1:53 ` John Kehayias via Guix-patches via
  2024-03-02  1:53 ` [bug#69495] [PATCH 2/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
  2024-03-27  5:08 ` [bug#69495] [PATCH 0/2] " John Kehayias via Guix-patches via
  2 siblings, 0 replies; 8+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-02  1:53 UTC (permalink / raw)
  To: 69495; +Cc: John Kehayias

* 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






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#69495] [PATCH 2/2] gnu: cairo: Update to 1.18.0.
  2024-03-02  1:50 [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
  2024-03-02  1:53 ` [bug#69495] [PATCH 1/2] gnu: python-pycairo: Update to 1.26.0 John Kehayias via Guix-patches via
@ 2024-03-02  1:53 ` John Kehayias via Guix-patches via
  2024-03-27  5:08 ` [bug#69495] [PATCH 0/2] " John Kehayias via Guix-patches via
  2 siblings, 0 replies; 8+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-02  1:53 UTC (permalink / raw)
  To: 69495; +Cc: John Kehayias

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@colimite.fr>
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2024 John Kehayias <john.kehayias@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@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@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






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
  2024-03-02  1:50 [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
  2024-03-02  1:53 ` [bug#69495] [PATCH 1/2] gnu: python-pycairo: Update to 1.26.0 John Kehayias via Guix-patches via
  2024-03-02  1:53 ` [bug#69495] [PATCH 2/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
@ 2024-03-27  5:08 ` John Kehayias via Guix-patches via
  2024-03-27  8:47   ` Efraim Flashner
  2024-03-27 17:52   ` Liliana Marie Prikler
  2 siblings, 2 replies; 8+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-27  5:08 UTC (permalink / raw)
  To: 69495
  Cc: Raghav Gururajan, Vivien Kraus, Liliana Marie Prikler,
	Maxim Cournoyer, Efraim Flashner

[-- Attachment #1: Type: text/plain, Size: 3668 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-librsvg-2.40-Skip-tests-that-fail-with-cairo-1.1.patch --]
[-- Type: text/x-patch; name=0001-gnu-librsvg-2.40-Skip-tests-that-fail-with-cairo-1.1.patch, Size: 2186 bytes --]

From 0f3e6653a65a5a7031f245260b6641aedc8f43f2 Mon Sep 17 00:00:00 2001
Message-ID: <0f3e6653a65a5a7031f245260b6641aedc8f43f2.1711514951.git.john.kehayias@protonmail.com>
From: John Kehayias <john.kehayias@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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
  2024-03-27  5:08 ` [bug#69495] [PATCH 0/2] " John Kehayias via Guix-patches via
@ 2024-03-27  8:47   ` Efraim Flashner
  2024-03-27 14:55     ` John Kehayias via Guix-patches via
  2024-03-27 17:52   ` Liliana Marie Prikler
  1 sibling, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2024-03-27  8:47 UTC (permalink / raw)
  To: John Kehayias
  Cc: 69495, Raghav Gururajan, Vivien Kraus, Liliana Marie Prikler,
	Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 6702 bytes --]

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@protonmail.com>
> From: John Kehayias <john.kehayias@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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
  2024-03-27  8:47   ` Efraim Flashner
@ 2024-03-27 14:55     ` John Kehayias via Guix-patches via
  0 siblings, 0 replies; 8+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-03-27 14:55 UTC (permalink / raw)
  To: Efraim Flashner
  Cc: 69495, Raghav Gururajan, Vivien Kraus, Liliana Marie Prikler,
	Maxim Cournoyer

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0.
  2024-03-27  5:08 ` [bug#69495] [PATCH 0/2] " John Kehayias via Guix-patches via
  2024-03-27  8:47   ` Efraim Flashner
@ 2024-03-27 17:52   ` Liliana Marie Prikler
  2024-04-18  4:41     ` bug#69495: " John Kehayias via Guix-patches via
  1 sibling, 1 reply; 8+ messages in thread
From: Liliana Marie Prikler @ 2024-03-27 17:52 UTC (permalink / raw)
  To: John Kehayias, 69495
  Cc: Raghav Gururajan, Vivien Kraus, Efraim Flashner, Maxim Cournoyer

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#69495: [PATCH 0/2] gnu: cairo: Update to 1.18.0.
  2024-03-27 17:52   ` Liliana Marie Prikler
@ 2024-04-18  4:41     ` John Kehayias via Guix-patches via
  0 siblings, 0 replies; 8+ messages in thread
From: John Kehayias via Guix-patches via @ 2024-04-18  4:41 UTC (permalink / raw)
  To: Liliana Marie Prikler
  Cc: 69495-done, Raghav Gururajan, Vivien Kraus, Efraim Flashner,
	Maxim Cournoyer

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






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-18  4:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-02  1:50 [bug#69495] [PATCH 0/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
2024-03-02  1:53 ` [bug#69495] [PATCH 1/2] gnu: python-pycairo: Update to 1.26.0 John Kehayias via Guix-patches via
2024-03-02  1:53 ` [bug#69495] [PATCH 2/2] gnu: cairo: Update to 1.18.0 John Kehayias via Guix-patches via
2024-03-27  5:08 ` [bug#69495] [PATCH 0/2] " John Kehayias via Guix-patches via
2024-03-27  8:47   ` Efraim Flashner
2024-03-27 14:55     ` John Kehayias via Guix-patches via
2024-03-27 17:52   ` Liliana Marie Prikler
2024-04-18  4:41     ` bug#69495: " John Kehayias via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.