From: Hongxu Jia Date: Mon, 3 Nov 2025 06:45:17 +0000 (+0800) Subject: vte: support reproducibility when debug build is enabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adcec46bc3f95df865e098813af2d899c2d8ef73;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git vte: support reproducibility when debug build is enabled 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 Signed-off-by: Mathieu Dubois-Briand --- 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 index 00000000000..20e8f71c0ed --- /dev/null +++ b/meta/recipes-support/vte/vte/0001-support-reproducibility-for-debug-sources.patch @@ -0,0 +1,48 @@ +From 0959004adbe46f88d558d2ce61b496c662c196f5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +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 +--- + 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 + diff --git a/meta/recipes-support/vte/vte_0.82.1.bb b/meta/recipes-support/vte/vte_0.82.1.bb index 4fa8115a207..b5d6f2fb62d 100644 --- a/meta/recipes-support/vte/vte_0.82.1.bb +++ b/meta/recipes-support/vte/vte_0.82.1.bb @@ -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"