#1517 Consider way to pass mock args per tag
Closed: Duplicate 4 years ago by dgregor. Opened 4 years ago by kevin.

We have a need with epel8 to pass mock:

config_opts['dnf_common_opts'] = ['--setopt=module_platform_id=platform:el8']

This is needed to do the initial setup of the chroot / builddeps taking into account modules.

There is currently 2 tag options: 'mock.new_chroot' and 'mock.package_manager' to set those on a per tag basis. We could add a similar thing like mock.dnf_common_opts, or perhaps we should look at higher level and make the yum.conf some kind of template? Where you can set yum.conf, but put in a placeholder where koji adds the repo(s) into it? Open to other ideas. I did try and get mock to do this with bootstrap mode, but only gets you the dnf/rpm of the platform, not the config of those.


Metadata Update from @dgregor:
- Custom field Size adjusted to None

4 years ago

Metadata Update from @dgregor:
- Issue priority set to: High (was: Normal)

4 years ago

Well, related perhaps. Those macros are rpm macros right? ie, passed to and used by rpm?

We need dnf/yum settings (passed via mock or direct to dnf/yum somehow)

@kevin Note that you can already achieve this in site-defaults.cfg, for example:

if config_opts['chroot_name'].startswith('koji/epel8'):
   config_opts['dnf_common_opts'] = ['--setopt=module_platform_id=platform:el8']

@kevin does the config option presented by @mizdebsk solve the need for epel 8?

Note that mock config refactoring to make it more flexible on a per-tag basis is something that we are looking at, but if you can use what is there today that certainly would be the quickest way forward.

Yes! I think that will work for us... I didn't know you could conditionalize there on chroot_name... we will need to set it for fedora as well if we use this method for default modules available in the buildroot.

Closing as there is a workaround

Metadata Update from @dgregor:
- Issue close_status updated to: Duplicate
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata