diff --git a/.python-rhsm.metadata b/.python-rhsm.metadata index eae2f99..88961b6 100644 --- a/.python-rhsm.metadata +++ b/.python-rhsm.metadata @@ -1 +1 @@ -624b3db481443f9c6eb732894acfae29c1657cce SOURCES/python-rhsm-1.10.6.tar.gz +c8af40e399621a0f0e470e0cfad1515c6cd96b70 SOURCES/python-rhsm-1.10.12.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 new file mode 100644 index 0000000..3d13c39 --- /dev/null +++ b/SOURCES/python-rhsm-1.10.12-1-to-python-rhsm-1.10.12-2.patch @@ -0,0 +1,206 @@ +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 96a976d..b37d652 100644 --- a/SPECS/python-rhsm.spec +++ b/SPECS/python-rhsm.spec @@ -5,8 +5,8 @@ Name: python-rhsm -Version: 1.10.6 -Release: 1%{?dist} +Version: 1.10.12 +Release: 2%{?dist} Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform Group: Development/Libraries @@ -17,6 +17,7 @@ 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) @@ -36,6 +37,7 @@ entitlements, certificates, and access to content. %prep %setup -q -n python-rhsm-%{version} +%patch0 -p1 %build %{__python} setup.py build @@ -62,6 +64,30 @@ 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) + +* Wed Jan 22 2014 ckozak 1.10.11-1 +- Fedora 18 is at end of life. (awood@redhat.com) + +* Mon Jan 06 2014 ckozak 1.10.10-1 +- make sure server supports guestId data (ckozak@redhat.com) + +* Tue Dec 17 2013 ckozak 1.10.9-1 +- Removing entitlement cert and key from getEntitlementList (ckozak@redhat.com) +- respect http(s)_proxy env variable for proxy information (jesusr@redhat.com) + +* Wed Nov 27 2013 jesus m. rodriguez 1.10.8-1 +- Add the method to retrieve all the subscriptions for an owner (wpoteat@redhat.com) + +* Thu Nov 14 2013 ckozak 1.10.7-1 +- getOwnerInfo introduced (vitty@redhat.com) + * Thu Nov 07 2013 ckozak 1.10.6-1 - Fix a crash that occurs when rhsm.conf is missing (ckozak@redhat.com) - Correct implementation of __eq__ for Content objects. (awood@redhat.com)