Hello guys,
I will be creating rpm packages for software company i work for. I have built a lot of rpm packages by myself, so I have experience with that. But my question is : How to make this process more comfortable and improve efficiency.
So far i was creating packages by using rpmdevtools and rpmbuild itself. I've read about mock , which is chrooted environment for building SRPMs . But does this mock can be applied on spec files? Do i need to prepare srpm package before i can work with mock? If so, this will not help me much.
How should i proceed with creation of srpms besides of rpm utils and rpmbuild build only source.
Thanks in advance,
David
On Wednesday 11 March 2009 20:09:57 David Hláčik wrote:
Hello guys,
I will be creating rpm packages for software company i work for. I have built a lot of rpm packages by myself, so I have experience with that. But my question is : How to make this process more comfortable and improve efficiency.
So far i was creating packages by using rpmdevtools and rpmbuild itself. I've read about mock , which is chrooted environment for building SRPMs . But does this mock can be applied on spec files? Do i need to prepare srpm package before i can work with mock? If so, this will not help me much.
How should i proceed with creation of srpms besides of rpm utils and rpmbuild build only source.
Thanks in advance,
David
I would write a shell script to automate some of the building and updating.
David Hláčik wrote:
I will be creating rpm packages for software company i work for. I have built a lot of rpm packages by myself, so I have experience with that. But my question is : How to make this process more comfortable and improve efficiency.
So far i was creating packages by using rpmdevtools and rpmbuild itself. I've read about mock , which is chrooted environment for building SRPMs . But does this mock can be applied on spec files? Do i need to prepare srpm package before i can work with mock? If so, this will not help me much.
Yes, you need to feed mock an srpm. But that's easy enough.
Mock is useful in ensuring that you have reproducible builds. Using rpmbuild you may not notice needed dependencies or might pick up unwanted deps. Plus, using mock you can create packages for different versions of Fedora and RHEL/CentOS.
If you need to build a lot of packages, you could look into using koji, which helps coordinate mock builders and can create srpms to feed mock from various version control systems.
David Hláčik wrote:
So far i was creating packages by using rpmdevtools and rpmbuild itself. I've read about mock , which is chrooted environment for building SRPMs . But does this mock can be applied on spec files? Do i need to prepare srpm package before i can work with mock? If so, this will not help me much.
I'm curious why that would be. What makes building src.rpm packages difficult enough that mock wouldn't be any further help? Normally you can just "rpmbuild -bs --nodeps package.spec" to build a src.rpm, and then use mock to set up the chroot directory for different releases and rebuild the package.