Bug 1178576
Summary: | SCM builds fail with "IOError: [Errno 13] Permission Denied: /tmp/foo.mock-scm.bar/bar/bar.spec" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Scott K Logan <logans> | ||||||
Component: | mock | Assignee: | Miroslav Suchý <msuchy> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 21 | CC: | jdisnard, matt, mbaudier, mebrown, Mikhail_Campos-Guadamuz, msimacek, msuchy, praiskup, williams | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | mock-1.2.6-1.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-01-21 23:09:03 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: | |||||||||
Attachments: |
|
Description
Scott K Logan
2015-01-05 00:14:17 UTC
In mock-1.1.41-3.fc21 _becomeUser(0,0) called after scm get_sources() function (where tmp directory is created), so the owner of tmp dir was user that started the build. Created attachment 976829 [details]
Correct permissions for tmp scm directory
Proposed patch attached
Thanks Mikhail for proposed patch, however I would say that rather than chmod 755 it is better to drop and restore privs around scmWorker.get_sources() - command copyout do the same. Commit 4702ce9 mock-1.2.4-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc21 mock-1.2.4-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc20 mock-1.2.4-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.4-1.el7 mock-1.2.4-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.4-1.el6 Package mock-1.2.4-1.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.2.4-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0312/mock-1.2.4-1.el7 then log in and leave karma (feedback). I had this issue (on CentOS 6.6 x86_64), and I installed mock 1.2.4-1.el6 from epel-testing, which indeed fixed the authorizations pb. But now, I get this error and it cannot start the actual build on the SRPM generated from the git repository : CRITICAL: No package specified to rebuild command. Looking at the /usr/sbin/mock script it seems that do_buildsrpm() returns an empty string elif options.mode == 'rebuild': if config_opts['scm']: srpm = do_buildsrpm(config_opts, commands, buildroot, options, args) log.info(srpm) if srpm: args.append(srpm) scmWorker.clean() do_rebuild(config_opts, commands, buildroot, args) # Note: I added log.info(srpm) Should I open a new bug or is it a side effect of this one? To reproduce: Git: git://elgis.argeo.org/geos.git Sources: http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 /usr/bin/mock -v -r epel-6-x86_64 --scm-enable --scm-option package=geos --no-clean # added to epel-6-x86_64.cfg config_opts['scm_opts']['method'] = 'git' config_opts['scm_opts']['spec'] = 'SCM_PKG.spec' config_opts['scm_opts']['ext_src_dir'] = '/home/mbaudier/dev/git/elgis.argeo.org/sources' config_opts['scm_opts']['git_timestamps'] = True config_opts['scm_opts']['git_get'] = 'git clone -b elgis6 file:////home/mbaudier/dev/git/elgis.argeo.org//SCM_PKG SCM_PKG' More log: ... Wrote: /builddir/build/SRPMS/geos-3.4.2-3.el6.src.rpm DEBUG: Child return code was: 0 INFO: LEAVE do --> Finish: rpmbuild -bs DEBUG: Copying package to result dir Finish: buildsrpm INFO: Done(/tmp/tmpbwIga9.mock-scm.geos/geos/geos.spec) Config(epel-6-x86_64) 0 minutes 1 seconds INFO: Results and/or logs in: /var/lib/mock/epel-6-x86_64/result INFO: None DEBUG: Clean SCM checkout directory CRITICAL: No package specified to rebuild command. DEBUG: kill orphans ... 1) this is different issue 2) it is NOTABUG, because git://elgis.argeo.org/geos.git is not git, but dist-git. And to get the tar.gz you are not doing git-archive (which SCM plugin does) but "fedpkg sources" There seems to be a misunderstanding: the git repo is cloned locally and the archive is downloaded manually (I just put the online URLs in order to help reproduce) The related properties in the mock .cfg file are: config_opts['scm_opts']['method'] = 'git' config_opts['scm_opts']['spec'] = 'SCM_PKG.spec' config_opts['scm_opts']['ext_src_dir'] = '/home/mbaudier/dev/git/elgis.argeo.org/sources' config_opts['scm_opts']['git_timestamps'] = True config_opts['scm_opts']['git_get'] = 'git clone -b elgis6 file:////home/mbaudier/dev/git/elgis.argeo.org//SCM_PKG SCM_PKG' The local git repos are located at: /home/mbaudier/dev/git/elgis.argeo.org/<my package> and the sources at: /home/mbaudier/dev/git/elgis.argeo.org/sources The SRPM is properly generated (cf. log above), so the SCM plugin is doing its job. It seems just that the path (?) to the generated SRPM is not passed to the next step (that is, the rebuild itself). Sorry to insist, but I have been using mock for years and this used to work (our Enterprise Linux GIS build scripts wrapping mock are now broken). Either I have indeed made a stupid configuration mistake, or something has changed, or something is wrong. Can you please open new BZ for that, so we do not pollute this one? mock-1.2.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.4-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.5-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.5-1.el7 mock-1.2.5-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.5-1.el6 mock-1.2.5-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc20 mock-1.2.5-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc21 mock-1.2.5-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6 mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7 mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20 mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21 > CRITICAL: No package specified to rebuild command. I have filed bug 1190450 for the above. mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.6-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. mock-1.2.6-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. |