Bug 1758467

Summary: RFE: set package manager options for buildroot
Product: [Community] Copr Reporter: Michael Mráka <mmraka>
Component: frontendAssignee: Copr Team <copr-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amoralej, praiskup, toracat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-14 14:37:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Mráka 2019-10-04 08:46:15 UTC
Description of problem:
Currently there are issues with building EPEL8 packages caused by dnf / modularity bugs (see bug 1758459).
This kind of issues could be easily workarounded by dnf --nobest but there currently no easy way how to customize dnf configuration in buildroot.
Copr should provide a way to specify dnf options or dnf.conf customization (at least the one which can be easily passed to mock buildroot config).

Version-Release number of selected component (if applicable):
2019-10-04

Comment 1 Pavel Raiskup 2019-10-04 09:24:31 UTC
Do you have work-around for plain mock?

Comment 2 Michael Mráka 2019-10-04 11:14:42 UTC
Yes, an easy one:

# cat >>/etc/mock/rhel-8-x86_64.cfg <<EOF
config_opts['yum.conf'] += """
[main]
best=False
"""
EOF

Comment 3 Pavel Raiskup 2019-10-04 11:35:28 UTC
Ah, this.  I'd expect per-build knob?

Comment 4 Michael Mráka 2019-10-04 11:43:34 UTC
IMHO per-chroot is enough.

Comment 5 Alfredo Moralejo 2019-11-27 19:58:52 UTC
I'm also hitting issues with centos-stream missing best=0 parameter. Any plan to implement this feature in copr short-term?

Comment 6 Miroslav Suchý 2019-11-28 09:10:01 UTC
> Any plan to implement this feature in copr short-term?

No. If it causes pain for you, then please increase a push on Modularity and DNF team. Fedora devel mailing list is likely the best place.

Comment 7 Alfredo Moralejo 2019-11-28 09:23:55 UTC
(In reply to Miroslav Suchý from comment #6)
> > Any plan to implement this feature in copr short-term?
> 
> No. If it causes pain for you, then please increase a push on Modularity and
> DNF team. Fedora devel mailing list is likely the best place.

I see epel8 build root has best=false because of https://bugzilla.redhat.com/show_bug.cgi?id=1756681. Could the same approach be applied in centos-stream config?

Comment 8 Pavel Raiskup 2019-11-29 07:06:58 UTC
(In reply to Alfredo Moralejo from comment #7)
> I see epel8 build root has best=false because of
> https://bugzilla.redhat.com/show_bug.cgi?id=1756681. Could the same approach
> be applied in centos-stream config?

Thanks, valid point:
https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/?id=6fa5f05650050a7b3e4eebf68edea24255d37f4c

There's no reason to work-around epel-8 chroots, and keep centos-stream
in non-working state.  Though I agree with Mirek that this is to be fixed
in modularity.

Comment 9 Alfredo Moralejo 2019-11-29 08:34:20 UTC
(In reply to Pavel Raiskup from comment #8)
> (In reply to Alfredo Moralejo from comment #7)
> > I see epel8 build root has best=false because of
> > https://bugzilla.redhat.com/show_bug.cgi?id=1756681. Could the same approach
> > be applied in centos-stream config?
> 
> Thanks, valid point:
> https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/
> ?id=6fa5f05650050a7b3e4eebf68edea24255d37f4c
> 
> There's no reason to work-around epel-8 chroots, and keep centos-stream
> in non-working state.  Though I agree with Mirek that this is to be fixed
> in modularity.

Apparently that commit broke builds on centos-streams:

https://copr-be.cloud.fedoraproject.org/results/@openstack-sig/centos8-deps/centos-stream-x86_64/01120405-erlang-eflame/builder-live.log.gz

comparing with previous configs it seems the include for the template should be full path:

include('/etc/mock/templates/centos-stream.tpl')

From a previous successful run:

https://copr-be.cloud.fedoraproject.org/results/%40openstack-sig/centos8-deps/centos-stream-x86_64/01120132-erlang-cuttlefish/configs/centos-stream-x86_64.cfg

Comment 11 Alfredo Moralejo 2019-11-29 08:58:30 UTC
(In reply to Alfredo Moralejo from comment #9)
> (In reply to Pavel Raiskup from comment #8)
> > (In reply to Alfredo Moralejo from comment #7)
> > > I see epel8 build root has best=false because of
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1756681. Could the same approach
> > > be applied in centos-stream config?
> > 
> > Thanks, valid point:
> > https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/
> > ?id=6fa5f05650050a7b3e4eebf68edea24255d37f4c
> > 
> > There's no reason to work-around epel-8 chroots, and keep centos-stream
> > in non-working state.  Though I agree with Mirek that this is to be fixed
> > in modularity.
> 


Thanks for fixing it so fast!

And yes, i also think there is a problem with modularity that should be fixed there. IIUC there is ongoing discussions about existing issues with modularity but i guess it will take some time to get it fixed.

Comment 12 Pavel Raiskup 2020-12-14 14:37:25 UTC
There's an alternative proposal for:
```
# cat >>/etc/mock/rhel-8-x86_64.cfg <<EOF
config_opts['yum.conf'] += """
[main]
best=False
"""
EOF
```

https://pagure.io/copr/copr/issue/1336

Feel free to reopen if you think the RFE isn't matching your usecase.

Comment 13 Pavel Raiskup 2021-01-27 09:20:50 UTC
FTR, today I disabled the best=0 work-around.  The default mock-core-configs
without this hack doesn't seem to mistakenly install modular packages anymore
into EL 8 chroots.  Let me know if this still breaks something.

https://pagure.io/fedora-infra/ansible/c/b9d52f1b6517901e0694aec67d6bf44960e2dff5?branch=main