Bug 1393460

Summary: Copr chokes on %mageia conditional in spec files for rebuilding SRPM
Product: [Community] Copr Reporter: Neal Gompa <ngompa13>
Component: backendAssignee: clime
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jistone, rverschelde
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 13:00:47 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 Neal Gompa 2016-11-09 15:28:36 UTC
Description of problem:
When importing a package, it fails to take the spec and sources and rebuild into SRPM because it bombs out, saying bad %if condition on the line where "%if 0%{?mageia}" exists.

How reproducible:
Always

Steps to Reproduce:
1. Make a package using %mageia conditional somewhere in the spec
2. Build it in copr with Mageia targets enabled
3.

Actual results:
Fails out with bad %if condition

Expected results:
Processes and builds properly

Additional info:
Example can be seen here: https://copr.fedorainfracloud.org/coprs/ngompa/godot/build/474979/

Spec and build log links are present there.

Comment 1 clime 2016-11-12 18:19:18 UTC
This is a "bug" in fedpkg-copr specific to cauldron. You see, for cauldron, the %mageia macro is defined as 'cauldron' by fedpkg-copr. That is what trips %if conditions out. It should probably be defined as '7' if I understand correctly.

Comment 2 Neal Gompa 2016-11-12 22:57:19 UTC
Currently, it should be defined as 6, since we haven't branched from 6 to 7. We branch formally on official release.

Comment 3 clime 2016-11-15 03:24:05 UTC
Sorry to ask but is it important that it is 6 now? Because if I make it 6 now, I will need to make it 7 later (which I can do, just asking if it is really the best way).

Comment 4 Neal Gompa 2016-11-15 16:31:50 UTC
(In reply to clime from comment #3)
> Sorry to ask but is it important that it is 6 now? Because if I make it 6
> now, I will need to make it 7 later (which I can do, just asking if it is
> really the best way).

This isn't defined by the releasever option set in the mock config associated with the target? Because in there it's set to "6".