diff --git a/cpanspec-1.78-Escape-slashes-in-filters.patch b/cpanspec-1.78-Escape-slashes-in-filters.patch new file mode 100644 index 0000000..b31b0d4 --- /dev/null +++ b/cpanspec-1.78-Escape-slashes-in-filters.patch @@ -0,0 +1,41 @@ +From 1052ae3f560cfb31a540fbf3ab1fe5d3343094a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= +Date: Thu, 6 Nov 2014 16:51:47 +0100 +Subject: [PATCH] Escape slashes in filters +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Simply escape slashes in --filter-requires and --filter-provides +options, resolving a five year old bug [0]. + +[0] https://bugzilla.redhat.com/show_bug.cgi?id=544738 + +Signed-off-by: Petr Šabata +--- + cpanspec | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cpanspec b/cpanspec +index d972d1c..398e0de 100755 +--- a/cpanspec ++++ b/cpanspec +@@ -823,6 +823,7 @@ for my $file (@args) { + } + die "Failed to create $script: $!\n" if (!$sh); + ++ map { s/\//\\\//g } @filter_requires; + print $sh "#!/bin/sh\n\n" + . "\@\@PERL_REQ\@\@ \"\$\@\" | sed -e '/^$filter_requires[0]\$/d'"; + if (@filter_requires > 1) { +@@ -845,6 +846,7 @@ for my $file (@args) { + } + die "Failed to create $script: $!\n" if (!$sh); + ++ map { s/\//\\\//g } @filter_provides; + print $sh "#!/bin/sh\n\n" + . "\@\@PERL_PROV\@\@ \"\$\@\" | sed -e '/^$filter_provides[0]\$/d'"; + if (@filter_provides > 1) { +-- +1.9.3 + diff --git a/cpanspec.spec b/cpanspec.spec index 12fd746..9f865a4 100644 --- a/cpanspec.spec +++ b/cpanspec.spec @@ -1,6 +1,6 @@ Name: cpanspec Version: 1.78 -Release: 18%{?dist} +Release: 19%{?dist} Summary: RPM spec file generation utility License: GPL+ or Artistic Group: Development/Tools @@ -8,6 +8,7 @@ URL: http://cpanspec.sourceforge.net/ Source0: http://sourceforge.net/downloads/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz Patch0: %{name}-1.78-Change-optimize-to-optflags.patch Patch1: %{name}-1.78-Strip-any-version-comparison-operator-from-the-perl-BR.patch +Patch2: %{name}-1.78-Escape-slashes-in-filters.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Module::Build) @@ -28,6 +29,7 @@ contained in the spec file is correct. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %{__perl} Build.PL installdirs=vendor @@ -35,12 +37,9 @@ contained in the spec file is correct. %install rm -rf $RPM_BUILD_ROOT - ./Build install destdir=$RPM_BUILD_ROOT - find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; - %{_fixperms} $RPM_BUILD_ROOT/* # No tests. @@ -57,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/* %changelog +* Mon Dec 01 2014 Petr Šabata - 1.78-19 +- Escape slashes in filters (#544738) + * Thu Nov 06 2014 Petr Šabata - 1.78-18 - Use %%{optflags} instead of %%{optimize} (#739461, b0bdaf23) - Strip META perl version BR (#708377, c4069558)