Your message dated Sun, 19 Jul 2015 21:35:35 +0000
with message-id <[email protected]>
and subject line Bug#792436: fixed in dh-python 2.20150719
has caused the Debian Bug report #792436,
regarding dh-python: please make private dir autoscript snippets output in a 
determinstic order
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
792436: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792436
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: dh-python
Version: 1.20150705-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: toolchain
X-Debbugs-Cc: [email protected]

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that dh-python can output Debhelper autoscript snippets for private
directories in a non-determinstic order.

This results in, for example, a postinst that will vary between builds:

   if which pycompile >/dev/null 2>&1; then
-       pycompile -p mate-menu /usr/lib/mate-menu -V 2.4-
+       pycompile -p mate-menu /usr/share/mate-menu -V 2.4-
   fi

  if which pycompile >/dev/null 2>&1; then
-       pycompile -p mate-menu /usr/share/mate-menu -V 2.4-
+       pycompile -p mate-menu /usr/lib/mate-menu -V 2.4-
  fi

This appears to be because it iterates over the 'private_dirs' dict,
calling dh.autoscript(...) on each member. Whilst the latter does
append determinstically  to a data structure prior to eventual
serialisation, the former dict iteration is non-deterministic and
therefore the whole process is.

An alternative might appear to be to attack the serialisation,
re-ordering the args *just* before output. For example:

                 for tpl_name, args in templates.items():
-                    for i in args:
+                    for i in sorted(args):

.. in debhelper.py. This has the advantage of doing this in one place.
However I have a hunch we do not want to be re-ordering things at this
point - for example, we probably do want to byte-compile / remove / etc.
the "main" modules before we attack the private ones or for some
vaguely-similar reason and thus changing the order could have weird
effects. It also seems to violate the "promise" of appending to a list
that it will end up in that order. If I'm wrong about this then, of
course, feel free to use this simpler change.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
diff --git a/dh_pypy b/dh_pypy
index 3d07789..6a290f1 100755
--- a/dh_pypy
+++ b/dh_pypy
@@ -199,7 +199,7 @@ def main():
             dh.autoscript(package, 'postinst', 'postinst-pypycompile', args)
             dh.autoscript(package, 'prerm', 'prerm-pypyclean', '')
             pypyclean_added = True
-        for pdir, details in stats['private_dirs'].items():
+        for pdir, details in sorted(stats['private_dirs'].items()):
             if not details.get('compile'):
                 continue
             if not pypyclean_added:
diff --git a/dh_python2 b/dh_python2
index 6124423..ff32b36 100755
--- a/dh_python2
+++ b/dh_python2
@@ -441,7 +441,7 @@ def main():
             dh.autoscript(package, 'prerm', 'prerm-pyclean', '')
             pyclean_added = True
 
-        for pdir, details in stats['private_dirs'].items():
+        for pdir, details in sorted(stats['private_dirs'].items()):
             if not details.get('compile'):
                 continue
             if not pyclean_added:
diff --git a/dh_python3 b/dh_python3
index e201dd2..8c62c87 100755
--- a/dh_python3
+++ b/dh_python3
@@ -200,7 +200,7 @@ def main():
             dh.autoscript(package, 'postinst', 'postinst-py3compile', args)
             dh.autoscript(package, 'prerm', 'prerm-py3clean', '')
             pyclean_added = True
-        for pdir, details in stats['private_dirs'].items():
+        for pdir, details in sorted(stats['private_dirs'].items()):
             if not details.get('compile'):
                 continue
             if not pyclean_added:

--- End Message ---
--- Begin Message ---
Source: dh-python
Source-Version: 2.20150719

