#223 [CloudSIG] Requests to enable weak deps in Wallaby
Closed: Fixed 10 months ago by jcapitao. Opened a year ago by jcapitao.

At RDO, we need to provide ansible collections RPM macros (the same ones Fedora ships in its ansible package [1]). Those macros are not shipped in ansible package built in cfgmanagement.

So we created a package containing those macros [2]. It supplements ansible [3].
As the mock config of our buildroots set install_weak_deps=0, "suplementing" the package ansible with our weak dependency ansible-macros does not work.

Could we set this attribute to 1 for at least the target cloud8s-openstack-wallaby-el8 ?

We understand that those macros are still in Fedora rawhide, but still we need them as fresh ansible collections are being used in Openstack, and we want to be able to rebuild those packages from Fedora in an automatic way.

[1] https://src.fedoraproject.org/rpms/ansible/c/db3f8ce6dcb8907cf9e5e06ee399a18c6696887a?branch=master
[2] https://cbs.centos.org/koji/taskinfo?taskID=1922789
[3] https://github.com/rdo-common/ansible-macros/blob/7ec83572047c23107f736b3b2956c72346a3a2d4/ansible-macros.spec#L17


Metadata Update from @arrfab:
- Issue tagged with: cbs, doc, feature-request, need-more-info

a year ago

What I understand is that it was set for all SIGs with that setting (and also the default setting for koji itself).

From a cbs mock-config --task 1922795 you can see that it's embedded in the generated 'yum.conf' file, so unsure about a possibility to easily change that through tag extra parameter

@alphacc : do you know how to enable/change it just for one tag ? Or is that better to just rebuild that pkg with modified settings to allow it to build ?

Also worth adding that there are other SIGs also rebuilding the epel8 variant from ansible but that one doesn't have (yet ?) these deps, so even if you tag https://cbs.centos.org/koji/buildinfo?buildID=31759 , that wouldn't work I guess , as it's only in rawhide but not even in other branches like epel8 : https://src.fedoraproject.org/rpms/ansible/blob/epel8/f/ansible.spec

Thank you @arrfab for your quick answer.
In fact, we don't want to rebuild/provide the whole ansible, but only ship the macros that are still in Fedora rawhide. I packaged those macros in [1].
With install_weak_deps=1 set in our mock config, we will be able to use the ansible-macros package in our buildroot, suplementing ansible and thus, be able to build ansible collections.
So the install_weak_deps=1 should be permanent (if possible)

[1] https://cbs.centos.org/koji/taskinfo?taskID=1922789

@jcapitao coming back from PTO so just having a look at this.
Unfortunately it was defined as basic rule by @alphacc and trying to catch him to verify why it was done like that, and also if there is a way to find a workaround for specific tag.

In the meantime, wondering if the best/easiest solution wouldn't be to have a simple metadata pkg that would have BuildRequires: on your own pkg to trigger its install ?
I guess if you need it at build time, it should be listed by one pkg as BuildRequires: , right ?

Metadata Update from @arrfab:
- Issue assigned to arrfab

11 months ago

In the meantime, wondering if the best/easiest solution wouldn't be to have a simple metadata pkg that would have BuildRequires: on your own pkg to trigger its install ?
I guess if you need it at build time, it should be listed by one pkg as BuildRequires: , right ?

Indeed, but we want to avoid to add manually BuildRequires: ansible-macros during the rebuild of ansible collections packages from Fedora.
Wen we really don't have the choice (e.g RDO specificity), we fork src.fedoraproject.org projects on our (distgit)[https://github.com/rdo-common/], add/commit/push changes, and trigger CBS build manually. But, we tend to avoid that..

Or, we could update the script, in charge of rebuilding packages automatically from Fedora, to add the BR in .spec file before rebuilding. @amoralej @ykarel wdyt ?

Just having a look at opened bug and was wondering about feedback about this one. Does it still need to be in status open ?

Yes we are waiting feedback from @alphacc whether we can change this basic rule (i.e set install_weak_deps=1) or not. If not, we'll go with other plans.

Thanks for the ping, is there any impact of install_weak_deps=1 in mock ? I am happy to enable it and test on your tags -build.

@alphacc would be worth testing and documenting that then

@jcapitao :
@alphacc and myself just had a quick look together on this, to be able to come with a solution.
Unfortunately, the install_weak_deps option is hardcoded in koji itself (see https://pagure.io/koji/blob/master/f/koji/__init__.py#_1659) when it renders the mock config to be used by kojid builders.

So we see two proposal to unblock you :

  • preferred/cleaner solution : you add BuildRequires: ansible-macros for the package[s] you want to build that would need these macros for collections : cleaner in a sense that one looking at src.rpm/.spec file knows why and how it was able to build
  • faster/workaround solution : we add ansible-macros in your default buildroot, to ensure that it would always be installed and so available for each build.

Let us know which method you prefer yourself (for the Cloud SIG)

Metadata Update from @arrfab:
- Issue priority set to: Waiting on Reporter (was: Needs Review)

10 months ago

Thank you guys for the feedback.

After discussion with RDO folks during meeting, we'll go with solution 1). We'll achieve that by modifying the .spec file "on the fly" while rebuilding ansible collections from Fedora.
We'll depend on macro file (i.e adding BuildRequires: /usr/lib/rpm/macros.d/macros.ansible) instead of package name. That way, once a new ansible rpm includes those macros, we'll remove our ansible-macros from our koji tags.
Though, we're assuming the macro file path won't change.

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

10 months ago

Login to comment on this ticket.

Metadata
Boards 1
CBS Status: Backlog