OT: using mock to build for SLES

Matt Domsch Matt_Domsch at dell.com
Tue Mar 7 04:15:54 UTC 2006


On Mon, Mar 06, 2006 at 10:13:14PM -0600, Matt Domsch wrote:
> I've been looking at using mock to build srpms for Novell/SuSE SLES
> product, rather than using their build.rpm script.  With one little
> change to mock (below), seems to work pretty well.  opensuse-10.x is
> still a little weird, but SLES9 x86 and x86_64 seem to be building
> fine.
> 
> Here's the mock patch to pass -m to useradd, and I'll follow up with
> the buildroots.xml and mock cfg file example too.

sles-9-x86_64.cfg.  SLES doesn't automatically create a group for each
user with useradd, all the users get put into group 'users' by
default.  And no runuser, use su instead.  I manually created the i386
and x86_64 [base] repos.

-- 
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

#!/usr/bin/python -tt

import os

config_opts['root'] = 'sles-9-x86_64'
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'] = '/bin/su'
config_opts['buildgroup'] = 'build'
config_opts['chrootuser'] = 'mockbuild'
config_opts['chrootgroup'] = 'users'
config_opts['chrootuid'] = os.geteuid()
config_opts['chrootgid'] = os.getegid()
config_opts['chroothome'] = '/builddir'
config_opts['clean'] = True
config_opts['target_arch'] = 'x86_64'


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

# repos

[base]
name=base
baseurl=http://my-server/pub/yum/sles9/base/x86_64/

[groups]
name=groups
baseurl=http://my-server/pub/yum/mock/buildgroups/sles9/x86_64/

"""





More information about the Fedora-buildsys-list mailing list