[libvirt] [PATCH] build: honor autogen.sh --no-git

Eric Blake eblake at redhat.com
Mon Jul 8 13:44:18 UTC 2013


On 07/04/2013 03:32 AM, Daniel P. Berrange wrote:
> On Wed, Jul 03, 2013 at 03:07:51PM -0600, Eric Blake wrote:
>> Based on a report by Chandrashekar Shastri, at
>> https://bugzilla.redhat.com/show_bug.cgi?id=979360
>>
>> On systems where git cannot access the outside world, a developer
>> can instead arrange to get a copy of gnulib at the right commit
>> via side channels (such as NFS share drives), set GNULIB_SRCDIR,
>> then use ./autogen.sh --no-git.  In this setup, we will now
>> avoid direct use of git.  Of course, this means no automatic
>> gnulib updates when libvirt.git updates its submodule, but it
>> is expected that any developer in such a situation is already
>> prepared to deal with the fallout.
> 
> Could you also expand
> 
>   http://libvirt.org/compiling.html#building
> 
> to describe how to build from GIT, but without needing direct
> net access. It has come up periodically & we don't have any
> docs about this aspect afaik.
> 
> ACK to changes

How does this work as a followup patch?  (Actually, I may just squash it
in with the gnulib patch and do it all at once...)

Hmm, this would be the first time the auto-generated HACKING file refers
to an in-tree html file (rather than an external project page), and I'm
not sure I like how the formatting turned out.  Any suggestions on how
to make that look better?

diff --git i/HACKING w/HACKING
index a310faa..37e102c 100644
--- i/HACKING
+++ w/HACKING
@@ -36,7 +36,10 @@ developer is:
   git checkout -t origin -b workbranch
   Hack, committing any changes along the way

-Then, when you want to post your patches:
+More hints on compiling can be found
+
+  here
+  compiling.html. When you want to post your patches:

   git pull --rebase
   (fix any conflicts)
diff --git i/docs/compiling.html.in w/docs/compiling.html.in
index 66d2925..215fdf1 100644
--- i/docs/compiling.html.in
+++ w/docs/compiling.html.in
@@ -65,8 +65,36 @@
       checkout it is necessary to generate the configure script and
Makefile.in
       templates using the <code>autogen.sh</code> command. By default when
       the <code>configure</code> script is run from within a GIT
checkout, it
-      will turn on -Werror for builds. This can be disabled with
--disable-werror,
-      but this is not recommended. To build & install libvirt to
your home
+      will turn on -Werror for builds. This can be disabled with
+      --disable-werror, but this is not recommended.
+    </p>
+    <p>
+      Libvirt takes advantage of
+      the <a href="http://www.gnu.org/software/gnulib/">gnulib</a>
+      project to provide portability to a number of platforms.  This
+      is normally done dynamically via a git submodule in
+      the <code>.gnulib</code> subdirectory, which is auto-updated as
+      needed when you do incremental builds.  Setting the environment
+      variable <code>GNULIB_SRCDIR</code> to a local directory
+      containing a git checkout of gnulib will let you reduce local
+      disk space requirements and network download time, regardless of
+      which actual commit you have in that reference directory.
+    </p>
+    <p>
+      However, if you are developing on a platform where git is not
+      available, or are behind a firewall that does not allow for git
+      to easily obtain the gnulib submodule, it is possible to instead
+      use a static mode of operation where you are then responsible
+      for updating the git submodule yourself.  In this mode, you must
+      track the exact gnulib commit needed by libvirt (usually not the
+      latest gnulib.git) via alternative means, such as a shared NFS
+      drive or manual download, and run this any time libvirt.git
+      updates the commit stored in the .gnulib submodule:</p>
+    <pre>
+      $ GNULIB_SRCDIR=/path/to/gnulib ./autogen.sh --no-git
+    </pre>
+
+    <p>To build & install libvirt to your home
       directory the following commands can be run:
     </p>

diff --git i/docs/hacking.html.in w/docs/hacking.html.in
index 904b846..78d4df6 100644
--- i/docs/hacking.html.in
+++ w/docs/hacking.html.in
@@ -35,7 +35,9 @@
   git checkout -t origin -b workbranch
   Hack, committing any changes along the way
 </pre>
-        <p>Then, when you want to post your patches:</p>
+        <p>More hints on compiling can be
+        found <a href="compiling.html">here</a>.  When you want to
+        post your patches:</p>
 <pre>
   git pull --rebase
   (fix any conflicts)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130708/3359c185/attachment-0001.sig>


More information about the libvir-list mailing list