[libvirt] [RFC] How to build libvirt package with git commit info from libvirt.git

Shanzhi Yu shyu at redhat.com
Wed Apr 1 04:32:03 UTC 2015

Hello there,

Currently I am searching a way to build a libvirt package from latest
libvirt.git with package name including git commit info.
# cd libvirt && git describe

then I want to build a libvirt package with name like

The context why I need this  is there are some hosts running scripts for
auto QE-consumption testing while there is no job
running sometimes.( we won't get a internal release version everyday, it
is not necessary also). We can make use of these
resource to do some auto testing daily so that we may be able to find
the regression problems earlier.
So, a package with commit info is required for comparative testing.

After talk with eblake I got a way as below:
after 'make rpm' , I will get libvirt.spec,
then I can tweak libvirt.spec add a line "%define extra_release
.git_commit_num" at the top of libvirt.spec
then use the tweaked libvirt.spec to build the package I want to get

I wonder anybody have a better method to achieve this ?



More information about the libvir-list mailing list