From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4E3aAZGqNWG8AwEAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 07:43:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8G4IOZCqNWHHewAAbx9fmQ (envelope-from ) for ; Mon, 06 Sep 2021 05:43:44 +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 AE2C1CB3C for ; Mon, 6 Sep 2021 07:43:43 +0200 (CEST) Received: from localhost ([::1]:52256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mN7Py-000443-GG for larch@yhetil.org; Mon, 06 Sep 2021 01:43:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN7NO-0002oz-P2 for guix-patches@gnu.org; Mon, 06 Sep 2021 01:41:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mN7NO-00086j-4n for guix-patches@gnu.org; Mon, 06 Sep 2021 01:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mN7NO-0006VE-1N for guix-patches@gnu.org; Mon, 06 Sep 2021 01:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50359] [PATCH] import: Add 'generic-git' updater. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 05:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50359 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: 50359@debbugs.gnu.org Received: via spool by 50359-submit@debbugs.gnu.org id=B50359.163090681524932 (code B ref 50359); Mon, 06 Sep 2021 05:41:01 +0000 Received: (at 50359) by debbugs.gnu.org; 6 Sep 2021 05:40:15 +0000 Received: from localhost ([127.0.0.1]:51401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mN7Mc-0006U2-Hv for submit@debbugs.gnu.org; Mon, 06 Sep 2021 01:40:15 -0400 Received: from out0.migadu.com ([94.23.1.103]:32941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mN7MZ-0006To-NK for 50359@debbugs.gnu.org; Mon, 06 Sep 2021 01:40:13 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1630906809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Vc21lp4iSw+Pfq9KNBd4IwNHCdIxnnMcXqV5hIbaYqw=; b=AR5kqWPz/Bu+HBa80vmM5kB+w3L4XO6NyGAGNSAH//wg8932gj+hrvp8527DMR99ksy/sT gw1kw9bYwqcnKTFko1INrvO3ZqVYv3jm4MfqAlYDdzcz9ug3Lflc9YkP8tVNFtxPKsWuSo 8DOgHXc9++Cw4jhGuZaJ5BCNPm4U7eQ= From: Sarah Morgensen References: <86k0jvkh5v.fsf@mgsn.dev> <87h7ez48d3.fsf@yoctocell.xyz> Date: Sun, 05 Sep 2021 22:40:07 -0700 In-Reply-To: <87h7ez48d3.fsf@yoctocell.xyz> (Xinglu Chen's message of "Sun, 05 Sep 2021 12:36:24 +0200 (16 hours, 38 minutes, 30 seconds ago)") Message-ID: <86y28ai7ns.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Auth-User: iskarian@mgsn.dev 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=1630907024; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=Vc21lp4iSw+Pfq9KNBd4IwNHCdIxnnMcXqV5hIbaYqw=; b=Su6aqMm83gGnt4820ZYudLkgkY6whCiAWWR5UDNbiA9tLWoR5kDTfebGM5L+65FoKY1YBs dkSiPA2+leMaBUegqc7OBys2ZGSOcjqWGc3db1b4VinuVZxFJcV5ZOZcvxcoJ8WqIhVZbj SvmY5h9qfhCmosjKsZNeQsIyMNEnPhnEOz4FPxt8364kyEuA+vja7arBVOS+I2pEK/FU9O LZP0q9AzusQn4x145puWBxEKrG5tQSi80BhaS21DQBbRfWlBNW/A+nMtdpn1oB5sKrksxG fzX3ravzZEEq1p9cPmr5QepBQktbuwxJUkmKFV2jwANMwit+/g9I06MQZAJfuQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630907024; a=rsa-sha256; cv=none; b=abwW5xi1m9wXrQIbr3dRgTErgFOzPezCQuel/pB97WgrEVe1kJgrSbHMUjFs2La+IFImGZ F6hP90QB5HEt06Y7RceZRd09m6ebMrHLmosWGPg+VnTHeWGPcn44/9H7OkXhRhnsCTMyXA bAyLebXjCKR8sNDWOeOBWK8Xjc2UkP4K5iK6DzK9xrFCjpaepfeCamLZS2bybyNylE2p0U c+bH5XPc+f6hShCaZPVzaxWT8DgMr8x5ZGt9T/IPRzfCl7HP9cSJg6KeMbJzAuwv48gob1 MPc8JgTP7/X7WcF8lRG1jESoLGR61m5c/C/vBMkFNVLUK+LCUyf7uicUGUyZPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=AR5kqWPz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (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: -0.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=AR5kqWPz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (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: AE2C1CB3C X-Spam-Score: -0.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8puZVOE5zOPF --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Xinglu Chen writes: >> There are about 50-60 packages like this. >> >> I'm not sure how much effort should be spent including them, and for >> some of them I'm not sure what our ideal behavior *is*. Even if we >> could reliably detect them, should "alpha" or "dev" packages be returned >> by the updater? > > I don=E2=80=99t think we usually include alpha or rc releases, so updater > probably shouldn=E2=80=99t return them either. Not sure how we would try= to > detect alpha/beta/rc releases, though, besides running something like > > (string-match? "(alpha|beta|rc|dev)" TAG) > > On each tag. That heuristic is pretty good. (It might miss a few, but I'd rather accidentally include some alpha/beta/rc releases than risk excluding real ones.) We could then safely sort tags with just the prefix removed -- this takes c= are of "1.1f" coming after "1.1", and so on. Actually, it looks like there's only a few packages with a suffix; instead, we can probably just only use a suffix if they provide 'tag-suffix. This is all of them (and the "dev" ones probably shouldn't be suffixes, just part of the version): (commit (string-append "v" version "-stable")))) (commit (string-append version "-stable")))) (commit (string-append version "-Leia")))) (commit (string-append "haddock-" version "-release")))) (commit (string-append "v" version "-8.13")))) (commit (string-append "v" version "-oss")))) (commit (string-append "v" version "-stable")))) (commit (string-append "ddskk-" version "_" code-name)))) (commit (string-append version "-freebsdport")))) (commit (string-append version "-dev")))) (commit (string-append version "-release-20210531143054")))) (commit (string-append version "-release-20210412001032")))) (commit (string-append "v" version "-debian")))) (commit (string-append version "dev")))) (commit (string-append version "_Linux")) (commit (string-append version "R")))) (commit (string-append "jdk-" version "-ga")))) (commit (string-append "jdk-" version "-ga")))) (commit (string-append "jdk-" version "-ga")))) (commit (string-append "jdk-" version "-ga")))) (commit (string-append version "-opt")))) (commit (string-append "1.1-" version "-RELEASE")))) Additionally, these are all the weird version strings I could find that are actually used as the commit: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=versions.txt Content-Description: versions 1.2.2.rc2 12-068oasis4 1.2-2 0.F-2 0.2.0-alpha 5.1.0-b2 1.5-11 1.9.14-20210407 0.9.3b 2.8-fix-2 2020-05-19 10-11.0.0 1.0.12-2 0.9.3+16.04.20160218-0ubuntu1 2.12.c 1.1+11 5.1+4.06.0 4.2-411 1.4.0rc1-450-g2725ef99d 2.0.0-alpha14 60.2.3-2 1.21c 1.0.0rc4 2.1.0b1 1.02r6 0.32-14-gcdfe14e 3.0.0a3 2.00a2.3 1.0beta.18 2.1b 2.7.8a 2.7.3a 1.1.alpha19 1.0.2-rc4 0.5.3+git20200502 1.0.3-rc3 4.0.0.dev8 3.0.0beta1-24-g024cc9fa2 0.16-2-ge145396 2.0b6 2.0M10 1.0.7+0 1.16.0+5 0.4.0+1 2.2.10+0 4.3.1+2 2.13.93+0 2.10.4+0 1.0.5+5 0.21.0+0 3.3.4+0 2.68.1+0 0.10.1+1 6.9.10-12+3 2.0.1+2 3.100.0+1 0.14.0+2 0.1.6+2 3.3.0+0 1.8.7+0 1.3.0+2 1.42.0+0 1.16.1+0 2.35.0+0 1.6.37+5 4.1.0+1 2.36.0+0 1.3.6+4 2.10.1+0 2.26.0+0 1.3.4+0 1.1.1+2 1.3.1+1 8.44.0+0 0.40.1+0 5.15.2+0 1.17.0+3 1.18.0+3 2020.7.14+0 3.0.0+1 0.9.1+3 2.9.12+0 0.1.0+2 1.6.9+2 1.0.9+3 1.13.0+2 1.2.0+3 1.1.3+3 1.3.4+2 5.0.3+3 1.7.10+3 1.1.4+3 1.1.0+3 1.5.2+3 0.9.10+3 0.4.0+1 0.4.0+1 0.4.0+1 0.3.9+1 0.4.1+1 1.4.2+3 2.27.0+3 1.4.0+2 1.1.34+0 1.2.12+1 1.5.0+0 2021-06-07 1.2.2-5-g20dc8ed 2.1-20201229 3.0-rc1 1.32.0-0 20200701.154658.b0d6223 3.9-0 R63-10032.B 0.58.2.a 0.0.0+git20200527 3.028R 3.001R 2.57b 1.0.0-20201130134442-10cb98267c6c 0.0.0-20161123171359-e6a2ba005892 0.0.0-20210615171337-6886f2dfbf5b 2020-11-10 5.2.0-alpha 2021-01-01 2021-02-28 2020-11-01 4.4-git.1 1.217-2 3.3.06-1 0.2.0-alpha-199-g3e7a475 1.0.0-beta.0 1.20190621-4 1.9.0-147-g61edec1ef 0.0.9.4f --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yep, it looks like the above would work for the majority of these. That's probably Good Enough^tm. >>> + (define no-delims >>> + (if (string-match delim-regexp no-suffix) >>> + (string-split* no-suffix delim*) >>> + (git-tag-error 'tag-version-delimiter))) >> >> This throws an error if the version doesn't have any delimiter. > > Setting the =E2=80=98tag-version-delimiter=E2=80=99 prefix to an empty st= ring would > solve this, right? Or, maybe we should just get rid of the delimiter > thing since only a few packages use a different delimiter. IMO, just get rid of the delimiter. If we wanted to be *that* flexible, we could make it so they provide a tag->version proc instead of (prefix, suffix, delimiter). -- Sarah --=-=-=--