Working With Targets

Targets are the culmination of distro+release+version+arch that determines what system a build is well, targeting. A target has a ‘config’ member that allows for some form of configuration to be used for building. This is not required but is helpful depending on the build_handler. For example, the monkeyfarm.mock plugin requires a target to have a mock config set as the target config, which is uses to build rpms for a specified OS.

Creating a Target

$ mf build-handler listall
generic_build
mock

$ mf target create -l fc14.i386 \
                   --target-config-file=/etc/mock/fedora-14-i386.cfg \
                   --arch i386 \
                   --release fc14 \
                   --build-handler mock

Updating a Target

$ mf target update el5.i386 --build-handler mock2

# To clear a target config
$ mf target update el5.i386 --target-config=''

Deleting a Target

$ mf target delete fc14

Listing Targets

$ mf target listall
el5.i386
el5.x86_64
el6.i386
el6.x86_64
fc13.i386
fc13.x86_64
fc14.i386
fc14.x86_64

$ mf target listall -f fedora
fc13.i386
fc13.x86_64
fc14.i386
fc14.x86_64

Showing Data For a Target

$  mf target show fc14.i386

          Label | fc14.i386
   Display Name | Fedora Linux 14 i386
          Owner | mf-admin
     Created On | 2010-11-30 20:46:11
    Last Update | 2010-11-30 20:46:11
    Build Count | 0
         Distro | fedora
        Release | fc14
        Version | 14
           Arch | i386
  Build Handler | mock
       Host Sig | fedora-14-i386

--- %(config) ----------------------------------------------------------------

config_opts['root'] = 'fedora-14-i386'
config_opts['target_arch'] = 'i686'
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = 'fc14'  # 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=

# repos

[fedora]
name=fedora
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-14&arch=i386
failovermethod=priority

[updates-released]
name=updates
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f14&arch=i386
failovermethod=priority
enabled=0

[local]
name=local
baseurl=http://kojipkgs.fedoraproject.org/repos/dist-f14-build/latest/i386/
cost=2000
enabled=0
"""

Project Versions

Table Of Contents

Previous topic

Working With Releases

Next topic

Working With Groups

This Page