Package init
This commit is contained in:
commit
ad8e0ff2fa
@ -0,0 +1,30 @@
|
||||
From 1b924708663f457a4f7c25ed35d7dfb3bb5b334d Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Ullrich <Steffen_Ullrich@genua.de>
|
||||
Date: Sat, 3 May 2014 23:04:36 +0200
|
||||
Subject: [PATCH 1/2] Debian #746576 - don't disale verification if only
|
||||
hostnames should not be verified
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/LWP/Protocol/https.pm | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/LWP/Protocol/https.pm b/lib/LWP/Protocol/https.pm
|
||||
index a707917..8c87e81 100644
|
||||
--- a/lib/LWP/Protocol/https.pm
|
||||
+++ b/lib/LWP/Protocol/https.pm
|
||||
@@ -21,7 +21,7 @@ sub _extra_sock_opts
|
||||
$ssl_opts{SSL_verifycn_scheme} = 'www';
|
||||
}
|
||||
else {
|
||||
- $ssl_opts{SSL_verify_mode} = 0;
|
||||
+ $ssl_opts{SSL_verifycn_scheme} = 'none';
|
||||
}
|
||||
if ($ssl_opts{SSL_verify_mode}) {
|
||||
unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
|
||||
--
|
||||
1.9.0
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
From 6b5c876de80451ee54de5d853de37a62e26bf6fe Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Ullrich <Steffen_Ullrich@genua.de>
|
||||
Date: Sun, 4 May 2014 09:14:13 +0200
|
||||
Subject: [PATCH 2/2] Debian #746576 - fix test, make it workable for
|
||||
Crypt::SSLeay/Net::SSL too
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/LWP/Protocol/https.pm | 6 +++++-
|
||||
t/https_proxy.t | 5 ++++-
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/LWP/Protocol/https.pm b/lib/LWP/Protocol/https.pm
|
||||
index 8c87e81..6223ddf 100644
|
||||
--- a/lib/LWP/Protocol/https.pm
|
||||
+++ b/lib/LWP/Protocol/https.pm
|
||||
@@ -21,7 +21,11 @@ sub _extra_sock_opts
|
||||
$ssl_opts{SSL_verifycn_scheme} = 'www';
|
||||
}
|
||||
else {
|
||||
- $ssl_opts{SSL_verifycn_scheme} = 'none';
|
||||
+ if ( $Net::HTTPS::SSL_SOCKET_CLASS eq 'Net::SSL' ) {
|
||||
+ $ssl_opts{SSL_verifycn_scheme} = '';
|
||||
+ } else {
|
||||
+ $ssl_opts{SSL_verifycn_scheme} = 'none';
|
||||
+ }
|
||||
}
|
||||
if ($ssl_opts{SSL_verify_mode}) {
|
||||
unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
|
||||
diff --git a/t/https_proxy.t b/t/https_proxy.t
|
||||
index 5196960..c78345b 100644
|
||||
--- a/t/https_proxy.t
|
||||
+++ b/t/https_proxy.t
|
||||
@@ -66,7 +66,10 @@ my %ua;
|
||||
$ua{noproxy} = LWP::UserAgent->new(
|
||||
keep_alive => 10, # size of connection cache
|
||||
# server does not know the expected name and returns generic certificate
|
||||
- ssl_opts => { verify_hostname => 0 }
|
||||
+ ssl_opts => {
|
||||
+ verify_hostname => 0,
|
||||
+ SSL_ca_file => $cafile,
|
||||
+ }
|
||||
);
|
||||
|
||||
$ua{proxy} = LWP::UserAgent->new(
|
||||
--
|
||||
1.9.0
|
||||
|
||||
BIN
LWP-Protocol-https-6.07.tar.gz
Normal file
BIN
LWP-Protocol-https-6.07.tar.gz
Normal file
Binary file not shown.
57
perl-LWP-Protocol-https.spec
Normal file
57
perl-LWP-Protocol-https.spec
Normal file
@ -0,0 +1,57 @@
|
||||
%global debug_package %{nil}
|
||||
%global srcname LWP-Protocol-https
|
||||
|
||||
Name: perl-LWP-Protocol-https
|
||||
Summary: Provides support for using https schemed URLs with LWP
|
||||
Version: 6.07
|
||||
Release: 7
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/pod/LWP::Protocol::https
|
||||
Source0: https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-Protocol-https-%{version}.tar.gz
|
||||
|
||||
# These patches are from fedora: https://src.fedoraproject.org/rpms/perl-LWP-Protocol-https/tree/f29
|
||||
Patch0: LWP-Protocol-https-6.06-Debian-746576-don-t-disale-verification-if-only-host.patch
|
||||
Patch1: LWP-Protocol-https-6.06-Debian-746576-fix-test-make-it-workable-for-Crypt-SS.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl perl(Test::More) perl-generators perl(ExtUtils::MakeMaker) git
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Requires: perl(IO::Socket::SSL) >= 1.54
|
||||
Requires: perl(Mozilla::CA) >= 20110101
|
||||
Requires: perl(Net::HTTPS) >= 6
|
||||
|
||||
# Remove underspecified dependencies
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Net::HTTPS\\)\\s*$
|
||||
|
||||
%description
|
||||
The LWP::Protocol::https module provides support for using https schemed URLs with LWP.\
|
||||
This module is a plug-in to the LWP protocol handling, so you don't use it directly.\
|
||||
Once the module is installed LWP is able to access sites using HTTP over SSL/TLS.\
|
||||
|
||||
%package help
|
||||
Summary: Help manual for %{name}
|
||||
|
||||
%description help
|
||||
The %{name}-help package conatins man manual, CHANGELOG, README, etc
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version} -p1 -Sgit
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
%make_build
|
||||
|
||||
%install
|
||||
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
||||
find $RPM_BUILD_ROOT -type f -name .packlist -delete
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%files
|
||||
%{perl_vendorlib}/*
|
||||
|
||||
%files help
|
||||
%doc Changes README
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 6.07-7
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user