From 882228aaf5412ce0903f4405e61bf6eecbf8d7f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Fri, 22 Jul 2016 09:12:31 +0200
Subject: Do not use perl to compute Provides version

Provides declaration must valid when building SRPM. There is no perl
in the SRPM build root. This patch uses shell's printf command instead
of perl.
---
 perl-CPAN-Meta-Requirements.spec | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/perl-CPAN-Meta-Requirements.spec b/perl-CPAN-Meta-Requirements.spec
index 10e69ef..40c71ae 100644
--- a/perl-CPAN-Meta-Requirements.spec
+++ b/perl-CPAN-Meta-Requirements.spec
@@ -1,6 +1,6 @@
 Name:           perl-CPAN-Meta-Requirements
 Version:        2.140
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Set of version requirements for a CPAN dist
 License:        GPL+ or Artistic
 Group:          Development/Libraries
@@ -53,7 +53,7 @@ Requires:       perl(version) >= 0.88
 Conflicts:      perl-CPAN-Meta < 2.120921
 
 # Had a six-digit version in a previous life
-%global six_digit_version %(echo %{version} | perl -p -e 
's/(.*)/sprintf("%.6f", $1)/e')
+%global six_digit_version %(LC_ALL=C; printf '%.6f' '%{version}')
 
 # Provide the six-digit version of the module
 %if "%{version}" != "%{six_digit_version}"
@@ -95,6 +95,9 @@ make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
 %{_mandir}/man3/CPAN::Meta::Requirements.3*
 
 %changelog
+* Fri Jul 22 2016 Petr Pisar <ppi...@redhat.com> - 2.140-5
+- Do not use perl to compute Provides version
+
 * Wed May 18 2016 Jitka Plesnikova <jples...@redhat.com> - 2.140-4
 - Perl 5.24 re-rebuild of bootstrapped packages
 
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-CPAN-Meta-Requirements.git/commit/?h=master&id=882228aaf5412ce0903f4405e61bf6eecbf8d7f4
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to