If you are using or experimenting with fedpkg, I am putting some simple helper bits in an accessory "localpkg" python script (at http://dev.laptop.org/git/users/martin/localpkg or git://dev.laptop.org/users/martin/localpkg ).
It currently has some helpers that allow me to build straight from a git checkout. Useful for tiny, non-upstream codebases that pack their own spec file.
Uses git-describe so it will build a properly named rpm if you are on a named tag. Otherwise it builds with a version name that includes the commit hash.
localpkg --help usage: locakpkg [-h] [--path PATH] [-v] [-q] {setver,git-source,help,publish-xs} ...
Local Packaging utility
optional arguments: -h, --help show this help message and exit --path PATH Directory to interact with instead of current dir -v Run with verbose debug output -q Run quietly only displaying errors
Targets: {setver,git-source,help,publish-xs} help Show usage setver Set the version in spec from git describe git-source Get the source for current HEAD from local git, and update sources file publish-xs Publish RPMs to XS repo
How do I use it?
- hack on the source
- commit. it is safe to ignore version change in spec file
- fixup the version in spec to match git-describe $ localpkg setver
- get tarball from git, update 'sources' file $ localpkg git-source
- build the rpms, locally or on koji - here I request a local build $ fedpkg local
- copy to the right spots $ localpkg publish-xs
These things are fairly "local" -- hence no fedpkg patches of interest I suspect.
cheers,
m
On Tue, 2011-01-25 at 16:11 -0500, Martin Langhoff wrote:
If you are using or experimenting with fedpkg, I am putting some simple helper bits in an accessory "localpkg" python script (at http://dev.laptop.org/git/users/martin/localpkg or git://dev.laptop.org/users/martin/localpkg ).
It currently has some helpers that allow me to build straight from a git checkout. Useful for tiny, non-upstream codebases that pack their own spec file.
I often do local builds with fedpkg like so:
fedpkg srpm rpmbuild --rebuild foo.rpm
Wouldn't it be nice if fedpkg could provide a target equivalent to the old Makefile.common target "local"?
On Tue, 2011-01-25 at 19:20 -0500, Bernie Innocenti wrote:
I often do local builds with fedpkg like so:
fedpkg srpm rpmbuild --rebuild foo.rpm
Wouldn't it be nice if fedpkg could provide a target equivalent to the old Makefile.common target "local"?
Oh, fedpkg already does have a local target! :-)