]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
vte: support reproducibility when debug build is enabled
authorHongxu Jia <hongxu.jia@windriver.com>
Mon, 3 Nov 2025 06:45:17 +0000 (14:45 +0800)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Tue, 4 Nov 2025 09:42:40 +0000 (10:42 +0100)
When debug build is enabled, there is a build path issue in source file
which caused build is not reproducible
...subprojects/simdutf/simdutf.h...
 1 /* auto-generated on 2025-03-17 16:13:41 -0400. Do not edit! */
 2 /* begin file include/simdutf.h */
 3 // /build-dir/vte-0.82.1/subprojects/simdutf/include/simdutf.h:1
 4 #ifndef SIMDUTF_H
...subprojects/simdutf/simdutf.h...

The source file is auto generated by python script amalgamate.py,
apply a fix to the script to use relative path to instead

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-support/vte/vte/0001-support-reproducibility-for-debug-sources.patch [new file with mode: 0644]
meta/recipes-support/vte/vte_0.82.1.bb

diff --git a/meta/recipes-support/vte/vte/0001-support-reproducibility-for-debug-sources.patch b/meta/recipes-support/vte/vte/0001-support-reproducibility-for-debug-sources.patch
new file mode 100644 (file)
index 0000000..20e8f71
--- /dev/null
@@ -0,0 +1,48 @@
+From 0959004adbe46f88d558d2ce61b496c662c196f5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 3 Nov 2025 06:13:11 +0000
+Subject: [PATCH] support reproducibility for debug sources
+
+While option --debug-sources is used, the generated source file contains
+build path comments which caused the build is not reproducible [1]
+...subprojects/simdutf/simdutf.h...
+ 1 /* auto-generated on 2025-03-17 16:13:41 -0400. Do not edit! */
+ 2 /* begin file include/simdutf.h */
+ 3 // /build-dir/vte-0.82.1/subprojects/simdutf/include/simdutf.h:1
+ 4 #ifndef SIMDUTF_H
+...subprojects/simdutf/simdutf.h...
+
+After apply this commit, use relative path to instead
+...subprojects/simdutf/simdutf.h...
+ 1 /* auto-generated on 2025-03-17 16:13:41 -0400. Do not edit! */
+ 2 /* begin file include/simdutf.h */
+ 3 // include/simdutf.h:1
+ 4 #ifndef SIMDUTF_H
+...subprojects/simdutf/simdutf.h...
+
+[1] https://reproducible-builds.org/
+
+Upstream-Status: Submitted [https://github.com/simdutf/simdutf/pull/848]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ singleheader/amalgamate.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/singleheader/amalgamate.py b/singleheader/amalgamate.py
+index 190b2f6..75e0d78 100755
+--- a/singleheader/amalgamate.py
++++ b/singleheader/amalgamate.py
+@@ -385,7 +385,8 @@ def filter_features(file):
+                 current_features = None
+             elif enabled:
+                 if context.args.debug_sources and not prev_line.endswith('\\'):
+-                    yield f"// {file}:{lineno}"
++                    RELFILE = os.path.relpath(file, PROJECTPATH)
++                    yield f"// {RELFILE}:{lineno}"
+                 if line or (not line and prev_line):
+                     yield line
+-- 
+2.48.1
+
index 4fa8115a207262cb0c23afbb3b271e993e4a7a8a..b5d6f2fb62d44b46eb0bdcef8b1900a65f3f0a14 100644 (file)
@@ -17,7 +17,9 @@ GIR_MESON_OPTION = 'gir'
 GIDOCGEN_MESON_OPTION = "docs"
 inherit gnomebase gi-docgen features_check upstream-version-is-even gobject-introspection systemd vala
 
-SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch"
+SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
+            file://0001-support-reproducibility-for-debug-sources.patch;patchdir=./subprojects/simdutf \
+"
 
 SRC_URI[archive.sha256sum] = "79376d70402d271e2d38424418e1aea72357934d272e321e3906b71706a78e3a"