Source: lightdm-gtk-greeter-settings Version: 1.2.0-1 Severity: wishlist Tags: patch User: [email protected] Usertags: randomness X-Debbugs-Cc: [email protected]
Hi! While working on the "reproducible builds" effort [1], we have noticed that lightdm-gtk-greeter-settings could not be built reproducibly. It writes a config file with elements in random order. The attached patch fixes this by sorting the dictionary before writing its elements. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch
new file mode 100644
index 0000000..026f183
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,15 @@
+Index: lightdm-gtk-greeter-settings-1.2.0/setup.py
+===================================================================
+--- lightdm-gtk-greeter-settings-1.2.0.orig/setup.py
++++ lightdm-gtk-greeter-settings-1.2.0/setup.py
+@@ -34,8 +34,8 @@ def write_config(libdir, values):
+ libdir, 'lightdm_gtk_greeter_settings/installation_config.py')
+ try:
+ f = open(filename, 'w')
+- f.write('__all__ = [%s]\n' % ', '.join('"%s"' % k for k in values))
+- for k, v in values.items():
++ f.write('__all__ = [%s]\n' % ', '.join('"%s"' % k for k in sorted(values)))
++ for k, v in sorted(values.items()):
+ f.write('%s = %s\n' % (k, v))
+ except OSError as e:
+ print("ERROR: Can't write installation config: %s" % e)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..55077d0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible-build.patch
signature.asc
Description: OpenPGP digital signature

