how to keep rpmbuild directory clean

Jos Vos jos at
Fri Jun 17 18:11:03 UTC 2011

On Fri, Jun 17, 2011 at 07:57:37PM +0200, Jakub Jedelský wrote:

> I've made some rpm packages (a special build for me or for company)
> from time to time but recently I have a little problem with my
> rpmbuild directory. There are a lot of different patches and sources
> in SOURCES, SRPMS and SPECS dirs.
> And question is: how to keep my dir clean? :) Have you any method for
> this? Do you have one rpmbuild dir for one project or do you use more
> user accounts or..simply copy files to another location? And as a
> bonus I would like to use git for versioning of spec files..

Just use a temporary rpmbuild directory PER BUILD.  Why would you want
to keep the stuff that's in there?  You have the src.rpm at the end.

And an even better answer is: use mock
(see ) for clean buiding.

--    Jos Vos <jos at>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204

More information about the devel mailing list