Making better packages with Mach

I was convinced by Zeeshan to help out with making official Fedora RPMS of the gupnp libraries and tools. After looking at the Fedora packaging guidelines I concluded that the only sane way of doing it without to much pain and work was to use Mach which is an tool Thomas Vander Stichele created to allow you to easily set up clean buildroots for any RPM based system. Not having used Mach in a long while I was reminded when setting it up how nicely done it is and what a powerful tool it can be. I has already helped me find quite a few bugs in the spec files I had created for upnp and friends and I am sure that when I submit these spec files to Fedora, the process of getting them approved will be much more straightforward and painless than if I had just made them by fumbling around in my normal install. So I strongly recommend to anyone who needs to build RPMS to check out Mach and afterward say thanks to Thomas for creating it. Thanks Thomas!

5 thoughts on “Making better packages with Mach

  1. Just for reference, Mandriva has iurt , which does much the same job.

    I guess you know, but just in case you don’t, there’s also a tool shared between Mandriva and Fedora named ‘rpmlint’ which checks your package for common errors. You run it on the SRPM. It’s always a good idea to run your SRPM through rpmlint before releasing it anywhere.

  2. For fedora, the ‘mock’ build tool is what is officially used on the builders to build the distribution. It also comes with Fedora, just ‘yum install mock’ to get it. It is set up by default to Just Work(TM) out of the box.

    Minimal command line example:

    mock -r fedora-9-x86_64 –resultdir=RPMS/ –rebuild your.src.rpm

    Rebuilds your source RPM for fedora-9-x86_64 and creates a dir called RPMS in the current dir to hold the result.

  3. @Adam: I do not know iurt, but the nice thing about Mach is that it supports all major RPM based distro’s. So you can have buildroots for all of them installed on your system and then use mach to make sure you build RPMS that require the correct RPMS and link to the correct .so versions on all of them.

    @Michael: I know moch, its a old fork of mach, mostly with reduced featureset. Mach is actually also packaged for fedora and there are mach howto’s on the fedora developers portal.

  4. Pingback: » giving thanks

Comments are closed.