Building EL6 with koji/mock on a EL5.5 host

Mike McLean mikem at redhat.com
Mon Jan 3 20:36:54 UTC 2011


On 12/23/2010 06:10 PM, Brian_Kosick at McAfee.com wrote:
> Hi All,
>
> I'm trying to build el6 on a koji build host that is el5.5.

The stock rhel5 version of rpm cannot handle this. You'll need to build
your own.

> I believe that what I may want to do is create a el6 build host and
> use channels to control which host builds the el6 dist tag.
> However, I cannot seem to find information on how to create and use
> custom channels with koji and only vague references to the concept of
> channels in koji.   For instance my questions would be:

This will work also. To direct different builds to different channels, 
you'll need to write a custom channel policy. You can read more about 
that here: https://fedoraproject.org/wiki/Koji/Policies

$ koji help --admin |grep channel
         add-host-to-channel       Add a host to a channel
         remove-host-from-channel  Remove a host from a channel

In koji-1.5.0 and later, the add-host-to-channel command supports a 
--new option that will create the channel. Otherwise, you can add it in 
the db manually with a simple insert... something like: insert into 
channels(name) values('my-new-channel').

For your channel policy, you'll want to go with a small variation of the 
default, so something like:

channel =
        has req_channel :: req
        is_child_task :: parent
        method build && match target dist-6E-* :: use my-new-channel
        all :: use default

> How to create a new channel? How to associate a tag/target/dist with
> a channel? I'm assuming that the koji add-host-to-channel command
> would add the new el6 host correctly, but how to then remove the the
> new host from the "default" channel so that it doesn't build el5 and
> which,. I suspect, would have the same rpm db issues in reverse.

The reverse issue does not occur. An el6 box can build el5 packages just 
fine.

However, if you still want to remove hosts from a channel, you can use 
the remove-host-from-channel command.


More information about the buildsys mailing list