1f6526f
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
1f6526f
1f6526f
Name: rho
Chris Hambridge 33fc4c4
Version: 0.0.28
Chris Hambridge 74f349e
Release: 3%{?dist}
1f6526f
Summary: An SSH system profiler
1f6526f
1f6526f
Group: Applications/Internet
1f6526f
License: GPLv2
Chris Hambridge 33fc4c4
URL: http://github.com/quipucords/rho
Chris Hambridge 74f349e
Source0: http://chambridge.fedorapeople.org/rho/rho-0.0.28-3.tar.gz
1f6526f
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1f6526f
1f6526f
BuildArch: noarch
1f6526f
BuildRequires: python-devel
Chris Hambridge 74f349e
%{?fedora:BuildRequires: python2-setuptools}
Chris Hambridge 74f349e
%{?rhel:BuildRequires: python-setuptools}
Chris Hambridge 33fc4c4
BuildRequires: pandoc
1f6526f
Requires: python-netaddr
Chris Hambridge 74f349e
Requires: python2-crypto
Chris Hambridge b37a10e
Requires: ansible
Chris Hambridge 33fc4c4
Requires: pexpect
Chris Hambridge 33fc4c4
Requires: python-six
Chris Hambridge 33fc4c4
Requires: python-enum34
Chris Hambridge 74f349e
Requires: PyYAML
Chris Hambridge b37a10e
%{?rhel:Requires: epel-release}
Chris Hambridge 33fc4c4
Requires: python2-future
Chris Hambridge 33fc4c4
Requires: python2-sh
Chris Hambridge 74f349e
Requires: pyxdg
1f6526f
1f6526f
%description
1f6526f
Rho is a tool for scanning your network, logging into systems via SSH, and
1f6526f
retrieving information about them.
1f6526f
1f6526f
%prep
1f6526f
%setup -q
1f6526f
1f6526f
%build
1f6526f
%{__python} setup.py build
Chris Hambridge 74f349e
make manpage
1f6526f
1f6526f
%install
1f6526f
rm -rf $RPM_BUILD_ROOT
1f6526f
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
1f6526f
install -D -p -m 644 doc/rho.1 $RPM_BUILD_ROOT%{_mandir}/man1/rho.1
1f6526f
Chris Hambridge 33fc4c4
mkdir -p %{buildroot}%{_datadir}/ansible/%{name}
Chris Hambridge 33fc4c4
cp rho_playbook.yml %{buildroot}%{_datadir}/ansible/%{name}
Chris Hambridge 33fc4c4
cp -rp library %{buildroot}%{_datadir}/ansible/%{name}/
Chris Hambridge 33fc4c4
cp -rp roles %{buildroot}%{_datadir}/ansible/%{name}/
Chris Hambridge 33fc4c4
1f6526f
%clean
1f6526f
rm -rf $RPM_BUILD_ROOT
1f6526f
1f6526f
%files
1f6526f
%defattr(-,root,root,-)
Chris Hambridge 33fc4c4
%doc README.rst AUTHORS.rst COPYING
1f6526f
%{_bindir}/rho
1f6526f
%{python_sitelib}/*
1f6526f
%{_mandir}/man1/rho.1.gz
Chris Hambridge 33fc4c4
%dir %{_datadir}/ansible/%{name}
Chris Hambridge 33fc4c4
%{_datadir}/ansible/%{name}/rho_playbook.yml
Chris Hambridge 33fc4c4
%{_datadir}/ansible/%{name}/library/*
Chris Hambridge 33fc4c4
%{_datadir}/ansible/%{name}/roles/*
1f6526f
1f6526f
%changelog
Chris Hambridge 74f349e
* Thu Sep 21 2017 Christopher Hambridge <chambrid@redhat.com> 0.0.28-3
Chris Hambridge 33fc4c4
- Updated to utilize Ansible 2.3.1.0 and an Ansible playbook and associate
Chris Hambridge 33fc4c4
  roles.
Chris Hambridge 33fc4c4
- Encryption of auth credential entries and network profile entries using a
Chris Hambridge 33fc4c4
  password and Ansible vault.
Chris Hambridge 33fc4c4
- Added additional error checking with associated messages and more user
Chris Hambridge 33fc4c4
  feedback on success.
Chris Hambridge 33fc4c4
- Added ability to create a network profile with a specified ssh port value.
Chris Hambridge 33fc4c4
- Added support for scans with sudo user both with and without password.
Chris Hambridge 33fc4c4
- Extracted fact information that can be obtaind during a scan into a new
Chris Hambridge 33fc4c4
  subcommand.
Chris Hambridge 33fc4c4
- Provided updated scan options to utilize Ansible. Capturing data in console
Chris Hambridge 33fc4c4
  and within a log file, additionally tying into the Ansible verbosity levels.
Chris Hambridge 33fc4c4
  Tune the number of concurrent ssh connections.
Chris Hambridge 33fc4c4
- Added the capability to hash values from within a generated report.
0ac9f61
1221e2b
* Mon Oct 17 2016 Alex Wood <awood@redhat.com> 0.0.27-1
1221e2b
- Added 4 date commands to help determine when a server was built.
1221e2b
  (mvickstr@redhat.com)
1221e2b
1221e2b
* Tue Sep 13 2016 Christopher Snyder <csnyder@redhat.com> 0.0.26-1
Chris Hambridge 33fc4c4
- Added additional columns to the pack-scan report generated by the
1221e2b
  initconfig command. The current pack-scan format does not include error,
1221e2b
  auth.name, and auth.username fields that are helpful when troubleshooting.
1221e2b
  The other fields are added to get additional visibility into all fields Rho
Chris Hambridge 33fc4c4
  can collect.
Chris Hambridge 33fc4c4
- replaced some key dmidecode commands that used switches not
1221e2b
  available on older versions of RHEL with commands that work on all versions
1221e2b
  of RHEL. (mvickstr@redhat.com)
1221e2b
- fix srpm_disttag (jesusr@redhat.com)
1221e2b
- update srpm_disttag, and fedora release targets (jesusr@redhat.com)
1221e2b
1221e2b
* Thu Feb 11 2016 jesus m. rodriguez <jesusr@redhat.com> 0.0.25-1
1221e2b
- added error checking for missing Red Hat packages scan (mvickstr@redhat.com)
1221e2b
- add disttag (jesusr@redhat.com)
1221e2b
1221e2b
* Tue Nov 25 2014 jesus m. rodriguez <jesusr@redhat.com> 0.0.24-1
1221e2b
- fix auth (add|edit) man page entries. (jesusr@redhat.com)
1221e2b
1221e2b
* Mon Nov 24 2014 jesus m. rodriguez <jesusr@redhat.com> 0.0.23-1
1221e2b
- update doc to reference actual variable used in code (jesusr@redhat.com)
1221e2b
- add an example of using --report (jesusr@redhat.com)
1221e2b
1221e2b
* Thu Aug 07 2014 cnsnyder <csnyder@redhat.com> 0.0.22-1
1221e2b
- update releasers (jesusr@redhat.com)
1221e2b
- add f21 (jesusr@redhat.com)
1221e2b
- add releasers.conf for tito (jesusr@redhat.com)
1221e2b
- Updates docs to describe use of the new report command. (csnyder@redhat.com)
1221e2b
- Updates URL to current git repo url. (csnyder@redhat.com)
1221e2b
- removes the now uncessary pack-scan.sh script (csnyder@redhat.com)
1221e2b
- Adds initconfig command to generate a default config with some preset data. (plus tests) (csnyder@redhat.com)
1221e2b
- Adds report module (and tests) with commands largely matching profile. (csnyder@redhat.com)
1221e2b
- Updates README to include a brief section on the pack-scan.sh script. (csnyder@redhat.com)
1221e2b
- Updates man page with info on option --hosts where appropriate. (csnyder@redhat.com)
1221e2b
- Changes field names to match the changes to the rho_cmds classes. Moves pack-scan.sh to /bin. (csnyder@redhat.com)
1221e2b
1221e2b
* Tue Jul 22 2014 jesus m. rodriguez <jesusr@redhat.com> 0.0.21-1
1221e2b
- Adds a RhoCmd and smoke test for subman facts --list (csnyder@redhat.com)
1221e2b
- Fixes VirtWhatRhoCmd.parse_data() exit code checking. (csnyder@redhat.com)
1221e2b
- Changes test_scan_show_fields() to use assertRaises(). (csnyder@redhat.com)
1221e2b
- Fixes date test. Adds redhat-packages tests for new fields.  (csnyder@redhat.com)
1221e2b
- Uses open() instead of file(). (csnyder@redhat.com)
1221e2b
- Fixes indexes of command results. (csnyder@redhat.com)
1221e2b
- Adds tests for RedhatPackagesRhoCmd. (csnyder@redhat.com)
1221e2b
- Adds tests for fields date.date and cpu.socket_count (csnyder@redhat.com)
1221e2b
- Adds smoke test for VirtWhatRhoCmd. (csnyder@redhat.com)
1221e2b
- Adds new field virt.num_running_guests. (csnyder@redhat.com)
1221e2b
- Pulls virt-what out of VirtRhoCmd and into VirtWhatRhoCmd.  (csnyder@redhat.com)
1221e2b
- Changes PkgInfo separator to required arg. (csnyder@redhat.com)
1221e2b
- Removes unused imports. General code clean up. (csnyder@redhat.com)
1221e2b
- Splits redhat-packages.ratio into two fields. (csnyder@redhat.com)
1221e2b
- Adds install_date and build_date to rpm query. Updates PkgInfo to use these dates. (csnyder@redhat.com)
1221e2b
- Renames MiscRhoCmd to DateRhoCmd and updates fields accordingly.  (csnyder@redhat.com)
1221e2b
- Scanner now defaults to explicit list of default commands in rho_cmds.  (csnyder@redhat.com)
1221e2b
- remove trailing whitespace (jesusr@redhat.com)
1221e2b
- Adds virt.num_guests field to pack-scan report script. (csnyder@redhat.com)
1221e2b
- Adds virt.num_guests field to VirtRhoCmd class. (csnyder@redhat.com)
1221e2b
- Adds default of '' to scan --hosts option (csnyder@redhat.com)
1221e2b
- Adds pack-scan.sh [USERNAME] [/path/to/file_of_hosts] (csnyder@redhat.com)
1221e2b
- Adds --hosts option to the scan command. (csnyder@redhat.com)
1221e2b
- Adds test for profile add --hosts and fixes up other tests (csnyder@redhat.com)
1221e2b
- chmod -x clicommands-tests.py to enable testing with nosetests (csnyder@redhat.com)
1221e2b
- Adds new option --hosts [path/to/file_of_hosts] to add a file of comma seperated hostnames to a profile. (csnyder@redhat.com)
1221e2b
- Adds new cpu report field cpu.socket_count. (csnyder@redhat.com)
1221e2b
- Adds RedHatPackagesRhoCmd that provides fields pertaining to Red Hat packages installed on a system. (csnyder@redhat.com)
1221e2b
- Adds MiscRhoCmd class for all miscellaneous commands. (csnyder@redhat.com)
1221e2b
- Adds virt-what command to help determine virt.virt and virt.type fields (csnyder@redhat.com)
1221e2b
- Scanner loads all cmds defined in rho_cmds and not in NONDEFAULT_CMDS.  (csnyder@redhat.com)
1221e2b
- stylish cleanups for setup.py (alikins@redhat.com)
1221e2b
- Include gettext if we use it. (alikins@redhat.com)
1221e2b
- Remove unused 'string' import. (alikins@redhat.com)
1221e2b
- stylish cleanups (alikins@redhat.com)
1221e2b
- import gettext (alikins@redhat.com)
1221e2b
- autopep8'ify PBKDF2.py (alikins@redhat.com)
1221e2b
- autopep8'ify the code because it needs it. (alikins@redhat.com)
1221e2b
- added rhel 5 dep for python:  python-simplejson (whayutin@thinkdoe.localdomain)
1a44dd6
9f089de
* Wed Nov 18 2009 Adrian Likins <alikins@redhat.com> 0.0.20-1
9f089de
- RHEL5 is using an even older version of python-netaddr that requires most API
9f089de
  transmogrifying. Namely, lack of netaddr.IP class. (alikins@redhat.com)
9f089de
19589d5
* Fri Nov 13 2009 Adrian Likins <alikins@redhat.com> 0.0.19-1
1f6526f
- Merge Fedora Package review spec changes from Mark McLoughlin
1f6526f
  <markmc@redhat.com> (markmc@redhat.com)
1f6526f
- Add the config file version to the begining of the encrypted config file as
1f6526f
  well (alikins@redhat.com)
1f6526f
- Change the AES ciper mode of CFB and store/retrive a 16bit initialization
1f6526f
  vector for use with CFB. (alikins@redhat.com)
1f6526f
- Use a different salt each time we say the file. (alikins@redhat.com)
1f6526f
1f6526f
* Fri Nov 13 2009 Mark McLoughlin <markmc@redhat.com> - 0.0.16-2
1f6526f
- Include egg info
1f6526f
- Drop the -O1 arg from 'setup.py install'
1f6526f
- Don't chdir for manpage install
1f6526f
- Kill some whitespace
1f6526f
1f6526f
* Wed Nov 11 2009 Adrian Likins <alikins@redhat.com> 0.0.16-1
1f6526f
- Add a RhoCmd class for detecting if we are a virt guest or host
1f6526f
  (alikins@redhat.com)
1f6526f
1f6526f
* Wed Nov 04 2009 Adrian Likins <alikins@redhat.com> 0.0.15-1
1f6526f
- add bits generated to .gitignore (shut up git) (alikins@redhat.com)
1f6526f
- Don't use weird style of classes on 2.4, use Class(object)
1f6526f
  (alikins@redhat.com)
1f6526f
- A few more tweaks to make Queue24 work the same way as the Queue.Queue in
1f6526f
  2.6. (alikins@redhat.com)
1f6526f
- On python2.4 (aka, rhel5) Queue.Queue doesn't have the .join or .task_done
1f6526f
  methods, which we use and like. So check for them and if they aren't there,
1f6526f
  use our own implementation (pretty much c&p from the 2.6 version of
1f6526f
  Queue.Queue). A little ugly, but alas. (alikins@redhat.com)
1f6526f
- use new style classes, python2.4 doesn't like class FOO()
1f6526f
  (alikins@redhat.com)
1f6526f
1f6526f
* Tue Nov 03 2009 Adrian Likins <alikins@redhat.com> 0.0.13-1
1f6526f
- Fix a bug where we weren't actually consuming the Queue if there weren't as
1f6526f
  many or more threads than hosts. (alikins@redhat.com)
1f6526f
- remove --debug option, it doesn't do anything (alikins@redhat.com)
1f6526f
1f6526f
* Sat Oct 31 2009 Devan Goodwin <dgoodwin@rm-rf.ca> 0.0.11-1
1f6526f
- Support Netaddr > 0.7 (jbowes@repl.ca)
1f6526f
- add a DmiRhoCmd. Grab some basic DMI info. (alikins@redhat.com)
1f6526f
- fix wrong help in "rho profile show" (profile, not auth)
1f6526f
  (alikins@redhat.com)
1f6526f
1f6526f
* Thu Oct 29 2009 Adrian Likins <alikins@redhat.com> 0.0.10-1
1f6526f
- add SourceURL
1f6526f
- remove ssh_queue.py
1f6526f
- fix man page install
1f6526f
1f6526f
* Wed Oct 28 2009 Devan Goodwin <dgoodwin@redhat.com> 0.0.6-1
1f6526f
- Fix "rho scan nosuchprofile". (dgoodwin@redhat.com)
1f6526f
- Update README. (dlackey@redhat.com)
1f6526f
1f6526f
* Tue Oct 27 2009 Devan Goodwin <dgoodwin@redhat.com> 0.0.5-1
1f6526f
- Too many features/bugfixes to list. Approaching first release.
1f6526f
* Wed Oct 21 2009 Devan Goodwin <dgoodwin@redhat.com> 0.0.2-1
1f6526f
- Beginning to get usable.
1f6526f
* Thu Oct 15 2009 Devan Goodwin <dgoodwin@redhat.com> 0.0.1-1
1f6526f
- Initial packaging.