diff --git a/meta-oe/recipes-support/gflags/gflags/0001-Use-an-installed-path-in-the-gflags_completions.h-us.patch b/meta-oe/recipes-support/gflags/gflags/0001-Use-an-installed-path-in-the-gflags_completions.h-us.patch new file mode 100644 index 0000000000..bfd6265f53 --- /dev/null +++ b/meta-oe/recipes-support/gflags/gflags/0001-Use-an-installed-path-in-the-gflags_completions.h-us.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 29 Oct 2026 07:04:28 -0700 +Subject: [PATCH] Use an installed path in the gflags_completions.h usage + example + +The example .bashrc line in gflags_completions.h points at +/home/build/eng/bash/bash_completions.sh, a path from the original build +environment that names a script gflags does not ship. Refer to the +installed gflags_completions.sh instead, matching the example in +gflags_completions.sh itself. + +The old path also trips reproducibility checks that look for build-host +home directories in installed files, e.g. Yocto's buildpaths QA check: + + File /usr/include/gflags/gflags_completions.h in package gflags-dev + contains a reference to the build host HOME directory. [buildpaths] + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/gflags_completions.h.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gflags_completions.h.in b/src/gflags_completions.h.in +index 177b8d2..35d76dc 100644 +--- a/src/gflags_completions.h.in ++++ b/src/gflags_completions.h.in +@@ -89,7 +89,7 @@ + + /* + $ complete -o bashdefault -o default -o nospace -C \ +- '/home/build/eng/bash/bash_completions.sh --tab_completion_columns $COLUMNS' \ ++ '/usr/local/bin/gflags_completions.sh --tab_completion_columns $COLUMNS' \ + time env binary_name another_binary [...] + */ + diff --git a/meta-oe/recipes-support/gflags/gflags_2.3.1.bb b/meta-oe/recipes-support/gflags/gflags_2.3.1.bb index 6bb96ff703..fe9b1c1ec4 100644 --- a/meta-oe/recipes-support/gflags/gflags_2.3.1.bb +++ b/meta-oe/recipes-support/gflags/gflags_2.3.1.bb @@ -3,7 +3,9 @@ HOMEPAGE = "https://github.com/gflags/gflags" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df" -SRC_URI = "git://github.com/gflags/gflags.git;branch=main;protocol=https;tag=v${PV}" +SRC_URI = "git://github.com/gflags/gflags.git;branch=main;protocol=https;tag=v${PV} \ + file://0001-Use-an-installed-path-in-the-gflags_completions.h-us.patch \ + " SRCREV = "8f30ebfb2b206a8bd3a97ffe3b59009a952343e6" inherit cmake