RPM Build Notes: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with " =RPM Build Notes= ==Install Mach== Start with a minimal install of CentOS 6.2. <code> $ yum install wget createrepo $ wget http://thomas.apestaart.org/download/mach/mach-1...")
 
Line 6: Line 6:
Start with a minimal install of CentOS 6.2.
Start with a minimal install of CentOS 6.2.


<code>
<pre>
$ yum install wget createrepo
$ yum install wget createrepo
$ wget http://thomas.apestaart.org/download/mach/mach-1.0.2.tar.gz
$ wget http://thomas.apestaart.org/download/mach/mach-1.0.2.tar.gz
Line 16: Line 16:
$ useradd -g mach -m mach
$ useradd -g mach -m mach
$ passwd mach
$ passwd mach
</code>
</pre>


Due to a permissions bug I hit with mach (during a file copy), we'll continue as root.
Due to a permissions bug I hit with mach (during a file copy), we'll continue as root.

Revision as of 15:33, 10 April 2013

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