[CentOS-devel] mock config

Johnny Hughes johnny at centos.org
Thu Aug 2 13:48:13 UTC 2007


Bent Terp wrote:
> Hi!
> 
> Just wondering if it would be possible to see/get the mock configs used for C5?
> 
> regards,
>   Bent

Not sure that they would be earth shattering ... or relevant as we have
a buildsystem with local File:// paths.


###---CUT HERE---###

#!/usr/bin/python -tt

import os

config_opts['root'] = 'centos-5-os-i386'
config_opts['basedir'] = '/var/lib/mock/'
config_opts['chroot'] = '/usr/sbin/mock-helper chroot'
config_opts['mount'] = '/usr/sbin/mock-helper mount'
config_opts['umount'] = '/usr/sbin/mock-helper umount'
config_opts['rm'] = '/usr/sbin/mock-helper rm'
config_opts['mknod'] = '/usr/sbin/mock-helper mknod'
config_opts['yum'] = '/usr/sbin/mock-helper yum'
config_opts['runuser'] = '/sbin/runuser'
config_opts['buildgroup'] = 'build'
config_opts['chrootuser'] = 'mockbuild'
config_opts['chrootgroup'] = 'mockbuild'
config_opts['chrootuid'] = os.geteuid()
config_opts['chrootgid'] = os.getegid()
config_opts['chroothome'] = '/builddir'
config_opts['clean'] = True
config_opts['target_arch'] = 'i386'

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
logfile=/var/log/yum.log
reposdir=/dev/null
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
exclude=*.x86_64


# repos

[os]
name=server
baseurl=file:///home/centos/centos/5.0/os/i386/

[updates]
name=updates
baseurl=file:///home/centos/centos/5.0/updates/i386/

"""


config_opts['macros'] = """
%_topdir /builddir/build
%_rpmfilename  %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

%vendor    CentOS
%distribution CentOS-5

# please change this to reflect the Distro Tree and Repo hosting packages!

%centos_ver     5
%redhat         5
%rhel           5

%_smp_mflags   -j1
"""

###---END CUT---###


The only real difference for x86_64 is that the repos are in different
paths and we use this exclude line (all one line):

exclude=[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefhijklmnopqrstuvwxyz]*.i?86
g[abcdefghijkmnopqrstuvwxyz]*.i?86 glib2*.i?86 glib-*.i?86 glib.i?86


Thanks,
Johnny Hughes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.centos.org/pipermail/centos-devel/attachments/20070802/2bc95ee5/signature.bin


More information about the CentOS-devel mailing list