[libvirt] [PATCH] maint: relax git minimum version

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

 



From: Eric Blake <eblake@xxxxxxxxxx>

Requiring git 1.6.4, just for the optional GNULIB_SRCDIR support,
was too harsh.  Resynchronize from gnulib.

* .gnulib: Import from latest gnulib.
* bootstrap: Re-synchronize from .gnulib/build-aux.
* bootstrap.conf: Drop git to 1.5.5.
* README-hacking: Document use of GNULIB_SRCDIR.
---

Chris is currently testing that RHEL 5 with git 1.5.5 can actually
grok this patch.

We don't have a README-prereq (but README-hacking was borrowed
from coreutils, which does).  Should we add one?  The README-prereq
in coreutils is not quite relevant for a straight-across copy.

 .gnulib        |    2 +-
 README-hacking |    9 +++++++--
 bootstrap      |   41 +++++++++++++++++++++++++++++++++++------
 bootstrap.conf |    2 +-
 4 files changed, 44 insertions(+), 10 deletions(-)

diff --git a/.gnulib b/.gnulib
index 11fbc57..108cfb8 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 11fbc57405a118e6ec9a3ebc19bbf5ececdae4d6
+Subproject commit 108cfb803174abf17eb101e9999b9d1a642ce1ba
diff --git a/README-hacking b/README-hacking
index 4105a3e..80b022c 100644
--- a/README-hacking
+++ b/README-hacking
@@ -12,8 +12,7 @@ requirements on anyone wishing to build from the just-checked-out sources.
 Note the requirements to build the released archive are much less and
 are just the requirements of the standard ./configure && make procedure.
 Specific development tools and versions will be checked for and listed by
-the bootstrap script.  See README-prereq for specific notes on obtaining
-these prerequisite tools.
+the bootstrap script.

 Valgrind <http://valgrind.org/> is also highly recommended, if
 Valgrind supports your architecture. See also README-valgrind.
@@ -28,6 +27,12 @@ You can get a copy of the source repository like this:
         $ git clone git://libvirt.org/libvirt
         $ cd libvirt

+As an optional step, if you already have a copy of the gnulib git
+repository on your hard drive, then you can use it as a reference to
+reduce download time and disk space requirements:
+
+        $ export GNULIB_SRCDIR=/path/to/gnulib
+
 The next step is to get all required pieces from gnulib,
 to run autoreconf, and to invoke ./configure:

diff --git a/bootstrap b/bootstrap
index be96444..365a3d9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,4 +1,6 @@
 #! /bin/sh
+# Print a version string.
+scriptversion=2010-02-24.17; # UTC

 # Bootstrap this package from checked-out sources.

@@ -17,7 +19,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-# Written by Paul Eggert.
+# Originally written by Paul Eggert.  The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project.  The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib@xxxxxxxx

 nl='
 '
@@ -161,7 +171,6 @@ vc_ignore=auto
 # die otherwise.
 find_tool ()
 {
-  # Find sha1sum, named gsha1sum on MacPorts.
   find_tool_envvar=$1
   shift
   find_tool_names=$@
@@ -424,12 +433,28 @@ case ${GNULIB_SRCDIR--} in
   GNULIB_SRCDIR=$gnulib_path
   ;;
 *)
-  # Use GNULIB_SRCDIR as a reference.  Assumes git 1.6.4 or newer.
+  # Use GNULIB_SRCDIR as a reference.
   if test -d "$GNULIB_SRCDIR"/.git && \
         git_modules_config submodule.gnulib.url >/dev/null; then
     echo "$0: getting gnulib files..."
-    git submodule update --init --reference "$GNULIB_SRCDIR" \
+    if git submodule --help|grep reference > /dev/null; then
+      # Prefer the one-liner available in git 1.6.4 or newer.
+      git submodule update --init --reference "$GNULIB_SRCDIR" \
         "$gnulib_path" || exit $?
+    else
+      # This fallback allows at least git 1.5.5.
+      if test -f "$gnulib_path"/gnulib-tool; then
+        # Since file already exists, assume submodule init already complete.
+        git submodule update || exit $?
+      else
+        # Older git can't clone into an empty directory.
+        rmdir "$gnulib_path" 2>/dev/null
+        git clone --reference "$GNULIB_SRCDIR" \
+          "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
+          && git submodule init && git submodule update \
+          || exit $?
+      fi
+    fi
     GNULIB_SRCDIR=$gnulib_path
   fi
   ;;
@@ -819,6 +844,10 @@ bootstrap_epilogue

 echo "$0: done.  Now you can run './configure'."

-# Local Variables:
-# indent-tabs-mode: nil
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/bootstrap.conf b/bootstrap.conf
index d315e04..58ef2ab 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -124,7 +124,7 @@ autoconf   2.59
 automake   1.9.6
 autopoint  -
 gettext    -
-git        1.6.4
+git        1.5.5
 gzip       -
 libtool    -
 perl       5.5
-- 
1.6.6.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]