On Thu, Dec 30, 2010 at 9:45 AM, Leonard den Ottolander leonard@den.ottolander.nl wrote:
Hi,
On Thu, 2010-12-30 at 13:51 +0000, nux@li.nux.ro wrote:
As far as I could read about it, mock essentially rebuilds srpms so to use it I would need a separate "classical" build environment to create those srpms in the first place. Am I right or did I get something terribly wrong?
Since CentOS is an rpm based system you will almost always be rebuilding from srpms and *not* from plain tar balls. Repos catering for RHEL/CentOS/Fedora provide srpms by default.
However, if you want to make your own (s)rpms or patch existing ones you will indeed need a "classical" build environment to do so. And since there are a couple of packages that mock will not build you will need a fallback build environment for such cases.
Regards, Leonard.
You can do it inside the mock chroot cage. I do, on occasion. The difficult is that I find myself wanting things like emacs to edit code and patches, RCS to manage versions of my new .spec files, and unpredictable dependencies as I wrote the code.
If necessary, I use one text window (with Alt-F2) to run "mock --shell" and get that working shell window, and another window (with Alt-F3) to drop other RPM's into /var/lib/mock/[whatever]/root/tmp/ and be able to install them in the other windows. But I'm a complete weasel.
I also use the 'mock' from 'epel-testing', which has some very useful features not in the version of mock from CentOS 5.