Bug#1056117: meson: generates non-determinstic .pkgconfig files
Chris Lamb
lamby at debian.org
Fri Nov 17 08:40:43 GMT 2023
Source: meson
Version: 1.2.3-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness toolchain
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort, we noticed that
meson was generates .pkgconfig files that are not reproducible.
For example, here is neatvnc's pkgconfig file:
Name: neatvnc
Description: A Neat VNC server library
Version: 0.7.0
-Requires.private: pixman-1, aml < 0.4.0, aml >= 0.3.0, zlib, libdrm, libturbojpeg, gnutls, nettle, hogweed, gmp, gbm, libavcodec, libavfilter, libavutil
+Requires.private: pixman-1, aml >= 0.3.0, aml < 0.4.0, zlib, libdrm, libturbojpeg, gnutls, nettle, hogweed, gmp, gbm, libavcodec, libavfilter, libavutil
Libs: -L${libdir} -lneatvnc
Libs.private: -lm
Cflags: -I${includedir}
A patch is attached that sorts the output, resulting in:
Requires.private: aml < 0.4.0, aml >= 0.3.0, gbm, gmp, gnutls, hogweed, libavcodec, libavfilter, libavutil, libdrm, libturbojpeg, nettle, pixman-1, zlib
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 63025a5..2a0e577 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -310,7 +310,7 @@ class DependenciesHelper:
result += [name + ' ' + self.format_vreq(vreq) for vreq in vreqs]
else:
result += [name]
- return ', '.join(result)
+ return ', '.join(sorted(result))
def remove_dups(self) -> None:
# Set of ids that have already been handled and should not be added any more
More information about the Reproducible-bugs
mailing list