From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <khem.raj@oss.qualcomm.com>
Subject: [PATCH v2 3/4] libpsl: Do not embed the build path in suffixes_dafsa.h
Date: Wed, 22 Jul 2026 14:57:34 -0700 [thread overview]
Message-ID: <20260722215737.1940382-3-khem.raj@oss.qualcomm.com> (raw)
In-Reply-To: <20260722215737.1940382-1-khem.raj@oss.qualcomm.com>
The generated src/suffixes_dafsa.h records the public suffix list it was
built from in _psl_filename[]. meson feeds psl-make-dafsa an absolute
input path, so the full build directory gets baked into the header and,
through it, into the library and its -src/-dbg packages. On an
autobuilder whose build tree lives under $HOME/TMPDIR this trips the
buildpaths QA check with references to both TMPDIR and the build host
HOME directory, and it makes the build non-reproducible.
The absolute path is useless on the target: it is only consumed by
psl_builtin_outdated() to stat() the source list, which never exists on
the running system. psl_builtin_filename() is documented to return "the
file name", so embed only the basename.
Fixes
ERROR: libpsl-0.23.0-r0 do_package_qa: QA Issue: File /usr/src/debug/libpsl/0.23.0/src/suffixes_dafsa.h in package libpsl-src contains reference to TMPDIR [buildpaths]
ERROR: libpsl-0.23.0-r0 do_package_qa: QA Issue: File /usr/src/debug/libpsl/0.23.0/src/suffixes_dafsa.h in package libpsl-src contains a reference to the build host HOME directory. If upstream hardcodes a directory path that matches your home, you can set OEQA_BUILDPATHS_SKIP = "/srv/pokybuild" in the recipe. [buildpaths]
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
...mbed-only-the-basename-of-the-input-.patch | 46 +++++++++++++++++++
meta/recipes-support/libpsl/libpsl_0.23.0.bb | 1 +
2 files changed, 47 insertions(+)
create mode 100644 meta/recipes-support/libpsl/libpsl/0002-psl-make-dafsa-embed-only-the-basename-of-the-input-.patch
diff --git a/meta/recipes-support/libpsl/libpsl/0002-psl-make-dafsa-embed-only-the-basename-of-the-input-.patch b/meta/recipes-support/libpsl/libpsl/0002-psl-make-dafsa-embed-only-the-basename-of-the-input-.patch
new file mode 100644
index 0000000000..32dfc02983
--- /dev/null
+++ b/meta/recipes-support/libpsl/libpsl/0002-psl-make-dafsa-embed-only-the-basename-of-the-input-.patch
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 20 Jul 2026 09:00:00 -0700
+Subject: [PATCH] psl-make-dafsa: embed only the basename of the input file
+
+The generated suffixes_dafsa.h records the path of the public suffix
+list it was built from in _psl_filename[]. meson passes this input as an
+absolute path (meson.current_source_dir()/list/public_suffix_list.dat),
+so the full build directory ends up baked into the header and, through
+it, into the compiled library and its -src/-dbg packages. This is not
+reproducible and trips the OE buildpaths QA check (references to TMPDIR
+and to the build host HOME directory) when the build tree lives under
+those prefixes on an autobuilder.
+
+The absolute path is useless on the target anyway: it is only consumed
+by psl_builtin_outdated(), which stat()s _psl_filename and compares its
+mtime; the build-host path never exists on the running system so the
+stat always fails. psl_builtin_filename() is documented to return "the
+file name of the Public Suffix List file", so a basename is in fact the
+more faithful value.
+
+Embed only os.path.basename() of the input. The unmodified path is still
+used to open, stat and checksum the file, so only the leaked string
+changes.
+
+Upstream-Status: Backport [https://github.com/rockdaboot/libpsl/commit/b16a2c4d66e94acc3388088c7a13ae62dbacb71d]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/psl-make-dafsa | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/psl-make-dafsa b/src/psl-make-dafsa
+index 1111111..2222222 100755
+--- a/src/psl-make-dafsa
++++ b/src/psl-make-dafsa
+@@ -518,7 +518,7 @@ def to_cxx_plus(data, codecs):
+ text += b'static int _psl_nexceptions = %d;\n' % psl_nexceptions
+ text += b'static int _psl_nwildcards = %d;\n' % psl_nwildcards
+ text += b'static const char _psl_sha1_checksum[] = "%s";\n' % bytes(sha1_file(psl_input_file), **codecs)
+- text += b'static const char _psl_filename[] = "%s";\n' % bytes(psl_input_file, **codecs)
++ text += b'static const char _psl_filename[] = "%s";\n' % bytes(os.path.basename(psl_input_file), **codecs)
+ return text
+
+ def words_to_whatever(words, converter, utf_mode, codecs):
+--
+2.51.0
diff --git a/meta/recipes-support/libpsl/libpsl_0.23.0.bb b/meta/recipes-support/libpsl/libpsl_0.23.0.bb
index f915fae621..6026adad9f 100644
--- a/meta/recipes-support/libpsl/libpsl_0.23.0.bb
+++ b/meta/recipes-support/libpsl/libpsl_0.23.0.bb
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=49296c1806ef92c28297fb264163d81e \
SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.gz \
file://0001-Support-reproducible-builds.patch \
+ file://0002-psl-make-dafsa-embed-only-the-basename-of-the-input-.patch \
"
SRC_URI[sha256sum] = "f39b9631b3d369a21259ea4654f8875c0ec6995ce9551c0eb5d423e4c011f911"
next prev parent reply other threads:[~2026-07-22 21:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 21:57 [PATCH v2 1/4] libpsl: upgrade 0.22.0 -> 0.23.0 Khem Raj
2026-07-22 21:57 ` [PATCH v2 2/4] libpsl: convert to meson build system Khem Raj
2026-07-22 21:57 ` Khem Raj [this message]
2026-07-22 21:57 ` [PATCH v2 4/4] libpsl: Fix meson configure failure when docs are enabled Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260722215737.1940382-3-khem.raj@oss.qualcomm.com \
--to=raj.khem@gmail.com \
--cc=khem.raj@oss.qualcomm.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.