[Python-modules-team] Bug#890193: sleekxmpp: please make the build reproducible

Chris Lamb lamby at debian.org
Sun Feb 11 18:59:04 UTC 2018


Source: sleekxmpp
Version: 1.3.3-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that sleekxmpp could not be built reproducibly.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible_build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible_build.patch	2018-02-11 18:37:46.173221589 +0000
@@ -0,0 +1,45 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2018-02-11
+
+--- sleekxmpp-1.3.3.orig/sleekxmpp/xmlstream/stanzabase.py
++++ sleekxmpp-1.3.3/sleekxmpp/xmlstream/stanzabase.py
+@@ -316,7 +316,7 @@ class ElementBase(object):
+     #: manipulating the underlying XML object. This set may be augmented
+     #: with the :attr:`plugin_attrib` value of any registered
+     #: stanza plugins.
+-    interfaces = set(('type', 'to', 'from', 'id', 'payload'))
++    interfaces = None
+ 
+     #: A subset of :attr:`interfaces` which maps interfaces to direct
+     #: subelements of the underlying XML object. Using this set, the text
+@@ -404,6 +404,9 @@ class ElementBase(object):
+     def __init__(self, xml=None, parent=None):
+         self._index = 0
+ 
++        if self.interfaces is None:
++            self.interfaces = set(('type', 'to', 'from', 'id', 'payload'))
++
+         #: The underlying XML object for the stanza. It is a standard
+         #: :class:`xml.etree.cElementTree` object.
+         self.xml = xml
+@@ -1462,13 +1465,17 @@ class StanzaBase(ElementBase):
+     #: There is a small set of attributes which apply to all XMPP stanzas:
+     #: the stanza type, the to and from JIDs, the stanza ID, and, especially
+     #: in the case of an Iq stanza, a payload.
+-    interfaces = set(('type', 'to', 'from', 'id', 'payload'))
++    interfaces = None
+ 
+     #: A basic set of allowed values for the ``'type'`` interface.
+-    types = set(('get', 'set', 'error', None, 'unavailable', 'normal', 'chat'))
++    types = None
+ 
+     def __init__(self, stream=None, xml=None, stype=None,
+                  sto=None, sfrom=None, sid=None, parent=None):
++        if self.interfaces is None:
++            self.interfaces = set(('type', 'to', 'from', 'id', 'payload'))
++        if self.types is None:
++            self.types = set(('get', 'set', 'error', None, 'unavailable', 'normal', 'chat'))
+         self.stream = stream
+         if stream is not None:
+             self.namespace = stream.default_ns
--- a/debian/patches/series	2018-02-11 18:13:22.360900812 +0000
--- b/debian/patches/series	2018-02-11 18:37:44.733213465 +0000
@@ -1,3 +1,4 @@
 fix_pyasn1_4_compat.patch
 fix_tls_date_check.patch
 get-rid-of-embedded-copies-dateutil-gnupg-ordereddic.patch
+reproducible_build.patch


More information about the Python-modules-team mailing list