diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6aff0e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pexpect-2.3.tar.gz diff --git a/.pexpect.metadata b/.pexpect.metadata new file mode 100644 index 0000000..7ff0edb --- /dev/null +++ b/.pexpect.metadata @@ -0,0 +1 @@ +ee1e2770bfe49e7651bab78357179c28ed99a55b SOURCES/pexpect-2.3.tar.gz diff --git a/SOURCES/pexpect-ssh.patch b/SOURCES/pexpect-ssh.patch new file mode 100644 index 0000000..aa184f4 --- /dev/null +++ b/SOURCES/pexpect-ssh.patch @@ -0,0 +1,11 @@ +diff -urN a/pexpect-2.3/pxssh.py b/pexpect-2.3/pxssh.py +--- a/pexpect-2.3/pxssh.py 2013-07-09 13:12:07.458885414 +0200 ++++ b/pexpect-2.3/pxssh.py 2013-07-09 13:14:54.865687037 +0200 +@@ -131,6 +131,7 @@ + # connecting to a heavily loaded machine I have. + # If latency is worse than these values then this will fail. + ++ self.sendline() + self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the cache before getting the prompt + time.sleep(0.1) + self.sendline() diff --git a/SPECS/pexpect.spec b/SPECS/pexpect.spec new file mode 100644 index 0000000..3555fa0 --- /dev/null +++ b/SPECS/pexpect.spec @@ -0,0 +1,154 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Summary: Pure Python Expect-like module +Name: pexpect +Version: 2.3 +Release: 11%{?dist} +License: MIT +Group: Development/Languages +URL: http://pexpect.sourceforge.net/ +Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +BuildRequires: python-devel +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Patch0: pexpect-ssh.patch + +%description +Pexpect is a pure Python module for spawning child applications; controlling +them; and responding to expected patterns in their output. Pexpect works like +Don Libes' Expect. Pexpect allows your script to spawn a child application and +control it as if a human were typing commands. + +Pexpect can be used for automating interactive applications such as ssh, ftp, +passwd, telnet, etc. It can be used to automate setup scripts for duplicating +software package installations on different servers. And it can be used for +automated software testing. Pexpect is in the spirit of Don Libes' Expect, but +Pexpect is pure Python. Unlike other Expect-like modules for Python, Pexpect +does not require TCL or Expect nor does it require C extensions to be compiled. +It should work on any platform that supports the standard Python pty module. + +%prep +%setup -q +%patch0 -p2 -b .ssh + +%build +%{__python} setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT + +# Correct some permissions +find examples -type f -exec chmod a-x \{\} \; +chmod 755 $RPM_BUILD_ROOT%{python_sitelib}/FSM.py + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README doc examples LICENSE +%{python_sitelib}/* + +%changelog +* Fri Dec 27 2013 Daniel Mach - 2.3-11 +- Mass rebuild 2013-12-27 + +* Tue Jul 09 2013 Marek Grac - 2.3-10 +- Fix issue with pxssh and timeout + Resolves: rhbz#976504 + +* Thu Feb 14 2013 Fedora Release Engineering - 2.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 2.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 2.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jul 21 2010 David Malcolm - 2.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Sun Jul 26 2009 Fedora Release Engineering - 2.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Robert Scheck 2.3-3 +- Rebuild for gcc 4.4 and rpm 4.6 + +* Fri Dec 5 2008 Jeremy Katz - 2.3-2 +- Rebuild for python 2.6 + +* Tue Jan 08 2008 Robert Scheck 2.3-1 +- Upgrade to 2.3 +- Updated the source URL to match with the guidelines + +* Wed Aug 29 2007 Robert Scheck 2.1-5 +- Rebuilt (and some minor spec file tweaks) + +* Sat Dec 09 2006 Toshio Kuratomi - 2.1-4 +- Bump and rebuild because I forgot to cvs up before the last build. + +* Sat Dec 09 2006 Toshio Kuratomi - 2.1-3 +- Bump and rebuild for python 2.5 on devel. +- Add BR: python-devel as it provides a header necessary for python modules + on python 2.5. + +* Fri Sep 01 2006 Toshio Kuratomi - 2.1-2 +- Remove pyver define as it's not needed with the automatic python(abi). +- Stop ghosting .pyos. +- Let automatic python compilation take care of creating pyos. +- Rebuild for FC6. + +* Mon Jul 17 2006 Toshio Kuratomi - 2.1-1 +- Update to 2.1. + +* Thu Feb 16 2006 Toshio Kuratomi - 2.0-2 +- Bump and rebuild for FC5. +- Convert from python-abi to python(abi) requires. + +* Thu Nov 17 2005 Toshio Kuratomi - 2.0-1 +- Update to 2.0. + +* Sat Sep 3 2005 Toshio Kuratomi 0.99999b-2 +- Add LICENSE File. +- Make noarch. +- Remove executable permissions from the modules copied to examples. + +* Fri Sep 2 2005 Toshio Kuratomi 0.99999b +- Update to version 0.99999b. +- Add dist tag. + +* Fri Apr 7 2005 Michael Schwendt +- rebuilt + +* Thu Feb 03 2005 Toshio Kuratomi 0.999-2 +- Use python_sitelib macro to resolve build issues on x86_64. +- %%ghost *.pyo +- Install ANSI.py, screen.py, and FSM.py into the examples. These are intended + to suplement pexpect eventually but they are currently much less robust and + not installed to by default. But they are needed by some examples. +- Use __python macro in build/install for consistency. +- Add --skip-build to the invocation of setup.py in install. + +* Mon May 31 2004 Panu Matilainen 0.999-0.fdr.1 +- get rid of distrel munging, buildsys does that... +- update to 0.999 +- update doc and example tarballs +- fix build on python <> 2.2 +- use -O1 in install to generate .pyo files instead of manually creating the files +- require python-abi = pyver to get dependencies right + +* Sun Jul 27 2003 Panu Matilainen 0.98-0.fdr.3 +- own .pyo files too as suggested by Ville (#517) + +* Sat Jul 26 2003 Panu Matilainen 0.98-0.fdr.2 +- fixes by Ville (bug #517) applied + +* Sat Jul 26 2003 Panu Matilainen +- Initial Fedora packaging +