Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1694420
Summary: | [abrt] mock: rmtree(): util.py:231:rmtree:PermissionError: [Errno 13] Permission denied: '/var/lib/mock/fedora-29-x86_64/root/builddir/build/SOURCES' | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Markus Linnala <markus.linnala> | ||||||||||||||||||||
Component: | mock | Assignee: | Pavel Raiskup <praiskup> | ||||||||||||||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||||||||||||
Priority: | unspecified | ||||||||||||||||||||||
Version: | 31 | CC: | jdisnard, jkeating, mebrown, msuchy, praiskup, williams | ||||||||||||||||||||
Target Milestone: | --- | ||||||||||||||||||||||
Target Release: | --- | ||||||||||||||||||||||
Hardware: | x86_64 | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
URL: | https://retrace.fedoraproject.org/faf/reports/bthash/92e875989dec84a4f6598950f57d5c02ce7934e7 | ||||||||||||||||||||||
Whiteboard: | abrt_hash:2c9fa9798e73aa360ed158b6db2c3bf1c225431e;VARIANT_ID=workstation; | ||||||||||||||||||||||
Fixed In Version: | mock-2.0-2.fc30 mock-2.0-2.fc31 | Doc Type: | If docs needed, set a value | ||||||||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||||||||
Clone Of: | Environment: | ||||||||||||||||||||||
Last Closed: | 2020-02-20 04:45:58 UTC | Type: | --- | ||||||||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||
Embargoed: | |||||||||||||||||||||||
Attachments: |
|
Description
Markus Linnala
2019-03-31 09:29:12 UTC
Created attachment 1550086 [details]
File: backtrace
Created attachment 1550087 [details]
File: cgroup
Created attachment 1550088 [details]
File: cpuinfo
Created attachment 1550089 [details]
File: environ
Created attachment 1550090 [details]
File: machineid
Created attachment 1550091 [details]
File: mountinfo
Created attachment 1550092 [details]
File: namespaces
Created attachment 1550093 [details]
File: open_fds
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '29'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. (In reply to Markus Linnala from comment #0) > Description of problem: > This happens every time I clean libdir and then build package first time. Thanks for the report. What do you mean by 'clean libdir'? Can you please provide step-by-step reproducer, and check mock-1.4.21? Thank you! Okay, here is full step-by-step reproducer. Install new Fedora 31 virtual machine using Virtual Machine Manager. Use install image from: http://www.nic.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/31/Everything/x86_64/iso/Fedora-Everything-netinst-x86_64-31-1.9.iso I guess any other relevant image could be used. This just was something I had already downloaded. Choose the operating system you are installling: "Fedora 30" As there is no "Fedora 31" possible to select or automatically recognized. Select slightly more powerful virtual machine: Memory 8192 CPUs 4 I guess you can choose something else too. Select defaults next. Virtual machine starts. Choose language: English In Software Selection choose: Minimal Install I guess you can choose something else, but I think virtual machine installs faster this way. Setup User Settings and create user named "user". Select Default in "Installation Destination". Install machine. Log in from console as root. Setup sudo not to use password. Get ip. Logout. Copy ssh key to user using previous ip. Log in as "user" Install mock. sudo dnf install -y mock Setup mock group by running: sudo /usr/sbin/usermod -a -G mock $USER Logout and login again. This should enable your account to achieve mock group property. Crate a spec file "foo.spec": <snip> Summary: Foo Name: foo Version: 0 Release: 0%{?dist} License: GPL %description Foo %prep : %build : %install mkdir -p %{buildroot}%{_localstatedir}/cache/foo touch %{buildroot}%{_localstatedir}/cache/foo/bar %files %{_localstatedir}/cache/foo </snip> I guess you can use any other spec file with relevant sources too. Build src.rpm file from foo.spec using command: mock -n --buildsrpm --spec=foo.spec --sources=. [user@localhost ~]$ mock -n -N --unpriv --buildsrpm --spec=foo.spec --sources=. ... Complete! Finish: dnf install Start: creating root cache Finish: creating root cache Finish: chroot init INFO: Installed packages: Start: buildsrpm Finish: buildsrpm ERROR: Exception(foo.spec) Config(fedora-31-x86_64) 2 minutes 6 seconds INFO: Results and/or logs in: /var/lib/mock/fedora-31-x86_64/result Traceback (most recent call last): File "/usr/libexec/mock/mock", line 980, in <module> exitStatus = main() File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/libexec/mock/mock", line 757, in main result = run_command(options, args, config_opts, commands, buildroot, state) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/libexec/mock/mock", line 864, in run_command mockbuild.rebuild.do_buildsrpm(config_opts, commands, buildroot, options, args) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/rebuild.py", line 101, in do_buildsrpm cmd=cmd, post=None, clean=clean) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/rebuild.py", line 25, in rebuild_generic ret = cmd(item) File "/usr/lib/python3.7/site-packages/mockbuild/rebuild.py", line 98, in cmd follow_links=options.symlink_dereference) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/backend.py", line 582, in buildsrpm util.rmtree(self.buildroot.make_chroot_path(self.buildroot.builddir, "SOURCES")) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 266, in rmtree os.rmdir(path) PermissionError: [Errno 13] Permission denied: '/var/lib/mock/fedora-31-x86_64/root/builddir/build/SOURCES' When ever you try again you do not need to reinstall machine from the scratch to see this error. You can just remove build env: sudo rm -rf /var/cache/mock/fedora-31-x86_64/root_cache /var/lib/mock/fedora-31-x86_64 And then run again: mock -n --buildsrpm --spec=foo.spec --sources=. ... Traceback (most recent call last): File "/usr/libexec/mock/mock", line 980, in <module> exitStatus = main() File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/libexec/mock/mock", line 757, in main result = run_command(options, args, config_opts, commands, buildroot, state) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/libexec/mock/mock", line 864, in run_command mockbuild.rebuild.do_buildsrpm(config_opts, commands, buildroot, options, args) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/rebuild.py", line 101, in do_buildsrpm cmd=cmd, post=None, clean=clean) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/rebuild.py", line 25, in rebuild_generic ret = cmd(item) File "/usr/lib/python3.7/site-packages/mockbuild/rebuild.py", line 98, in cmd follow_links=options.symlink_dereference) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/backend.py", line 582, in buildsrpm util.rmtree(self.buildroot.make_chroot_path(self.buildroot.builddir, "SOURCES")) File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 266, in rmtree os.rmdir(path) PermissionError: [Errno 13] Permission denied: '/var/lib/mock/fedora-31-x86_64/root/builddir/build/SOURCES' Relevant software versions are: mock-1.4.21-1.fc31.noarch mock-core-configs-31.7-1.fc31.noarch There is no other software or configuration changes. I guess main idea to reproduce is to use '-n' option. Created attachment 1633448 [details]
Add log with full run of mock command run
Here is full log of running: "mock -n --buildsrpm --spec=foo.spec --sources=." catched via script command.
As I've seen this bug in F31 I'll change Version field. This set of commands seems to be simplest way to reproduce bug when you have already installed machine and you have setup mock. sudo rm -rf /var/cache/mock/fedora-31-x86_64/root_cache /var/lib/mock/fedora-31-x86_64;mock -n --buildsrpm --spec=foo.spec --sources=. At least I can easily reproduce issue every time I run commands. Thank you, I reproduced it now. FEDORA-EPEL-2020-56dcc5ffbf has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-56dcc5ffbf FEDORA-2020-4ab9c18a6a has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4ab9c18a6a FEDORA-2020-8c3f06d776 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-8c3f06d776 mock-2.0-2.fc31, mock-core-configs-32.1-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-8c3f06d776 mock-2.0-2.el8, mock-core-configs-32.1-1.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-4f9536de5b mock-2.0-2.fc30, mock-core-configs-32.1-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4ab9c18a6a mock-2.0-2.el7, mock-core-configs-32.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-56dcc5ffbf mock-2.0-2.fc30, mock-core-configs-32.1-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report. mock-2.0-2.fc31, mock-core-configs-32.1-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report. FEDORA-EPEL-2020-4f9536de5b has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-4f9536de5b FEDORA-EPEL-2020-56dcc5ffbf has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-56dcc5ffbf mock-2.0-2.el8, mock-core-configs-32.2-1.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-4f9536de5b mock-2.0-2.el7, mock-core-configs-32.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-56dcc5ffbf FEDORA-EPEL-2020-4f9536de5b has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-4f9536de5b FEDORA-EPEL-2020-56dcc5ffbf has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-56dcc5ffbf mock-2.0-2.el7, mock-core-configs-32.3-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-56dcc5ffbf mock-2.0-2.el8, mock-core-configs-32.3-2.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-4f9536de5b FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66 mock-2.1-1.el8, mock-core-configs-32.4-1.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907 mock-2.1-1.el7, mock-core-configs-32.4-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66 FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66 FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907 FEDORA-EPEL-2020-5a84e15907 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-5a84e15907 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2020-88ef4b4d66 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-88ef4b4d66 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907 FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66 FEDORA-EPEL-2020-5a84e15907 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-5a84e15907 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2020-88ef4b4d66 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-88ef4b4d66 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report. |