From ed602f409fe256f85cdfd90645bf9a60fdea929f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Wed, 12 Jul 2017 11:13:49 +0200
Subject: Fix t/eu_command.t test

---
 ...Correct-the-order-of-tests-of-chmod-.-294.patch | 53 ++++++++++++++++++++++
 perl-ExtUtils-MakeMaker.spec                       |  8 +++-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 
ExtUtils-MakeMaker-7.25_01-Correct-the-order-of-tests-of-chmod-.-294.patch

diff --git 
a/ExtUtils-MakeMaker-7.25_01-Correct-the-order-of-tests-of-chmod-.-294.patch 
b/ExtUtils-MakeMaker-7.25_01-Correct-the-order-of-tests-of-chmod-.-294.patch
new file mode 100644
index 0000000..f0c365d
--- /dev/null
+++ b/ExtUtils-MakeMaker-7.25_01-Correct-the-order-of-tests-of-chmod-.-294.patch
@@ -0,0 +1,53 @@
+From 58fa199a752913dfb0455ac1397e897afcc1f9b4 Mon Sep 17 00:00:00 2001
+From: James E Keenan <[email protected]>
+Date: Thu, 11 May 2017 04:23:40 -0400
+Subject: [PATCH] Correct the order of tests of chmod(). (#294)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Per code review by haarg, the order of tests was wrong in the first place.
+Hence, correctly re-ordering them is a better repair than changing one test's
+description.
+
+For: https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/294
+Signed-off-by: Petr Písař <[email protected]>
+---
+ t/eu_command.t | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/t/eu_command.t b/t/eu_command.t
+index 269aa5c..32a6f59 100644
+--- a/t/eu_command.t
++++ b/t/eu_command.t
+@@ -151,20 +151,21 @@ BEGIN {
+         is( ((stat('testdir'))[2] & 07777) & 0700,
+             0100, 'change a dir to execute-only' );
+ 
+-        # change a dir to read-only
+-        @ARGV = ( '0400', 'testdir' );
++        # change a dir to write-only
++        @ARGV = ( '0200', 'testdir' );
+         ExtUtils::Command::chmod();
+ 
+         is( ((stat('testdir'))[2] & 07777) & 0700,
+-            0400, 'change a dir to read-only' );
++            0200, 'change a dir to write-only' );
+ 
+-        # change a dir to write-only
+-        @ARGV = ( '0200', 'testdir' );
++        # change a dir to read-only
++        @ARGV = ( '0400', 'testdir' );
+         ExtUtils::Command::chmod();
+ 
+         is( ((stat('testdir'))[2] & 07777) & 0700,
+-            0200, 'change a dir to write-only' );
++            0400, 'change a dir to read-only' );
+ 
++        # remove the dir we've been playing with
+         @ARGV = ('testdir');
+         rm_rf;
+         ok( ! -e 'testdir', 'rm_rf can delete a read-only dir' );
+-- 
+2.9.4
+
diff --git a/perl-ExtUtils-MakeMaker.spec b/perl-ExtUtils-MakeMaker.spec
index eada55d..73ae308 100644
--- a/perl-ExtUtils-MakeMaker.spec
+++ b/perl-ExtUtils-MakeMaker.spec
@@ -3,7 +3,7 @@
 
 Name:           perl-%{cpan_name}
 Version:        %(echo '%{cpan_version}' | tr _ .)
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Create a module Makefile
 License:        GPL+ or Artistic
 Group:          Development/Libraries
@@ -22,6 +22,8 @@ Patch3:         %{cpan_name}-7.00-Unbundle-Encode-Locale.patch
 Patch4:         
%{cpan_name}-7.11-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch
 # Avoid loading optional modules from default ., CVE-2016-1238
 Patch5:         
%{cpan_name}-7.22-CVE-2016-1238-avoid-loading-optional-modules-from.patch
+# Fix t/eu_command.t test, in upstream 2.25_02
+Patch6:         
%{cpan_name}-7.25_01-Correct-the-order-of-tests-of-chmod-.-294.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -156,6 +158,7 @@ is an overkill for small subroutines.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 # Remove bundled modules
 rm -rf bundled
 sed -i -e '/^bundled\// d' MANIFEST
@@ -202,6 +205,9 @@ make test
 %{_mandir}/man3/ExtUtils::MM::Utils.*
 
 %changelog
+* Wed Jul 12 2017 Petr Pisar <[email protected]> - 7.10-6
+- Fix t/eu_command.t test
+
 * Tue Aug 09 2016 Jitka Plesnikova <[email protected]> - 7.10-5
 - Avoid loading optional modules from default . (CVE-2016-1238)
 
-- 
cgit v1.1


        
https://src.fedoraproject.org/cgit/perl-ExtUtils-MakeMaker.git/commit/?h=f24&id=ed602f409fe256f85cdfd90645bf9a60fdea929f
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to