From e89cda8bdeecfb9fa792564a2cc1fd3a378ea4c0 Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Tue, 1 Jul 2008 02:50:48 +0000 Subject: [PATCH] - apply patch for 5.10 --- net-ssh2-0.18-perl5.10.patch | 55 ++++++++++++++++++++++++++++++++++++ perl-Net-SSH2.spec | 10 ++++++- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 net-ssh2-0.18-perl5.10.patch diff --git a/net-ssh2-0.18-perl5.10.patch b/net-ssh2-0.18-perl5.10.patch new file mode 100644 index 0000000..0916f4f --- /dev/null +++ b/net-ssh2-0.18-perl5.10.patch @@ -0,0 +1,55 @@ +diff -ruN Net-SSH-0.18.orig/SSH2.xs Net-SSH-0.18/SSH2.xs +--- Net-SSH-0.18.orig/SSH2.xs 2007-11-10 17:53:25.000000000 -0800 ++++ Net-SSH-0.18/SSH2.xs 2008-06-10 03:38:52.000000000 -0700 +@@ -1006,7 +1006,7 @@ + debug("- [%d] = channel\n", i); + pollfd[i].type = LIBSSH2_POLLFD_CHANNEL; + pollfd[i].fd.channel = +- ((SSH2_CHANNEL*)SvIVX(SvRV(*handle)))->channel; ++ ((SSH2_CHANNEL*)SvIVX(GvSV((GV*)SvRV(*handle))))->channel; + } else if(strEQ(package, "Net::SSH2::Listener")) { + debug("- [%d] = listener\n", i); + pollfd[i].type = LIBSSH2_POLLFD_LISTENER; +diff -ruN Net-SSH-0.18.orig/typemap Net-SSH-0.18/typemap +--- Net-SSH-0.18.orig/typemap 2007-02-24 07:15:23.000000000 -0800 ++++ Net-SSH-0.18/typemap 2008-06-10 01:42:42.000000000 -0700 +@@ -29,9 +29,9 @@ + const char* name = form("_GEN_%ld", (long)net_ch_gensym++); + SvUPGRADE((SV*)gv, SVt_PVGV); + SvUPGRADE((SV*)io, SVt_PVIO); +- SvIVX(gv) = PTR2IV($var); + gv_init(gv, gv_stashpv("Net::SSH2::Channel", 0/*create*/), + name, strlen(name), 0/*multi*/); ++ GvSV(gv) = newSViv(PTR2IV($var)); + GvIOp(gv) = io; + sv_magic((SV*)io, newRV((SV*)gv), PERL_MAGIC_tiedscalar, Nullch, 0); + } +@@ -49,9 +49,9 @@ + const char* name = form("_GEN_%ld", (long)net_fi_gensym++); + SvUPGRADE((SV*)gv, SVt_PVGV); + SvUPGRADE((SV*)io, SVt_PVIO); +- SvIVX(gv) = PTR2IV($var); + gv_init(gv, gv_stashpv("Net::SSH2::File", 0/*create*/), + name, strlen(name), 0/*multi*/); ++ GvSV(gv) = newSViv(PTR2IV($var)); + GvIOp(gv) = io; + sv_magic((SV*)io, newRV((SV*)gv), PERL_MAGIC_tiedscalar, Nullch, 0); + } +@@ -80,7 +80,7 @@ + + O_CHANNEL + if(sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVGV)) +- $var = ($type)SvIVX((SV*)SvRV($arg)); ++ $var = ($type)SvIVX(GvSV((GV*)SvRV($arg))); + else + croak(\"${Package}::$func_name() - invalid channel object\"); + +@@ -98,7 +98,7 @@ + + O_FILE + if(sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVGV)) +- $var = ($type)SvIVX((SV*)SvRV($arg)); ++ $var = ($type)SvIVX(GvSV((GV*)SvRV($arg))); + else + croak(\"${Package}::$func_name() - invalid SFTP file object\"); + diff --git a/perl-Net-SSH2.spec b/perl-Net-SSH2.spec index ffd3501..ea23adb 100644 --- a/perl-Net-SSH2.spec +++ b/perl-Net-SSH2.spec @@ -1,12 +1,15 @@ Name: perl-Net-SSH2 Version: 0.18 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Support for the SSH 2 protocol via libSSH2 License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Net-SSH2/ Source0: http://www.cpan.org/authors/id/D/DB/DBROBINS/Net-SSH2-%{version}.tar.gz +# http://rt.cpan.org/Public/Bug/Display.html?id=36614 +Patch0: net-ssh2-0.18-perl5.10.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) @@ -29,6 +32,8 @@ all of the key exchanges, ciphers, and compression of libssh2. %prep %setup -q -n Net-SSH2-%{version} +%patch0 -p1 + perl -pi -e 's|^#!perl|#!/usr/bin/perl|' example/* %build @@ -62,6 +67,9 @@ rm -rf %{buildroot} %{_mandir}/man3/* %changelog +* Mon Jun 30 2008 Chris Weyl 0.18-5 +- apply patch for 5.10 + * Thu Mar 06 2008 Tom "spot" Callaway - 0.18-4 Rebuild for new perl