GNOME Bugzilla – Bug 769983
glib-mkenums generates non-reproducible Makefile snippets
Last modified: 2017-03-04 22:06:42 UTC
Created attachment 333414 [details] [review] 0001-gsettings.m4-Ensure-enum-snippet-output-is-reproduci.patch Whilst working on the "reproducible builds" effort I noticed that glib generates output that is not reproducible. In particular, the generated calls to glib-mkenums / gsettings_ENUM_FILES mechanism in the m4 macros can generate output in a non-deterministic (filesystem) order as most GNOME packages just specify "src/*.h" or similar. Patch attached.
( I originally filed this in Debian GNU/Linux on 27 Dec 2015 as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809152 )
Review of attachment 333414 [details] [review]: It feels like it'd be cleaner for glib-mkenums to sort the input internally, rather than having callers do it.
Created attachment 347208 [details] [review] glib-mkenums: Sort input files for more deterministic output This should be helpful for reproducible builds <https://reproducible-builds.org/>. Perl's sorting is not locale-sensitive unless the lexical scope has 'use locale', which this one does not, so we do not need to force locale-agnostic sorting. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=769983
Review of attachment 347208 [details] [review]: OK.
Thanks, pushed as 935cd72bd for 2.51.5