[Top][All Lists]

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

Re: New way to integrate gnulib into projects?

From: Simon Josefsson
Subject: Re: New way to integrate gnulib into projects?
Date: Mon, 17 May 2021 11:14:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

I implemented the tarcache idea:


It is opt-in for any developer, instead of normal ./bootstrap you do:

env GNULIB_BOOTSTRAP_CACHE=/home/jas/.local/gnulib-bootstrap-cache ./bootstrap

The first run is normal, and takes 50 seconds, and the epilogue function
then saves a copy of all generated files.

Now witness a second round:

jas@latte:~/src/libidn$ time env 
GNULIB_BOOTSTRAP_CACHE=/home/jas/.local/gnulib-bootstrap-cache ./bootstrap
Discovered bootstrap cache 
using it...

real    0m1,386s
user    0m1,238s
sys     0m0,217s

Oh bliss!

I have put GNULIB_BOOTSTRAP_CACHE in my default environment.  I can
remove the tarcache to have it automatically re-generated if I change
anything in the bootstrapping environment.

If things work, this will speed up my daily work pattern significantly!
Let's see if I notice any problems...  maybe my thinking is
fundamentally flawed.

It is easy integrate to add this to CI/CD environments: generate the
bootstrap cache once, and pass it on as an artifact to all other jobs
that build from git.  Sometimes you do want to excercise multiple
bootstrapping paths, but not always.

Come to think of it, this paves the road for making public releases of
projects into two files, instead of having:


You could publish

   libidn-1.37-src.tar.gz        - tarball of all files in git
   libidn-1.37-bootstrap.tar.gz  - tarball generated above

Hmm.  But then you won't have the 'make dist' files.  So maybe it should
be another tarball containing those output files:

   libidn-1.37-dist.tar.gz       - additional files generated by 'make dist'

The traditional libidn-1.37.tar.gz contains those files anyway so maybe
the last one is not useful.  I'm not sure even the
libidn-1.37-bootstrap.tar.gz file is of any use.

Perhaps having a libidn-1.37-src.tar.gz tarball separate from git
history is not useful anymore, so maybe we should distribute


which could be generated like this:

git clone --branch v1.37 jas@git.sv.gnu.org:/srv/git/libidn.git libidn-1.37-git
tar cfz libidn-1.37-git.tar.gz libidn-1.37-git

This enable the user to have access to the entire project history using
normal git commands.  I think the idea behind ChangeLog was to give
users some of this ability in the days when version controlled source
repositories wasn't that common.

Still, maybe my last thoughts about tarballs is a solution in search of
a problem...  the initial problem was ./bootstrap inefficiency, and that
may be mitigated by the caching approach now.


Attachment: signature.asc
Description: PGP signature

reply via email to

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