X-Loop: help-debbugs@HIDDEN Subject: [bug#78477] [PATCH] teams: Add script to refresh GNOME core packages. Resent-From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: liliana.prikler@HIDDEN, maxim.cournoyer@HIDDEN, noelopez@HIDDEN, vivien@HIDDEN, guix-patches@HIDDEN Resent-Date: Sun, 18 May 2025 13:02:02 +0000 Resent-Message-ID: <handler.78477.B.174757330829858 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 78477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78477 <at> debbugs.gnu.org Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, =?UTF-8?Q?No=C3=A9?= Lopez <noelopez@HIDDEN>, Vivien Kraus <vivien@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN X-Debbugs-Original-Xcc: Liliana Marie Prikler <liliana.prikler@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, =?UTF-8?Q?No=C3=A9?= Lopez <noelopez@HIDDEN>, Vivien Kraus <vivien@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.174757330829858 (code B ref -1); Sun, 18 May 2025 13:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 May 2025 13:01:48 +0000 Received: from localhost ([127.0.0.1]:56402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGdeF-0007lW-PE for submit <at> debbugs.gnu.org; Sun, 18 May 2025 09:01:48 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49444) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uGdeC-0007l4-JH for submit <at> debbugs.gnu.org; Sun, 18 May 2025 09:01:45 -0400 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 <maxim.cournoyer@HIDDEN>) id 1uGde0-0007Pi-GJ for guix-patches@HIDDEN; Sun, 18 May 2025 09:01:33 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uGddy-0004Ey-DY for guix-patches@HIDDEN; Sun, 18 May 2025 09:01:32 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-231fc83a33aso11232375ad.0 for <guix-patches@HIDDEN>; Sun, 18 May 2025 06:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747573287; x=1748178087; 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=kcsYuM8+rSlBkEx0ANm+Gn4Cr6nwomt0IiyzSPXkgoo=; b=WAZCfdoYJ+iv39OpgcYWEdv8e9natvAyCXh/QFGN72uHj5SF8bGwGcVYk7fAunw9ot VoZg/LkZnXxBv5wWFpeGL5VJPnzrY3KUrF8hkXrm+GhO0IGPZ1hMp/j/ajn9Khz2cTiV qTkcKJWfK+bhcbKrDk20lFHiArJFAmnoTQ9/p7LyDglmpO87VUDuJQKUXRzcboD1Lkzx bbIIuRUJ1pJT3MZLUdf9hNxX4GsDpCrA3Ghx4our2VRDagvvZDydxQNqxXbP9mZSKS5r YaBNtAbCVTqShp35m/gSl6Gm4YtJJM1yW8Fyciw3PX0lGRWGlEg6/GpUR3V6Kl0cANha j3TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747573287; x=1748178087; 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=kcsYuM8+rSlBkEx0ANm+Gn4Cr6nwomt0IiyzSPXkgoo=; b=I8GDirJhqgXxbSk/nPlLpNRAKrx4wtljxo+oc+CrIuhNLEZLY6iYvaONprviC6GJEU rFSc/LOKG8q53hpNx9YbDZ3K+97LKm44TXP9/yvKhY/PVQdYZtIx3NsREPW+QspNLrzE BeRMH5gvvZgADpL/gmQ4WpLwJZrX2AbzRapqFO9tMelI7ijqO/lS6WYxSQUZY5inCaTG 9M2oqhfYCpcXkWomDFJ58xWyQ6kD/t2YPBbP32yKQ9WKrRO1pP5ZAGuLNlKfgBEDdoes BaJYQcn0c4fFQ93TSHtPvuuPGme2mA9cGl+tUTfzKclOncEtXpxQCqidczhN3fPE+saT B4SQ== X-Gm-Message-State: AOJu0YzDtAb40f6V3odoDnnS/6kxu1Y7MdV6uVURyCjeL30tWhh/k8Zy sin39HhtG+WzenvNJ6SrKB5MsBRZlQ48N5VgFu22JaVsGip2PSYR5n8ZCIXbQQ== X-Gm-Gg: ASbGncvQPXJz0MNkBIrNvQWYzBAFVNkaF/SCO6Au86HcOEEjvPvBHBac5cjv6WW3zkl sp1SEeaXLtuhIrQLZD8vqcNppLLfRoO1UOtLdGfMGv8+XodZVse5ZdwhXYcZ3WSIiFvilyxrUhx 0fdJWAdNc5NfJn7aXrgqCb1dz1/pxUDm4T6xKWaI5TZkTxkZCJFJdDZebhYFVkwk1hX9sXwsGoC 1Me1ohVHYc/rj+lFXMgZ5DVKk6BkwvP6p8Gvm21SijEV3AO+InipIozyC4RhHKsTVgutlzxjwaJ FMVapkn17qeqo1jjmmu1eAYVLn3vqcfB+xXfXJPGwDs8+oovq/MJHsb+pv/Jx80azQZo5MglLVR cVXQjdA== X-Google-Smtp-Source: AGHT+IEgt/GgxfC1tapsy1cVd/xoAYEF1cbl/55ME/plfrdsAWKIhK7yRqtT9TOzs7HcV0eGW1/nHQ== X-Received: by 2002:a17:903:41c7:b0:22e:37b8:7972 with SMTP id d9443c01a7336-231de3514dcmr126493825ad.10.1747573287337; Sun, 18 May 2025 06:01:27 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4ebaf53sm43402705ad.187.2025.05.18.06.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 06:01:26 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Date: Sun, 18 May 2025 22:01:20 +0900 Message-ID: <c36d1307dbec7649e4346cad0a76baf541aac252.1747573280.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=maxim.cournoyer@HIDDEN; helo=mail-pl1-x62e.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, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) * etc/teams/gnome/gnome-core-refresh: New file. Change-Id: I7c7de6ce4689cef9c51d357e6ea3d16468078013 --- etc/teams/gnome/gnome-core-refresh | 120 +++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100755 etc/teams/gnome/gnome-core-refresh diff --git a/etc/teams/gnome/gnome-core-refresh b/etc/teams/gnome/gnome-core-refresh new file mode 100755 index 00000000000..785e9a08b59 --- /dev/null +++ b/etc/teams/gnome/gnome-core-refresh @@ -0,0 +1,120 @@ +#!/usr/bin/env -S guix repl -- +!# ;-*- mode: scheme; -*- +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: +;;; +;;; This is a wrapper of 'guix refresh' that refreshes all the GNOME core +;;; packages listed in their release engineering (releng) list to their stable +;;; version. Set the PARTIAL_VERSIONS environment variable to update to +;;; compatible versions instead of exact ones. The GNOME_RELENG_VERSIONS_URI +;;; environment variable can also point to a different URL or file, for +;;; example to update to a past GNOME version. The script can be invoked as: +;;; +;;; $ ./pre-inst-env etc/teams/gnome/gnome-core-refresh --update +;;; or +;;; $ ./pre-inst-env env PARTIAL_VERSIONS=1 etc/teams/gnome/gnome-core-refresh -u +;;; +;;; Code: + +(use-modules (gnu packages) + (guix diagnostics) + (guix http-client) + (guix scripts refresh) + (guix utils) + (ice-9 format) + (ice-9 exceptions) + (ice-9 match) + (ice-9 peg) + (ice-9 textual-ports) + (srfi srfi-1)) + +(define %gnome-releng-versions-uri + (make-parameter + (or (getenv "GNOME_RELENG_VERSIONS_URI") + "https://gitlab.gnome.org/GNOME/releng/-/raw/master/\ +tools/versions-stable"))) + +(define (fetch-releng-content) + "Return an input port to the %GNOME-RELENG-VERSIONS-URI file." + (call-with-port (http-fetch/cached (%gnome-releng-versions-uri)) + get-string-all)) + +(define-exception-type &releng-parser-error &error + make-releng-parser-error releng-parser-error?) + +(define-peg-string-patterns "\ +releng <-- (comment / entry)* !. +entry <-- suite C name C version C subdir NL +suite <-- text +name <-- text +version <-- text +subdir <-- text? +text <- (!NL !C .)* +comment < '#' (!NL .)* NL +C < ':' +NL < '\n'") + +(define %names + '(("adwaita-fonts" . "font-adwaita"))) + +(define (parse-releng data) + "Return DATA, a string representing the content of a GNOME releng file, and +return the complete parse tree." + (let ((tree (peg:tree (match-pattern releng data)))) + (match tree + (#f (raise-exception (make-releng-parser-error))) + (_ tree)))) + +(define (check-package-name name) + "Return #t if a package corresponding to NAME exists, else #f." + (catch 'quit + (lambda () + (parameterize ((guix-warning-port (%make-void-port "w"))) + (specification->package name) + #t)) + (lambda _ + (format (current-error-port) "TODO: package ~a~%" name) + #f))) + +(define* (releng-tree->update-specs tree #:key (partial-versions? + (getenv "PARTIAL_VERSIONS"))) + "Take TREE and return a list of package specifications. If +PARTIAL-VERSIONS? is true, the least significant digit in version is +stripped and the version is prefixed with the '~' character, so that 'guix +refresh' can automatically find the newest compatible version." + (match tree + (('releng ('entry ('suite "core") ('name name) ('version version) _) ...) + (filter-map (lambda (name version) + (let ((name (or (assoc-ref %names name) name))) + (and (check-package-name name) + (if partial-versions? + (let* ((parts (string-split version #\.)) + (num-parts (length parts))) + (if (> num-parts 1) + (format #f "~a=~~~a" name + (version-prefix version + (1- num-parts))) + (format #f "~a=~a" name version))) + (format #f "~a=~a" name version))))) + name version)))) + +(apply guix-refresh (append (cdr (command-line)) + (releng-tree->update-specs + (parse-releng (fetch-releng-content))))) base-commit: 6b5fc4812981f2cadffcc5d39e48cd8e02ee73af -- 2.49.0
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: bug#78477: Acknowledgement ([PATCH] teams: Add script to refresh GNOME core packages.) Message-ID: <handler.78477.B.174757330829858.ack <at> debbugs.gnu.org> References: <c36d1307dbec7649e4346cad0a76baf541aac252.1747573280.git.maxim.cournoyer@HIDDEN> X-Gnu-PR-Message: ack 78477 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 78477 <at> debbugs.gnu.org Date: Sun, 18 May 2025 13:02:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Liliana Marie Prikler <liliana.prikler@HIDDEN>, Maxim Cournoyer <maxim= .cournoyer@HIDDEN>, No=C3=A9 Lopez <noelopez@HIDDEN>, Vivien Kraus <viv= ien@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 78477 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 78477: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78477 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 26 May 2025 10:50:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 26 06:50:57 2025 Received: from localhost ([127.0.0.1]:54970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJVQ1-0006d1-2x for submit <at> debbugs.gnu.org; Mon, 26 May 2025 06:50:57 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:51507) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uJVPy-0006cE-Hy for control <at> debbugs.gnu.org; Mon, 26 May 2025 06:50:54 -0400 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-b26f67f10ddso1166432a12.3 for <control <at> debbugs.gnu.org>; Mon, 26 May 2025 03:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748256648; x=1748861448; darn=debbugs.gnu.org; h=subject:from:to:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=eKVtcOS1xvawUCyHXNrF2YUUTTufWpaWmrH8ysKB764=; b=GT8y1aXAyhvlifCdCSePi+9upioVsEhH8JmknFMIDZiezdQARh78CxNqgcjrjmFB9D /nQlkncUuCu7NxKIMbHLT2eD2rlxCKOreLHNPUV7kp7BR1sr5kgH4f9PwAWOAn4QVaiu P8A7cbGbvRwZwHVuE7KaXjQoFW3GNN9GYvaIp30xe996IOvFLrmevn5mcUsV6c7ZcOLP G1M92bj2Ylk1sAR8iGYrykdBf/NxOibI1yf/Z5R+4wCNAzhoZVpgdAuvLwX5XssCCbL4 pKOlKy9vg2YkuPpcpJxE2d0rkvKCY7f7RTGKMq4JxlwfHWlTGptqtZSUm12spLjv7vVg /e7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748256648; x=1748861448; h=subject:from:to:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eKVtcOS1xvawUCyHXNrF2YUUTTufWpaWmrH8ysKB764=; b=WG9pBtX0dHjg6jFQmz4x1KmKIj7W0p23GCk5uaiC2cQSGnF84ImddgPQcAfsrSX4b1 mNHFe+V4hfxD+AC5PzeGgxdD4PiDrurLQz7hiG/wWyArs7gI1uwcoPmCegvQgMy4CB2e +waSwNfyhtFSbrIa24mT74wiTxqbb0gHdOGsLnEBuEXVdMgJxlVjkgc4aLqvn+CXLJkA VSSVA3v3OtvQDegHEnEHgq3EJwN2KA3eiAa92i5yPRr7zT5Zhp0eyzOTWQUOCvyvelg2 KyeTRTp2LHsvb9l/vN7TNulWpaprzoX/7g+g93DONoWnJqKH/ETv1WepZFYWu2/zVAU4 Vt8A== X-Gm-Message-State: AOJu0YyjlrZNfX4w2d0jdX+sWnx3hsCs50B53kvrQPp5XIQjZTHYl+1Q AxNZl4eRuUO9eDwIKaunq/wC2o308U500OEEsS49ZrYiHTW4tYsmenBlch1XpWJa X-Gm-Gg: ASbGncvcbmBsvOVeU0S17A2iRnUd1o/3TU4XtmS8UK53h2yz0Du+zfbE5MExRL0ElW6 Opd1zOK4id7Ruuj+T0oLumzy6ppSpJLWanPBhFReXSA2ntOaxZ5BG15PiFVxb2MFLWisMwKH0jg 0O5Uxu7AESkgXKOvsakHCRByz7nVD8RiB1AJLtKDN3wqXv7vDWKCJpTya/rMk8Fy23paQ4p9kMh 5IN7Pofsxf5AbLmzUPmkwwRdfaG9gBUxFL8mMzWSg8guCkWSV0ZZMzH671xKZZVbO4SakTimJUJ QE7OzCcEGN76KQBvyg6kAY6hKczRxA6WMSuoFl51AmYXB6OSog== X-Google-Smtp-Source: AGHT+IG5KBr9TikXY3wIfaLJlQC6dljMEQRF4apnEN76Q34w8iEaawX0N/sXkrHlt6s1S0I2eZemww== X-Received: by 2002:a17:90a:d44d:b0:30c:5256:3 with SMTP id 98e67ed59e1d1-3110f113864mr12558742a91.5.1748256647687; Mon, 26 May 2025 03:50:47 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3118bce7f6dsm754284a91.49.2025.05.26.03.50.46 for <control <at> debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 03:50:47 -0700 (PDT) Date: Mon, 26 May 2025 19:50:45 +0900 Message-Id: <87jz63ir22.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: control message for bug #78477 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) close 78477 quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.