Blame SPECS/python-ethtool.spec

ff8230
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
ff8230
%{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")}
ff8230
ff8230
Summary: Ethernet settings python bindings
ff8230
Name: python-ethtool
ff8230
Version: 0.8
ff8230
Release: 8%{?dist}
ff8230
URL: https://github.com/fedora-python/%{name}
ff8230
Source: https://github.com/fedora-python/%{name}/archive/v%{version}.tar.gz
ff8230
Patch0: python-ethtool-0.6-make-pifconfig-output-all-ipv4-addresses-for-interface.patch
ff8230
Patch1: python-ethtool-0.6-return-ipv6-only-interface-names.patch
ff8230
# Properly check libnl return codes and don't fall with segfault
ff8230
Patch2: python-ethtool-0.8-check-libnl-return-codes.patch
ff8230
# Fix display of long network interface names
ff8230
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1330432
ff8230
# Fixed upstream: https://github.com/fedora-python/python-ethtool/pull/31/files
ff8230
Patch3: fix-long-interface-names.patch
ff8230
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1467845
ff8230
Patch4: fix-missing-error-checking-when-reading-proc-net-dev.patch
ff8230
ff8230
License: GPLv2
ff8230
Group: System Environment/Libraries
ff8230
BuildRequires: python-devel libnl-devel asciidoc
ff8230
%if 0%{?rhel} && 0%{?rhel} < 5
ff8230
BuildRequires: pkgconfig gcc
ff8230
%endif
ff8230
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ff8230
ff8230
%description
ff8230
Python bindings for the ethtool kernel interface, that allows querying and
ff8230
changing of Ethernet card settings, such as speed, port, auto-negotiation, and
ff8230
PCI locations.
ff8230
ff8230
%prep
ff8230
%setup -q
ff8230
%patch0 -p1
ff8230
%patch1 -p1
ff8230
%patch2 -p1
ff8230
%patch3 -p1
ff8230
%patch4 -p1
ff8230
ff8230
%build
ff8230
%{__python} setup.py build
ff8230
a2x -d manpage -f manpage man/pethtool.8.asciidoc
ff8230
a2x -d manpage -f manpage man/pifconfig.8.asciidoc
ff8230
ff8230
%install
ff8230
rm -rf %{buildroot}
ff8230
%{__python} setup.py install --skip-build --root %{buildroot}
ff8230
mkdir -p %{buildroot}%{_sbindir}  %{buildroot}%{_mandir}/man8
ff8230
cp -p pethtool.py %{buildroot}%{_sbindir}/pethtool
ff8230
cp -p pifconfig.py %{buildroot}%{_sbindir}/pifconfig
ff8230
%{__gzip} -c man/pethtool.8 > %{buildroot}%{_mandir}/man8/pethtool.8.gz
ff8230
%{__gzip} -c man/pifconfig.8 > %{buildroot}%{_mandir}/man8/pifconfig.8.gz
ff8230
ff8230
%clean
ff8230
rm -rf %{buildroot}
ff8230
ff8230
%files
ff8230
%defattr(-,root,root)
ff8230
%doc COPYING
ff8230
%{_sbindir}/pethtool
ff8230
%{_sbindir}/pifconfig
ff8230
%doc %{_mandir}/man8/*
ff8230
%{python_sitearch}/ethtool.so
ff8230
%if "%{python_ver}" >= "2.5"
ff8230
%{python_sitearch}/*.egg-info
ff8230
%endif
ff8230
ff8230
%changelog
ff8230
* Tue Dec 18 2018 Lumír Balhar <lbalhar@redhat.com> - 0.8-8
ff8230
- Fix missing error checking when reading from /proc/net/dev
ff8230
- Resolves: rhbz#1467845
ff8230
ff8230
* Tue Apr 17 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.8-7
ff8230
- Fix the URL's to point to the proper upstream repositories
ff8230
Resolves: rhbz#1502393
ff8230
ff8230
* Mon Apr 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.8-6
ff8230
- Fix diplay of long network interface names
ff8230
Resolves: rhbz#1330432
ff8230
ff8230
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.8-5
ff8230
- Mass rebuild 2014-01-24
ff8230
ff8230
* Mon Jan 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.8-4
ff8230
- Properly check libnl return codes, don't segfault.
ff8230
Resolves: rhbz#1051392
ff8230
ff8230
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.8-3
ff8230
- Mass rebuild 2013-12-27
ff8230
ff8230
* Thu Nov 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.8-2
ff8230
- Fixed reporting of more IPv4 addresses per interface
ff8230
Resolves: rhbz#1027685
ff8230
- Make get_active_devices() return IPv6-only devices, too
ff8230
Resolves: rhbz#1027678
ff8230
ff8230
* Tue Feb 19 2013 David Malcolm <dmalcolm@redhat.com> - 0.8-1
ff8230
- 0.8
ff8230
ff8230
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-5
ff8230
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ff8230
ff8230
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-4
ff8230
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ff8230
ff8230
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-3
ff8230
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ff8230
ff8230
* Wed Apr 13 2011 David Sommerseth <davids@redhat.com> - 0.7-2
ff8230
- Fixed missing man page packaging
ff8230
ff8230
* Mon Apr 11 2011 David Sommerseth <davids@redhat.com> - 0.7-1
ff8230
- Fixed several memory leaks (commit aa2c20e697af, abc7f912f66d)
ff8230
- Improved error checking towards NULL values(commit 4e928d62a8e3)
ff8230
- Fixed typo in pethtool --help (commit 710766dc722)
ff8230
- Only open a NETLINK connection when needed (commit 508ffffbb3c)
ff8230
- Added man page for pifconfig and pethtool (commit 9f0d17aa532, rhbz#638475)
ff8230
- Force NETLINK socket to close on fork() using FD_CLOEXEC (commit 1680cbeb40e)
ff8230
ff8230
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
ff8230
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ff8230
ff8230
* Wed Jan 19 2011 David Sommerseth <dazo@users.sourceforge.net> - 0.6-1
ff8230
- Don't segfault if we don't receive any address from rtnl_link_get_addr()
ff8230
- Remove errornous file from MANIFEST
ff8230
- Added ethtool.version string constant
ff8230
- Avoid duplicating IPv6 address information
ff8230
- import sys module in setup.py (Miroslav Suchy)
ff8230
ff8230
* Mon Aug  9 2010 David Sommerseth <davids@redhat.com> - 0.5-1
ff8230
- Fixed double free issue (commit c52ed2cbdc5b851ebc7b)
ff8230
ff8230
* Wed Apr 28 2010 David Sommerseth <davids@redhat.com> - 0.4-1
ff8230
- David Sommerseth is now taking over the maintenance of python-ethtool
ff8230
- New URLs for upstream source code
ff8230
- Added new API: ethtool.get_interfaces_info() - returns list of etherinfo objects
ff8230
- Added support retrieving for IPv6 address, using etherinfo::get_ipv6_addresses()
ff8230
ff8230
* Fri Sep  5 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.3-2
ff8230
- Rewrote build and install sections as part of the fedora review process
ff8230
  BZ #459549
ff8230
ff8230
* Tue Aug 26 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.3-1
ff8230
- Add get_flags method from the first python-ethtool contributor, yay
ff8230
- Add pifconfig command, that mimics the ifconfig tool using the
ff8230
  bindings available
ff8230
ff8230
* Wed Aug 20 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.2-1
ff8230
- Expand description and summary fields, as part of the fedora
ff8230
  review process.
ff8230
ff8230
* Tue Jun 10 2008 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-3
ff8230
- add dist to the release tag
ff8230
ff8230
* Tue Dec 18 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-2
ff8230
- First build into MRG repo
ff8230
ff8230
* Tue Dec 18 2007 Arnaldo Carvalho de Melo <acme@redhat.com> - 0.1-1
ff8230
- Get ethtool code from rhpl 0.212