RPM Build Notes
RPM Build Notes
Install Mach
Start with a minimal install of CentOS 6.2.
$ yum install wget createrepo
$ wget http://thomas.apestaart.org/download/mach/mach-1.0.2.tar.gz
$ ./configure --disable-selinux
$ make
$ make install
$ chmod u+s /usr/local/sbin/mach-helper
$ groupadd mach
$ useradd -g mach -m mach
$ passwd mach
Due to a permissions bug I hit with mach (during a file copy), we'll continue as root.
Create /root/.machrc:
config['centos-6-x86_64-os']['macros']['dist'] = '.el6'
config['centos-6-i386-os']['macros']['dist'] = '.el6'
For this example, I want to build a new mozilla-python27 package based on 2.7.3 instead of 2.7.2. I'm going to fetch the original .src.rpm and extract it into a subdirectory:
$ wget http://repos/repos/yum/releng/public/CentOS/6/x86_64/mozilla-python27-mercurial-2.1.1-4.el6.src.rpm
$ mkdir mozilla-python27 && cd mozilla-python27
$ rpm2cpio ../mozilla-python27-mercurial-2.1.1-4.el6.src.rpm | cpio -ivd
Then edit the .spec file to