After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769983 - glib-mkenums generates non-reproducible Makefile snippets
glib-mkenums generates non-reproducible Makefile snippets
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-08-16 13:28 UTC by Chris Lamb
Modified: 2017-03-04 22:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-gsettings.m4-Ensure-enum-snippet-output-is-reproduci.patch (1.55 KB, patch)
2016-08-16 13:28 UTC, Chris Lamb
none Details | Review
glib-mkenums: Sort input files for more deterministic output (974 bytes, patch)
2017-03-04 15:29 UTC, Simon McVittie
accepted-commit_now Details | Review

Description Chris Lamb 2016-08-16 13:28:11 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.
Comment 1 Chris Lamb 2016-08-16 13:29:52 UTC
( I originally filed this in Debian GNU/Linux on 27 Dec 2015 as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809152 )
Comment 2 Colin Walters 2016-08-16 15:02:49 UTC
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.
Comment 3 Simon McVittie 2017-03-04 15:29:09 UTC
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
Comment 4 Colin Walters 2017-03-04 16:04:48 UTC
Review of attachment 347208 [details] [review]:

OK.
Comment 5 Simon McVittie 2017-03-04 22:06:42 UTC
Thanks, pushed as 935cd72bd for 2.51.5