From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QbBvLqJLcGCcxgAAgWs5BA (envelope-from ) for ; Fri, 09 Apr 2021 14:42:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2GJNJ6JLcGBwcwAA1q6Kng (envelope-from ) for ; Fri, 09 Apr 2021 12:42:10 +0000 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 1100720047 for ; Fri, 9 Apr 2021 14:42:09 +0200 (CEST) Received: from localhost ([::1]:59510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUqSe-0007Mo-Dc for larch@yhetil.org; Fri, 09 Apr 2021 08:42:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUqSY-0007MZ-Iy for guix-patches@gnu.org; Fri, 09 Apr 2021 08:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUqSY-0003OM-BQ for guix-patches@gnu.org; Fri, 09 Apr 2021 08:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUqSY-0005Sd-6o for guix-patches@gnu.org; Fri, 09 Apr 2021 08:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47670] [PATCH 0/2] Add updater for packages hosted as SourceHut Git repositories Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Apr 2021 12:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47670 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?L=C3=A9o?= Le Bouter , 47670@debbugs.gnu.org Received: via spool by 47670-submit@debbugs.gnu.org id=B47670.161797208320943 (code B ref 47670); Fri, 09 Apr 2021 12:42:02 +0000 Received: (at 47670) by debbugs.gnu.org; 9 Apr 2021 12:41:23 +0000 Received: from localhost ([127.0.0.1]:49234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUqRv-0005Rj-IU for submit@debbugs.gnu.org; Fri, 09 Apr 2021 08:41:23 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:41892 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUqRt-0005RU-Ur for 47670@debbugs.gnu.org; Fri, 09 Apr 2021 08:41:22 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1617972073; bh=e+6A6pYxg8538Eol3h17B5iZY5R6gyzXtJXwb6Hhj/w=; h=From:To:Subject:In-Reply-To:References:Date; b=hncFK/Y6FCH6bRPF0kqOiOydKLtiV4BVlomQbZ2JMgIevvkjR3uPD8NMJyuRv67kW 03d43C3gjI6HIqWlPA8QmcUxtoUUcV0ViImVjVXKQ3xQcKWZvKExNOS2ZOcs1/jl6N kVvhB9f6OGGKGoMF9zMgy7dDHfkUXO73qltMvENs= In-Reply-To: <2513bc7a1e52872be1cd1b8ecde11e21a6f613e0.camel@zaclys.net> References: <6b8ddedae2addf01efa57dcf3a6723bed81bf076.camel@zaclys.net> <87im4vwtyd.fsf@yoctocell.xyz> <2513bc7a1e52872be1cd1b8ecde11e21a6f613e0.camel@zaclys.net> Date: Fri, 09 Apr 2021 14:41:12 +0200 Message-ID: <87fszzwryv.fsf@yoctocell.xyz> 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617972130; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=kOXWEGj6RWbt+Nj/j1J5EMKzdHArJGS0hLA8pfeuEr8=; b=A8ayUXLwiFQua51hTr5qgQde4XhjusxzRvitnDzqo2G9IOo7wY0njjXa2Sws7ByeZSy6Pr 3XEfdZDkuxMf40mDszZcowOmxpEc7exwLpS0DINZCzt6OaITsuU++RPnu0LESVhk0DwLmE vub+IFuJlEl9WMXZt2ZxF8RyCz+VECvf2HlwLJXdQhIJGpUNU79PzTTDPAC+VeiHdFBvFZ ERKDf9WUcGBPmRoSji8UYZ1YcblF55piQf0hkXHJ8XyQo3CmCVWEdWCPhFoyfnDmIRYuG9 H6rq6139vVlMgRRgxgE8KV5V1jpqkNgHJbTsX4PTdzAum+GEv05mFx1BifSL5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617972130; a=rsa-sha256; cv=none; b=Nvowew442vX2nlNsOYs/QHIcAmFbxyfqbYV9CGaAqpAg1pFttsE2vYj/LQVZQaZoVjVvyK mOG5QkA/I6oHfK1ozcZvHJRKbTMHHmtgeGk8s23LocYAnCNPy7ujACupZOj385/Kbc92VV BxgB2itq/01G/dBUuWaEUDrCOk8OlKypJDI+mMLrLrQis7FywyD1Nffhx4e1P1Z2/1LJ/N JZQShy1y9o4pC8NuMhZPMrs0FZXlLJ8fdxpCMBcQFbEAO3lfKdb6feOHuqNPsnkoKPvb3b P8iFzm0lCpN5rFvThcYVAeGYN0W2rFEkiDHS9gPtE0EIufG3Bs7oYGvUQe99qw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="hncFK/Y6"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="hncFK/Y6"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 1100720047 X-Spam-Score: -1.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: UQ899cJNYh52 On Fri, Apr 09 2021, L=C3=A9o Le Bouter via Guix-patches via wrote: > On Fri, 2021-04-09 at 13:58 +0200, Xinglu Chen wrote: >> All the forges have different URL schemes so they would have to be >> hardcoded somehow, e.g. SourceHut uses >> https://git.sr.ht/~user/repo/archive/TAG.tar.gz, Gitea probably uses >> something else, etc.. Maybe we could just clone the repo, but that >> would use more bandwidth, and it could get pretty slow for big >> repositories. >>=20 > > Is that an autogenerated tarball? I am under the impression that usage > of those is banned in GNU Guix, and that there's a lint pass for it. > What do you use these autogenerated tarballs for? Is the 'ls-remote' > command not enough to replace the version and hash? The GitHub updater fetches the autogenerated tarball so that's what I did as well. I wasn't aware about the fact that we would like to avoid them. > GNU Guix uses shallow clones (AIUI) to save bandwidth, do you need > this to generate the hash? I encourage you use the same shallow clone > mechanism here, so it's more generic and not specific to Sourcehut. Ok, I will use shallow clones to make it more generic. >> Adding a property for the tag prefix and suffix, and a version >> separator >> would be a good idea. Right now it only supports "v" as a prefix and >> "_", ".", and "-" as separators. > > What do you think about that last idea of matching versions in tags > with ANY separator and ANY suffix and prefix? That should work fine, > right? I can't think of a case where it wouldnt, but please do share > one if you do. Maybe it wasn't clear, I think it would be a good idea to have a property field like this: #+begin_src scheme (properties '((tag-prefix . "some-prefix") (tag-suffix . "some-suffix") (version-separator . "some-separator"))) #+end_src The updater would then read those fields and do some regex to get the latest version. These options would probably also have some sane defaults, like empty prefix and suffix, and "." as the separator.