Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom method is broken because of DNF vs DNF5 #3140

Closed
FrostyX opened this issue Feb 12, 2024 · 8 comments · Fixed by #3144
Closed

Custom method is broken because of DNF vs DNF5 #3140

FrostyX opened this issue Feb 12, 2024 · 8 comments · Fixed by #3144
Assignees
Labels

Comments

@FrostyX
Copy link
Member

FrostyX commented Feb 12, 2024

We discovered this with @praiskup while upgrading builders to F39 (but it is unrelated)

Custom method builds fail with:

INFO: Package manager dnf5 detected and used (direct choice)
Start: installing minimal buildroot with dnf5
execv(/usr/bin/dnf5) failed: No such file or directory
WARNING: DNF5 command failed, retrying, attempt #2, sleeping 10s
execv(/usr/bin/dnf5) failed: No such file or directory
WARNING: DNF5 command failed, retrying, attempt #3, sleeping 10s
execv(/usr/bin/dnf5) failed: No such file or directory

Relevant:

INFO: Not updating bootstrap chroot, bootstrap_image_ready=True

which is set in rpmbuild/mock-custom-build.cfg.j2.

Full error:

builder-live.log.gz.txt

This is probably because Mock says that rawhide is a DNF5 distribution but the container doesn't have DNF5. The proposed solution is to temporarily replace the mock-custom-build.cfg.j2 in ansible and set bootstrap_image_ready=False (for rawhide)

@praiskup
Copy link
Member

The logic behind bootstrap_image_ready was that the image should always contain the default package_manager (and the plugins-core is not needed for the custom chroot preparation).

It's not truth with https://fedoraproject.org/wiki/Changes/BuildWithDNF5 -> Rawhide images contain DNF4, while the expected package_manager in bootstrap is dnf5.

@praiskup praiskup moved this from Needs triage to In 3 months in CPT Kanban Feb 14, 2024
@praiskup praiskup moved this from In 3 months to In Progress in CPT Kanban Feb 14, 2024
@FrostyX FrostyX self-assigned this Feb 15, 2024
@FrostyX
Copy link
Member Author

FrostyX commented Feb 15, 2024

I did https://pagure.io/fedora-infra/ansible/c/cce5ad78f461edbcd552f758ee808f1ce5348cb4 and an analogical change for the internal Copr.

@FrostyX FrostyX closed this as completed Feb 15, 2024
@praiskup
Copy link
Member

I think we still need to handle fedora-40 which has been branched now?

With fedora-rawhide, this is going to become non-problem because it will be DNF5-native distro (dnf5 will be available in the fedora:rawhide container image). But the problem of DNF4-native F40 built by DNF5 will remain forever.

@praiskup
Copy link
Member

I think this deserves an upstream copr-rpmbuild fix, wdyt?

@FrostyX
Copy link
Member Author

FrostyX commented Feb 16, 2024

I think we still need to handle fedora-40 which has been branched now?

Well, I don't know. F40 uses fedora-branched.tpl template and it configures config_opts['package_manager'] = 'dnf', so it shouldn't be an issue (at the moment)? At least I wasn't able to reproduce it yet.

https://github.com/rpm-software-management/mock/blob/main/mock-core-configs/etc/mock/templates/fedora-branched.tpl#L11

I think this deserves an upstream copr-rpmbuild fix, wdyt?

I created PR #3144 but since it is going to be a non-problem for rawhide, I don't know if we want to merge it or not.

@FrostyX
Copy link
Member Author

FrostyX commented Feb 16, 2024

Well, I don't know. F40 uses fedora-branched.tpl template and it configures config_opts['package_manager'] = 'dnf'

Related issue: https://bugzilla.redhat.com/show_bug.cgi?id=2264535

@praiskup
Copy link
Member

praiskup commented Feb 16, 2024

Well, I don't know. F40 uses fedora-branched.tpl template and it configures config_opts['package_manager'] = 'dnf', so it shouldn't be an issue (at the moment)?

Related issue: https://bugzilla.redhat.com/show_bug.cgi?id=226453

the fact that it flips back to dnf instead of dnf5 is an issue.. fixed now

FrostyX added a commit to FrostyX/copr that referenced this issue Feb 17, 2024
@FrostyX FrostyX reopened this Feb 19, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Needs triage in CPT Kanban Feb 19, 2024
FrostyX added a commit to FrostyX/copr that referenced this issue Feb 19, 2024
@FrostyX FrostyX moved this from Needs triage to In Progress in CPT Kanban Feb 19, 2024
@FrostyX
Copy link
Member Author

FrostyX commented Feb 20, 2024

Hotfixed on both Fedora Copr and Internal Copr for Rawhide and F40 chroots and we have I PR #3144 with a proper fix for F40.

@xsuchy xsuchy moved this from In Progress to Done in CPT Kanban Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants