bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib unnecessarily enforces git as requirement


From: Eric Blake
Subject: Re: gnulib unnecessarily enforces git as requirement
Date: Thu, 20 Jan 2011 08:03:55 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 01/20/2011 06:26 AM, Benjamin Lindner wrote:
> Hello list,
> 
> Octave (http://www.octave.org) utilizes gnulib and a recent change in
> gnulib breaks the build for MinGW platform, because gnulib now
> enforces git to be available at bootstrap stage.
> The change was introduced in a patch discussed in the following thread:
> http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00148.html
> 
> I am using msys as build environment and git is not available there.
> However - and this is the issue the report is about - git itself is
> not required for bootstrapping gnulib.
> What I do is
>   - download the gnulib sources as .tgz tarball from the git
> repository webpage and unzip
>   - invoke the bootstrap script as 'bootstrap
> --gnulib-srcdir=path/to/gnulib --skip-po --copy'

git IS used by the bootstrap script except for the one case where you
specifically ask that it not be used.  So, the best thing might be to
enhance the bootstrap pre-requisite checks to see if --gnulib-srcdir is
in effect and use that as a reason to skip the git prereq check.

However, there has also been talk that the --gnulib-srcdir option is
inappropriately overloaded.  There are two competing goals, which
probably deserves two orthogonal options:

1. If git is in use, and gnulib.git is already checked out elsewhere,
then having $GNULIB_SRCDIR in the environment (or having --gnulib-srcdir
pointing to that directory), then git should use that as a reference
repository to reduce the download time and disk space required for
cloning the submodule locally.  Here, the existing gnulib sources can be
at any commit level (if behind the desired submodule commit, then you
still download the difference, but the difference is faster than an
entire fresh clone; if ahead of the desired submodule commit, then
nothing is downloaded, but you don't automatically inherit any new
upstream commits).

2. When git is not in use, then some option (currently --gnulib-srcdir,
but it should probably be renamed) should point to the place where the
correct snapshot of gnulib was already placed, and everything should
come from that snapshot since no submodule will be created.  Here, it is
essential that the reference gnulib directory is exactly at the commit
desired by the submodule annotation, since git will not be used to
correct anything.

An additional, less-frequent, mode of operation has also been discussed,
although I don't believe that it belongs in the bootstrap script:

3. When git is in use, upgrade the project's submodule to the latest
upstream git commit.  Here, I prefer to use this line in my ~/.gitconfig:
[alias]
    syncsub = submodule foreach git pull origin master
and do 'git syncsub && git add $submodule_dir && ./bootstrap', fix any
fallout (such as dealing with newer syntax checks or module API
changes), then commit.

It's been discussed on and off for nearly a year now, but patches are
slow in coming, so it apparently hasn't tickled anyone's itch enough to
make it to the top of a todo list.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]