[Pkg-sugar-devel] Bug#848633: sugar-toolkit-gtk3: please make the build reproducible

Dhole dhole at openmailbox.org
Mon Dec 19 03:12:41 UTC 2016


Source: sugar-toolkit-gtk3
Version: 0.110.0-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: locale
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that sugar-toolkit-gtk3 generates unreproducible desktop files.

When generating desktop files, translation files are iterated in a
non-deterministic order.

The attached patch fixes this by sorting the translation files used to
generate the desktop file.  Once applied, packages using
sugar-toolkit-gtk3 can generate reproducible desktop files in our
current experimental framework.

Please, consider sending this patch upstream.

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

Regards,
-- 
Dhole
-------------- next part --------------
diff -Nru sugar-toolkit-gtk3-0.110.0/debian/changelog sugar-toolkit-gtk3-0.110.0/debian/changelog
--- sugar-toolkit-gtk3-0.110.0/debian/changelog	2016-12-12 19:00:52.000000000 +0100
+++ sugar-toolkit-gtk3-0.110.0/debian/changelog	2016-12-19 03:18:16.000000000 +0100
@@ -1,3 +1,10 @@
+sugar-toolkit-gtk3 (0.110.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Sort translation files when generating desktop file. 
+
+ -- Eduard Sanou <dhole at openmailbox.org>  Mon, 19 Dec 2016 03:18:16 +0100
+
 sugar-toolkit-gtk3 (0.110.0-2) unstable; urgency=medium
 
   * Modernize CDBS use:
diff -Nru sugar-toolkit-gtk3-0.110.0/debian/patches/series sugar-toolkit-gtk3-0.110.0/debian/patches/series
--- sugar-toolkit-gtk3-0.110.0/debian/patches/series	2016-12-12 04:01:17.000000000 +0100
+++ sugar-toolkit-gtk3-0.110.0/debian/patches/series	2016-12-19 03:18:16.000000000 +0100
@@ -1,3 +1,4 @@
 020161109~ee93ad3.patch
 2002_ignore_debian_and_quilt-patches.patch
 #2003_bundlebuilder_exit_nonzero_on_error.patch
+sort-translation-files.patch
diff -Nru sugar-toolkit-gtk3-0.110.0/debian/patches/sort-translation-files.patch sugar-toolkit-gtk3-0.110.0/debian/patches/sort-translation-files.patch
--- sugar-toolkit-gtk3-0.110.0/debian/patches/sort-translation-files.patch	1970-01-01 01:00:00.000000000 +0100
+++ sugar-toolkit-gtk3-0.110.0/debian/patches/sort-translation-files.patch	2016-12-19 03:18:16.000000000 +0100
@@ -0,0 +1,20 @@
+Description: Sort translation files
+ Sort translation files when generating the .desktop file to output reproducible results.
+Author: Eduard Sanou <dhole at openmailbox.org>
+
+
+Index: sugar-toolkit-gtk3-0.110.0/src/sugar3/activity/bundlebuilder.py
+===================================================================
+--- sugar-toolkit-gtk3-0.110.0.orig/src/sugar3/activity/bundlebuilder.py
++++ sugar-toolkit-gtk3-0.110.0/src/sugar3/activity/bundlebuilder.py
+@@ -387,8 +387,8 @@ class Installer(Packager):
+         if info.has_option('Activity', 'summary'):
+             cp.set(section, 'Comment', info.get('Activity', 'summary'))
+ 
+-        for path in glob(os.path.join(activity_path, 'locale',
+-                                      '*', 'activity.linfo')):
++        for path in sorted(glob(os.path.join(activity_path, 'locale',
++                                             '*', 'activity.linfo'))):
+             locale = path.split(os.path.sep)[-2]
+             info = ConfigParser()
+             info.read(path)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sugar-devel/attachments/20161218/f4a1f3cc/attachment.sig>


More information about the pkg-sugar-devel mailing list