Changes

From SME Server
Jump to navigationJump to search
Line 8: Line 8:  
Mock is a Fedora project that allows you to build RPM packages within a chroot environment, allowing you to build packages for other systems than the one you're running on (e.g. building CentOS 4 32-bit RPMs on a CentOS 5 64-bit host), and ensuring that all the required build dependencies are specified correctly in the RPM spec file.
 
Mock is a Fedora project that allows you to build RPM packages within a chroot environment, allowing you to build packages for other systems than the one you're running on (e.g. building CentOS 4 32-bit RPMs on a CentOS 5 64-bit host), and ensuring that all the required build dependencies are specified correctly in the RPM spec file.
   −
It's also pretty under-documented, so these are my notes on things I've figured out over the last week setting up a decent mock environment on CentOS 5.
+
It is recommended that you use the latest CentOS 6 (64bit) version as a base http://mirror.centos.org/centos/6/isos/x86_64/
 +
I have verified this with CentOS-6.3-x86_64-bin-DVD1.iso
   −
First, I'm using mock 1.0.2 from the EPEL repository, rather than older 0.6.13 available from CentOS Extras. There are apparently backward-compatibility problems with versions of mock > 0.6, but as I'm mostly building C5 packages I decided to go with the newer version.
+
You need to have EPEL repository configured as EPELs version of mock will be used
 
  −
You need to have EPEL repository configured
   
<syntaxhighlight lang="Bash">
 
<syntaxhighlight lang="Bash">
 
# Enable EPEL for Centos 6
 
# Enable EPEL for Centos 6
 
rpm -Uvh http://fr2.rpmfind.net/linux/epel/6/i386/epel-release-6-8.noarch.rpm
 
rpm -Uvh http://fr2.rpmfind.net/linux/epel/6/i386/epel-release-6-8.noarch.rpm
# Enable EPEL for Centos 5
  −
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
   
</syntaxhighlight>
 
</syntaxhighlight>
  

Navigation menu