bf5d2c
# The tests fail in mock
bf5d2c
%bcond_with tests
bf5d2c
bf5d2c
# Created by pyp2rpm-3.2.2
bf5d2c
%global pypi_name ethtool
bf5d2c
bf5d2c
Name:           python-%{pypi_name}
bf5d2c
Version:        0.14
4daa87
Release:        5%{?dist}
bf5d2c
Summary:        Python module to interface with %{pypi_name}
bf5d2c
bf5d2c
License:        GPLv2
bf5d2c
URL:            https://github.com/fedora-python/%{name}
bf5d2c
Source0:        https://files.pythonhosted.org/packages/source/e/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
bf5d2c
Patch0:         0001-Fix-issue-when-interface-has-no-IPv4-address-assigne.patch
bf5d2c
Patch1:         0002-Allow-pifconfig-script-to-show-multiple-IPv4-address.patch
bf5d2c
bf5d2c
BuildRequires:  python3-devel
bf5d2c
BuildRequires:  python3-setuptools
bf5d2c
bf5d2c
BuildRequires:  libnl3-devel
bf5d2c
BuildRequires:  asciidoc
bf5d2c
bf5d2c
%description
bf5d2c
Python bindings for the ethtool kernel interface, that allows querying and
bf5d2c
changing of Ethernet card settings, such as speed, port, auto-negotiation, and
bf5d2c
PCI locations.
bf5d2c
bf5d2c
%package -n     python3-%{pypi_name}
bf5d2c
Summary:        %{summary}
bf5d2c
%{?python_provide:%python_provide python3-%{pypi_name}}
bf5d2c
bf5d2c
%description -n python3-%{pypi_name}
bf5d2c
Python 3 bindings for the ethtool kernel interface, that allows querying and
bf5d2c
changing of Ethernet card settings, such as speed, port, auto-negotiation, and
bf5d2c
PCI locations.
bf5d2c
bf5d2c
bf5d2c
%prep
bf5d2c
%autosetup -p1 -n %{pypi_name}-%{version}
bf5d2c
# Remove bundled egg-info
bf5d2c
rm -rf %{pypi_name}.egg-info
bf5d2c
bf5d2c
bf5d2c
%build
bf5d2c
%py3_build
bf5d2c
bf5d2c
a2x -d manpage -f manpage man/pethtool.8.asciidoc
bf5d2c
a2x -d manpage -f manpage man/pifconfig.8.asciidoc
bf5d2c
bf5d2c
%install
bf5d2c
%py3_install
bf5d2c
mkdir -p %{buildroot}%{_sbindir}
bf5d2c
mv %{buildroot}{%{_bindir},%{_sbindir}}/pifconfig
bf5d2c
mv %{buildroot}{%{_bindir},%{_sbindir}}/pethtool
bf5d2c
bf5d2c
mkdir -p %{buildroot}%{_mandir}/man8/
bf5d2c
%{__gzip} -c man/pethtool.8 > %{buildroot}%{_mandir}/man8/pethtool.8.gz
bf5d2c
%{__gzip} -c man/pifconfig.8 > %{buildroot}%{_mandir}/man8/pifconfig.8.gz
bf5d2c
bf5d2c
bf5d2c
%if %{with tests}
bf5d2c
%check
bf5d2c
export PYTHONPATH=%{buildroot}%{python3_sitearch}
bf5d2c
%{__python3} tests/parse_ifconfig.py -v
bf5d2c
%{__python3}  -m unittest discover -v
bf5d2c
%endif
bf5d2c
bf5d2c
bf5d2c
%files -n python3-%{pypi_name}
bf5d2c
%doc README.rst CHANGES.rst
bf5d2c
%license COPYING
bf5d2c
%{_sbindir}/pifconfig
bf5d2c
%{_sbindir}/pethtool
bf5d2c
%doc %{_mandir}/man8/*
bf5d2c
%{python3_sitearch}/%{pypi_name}.cpython-%{python3_version_nodots}*.so
bf5d2c
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
bf5d2c
bf5d2c
%changelog
4daa87
* Mon Feb 07 2022 John Kacur <jkacur@redhat.com> - 0.15-5
4daa87
- Add functional test to python-ethtool
4daa87
- Resolves: rhbz#2051609
4daa87
bf5d2c
* Thu Jan 20 2022 John Kacur <jkacur@redhat.com> - 0.14-4
bf5d2c
- Rebuild for rhel-8.6, no functional change
bf5d2c
- Resolves: rhbz#2042222
bf5d2c
bf5d2c
* Sat Dec 08 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-3
bf5d2c
- Backport patch from upstream/rhel7 which allows pifconfig to show
bf5d2c
  multiple IPv4 addresses for each interface
bf5d2c
- Move patches to dist-git
bf5d2c
- Resolves: rhbz#1652174
bf5d2c
bf5d2c
* Thu Nov 08 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-2
bf5d2c
- Backport upstream bugfix patch
bf5d2c
- Resolves: rhbz#1637918
bf5d2c
bf5d2c
* Mon Sep 17 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-1
bf5d2c
- New upstream version
bf5d2c
- Resolves: rhbz#1606952
bf5d2c
bf5d2c
* Tue Jun 05 2018 Petr Viktorin <pviktori@redhat.com> - 0.13-5
bf5d2c
- Remove the Python 2 version
bf5d2c
  https://bugzilla.redhat.com/show_bug.cgi?id=1567419
bf5d2c
bf5d2c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-4
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
bf5d2c
bf5d2c
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-3
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
bf5d2c
bf5d2c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-2
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bf5d2c
bf5d2c
* Tue Jun 13 2017 Miro Hrončok <mhroncok@redhat.com> - 0.13-1
bf5d2c
- Updated to 0.13
bf5d2c
- Added python3 and python2 subpackages
bf5d2c
- Add --with tests
bf5d2c
- Modernize spec
bf5d2c
- Remove merged patch
bf5d2c
- Update upstream URL
bf5d2c
bf5d2c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-8
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bf5d2c
bf5d2c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-7
bf5d2c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
bf5d2c
bf5d2c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-6
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bf5d2c
bf5d2c
* Mon Jun 22 2015 Yaakov Selkowitz <yselkowi@redhat.com> - 0.11-5
bf5d2c
- Fix compile on F23
bf5d2c
bf5d2c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-4
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
bf5d2c
bf5d2c
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-3
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
bf5d2c
bf5d2c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
bf5d2c
bf5d2c
* Thu May 8 2014 David Sommerseth <davids@redhat.com> - 0.11-1
bf5d2c
- Updated to the lastest python-ethtool-0.11 release, which
bf5d2c
  incorporates all these additional patches and improves
bf5d2c
  libnl3 connection error checking.
bf5d2c
bf5d2c
* Mon Apr 7 2014 David Sommerseth <davids@redhat.com> - 0.10-6
bf5d2c
- Removed the never close netlink patch
bf5d2c
- Added a patch which will ensure it will open a valid socket in open_netlink()
bf5d2c
bf5d2c
* Wed Apr 2 2014 David Sommerseth <davids@redhat.com> - 0.10-5
bf5d2c
- Update patch 8 - to also never close the netlink socket
bf5d2c
bf5d2c
* Wed Apr 2 2014 David Sommerseth <davids@redhat.com> - 0.10-4
bf5d2c
- Added patch 8 - to see of FD_CLOEXEC impacts vdsm
bf5d2c
bf5d2c
* Tue Apr 1 2014 David Sommerseth <davids@redhat.com> - 0.10-3
bf5d2c
- Added patch 6 and 7, to improve error handling.  Will be removed when released upstream
bf5d2c
bf5d2c
* Thu Mar 20 2014 David Sommerseth <davids@redhat.com> - 0.10-2
bf5d2c
- Added patch 1, 2, 4 and 5; they have not appeared in an upstream release yet
bf5d2c
bf5d2c
* Thu Jan 09 2014 David Sommerseth <davids@redhat.com> - 0.10-1
bf5d2c
- Updated to v0.10
bf5d2c
bf5d2c
* Wed Dec 11 2013 David Sommerseth <davids@redhat.com> - 0.9-2
bf5d2c
- Forced rebuild with new tarball. Had pushed up old version.
bf5d2c
bf5d2c
* Tue Dec 10 2013 David Sommerseth <davids@redhat.com> - 0.9-1
bf5d2c
- Rebased against upstream 0.9
bf5d2c
bf5d2c
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-2
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bf5d2c
bf5d2c
* Tue Feb 19 2013 David Malcolm <dmalcolm@redhat.com> - 0.8-1
bf5d2c
- 0.8
bf5d2c
bf5d2c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-5
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bf5d2c
bf5d2c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-4
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
bf5d2c
bf5d2c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-3
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
bf5d2c
bf5d2c
* Wed Apr 13 2011 David Sommerseth <davids@redhat.com> - 0.7-2
bf5d2c
- Fixed missing man page packaging
bf5d2c
bf5d2c
* Mon Apr 11 2011 David Sommerseth <davids@redhat.com> - 0.7-1
bf5d2c
- Fixed several memory leaks (commit aa2c20e697af, abc7f912f66d)
bf5d2c
- Improved error checking towards NULL values(commit 4e928d62a8e3)
bf5d2c
- Fixed typo in pethtool --help (commit 710766dc722)
bf5d2c
- Only open a NETLINK connection when needed (commit 508ffffbb3c)
bf5d2c
- Added man page for pifconfig and pethtool (commit 9f0d17aa532, rhbz#638475)
bf5d2c
- Force NETLINK socket to close on fork() using FD_CLOEXEC (commit 1680cbeb40e)
bf5d2c
bf5d2c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
bf5d2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
bf5d2c
bf5d2c
* Wed Jan 19 2011 David Sommerseth <dazo@users.sourceforge.net> - 0.6-1
bf5d2c
- Don't segfault if we don't receive any address from rtnl_link_get_addr()
bf5d2c
- Remove errornous file from MANIFEST
bf5d2c
- Added ethtool.version string constant
bf5d2c
- Avoid duplicating IPv6 address information
bf5d2c
- import sys module in setup.py (Miroslav Suchy)
bf5d2c
bf5d2c
* Mon Aug  9 2010 David Sommerseth <davids@redhat.com> - 0.5-1
bf5d2c
- Fixed double free issue (commit c52ed2cbdc5b851ebc7b)
bf5d2c
bf5d2c
* Wed Apr 28 2010 David Sommerseth <davids@redhat.com> - 0.4-1
bf5d2c
- David Sommerseth is now taking over the maintenance of python-ethtool
bf5d2c
- New URLs for upstream source code
bf5d2c
- Added new API: ethtool.get_interfaces_info() - returns list of etherinfo objects
bf5d2c
- Added support retrieving for IPv6 address, using etherinfo::get_ipv6_addresses()
bf5d2c
bf5d2c
* Fri Sep  5 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.3-2
bf5d2c
- Rewrote build and install sections as part of the fedora review process
bf5d2c
  BZ #459549
bf5d2c
bf5d2c
* Tue Aug 26 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.3-1
bf5d2c
- Add get_flags method from the first python-ethtool contributor, yay
bf5d2c
- Add pifconfig command, that mimics the ifconfig tool using the
bf5d2c
  bindings available
bf5d2c
bf5d2c
* Wed Aug 20 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.2-1
bf5d2c
- Expand description and summary fields, as part of the fedora
bf5d2c
  review process.
bf5d2c
bf5d2c
* Tue Jun 10 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-3
bf5d2c
- add dist to the release tag
bf5d2c
bf5d2c
* Tue Dec 18 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-2
bf5d2c
- First build into MRG repo
bf5d2c
bf5d2c
* Tue Dec 18 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-1
bf5d2c
- Get ethtool code from rhpl 0.212