Description of problem: In /etc/mock/*.cfgs, the mirrorslist option seems to have stopped working Version-Release number of selected component (if applicable): mock-2.1-1.fc31.noarch dnf-4.2.18-1.fc31.noarch How reproducible: Always Actual results: # mock -r fedora-31-x86_64-packman --init ... Errors during downloading metadata for repository 'packman': - Curl error (37): Couldn't read a file:// file for file:///usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist [Couldn't open file /usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist] Error: Failed to download metadata for repo 'packman': Cannot prepare internal mirrorlist: Curl error (37): Couldn't read a file:// file for file:///usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist [Couldn't open file /usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist] The corresponding /etc/mock/fedora-31-x86_64-packman.cfg contains this: .. [packman] name=packman mirrorlist=file:///usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist ... /usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist exists and is readable. Expected results: Function. Additional info: This is a regression, severely reducing mock's usablity.
Thanks for the report. Please work-around this for now by disabling bootstrap, `--no-bootstrap-chroot` or `config_opts['use_bootstrap'] = False`.
Thanks for the workaround. Seems to work for me.
https://github.com/rpm-software-management/mock/pull/552
FEDORA-2020-fba9845e22 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-fba9845e22
FEDORA-2020-6b7c342fb4 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-6b7c342fb4
FEDORA-2020-85df0014c1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-85df0014c1
FEDORA-2020-fba9845e22 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-fba9845e22` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-fba9845e22 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-85df0014c1 has been pushed to the Fedora 30 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-85df0014c1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-85df0014c1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-6b7c342fb4 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-6b7c342fb4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-6b7c342fb4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-fba9845e22 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-6b7c342fb4 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-85df0014c1 has been pushed to the Fedora 30 stable repository. If problem still persists, please make note of it in this bug report.
Reopening: The symptoms have changed, but this bug persists: # mock -r fedora-31-x86_64-packman --init ... FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mock/fedora-31-x86_64-bootstrap/root/usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist' Apparently, mock mixes up host and chroot'ed environment and bogusly tries to read the mirrorlist file from inside the chroot.
> Apparently, mock mixes up host and chroot'ed environment and bogusly tries to > read the mirrorlist file from inside the chroot. No, the mirror list shoudl be copied into the _bootstrap_ chroot, because mock executes dnf/yum from withing the _bootstrap_ (see carefully the path). IOW, when you drop the '...bootstrap/root' part, is this the right location? /usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist If yes, can you help us to diagnose why it was not available in the bootstrap chroot? I probably need full traceback ... also full log with --trace --verbose could be attached (compressed) here.
(In reply to Pavel Raiskup from comment #15) > > Apparently, mock mixes up host and chroot'ed environment and bogusly tries to > > read the mirrorlist file from inside the chroot. > > No, the mirror list shoudl be copied into the _bootstrap_ chroot, because > mock > executes dnf/yum from withing the _bootstrap_ (see carefully the path). > > IOW, when you drop the '...bootstrap/root' part, is this the right location? > > /usr/share/mock/mirrorlists/fedora-31-x86_64-packman.mirrorlist Yes, this is the location, this file is installed on the host. > If yes, can you help us to diagnose why it was not available in the bootstrap > chroot? I'll try. > I probably need full traceback ... also full log with --trace > --verbose > could be attached (compressed) here. I'll do so, soonish.
Created attachment 1681050 [details] brief log Log created this way: # mock -r fedora-31-x86_64-packman --scrub=all # mock -r fedora-31-x86_64-packman --init > mock1.log 2>&1
Created attachment 1681051 [details] verbose log Log created this way: # mock -r fedora-31-x86_64-packman --scrub=all # mock -r fedora-31-x86_64-packman --trace --verbose --init > mock2.log 2>&1
Thanks, can you please try the following patch? ``` diff --git a/mock/py/mockbuild/mounts.py b/mock/py/mockbuild/mounts.py index 8290aa02..f5515cbc 100644 --- a/mock/py/mockbuild/mounts.py +++ b/mock/py/mockbuild/mounts.py @@ -99,6 +99,8 @@ class BindMountPoint(MountPoint): if os.path.isdir(self.srcpath): util.mkdirIfAbsent(self.bindpath) elif not os.path.exists(self.bindpath): + normbindpath = os.path.normpath(self.bindpath) + util.mkdirIfAbsent(os.path.dirname(normbindpath)) util.touch(self.bindpath) cmd = ['/bin/mount', '-n'] if self.recursive: ``` I think we can afford to do this in general, because if we bind-mount directories we create the whole directory path. It sounds sane to do the same for non-directory bind mounts.
Thanks for the patch. At first glance, this appears to work.
FEDORA-2020-f109b06dad has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f109b06dad
FEDORA-2020-16720483b5 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-16720483b5
FEDORA-2020-ec92166d87 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-ec92166d87
FEDORA-EPEL-2020-9a5f274330 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9a5f274330
FEDORA-EPEL-2020-9662bcb8a3 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9662bcb8a3
FEDORA-2020-16720483b5 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-16720483b5` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-16720483b5 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-9662bcb8a3 has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9662bcb8a3 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-ec92166d87 has been pushed to the Fedora 30 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-ec92166d87` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-ec92166d87 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-f109b06dad has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f109b06dad` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f109b06dad See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-9a5f274330 has been pushed to the Fedora EPEL 8 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9a5f274330 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-f109b06dad has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-16720483b5 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-9662bcb8a3 has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-9a5f274330 has been pushed to the Fedora EPEL 8 stable repository. If problem still persists, please make note of it in this bug report.