Bug 1332195

Summary: Mock SCM always uses epel-7-x86_64 chroot
Product: [Community] Copr Reporter: Jakub Kadlčík <jkadlcik>
Component: frontendAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: clime, praiskup, psabata
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: 2017-06-29 08:26:56 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 Jakub Kadlčík 2016-05-02 13:11:12 UTC
Description of problem:
No matter what chroots where specified for the project or build, Mock SCM on dist-git always uses epel-7-x86_64 chroot for building .src.rpm package.

It is problem because package with Fedora-specific RPM macros will not be able to build. Even though build chroot can be fedora-*-*.


Version-Release number of selected component (if applicable):
copr-dist-git-0.17


Steps to Reproduce:
1. Have source code with .spec file containing Fedora-specific RPM macros
2. Build it through Builds > New Build > Mock SCM


Actual results:
It will fail, because dist-git runs following command:
/usr/bin/mock -r epel-7-x86_64 --scm-enable --scm-option ...


Expected results:
Dist-git should consider the build chroot and run
/usr/bin/mock -r <build_chroot> --scm-enable --scm-option ...


Additional info:
The epel chroot is hardcoded in MockScmProvider:

cmd = ["/usr/bin/mock", "-r", "epel-7-x86_64",
       "--scm-enable",
       ...]

Comment 1 Pavel Raiskup 2017-01-17 14:45:01 UTC
Do you have some quick reproducer?  Existing git repository?  One issue is
that the SRPM is built many times (for each chroot actually) which really
makes dist-git overloaded..  So my thoughts was to make the SRPM built only
once (e.g. on epel-7-x86_64).

Comment 2 Miroslav Suchý 2017-01-18 12:03:03 UTC
It is no longer true that it is hardcoded. It is configurable now. See:
conf/copr-dist-git.conf.example:mock_scm_chroot=fedora-rawhide-x86_64
But yes, we use one chroot for everything.

Comment 3 clime 2017-06-29 08:26:56 UTC
New COPR version has been released.