From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EC+lB+KG4mUwZQEA62LTzQ:P1 (envelope-from ) for ; Sat, 02 Mar 2024 02:54:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EC+lB+KG4mUwZQEA62LTzQ (envelope-from ) for ; Sat, 02 Mar 2024 02:54:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=MFgJ7ZQn; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709344481; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4LIgz0VWQnLkGvce1Ryt225mxsJ573hfu5Qc+FEtE8k=; b=JACS4P2KPdDcUba9DxGdO0iZj4Q1PxlGevm5JxFAY0GkL8BYzERbeERjOL3UxNSvDbYC8o IVg0GlQYHGIghXajHrJouto4ggFoKb+XfkQ2CJAAQmejBOgdJ05a77VSqc9arUcnzAVOQ6 9an8N2agCFVaGCiRGrpi4k9di/+gSJ+Mip1Jdlv2KN30nr/QZHRIO8SxkdfnFhgbpvavlh gMHUcs4YIKz5rehqenV/XGgCdVXCUWzN6maDhy5YaYpwrtSWNmEY5mxQmNmGI9z/cCBekR UlFVpnfGPSpJEsHxxf6vOLCw0qRxpJjnNrsN3DydxH+QcPXHMPmCFQixWLAGPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=MFgJ7ZQn; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709344481; a=rsa-sha256; cv=none; b=n5yQ2qbJrJwPMllrSUB27b+YSKqrYvlJdwqyERjMAkHorvImOA56xEuzWocPWs9nuOohrv QVS8jG1aNjMlKOQLRlC0COPr5n6PbyHXM41F/JFI/dtR9VXXmbbOSTISUy8vSfOySPbCye BoXDlIRkn+oHB/2N+8OBvTcglA24K2nFjDZe2KIy/J26VHFOnggOR34IlTdWp/egCxKenX VxgAoO1D6pUpCwqrVUdgMBbL5hhfKO8bNcbaVYdEIz972bnH2KvW6VbqpnjPCGola+Wwtj 8wSvSo3WTurm/d9mLht7XwftO7ezxco1QduslnKlGh5Y64nwbxhbnPjyWgTgqQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B15B9126A4 for ; Sat, 2 Mar 2024 02:54:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgEaC-0007Pb-5W; Fri, 01 Mar 2024 20:54:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgEaA-0007PE-Ap for guix-patches@gnu.org; Fri, 01 Mar 2024 20:54:34 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgEaA-0001b7-2w for guix-patches@gnu.org; Fri, 01 Mar 2024 20:54:34 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rgEac-0008LY-3t for guix-patches@gnu.org; Fri, 01 Mar 2024 20:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69495] [PATCH 2/2] gnu: cairo: Update to 1.18.0. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Mar 2024 01:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69495 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69495@debbugs.gnu.org Cc: John Kehayias Received: via spool by 69495-submit@debbugs.gnu.org id=B69495.170934448032039 (code B ref 69495); Sat, 02 Mar 2024 01:55:02 +0000 Received: (at 69495) by debbugs.gnu.org; 2 Mar 2024 01:54:40 +0000 Received: from localhost ([127.0.0.1]:37694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgEaF-0008Kh-LU for submit@debbugs.gnu.org; Fri, 01 Mar 2024 20:54:40 -0500 Received: from mail-4322.protonmail.ch ([185.70.43.22]:16871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgEaB-0008KH-B0 for 69495@debbugs.gnu.org; Fri, 01 Mar 2024 20:54:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1709344439; x=1709603639; bh=4LIgz0VWQnLkGvce1Ryt225mxsJ573hfu5Qc+FEtE8k=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=MFgJ7ZQnM0snCJ1MWpexZ13cv0R/9l4g2PtVAL4PKr1AfejveO6+z6WUpBeSSM8sJ DNRufx4a04eRKrwS19pbO5ccw6Z00/bzfomAjv0lKbgBv9EUnARG14/YWY8Ilafx9k F0AHn06rmdyYTSD+KVwQixQnNCU3N3sgCzm5Cyv/D09Ku9piIGFBBsgeZrpGZB0kF9 6f288ik51+x7O/gnIUBEOC9nD3St+dBaJ32BblhEOBHDbgDKUKLTDVWZ13OjQs8c85 6UbD9YMJO2GAjKdM8HN0LJcKVSNfnR7SAQvpidggAqKnkS2GVskjwkvrVO9NVGm1Gy NlZn0fjcL2xWA== Date: Sat, 02 Mar 2024 01:53:41 +0000 Message-ID: <6ff0cad45963b916e01f971186ea0d222e62ec22.1709342740.git.john.kehayias@protonmail.com> In-Reply-To: References: Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches From: John Kehayias via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.77 X-Spam-Score: -6.77 X-Migadu-Queue-Id: B15B9126A4 X-TUID: YX42d88gFdZP 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 h= ad previously enabled while the xml backend has been dropped from cairo completely. Old configure options where were commented out to be enabled h= ave 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 cy= cle where gtk-doc is needed to build the documentation (which itself depends on cairo). The new variable 'cairo-with-documentation' is now the public pack= age and the module exports 'cairo' for use in other packages. This follows wha= t 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 a= nd add '-Dtests=3Ddisabled' 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 inherit= ed from cairo. (cairo-xcb)[properties]: Unhide (inherited from cairo). [arguments]: Remove obsolete #:configure-flags and properly inherit from ca= iro. * 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 =3D=09=09=09=09=09=09\ %D%/packages/patches/breezy-fix-gio.patch=09=09=09\ %D%/packages/patches/byobu-writable-status.patch=09=09\ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch=09\ - %D%/packages/patches/cairo-CVE-2018-19876.patch=09=09\ - %D%/packages/patches/cairo-CVE-2020-35492.patch=09=09\ %D%/packages/patches/calibre-no-updates-dialog.patch=09=09\ %D%/packages/patches/calibre-remove-test-sqlite.patch=09=09\ %D%/packages/patches/calibre-remove-test-unrar.patch=09=09\ 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 =C2=A9 2023 Sergiu Ivanov ;;; Copyright =C2=A9 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright =C2=A9 2023 Janneke Nieuwenhuizen +;;; Copyright =C2=A9 2024 John Kehayias ;;; ;;; 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 bui= ld + ;; 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 -=09=09 "cairo-CVE-2018-19876.patch" -=09=09 "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-0= 6/msg00085.html + #:glib-or-gtk? #t #:configure-flags - (list - "--disable-static" - ;; XXX: To be enabled. - ;; "--enable-gallium=3Dyes" - ;; "--enable-gl=3Dyes" - ;; " --enable-glesv2=3Dyes" - ;; "--enable-glesv3=3Dyes" - ;; "--enable-cogl=3Dyes" - ;; "--enable-directfb=3Dyes" - ;; "--enable-vg=3Dyes" - "--enable-tee=3Dyes" ;needed for GNU IceCat - "--enable-xml=3Dyes" ;for cairo-xml support - (string-append "--with-html-dir=3D" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")))) + (list "-Dtests=3Ddisabled"))) (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=3Dtrue" #$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=3Denabled" #$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 -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 >=3D 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 -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 - =09=09 unsigned num_spans) - { - cairo_image_span_renderer_t *r =3D abstract_renderer; -- uint8_t *m; -+ uint8_t *m, *base =3D (uint8_t*)pixman_image_get_data(r->mask); - int x0; - - if (num_spans =3D=3D 0) - =09return CAIRO_STATUS_SUCCESS; - - x0 =3D spans[0].x; -- m =3D r->_buf; -+ m =3D base; - do { - =09int len =3D spans[1].x - spans[0].x; - =09if (len >=3D r->u.composite.run_length && spans[0].coverage =3D=3D 0xf= f) { -@@ -2646,7 +2646,7 @@ _inplace_src_spans (void *abstract_rende - =09=09=09=09 spans[0].x, y, - =09=09=09=09 spans[1].x - spans[0].x, h); - --=09 m =3D r->_buf; -+=09 m =3D base; - =09 x0 =3D spans[1].x; - =09} else if (spans[0].coverage =3D=3D 0x0) { - =09 if (spans[0].x !=3D x0) { -@@ -2675,7 +2675,7 @@ _inplace_src_spans (void *abstract_rende - #endif - =09 } - --=09 m =3D r->_buf; -+=09 m =3D base; - =09 x0 =3D spans[1].x; - =09} else { - =09 *m++ =3D spans[0].coverage; -- 2.41.0