bison-patches
[Top][All Lists]
Advanced

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

[PATCH] Make gnulib a submodule


From: Akim Demaille
Subject: [PATCH] Make gnulib a submodule
Date: Wed, 29 Oct 2008 11:09:22 +0100


Sorry, this patch did not show up in the mailing list.

There are several motivations for this change compared to the previous approach (running a checkout of gnulib by hand each time bootstrap is run):

- determinism
  in the past, several projects, including Bison, got
  bitten because of interface changes or bugs in GNU Lib.
  The problem is that it then happens for some people,
  those who just run ./bootstrap.

  Now we have a fixed version of GNU Lib, and checking
  out Bison will always give the same version of it.
  Unless we upgrade it, via a commit.

- resources
  In my environment, especially because of our build farm,
  it is a source of major penalties that each time ./bootstrap
  is run, it tries to download GNU Lib.  Now that it is a
  submodule, it doesn't: once loaded, the Git repo of GNU Lib
  is there, ready to be used.

- ease of change
  Now if we need to make changes to GNU Lib, we're using its
  true Git repo.


I takes some time to get used to using Git submodules, but it
is worth the trouble.

When checking out bison for the first time (or whenever a
submodule was added/updated), also run

        git submodules update --init

git status should not reported anything about gnulib if it
is up to date.

For instance if you want to update gnulib, here's the sequence:

bison $ git co -b update-gnulib --track master
Branch update-gnulib set up to track local branch refs/heads/master.
Switched to a new branch "update-gnulib"
bison $ cd gnulib
bison/gnulib $ git pull
remote: Counting objects: 4325, done.
remote: Compressing objects: 100% (2026/2026), done.
...
You asked me to pull without telling me which branch you
...
bison/gnulib $ git br
* (no branch)
  master
bison/gnulib $ git co master
Previous HEAD position was 7714a49... Remove unneeded AC_PREREQ.
Switched to branch "master"
Your branch is behind 'origin/master' by 456 commits, and can be fast-forwarded.
bison/gnulib $ cd ..                10:57:34
bison $ ./bootstrap                 10:57:38
./bootstrap: Bootstrapping from checked-out bison sources...
consider installing git-merge-changelog from gnulib
...
...
./bootstrap: Creating po/Makevars from po/Makevars.template ...
./bootstrap: done.  Now you can run './configure'.
bison $ make
/bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ../../configure -C CC=ccache i686-apple-darwin9-gcc-4.0.1 CXX=ccache i686-apple-darwin9-g++-4.0.1 LDFLAGS= --with-openr=no --with-urbi-kernel=/usr/local --disable- locksystem --disable-cobf --disable-shared --enable-static CPPFLAGS= -I/opt/local/include --no-create --no-recursion
...
...
rm -f ../../doc/bison.1*.t
Making all in examples/calc++
make  all-am
make[3]: Nothing to be done for `all-am'.
Compilation finished: /Users/akim/src/urbi/2.0/kernel/bison: /Users/ akim/usr/bin/bd
bison $ make check
make  check-recursive
Making check in po
...

## ------------- ##
## Test results. ##
## ------------- ##

236 tests were successful.
5 tests were skipped.
...
bison $ git diff
diff --git a/gnulib b/gnulib
index 7714a49..662cd06 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 7714a49bb734d63b6c73d0f533ee94a974f4024b
+Subproject commit 662cd06405c078f7b9a2ab1cbab9f36131269979
bison $ git ci -m "Updated GNU Lib." gnulib
Updated GNU Lib.
[update-gnulib]: created 601c07e: "Updated GNU Lib."
 1 files changed, 1 insertions(+), 1 deletions(-)
bison $



        * gnulib: New.
        * .gitmodules (gnulib): New.
---
 .gitmodules             |    3 +++
 ChangeLog               |    6 ++++++
 externals/bootstrap.cfg |    1 +
 gnulib                  |    1 +
 4 files changed, 11 insertions(+), 0 deletions(-)
 create mode 100644 .gitmodules
 create mode 100644 externals/bootstrap.cfg
 create mode 160000 gnulib

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..009ae43
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "gnulib"]
+       path = gnulib
+       url = git://git.savannah.gnu.org/gnulib.git
diff --git a/ChangeLog b/ChangeLog
index e11cef1..8fb3ee6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-28  Akim Demaille  <address@hidden>
+
+       Make gnulib a submodule.
+       * gnulib: New.
+       * .gitmodules (gnulib): New.
+
 2008-10-18  Joel E. Denny  <address@hidden>

        Fix yyerror_range for user-defined location type in C++.  Reported by
diff --git a/externals/bootstrap.cfg b/externals/bootstrap.cfg
new file mode 100644
index 0000000..6a0be6f
--- /dev/null
+++ b/externals/bootstrap.cfg
@@ -0,0 +1 @@
+external: gnulib
diff --git a/gnulib b/gnulib
new file mode 160000
index 0000000..7714a49
--- /dev/null
+++ b/gnulib
@@ -0,0 +1 @@
+Subproject commit 7714a49bb734d63b6c73d0f533ee94a974f4024b
--
1.6.0.2.588.g3102






reply via email to

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