We believe that the bug you reported is fixed in the latest version of
dh-python, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Piotr Ożarowski <[email protected]> (supplier of updated dh-python package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 19 Jul 2015 22:54:37 +0200
Source: dh-python
Binary: dh-python
Architecture: source all
Version: 2.20150719
Distribution: unstable
Urgency: medium
Maintainer: Piotr Ożarowski <[email protected]>
Changed-By: Piotr Ożarowski <[email protected]>
Description:
 dh-python  - Debian helper tools for packaging Python libraries and applicatio
Closes: 761028 778633 792436
Changes:
 dh-python (2.20150719) unstable; urgency=medium
 .
   * Update dist_fallback files
   * Converted to native package and bumped version number to 2.*
   * dh_python{2,3}:
     - remove empty directories (closes: 761028)
     - remove "test" and "tests" directories from dist-packages/
       (packages should ship tests in /usr/share/ or under thier own namespace)
   * Make private dir autoscript snippets output in a determinstic order
     (closes: 792436, thanks to Chris Lamb for the patch)
   * Clarify purpose of .pydist files (closes: 778633, thanks to Nikolaus Rath
     for the patch)
   * Remove "module" from extension file names also in Python 2.7
Checksums-Sha1:
 ef3efc1400200beea1bfc7da0cd69fe6990c0eb4 1691 dh-python_2.20150719.dsc
 1377affb5bfeea324a657d9078f7de9f8d448858 72908 dh-python_2.20150719.tar.xz
 9007f4b7df527e5aede136c335cbe86dfa86002b 70196 dh-python_2.20150719_all.deb
Checksums-Sha256:
 705b9982239b1bfb5d42eb01ee81922a8b46cfa4b356db9d8321f55e58c0ce2b 1691 
dh-python_2.20150719.dsc
 291f23f630516805188b41b85bc51c86b118c0ecd3ed6408501ccacc72894a35 72908 
dh-python_2.20150719.tar.xz
 0a8514e66b8e47304029056b7836786f14f2625630117656d248d4ebdce06fa2 70196 
dh-python_2.20150719_all.deb
Files:
 a19d06676b034cd39c4ed9fbeb8a24a7 1691 python optional dh-python_2.20150719.dsc
 e839c896fe4b7b73d0bbb4e5f265154a 72908 python optional 
dh-python_2.20150719.tar.xz
 cd1a0df6071452fb39a0e3b86da9f381 70196 python optional 
dh-python_2.20150719_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJVrBAVAAoJEK728aKnRXZFlroP/1s1NOVXjVLDq7qBAbxxTwkX
dM6uY27Ng0XsQ96GhpfdY9y6rGgf7RvUPzJQOh+FQAybJ1xHWUPPCUjsAt4FkubO
GjhrigyJxcnmwVRhroojH6x+qs7o8hrwpfz5Y6h6Wm8LMCAqfYVgpgdekn55owSc
VPa256VRvKv2TL049qzbV4JeaWOSyT1PGDemxvELkqV5Pd4NzTAIgMMgAJmzaylK
6NtHn3B8tj4mo0cFgoeCRMMaOvUj8uiHn9oGm5fabzqECiJ2jL3ER085L9DUx9Ib
KW6TGSCaU95M2A+GSMTzi4TQTH1Zt9KRmYFy+YbcbbwklkaI/kx20hl00x70Cs4K
j+rqOz8/k97pPM42SscamdAxYo4UX9f50oZwQr6ULXSgbNjogtnIAsGgg+IHBPXr
rRfXJIs21C1jfaJIjnfrWGP5IQcHtXVnkH7qiDfmmxYSc1cDkpsirpVfcxsMKS5R
VQdHZa8Ejdx/UX2PYrFqzcWwS43CsZ5pt0kqiKhPhuwJvOgVzb/WsOCGO4m54a4F
xupghQ0Z2b7xF29aDhrYtN/uc8sH1n332ZianjTK2AjiD9FMLgQkKn0S/HiGYN9x
O4Hn1attp/YprQFjbLvKBbFFqomBCWyM9XOnto8PCjDkFMMXVf5ya/5mq/Xww1eJ
6KYJr2P+Q0kEWW6nOdlD
=eZ1H
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to