On 22/07/16 10:43, Matthew Newton wrote:
On Fri, Jul 22, 2016 at 08:47:37AM +0000, A.L.M.Buxey@lboro.ac.uk wrote:
I think there should be an easy way for people to build RPMs, like you can .debs.
rpmbuild -bb - you just need the required dev packages installed first ;-)
That's exactly my point.
rpmbuild -bb doesn't "Just Work", and getting the required dev packages on is not really trivial from what I can tell. At least, not as trivial as a single "sudo mk-build-deps -ir debian/control
Yeah, building RPMs has always sucked. You probably won't like this, but... the "best" way to build an SRPM is, in my experience, mock. It builds and caches a clean system and then runs rpmbuild in it via chroot. It also lets you build for systems other than the one you're on, which is handy. If you have the BuildRequires: dependencies in the .spec correct and mock has the relevant repos, it'll all work. And since it generates a clean system, you won't end up with an RPM with a missing BuildRequires that's only working because you accidentally have the dependency installed. mock is how we build our local RPMs, FreeRADIUS included. I find it pretty straightforward once you've got mock setup.