From patchwork Sun Feb 6 11:50:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 603 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 6F0B927BBEA; Sun, 6 Feb 2022 11:54:42 +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=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no 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 3607327BBE9 for ; Sun, 6 Feb 2022 11:54:42 +0000 (GMT) Received: from localhost ([::1]:42938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGg7t-0004dI-DM for patchwork@mira.cbaines.net; Sun, 06 Feb 2022 06:54:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGg5L-00036Y-5e for guix-patches@gnu.org; Sun, 06 Feb 2022 06:52:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGg5K-0005K2-Np for guix-patches@gnu.org; Sun, 06 Feb 2022 06:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nGg5K-0002ny-Ki for guix-patches@gnu.org; Sun, 06 Feb 2022 06:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53818] [PATCH 0/3] Add Repology updater Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Feb 2022 11:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53818 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53818@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164414831210756 (code B ref -1); Sun, 06 Feb 2022 11:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Feb 2022 11:51:52 +0000 Received: from localhost ([127.0.0.1]:36673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGg59-0002nP-1Q for submit@debbugs.gnu.org; Sun, 06 Feb 2022 06:51:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:42588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGg56-0002nD-NQ for submit@debbugs.gnu.org; Sun, 06 Feb 2022 06:51:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGg55-0002uK-SM for guix-patches@gnu.org; Sun, 06 Feb 2022 06:51:48 -0500 Received: from h178-251-242-94.cust.a3fiber.se ([178.251.242.94]:44752 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGg4v-00059z-22 for guix-patches@gnu.org; Sun, 06 Feb 2022 06:51:47 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1644148228; bh=54WkDCuqqYI6GKnypr7gnKPXUPmUCNOWNXoqVoiYzGQ=; h=From:To:Subject:Date; b=dzCcUm1jJM2FAXA/UzA1vn1N2aXoB3Evx7AitNiJWIHCmxm60eiZ3kJ0IkIq/J2Tr zeLVMqXks44lyvgCJ2gCBaSB/i0y4h69nDDTxo1pAdktzzAZT0+Vvb32PCvEjgjwKU DbcoeSPW69tFahx81XS9+D8yH7Jyi9n3DM9epmPs= Message-Id: Date: Sun, 06 Feb 2022 12:50:27 +0100 MIME-Version: 1.0 Received-SPF: pass client-ip=178.251.242.94; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 31 X-Spam_score: 3.1 X-Spam_bar: +++ X-Spam_report: (3.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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.772, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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" X-getmail-retrieved-from-mailbox: Patches Hi, This patchset adds a new updater, which scans Repology[1] for updates. It should technically support all packages in Guix! :-) The data on Repology isn’t as detailed as the one on language-specific repos, e.g., PyPI, so the updater doesn’t support things like ‘input changes’. If the source URL doesn’t contain the version verbatim[2], it won’t be able reconstruct the URL of the updated version, meaning that ‘guix refresh -u’ won’t work. Because of the way ‘%updaters’ in (guix upstream) works, the Repology updater is the first or second updater that is used (since it technically works on ever package), but because of the limitations I mentioned above, the result might not always be the best. The Repology updater is mostly useful for things that don’t already have an updater, e.g., ‘maven-dependency-tree’. Would it make sense to hard-code the ‘%updaters’ variable and put the Repology last in the list? [1]: [2]: e.g., the version is “1.0.0” but the URL is “https://example.org/1_0_0.tar.gz” Xinglu Chen (3): git-download: Export . import: Add 'repology' updater. gnu: xorg-server-xwayland: Set 'repology-name' property. Makefile.am | 3 + doc/guix.texi | 7 ++ gnu/packages/xorg.scm | 2 + guix/git-download.scm | 3 +- guix/import/repology.scm | 226 ++++++++++++++++++++++++++++++++++++++ tests/import-repology.scm | 145 ++++++++++++++++++++++++ 6 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 guix/import/repology.scm create mode 100644 tests/import-repology.scm base-commit: 7c9ad54b0616112c7eea6dd02379616aef206490