Blob Blame History Raw
# IDEA is a patent-encumbered alogorithm so default to not supporting it
# To include support for the IDEA algorithm, use: rpmbuild --with IDEA

# Noarch package doesn't provide debuginfo but the default script
# interferes with signature checking so disable it completely
%define debug_package %{nil}

Summary:	SSH (Secure Shell) client
Name:		perl-Net-SSH-Perl
Version:	1.34
Release:	1%{?dist}
License:	GPL+ or Artistic
Group:		Development/Libraries
Url:		http://search.cpan.org/dist/Net-SSH-Perl/
Source0:	http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/Net-SSH-Perl-%{version}.tar.gz
Source1:	14964AC8.asc
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:	perl(Term::ReadKey)
BuildArch:	noarch
BuildRequires:	perl(String::CRC32)		>= 1.2
BuildRequires:	perl(Convert::PEM)		>= 0.05
BuildRequires:	perl(Crypt::Blowfish)
BuildRequires:	perl(Crypt::DH)			>= 0.01
BuildRequires:	perl(Crypt::DSA)		>= 0.11
BuildRequires:	perl(Crypt::RSA)
BuildRequires:	perl(Digest::BubbleBabble)
BuildRequires:	perl(Digest::HMAC_MD5)
BuildRequires:	perl(Digest::HMAC_SHA1)
BuildRequires:	perl(Digest::MD5)
BuildRequires:	perl(Digest::SHA1)
BuildRequires:	perl(ExtUtils::MakeMaker)
BuildRequires:	perl(Math::GMP)			>= 1.04
BuildRequires:	perl(Math::Pari)		>= 2.001804
BuildRequires:	perl(MIME::Base64)
BuildRequires:	perl(Test::More)
# Additional test coverage
BuildRequires:	perl(Module::Signature)
BuildRequires:	perl(Test::Pod)			>= 0.95
BuildRequires:	perl(Test::Pod::Coverage)	>= 1.04
#BuildRequires:	perl(Test::YAML::Meta)		>= 0.03

%{?_with_IDEA:BuildRequires: perl(Crypt::IDEA)}

# Make sure the installed package has blowfish support
Requires:	perl(Crypt::Blowfish)

%description
Net::SSH::Perl is an all-Perl module implementing an SSH (Secure Shell)
client. It is compatible with both the SSH-1 and SSH-2 protocols.

%prep
%setup -q -n Net-SSH-Perl-%{version}

# Avoid extra deps from examples
%{__chmod} -x eg/*

# Remove Crypt::IDEA dep if we're not supporting the IDEA algorithm
%define bogusreq 'perl(Crypt::IDEA)'
%global reqfilt /bin/sh -c "%{__perl_requires} | %{__grep} -Fvx %{bogusreq}"
%{!?_with_IDEA:%define __perl_requires %{reqfilt}}

%build
(
	# Protocol support (select one)
	# 1=SSH1 2=SSH2 3=Both
	echo 3

	# Algorithm selection (select all required)
	# 1=IDEA 2=DES 3=DES3 4=Blowfish 5=RC4
	echo %{?_with_IDEA:1 }2 3 4 5
) |
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
# Critic and POD tests currently fail
%{__gpg} --import %{SOURCE1} || :
LC_ALL=en_US %{__make} test TEST_AUTHOR=1 TEST_CRITIC=0 TEST_SIGNATURE=1 TEST_SPELL=0

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';'
%{__chmod} -R u+w %{buildroot}/*

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes README LICENSE eg ToDo
%{perl_vendorlib}/Net/
%{_mandir}/man3/Net::SSH::Perl*.3pm*

%changelog
* Mon Feb  2 2009 Paul Howarth <paul@city-fan.org> 1.34-1
- Update to 1.34, fixes various upstream bugs:
  * Rekey properly after 1 GB of data (rt.cpan.org #25044)
  * Don't try to process nonexistent or empty auth file (rt.cpan.org #41877)
  * Fix typo in croak message (rt.cpan.org #42056)
  * Move 'use base' call after Crypt module loading (rt.cpan.org #42051)
  * Only apply stdin if defined in SSH1 (rt.cpan.org #42583)
- Remove perl(Test::YAML::Meta) buildreq (not yet in EPEL)
- Remove perl(Perl::Critic) buildreq (not yet in EPEL-4)
- Remove perl(Digest::SHA1) version requirement (not satisfied in EL-4)
- Remove perl(Text::SpellChecker) buildreq (dictionary coverage in EL-4
  not sufficient to pass tests)

* Tue Nov  4 2008 Paul Howarth <paul@city-fan.org> 1.33-2
- Run tests in en_US locale, so spell checker doesn't complain about the use of
  American English when the host is in a non-US locale

* Mon Nov  3 2008 Paul Howarth <paul@city-fan.org> 1.33-1
- Update to 1.33 (#469612), fixes various upstream bugs:
  * Fix open() calls (rt.cpan.org #40020)
  * Fix non-shell problem (rt.cpan.org #39980)
  * Allow full agent forwarding (rt.cpan.org #32190)
  * Handle hashed known_hosts files (rt.cpan.org #25175)
  * Add IO::Handle to Perl.pm (rt.cpan.org #40057, #35985)
  * Prevent t/03-packet.t from hanging due to high file descriptor
  | (rt.cpan.org #6101)
  * If ENV{HOME} is not set, use getpwuid. If both fail and the dir 
  | is needed, we croak (rt.cpan.org #25174)
  * Fix incorrect logical/bitwise AND mixup (rt.cpan.org #31490)
  * Allow empty stdin for SSH2 (rt.cpan.org #32730)
  * Adjust terminal dimensions dynamically if Term::ReadKey is available
  | (rt.cpan.org #34874)
- New upstream (co-)maintainer, new source URL
- t/03-packet.t re-enabled as it should no longer hang
- Add buildreqs Module::Signature, Test::Pod, Test::Pod::Coverage,
  Perl::Critic, Test::YAML::Meta, Text::SpellChecker for additional test
  coverage
- Add dependency on Term::ReadKey to provide dynamic terminal resizing
- Include upstream maintainer's GPG key for signature checking

* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.30-6
- Rebuild for new perl

* Mon Aug 13 2007 Paul Howarth <paul@city-fan.org> 1.30-5
- Clarify license as GPL v1 or later, or Artistic (same as perl)
- Add buildreq perl(Test::More)

* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 1.30-4
- Buildrequire perl(ExtUtils::MakeMaker)
- Fix argument order for find with -depth

* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 1.30-3
- Skip test 03-packet, which can sometimes hang (cpan rt#6101)
- Add manual Crypt::Blowfish dep to ensure we have blowfish support

* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 1.30-2
- FE6 mass rebuild

* Mon Mar 20 2006 Paul Howarth <paul@city-fan.org> 1.30-1
- Update to 1.30
- Patch for cpan rt#11674 no longer needed, fixed upstream

* Thu Mar  2 2006 Paul Howarth <paul@city-fan.org> 1.29-1
- Initial build