Bug 1301985 - mockbuild unable to read source rpm
mockbuild unable to read source rpm
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-26 08:35 EST by Matthew Gyurgyik
Modified: 2016-06-27 23:19 EDT (History)
6 users (show)

See Also:
Fixed In Version: mock-1.2.18-1.fc23 mock-1.2.18-1.fc24 mock-1.2.18-1.el7 mock-1.2.18-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-13 00:56:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Gyurgyik 2016-01-26 08:35:55 EST
Description of problem:

mock fails because the mockbuild user can't read the .src.rpm.


Version-Release number of selected component (if applicable):
mock-1.2.14

How reproducible: Always


Steps to Reproduce:
1. chmod 640 /tmp/pl-gcc-4.9.3-1.el7.src.rpm
2. mock -r epel-7-x86_64 --rebuild /tmp/pl-gcc-4.9.3-1.el7.src.rpm 
3.

Actual results:

ERROR: Command failed. See logs for output.
 # /usr/bin/systemd-nspawn -q -M 80cfcb408a6a414ba6c893293f11c766 -D /var/lib/mock/epel-7-x86_64/root /bin/su -l mockbuild -c /bin/rpm -Uvh --nodeps /builddir/build/originals/pl-gcc-4.9.3-1.el7.src.rpm


[build2 SPECS]$ sudo /usr/bin/systemd-nspawn -q -M 80cfcb408a6a414ba6c893293f11c766 -D /var/lib/mock/epel-7-x86_64/root
-bash-4.2# ls -l /builddir/build/originals/pl-gcc-4.9.3-1.el7.src.rpm
-rw-r-----. 1 root root 124343301 Jan 26 08:27 /builddir/build/originals/pl-gcc-4.9.3-1.el7.src.rpm


Expected results:

SRPM should be copied to the /buildroot with 644.

Additional info:
Build is successful when permissions on /tmp/pl-gcc-4.9.3-1.el7.src.rpm are 644
Comment 1 Matthew Gyurgyik 2016-01-26 09:00:32 EST
I'm have no familiarity with the code base, but if I was to take a stab at this...

I think the shutil.copy2() call on line 370 (copy_srpm_into_chroot function) in backend.py could be replaced with shutil.copyfile(). According the the python documentation, copyfile() will copy the file contents, ignoring file metadata and permission bits. I don't think it's important to preserve metadata or permission bits (but since copy2() is being used, perhaps someone felt it was).

If the file metadata is important, you could always just issue os.chmod() after shutil.copy2().

I would be willing to provide a patch with either approach if that would be helpful.
Comment 2 Jan Kurik 2016-02-24 09:20:59 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 3 Miroslav Suchý 2016-06-09 09:53:27 EDT
Fixed by commit
* 6829caa copy just content of SRPM not the attributes [RHBZ#1301985]
Comment 4 Fedora Update System 2016-06-10 09:13:33 EDT
mock-1.2.16-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-89209fd48b
Comment 5 Fedora Update System 2016-06-10 09:13:54 EDT
mock-1.2.18-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-70cdc0c410
Comment 6 Fedora Update System 2016-06-10 09:14:12 EDT
mock-1.2.18-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3d9f899f6a
Comment 7 Fedora Update System 2016-06-10 09:14:33 EDT
mock-1.2.18-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-de15171a43
Comment 8 Fedora Update System 2016-06-10 09:14:54 EDT
mock-1.2.18-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-9e2f372208
Comment 9 Fedora Update System 2016-06-10 13:59:41 EDT
mock-1.2.18-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-2016-70cdc0c410
Comment 10 Fedora Update System 2016-06-10 23:18:21 EDT
mock-1.2.18-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-2016-9e2f372208
Comment 11 Fedora Update System 2016-06-10 23:19:04 EDT
mock-1.2.18-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-2016-3d9f899f6a
Comment 12 Fedora Update System 2016-06-10 23:53:28 EDT
mock-1.2.16-1.fc22 has been pushed to the Fedora 22 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-2016-89209fd48b
Comment 13 Fedora Update System 2016-06-10 23:54:02 EDT
mock-1.2.18-1.fc23 has been pushed to the Fedora 23 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-2016-de15171a43
Comment 14 Fedora Update System 2016-06-13 00:55:48 EDT
mock-1.2.18-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2016-06-18 14:34:08 EDT
mock-1.2.18-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 16 Fedora Update System 2016-06-27 15:48:29 EDT
mock-1.2.18-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 17 Fedora Update System 2016-06-27 23:19:16 EDT
mock-1.2.18-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.

Note You need to log in before you can comment on or make changes to this bug.