unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: "Maxime Devos" <maximedevos@telenet.be>,
	"Ludovic Courtès" <ludo@gnu.org>
Cc: 52977@debbugs.gnu.org
Subject: [bug#52977] [PATCH 0/6] Update some minetest packages
Date: Thu, 06 Jan 2022 16:49:14 +0100	[thread overview]
Message-ID: <7d62bc8873fdb79cd1aa5305d6c0cf06c85be9cc.camel@gmail.com> (raw)
In-Reply-To: <e95947b2ae0fe183c5dc1e5699998a56d06fd61d.camel@telenet.be>

Hi,

Am Donnerstag, dem 06.01.2022 um 09:33 +0000 schrieb Maxime Devos:
> Hi,
> 
> Liliana Marie Prikler schreef op do 06-01-2022 om 01:52 [+0100]:
> > > [...]
> > If I recall correctly, this was also a point of debate in the initial
> > series that added the importer.  Can we establish an
> > ordering/heuristic here?  E.g. "if we have git tags use those,
> > otherwise use contentdb", "always use contentdb" or "always use
> > whatever was edited most recently"?
> 
> Keep in mind that the minetest importer doesn't know about git tag
> -- the only interaction it has with git is cloning repositories
> and checking out commits by the commit id provided by ContentDB.
> I'm assuming you're referring to the generic-git updater here,
> or a hypothetical minetest updater that has been modified to
> interact with git tags.
Ahh, sure, but imho it could try to make a best effort guess.  E.g. if
git tags are named like Minetest releases and exist in equal count,
assume a mapping from one to the other.  However if I recall correctly
there was a ContentDB policy to only tag once, which makes the mapping
from ContentDB version to git commit unique.  Do I remember correctly?

> * Problem with using git tags: git tags sometimes disappear.
>   E.g., in minetest-ethereal, there's currently a tag
>   2021-04-06 and 2021-09-23, but there's no tag for 2021-07-28
>   (the version currently in guix).
> 
>   This could be resolved by including the commit instead of the
>   tag in the package definition, and still searching for the git tag,
>   but as I understand it, there have been some objections to
>   including the commit in the package definition
> (https://lists.gnu.org/archive/html/guix-devel/2021-12/msg00259.html).
Thanks for linking my thread :)

I do cite minetest.scm as an exception there, since your comments make
very clear what you're doing and why.  However, my actual intent is
blown way out of proportion, which has led to a lot of confusion on all
sides and a rather long discussion.

To clarify it here, I am trying to avoid the following pattern:

  (package 
    (name "hello")
    (version "1.0")
    (source 
      (origin 
        (method git-fetch)
        (uri (git-reference
               (url some-url)
               (commit "abcdef...")))
        [...]))
    [...])

while encouraging both

  (package 
    (name "hello")
    (version "1.0")
    (source 
      (origin 
        (method git-fetch)
        (uri (git-reference
               (url some-url)
               (commit (version->git-tag version))))
        [...]))
    [...])

and

  (package 
    (name "hello")
    (version (git-version "1.0" revision commit))
    (source 
      (origin 
        (method git-fetch)
        (uri (git-reference
               (url some-url)
               (commit commit)))
        [...]))
    [...])

In the latter, revision and commit are let-bound as per Guix'
standards.  Now if you say "minetest mod packages are generally
unreliable, git-version everywhere", that is completely fine by me.

>   Even then, there's another problem: sometimes releases are made
>   without a corresponding git tag.  E.g., on ContentDB there's a
>   version 2022-01-05 but there's no 2022-01-05 tag in the git
>   repository.
> 
>   That could be resolved by ‘always use contentdb for minetest
>   packages’ or ‘always use whatever was edited most recently’.
> 
> * Problem with ‘whatever was edited most recently’: AFAIK git tags
>   don't carry that information. Though the commit time/modification
>   time in the commit it points to might be a decent approximation
>   in practice.
> 
>   ContentDB has some information on when a release was released
>   (release_date, see https://content.minetest.net/help/api/).
> 
>   I suppose this could work, though there's a slight problem:
> 
>   The version scheme in guix would occassionally switch between x.y.z
>   and YYYY-MM-DD, which would confuse the ‘these packages have been
>   upgraded’ logic.
Does ContentDB always use CalVer or are the repo owners in control of
the tags?  If there's a SemVer/CalVer conflict, I would say doing 
(latest-semver)-(calver)-commit would probably be acceptable.  At least
I hope none of these mods release twice daily.

> I suppose the best option would be to always use the version from
> ContentDB (*), because the exact versioning scheme used doesn't
> matter much, as long as it remains consistent over time, and just
> using ContentDB is convenient.
> 
> (*) Unless it isn't on ContentDB of course, though all minetest
> packages currently in Guix are on ContentDB.
If a package was used outside of ContentDB, that's not ContentDB's
requirement, is it?  Now perhaps there is an issue if the contentdb
updater relies on the minetest-mod-build-system being used to determine
that its suitable, rather than something else.

> Additionally, if the forum versions / git tags / contentdb releases
> are inconsistent (e.g. the forum and git tags are x.y.z and the
> releases are YYYY-MM-DD), we could inform upstream that guix uses the
> release titles because otherwise things become complicated for guix,
> so if upstream doesn't want that, they need to use x.y.z in their
> release titles as well
> 
> Does that seem reasonable to you? I could write a patch to that
> effect.
Poking upstream maintainers sounds fun, but before making a hard
decisions, perhaps we should reach out to them and ask what they
consider the most reliable.  If it's a wild mess, we could also use
package-properties with an assumed default of "release title = git tag
= forum post", e.g. (upstream-versioning . forum-post), (upstream-
versioning . contentdb) and (upstream-versioning . git-version) to
indicate who's right in case of a mismatch.

WDYT?




  reply	other threads:[~2022-01-06 15:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 13:45 [bug#52977] [PATCH 0/6] Update some minetest packages Maxime Devos
2022-01-03 15:22 ` [bug#52977] [PATCH 1/6] gnu: minetest-basic-materials: Update to 2021-12-26 Maxime Devos
2022-01-03 15:22   ` [bug#52977] [PATCH 2/6] gnu: minetest-homedecor-modpack: " Maxime Devos
2022-01-03 15:22   ` [bug#52977] [PATCH 3/6] gnu: minetest-mobs: Update to 2021-12-12 Maxime Devos
2022-01-03 15:22   ` [bug#52977] [PATCH 4/6] gnu: minetest-mobs-animal: Update to 2021-11-14 Maxime Devos
2022-01-03 15:22   ` [bug#52977] [PATCH 5/6] gnu: minetest-technic: Update to 2021-09-11 Maxime Devos
2022-01-03 15:22   ` [bug#52977] [PATCH 6/6] gnu: minetest-unified-inventory: Update to 2021-12-26 Maxime Devos
2022-01-05 22:30 ` bug#52977: [PATCH 0/6] Update some minetest packages Ludovic Courtès
2022-01-05 23:18   ` [bug#52977] " Maxime Devos
2022-01-06  0:52     ` Liliana Marie Prikler
2022-01-06  9:33       ` Maxime Devos
2022-01-06 15:49         ` Liliana Marie Prikler [this message]
2022-01-11 12:53     ` Ludovic Courtès
2022-01-11 13:20       ` Maxime Devos
2022-01-05 23:21   ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d62bc8873fdb79cd1aa5305d6c0cf06c85be9cc.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=52977@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).