Bug 1297430

Summary: RFE: chroot_scan should extract files preserving ownership and mode
Product: [Fedora] Fedora Reporter: Alejandro Alvarez <a.alvarezayllon>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: Frodox, jdisnard, mebrown, msimacek, msuchy, praiskup, williams
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mock-1.3.4-1.fc25 mock-1.3.4-1.fc24 mock-1.3.4-1.el7 mock-1.3.5-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-08 13:28:29 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 Alejandro Alvarez 2016-01-11 13:44:36 UTC
Description of problem:

When using the plugin chroot_scan to extract test logs (in our case, generated during %check), the generated logs are extracted owned by root.root, even if the original files were owned by whoever is running mock. I guess this is because the files are copied out being root, while the tests are run dropping privileges first.

I have patched it using --preserve=ownership,mode (see
https://github.com/ayllon/mock/commit/fe93db6267218919db812adc053df18dd5362f1f
), although maybe there are better solutions (chown?)

Comment 1 Miroslav Suchý 2017-02-21 16:06:06 UTC
I commited the preservation of mode as commit 12e8682

The ownership have to be reset to current user, otherwise user can be unable to even remove such files. This has been recently addressed by:

https://github.com/rpm-software-management/mock/pull/47

Comment 2 Fedora Update System 2017-02-27 17:55:41 UTC
mock-1.3.4-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-1c433a692a

Comment 3 Fedora Update System 2017-02-27 17:56:02 UTC
mock-1.3.4-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-2c7e8574bf

Comment 4 Fedora Update System 2017-02-27 17:56:25 UTC
mock-1.3.4-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3cb1bb5aa5

Comment 5 Fedora Update System 2017-02-27 17:56:47 UTC
mock-1.3.4-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-89e17056c0

Comment 6 Fedora Update System 2017-03-01 01:48:41 UTC
mock-1.3.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-2017-89e17056c0

Comment 7 Fedora Update System 2017-03-01 02:50:37 UTC
mock-1.3.4-1.fc24 has been pushed to the Fedora 24 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-2017-1c433a692a

Comment 8 Fedora Update System 2017-03-01 02:53:29 UTC
mock-1.3.4-1.fc25 has been pushed to the Fedora 25 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-2017-3cb1bb5aa5

Comment 9 Fedora Update System 2017-03-01 17:17:37 UTC
mock-1.3.4-1.el6 has been pushed to the Fedora EPEL 6 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-2017-2c7e8574bf

Comment 10 Vit Ry 2017-03-01 19:50:56 UTC
Should be fully fixed since https://github.com/rpm-software-management/mock/pull/50

Comment 11 Fedora Update System 2017-03-02 10:21:33 UTC
mock-1.3.5-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-2c7e8574bf

Comment 12 Fedora Update System 2017-03-03 03:54:54 UTC
mock-1.3.4-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2017-03-03 04:17:12 UTC
mock-1.3.5-1.el6 has been pushed to the Fedora EPEL 6 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-2017-2c7e8574bf

Comment 14 Fedora Update System 2017-03-08 13:28:29 UTC
mock-1.3.4-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-03-15 13:48:15 UTC
mock-1.3.4-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-04-13 00:16:37 UTC
mock-1.3.5-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.