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

Tony Anderson tony_anderson at usa.net
Mon Dec 19 00:13:08 EST 2016


This appears to be a project in the Debian community. Can this help 
Sugar Labs develop a build capability for Sugar?

Tony


-------- Forwarded Message --------
Subject: 	[Pkg-sugar-devel] Bug#848633: sugar-toolkit-gtk3: please make 
the build reproducible
Resent-Date: 	Mon, 19 Dec 2016 03:15:02 +0000
Resent-From: 	Dhole <dhole at openmailbox.org>
Resent-To: 	debian-bugs-dist at lists.debian.org
Resent-CC: 	reproducible-builds at lists.alioth.debian.org, Debian Sugar 
Team <pkg-sugar-devel at lists.alioth.debian.org>
Date: 	Sun, 18 Dec 2016 19:12:41 -0800
From: 	Dhole <dhole at openmailbox.org>
Reply-To: 	Dhole <dhole at openmailbox.org>, 848633 at bugs.debian.org
To: 	Reproducible Builds discussion list 
<reproducible-builds at lists.alioth.debian.org>, submit at bugs.debian.org



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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20161219/fd1ba2f6/attachment.html>
-------------- 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: 834 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20161219/fd1ba2f6/attachment.sig>
-------------- next part --------------
-- 
pkg-sugar-devel mailing list
pkg-sugar-devel at lists.alioth.debian.org
https://lists.alioth.debian.org/mailman/listinfo/pkg-sugar-devel



More information about the Sugar-devel mailing list