how to keep rpmbuild directory clean
Hi list! 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.. Thanks for your replies, (I hope that this is not so stupid question) JJ -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
2011/6/17 Jakub Jedelský : > Hi list! > > 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.. > > Thanks for your replies, > > (I hope that this is not so stupid question) I don't think it's a stupid question! I'd like to know myself. I use a user account called "build" to keep my usual login clean and also to prevent any damage to my user account if a build goes bad. The only thing I have come up with so far is to make sure that I have current SRPMs for everything I care about and then delete all the contents of ~/rpmbuild/{SPECS,SOURCES,RPMS} and then re-install the SRPMs I want to work with. Richard -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
Em Sex, 2011-06-17 às 19:57 +0200, Jakub Jedelský escreveu: > Hi list! > > 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.. > > Thanks for your replies, > > (I hope that this is not so stupid question) > > JJ I usually build packages with 'rpmbuild -ba --clean --rmsource --rmspec '. If you already built the packages just remove the '-ba' option and run the rest (--clean --rmsource --rmspec) on your spec files. Evandro -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
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 http://fedoraproject.org/wiki/Projects/Mock ) for clean buiding. -- --Jos Vos --X/OS Experts in Open Systems BV | Phone: +31 20 6938364 --Amsterdam, The Netherlands| Fax: +31 20 6948204 -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
You can embed rpm macros, like %name, in your .rpmmacros file. That way, you can create a directory per package containing SPECS, RPMS, SRPMS, etc. directories. I use it like this (out of the back of my head): %_topdir /home/maxim/rpmbuild %_specdir /home/maxim/rpmbuild/%name/SPECS %_rpmdir /home/maxim/rpmbuild/%name/RPMS %_srcrpmdir /home/maxim/rpmbuild/%name/SRPMS %_sourcedir /home/maxim/rpmbuild/%name/SOURCES Maxim -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
On Fri, Jun 17, 2011 at 09:03:53PM +0200, Maxim Burgerhout wrote: > You can embed rpm macros, like %name, in your .rpmmacros file. That > way, you can create a directory per package containing SPECS, RPMS, > SRPMS, etc. directories. I use it like this (out of the back of my > head): > > %_topdir /home/maxim/rpmbuild > %_specdir /home/maxim/rpmbuild/%name/SPECS > %_rpmdir /home/maxim/rpmbuild/%name/RPMS > %_srcrpmdir /home/maxim/rpmbuild/%name/SRPMS > %_sourcedir /home/maxim/rpmbuild/%name/SOURCES Isn't (only) setting %_topdir to /home/maxim/rpmbuild/%name enough for this? I never tested this trick, but if the rest works, just setting %_topdir that way should be sufficient too. -- --Jos Vos --X/OS Experts in Open Systems BV | Phone: +31 20 6938364 --Amsterdam, The Netherlands| Fax: +31 20 6948204 -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
It might very well work indeed, good point. It's one of those things that has been in my config files for quite some time and don't exactly know the history of anymore :-) On Jun 17, 2011 9:18 PM, "Jos Vos" wrote: > On Fri, Jun 17, 2011 at 09:03:53PM +0200, Maxim Burgerhout wrote: > >> You can embed rpm macros, like %name, in your .rpmmacros file. That >> way, you can create a directory per package containing SPECS, RPMS, >> SRPMS, etc. directories. I use it like this (out of the back of my >> head): >> >> %_topdir /home/maxim/rpmbuild >> %_specdir /home/maxim/rpmbuild/%name/SPECS >> %_rpmdir /home/maxim/rpmbuild/%name/RPMS >> %_srcrpmdir /home/maxim/rpmbuild/%name/SRPMS >> %_sourcedir /home/maxim/rpmbuild/%name/SOURCES > > Isn't (only) setting %_topdir to /home/maxim/rpmbuild/%name enough > for this? I never tested this trick, but if the rest works, just > setting %_topdir that way should be sufficient too. > > -- > -- Jos Vos > -- X/OS Experts in Open Systems BV | Phone: +31 20 6938364 > -- Amsterdam, The Netherlands | Fax: +31 20 6948204 > -- > devel mailing list > devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/devel -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
2011/6/17 Jakub Jedelský : > And question is: how to keep my dir clean? :) Have you any method for > this? What works for me is 1) using the Fedora git setup for persistent storage of the spec and patch storage, so that I don't depend on anything in rpm's %_topdir, and 2) using (rpmbuild --rebuild my.src.rpm), which cleans up %_sourcedir and %_specdir after itself automatically after a successful build, and doesn't generate a SRPM at all. So I'm left with just the binary RPMs, exactly as I want. Mirek -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
Hi, >> And question is: how to keep my dir clean? :) Have you any method for >> this? > What works for me is 1) using the Fedora git setup for persistent > storage of the spec and patch storage, so that I don't depend on > anything in rpm's %_topdir, and 2) using (rpmbuild --rebuild > my.src.rpm), which cleans up %_sourcedir and %_specdir after itself > automatically after a successful build, and doesn't generate a SRPM at > all. So I'm left with just the binary RPMs, exactly as I want. perhaps this is a good time to mention that the functionality of the mock-scm wrapper script [1] is now available as part of mock-1.10 so you can build RPMs from CVS/Git/SVN directly with Mock. See the mock(1) manual page for details and the LWN article below for higher level introduction: http://lwn.net/Articles/446253/ 1) http://lists.fedoraproject.org/pipermail/devel/2010-September/142469.html Cheers, -- Marko Myllynen -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: how to keep rpmbuild directory clean
On Friday 17 June 2011 20:03:53 Maxim Burgerhout wrote: > You can embed rpm macros, like %name, in your .rpmmacros file. That > way, you can create a directory per package containing SPECS, RPMS, > SRPMS, etc. directories. I use it like this (out of the back of my > head) I use the same scheme but I prefer to have all the files related to the same project in the same directory, so I have: $ cat ~/.rpmmacros %_topdir/home/jamatos/ %_tmppath /tmp/rpmbuild %_builddir %{_tmppath} %_rpmtopdir %{_topdir}/build/%{name} %_sourcedir %{_rpmtopdir} %_specdir %{_rpmtopdir} %_rpmdir%{_rpmtopdir} %_srcrpmdir %{_rpmtopdir} %_rpmfilename %%{name}-%%{version}-%%{release}.%%{arch}.rpm -- José Abílio -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel