From 1b86e0051f8d6b0159595666356ec4d4604f022c Mon Sep 17 00:00:00 2001 From: Alex Wood Date: Jul 27 2017 15:40:23 +0000 Subject: Update python-rhsm to 1.20.1-1 Resolves: #1472715 - Python module rhsm should never call exit() (jhnidek@redhat.com) Resolves: #1444453 - Have gettext return unicode instead of bytes. (awood@redhat.com) Resolves: #1457197 - Env. variable no_proxy=* is not ignored (jhnidek@redhat.com) Resolves: #1392709 - Display better error msg., when wrong proxy is set up Resolves: #1443159 - Added default value for splay configuration (jhnidek@redhat.com) Resolves: #1451166 - Fix Host header when using proxy (khowell@redhat.com) Resolves: #1426343 - fixed rct to display cert without subjectAltName. Resolves: #1432990 - Better message for bad CA cert (wpoteat@redhat.com) --- diff --git a/.gitignore b/.gitignore index 6b8cf2b..949df87 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ /python-rhsm-1.19.0.tar.gz /python-rhsm-1.19.1.tar.gz /python-rhsm-1.19.4.tar.gz +/python-rhsm-1.20.1.tar.gz diff --git a/python-rhsm.spec b/python-rhsm.spec index c430617..1b3564b 100644 --- a/python-rhsm.spec +++ b/python-rhsm.spec @@ -1,22 +1,16 @@ -# If on Fedora 12 or RHEL 5 or earlier, we need to define these: -%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif - -# Use python-simplejson on RHEL 5 as there is no json module in Python 2.4. -# On RHEL 6, we'll use it if it's installed (see ourjson.py). -# simplejson is not available in RHEL 7 at all. -%global use_simplejson (0%{?rhel} && 0%{?rhel} == 5) - -# on non-EOL Fedora and RHEL 7, let's not use m2crypto +# on recent Fedora and RHEL 7, let's not use m2crypto %global use_m2crypto (0%{?fedora} < 23 && 0%{?rhel} < 7) %global _hardened_build 1 %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro -Wl,-z,now} +# SLES 11 and RHEL6 don't have macros defined for python2; just "python". Alias them. +%{!?__python2:%global __python2 %__python} +%{!?python2_sitearch:%global python2_sitearch %python_sitearch} + Name: python-rhsm -Version: 1.19.4 -Release: 2%{?dist} +Version: 1.20.1 +Release: 1%{?dist} Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform Group: Development/Libraries @@ -30,34 +24,53 @@ Source0: %{name}-%{version}.tar.gz URL: http://www.candlepinproject.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# The %{?something:foo} expands to foo only when something is **defined**. Likewise the +# %{!?something:foo} expands only when something is **not defined**. +BuildRequires: %{?suse_version:python-devel >= 2.6} %{!?suse_version:python2-devel} +BuildRequires: python-setuptools +BuildRequires: python-six +BuildRequires: openssl-devel + %if %use_m2crypto -%if 0%{?sles_version} -Requires: python-m2crypto -%else -Requires: m2crypto -%endif +Requires: %{?suse_version:python-m2crypto} %{!?suse_version:m2crypto} %endif +Requires: python-dateutil Requires: python-iniparse +# rpm-python is an old name for python2-rpm but RHEL6 uses the old name Requires: rpm-python -Requires: python-dateutil -%if %use_simplejson -Requires: python-simplejson -%endif +Requires: python-six Requires: python-rhsm-certificates = %{version}-%{release} -%if 0%{?sles_version} -BuildRequires: python-devel >= 2.6 -%else -BuildRequires: python2-devel -%endif -BuildRequires: python-setuptools +%{?python_provide:%python_provide %{name}} + +%global _description \ +A small library for communicating with the REST interface of a Red Hat Unified\ +Entitlement Platform. This interface is used for the management of system\ +entitlements, certificates, and access to content. + +%description %{_description} + + +%if %{defined __python3} +%package -n python3-%{name} +Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-six BuildRequires: openssl-devel +Requires: python3-dateutil +Requires: python3-iniparse +Requires: python3-rpm +Requires: python3-six +# M2Crypto isn't even used in new Fedoras and RHEL 8 +Requires: python-rhsm-certificates = %{version}-%{release} -%description -A small library for communicating with the REST interface of a Red Hat Unified -Entitlement Platform. This interface is used for the management of system -entitlements, certificates, and access to content. +# Required by Fedora packaging guidelines +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} %{_description} +%endif %package certificates @@ -76,24 +89,37 @@ Python. The name instead reflects its relationship to python-rhsm. %build # create a version.py with the rpm version info PYTHON_RHSM_VERSION=%{version} PYTHON_RHSM_RELEASE=%{release} CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %{__python} setup.py build +%if %{defined __python3} +PYTHON_RHSM_VERSION=%{version} PYTHON_RHSM_RELEASE=%{release} CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %{__python3} setup.py build +%endif %install rm -rf %{buildroot} -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix} +%if %{defined __python3} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix} +%endif mkdir -p %{buildroot}%{_sysconfdir}/rhsm/ca install etc-conf/ca/*.pem %{buildroot}%{_sysconfdir}/rhsm/ca %clean rm -rf %{buildroot} -%files +%files -n %{name} %defattr(-,root,root,-) %doc README +%dir %{python2_sitearch}/rhsm +%{python2_sitearch}/rhsm/* +%{python2_sitearch}/rhsm-*.egg-info -%dir %{python_sitearch}/rhsm - -%{python_sitearch}/rhsm/* -%{python_sitearch}/rhsm-*.egg-info +%if %{defined __python3} +%files -n python3-%{name} +%defattr(-,root,root,-) +%doc README +%dir %{python3_sitearch}/rhsm +%{python3_sitearch}/rhsm/* +%{python3_sitearch}/rhsm-*.egg-info +%endif %files certificates %attr(755,root,root) %dir %{_sysconfdir}/rhsm @@ -102,8 +128,28 @@ rm -rf %{buildroot} %attr(644,root,root) %{_sysconfdir}/rhsm/ca/*.pem %changelog -* Thu Jul 27 2017 Fedora Release Engineering - 1.19.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild +* Thu Jul 27 2017 Alex Wood 1.20.1-1 +- 1472715: Python module rhsm should never call exit() (jhnidek@redhat.com) +- 1444453: Have gettext return unicode instead of bytes. (awood@redhat.com) +- 1457197: Env. variable no_proxy=* is not ignored (jhnidek@redhat.com) +- 1392709: Display better error msg., when wrong proxy is set up + (jhnidek@redhat.com) +- Python 3 compatability changes (awood@redhat.com) +- 1443159: Added default value for splay configuration (jhnidek@redhat.com) +- 1451166: Fix Host header when using proxy (khowell@redhat.com) +- Add preliminary zypper support (khowell@redhat.com) + +* Mon May 08 2017 Kevin Howell 1.20.0-1 +- Bump version to 1.20.0 + +* Tue May 02 2017 Kevin Howell 1.19.6-1 +- 1426343: fixed rct to display cert without subjectAltName. + (jhnidek@redhat.com) +- Add Update subscriptions pools (tcoufal@redhat.com) +- Add support to list future subscription pools (tcoufal@redhat.com) + +* Mon Apr 17 2017 Kevin Howell 1.19.5-1 +- 1432990: Better message for bad CA cert (wpoteat@redhat.com) * Mon Apr 10 2017 Kevin Howell 1.19.4-1 - 1438552: Allows releases to be listed through a proxy (csnyder@redhat.com) diff --git a/sources b/sources index 7c8b607..30cee21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-rhsm-1.19.4.tar.gz) = f1a4fa5ca874b31e52c4d94b83bd897101df2ad2b1322ce164c12e23d5f9aa2c7e95df5831cbd989540243301883ebc9cf4a229d344119343d02579a1464fbbb +SHA512 (python-rhsm-1.20.1.tar.gz) = de66bcfda1c746b30fdb466f0472d37b486e4a5d709c1f8ecbc65a0ac9ae71d12b5947539944ad1122cb4ac5a264414894305a8fe8b759c56c6a30a5f5ff5134