Bug 1281369 - mock <options> <localpath>/my.srpm fails if <localpath>/my.srpm is on nfs filesytem
mock <options> <localpath>/my.srpm fails if <localpath>/my.srpm is on nfs fil...
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: mock (Show other bugs)
el6
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-12 07:02 EST by Mark Robinson
Modified: 2016-01-03 18:26 EST (History)
6 users (show)

See Also:
Fixed In Version: mock-1.2.14-1.fc23 mock-1.2.14-1.el6 mock-1.2.14-1.fc22 mock-1.2.14-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-27 13:21:21 EST
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)
Proposed patch of the root_cache.py file (1.04 KB, patch)
2015-11-12 07:02 EST, Mark Robinson
no flags Details | Diff

  None (edit)
Description Mark Robinson 2015-11-12 07:02:06 EST
Created attachment 1093194 [details]
Proposed patch of the root_cache.py file

Description of problem:
This is related to https://bugzilla.redhat.com/show_bug.cgi?id=916685 which was closed, but the underlying issue did not get fixed.

Unable to run mock -r <config> srpms/my.srpm on a Vagrant guest (running in /vagrant).

The problem seems to come about in re-using the existing root cache.

In _rootCacheLock, mockbuild.util.get_fs_type detects that /vagrant is an 'nfs' drive, and then changes the working-directory to a 'non-nfs' drive (from mockbuild.util.find_non_nfs_dir). However, as the working directory is no longer in /vagrant, mock is then unable to find the srpm.

Have attached a possible patch (this assumes that the functionality of unpacking of the root cache is contained in that function, and there are no side effects where other functions may need to be in a non-nfs directory - IIUC, https://bugzilla.redhat.com/show_bug.cgi?id=649192 was originally raised to implement the get_fs_type/find_non_nfs_dir directory)


Version-Release number of selected component (if applicable):
mock-1.1.38-1.el6.noarch (but also able to reproduce in mock-1.2.7-1.el7.noarch)

How reproducible:
On a system where the home is an nfs (however, if the root cache is being re-built, e.g. it detected the mock config has changed, then that mock run succeeds).

Steps to Reproduce:
1. Copy srpm to an 'nfs' mount directory (i.e. one that causes mockbuild.util.get_fs_type to return 'nfs')
2. Run
 mock <options> my.srpm

Actual results:
ERROR: [Errno 2] No such file or directory:


Expected results:
To find and build the srpm


Additional info:
Workaround is to run
 mock <options> <fullpath>/my.srpm
Comment 1 Miroslav Suchý 2015-11-24 18:28:35 EST
Commited as 
* fef4c05 (origin/devel, devel) after unpacking chroot, change back to $CWD [RHBZ#1281369]
Comment 2 Fedora Update System 2015-11-24 18:32:03 EST
mock-1.2.14-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-a295f19cae
Comment 3 Fedora Update System 2015-11-24 18:32:06 EST
mock-1.2.14-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-6d1cc55330
Comment 4 Fedora Update System 2015-11-24 18:32:37 EST
mock-1.2.14-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4d491366d
Comment 5 Fedora Update System 2015-11-24 18:32:39 EST
mock-1.2.14-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd9c932e3a
Comment 6 Fedora Update System 2015-11-24 18:33:10 EST
mock-1.2.14-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3ef940024e
Comment 7 Fedora Update System 2015-11-25 19:51:28 EST
mock-1.2.14-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.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd9c932e3a
Comment 8 Fedora Update System 2015-11-25 19:53:29 EST
mock-1.2.14-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.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-a295f19cae
Comment 9 Fedora Update System 2015-11-25 20:22:14 EST
mock-1.2.14-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4d491366d
Comment 10 Fedora Update System 2015-11-25 21:25:48 EST
mock-1.2.14-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3ef940024e
Comment 11 Fedora Update System 2015-11-25 21:54:46 EST
mock-1.2.14-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-6d1cc55330
Comment 12 Fedora Update System 2015-11-27 13:20:50 EST
mock-1.2.14-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 13 Fedora Update System 2016-01-03 15:26:39 EST
mock-1.2.14-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.
Comment 14 Fedora Update System 2016-01-03 16:20:26 EST
mock-1.2.14-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2016-01-03 18:26:23 EST
mock-1.2.14-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.

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