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

New --scrub-all-chroots option appears to only work for system chroots (mock-core-configs) #1470

Open
penguinpee opened this issue Sep 27, 2024 · 1 comment
Labels
enhancement feature request, rfe

Comments

@penguinpee
Copy link

penguinpee commented Sep 27, 2024

Short description of the problem

The new --scrub-all-chroots needs to be smarter with regards to user configs.

Output of rpm -q mock

mock-5.7-1.fc39.noarch

Steps to reproduce issue

  1. mock --scrub-all-chroots:
Unknown directory: churchyard-dill-py3.13_fedora-rawhide-x86_64-bootstrap
Unknown directory: gui1ty-reviews_fedora-rawhide-x86_64
Unknown directory: gui1ty-reviews_fedora-rawhide-x86_64-bootstrap
Unknown directory: gui1ty-extract-msg_fedora-rawhide-x86_64-bootstrap
Unknown directory: churchyard-dill-py3.13_fedora-rawhide-x86_64
Unknown directory: gui1ty-extract-msg_fedora-rawhide-x86_64

All of the above are chroots created with output of copr mock-config project chroot redirected into ~/.config/mock/${short_name}.cfg and accessible by ${short_name} using mock -r ${short_name} or fedpkg mockbuild --root ${short_name}.

The issue is the chroot on disk does not correspond to the name of the config file. The first Unknown directory (which is misleading, since the directory does exist) corresponds to a configuration file called dill.cfg with the following content:

# This is development/testing only mock profile, not exactly the same as
# is used on copr builders;  but it is basically similar.  If you need an
# exact mock configuration (because you e.g. try to reproduce failed
# build), such configuration is put alongside the built RPMs.

include('/etc/mock/fedora-rawhide-x86_64.cfg')

config_opts['root'] = 'churchyard-dill-py3.13_fedora-rawhide-x86_64'
config_opts['isolation'] = 'unchanged'

config_opts['dnf.conf'] += """

[copr_base]
name="Copr repository"
baseurl=https://download.copr.fedorainfracloud.org/results/churchyard/dill-py3.13/fedora-rawhide-x86_64/
gpgcheck=0
enabled=1
skip_if_unavailable=1
metadata_expire=0
cost=1
best=1

[http_kojipkgs_fedoraproject_org_repos_rawhide_latest_basearch]
name="Additional repo http_kojipkgs_fedoraproject_org_repos_rawhide_latest_basearch"
baseurl=http://kojipkgs.fedoraproject.org/repos/rawhide/latest/$basearch/
gpgcheck=0
enabled=1
skip_if_unavailable=1
metadata_expire=0
cost=1
best=1

So, --scrub-all-chroots would need to look at the config_opts['root'] parameter for configs not managed by mock-core-configs.

@praiskup
Copy link
Member

Thank you for the report.

So, --scrub-all-chroots would need to look at the config_opts['root'] parameter for configs not managed by mock-core-configs.

Indeed, but this makes the process a bit more complicated. Help with this is welcome!

@praiskup praiskup added the enhancement feature request, rfe label Sep 27, 2024
@nikromen nikromen moved this from Needs triage to Someday in future in CPT Kanban Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request, rfe
Projects
None yet
Development

No branches or pull requests

2 participants