Bug#1059917: guake: build race for /usr/share/glib-2.0/schemas/gschemas.compiled
James Addison
jay at jp-hosting.net
Wed Jan 3 14:15:57 GMT 2024
Source: guake
Version: 3.10-1
Severity: normal
User: reproducible-builds at lists.alioth.debian.org
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Dear Maintainer,
I'm an occasional volunteer for the Reproducible Builds[0] project,
and recently noticed that the quake package failed to build reproducibly
from source.
The difference between the builds was the presence-or-absence of a file at
the path /usr/share/glib-2.0/schemas/gschemas.compiled in the built package.
This file should not be shipped in the contents of distro packages[1][2] (but
can be regenerated by them after installation, as guake's postinst script
does).
So: why is the file _sometimes_ found when building the guake package from
source? It think it's due to a race condition in the Makefile:
install-system: install-schemas compile-shemas install-locale install-guake
The 'compile-shemas' (sic) target expects to compile source .xml files from a
parameterized $(DESTDIR)$(gsettingsschemadir) path that expands to the build
dir with an /glib-2.0/schemas suffix. However: the .xml files are created in
that path by the 'install-schemas' target.
Even though 'compile-shemas' is listed _after_ 'install-schemas', it's possible
for 'make' to run them both in parallel when enabled[3].
If the files aren't there by the time 'compile-shemas' runs, we see a message:
No schema files found: doing nothing.
...and no gschemas.compiled file is created (as is desired! but by relying on
a race condition).
One fix here could be to update the Makefile so that it maps the dependency
between the two relevant build targets correctly, ensuring that
'install-schemas' runs before 'compile-shemas'.
However: I think a simpler fix for Debian's packaging could be to set the
COMPILE_SCHEMAS environment flag used by the Makefile to zero, to disable
creation of the glib-2.0 gschemas.compiled file -- avoiding the race condition
entirely.
Regards,
James
[0] - https://reproducible-builds.org/
[1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884142
[2] - https://github.com/Guake/guake/pull/1893#discussion_r707307822
[3] - https://www.gnu.org/software/make/manual/html_node/Parallel.html
More information about the Reproducible-bugs
mailing list