bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Reuben Thomas <rrt@sc3d.org>, Simon Josefsson <simon@josefsson.org>
Cc: bug-gnulib <bug-gnulib@gnu.org>, Paul Smith <psmith@gnu.org>
Subject: Re: GNULIB_REVISION
Date: Thu, 25 Apr 2024 15:29:04 +0200	[thread overview]
Message-ID: <860782103.rUtxlePDI0@nimes> (raw)
In-Reply-To: <8734radfti.fsf@kaka.sjd.se>

Hi Simon,

> you can ... via
> GNULIB_REVISION pick out exactly the gnulib git revision that libpaper
> needs. ...
> [1] https://blog.josefsson.org/2024/04/13/reproducible-and-minimal-source-only-tarballs/
> [2] https://salsa.debian.org/auth-team/libntlm/-/tree/master/debian

I see GNULIB_REVISION as an obsolete alternative to git submodules, and
would therefore discourage rather than propagate its use.

Currently libntlm has this in its bootstrap.conf:

  GNULIB_REVISION=dfb71172a46ef41f8cf8ab7ca529c1dd3097a41d

and GNU make has this:

  GNULIB_REVISION=stable-202307

Both can be done with git submodules. Git submodules do support branches [1],
and the command 'git submodule update --remote gnulib' updates the
submodule while staying on the indicated branch.

When using submodules, the target revision is stored in a versionable way,
that both gitweb and cgit can show appropriately [2][3]. If a branch is
used, it is stored in the .gitmodules file.

The differences between both approaches are:

  - GNULIB_REVISION works only with the 'bootstrap' program. The submodules
    approach works also without 'bootstrap'.

  - For GNULIB_REVISION, the user is on their own regarding tooling, aside
    from 'bootstrap'. In the submodules approach, the 'git' suite provides
    the tooling, and many developers are familiar with it.

  - .tar.gz files created by the gitweb "snapshot" link, by the cgit "refs >
    Download" section, or the GitHub "Download ZIP" button contain an empty
    directory in place of the submodule, and no information about the revision.
    Whereas they contain the file with the GNULIB_REVISION assignment.

> I should write a post to debian-devel describing this pattern on
> how to use gnulib in Debian packages

It feels wrong to me if, in order to get meta-information about required
dependencies of a package, Debian tools grep a particular file for a specific
string. This approach is simply too limited.

The correct way, IMO, would be that 'git' provides this meta-information,
either embedded in the .tar.gz generated by the web tooling, or in a
separate .tar.gz. AFAICT, 'git' currently does not have this ability.
Therefore we need to approach the 'git' team, in order to find a solution
that scales across the whole set of software package — not specific to
gnulib and not specific to 'bootstrap'.

Bruno

[1] https://stackoverflow.com/questions/1777854/how-can-i-specify-a-branch-tag-when-adding-a-git-submodule
[2] https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=tree
[3] https://git.savannah.gnu.org/cgit/coreutils.git/tree/





  parent reply	other threads:[~2024-04-25 13:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 10:27 'relocatable' project built without --enable-relocatable Reuben Thomas
2024-04-23 19:46 ` Bruno Haible
2024-04-23 19:58   ` Reuben Thomas
2024-04-23 23:24     ` Bruno Haible
2024-04-24 20:36       ` Reuben Thomas
2024-04-25 12:07         ` Bruno Haible
2024-04-25 12:22           ` Reuben Thomas
2024-04-23 23:51     ` Gnulib in Debian Bruno Haible
2024-04-24 11:26       ` Reuben Thomas
2024-04-24 13:56         ` Simon Josefsson via Gnulib discussion list
2024-04-24 19:15           ` Reuben Thomas
2024-04-25 13:29           ` Bruno Haible [this message]
2024-04-25 16:26             ` GNULIB_REVISION Simon Josefsson via Gnulib discussion list
2024-04-25 17:00               ` GNULIB_REVISION Paul Eggert
2024-04-25 17:43                 ` GNULIB_REVISION Simon Josefsson via Gnulib discussion list
2024-04-25 18:49                   ` GNULIB_REVISION Paul Eggert
2024-04-25 17:48                 ` GNULIB_REVISION Collin Funk

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://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=860782103.rUtxlePDI0@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=psmith@gnu.org \
    --cc=rrt@sc3d.org \
    --cc=simon@josefsson.org \
    /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.
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).