fe4262
%if 0%{?fedora} || 0%{?suse_version} > 1320 || 0%{?rhel} >= 8
fe4262
%global build_py3   1
fe4262
%endif
fe4262
fe4262
Summary: Python libraries for the Spacewalk project
fe4262
Name: rhnlib
fe4262
Version: 2.8.6
893c2b
Release: 8%{?dist}
fe4262
URL:     https://github.com/spacewalkproject/spacewalk
fe4262
Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
fe4262
Patch0: rhnlib-2.8.6-1-to-rhnlib-2.8.6-2-el8.patch
fe4262
Patch1: rhnlib-2.8.6-2-el8-to-rhnlib-2.8.6-3-el8.patch
fe4262
Patch2: rhnlib-2.8.6-3-el8-to-rhnlib-2.8.6-4-el8.patch
fe4262
Patch3: rhnlib-2.8.6-4-el8-to-rhnlib-2.8.6-5-el8.patch
fe4262
Patch4: rhnlib-2.8.6-5-el8-to-rhnlib-2.8.6-6-el8.patch
fe4262
Patch5: rhnlib-2.8.6-6-el8-to-rhnlib-2.8.6-7-el8.patch
893c2b
Patch6: rhnlib-2.8.6-7-el8-to-rhnlib-2.8.6-8-el8.patch
fe4262
fe4262
License: GPLv2
fe4262
fe4262
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
fe4262
BuildArch: noarch
fe4262
%endif
fe4262
fe4262
Requires: python3-rhnlib
fe4262
fe4262
%description
fe4262
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
fe4262
fe4262
fe4262
%if 0%{?build_py3}
fe4262
%package -n python3-rhnlib
fe4262
Summary: Python libraries for the Spacewalk project
fe4262
BuildRequires: python3-devel
fe4262
Requires: python3-pyOpenSSL
fe4262
%{?python_provide:%python_provide python3-rhnlib}
fe4262
Conflicts: rhncfg < 5.10.45
fe4262
Conflicts: spacewalk-proxy-installer < 1.3.2
fe4262
Conflicts: rhn-client-tools < 1.3.3
fe4262
Conflicts: rhn-custom-info < 5.4.7
fe4262
Conflicts: rhnpush < 5.5.10
fe4262
Conflicts: rhnclient < 0.10
fe4262
Conflicts: spacewalk-proxy < 1.3.6
fe4262
fe4262
%description -n python3-rhnlib
fe4262
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
fe4262
%endif
fe4262
fe4262
%prep
fe4262
%setup -q
fe4262
%patch0 -p1
fe4262
%patch1 -p1
fe4262
%patch2 -p1
fe4262
%patch3 -p1
fe4262
%patch4 -p1
fe4262
%patch5 -p1
893c2b
%patch6 -p1
fe4262
if [ ! -e setup.py ]; then
fe4262
    sed -e 's/@VERSION@/%{version}/' -e 's/@NAME@/%{name}/' setup.py.in > setup.py
fe4262
fi
fe4262
if [ ! -e setup.cfg ]; then
fe4262
    sed 's/@RELEASE@/%{release}/' setup.cfg.in > setup.cfg
