PDA

View Full Version : [SOLVED] Use mock with specific repo


cyrille
14th February 2011, 08:50 PM
Hi I've got a problem with mock
I'd like to use it in order to build my own packages for a sub(fedora distrib (BLAG)
So I've created specific mock.cfg file for i386 oand x86_64. Theses point at BLAG repo ( ftp://blag.fsf.org/140000/en/os/ )

When I use mock under F14 and I build a fc13 package, this package has got the name of the distrib.

For example :
ls /var/lib/mock/fedora-13-i386/result/
sylpheed-3.1.0-0.1.beta3.fc13.i686.rpm


But when I do the same but with my own config file of mock for BLAG , I've this name :
sylpheed-3.1.0-0.1.beta7.fc14.i686.rpm
and not sylpheed-3.1.0-0.1.beta7.blag140000.i686.rpm

Here the specific mock config file
cat /etc/mock/blag-140-i386.cfg
config_opts['root'] = 'blag-140-i386'
config_opts['target_arch'] = 'i686'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = 'blag140000' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
# grub/syslinux on x86_64 need glibc-devel.i386 which pulls in glibc.i386, need to exclude all
# .i?86 packages except these.
#exclude=[0-9A-Za-fh-z]*.i?86 g[0-9A-Za-km-z]*.i?86 gl[0-9A-Za-hj-z]*.i?86 gli[0-9A-Zac-z]*.i?86 glib[0-9A-Za-bd-z]*.i?86
# The above is not needed anymore with yum multilib policy of "best" which is the default in Fedora.

# repos

#[BLAG.blag]
name=BLAG.blag
baseurl=ftp://blag.fsf.org/140000/en/os/i386/BLAG.blag/
failovermethod=priority

[BLAG.fedora]
name=BLAG.fedora
baseurl=ftp://blag.fsf.org/140000/en/os/i386/BLAG.fedora/
failovermethod=priority

[BLAG.fedora-updates]
name=BLAG.fedora-updates
baseurl=ftp://blag.fsf.org/140000/en/os/i386/BLAG.fedora-updates/
failovermethod=priority

[BLAG.freed-ora]
name=BLAG.freed-ora
baseurl=ftp://blag.fsf.org/140000/en/os/i386/BLAG.freed-ora/
failovermethod=priority



Any ideas is welcome, thx !

cyrille
19th February 2011, 08:00 AM
ok fine, just add in the cfg file a line like this

config_opts['macros']['%dist']=".XXXXXXXXX"

Leuven Instagram Photos - Tanakpur Travel Photos on Instagram - Alliance Travel Photos