%define name jps
%define version 1.2
%define release 3b
name: %{name}
version: %{version}
release: %{release}
Summary: bash script for parrallel SSH
Group: Applications/Productivity
License: GPL
Source0: jps-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-root
Prefix: /usr/local
Requires: bash >= 2.0 , openssh-clients >= 3.6 , nmap >= 3.0
Packager: Jean Lubatti <jlubatti@webraska.com>
%description
JPS is a small bash environment for managing linux/unix clusters using ssh.
It uses a "Cisco style" syntax and features different modes for running commands (serialized or parrallellized..) via ssh.
To use this script, you probably need a strong understanding of ssh, particularly public/private key authentication and ssh agents.
Needs bash >=2.0, openssh-clients >=3.9 for ConnectionTimeout variable and nmap for explore functionnality.
%prep
%setup -n %{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
%build
echo "Heh, there is nothing to build ! This is a bash shell script..."
%install
mkdir -p $RPM_BUILD_ROOT/usr/local/bin
mkdir -p $RPM_BUILD_ROOT/usr/local/share/doc
mkdir -p $RPM_BUILD_ROOT/usr/local/man/man1
mkdir -p $RPM_BUILD_ROOT/etc
install -m 755 jps $RPM_BUILD_ROOT/usr/local/bin
install -m 644 README $RPM_BUILD_ROOT/usr/local/share/doc
install -m 644 jps.1 $RPM_BUILD_ROOT/usr/local/man/man1
install -m 644 jps.conf $RPM_BUILD_ROOT/etc
%post
# if openssh < 3.9, then
VER=`ssh -V 2>&1 | sed 's/OpenSSH_\(.\).*/\1/'`
SUBVER=`ssh -V 2>&1 | sed 's/OpenSSH_.\.\(.\).*/\1/'`
if [ "${SUBVER}" -lt 9 ] && [ "${VER}" -le 3 ]
then
perl -p -i -e "s/USE_SSH_TIMEOUT='yes'/USE_SSH_TIMEOUT='no'/" /etc/jps.conf
fi
%files
%defattr(-,root,root)
/usr/local/bin/jps
%config /etc/jps.conf
%doc /usr/local/share/doc/README
%doc /usr/local/man/man1/jps.1
%changelog
* Fri Dec 16 2005 Jean Lubatti <jean@lubatti.info>
- Fixed a but on "set aggregate_output yes"
* Fri Dec 16 2005 Jean Lubatti <jean@lubatti.info>
- Added a get function to retrieve files from all nodes.
- Man page update and corrections
* Wed Dec 14 2005 Jean Lubatti <jean@lubatti.info>
- Fixed bug in write mem
- Started breaking parse_input function down in smaller functions
- Performance increase by cutting down some useless loops... still work in progress though
* Sun Dec 11 2005 Jean Lubatti <jean@lubatti.info>
- Node names can now be given as regex (sed style).
- Corrected log bug with local cd command. Please give complete path for logfile.
- First build in Ireland ;-)
- Fix in RPM install (hopefully)
* Wed Oct 5 2005 Jean Lubatti <jlubatti@webraska.com>
- Added several functionnaities (pushkey and explore network commands) and started a partial rewrite.
- Nmap is now a dependency
* Tue Sep 27 2005 Jean Lubatti <jlubatti@webraska.com>
- Changed the nodes display, the lists and macros display as well. Other minor improvements.
* Mon Aug 15 2005 Jean Lubatti <jlubatti@webraska.com>
- Added man page in distribution.
- Added system-wide configuration file.
- Several changes in jps, mostly to use system conf file.
* Sat Aug 13 2005 Jean Lubatti <jlubatti@webraska.com>
- Added history in jps.
* Sat Aug 13 2005 Jean Lubatti <jlubatti@webraska.com>
- Fixed various bugs + added a variable to control log aggregation (yes/no) since it can take quite a bit of time on huge list of servers.
* Sat Aug 13 2005 Jean Lubatti <jlubatti@webraska.com>
- Added many functionnalities. Added output automatic log aggregation (standart and error output needs to be the same for an aggregation to succeed), added distant current directory handling. Fixed several bugs, cleaned up some code.
Still to do:
- Output aggregation needs a new implementation because of limited (255) length of filenames.
- Distant curent directory is, with .. not as good as it could be.
* Thu Aug 11 2005 Jean Lubatti <jlubatti@webraska.com>
- Huge bugfix on "*" character. Any command issued after the first one was giving an empty result.
- Huge bugfix on temporization of I/O temp files (end files could be created before files containing
command output)
* Tue Aug 9 2005 Jean Lubatti <jlubatti@webraska.com>
- Used tmp file for command in order to avoid parsing by bash child. Regex and shell variables
are now working as any user would expect. Pseudo tty allocation is no longer done.
- Added compat option in script for old ssh clients. Could be cleaner, revamp this.
- Bugfix on Return code, added summary functionnality
* Thu Aug 4 2005 Jean Lubatti <jlubatti@webraska.com>
- Bugfix on add/load list command. It is now possible to add a list
to an already loaded list.
* Fri Jul 29 2005 Jean Lubatti <jlubatti@webraska.com>
- Added ssh_timeout variable, changed warnings to errors
* Wed Jul 20 2005 Jean Lubatti <jlubatti@webraska.com>
- Minor interface fix-up
* Tue Jul 19 2005 Jean Lubatti <jlubatti@webraska.com>
- First RPM build of JPS