Bug 1378093

Summary: Mageia builds for COPR need %mkrel and %mklibname defined from the very beginning
Product: [Community] Copr Reporter: Neal Gompa <ngompa13>
Component: backendAssignee: clime
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: clime
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:07:12 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-09-21 13:18:07 UTC
Description of problem:
If a properly compliant Mageia package is submitted to COPR for build, it fails due to the lack of support for %mkrel and %mklibname macros. Because of this, it chokes on processing the spec for building the source RPM and the binary RPMs.

Here's the macro definitions ripped from our build macros file included in rpm-mageia-setup-build:

=== mklibname ===

# Macro: %{mklibname <name> [<major> [<minor>]] [-s] [-d]}
# - %{mklibname test}           => %{_lib}test
# - %{mklibname test 1 -d}      => %{_lib}test1-devel
# - %{mklibname test 1 -d 0 -s} => %{_lib}test1_0-static-devel
%mklibname(ds)  %{_lib}%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}

=== mkrel ===

# Macro: %mkrel [-c <snapver>] <number>
# - %mkrel 1                    => 1%{?subrel:.%subrel}%{?dist}
# - %mkrel -c rc1 1             => 0.rc1.1%{?subrel:.%subrel}%{?dist}
%mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?dist:%dist}

Comment 1 clime 2016-09-29 14:29:04 UTC
Fixed by https://github.com/fedora-copr/copr/commit/13b53c9d.