[libvirt] need help/clarification about git and patches.

Daniel P. Berrange berrange at redhat.com
Thu Sep 6 16:53:38 UTC 2012


On Thu, Sep 06, 2012 at 11:59:10AM -0400, Gene Czarcinski wrote:
> Using git is more than a little different way of doing business for
> me.  My usual way to create and apply a patch is to rebuild a
> src.rpm.  This way I have a lot less changes of screwing something
> up because of ignorance.
> 
> It it a little while but I finally cloned a copy of libvirt.git.  I
> applied a patch to remove the "--filterwin2k" [one fixup because a
> test file changed slightly.  I then ran "git diff" and produce a new
> patch.
> 
> OK, now what?  I did the "git commit" and then tried to do the "git
> send-email" like it says in your "hacking" document ...
>    "git: 'send-email' is not a git command.

Slightly annoyingly, the 'send-email' command requires that you have
installed the 'git-email' RPM too.

One other tip the first time you try 'git send-email' is to test
it using your own private email address, rather than the mailing
list address :-)


> I am going to do what I believe is the right thing to do and submit
> the patch but there needs to be a bit more info as to how we should
> do things.

Yep, once you get used to its way of working, I'm sure you'll
find using GIT a nicer approach than patching the RPMs each
tine.


FYI in case you don't already know, you can also run libvirt builds
directly from the source tree, rather than needing to run 'make intsall'
or install an updated RPM every time.  my usual way of working is to
just stop the libvirtd process fro mthe RPM and then run

 $ cd $LIBVIRT_GIT
 $ ./autogen.sh --system
 $ make
 $ su -
 # ./daemon/libvirtd


You can also run  ./tools/virsh, and if you want to test external
apps with the libvirt client / python bindings you can set:

  export LD_LIBRARY_PATH=$LIBVIRT_GIT/src/.libs
  export PYTHONPATH=$LIBVIRT_GIT/python:$LIBVIRT_GIT/python/.libs

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list