On 08/13/2015 12:53 AM, Joseph Areeda wrote:
If you remember how you learned to create RPMs, I'd appreciate some advice on how to get going. Good books, tutorials or websites. The reference documentation is NOT a good place to start, necessary, but not a good cover to cover read, at least not yet.
I still have my paper copy of Maximum RPM at home that I bought back in 1999 or so prior to my starting building the PostgreSQL RPMs (which I built and maintained until 2004). The basics of packaging have not changed since then; the specific guidelines and many features have changed a great deal since then, as have the mechanics of actually properly building packages (mock is the way to go these days). You've already gotten a link to the online version of Maximum RPM, but if you can find a print copy it would be a bit more suited to airport/airplane reading, IMHO. I had not seen the GuruLabs document before, but it looks like a good read, even though it's a bit dated on some of the building mechanics.

Be sure to look at the packages that comprise SL; set up your own build area and install some source RPMs in there and start reading the spec files. Don't start with a complex package like the kernel, though; start with something relatively small and simple. And then practice building some packages from the source RPM of the distribution itself (rebuild bash, for instance, or grab a Fedora source RPM for something that's not in EPEL and see if you can get it to build, and practice).

Above all, learn how to use mock to make repeatable builds. The 'smock' wrapper is helpful in learning mock. There are HOWTOs in several wikis out there, especially the CentOS wiki, that deal with these things, and everything you find in the CentOS wiki is almost 100% applicable to SL, if you change the details of the specific repos and similar things.

Virtually everything I learned from maintaining the PostgreSQL RPMs is still applicable, but I keep my knowledge current by building things for personal use even now, on EL7 (like kicad, among other things), and I even went through the exercise of rebuilding the whole OS for EL5 on IA64 for an SGI Altix we have here.

If you decide to distribute your build, learn how to properly sign the packages and how to set up a yum repository so that depsolving in yum isn't broken. It's not hard to set up a proper repo, and it's not that hard to do the full signing bit, either.

Reply via email to