git usage question

Richard W.M. Jones rjones at
Wed Sep 8 08:30:10 UTC 2010

On Tue, Sep 07, 2010 at 07:24:58PM -0400, Neal Becker wrote:
> I need to make a minor edit to one of the sources of a package.  I want the 
> sources on my machine in a state so that emacs will recognize the files are 
> under git control and act accordingly, so I can do my edits and use emacs 
> vc-mode stuff to commit, diff, etc.  I tried using fedpkg clone + fedpkg 
> sources.  That just gets me the .tar.gz + patches.  I tried fedpkg prep.  
> That doesn't seem to work because it unpacks the source under a 
> subdirectory.  Any hints?

You can't do it directly with the Fedora git setup, because Fedora git
just stores a 'sources' file which is a list of tarballs and their MD5
sums.  The actual tarballs are stored in a lookaside cache somewhere

Nevertheless, several people have the same problem as you: at least to
my knowledge the kernel, libvirt and libguestfs.

These packages are now using git to manage patches, and then
generating the Fedora git setup as the last step.

For libguestfs I'm doing it manually.  I have my own git repo which is
a clone of the upstream libguestfs git repo.  In that git repo I have
the base stable version (eg. 1.4.3) plus cherry-picked patches on top
of that.  I use 'git rebase' when a new stable version comes out, and
'git format-patch' to generate the actual patches which go into Fedora
git.  At the moment I hand-edit the spec file to update the list of
patches, but eventually the plan would be to generate the list of
patches in the spec file too.

The result looks something like this:;a=tree;h=refs/heads/f13/master;hb=refs/heads/f13/master

(Sorry, but the git repo I'm using to manage the patches is not yet

libvirt is looking into writing tools to make this process more


Richard Jones, Virtualization Group, Red Hat
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.
See what it can do:

More information about the devel mailing list