Using Mach to do test builds of Packages for Fedora
mach allows you to set up clean build roots from scratch for any distribution or distribution variation supported. In this clean build root you can then easily generate pristine packages. mach is written in python. Currently, mach supports rpm-based distributions that can work with apt for rpm. SethVidal modified mach to work with yum; the current upstream package version 0.4.7 also works with either apt or yum.
1. download mach from: http://linux.duke.edu/~skvidal/mach/pkgs/
2. install mach:
yum localinstall /path/to/mach.rpm
3. make your user mach enabled (ie add user to mach group)
usermod -G mach username
4. You may want to edit /etc/mach/location and point the urls in the settings: fedora and fdrextras to something closer/faster to you. 5. make your chroots $your_arch = replace with the arch you're on
mach -r fedora-development-$your_arch-core setup build
mach -r fedora-development-$your_arch-extras setup build
mach -r fedora-3-$your_arch-core setup build
mach -r fedora-3-$your_arch-extras setup build
The strings like 'fedora-3-$your_arch-core' are the name of your chroot. For the rest of this document I'm going to refer to them as $chroot
6. create srpms - Do this however you'd like :)
7. run mach -r $chroot rebuild /path/to/your/srpm /path/to/another/srpm
8. watch as it retches in horror at your broken packages. :)
Commands to note:
- mach -c - collect the results of the build and put them in your current working directory rather than leaving them in /var/tmp
- mach -k - do not clean out the chroot of packages before a build. This is useful to test for buildrequires solving a build problem before committing
- mach -d - output A LOT of debug information about what's going on.
- mach -r $chroot clean - will clean out your chroot. If you see an errorcode 127 from mach, do this and see if it resolves the problem.
Please add additional questions about how to use mach below and let me know what things you'd like to see explained more.
The adventurous can check out the bleeding edge codebase from CVS:
cvs -d :pserver:email@example.com:/cvs/fedora co extras-buildsys-temp
What is the minimum version of yum required? With 2.1.11-3, I get this error: That version is VERY old - use yum 2.2.1 - it's in updates-testing and has been used quite a bit with mach. - DennisGregorovic