Dear Fedora Developers,
So recently I found myself desiring to update a .spec file for a
snapshot of a git tree in an automated fashion. As you may or may not
know, this actually has a surprising number of flaming hoops through
which you must jump.
The first one, when scripting such a thing, is pulling the source tree
and packing it into a source file. To this purpose, I propose we
begin adding the following key to .spec files:
#VCS: <url format entry for version control system>
Note the use of a comment. There's a ticket to support this key more
explicitly in RPM:
However I didn't want to block my scripts on that patch landing; in
any case we currently add human-consumable comments
) for VCS snapshots
now, so think of this key as just more of that. Having the version
control system in the spec file will help a lot for other things like
automating source tarball verification.
The second hoop is correctly handling the Release tag.
has lots of gory details. But basically, this can be automated.
Another hoop is the autotools; you have a variety of choices here, but
it's most common to add BuildRequires on them, and figure out how to
bootstrap. This latter part requires a bit of build intelligence (my
scripts recognize the case of autotools, and the more specific case of
I'd actually like to break out the build recognition system into a
separate python library of some sort.
So without further ado, my current scripts:
I'd actually like to get these into Jesse's new fedpkg work, but for
now these operate on distcvs.
Executive summary: if you find yourself needing to automate git-spec
integration, you should use my scripts, because they're cool. I'm
sure I'm not the first person to write these scripts, but I'd like to
get these upstream into fedpkg. Patches for other version control
systems (and major build systems like distutils and cmake) are happily
What am I using them for? Automating gnome-shell stack snapshots for F12:
$ fedpkg-pull-build-chain --arch=i386 --arch=x86_64 --release=F-12
--resultdir=_repo gobject-introspection gir-repository gjs clutter