fe4262
fi
fe4262
fe4262
fe4262
%build
fe4262
make -f Makefile.rhnlib
fe4262
fe4262
fe4262
%install
fe4262
%if 0%{?build_py3}
fe4262
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix}
fe4262
%endif
fe4262
fe4262
fe4262
%clean
fe4262
fe4262
fe4262
%files
fe4262
fe4262
%if 0%{?build_py3}
fe4262
%files -n python3-rhnlib
fe4262
%doc ChangeLog COPYING README TODO
fe4262
%{python3_sitelib}/*
fe4262
%endif
fe4262
fe4262
%changelog
893c2b
* Fri Jun 21 2019 Michael Mraka <michael.mraka@redhat.com> 2.8.6-8
893c2b
- fixed build error: attempt to use unversioned python
893c2b
fe4262
* Mon Feb 04 2019 Michael Mraka <michael.mraka@redhat.com> 2.8.6-7
fe4262
- Resolves: #1666099 - python3 is picky about bytes and string
fe4262
fe4262
* Wed Dec 19 2018 Michael Mraka <michael.mraka@redhat.com> 2.8.6-6
fe4262
- Resolves: #1652859 - python3 http.client does not contain _set_hostport()
fe4262
fe4262
* Fri Nov 02 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.6-5
fe4262
- Resolves: #1643415 - forbid old SSL versions during negotiation
fe4262
  (tkasparek@redhat.com)
fe4262
fe4262
* Tue Apr 17 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.6-4
fe4262
- don't package python2 files for rhnlib (tkasparek@redhat.com)
fe4262
- be compliant with new packaging guidelines when requiring python2 packages
fe4262
  (tkasparek@redhat.com)
fe4262
fe4262
* Tue Feb 20 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.6-3
fe4262
- rhel8 utilizes python3 (tkasparek@redhat.com)
fe4262
fe4262
* Mon Feb 19 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.6-2
fe4262
- rebuild for rhel8
fe4262
fe4262
* Fri Feb 09 2018 Michael Mraka <michael.mraka@redhat.com> 2.8.6-1
fe4262
- remove install/clean section initial cleanup
fe4262
- removed Group from specfile
fe4262
- removed BuildRoot from specfiles
fe4262
fe4262
* Mon Oct 23 2017 Michael Mraka <michael.mraka@redhat.com> 2.8.5-1
fe4262
- rhnlib: enable py3 build for Tumbleweed
fe4262
fe4262
* Thu Oct 05 2017 Tomas Kasparek <tkasparek@redhat.com> 2.8.4-1
fe4262
- 1494389 - Revert "[1260527] RHEL7 reboot loop"
fe4262
- 1494389 - Revert "fix except in rhnlib to make it compatible with Python 2.4"
fe4262
fe4262
* Thu Sep 28 2017 Gennadii Altukhov <grinrag@gmail.com> 2.8.3-1
fe4262
- Python's OpenSSL.SSL.Connection method for getting state was renamed. Now
fe4262
  before run it we should determinate its name via getattr built-in function.
fe4262
fe4262
* Fri Sep 22 2017 Michael Mraka <michael.mraka@redhat.com> 2.8.2-1
fe4262
- added proper python*-rhnlib provides
fe4262
fe4262
* Wed Sep 20 2017 Gennadii Altukhov <grinrag@gmail.com> 2.8.1-1
fe4262
- 1471045 - check a state of handshake before shutdown SSL connection
fe4262
- Bumping package versions for 2.8.
fe4262
fe4262
* Mon Jul 31 2017 Eric Herget <eherget@redhat.com> 2.7.5-1
fe4262
- update copyright year
fe4262
fe4262
* Mon Jul 31 2017 Michael Mraka <michael.mraka@redhat.com> 2.7.4-1
fe4262
- move version and release before sources
fe4262
fe4262
* Mon Jul 31 2017 Jan Dobes 2.7.3-1
fe4262
- 1464157 - python 3 http calls flush
fe4262
fe4262
* Fri Apr 07 2017 Jan Dobes 2.7.2-1
fe4262
- Let the memory usage for ssl-memleak-test stabilize a bit. During the test
fe4262
  run, the first memory check is often done too quickly, and all necessary
fe4262
  memory is not allocated yet, ending is false negative test result.
fe4262
- Updated links to github in spec files
fe4262
- Migrating Fedorahosted to GitHub
fe4262
fe4262
* Tue Nov 15 2016 Gennadii Altukhov <galt@redhat.com> 2.7.1-1
fe4262
- fix except in rhnlib to make it compatible with Python 2.4
fe4262
- Bumping package versions for 2.7.
fe4262
fe4262
* Fri Nov 11 2016 Jiri Dostal <jdostal@redhat.com> 2.6.2-1
fe4262
- [1260527] RHEL7 reboot loop
fe4262
fe4262
* Thu Oct 20 2016 Gennadii Altukhov <galt@redhat.com> 2.6.1-1
fe4262
- 1381343 - make rhncfg action configfile compatible with Python 2/3
fe4262
- Bumping package versions for 2.6.
fe4262
fe4262
* Wed May 25 2016 Tomas Kasparek <tkasparek@redhat.com> 2.5.87-1
fe4262
- updating copyright years
fe4262
fe4262
* Fri Apr 22 2016 Gennadii Altukhov <galt@redhat.com> 2.5.86-1
fe4262
- Fix indentation error
fe4262
fe4262
* Fri Apr 22 2016 Gennadii Altukhov <galt@redhat.com> 2.5.85-1
fe4262
- Add binary mode for file copying for Python 3
fe4262
fe4262
* Fri Feb 19 2016 Jan Dobes 2.5.84-1
fe4262
- just set one required attribute to be compatible with all xmlrpclib versions
fe4262
- fixed SyntaxError: invalid syntax ' .. = b ' to work in python 2.4
fe4262
fe4262
* Sat Jan 23 2016 Grant Gainey 2.5.83-1
fe4262
- revert contruction errors='ignore' for python3
fe4262
- python <2.7 fix 'TypeError: encode() takes no keyword arguments'
fe4262
fe4262
* Tue Jan 19 2016 Michael Mraka <michael.mraka@redhat.com> 2.5.82-1
fe4262
- yet another python3 fixes
fe4262
fe4262
* Tue Jan 12 2016 Michael Mraka <michael.mraka@redhat.com> 2.5.81-1
fe4262
- 1259884, 1286555 - more python3 fixes
fe4262
fe4262
* Mon Jan 11 2016 Michael Mraka <michael.mraka@redhat.com> 2.5.80-1
fe4262
- 1259884, 1286555 - fixed python3 BuildRequires
fe4262
fe4262
* Mon Jan 11 2016 Michael Mraka <michael.mraka@redhat.com> 2.5.79-1
fe4262
- 1259884 - build python3-rhnlib only on fedora
fe4262
fe4262
* Fri Jan 08 2016 Michael Mraka <michael.mraka@redhat.com> 2.5.78-1
fe4262
- 1259884, 1286555 - updated to work in python3
fe4262
fe4262
* Thu Sep 24 2015 Jan Dobes 2.5.77-1
fe4262
- Bumping copyright year.
fe4262
fe4262
* Tue May 12 2015 Tomas Kasparek <tkasparek@redhat.com> 2.5.76-1
fe4262
- use single variable instead of a tuple
fe4262
- exception rising has changed in python 3
fe4262
- print is function in python3
fe4262
- make exceptions compatible with python 2.4 to 3.3
fe4262
fe4262
* Thu Mar 19 2015 Grant Gainey 2.5.75-1
fe4262
- Updating copyright info for 2015
fe4262
fe4262
* Tue Feb 03 2015 Matej Kollar <mkollar@redhat.com> 2.5.74-1
fe4262
- Updating function names
fe4262
- Documentation changes - fix name and refer to RFC.
fe4262
fe4262
* Tue Jan 13 2015 Matej Kollar <mkollar@redhat.com> 2.5.73-1
fe4262
- Getting rid of Tabs and trailing spaces in Python
fe4262
- Getting rid of Tabs and trailing spaces in LICENSE, COPYING, and README files
fe4262
fe4262
* Fri Jul 11 2014 Milan Zazrivec <mzazrivec@redhat.com> 2.5.72-1
fe4262
- fix copyright years
fe4262
fe4262
* Wed Jun 04 2014 Milan Zazrivec <mzazrivec@redhat.com> 2.5.71-1
fe4262
- SmartIO: don't use tmpDir configuration from /etc/sysconfig/rhn/up2date
fe4262
fe4262
* Fri May 30 2014 Milan Zazrivec <mzazrivec@redhat.com> 2.5.70-1
fe4262
- convert trusted certificates filenames to utf-8
fe4262
fe4262
* Thu Oct 10 2013 Michael Mraka <michael.mraka@redhat.com> 2.5.69-1
fe4262
- cleaning up old svn Ids
fe4262
fe4262
* Fri Oct 04 2013 Michael Mraka <michael.mraka@redhat.com> 2.5.68-1
fe4262
- Python: fixed UserDictCase behaviour when key is not found
fe4262
fe4262
* Mon Sep 30 2013 Michael Mraka <michael.mraka@redhat.com> 2.5.67-1
fe4262
- removed trailing whitespaces
fe4262
fe4262
* Tue Sep 17 2013 Michael Mraka <michael.mraka@redhat.com> 2.5.66-1
fe4262
- Grammar error occurred
fe4262
fe4262
* Wed Jul 17 2013 Tomas Kasparek <tkasparek@redhat.com> 2.5.65-1
fe4262
- updating copyright years
fe4262
fe4262
* Wed Jun 19 2013 Stephen Herr <sherr@redhat.com> 2.5.64-1
fe4262
- 947639 - rhnlib timeout fixes
fe4262
fe4262
* Mon Jun 17 2013 Michael Mraka <michael.mraka@redhat.com> 2.5.63-1
fe4262
- removed old CVS/SVN version ids
fe4262
- more branding cleanup
fe4262
fe4262
* Mon Jun 17 2013 Tomas Kasparek <tkasparek@redhat.com> 2.5.62-1
fe4262
- rebranding few more strings in client stuff
fe4262
fe4262
* Wed Jun 12 2013 Tomas Kasparek <tkasparek@redhat.com> 2.5.61-1
fe4262
- Revert "947639 - new rhnlib conflicts with old spacewalk-backend"
fe4262
fe4262
* Tue May 21 2013 Tomas Kasparek <tkasparek@redhat.com> 2.5.60-1
fe4262
- branding clean-up of rhel client stuff
fe4262
fe4262
* Thu May 02 2013 Stephen Herr <sherr@redhat.com> 2.5.59-1
fe4262
- 947639 - new rhnlib conflicts with old spacewalk-backend
fe4262
fe4262
* Tue Apr 09 2013 Stephen Herr <sherr@redhat.com> 2.5.58-1
fe4262
- 947639 - rhnlib update made necessary by error in rhncfg
fe4262
fe4262
* Wed Apr 03 2013 Stephen Herr <sherr@redhat.com> 2.5.57-1
fe4262
- 947639 - Make timeout of yum-rhn-plugin calls through rhn-client-tools
fe4262
  configurable
fe4262
fe4262
* Tue Apr 02 2013 Stephen Herr <sherr@redhat.com> 2.5.56-1
fe4262
- 947639 - make Proxy timeouts configurable
fe4262
- Purging %%changelog entries preceding Spacewalk 1.0, in active packages.
fe4262
fe4262
* Tue Oct 30 2012 Jan Pazdziora 2.5.55-1
fe4262
- Update the copyright year.
fe4262
fe4262
* Mon Oct 22 2012 Jan Pazdziora 2.5.54-1
fe4262
- Revert "Revert "Revert "get_server_capability() is defined twice in osad and
fe4262
  rhncfg, merge and move to rhnlib and make it member of rpclib.Server"""
fe4262
fe4262
* Thu Jun 21 2012 Jan Pazdziora 2.5.53-1
fe4262
- allow linking against openssl
fe4262
- %%defattr is not needed since rpm 4.4
fe4262
fe4262
* Thu Mar 29 2012 Jan Pazdziora 2.5.52-1
fe4262
- 807679 - replace $Revision$ with rhnlib version-release.
fe4262
fe4262
* Fri Jan 27 2012 Jan Pazdziora 2.5.51-1
fe4262
- Revert "make split_host IPv6 compliant" (msuchy@redhat.com)
fe4262
fe4262
* Wed Jan 11 2012 Miroslav Suchý 2.5.50-1
fe4262
- make split_host IPv6 compliant
fe4262
fe4262
* Wed Dec 21 2011 Milan Zazrivec <mzazrivec@redhat.com> 2.5.49-1
fe4262
- update copyright info
fe4262
fe4262
* Wed Nov 02 2011 Martin Minar <mminar@redhat.com> 2.5.48-1
fe4262
- Change PASS percentage after few attempts and print percentage in case of
fe4262
  failure (jhutar@redhat.com)
fe4262
fe4262
* Fri Oct 28 2011 Jan Pazdziora 2.5.47-1
fe4262
- Do not rely on exact amount of memomory when determinig PASS/FAIL
fe4262
  (jhutar@redhat.com)
fe4262
fe4262
* Mon Oct 24 2011 Martin Minar <mminar@redhat.com> 2.5.46-1
fe4262
- simplify code (msuchy@redhat.com)
fe4262
- move imports to beginning of file (msuchy@redhat.com)
fe4262
fe4262
* Wed Aug 17 2011 Martin Minar <mminar@redhat.com> 2.5.45-1
fe4262
- 730744 - support IPv6 connections (mzazrivec@redhat.com)
fe4262
fe4262
* Thu Aug 11 2011 Miroslav Suchý 2.5.44-1
fe4262
- do not mask original error by raise in execption
fe4262
fe4262
* Tue Aug 09 2011 Martin Minar <mminar@redhat.com> 2.5.43-1
fe4262
- 688095 - set timeout for HTTP connections (mzazrivec@redhat.com)
fe4262
fe4262
* Wed Jul 27 2011 Michael Mraka <michael.mraka@redhat.com> 2.5.42-1
fe4262
- import xmlrpclib directly
fe4262
- removed unnecessary implicit imports
fe4262
fe4262
* Fri May 20 2011 Michael Mraka <michael.mraka@redhat.com> 2.5.41-1
fe4262
- merged backend/common/UserDictCase.py into rhnlib/rhn/UserDictCase.py
fe4262
fe4262
* Wed Apr 13 2011 Jan Pazdziora 2.5.40-1
fe4262
- 683200 - simplify idn_pune_to_unicode and idn_ascii_to_pune
fe4262
  (msuchy@redhat.com)
fe4262
fe4262
* Fri Apr 08 2011 Miroslav Suchý 2.5.39-1
fe4262
- idn_ascii_to_pune() have to return string (msuchy@redhat.com)
fe4262
- Revert "idn_unicode_to_pune() have to return string" (msuchy@redhat.com)
fe4262
- update copyright years (msuchy@redhat.com)
fe4262
fe4262
* Tue Apr 05 2011 Michael Mraka <michael.mraka@redhat.com> 2.5.38-1
fe4262
- idn_unicode_to_pune() has to return string
fe4262
fe4262
* Wed Mar 30 2011 Jan Pazdziora 2.5.37-1
fe4262
- string does not exist, str is the correct thing to use here...
fe4262
  (jsherril@redhat.com)
fe4262
fe4262
* Wed Mar 16 2011 Miroslav Suchý <msuchy@redhat.com> 2.5.36-1
fe4262
- code cleanup - remove HTTPResponse.read() override
fe4262
fe4262
* Fri Mar 11 2011 Miroslav Suchý <msuchy@redhat.com> 2.5.35-1
fe4262
- 683200 - create idn_ascii_to_pune() and idn_pune_to_unicode(), which will
fe4262
  take care about corner cases of encodings.idna
fe4262
fe4262
* Wed Feb 16 2011 Miroslav Suchý <msuchy@redhat.com> 2.5.34-1
fe4262
- Revert "Revert "get_server_capability() is defined twice in osad and rhncfg,
fe4262
  merge and move to rhnlib and make it member of rpclib.Server""
fe4262
  (msuchy@redhat.com)
fe4262
fe4262
* Tue Feb 01 2011 Tomas Lestach <tlestach@redhat.com> 2.5.33-1
fe4262
- Revert "get_server_capability() is defined twice in osad and rhncfg, merge
fe4262
  and move to rhnlib and make it member of rpclib.Server" (tlestach@redhat.com)
fe4262
fe4262
* Fri Jan 28 2011 Miroslav Suchý <msuchy@redhat.com> 2.5.32-1
fe4262
- get_server_capability() is defined twice in osad and rhncfg, merge and move
fe4262
  to rhnlib and make it member of rpclib.Server
fe4262
- Updating the copyright years to include 2010.
fe4262
fe4262
* Mon Dec 20 2010 Michael Mraka <michael.mraka@redhat.com> 2.5.31-1
fe4262
- put crypto back
fe4262
fe4262
* Mon Dec 20 2010 Miroslav Suchý <msuchy@redhat.com> 2.5.30-1
fe4262
- conflitcs with older versions
fe4262
fe4262
* Wed Nov 24 2010 Michael Mraka <michael.mraka@redhat.com> 2.5.29-1
fe4262
- removed unused imports
fe4262
fe4262
* Tue Nov 02 2010 Jan Pazdziora 2.5.28-1
fe4262
- Update copyright years in the rest of the repo.
fe4262
fe4262
* Mon Sep 20 2010 Miroslav Suchý <msuchy@redhat.com> 2.5.27-1
fe4262
- add copyright file - this is required by Debian policy
fe4262
- update GPLv2 license file
fe4262
- 618267 - simplify regexp
fe4262
fe4262
* Thu Aug 05 2010 Milan Zazrivec <mzazrivec@redhat.com> 2.5.26-1
fe4262
- 618267 - do not allow control characters in xmlrpc communication
fe4262
fe4262
* Thu Jul 01 2010 Miroslav Suchý <msuchy@redhat.com> 2.5.25-1
fe4262
- 595837 - write nice error in case of "connection reset by peer" and xmlrpc
fe4262
  protocol error (msuchy@redhat.com)
fe4262
- 583980 - replace fcntl.O_NDELAY with os.O_NDELAY, for newer Pythons.
fe4262
  (jpazdziora@redhat.com)
fe4262
- 583020 - need to initialize self.send_handler for the class Server as well.
fe4262
  (jpazdziora@redhat.com)
fe4262
- Removing server from cmd-line (slukasik@redhat.com)
fe4262
- Adding port number to command line args (slukasik@redhat.com)
fe4262
- Adding shebang (slukasik@redhat.com)
fe4262
- Fixing return value (slukasik@redhat.com)
fe4262
- Fixing typo. (slukasik@redhat.com)
fe4262
fe4262
* Mon Apr 19 2010 Michael Mraka <michael.mraka@redhat.com> 2.5.24-1
fe4262
- Cleaning up, preparing for automatization
fe4262
- 575259 - properly set protocol type
fe4262