From patchwork Mon Feb 3 23:18:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: aurtzy X-Patchwork-Id: 38192 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C665D27BBEA; Mon, 3 Feb 2025 23:20:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E620427BBE2 for ; Mon, 3 Feb 2025 23:20:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tf5jc-00081Z-2L; Mon, 03 Feb 2025 18:20:08 -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 1tf5jY-0007xp-Ad for guix-patches@gnu.org; Mon, 03 Feb 2025 18:20:06 -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 1tf5jW-0003Yz-LN for guix-patches@gnu.org; Mon, 03 Feb 2025 18:20:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=R9M24pi6ZKbOGIYEOU4iqMMXCQsZGHUFRPUqGkICJfI=; b=JeLMszc7MN/dCk6hJ/usWecGuRxbGS+4MjZWzjl7+4uyzHPVZoOctKyg3a9oiP53ZWXIC8NCdnQk6icKyIHyCOWWZMbK42LMW8vkZ52nkTm/wq3qSvN0WHQfNjzg1gb/nPnsjs+1i1lG1MtCdQeHX1p4j2NTnLRosnhr/KyS2uHJJpvM2dVypO1VEnUYiHNNqVlLrbBM3w9SQLOs62ZG2tF5hk7/NMahQQvhTw+pBCWRJnH+VeZq8c7WWnUf1run9lSQSUs1c++eri8JqJZBs1PJgUGevM28scthIsO9M8ayit2ed6Abx3ecosyVCjnZIAl2X+AV8YAXCfEVBIDCkw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tf5jW-0006Tw-7J for guix-patches@gnu.org; Mon, 03 Feb 2025 18:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76036] [PATCH] gnu: flatpak: Update to 1.16.0. Resent-From: aurtzy Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Feb 2025 23:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76036 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76036@debbugs.gnu.org Cc: aurtzy X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173862477924873 (code B ref -1); Mon, 03 Feb 2025 23:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2025 23:19:39 +0000 Received: from localhost ([127.0.0.1]:41751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tf5j4-0006T1-O2 for submit@debbugs.gnu.org; Mon, 03 Feb 2025 18:19:38 -0500 Received: from lists.gnu.org ([2001:470:142::17]:59928) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tf5j0-0006Sg-NE for submit@debbugs.gnu.org; Mon, 03 Feb 2025 18:19:32 -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 1tf5iu-0007v5-0m for guix-patches@gnu.org; Mon, 03 Feb 2025 18:19:24 -0500 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tf5is-0003U5-38 for guix-patches@gnu.org; Mon, 03 Feb 2025 18:19:23 -0500 Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-7b6eb531e13so280562085a.0 for ; Mon, 03 Feb 2025 15:19:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738624759; x=1739229559; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=R9M24pi6ZKbOGIYEOU4iqMMXCQsZGHUFRPUqGkICJfI=; b=hiRP4N1TqDBe+BaGNwKqsEJ7Ql9ug3WFQI3pk/9XJJX5AxgCzHIpBMCOTc5BfE0HCP ONw8wRCFO+Djw9LLqtzCVq9aapjYJmaaieboGQ0QDd4+sybBFz3Op+yN6hwENxpTcAwX UUdc4OZ2nnSXli8JeaV2Xd1kDN4wlT403q4WA2tIqiU725J5DhcjcMO3IusUWbtE1lNr tsstn7fhR8n/Pvaq3bVhZppHGzTUDEuPIj2fZxU/VJHJqXbiX1R0UZldfL0Xg3FyQnrL QJnBfKePAawO3UvxmPDjg9QwI9lzjeBFLjKl5f2q0w+7s4cfn6lhHqjckX+CpJOVBHDy AvPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738624759; x=1739229559; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R9M24pi6ZKbOGIYEOU4iqMMXCQsZGHUFRPUqGkICJfI=; b=SG9cuR1Ufahjh7LVCliio71PZYnzJkYrDhZAf9f1opiulnOVP6gJO1pQANkaqdjds/ 6vzZZa7xL0cSU3v9sfMHpvDeYmmW6ZAqLHg1YzSoxXiZKD3tvrhQnH9IaaysbkkGY3o7 YQJ2b3N2WciymaohSc3vTI64sveu21Pei1qqPG1QVqnMsQA2f6yHtIrZV/PKfZozhfy+ x7RCVASBVO9AZG0crmB70E9Tu6RpG05spHrk2OHh0ElLKgI7s/HmJXWPtQ4+NYTc+E6e j2sVAbXrCrzYv5+b18gd72Nhh6Fly4+k4KZrZcrddRMzquy7Iwox8dqIXTa4ZDyjGyfi NCFA== X-Gm-Message-State: AOJu0YwQA5raUHRyqQhMMgqeKEFnv57sg3XP1KrdTEtPB7HL2QaTRsBH +Pr9FEbSnfFPJfXN4/nsZLbfgdRfwlQb9mA5SmjC24MXRSTfFP+jSSJCBA== X-Gm-Gg: ASbGnctSFAbdHqRxuVugzr4l7v5RCVNWG7UnPchinRjc9eHFJfjWezyTNOMoauaRupq 7GVaAOCVVygn7s6f3FGsRbePnRKvBLHUXau6UlhBO3eoqDCmncdQLccPTSlguRJm52Utz0T61Hn 6rTN1BHHBe7SIB9vPymuXbc3VstUUXjWy8VfcpBSPTbbPexyolahtJDrcUCdrWotsdDk7dXlete hpO96FAgTHgfFmwbCVk7JFjfBojpMNJ9GDWlmXTkNUjgaBfg/JkmW46kmyVD8QUjqAD0Lzgye3z r4GFdyLsMA== X-Google-Smtp-Source: AGHT+IFmH9uVY8cOo3ZW/uBm72pVJl/Vxkl7qX/CTI/Oo8wU5Izm/w9NjmA35lZ/D3jZpohZhQGDnA== X-Received: by 2002:a05:620a:1d0e:b0:7b1:4f5c:a3a3 with SMTP id af79cd13be357-7bffcda0a4fmr4002396485a.56.1738624759349; Mon, 03 Feb 2025 15:19:19 -0800 (PST) Received: from localhost.localdomain ([2600:4808:a053:1800::4448]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7c00a9205f4sm579269385a.114.2025.02.03.15.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 15:19:19 -0800 (PST) From: aurtzy Date: Mon, 3 Feb 2025 18:18:06 -0500 Message-ID: X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=aurtzy@gmail.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/package-management.scm (flatpak): Update to 1.16.0. [build-system]: Switch to meson-build-system, which is now the recommended build system upstream. [arguments]<#:configure-flags>: Use equivalent options for meson. <#:phases>: Enable running more tests, disabling a select few in new 'disable-failing-tests phase. Remove 'check phase override. Add 'pre-check phase. Add 'wrap-flatpak phase so GIO can still find TLS backend with the build system change. [native-inputs]: Add gtk-doc. [inputs]: Add bash-minimal. Change-Id: Iacf5c527e7a1cce7f418cecf73bb89018fcec71e --- Hi! Meson is now the recommended build system for Flatpak [1], so I have had a go at making flatpak use meson-build-system in this patch. Most configure flags had one-to-one equivalents, but there were two exceptions: 1. The --with-curl option doesn't seem to have an equivalent meson option, but there is an http_backend option that already defaults to "curl"; perhaps this can be simply dropped? This patch drops it with no noticeable issues, although I'm not sure what I'd test to make sure. 2. The --enable-documentation option also has no equivalent. I wasn't sure what the FIXME comment was specifically referring to (git-blamed commit didn't have context), but adding gtk-doc appears to enable generating documentation just fine; would this be considered a fix? According to the issue that led to using glib-or-gtk-build-system [2], there was a TLS problem that was fixed by including GIO modules from glib-networking. My system didn't exhibit any sort of behavior related to this while updating flatpak though (i.e. still worked without wrapper), so I'm not sure what the correct course of action is for this or if there'd be breakage on other systems. I opted for a wrap-program to include glib-networking in GIO_EXTRA_MODULES in case the issue still applies. Note that this ignores some other GIO modules and XDG_DATA_DIRS directories that glib-or-gtk-build-system had additional wrappings for. [1] https://github.com/flatpak/flatpak/blob/main/CONTRIBUTING.md [2] https://issues.guix.gnu.org/34861 Cheers, aurtzy gnu/packages/package-management.scm | 52 +++++++++++++++++------------ 1 file changed, 30 insertions(+), 22 deletions(-) base-commit: 6964f7ad3481461cbb3256dd87e88ebcb3356f21 diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 2beb442451..1b2a3d9309 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2023 Mădălin Ionel Patrașcu ;;; Copyright © 2024 Arun Isaac ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2025 aurtzy ;;; ;;; This file is part of GNU Guix. ;;; @@ -2037,40 +2038,42 @@ (define-public libostree (define-public flatpak (package (name "flatpak") - (version "1.14.10") + (version "1.16.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/flatpak/flatpak/releases/download/" version "/flatpak-" version ".tar.xz")) (sha256 - (base32 "1k91v0csghiis8gjpcvpx534qbyaj81dfisabbc0ld97h68cggbb")) + (base32 "0ajbz8ms4h5nyjr59hv9z8vaimj4f3p51v8idmy14qnbmmjwa2nb")) (patches (search-patches "flatpak-fix-fonts-icons.patch" "flatpak-fix-path.patch" "flatpak-fix-icon-validation.patch" "flatpak-unset-gdk-pixbuf-for-sandbox.patch")))) - - ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to - ;; find the TLS backend in glib-networking. - (build-system glib-or-gtk-build-system) - + (build-system meson-build-system) (arguments (list #:configure-flags #~(list - "--with-curl" - "--enable-documentation=no" ;; FIXME - "--enable-system-helper=no" - "--localstatedir=/var" - (string-append "--with-system-bubblewrap=" + "-Dsystem_helper=disabled" + "-Dlocalstatedir=/var" + (string-append "-Dsystem_bubblewrap=" (assoc-ref %build-inputs "bubblewrap") "/bin/bwrap") - (string-append "--with-system-dbus-proxy=" + (string-append "-Dsystem_dbus_proxy=" (assoc-ref %build-inputs "xdg-dbus-proxy") "/bin/xdg-dbus-proxy")) #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "tests/test-matrix/meson.build" + ;; The following tests fail with error message related to fusermount3 + ;; failing an unmount operation ("No such file or directory"). + (("^.*test-http-utils.*$") "") + (("^.*test-summaries@system.wrap.*$") "") + (("^.*test-prune.*$") "")))) (add-after 'unpack 'fix-tests (lambda* (#:key inputs #:allow-other-keys) (copy-recursively @@ -2101,20 +2104,24 @@ (define-public flatpak (store (dirname out))) (substitute* "icon-validator/validate-icon.c" (("@storeDir@") store))))) - ;; Many tests fail for unknown reasons, so we just run a few basic - ;; tests. - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - (invoke "make" "check" - "TESTS=tests/test-basic.sh tests/test-config.sh - testcommon"))))))) + (add-before 'check 'pre-check + (lambda _ + ;; Set $HOME to writable location for testcommon tests. + (setenv "HOME" "/tmp"))) + (add-after 'install 'wrap-flatpak + (lambda* (#:key inputs #:allow-other-keys) + (let ((flatpak (string-append #$output "/bin/flatpak")) + (glib-networking (assoc-ref inputs "glib-networking"))) + (wrap-program flatpak + ;; Allow GIO to find TLS backend. + `("GIO_EXTRA_MODULES" prefix + (,(string-append glib-networking "/lib/gio/modules")))))))))) (native-inputs (list bison dbus ; for dbus-daemon gettext-minimal `(,glib "bin") ; for glib-mkenums + gdbus-codegen + gtk-doc (libc-utf8-locales-for-target) gobject-introspection libcap @@ -2126,6 +2133,7 @@ (define-public flatpak (inputs (list appstream appstream-glib + bash-minimal bubblewrap curl dconf