diff --git a/.gitignore b/.gitignore index e340b4e..3d2c1be 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/python-rhsm-1.10.12.tar.gz +SOURCES/python-rhsm-1.13.10.tar.gz diff --git a/.python-rhsm.metadata b/.python-rhsm.metadata index 88961b6..4b71a4d 100644 --- a/.python-rhsm.metadata +++ b/.python-rhsm.metadata @@ -1 +1 @@ -c8af40e399621a0f0e470e0cfad1515c6cd96b70 SOURCES/python-rhsm-1.10.12.tar.gz +5aacef3155491c3cec40c41075d133ca3ca435a7 SOURCES/python-rhsm-1.13.10.tar.gz diff --git a/SOURCES/python-rhsm-1.10.12-1-to-python-rhsm-1.10.12-2.patch b/SOURCES/python-rhsm-1.10.12-1-to-python-rhsm-1.10.12-2.patch deleted file mode 100644 index 3d13c39..0000000 --- a/SOURCES/python-rhsm-1.10.12-1-to-python-rhsm-1.10.12-2.patch +++ /dev/null @@ -1,206 +0,0 @@ -diff --git a/python-rhsm.spec b/python-rhsm.spec -index 961277a..2b75fd4 100644 ---- a/python-rhsm.spec -+++ b/python-rhsm.spec -@@ -6,7 +6,7 @@ - - Name: python-rhsm - Version: 1.10.12 --Release: 1%{?dist} -+Release: 2%{?dist} - - Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform - Group: Development/Libraries -@@ -62,6 +62,11 @@ rm -rf %{buildroot} - %attr(640,root,root) %{_sysconfdir}/rhsm/ca/*.pem - - %changelog -+* Fri Mar 21 2014 ckozak 1.10.12-2 -+- Add attributes for brand_name (alikins@redhat.com) -+- updated tito.props (ckozak@redhat.com) -+- removed other releasers (ckozak@redhat.com) -+ - * Mon Feb 03 2014 ckozak 1.10.12-1 - - Add request_certs option to getEntitlementList() call (vitty@redhat.com) - -diff --git a/rel-eng/packages/python-rhsm b/rel-eng/packages/python-rhsm -index f14a76c..26459c5 100644 ---- a/rel-eng/packages/python-rhsm -+++ b/rel-eng/packages/python-rhsm -@@ -1 +1 @@ --1.10.12-1 ./ -+1.10.12-2 ./ -diff --git a/rel-eng/releasers.conf b/rel-eng/releasers.conf -index df87e9d..1c70693 100644 ---- a/rel-eng/releasers.conf -+++ b/rel-eng/releasers.conf -@@ -1,49 +1,3 @@ --[yum-f19-x86_64] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = fedora-19-x86_64 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/fedora-19/x86_64/ -- --[yum-f19-i386] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = fedora-19-i386 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/fedora-19/i386/ -- --[yum-f18-x86_64] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = fedora-18-x86_64 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/fedora-18/x86_64/ -- --[yum-f18-i386] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = fedora-18-i386 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/fedora-18/i386/ -- --[yum-el6-x86_64] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = epel-6-x86_64 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/epel-6Server/x86_64/ fedorapeople.org:/srv/repos/candlepin/subscription-manager/epel-6/x86_64/ -- --[yum-el6-i386] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = epel-6-i386 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/epel-6Server/i386/ fedorapeople.org:/srv/repos/candlepin/subscription-manager/epel-6/i386/ -- --[yum-el5-x86_64] --releaser = tito.release.YumRepoReleaser --builder = tito.builder.MockBuilder --builder.mock = epel-5-x86_64 --rsync = fedorapeople.org:/srv/repos/candlepin/subscription-manager/epel-5Server/x86_64/ fedorapeople.org:/srv/repos/candlepin/subscription-manager/epel-5/x86_64/ -- --[fedora] --releaser = tito.release.FedoraGitReleaser --branches = master f20 f19 -- - [rhel-7.0] - releaser = tito.release.DistGitReleaser - branches = rhel-7.0 -diff --git a/rel-eng/tito.props b/rel-eng/tito.props -index b1125f2..6f078a5 100644 ---- a/rel-eng/tito.props -+++ b/rel-eng/tito.props -@@ -1,4 +1,5 @@ - [globalconfig] --default_builder = tito.builder.Builder --default_tagger = tito.tagger.VersionTagger -+#default_builder = tito.builder.UpstreamBuilder -+default_builder = tito.distributionbuilder.DistributionBuilder -+default_tagger = tito.tagger.ReleaseTagger - -diff --git a/src/rhsm/certificate.py b/src/rhsm/certificate.py -index 3cf3efc..5ef6557 100644 ---- a/src/rhsm/certificate.py -+++ b/src/rhsm/certificate.py -@@ -1057,6 +1057,7 @@ class Product: - self.arch = self.ext.get('3') - self.provided_tags = parse_tags(self.ext.get('4')) - self.brand_type = self.ext.get('5') -+ self.brand_name = self.ext.get('6') - - def getHash(self): - return self.hash -@@ -1076,6 +1077,9 @@ class Product: - def getBrandType(self): - return self.brand_type - -+ def getBrandName(self): -+ return self.brand_name -+ - def __eq__(self, rhs): - return (self.getHash() == rhs.getHash()) - -@@ -1088,6 +1092,7 @@ class Product: - s.append('\tArchitecture . = %s' % self.getArch()) - s.append('\tProvided Tags = %s' % self.getProvidedTags()) - s.append('\tBrand Type = %s' % self.getBrandType()) -+ s.append('\tBrand Name = %s' % self.getBrandName()) - s.append('}') - return '\n'.join(s) - -diff --git a/src/rhsm/certificate2.py b/src/rhsm/certificate2.py -index 4cc3cb1..45bad84 100644 ---- a/src/rhsm/certificate2.py -+++ b/src/rhsm/certificate2.py -@@ -186,7 +186,10 @@ class _CertFactory(object): - version=ext.get('2'), - architectures=ext.get('3'), - provided_tags=parse_tags(ext.get('4')), -- brand_type=ext.get('5') -+ # not populated, only added for parity with -+ # v3 product objects -+ brand_type=ext.get('5'), -+ brand_name=ext.get('6') - )) - return products - -@@ -324,7 +327,8 @@ class _CertFactory(object): - name=product['name'], - version=product.get('version', None), - architectures=product.get('architectures', []), -- brand_type=product.get('brand_type', None) -+ brand_type=product.get('brand_type', None), -+ brand_name=product.get('brand_name', None) - )) - # TODO: skipping provided tags here, we don't yet generate - # v3 product certs, we may never, which is the only place provided -@@ -615,7 +619,7 @@ class Product(object): - Represents the product information from a certificate. - """ - def __init__(self, id=None, name=None, version=None, architectures=None, -- provided_tags=None, brand_type=None): -+ provided_tags=None, brand_type=None, brand_name=None): - - if name is None: - raise CertificateException("Product missing name") -@@ -639,6 +643,7 @@ class Product(object): - self.provided_tags = [] - - self.brand_type = brand_type -+ self.brand_name = brand_name - - def __eq__(self, other): - return (self.id == other.id) -diff --git a/test/unit/certificate2-tests.py b/test/unit/certificate2-tests.py -index 78cdcd6..88a1b85 100644 ---- a/test/unit/certificate2-tests.py -+++ b/test/unit/certificate2-tests.py -@@ -45,6 +45,12 @@ class V1ProductCertTests(unittest.TestCase): - self.prod_cert.products[0].brand_type = brand_type - self.assertEquals(brand_type, self.prod_cert.products[0].brand_type) - -+ def test_set_brand_name(self): -+ brand_name = "Awesome OS Super" -+ -+ self.prod_cert.products[0].brand_name = brand_name -+ self.assertEquals(brand_name, self.prod_cert.products[0].brand_name) -+ - - class V1EntCertTests(unittest.TestCase): - -@@ -351,3 +357,17 @@ class ProductTests(unittest.TestCase): - p = Product(id="pid", name="pname", - brand_type=None) - self.assertTrue(p.brand_type is None) -+ -+ def test_no_brand_name(self): -+ p = Product(id="pid", name="pname") -+ self.assertTrue(p.brand_name is None) -+ -+ def test_brand_name(self): -+ p = Product(id="pid", name="pname", -+ brand_name="pbrand_name") -+ self.assertTrue(p.brand_name == "pbrand_name") -+ -+ def test_brand_name_none(self): -+ p = Product(id="pid", name="pname", -+ brand_name=None) -+ self.assertTrue(p.brand_name is None) diff --git a/SPECS/python-rhsm.spec b/SPECS/python-rhsm.spec index b37d652..1862b1f 100644 --- a/SPECS/python-rhsm.spec +++ b/SPECS/python-rhsm.spec @@ -3,10 +3,15 @@ %{!?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) + Name: python-rhsm -Version: 1.10.12 -Release: 2%{?dist} +Version: 1.13.10 +Release: 1%{?dist} Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform Group: Development/Libraries @@ -17,13 +22,16 @@ License: GPLv2 # cd client/python-rhsm # tito build --tag python-rhsm-$VERSION-$RELEASE --tgz Source0: %{name}-%{version}.tar.gz -Patch0: python-rhsm-1.10.12-1-to-python-rhsm-1.10.12-2.patch URL: http://fedorahosted.org/candlepin BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: m2crypto Requires: python-iniparse Requires: rpm-python +Requires: python-dateutil +%if %use_simplejson +Requires: python-simplejson +%endif BuildRequires: python2-devel BuildRequires: python-setuptools @@ -37,7 +45,6 @@ entitlements, certificates, and access to content. %prep %setup -q -n python-rhsm-%{version} -%patch0 -p1 %build %{__python} setup.py build @@ -61,13 +68,85 @@ rm -rf %{buildroot} %{python_sitearch}/rhsm/* %{python_sitearch}/rhsm-*.egg-info -%attr(640,root,root) %{_sysconfdir}/rhsm/ca/*.pem +%attr(644,root,root) %{_sysconfdir}/rhsm/ca/*.pem %changelog -* Fri Mar 21 2014 ckozak 1.10.12-2 +* Fri Jan 09 2015 William Poteat 1.13.10-1 +- Add custom JSON encoding for set objects. (awood@redhat.com) +- Update SSL context options to follow the M2Crypto standard idiom. + (awood@redhat.com) + +* Wed Jan 07 2015 Devan Goodwin 1.13.9-1 +- Allow clients to report product tags. (awood@redhat.com) + +* Fri Nov 21 2014 William Poteat 1.13.8-1 +- + +* Fri Nov 07 2014 Unknown name 1.13.7-1 +- + +* Thu Oct 23 2014 Alex Wood 1.13.6-1 +- 1153375: Support TLSv1.2 and v1.1 by default. (alikins@redhat.com) +- Set CA PEM files permissions to 644. (awood@redhat.com) + +* Thu Oct 16 2014 Devan Goodwin 1.13.5-1 +- Renamed the "containstext" parameter to "matches." (crog@redhat.com) + +* Thu Oct 16 2014 Devan Goodwin 1.13.4-1 +- Added support for contains_text to UEPConnection.getPoolsList + (crog@redhat.com) + +* Fri Oct 03 2014 Alex Wood 1.13.3-1 +- Make more use of setup.py. (alikins@redhat.com) + +* Sun Sep 07 2014 Alex Wood 1.13.2-1 +- Remove a 2.6ism that slipped in. (awood@redhat.com) + +* Thu Sep 04 2014 Alex Wood 1.13.1-1 +- version bump (jesusr@redhat.com) + +* Fri Jul 25 2014 jesus m. rodriguez 1.12.5-1 +- 1120431: Support for complex path matching. (bkearney@redhat.com) + +* Thu Jul 03 2014 jesus m. rodriguez 1.12.4-1 +- Add required bz flags to tito releasers. (dgoodwin@redhat.com) +- Remove pyqver verbose flag. (alikins@redhat.com) +- Use tox.ini to setup pep8 for 'make stylish' (alikins@redhat.com) +- Update pyqver setup. Set min version of 2.7. (alikins@redhat.com) +- Add libcrypto to list of libs to link to. (bcourt@redhat.com) + +* Mon Jun 16 2014 Michael Stead 1.12.3-1 +- Add 6.6/7.1 release targets. (dgoodwin@redhat.com) +- Add a key_path() to EntitlementCertificate (alikins@redhat.com) + +* Tue Jun 10 2014 Devan Goodwin 1.12.2-1 +- Detect when operating in container mode and load host system's config. + (dgoodwin@redhat.com) +- Convert doc strings to sphinx/restructuredtext (alikins@redhat.com) +- Add setup for using sphinx for docs. (alikins@redhat.com) + +* Thu Jun 05 2014 jesus m. rodriguez 1.12.1-1 +- bump version to 1.12 (jesusr@redhat.com) +- Add connection method to get available releases (mstead@redhat.com) + +* Mon May 26 2014 Devan Goodwin 1.11.5-1 +- 1090350: fix time drift detection (ckozak@redhat.com) +- 1096676: Use simplejson on RHEL 5. (dgoodwin@redhat.com) +- 1094492: Alternate Subject needs different type that allows more characters. + (wpoteat@redhat.com) + +* Mon Apr 28 2014 ckozak 1.11.4-1 + +* Thu Apr 10 2014 Alex Wood 1.11.3-1 +- Specifically check for brand_name/brand_type="" (alikins@redhat.com) +- Support new apis for guests and hypervisors (ckozak@redhat.com) + +* Thu Mar 20 2014 Alex Wood 1.11.2-1 - Add attributes for brand_name (alikins@redhat.com) -- updated tito.props (ckozak@redhat.com) -- removed other releasers (ckozak@redhat.com) + +* Thu Feb 27 2014 Alex Wood 1.11.1-1 +- rev version to 1.11.1 (ckozak@redhat.com) +- removed rhel7 releaser (ckozak@redhat.com) * Mon Feb 03 2014 ckozak 1.10.12-1 - Add request_certs option to getEntitlementList() call (vitty@redhat.com)