ppisar pushed to perl-Crypt-OpenSSL-EC (f24). "1.3 bump"
by notifications@fedoraproject.org
From f457e06a3b1373f246723d2132187dc634ee002c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 15:31:35 +0200
Subject: 1.3 bump
---
.gitignore | 1 +
...field-tests-if-OpenSSL-does-not-suppport-.patch | 74 ----------------------
perl-Crypt-OpenSSL-EC.spec | 25 ++++----
sources | 2 +-
4 files changed, 14 insertions(+), 88 deletions(-)
delete mode 100644 Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
diff --git a/.gitignore b/.gitignore
index 6131d4a..09ad74c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/Crypt-OpenSSL-EC-1.01.tar.gz
+/Crypt-OpenSSL-EC-1.3.tar.gz
diff --git a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch b/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
deleted file mode 100644
index d18955f..0000000
--- a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 89a1e4be8bccf793478fc07aac7003121de73dc3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
-Date: Mon, 27 Apr 2015 16:01:52 +0200
-Subject: [PATCH] Skip prime-field tests if OpenSSL does not suppport EC2M
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-prime-field.t exhibits many function calls with arguments that are not
-support by OpenSSL if it was built without EC2M support.
-
-It's easier to skip all the tests instead of skipping almost all of
-them. This patch does that if <openssl/opensslconf.h> defines
-OPENSSL_NO_EC2M.
-
-Signed-off-by: Petr Písař <ppisar(a)redhat.com>
-
-diff --git a/Makefile.PL b/Makefile.PL
-index edacc74..4290278 100644
---- a/Makefile.PL
-+++ b/Makefile.PL
-@@ -10,6 +10,9 @@ WriteMakefile(
- NAME => 'Crypt::OpenSSL::EC',
- VERSION_FROM => 'lib/Crypt/OpenSSL/EC.pm',
- PREREQ_PM => { 'Crypt::OpenSSL::Bignum' => 0.04,
-+ 'ExtUtils::CBuilder' => 0,
-+ 'File::Spec' => 0,
-+ 'File::Temp' => 0,
- },
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'lib/Crypt/OpenSSL/EC.pm', # retrieve abstract from module
-diff --git a/t/prime-field.t b/t/prime-field.t
-index 0a9a2d9..033c0bf 100644
---- a/t/prime-field.t
-+++ b/t/prime-field.t
-@@ -7,7 +7,34 @@ use Crypt::OpenSSL::Bignum::CTX;
-
- BEGIN { use_ok('Crypt::OpenSSL::EC') };
-
--&prime_field_tests();
-+
-+# Check OpenSSL supports EC2M
-+my $no_ec2m = 1;
-+{
-+ use File::Spec;
-+ use File::Temp;
-+ use ExtUtils::CBuilder;
-+ my $dir = File::Temp::tempdir(CLEANUP => 1);
-+ my $file = File::Spec->catfile($dir, 'test.c');
-+ open my $fh, '>', $file or die;
-+ print $fh <<TEST;
-+#include <openssl/opensslconf.h>
-+#ifdef OPENSSL_NO_EC2M
-+#error EC2M disabled
-+#endif
-+TEST
-+ close $fh or die;
-+ my $object;
-+ eval { $object = ExtUtils::CBuilder->new->compile(source => $file) };
-+ if (defined $object) {
-+ $no_ec2m = 0;
-+ }
-+}
-+
-+SKIP: {
-+ skip('OpenSSL does not support EC2M', 262) if $no_ec2m;
-+ &prime_field_tests();
-+};
-
- sub prime_field_tests()
- {
---
-2.1.0
-
diff --git a/perl-Crypt-OpenSSL-EC.spec b/perl-Crypt-OpenSSL-EC.spec
index 8160408..691374b 100644
--- a/perl-Crypt-OpenSSL-EC.spec
+++ b/perl-Crypt-OpenSSL-EC.spec
@@ -1,20 +1,20 @@
Name: perl-Crypt-OpenSSL-EC
-Version: 1.01
-Release: 4%{?dist}
+Version: 1.3
+Release: 1%{?dist}
Summary: Perl extension for OpenSSL EC (Elliptic Curves) library
License: GPL+ or Artistic
-Group: Development/Libraries
URL: http://search.cpan.org/dist/Crypt-OpenSSL-EC/
Source0: http://www.cpan.org/authors/id/M/MI/MIKEM/Crypt-OpenSSL-EC-%{version}.tar.gz
-# Skip tests exercising disabled EC2M OpenSSL feature, CPAN RT#104000
-Patch0: Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+BuildRequires: findutils
+BuildRequires: gcc
+BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: perl
BuildRequires: perl-devel
BuildRequires: perl-generators
-# Use ExtUtils::Constant to regenerated XS code
+# Use ExtUtils::Constant to regenerate XS code
BuildRequires: perl(ExtUtils::Constant)
-BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
# Run-time:
@@ -27,8 +27,6 @@ BuildRequires: perl(XSLoader)
# Tests:
BuildRequires: perl(Crypt::OpenSSL::Bignum) >= 0.04
BuildRequires: perl(Crypt::OpenSSL::Bignum::CTX)
-BuildRequires: perl(ExtUtils::CBuilder)
-BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@@ -38,16 +36,14 @@ OpenSSL Elliptic Curve library. Some object-oriented calls are supported.
%prep
%setup -q -n Crypt-OpenSSL-EC-%{version}
-%patch0 -p1
%build
-perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@@ -60,6 +56,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 1.3-1
+- 1.3 bump
+
* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.01-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
diff --git a/sources b/sources
index 51c8a3e..bb3efd7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-742f192f26bcac2249017cdd9e8bac35 Crypt-OpenSSL-EC-1.01.tar.gz
+SHA512 (Crypt-OpenSSL-EC-1.3.tar.gz) = 39f879248a95858199d578dfdac03f88dbcf2cd70ac0e7619f0b25587078c2def7cfe2a080b135850bdb516e38edf22ce2d795cb7711d0fdce0b3d9ef2f8a9bc
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Crypt-OpenSSL-EC.git/commit/?h=f2...
6 years, 11 months
ppisar pushed to perl-Crypt-OpenSSL-EC (f25). "1.3 bump"
by notifications@fedoraproject.org
From 3d7a5996906ab7be77802ab661cd647d0bdc2c5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 15:31:35 +0200
Subject: 1.3 bump
---
.gitignore | 1 +
...field-tests-if-OpenSSL-does-not-suppport-.patch | 74 ----------------------
perl-Crypt-OpenSSL-EC.spec | 25 ++++----
sources | 2 +-
4 files changed, 14 insertions(+), 88 deletions(-)
delete mode 100644 Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
diff --git a/.gitignore b/.gitignore
index 6131d4a..09ad74c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/Crypt-OpenSSL-EC-1.01.tar.gz
+/Crypt-OpenSSL-EC-1.3.tar.gz
diff --git a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch b/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
deleted file mode 100644
index d18955f..0000000
--- a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 89a1e4be8bccf793478fc07aac7003121de73dc3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
-Date: Mon, 27 Apr 2015 16:01:52 +0200
-Subject: [PATCH] Skip prime-field tests if OpenSSL does not suppport EC2M
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-prime-field.t exhibits many function calls with arguments that are not
-support by OpenSSL if it was built without EC2M support.
-
-It's easier to skip all the tests instead of skipping almost all of
-them. This patch does that if <openssl/opensslconf.h> defines
-OPENSSL_NO_EC2M.
-
-Signed-off-by: Petr Písař <ppisar(a)redhat.com>
-
-diff --git a/Makefile.PL b/Makefile.PL
-index edacc74..4290278 100644
---- a/Makefile.PL
-+++ b/Makefile.PL
-@@ -10,6 +10,9 @@ WriteMakefile(
- NAME => 'Crypt::OpenSSL::EC',
- VERSION_FROM => 'lib/Crypt/OpenSSL/EC.pm',
- PREREQ_PM => { 'Crypt::OpenSSL::Bignum' => 0.04,
-+ 'ExtUtils::CBuilder' => 0,
-+ 'File::Spec' => 0,
-+ 'File::Temp' => 0,
- },
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'lib/Crypt/OpenSSL/EC.pm', # retrieve abstract from module
-diff --git a/t/prime-field.t b/t/prime-field.t
-index 0a9a2d9..033c0bf 100644
---- a/t/prime-field.t
-+++ b/t/prime-field.t
-@@ -7,7 +7,34 @@ use Crypt::OpenSSL::Bignum::CTX;
-
- BEGIN { use_ok('Crypt::OpenSSL::EC') };
-
--&prime_field_tests();
-+
-+# Check OpenSSL supports EC2M
-+my $no_ec2m = 1;
-+{
-+ use File::Spec;
-+ use File::Temp;
-+ use ExtUtils::CBuilder;
-+ my $dir = File::Temp::tempdir(CLEANUP => 1);
-+ my $file = File::Spec->catfile($dir, 'test.c');
-+ open my $fh, '>', $file or die;
-+ print $fh <<TEST;
-+#include <openssl/opensslconf.h>
-+#ifdef OPENSSL_NO_EC2M
-+#error EC2M disabled
-+#endif
-+TEST
-+ close $fh or die;
-+ my $object;
-+ eval { $object = ExtUtils::CBuilder->new->compile(source => $file) };
-+ if (defined $object) {
-+ $no_ec2m = 0;
-+ }
-+}
-+
-+SKIP: {
-+ skip('OpenSSL does not support EC2M', 262) if $no_ec2m;
-+ &prime_field_tests();
-+};
-
- sub prime_field_tests()
- {
---
-2.1.0
-
diff --git a/perl-Crypt-OpenSSL-EC.spec b/perl-Crypt-OpenSSL-EC.spec
index c904df8..fb11974 100644
--- a/perl-Crypt-OpenSSL-EC.spec
+++ b/perl-Crypt-OpenSSL-EC.spec
@@ -1,20 +1,20 @@
Name: perl-Crypt-OpenSSL-EC
-Version: 1.01
-Release: 5%{?dist}
+Version: 1.3
+Release: 1%{?dist}
Summary: Perl extension for OpenSSL EC (Elliptic Curves) library
License: GPL+ or Artistic
-Group: Development/Libraries
URL: http://search.cpan.org/dist/Crypt-OpenSSL-EC/
Source0: http://www.cpan.org/authors/id/M/MI/MIKEM/Crypt-OpenSSL-EC-%{version}.tar.gz
-# Skip tests exercising disabled EC2M OpenSSL feature, CPAN RT#104000
-Patch0: Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+BuildRequires: findutils
+BuildRequires: gcc
+BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: perl
BuildRequires: perl-devel
BuildRequires: perl-generators
-# Use ExtUtils::Constant to regenerated XS code
+# Use ExtUtils::Constant to regenerate XS code
BuildRequires: perl(ExtUtils::Constant)
-BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
# Run-time:
@@ -27,8 +27,6 @@ BuildRequires: perl(XSLoader)
# Tests:
BuildRequires: perl(Crypt::OpenSSL::Bignum) >= 0.04
BuildRequires: perl(Crypt::OpenSSL::Bignum::CTX)
-BuildRequires: perl(ExtUtils::CBuilder)
-BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@@ -38,16 +36,14 @@ OpenSSL Elliptic Curve library. Some object-oriented calls are supported.
%prep
%setup -q -n Crypt-OpenSSL-EC-%{version}
-%patch0 -p1
%build
-perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@@ -60,6 +56,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 1.3-1
+- 1.3 bump
+
* Sun May 15 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 1.01-5
- Perl 5.24 rebuild
diff --git a/sources b/sources
index 51c8a3e..bb3efd7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-742f192f26bcac2249017cdd9e8bac35 Crypt-OpenSSL-EC-1.01.tar.gz
+SHA512 (Crypt-OpenSSL-EC-1.3.tar.gz) = 39f879248a95858199d578dfdac03f88dbcf2cd70ac0e7619f0b25587078c2def7cfe2a080b135850bdb516e38edf22ce2d795cb7711d0fdce0b3d9ef2f8a9bc
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Crypt-OpenSSL-EC.git/commit/?h=f2...
6 years, 11 months
ppisar pushed to perl-Crypt-OpenSSL-EC (f26). "1.3 bump"
by notifications@fedoraproject.org
From 91a765a4930109af7d30aafb2767deee9e04c796 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 15:31:35 +0200
Subject: 1.3 bump
---
.gitignore | 1 +
...field-tests-if-OpenSSL-does-not-suppport-.patch | 74 ----------------------
perl-Crypt-OpenSSL-EC.spec | 25 ++++----
sources | 2 +-
4 files changed, 14 insertions(+), 88 deletions(-)
delete mode 100644 Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
diff --git a/.gitignore b/.gitignore
index 6131d4a..09ad74c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/Crypt-OpenSSL-EC-1.01.tar.gz
+/Crypt-OpenSSL-EC-1.3.tar.gz
diff --git a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch b/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
deleted file mode 100644
index d18955f..0000000
--- a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 89a1e4be8bccf793478fc07aac7003121de73dc3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
-Date: Mon, 27 Apr 2015 16:01:52 +0200
-Subject: [PATCH] Skip prime-field tests if OpenSSL does not suppport EC2M
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-prime-field.t exhibits many function calls with arguments that are not
-support by OpenSSL if it was built without EC2M support.
-
-It's easier to skip all the tests instead of skipping almost all of
-them. This patch does that if <openssl/opensslconf.h> defines
-OPENSSL_NO_EC2M.
-
-Signed-off-by: Petr Písař <ppisar(a)redhat.com>
-
-diff --git a/Makefile.PL b/Makefile.PL
-index edacc74..4290278 100644
---- a/Makefile.PL
-+++ b/Makefile.PL
-@@ -10,6 +10,9 @@ WriteMakefile(
- NAME => 'Crypt::OpenSSL::EC',
- VERSION_FROM => 'lib/Crypt/OpenSSL/EC.pm',
- PREREQ_PM => { 'Crypt::OpenSSL::Bignum' => 0.04,
-+ 'ExtUtils::CBuilder' => 0,
-+ 'File::Spec' => 0,
-+ 'File::Temp' => 0,
- },
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'lib/Crypt/OpenSSL/EC.pm', # retrieve abstract from module
-diff --git a/t/prime-field.t b/t/prime-field.t
-index 0a9a2d9..033c0bf 100644
---- a/t/prime-field.t
-+++ b/t/prime-field.t
-@@ -7,7 +7,34 @@ use Crypt::OpenSSL::Bignum::CTX;
-
- BEGIN { use_ok('Crypt::OpenSSL::EC') };
-
--&prime_field_tests();
-+
-+# Check OpenSSL supports EC2M
-+my $no_ec2m = 1;
-+{
-+ use File::Spec;
-+ use File::Temp;
-+ use ExtUtils::CBuilder;
-+ my $dir = File::Temp::tempdir(CLEANUP => 1);
-+ my $file = File::Spec->catfile($dir, 'test.c');
-+ open my $fh, '>', $file or die;
-+ print $fh <<TEST;
-+#include <openssl/opensslconf.h>
-+#ifdef OPENSSL_NO_EC2M
-+#error EC2M disabled
-+#endif
-+TEST
-+ close $fh or die;
-+ my $object;
-+ eval { $object = ExtUtils::CBuilder->new->compile(source => $file) };
-+ if (defined $object) {
-+ $no_ec2m = 0;
-+ }
-+}
-+
-+SKIP: {
-+ skip('OpenSSL does not support EC2M', 262) if $no_ec2m;
-+ &prime_field_tests();
-+};
-
- sub prime_field_tests()
- {
---
-2.1.0
-
diff --git a/perl-Crypt-OpenSSL-EC.spec b/perl-Crypt-OpenSSL-EC.spec
index bd96665..2d42db2 100644
--- a/perl-Crypt-OpenSSL-EC.spec
+++ b/perl-Crypt-OpenSSL-EC.spec
@@ -1,20 +1,20 @@
Name: perl-Crypt-OpenSSL-EC
-Version: 1.01
-Release: 7%{?dist}
+Version: 1.3
+Release: 1%{?dist}
Summary: Perl extension for OpenSSL EC (Elliptic Curves) library
License: GPL+ or Artistic
-Group: Development/Libraries
URL: http://search.cpan.org/dist/Crypt-OpenSSL-EC/
Source0: http://www.cpan.org/authors/id/M/MI/MIKEM/Crypt-OpenSSL-EC-%{version}.tar.gz
-# Skip tests exercising disabled EC2M OpenSSL feature, CPAN RT#104000
-Patch0: Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+BuildRequires: findutils
+BuildRequires: gcc
+BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: perl
BuildRequires: perl-devel
BuildRequires: perl-generators
-# Use ExtUtils::Constant to regenerated XS code
+# Use ExtUtils::Constant to regenerate XS code
BuildRequires: perl(ExtUtils::Constant)
-BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
# Run-time:
@@ -27,8 +27,6 @@ BuildRequires: perl(XSLoader)
# Tests:
BuildRequires: perl(Crypt::OpenSSL::Bignum) >= 0.04
BuildRequires: perl(Crypt::OpenSSL::Bignum::CTX)
-BuildRequires: perl(ExtUtils::CBuilder)
-BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@@ -38,16 +36,14 @@ OpenSSL Elliptic Curve library. Some object-oriented calls are supported.
%prep
%setup -q -n Crypt-OpenSSL-EC-%{version}
-%patch0 -p1
%build
-perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@@ -60,6 +56,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 1.3-1
+- 1.3 bump
+
* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.01-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
diff --git a/sources b/sources
index 51c8a3e..bb3efd7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-742f192f26bcac2249017cdd9e8bac35 Crypt-OpenSSL-EC-1.01.tar.gz
+SHA512 (Crypt-OpenSSL-EC-1.3.tar.gz) = 39f879248a95858199d578dfdac03f88dbcf2cd70ac0e7619f0b25587078c2def7cfe2a080b135850bdb516e38edf22ce2d795cb7711d0fdce0b3d9ef2f8a9bc
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Crypt-OpenSSL-EC.git/commit/?h=f2...
6 years, 11 months
ppisar pushed to perl-Crypt-OpenSSL-EC (master). "1.3 bump"
by notifications@fedoraproject.org
From 91a765a4930109af7d30aafb2767deee9e04c796 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 15:31:35 +0200
Subject: 1.3 bump
---
.gitignore | 1 +
...field-tests-if-OpenSSL-does-not-suppport-.patch | 74 ----------------------
perl-Crypt-OpenSSL-EC.spec | 25 ++++----
sources | 2 +-
4 files changed, 14 insertions(+), 88 deletions(-)
delete mode 100644 Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
diff --git a/.gitignore b/.gitignore
index 6131d4a..09ad74c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/Crypt-OpenSSL-EC-1.01.tar.gz
+/Crypt-OpenSSL-EC-1.3.tar.gz
diff --git a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch b/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
deleted file mode 100644
index d18955f..0000000
--- a/Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 89a1e4be8bccf793478fc07aac7003121de73dc3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
-Date: Mon, 27 Apr 2015 16:01:52 +0200
-Subject: [PATCH] Skip prime-field tests if OpenSSL does not suppport EC2M
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-prime-field.t exhibits many function calls with arguments that are not
-support by OpenSSL if it was built without EC2M support.
-
-It's easier to skip all the tests instead of skipping almost all of
-them. This patch does that if <openssl/opensslconf.h> defines
-OPENSSL_NO_EC2M.
-
-Signed-off-by: Petr Písař <ppisar(a)redhat.com>
-
-diff --git a/Makefile.PL b/Makefile.PL
-index edacc74..4290278 100644
---- a/Makefile.PL
-+++ b/Makefile.PL
-@@ -10,6 +10,9 @@ WriteMakefile(
- NAME => 'Crypt::OpenSSL::EC',
- VERSION_FROM => 'lib/Crypt/OpenSSL/EC.pm',
- PREREQ_PM => { 'Crypt::OpenSSL::Bignum' => 0.04,
-+ 'ExtUtils::CBuilder' => 0,
-+ 'File::Spec' => 0,
-+ 'File::Temp' => 0,
- },
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'lib/Crypt/OpenSSL/EC.pm', # retrieve abstract from module
-diff --git a/t/prime-field.t b/t/prime-field.t
-index 0a9a2d9..033c0bf 100644
---- a/t/prime-field.t
-+++ b/t/prime-field.t
-@@ -7,7 +7,34 @@ use Crypt::OpenSSL::Bignum::CTX;
-
- BEGIN { use_ok('Crypt::OpenSSL::EC') };
-
--&prime_field_tests();
-+
-+# Check OpenSSL supports EC2M
-+my $no_ec2m = 1;
-+{
-+ use File::Spec;
-+ use File::Temp;
-+ use ExtUtils::CBuilder;
-+ my $dir = File::Temp::tempdir(CLEANUP => 1);
-+ my $file = File::Spec->catfile($dir, 'test.c');
-+ open my $fh, '>', $file or die;
-+ print $fh <<TEST;
-+#include <openssl/opensslconf.h>
-+#ifdef OPENSSL_NO_EC2M
-+#error EC2M disabled
-+#endif
-+TEST
-+ close $fh or die;
-+ my $object;
-+ eval { $object = ExtUtils::CBuilder->new->compile(source => $file) };
-+ if (defined $object) {
-+ $no_ec2m = 0;
-+ }
-+}
-+
-+SKIP: {
-+ skip('OpenSSL does not support EC2M', 262) if $no_ec2m;
-+ &prime_field_tests();
-+};
-
- sub prime_field_tests()
- {
---
-2.1.0
-
diff --git a/perl-Crypt-OpenSSL-EC.spec b/perl-Crypt-OpenSSL-EC.spec
index bd96665..2d42db2 100644
--- a/perl-Crypt-OpenSSL-EC.spec
+++ b/perl-Crypt-OpenSSL-EC.spec
@@ -1,20 +1,20 @@
Name: perl-Crypt-OpenSSL-EC
-Version: 1.01
-Release: 7%{?dist}
+Version: 1.3
+Release: 1%{?dist}
Summary: Perl extension for OpenSSL EC (Elliptic Curves) library
License: GPL+ or Artistic
-Group: Development/Libraries
URL: http://search.cpan.org/dist/Crypt-OpenSSL-EC/
Source0: http://www.cpan.org/authors/id/M/MI/MIKEM/Crypt-OpenSSL-EC-%{version}.tar.gz
-# Skip tests exercising disabled EC2M OpenSSL feature, CPAN RT#104000
-Patch0: Crypt-OpenSSL-EC-1.01-Skip-prime-field-tests-if-OpenSSL-does-not-suppport-.patch
+BuildRequires: findutils
+BuildRequires: gcc
+BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: perl
BuildRequires: perl-devel
BuildRequires: perl-generators
-# Use ExtUtils::Constant to regenerated XS code
+# Use ExtUtils::Constant to regenerate XS code
BuildRequires: perl(ExtUtils::Constant)
-BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
# Run-time:
@@ -27,8 +27,6 @@ BuildRequires: perl(XSLoader)
# Tests:
BuildRequires: perl(Crypt::OpenSSL::Bignum) >= 0.04
BuildRequires: perl(Crypt::OpenSSL::Bignum::CTX)
-BuildRequires: perl(ExtUtils::CBuilder)
-BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@@ -38,16 +36,14 @@ OpenSSL Elliptic Curve library. Some object-oriented calls are supported.
%prep
%setup -q -n Crypt-OpenSSL-EC-%{version}
-%patch0 -p1
%build
-perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@@ -60,6 +56,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 1.3-1
+- 1.3 bump
+
* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.01-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
diff --git a/sources b/sources
index 51c8a3e..bb3efd7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-742f192f26bcac2249017cdd9e8bac35 Crypt-OpenSSL-EC-1.01.tar.gz
+SHA512 (Crypt-OpenSSL-EC-1.3.tar.gz) = 39f879248a95858199d578dfdac03f88dbcf2cd70ac0e7619f0b25587078c2def7cfe2a080b135850bdb516e38edf22ce2d795cb7711d0fdce0b3d9ef2f8a9bc
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Crypt-OpenSSL-EC.git/commit/?h=ma...
6 years, 11 months
ppisar pushed to perl-File-Path (f24). "Fix CVE-2017-6512"
by notifications@fedoraproject.org
From b7836afa8c76b4bd99561d2f36f2f83d8f2163df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 14:34:26 +0200
Subject: Fix CVE-2017-6512
---
...-2.12-Prevent-directory-chmod-race-attack.patch | 165 +++++++++++++++++++++
perl-File-Path.spec | 10 +-
2 files changed, 174 insertions(+), 1 deletion(-)
create mode 100644 File-Path-2.12-Prevent-directory-chmod-race-attack.patch
diff --git a/File-Path-2.12-Prevent-directory-chmod-race-attack.patch b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
new file mode 100644
index 0000000..a280818
--- /dev/null
+++ b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
@@ -0,0 +1,165 @@
+From e9cc25a6109e9191bcbf59a967ed6c60b0156f72 Mon Sep 17 00:00:00 2001
+From: John Lightsey <john(a)nixnuts.net>
+Date: Tue, 2 May 2017 12:03:52 -0500
+Subject: [PATCH] Prevent directory chmod race attack.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CVE-2017-6512 is a race condition attack where the chmod() of directories
+that cannot be entered is misused to change the permissions on other
+files or directories on the system. This has been corrected by limiting
+the directory-permission loosening logic to systems where fchmod() is
+supported.
+
+Petr Písař: Ported to 2.12.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ lib/File/Path.pm | 39 +++++++++++++++++++++++++--------------
+ t/Path.t | 40 ++++++++++++++++++++++++++--------------
+ 2 files changed, 51 insertions(+), 28 deletions(-)
+
+diff --git a/lib/File/Path.pm b/lib/File/Path.pm
+index 36f12cc..871f43a 100644
+--- a/lib/File/Path.pm
++++ b/lib/File/Path.pm
+@@ -354,21 +354,32 @@ sub _rmtree {
+
+ # see if we can escalate privileges to get in
+ # (e.g. funny protection mask such as -w- instead of rwx)
+- $perm &= oct '7777';
+- my $nperm = $perm | oct '700';
+- if (
+- !(
+- $arg->{safe}
+- or $nperm == $perm
+- or chmod( $nperm, $root )
+- )
+- )
+- {
+- _error( $arg,
+- "cannot make child directory read-write-exec", $canon );
+- next ROOT_DIR;
++ # This uses fchmod to avoid traversing outside of the proper
++ # location (CVE-2017-6512)
++ my $root_fh;
++ if (open($root_fh, '<', $root)) {
++ my ($fh_dev, $fh_inode) = (stat $root_fh )[0,1];
++ $perm &= oct '7777';
++ my $nperm = $perm | oct '700';
++ local $@;
++ if (
++ !(
++ $arg->{safe}
++ or $nperm == $perm
++ or !-d _
++ or $fh_dev ne $ldev
++ or $fh_inode ne $lino
++ or eval { chmod( $nperm, $root_fh ) }
++ )
++ )
++ {
++ _error( $arg,
++ "cannot make child directory read-write-exec", $canon );
++ next ROOT_DIR;
++ }
++ close $root_fh;
+ }
+- elsif ( !chdir($root) ) {
++ if ( !chdir($root) ) {
+ _error( $arg, "cannot chdir to child", $canon );
+ next ROOT_DIR;
+ }
+diff --git a/t/Path.t b/t/Path.t
+index 5644f57..fffc49c 100755
+--- a/t/Path.t
++++ b/t/Path.t
+@@ -3,7 +3,7 @@
+
+ use strict;
+
+-use Test::More tests => 127;
++use Test::More tests => 126;
+ use Config;
+ use Fcntl ':mode';
+ use lib 't/';
+@@ -17,6 +17,13 @@ BEGIN {
+
+ my $Is_VMS = $^O eq 'VMS';
+
++my $fchmod_supported = 0;
++if (open my $fh, curdir()) {
++ my ($perm) = (stat($fh))[2];
++ $perm &= 07777;
++ eval { $fchmod_supported = chmod( $perm, $fh); };
++}
++
+ # first check for stupid permissions second for full, so we clean up
+ # behind ourselves
+ for my $perm (0111,0777) {
+@@ -298,16 +305,19 @@ is($created[0], $dir, "created directory (old style 3 mode undef) cross-check");
+
+ is(rmtree($dir, 0, undef), 1, "removed directory 3 verbose undef");
+
+-$dir = catdir($tmp_base,'G');
+-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
++SKIP: {
++ skip "fchmod of directories not supported on this platform", 3 unless $fchmod_supported;
++ $dir = catdir($tmp_base,'G');
++ $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
+
+-@created = mkpath($dir, undef, 0200);
++ @created = mkpath($dir, undef, 0400);
+
+-is(scalar(@created), 1, "created write-only dir");
++ is(scalar(@created), 1, "created read-only dir");
+
+-is($created[0], $dir, "created write-only directory cross-check");
++ is($created[0], $dir, "created read-only directory cross-check");
+
+-is(rmtree($dir), 1, "removed write-only dir");
++ is(rmtree($dir), 1, "removed read-only dir");
++}
+
+ # borderline new-style heuristics
+ if (chdir $tmp_base) {
+@@ -449,26 +459,28 @@ SKIP: {
+ }
+
+ SKIP : {
+- my $skip_count = 19;
++ my $skip_count = 18;
+ # this test will fail on Windows, as per:
+ # http://perldoc.perl.org/perlport.html#chmod
+
+ skip "Windows chmod test skipped", $skip_count
+ if $^O eq 'MSWin32';
++ skip "fchmod() on directories is not supported on this platform", $skip_count
++ unless $fchmod_supported;
+ my $mode;
+ my $octal_mode;
+ my @inputs = (
+- 0777, 0700, 0070, 0007,
+- 0333, 0300, 0030, 0003,
+- 0111, 0100, 0010, 0001,
+- 0731, 0713, 0317, 0371, 0173, 0137,
+- 00 );
++ 0777, 0700, 0470, 0407,
++ 0433, 0400, 0430, 0403,
++ 0111, 0100, 0110, 0101,
++ 0731, 0713, 0317, 0371,
++ 0173, 0137);
+ my $input;
+ my $octal_input;
+- $dir = catdir($tmp_base, 'chmod_test');
+
+ foreach (@inputs) {
+ $input = $_;
++ $dir = catdir($tmp_base, sprintf("chmod_test%04o", $input));
+ # We can skip from here because 0 is last in the list.
+ skip "Mode of 0 means assume user defaults on VMS", 1
+ if ($input == 0 && $Is_VMS);
+--
+2.9.4
+
diff --git a/perl-File-Path.spec b/perl-File-Path.spec
index 19cfb31..fc09a44 100644
--- a/perl-File-Path.spec
+++ b/perl-File-Path.spec
@@ -1,11 +1,14 @@
Name: perl-File-Path
Version: 2.12
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Create or remove directory trees
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/File-Path/
Source0: http://www.cpan.org/authors/id/R/RI/RICHE/File-Path-%{version}.tar.gz
+# Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+# and remove_tree()), bug #1457834, CPAN RT#121951, in upstream 2.13
+Patch0: File-Path-2.12-Prevent-directory-chmod-race-attack.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
@@ -41,6 +44,7 @@ depth and to delete an entire directory subtree from the file system.
%prep
%setup -q -n File-Path-%{version}
+%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
@@ -60,6 +64,10 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 2.12-3
+- Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+ and remove_tree()) (bug #1457834)
+
* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-File-Path.git/commit/?h=f24&id=b7...
6 years, 11 months
ppisar pushed to perl-File-Path (f25). "Fix CVE-2017-6512"
by notifications@fedoraproject.org
From 8ef6b073beb72e2e7c1ff97429a4c8a8f5129bb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 14:34:26 +0200
Subject: Fix CVE-2017-6512
---
...-2.12-Prevent-directory-chmod-race-attack.patch | 165 +++++++++++++++++++++
perl-File-Path.spec | 10 +-
2 files changed, 174 insertions(+), 1 deletion(-)
create mode 100644 File-Path-2.12-Prevent-directory-chmod-race-attack.patch
diff --git a/File-Path-2.12-Prevent-directory-chmod-race-attack.patch b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
new file mode 100644
index 0000000..a280818
--- /dev/null
+++ b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
@@ -0,0 +1,165 @@
+From e9cc25a6109e9191bcbf59a967ed6c60b0156f72 Mon Sep 17 00:00:00 2001
+From: John Lightsey <john(a)nixnuts.net>
+Date: Tue, 2 May 2017 12:03:52 -0500
+Subject: [PATCH] Prevent directory chmod race attack.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CVE-2017-6512 is a race condition attack where the chmod() of directories
+that cannot be entered is misused to change the permissions on other
+files or directories on the system. This has been corrected by limiting
+the directory-permission loosening logic to systems where fchmod() is
+supported.
+
+Petr Písař: Ported to 2.12.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ lib/File/Path.pm | 39 +++++++++++++++++++++++++--------------
+ t/Path.t | 40 ++++++++++++++++++++++++++--------------
+ 2 files changed, 51 insertions(+), 28 deletions(-)
+
+diff --git a/lib/File/Path.pm b/lib/File/Path.pm
+index 36f12cc..871f43a 100644
+--- a/lib/File/Path.pm
++++ b/lib/File/Path.pm
+@@ -354,21 +354,32 @@ sub _rmtree {
+
+ # see if we can escalate privileges to get in
+ # (e.g. funny protection mask such as -w- instead of rwx)
+- $perm &= oct '7777';
+- my $nperm = $perm | oct '700';
+- if (
+- !(
+- $arg->{safe}
+- or $nperm == $perm
+- or chmod( $nperm, $root )
+- )
+- )
+- {
+- _error( $arg,
+- "cannot make child directory read-write-exec", $canon );
+- next ROOT_DIR;
++ # This uses fchmod to avoid traversing outside of the proper
++ # location (CVE-2017-6512)
++ my $root_fh;
++ if (open($root_fh, '<', $root)) {
++ my ($fh_dev, $fh_inode) = (stat $root_fh )[0,1];
++ $perm &= oct '7777';
++ my $nperm = $perm | oct '700';
++ local $@;
++ if (
++ !(
++ $arg->{safe}
++ or $nperm == $perm
++ or !-d _
++ or $fh_dev ne $ldev
++ or $fh_inode ne $lino
++ or eval { chmod( $nperm, $root_fh ) }
++ )
++ )
++ {
++ _error( $arg,
++ "cannot make child directory read-write-exec", $canon );
++ next ROOT_DIR;
++ }
++ close $root_fh;
+ }
+- elsif ( !chdir($root) ) {
++ if ( !chdir($root) ) {
+ _error( $arg, "cannot chdir to child", $canon );
+ next ROOT_DIR;
+ }
+diff --git a/t/Path.t b/t/Path.t
+index 5644f57..fffc49c 100755
+--- a/t/Path.t
++++ b/t/Path.t
+@@ -3,7 +3,7 @@
+
+ use strict;
+
+-use Test::More tests => 127;
++use Test::More tests => 126;
+ use Config;
+ use Fcntl ':mode';
+ use lib 't/';
+@@ -17,6 +17,13 @@ BEGIN {
+
+ my $Is_VMS = $^O eq 'VMS';
+
++my $fchmod_supported = 0;
++if (open my $fh, curdir()) {
++ my ($perm) = (stat($fh))[2];
++ $perm &= 07777;
++ eval { $fchmod_supported = chmod( $perm, $fh); };
++}
++
+ # first check for stupid permissions second for full, so we clean up
+ # behind ourselves
+ for my $perm (0111,0777) {
+@@ -298,16 +305,19 @@ is($created[0], $dir, "created directory (old style 3 mode undef) cross-check");
+
+ is(rmtree($dir, 0, undef), 1, "removed directory 3 verbose undef");
+
+-$dir = catdir($tmp_base,'G');
+-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
++SKIP: {
++ skip "fchmod of directories not supported on this platform", 3 unless $fchmod_supported;
++ $dir = catdir($tmp_base,'G');
++ $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
+
+-@created = mkpath($dir, undef, 0200);
++ @created = mkpath($dir, undef, 0400);
+
+-is(scalar(@created), 1, "created write-only dir");
++ is(scalar(@created), 1, "created read-only dir");
+
+-is($created[0], $dir, "created write-only directory cross-check");
++ is($created[0], $dir, "created read-only directory cross-check");
+
+-is(rmtree($dir), 1, "removed write-only dir");
++ is(rmtree($dir), 1, "removed read-only dir");
++}
+
+ # borderline new-style heuristics
+ if (chdir $tmp_base) {
+@@ -449,26 +459,28 @@ SKIP: {
+ }
+
+ SKIP : {
+- my $skip_count = 19;
++ my $skip_count = 18;
+ # this test will fail on Windows, as per:
+ # http://perldoc.perl.org/perlport.html#chmod
+
+ skip "Windows chmod test skipped", $skip_count
+ if $^O eq 'MSWin32';
++ skip "fchmod() on directories is not supported on this platform", $skip_count
++ unless $fchmod_supported;
+ my $mode;
+ my $octal_mode;
+ my @inputs = (
+- 0777, 0700, 0070, 0007,
+- 0333, 0300, 0030, 0003,
+- 0111, 0100, 0010, 0001,
+- 0731, 0713, 0317, 0371, 0173, 0137,
+- 00 );
++ 0777, 0700, 0470, 0407,
++ 0433, 0400, 0430, 0403,
++ 0111, 0100, 0110, 0101,
++ 0731, 0713, 0317, 0371,
++ 0173, 0137);
+ my $input;
+ my $octal_input;
+- $dir = catdir($tmp_base, 'chmod_test');
+
+ foreach (@inputs) {
+ $input = $_;
++ $dir = catdir($tmp_base, sprintf("chmod_test%04o", $input));
+ # We can skip from here because 0 is last in the list.
+ skip "Mode of 0 means assume user defaults on VMS", 1
+ if ($input == 0 && $Is_VMS);
+--
+2.9.4
+
diff --git a/perl-File-Path.spec b/perl-File-Path.spec
index 0f57792..1601e4f 100644
--- a/perl-File-Path.spec
+++ b/perl-File-Path.spec
@@ -1,11 +1,14 @@
Name: perl-File-Path
Version: 2.12
-Release: 365%{?dist}
+Release: 366%{?dist}
Summary: Create or remove directory trees
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/File-Path/
Source0: http://www.cpan.org/authors/id/R/RI/RICHE/File-Path-%{version}.tar.gz
+# Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+# and remove_tree()), bug #1457834, CPAN RT#121951, in upstream 2.13
+Patch0: File-Path-2.12-Prevent-directory-chmod-race-attack.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
@@ -41,6 +44,7 @@ depth and to delete an entire directory subtree from the file system.
%prep
%setup -q -n File-Path-%{version}
+%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
@@ -60,6 +64,10 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 2.12-366
+- Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+ and remove_tree()) (bug #1457834)
+
* Sat May 14 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 2.12-365
- Increase release to favour standalone package
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-File-Path.git/commit/?h=f25&id=8e...
6 years, 11 months
ppisar pushed to perl-File-Path (f26). "Fix CVE-2017-6512"
by notifications@fedoraproject.org
From 5848e296d61a3de73f17016f7f37a6395ae0f402 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 14:34:26 +0200
Subject: Fix CVE-2017-6512
---
...-2.12-Prevent-directory-chmod-race-attack.patch | 165 +++++++++++++++++++++
perl-File-Path.spec | 10 +-
2 files changed, 174 insertions(+), 1 deletion(-)
create mode 100644 File-Path-2.12-Prevent-directory-chmod-race-attack.patch
diff --git a/File-Path-2.12-Prevent-directory-chmod-race-attack.patch b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
new file mode 100644
index 0000000..a280818
--- /dev/null
+++ b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
@@ -0,0 +1,165 @@
+From e9cc25a6109e9191bcbf59a967ed6c60b0156f72 Mon Sep 17 00:00:00 2001
+From: John Lightsey <john(a)nixnuts.net>
+Date: Tue, 2 May 2017 12:03:52 -0500
+Subject: [PATCH] Prevent directory chmod race attack.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CVE-2017-6512 is a race condition attack where the chmod() of directories
+that cannot be entered is misused to change the permissions on other
+files or directories on the system. This has been corrected by limiting
+the directory-permission loosening logic to systems where fchmod() is
+supported.
+
+Petr Písař: Ported to 2.12.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ lib/File/Path.pm | 39 +++++++++++++++++++++++++--------------
+ t/Path.t | 40 ++++++++++++++++++++++++++--------------
+ 2 files changed, 51 insertions(+), 28 deletions(-)
+
+diff --git a/lib/File/Path.pm b/lib/File/Path.pm
+index 36f12cc..871f43a 100644
+--- a/lib/File/Path.pm
++++ b/lib/File/Path.pm
+@@ -354,21 +354,32 @@ sub _rmtree {
+
+ # see if we can escalate privileges to get in
+ # (e.g. funny protection mask such as -w- instead of rwx)
+- $perm &= oct '7777';
+- my $nperm = $perm | oct '700';
+- if (
+- !(
+- $arg->{safe}
+- or $nperm == $perm
+- or chmod( $nperm, $root )
+- )
+- )
+- {
+- _error( $arg,
+- "cannot make child directory read-write-exec", $canon );
+- next ROOT_DIR;
++ # This uses fchmod to avoid traversing outside of the proper
++ # location (CVE-2017-6512)
++ my $root_fh;
++ if (open($root_fh, '<', $root)) {
++ my ($fh_dev, $fh_inode) = (stat $root_fh )[0,1];
++ $perm &= oct '7777';
++ my $nperm = $perm | oct '700';
++ local $@;
++ if (
++ !(
++ $arg->{safe}
++ or $nperm == $perm
++ or !-d _
++ or $fh_dev ne $ldev
++ or $fh_inode ne $lino
++ or eval { chmod( $nperm, $root_fh ) }
++ )
++ )
++ {
++ _error( $arg,
++ "cannot make child directory read-write-exec", $canon );
++ next ROOT_DIR;
++ }
++ close $root_fh;
+ }
+- elsif ( !chdir($root) ) {
++ if ( !chdir($root) ) {
+ _error( $arg, "cannot chdir to child", $canon );
+ next ROOT_DIR;
+ }
+diff --git a/t/Path.t b/t/Path.t
+index 5644f57..fffc49c 100755
+--- a/t/Path.t
++++ b/t/Path.t
+@@ -3,7 +3,7 @@
+
+ use strict;
+
+-use Test::More tests => 127;
++use Test::More tests => 126;
+ use Config;
+ use Fcntl ':mode';
+ use lib 't/';
+@@ -17,6 +17,13 @@ BEGIN {
+
+ my $Is_VMS = $^O eq 'VMS';
+
++my $fchmod_supported = 0;
++if (open my $fh, curdir()) {
++ my ($perm) = (stat($fh))[2];
++ $perm &= 07777;
++ eval { $fchmod_supported = chmod( $perm, $fh); };
++}
++
+ # first check for stupid permissions second for full, so we clean up
+ # behind ourselves
+ for my $perm (0111,0777) {
+@@ -298,16 +305,19 @@ is($created[0], $dir, "created directory (old style 3 mode undef) cross-check");
+
+ is(rmtree($dir, 0, undef), 1, "removed directory 3 verbose undef");
+
+-$dir = catdir($tmp_base,'G');
+-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
++SKIP: {
++ skip "fchmod of directories not supported on this platform", 3 unless $fchmod_supported;
++ $dir = catdir($tmp_base,'G');
++ $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
+
+-@created = mkpath($dir, undef, 0200);
++ @created = mkpath($dir, undef, 0400);
+
+-is(scalar(@created), 1, "created write-only dir");
++ is(scalar(@created), 1, "created read-only dir");
+
+-is($created[0], $dir, "created write-only directory cross-check");
++ is($created[0], $dir, "created read-only directory cross-check");
+
+-is(rmtree($dir), 1, "removed write-only dir");
++ is(rmtree($dir), 1, "removed read-only dir");
++}
+
+ # borderline new-style heuristics
+ if (chdir $tmp_base) {
+@@ -449,26 +459,28 @@ SKIP: {
+ }
+
+ SKIP : {
+- my $skip_count = 19;
++ my $skip_count = 18;
+ # this test will fail on Windows, as per:
+ # http://perldoc.perl.org/perlport.html#chmod
+
+ skip "Windows chmod test skipped", $skip_count
+ if $^O eq 'MSWin32';
++ skip "fchmod() on directories is not supported on this platform", $skip_count
++ unless $fchmod_supported;
+ my $mode;
+ my $octal_mode;
+ my @inputs = (
+- 0777, 0700, 0070, 0007,
+- 0333, 0300, 0030, 0003,
+- 0111, 0100, 0010, 0001,
+- 0731, 0713, 0317, 0371, 0173, 0137,
+- 00 );
++ 0777, 0700, 0470, 0407,
++ 0433, 0400, 0430, 0403,
++ 0111, 0100, 0110, 0101,
++ 0731, 0713, 0317, 0371,
++ 0173, 0137);
+ my $input;
+ my $octal_input;
+- $dir = catdir($tmp_base, 'chmod_test');
+
+ foreach (@inputs) {
+ $input = $_;
++ $dir = catdir($tmp_base, sprintf("chmod_test%04o", $input));
+ # We can skip from here because 0 is last in the list.
+ skip "Mode of 0 means assume user defaults on VMS", 1
+ if ($input == 0 && $Is_VMS);
+--
+2.9.4
+
diff --git a/perl-File-Path.spec b/perl-File-Path.spec
index f313ed6..c2fc20c 100644
--- a/perl-File-Path.spec
+++ b/perl-File-Path.spec
@@ -1,11 +1,14 @@
Name: perl-File-Path
Version: 2.12
-Release: 366%{?dist}
+Release: 367%{?dist}
Summary: Create or remove directory trees
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/File-Path/
Source0: http://www.cpan.org/authors/id/R/RI/RICHE/File-Path-%{version}.tar.gz
+# Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+# and remove_tree()), bug #1457834, CPAN RT#121951, in upstream 2.13
+Patch0: File-Path-2.12-Prevent-directory-chmod-race-attack.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
@@ -41,6 +44,7 @@ depth and to delete an entire directory subtree from the file system.
%prep
%setup -q -n File-Path-%{version}
+%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
@@ -60,6 +64,10 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 2.12-367
+- Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+ and remove_tree()) (bug #1457834)
+
* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.12-366
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-File-Path.git/commit/?h=f26&id=58...
6 years, 11 months
ppisar pushed to perl-File-Path (master). "Fix CVE-2017-6512"
by notifications@fedoraproject.org
From 5848e296d61a3de73f17016f7f37a6395ae0f402 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Thu, 1 Jun 2017 14:34:26 +0200
Subject: Fix CVE-2017-6512
---
...-2.12-Prevent-directory-chmod-race-attack.patch | 165 +++++++++++++++++++++
perl-File-Path.spec | 10 +-
2 files changed, 174 insertions(+), 1 deletion(-)
create mode 100644 File-Path-2.12-Prevent-directory-chmod-race-attack.patch
diff --git a/File-Path-2.12-Prevent-directory-chmod-race-attack.patch b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
new file mode 100644
index 0000000..a280818
--- /dev/null
+++ b/File-Path-2.12-Prevent-directory-chmod-race-attack.patch
@@ -0,0 +1,165 @@
+From e9cc25a6109e9191bcbf59a967ed6c60b0156f72 Mon Sep 17 00:00:00 2001
+From: John Lightsey <john(a)nixnuts.net>
+Date: Tue, 2 May 2017 12:03:52 -0500
+Subject: [PATCH] Prevent directory chmod race attack.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CVE-2017-6512 is a race condition attack where the chmod() of directories
+that cannot be entered is misused to change the permissions on other
+files or directories on the system. This has been corrected by limiting
+the directory-permission loosening logic to systems where fchmod() is
+supported.
+
+Petr Písař: Ported to 2.12.
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ lib/File/Path.pm | 39 +++++++++++++++++++++++++--------------
+ t/Path.t | 40 ++++++++++++++++++++++++++--------------
+ 2 files changed, 51 insertions(+), 28 deletions(-)
+
+diff --git a/lib/File/Path.pm b/lib/File/Path.pm
+index 36f12cc..871f43a 100644
+--- a/lib/File/Path.pm
++++ b/lib/File/Path.pm
+@@ -354,21 +354,32 @@ sub _rmtree {
+
+ # see if we can escalate privileges to get in
+ # (e.g. funny protection mask such as -w- instead of rwx)
+- $perm &= oct '7777';
+- my $nperm = $perm | oct '700';
+- if (
+- !(
+- $arg->{safe}
+- or $nperm == $perm
+- or chmod( $nperm, $root )
+- )
+- )
+- {
+- _error( $arg,
+- "cannot make child directory read-write-exec", $canon );
+- next ROOT_DIR;
++ # This uses fchmod to avoid traversing outside of the proper
++ # location (CVE-2017-6512)
++ my $root_fh;
++ if (open($root_fh, '<', $root)) {
++ my ($fh_dev, $fh_inode) = (stat $root_fh )[0,1];
++ $perm &= oct '7777';
++ my $nperm = $perm | oct '700';
++ local $@;
++ if (
++ !(
++ $arg->{safe}
++ or $nperm == $perm
++ or !-d _
++ or $fh_dev ne $ldev
++ or $fh_inode ne $lino
++ or eval { chmod( $nperm, $root_fh ) }
++ )
++ )
++ {
++ _error( $arg,
++ "cannot make child directory read-write-exec", $canon );
++ next ROOT_DIR;
++ }
++ close $root_fh;
+ }
+- elsif ( !chdir($root) ) {
++ if ( !chdir($root) ) {
+ _error( $arg, "cannot chdir to child", $canon );
+ next ROOT_DIR;
+ }
+diff --git a/t/Path.t b/t/Path.t
+index 5644f57..fffc49c 100755
+--- a/t/Path.t
++++ b/t/Path.t
+@@ -3,7 +3,7 @@
+
+ use strict;
+
+-use Test::More tests => 127;
++use Test::More tests => 126;
+ use Config;
+ use Fcntl ':mode';
+ use lib 't/';
+@@ -17,6 +17,13 @@ BEGIN {
+
+ my $Is_VMS = $^O eq 'VMS';
+
++my $fchmod_supported = 0;
++if (open my $fh, curdir()) {
++ my ($perm) = (stat($fh))[2];
++ $perm &= 07777;
++ eval { $fchmod_supported = chmod( $perm, $fh); };
++}
++
+ # first check for stupid permissions second for full, so we clean up
+ # behind ourselves
+ for my $perm (0111,0777) {
+@@ -298,16 +305,19 @@ is($created[0], $dir, "created directory (old style 3 mode undef) cross-check");
+
+ is(rmtree($dir, 0, undef), 1, "removed directory 3 verbose undef");
+
+-$dir = catdir($tmp_base,'G');
+-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
++SKIP: {
++ skip "fchmod of directories not supported on this platform", 3 unless $fchmod_supported;
++ $dir = catdir($tmp_base,'G');
++ $dir = VMS::Filespec::unixify($dir) if $Is_VMS;
+
+-@created = mkpath($dir, undef, 0200);
++ @created = mkpath($dir, undef, 0400);
+
+-is(scalar(@created), 1, "created write-only dir");
++ is(scalar(@created), 1, "created read-only dir");
+
+-is($created[0], $dir, "created write-only directory cross-check");
++ is($created[0], $dir, "created read-only directory cross-check");
+
+-is(rmtree($dir), 1, "removed write-only dir");
++ is(rmtree($dir), 1, "removed read-only dir");
++}
+
+ # borderline new-style heuristics
+ if (chdir $tmp_base) {
+@@ -449,26 +459,28 @@ SKIP: {
+ }
+
+ SKIP : {
+- my $skip_count = 19;
++ my $skip_count = 18;
+ # this test will fail on Windows, as per:
+ # http://perldoc.perl.org/perlport.html#chmod
+
+ skip "Windows chmod test skipped", $skip_count
+ if $^O eq 'MSWin32';
++ skip "fchmod() on directories is not supported on this platform", $skip_count
++ unless $fchmod_supported;
+ my $mode;
+ my $octal_mode;
+ my @inputs = (
+- 0777, 0700, 0070, 0007,
+- 0333, 0300, 0030, 0003,
+- 0111, 0100, 0010, 0001,
+- 0731, 0713, 0317, 0371, 0173, 0137,
+- 00 );
++ 0777, 0700, 0470, 0407,
++ 0433, 0400, 0430, 0403,
++ 0111, 0100, 0110, 0101,
++ 0731, 0713, 0317, 0371,
++ 0173, 0137);
+ my $input;
+ my $octal_input;
+- $dir = catdir($tmp_base, 'chmod_test');
+
+ foreach (@inputs) {
+ $input = $_;
++ $dir = catdir($tmp_base, sprintf("chmod_test%04o", $input));
+ # We can skip from here because 0 is last in the list.
+ skip "Mode of 0 means assume user defaults on VMS", 1
+ if ($input == 0 && $Is_VMS);
+--
+2.9.4
+
diff --git a/perl-File-Path.spec b/perl-File-Path.spec
index f313ed6..c2fc20c 100644
--- a/perl-File-Path.spec
+++ b/perl-File-Path.spec
@@ -1,11 +1,14 @@
Name: perl-File-Path
Version: 2.12
-Release: 366%{?dist}
+Release: 367%{?dist}
Summary: Create or remove directory trees
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/File-Path/
Source0: http://www.cpan.org/authors/id/R/RI/RICHE/File-Path-%{version}.tar.gz
+# Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+# and remove_tree()), bug #1457834, CPAN RT#121951, in upstream 2.13
+Patch0: File-Path-2.12-Prevent-directory-chmod-race-attack.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
@@ -41,6 +44,7 @@ depth and to delete an entire directory subtree from the file system.
%prep
%setup -q -n File-Path-%{version}
+%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
@@ -60,6 +64,10 @@ make test
%{_mandir}/man3/*
%changelog
+* Thu Jun 01 2017 Petr Pisar <ppisar(a)redhat.com> - 2.12-367
+- Fix CVE-2017-6512 (setting arbitrary mode on an arbitrary file in rmtree()
+ and remove_tree()) (bug #1457834)
+
* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.12-366
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-File-Path.git/commit/?h=master&id...
6 years, 11 months