Hello community,

here is the log from the commit of package python-keyczar for openSUSE:Factory 
checked in at 2019-09-17 13:37:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-keyczar (Old)
 and      /work/SRC/openSUSE:Factory/.python-keyczar.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-keyczar"

Tue Sep 17 13:37:46 2019 rev:8 rq:731222 version:0.716

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-keyczar/python-keyczar.changes    
2018-12-24 11:38:59.525579881 +0100
+++ /work/SRC/openSUSE:Factory/.python-keyczar.new.7948/python-keyczar.changes  
2019-09-17 13:37:46.877839298 +0200
@@ -1,0 +2,6 @@
+Mon Sep 16 09:40:33 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix the pyasn version conflict:
+  * 0001-Fixes-output-value-changes-between-older-and-newer-p.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fixes-output-value-changes-between-older-and-newer-p.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-keyczar.spec ++++++
--- /var/tmp/diff_new_pack.jO1Evq/_old  2019-09-17 13:37:47.385839217 +0200
+++ /var/tmp/diff_new_pack.jO1Evq/_new  2019-09-17 13:37:47.389839217 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-keyczar
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,28 +19,26 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %{!?license: %global license %doc}
 %define pkgname keyczar
-%bcond_without test
 Name:           python-keyczar
 Version:        0.716
 Release:        0
 Summary:        Python toolkit for cryptography
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            http://www.keyczar.org
-Source0:        
https://github.com/google/%pkgname/archive/Python_release_%{version}.tar.gz
+URL:            http://www.keyczar.org
+Source0:        
https://github.com/google/%{pkgname}/archive/Python_release_%{version}.tar.gz
 Source1:        keyczart.1
-BuildRequires:  %{python_module setuptools}
-BuildRequires:  python-rpm-macros
-%if %{with test}
+Patch0:         0001-Fixes-output-value-changes-between-older-and-newer-p.patch
 BuildRequires:  %{python_module pyasn1}
 BuildRequires:  %{python_module pycrypto >= 2.0}
-%endif
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 Requires:       python-pyasn1
 Requires:       python-pycrypto >= 2.0
 Requires(post):   update-alternatives
 Requires(postun):  update-alternatives
 BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -54,12 +52,14 @@
 
 %prep
 %setup -q -n %{pkgname}-Python_release_%{version}/python
+%patch0 -p1
 
 %build
-%{python_build}
+%python_build
 
 %install
-%{python_install}
+%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 install -Dm644 %{SOURCE1} %{buildroot}%{_mandir}/man1/keyczart.1
 %python_clone -a %{buildroot}%{_bindir}/keyczart
 %python_clone -a %{buildroot}%{_mandir}/man1/keyczart.1
@@ -74,13 +74,11 @@
 %check
 export PYTHONPATH=$(pwd)/build/lib
 pushd tests/keyczar_tests
-# Upstream bugreport on the failing test case: 
https://github.com/google/keyczar/issues/209
-%{python_exec alltests.py || :}
+%python_exec alltests.py
 popd
 %endif
 
 %files %{python_files}
-%defattr(-,root,root)
 %doc README PKG-INFO doc/
 %license LICENSE
 %python_alternative %{_mandir}/man1/keyczart.1%{ext_man}

++++++ 0001-Fixes-output-value-changes-between-older-and-newer-p.patch ++++++
From: =?utf-8?q?Pierre-Elliott_B=C3=A9cue?= <[email protected]>
Date: Tue, 20 Feb 2018 11:58:06 +0100
Subject: Fixes output value changes between older and newer pyasn versions

---
 src/keyczar/util.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/keyczar/util.py b/src/keyczar/util.py
index 9e6f217..006eadb 100644
--- a/src/keyczar/util.py
+++ b/src/keyczar/util.py
@@ -172,8 +172,7 @@ def ParseX509(x509):
   if len(seq) != 2:  # need two fields in SubjectPublicKeyInfo
     raise errors.KeyczarError("Illegal X.509 String.")
   [oid, alg_params] = ParseASN1Sequence(seq[0])
-  pubkey = decoder.decode(univ.OctetString(BinToBytes(seq[1].
-                                                      prettyPrint()[2:-3])))[0]
+  pubkey = decoder.decode(univ.OctetString(BinToBytes(seq[1])))[0]
   # Component 1 should be a BIT STRING, get raw bits by discarding extra chars,
   # then convert to OCTET STRING which can be ASN.1 decoded
   params = {}
@@ -251,6 +250,7 @@ def MakeEmsaMessage(msg, modulus_size):
 
 def BinToBytes(bits):
   """Convert bit string to byte string."""
+  bits = str(bits)
   bits = _PadByte(bits)
   octets = [bits[8 * i:8 * (i + 1)] for i in range(len(bits) / 8)]
   return "".join([chr(int(x, 2)) for x in octets])

Reply via email to