summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-04 14:18:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-25 15:11:46 +0100
commiteaa86c868174df5d494f5f04a5d8a7680f2d020c (patch)
tree63e85e802f91a2a8428ff38aa913753bf1f34ebc /meta/recipes-extended
parent1c8f219ec6ba2accc01ae178f3208671fa3b22b0 (diff)
downloadpoky-eaa86c868174df5d494f5f04a5d8a7680f2d020c.tar.gz
gperf: Add a patch to work around reproducibility issues
Add a patch to avoid writing the full pathname to gperf into source files which leads to reproducibility issues. This fixes issues with systemd reproducibility in particular. (From OE-Core rev: 21f36f1df42829eec0ea7b5441513d31dece960c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dea3c7ee2a413f7dc5f13ec006592084f7fb266c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/gperf/gperf/reproducibility.patch26
-rw-r--r--meta/recipes-extended/gperf/gperf_3.1.bb2
2 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-extended/gperf/gperf/reproducibility.patch b/meta/recipes-extended/gperf/gperf/reproducibility.patch
new file mode 100644
index 0000000000..9f80828dbd
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf/reproducibility.patch
@@ -0,0 +1,26 @@
1By default gperf puts a header into generated files with the full path to
2the tool along with the commandline used. This patch removes the path to
3the binary, allowing reproducible source files (which can be included in
4debug source packages).
5
6Upstream-Status: Pending
7Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8
9Index: gperf-3.1/src/options.cc
10===================================================================
11--- gperf-3.1.orig/src/options.cc
12+++ gperf-3.1/src/options.cc
13@@ -280,6 +280,13 @@ Options::print_options () const
14 {
15 const char *arg = _argument_vector[i];
16
17+ if (i == 0) {
18+ const char *shortarg = strrchr(arg, '/');
19+ if (shortarg) {
20+ arg = shortarg + 1;
21+ }
22+ }
23+
24 /* Escape arg if it contains shell metacharacters. */
25 if (*arg == '-')
26 {
diff --git a/meta/recipes-extended/gperf/gperf_3.1.bb b/meta/recipes-extended/gperf/gperf_3.1.bb
index 82750fca05..3564ac0805 100644
--- a/meta/recipes-extended/gperf/gperf_3.1.bb
+++ b/meta/recipes-extended/gperf/gperf_3.1.bb
@@ -9,6 +9,8 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
9SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e" 9SRC_URI[md5sum] = "9e251c0a618ad0824b51117d5d9db87e"
10SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" 10SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2"
11 11
12SRC_URI:append = " file://reproducibility.patch"
13
12inherit autotools 14inherit autotools
13 15
14# The nested configures don't find the parent aclocal.m4 out of the box, so tell 16# The nested configures don't find the parent aclocal.m4 out of the box, so tell