Bug 1322553

Summary: Mock SCM build fails when building from non master branch
Product: [Community] Copr Reporter: Tomáš Král <tkral>
Component: backendAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-05 13:06:37 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:

Description Tomáš Král 2016-03-30 17:41:53 UTC
Description of problem:

Build fails during importing when building rpm using Mock SCM from different git branch than master.




full error import log:

2. Task: 172185-epel7, importing the package: None
Build via Mock
/usr/bin/mock -r epel-7-x86_64 --scm-enable --scm-option method=git --scm-option package=openshift2nulecule --scm-option branch=prepare-v0.1.0 --scm-option write_tar=True --scm-option spec=openshift2nulecule.spec --scm-option git_get='git clone --depth 1 https://github.com/kadel/openshift2nulecule openshift2nulecule' --buildsrpm --resultdir=/tmp/tmpEqzRfr
Exception raised during srpm import:
Traceback (most recent call last):
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 489, in do_import
    SourceProvider(task, fetched_srpm_path).get_srpm()
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 159, in get_srpm
    self.provider(self.task, self.target_path).get_srpm()
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 310, in get_srpm
    raise SrpmBuilderException(error)
SrpmBuilderException: INFO: mock.py version 1.2.17 starting (python version = 2.7.5)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
ERROR: Command failed. See logs for output.
 # git checkout prepare-v0.1.0
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.NCbxrH): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.NCbxrH'

Sending back: 
{"task_id": "172185-epel7", "error": "srpm_build_error"}

Comment 1 Miroslav Suchý 2016-03-31 07:55:56 UTC
Fixed in commit:
* 88a6de9 (HEAD -> master, origin/master, origin/HEAD) 1322553 - checkout specific branch

Thank you for reporting.

Comment 2 Tomáš Král 2016-04-04 13:26:45 UTC
Thank you for quick response.
Is there a time frame when this fix is will be deployed to copr.fedorainfracloud.org?

Comment 3 Miroslav Suchý 2016-04-05 14:10:23 UTC
We just had new release on Monday. So you will have worst case scenario - likely several weeks.

Comment 4 Miroslav Suchý 2016-05-05 13:06:37 UTC
Package including this fix has been deployed on production instance of Copr.