Skip to contentSkip to conversation

e2tools: Fix buildpaths in ptests

PATCH In review Khem Raj 2 participants 4 messages Nov 25, 2025 – Nov 26, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 e2tools: Fix buildpaths in ptests

Currently the path checks are escaping QA check for buildpath detection but config.status still has paths which show up in reproduciblity failures, comparing build in path A and build in path B, content of config.status don't end up same.

---
 .../recipes-utils/e2tools/e2tools_0.1.2.bb       | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta-filesystems/recipes-utils/e2tools/e2tools_0.1.2.bb +15 -1
index 219735acd1..b7b925da0e 100644
@@ -39,7 +39,21 @@ do_install_ptest() {
         ${D}${PTEST_PATH}/build/autom4te.cache \
         ${D}${PTEST_PATH}/*/*/.git ${D}${PTEST_PATH}/*/*/.github \
         ${D}${PTEST_PATH}/*/*/autom4te.cache
-    sed -i -e 's;${TMPDIR};;g' ${D}${PTEST_PATH}/build/config.status
+    sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*--sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
+        -e '/EXT2FS_CFLAGS/d' \
+        -e '/LDFLAGS/d' \
+        -e '/PKG_CONFIG_PATH/d' \
+        -e '/PKG_CONFIG_LIBDIR/d' \
+        -e 's@${S}@${PTEST_PATH}@g' \
+        -e 's@${B}@${PTEST_PATH}/build@g' \
+        -e 's@${HOSTTOOLS_DIR}@@g' \
+        -e 's@${RECIPE_SYSROOT}@@g' \
+        -i ${D}${PTEST_PATH}/build/config.status
 }
 
 RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make perl"
#1 lore raw
Quoted 5 lines · Khem Raj via lists.openembedded.org

Currently the path checks are escaping QA check for buildpath detection but config.status
still has paths which show up in reproduciblity failures, comparing build in path A and
build in path B, content of config.status don't end up same.

FYI, last time we tried to fixed that, some of the lines in config.status
looked like this:
S["LDFLAGS"]="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-ffile-prefix-map=/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-filesyste"\
"ms/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/sources/e2tools-0.1.2=/usr/src/debug/e2tools/0.1.2
-ffile-prefix-map"\
"=/work/x86-64-v3-poky-linu"\
"x/e2tools/0.1.2/build=/usr/src/debug/e2tools/0.1.2
-ffile-prefix-map=/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-fil"\
"esystems/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot=
-ffile-prefix-map=/srv/pokybuild/yocto-worker/"\
"reproducible-meta-oe/build/build/build-st-meta-filesystems/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroo"\
"t-native= -Wl,-z,relro,-z,now"

=> The non-reproducible paths split across line breaks.

This is autoconf trying to generate a portable AWK script (meaning the maximum line size for a literal is around 150). Since the "portable" here means supporting prehistoric UNIX version of awk we started working on modifying this limit in autoconf (_AC_AWK_LITERAL_LIMIT) to something more modern (1000). The goal was to avoid having non-reproducible paths split across line breaks to let sed work correctly but we never quite finished this patch.

Quoted 44 lines
---
 .../recipes-utils/e2tools/e2tools_0.1.2.bb       | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta-filesystems/recipes-utils/e2tools/e2tools_0.1.2.bb +15 -2
index 219735acd1..b7b925da0e 100644
@@ -39,7 +39,21 @@ do_install_ptest() {
         ${D}${PTEST_PATH}/build/autom4te.cache \
         ${D}${PTEST_PATH}/*/*/.git ${D}${PTEST_PATH}/*/*/.github \
         ${D}${PTEST_PATH}/*/*/autom4te.cache
-    sed -i -e 's;${TMPDIR};;g' ${D}${PTEST_PATH}/build/config.status
+    sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*--sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
+        -e '/EXT2FS_CFLAGS/d' \
+        -e '/LDFLAGS/d' \
+        -e '/PKG_CONFIG_PATH/d' \
+        -e '/PKG_CONFIG_LIBDIR/d' \
+        -e 's@${S}@${PTEST_PATH}@g' \
+        -e 's@${B}@${PTEST_PATH}/build@g' \
+        -e 's@${HOSTTOOLS_DIR}@@g' \
+        -e 's@${RECIPE_SYSROOT}@@g' \
+        -i ${D}${PTEST_PATH}/build/config.status
 }
 
 RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make perl"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#122065):
https://lists.openembedded.org/g/openembedded-devel/message/122065
Mute This Topic: https://lists.openembedded.org/mt/116477328/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
Yoann Congal
Smile ECS
author
#2 lore raw
Quoted 27 lines · Yoann Congal
Quoted 5 lines · Khem Raj via lists.openembedded.org

Currently the path checks are escaping QA check for buildpath detection but config.status
still has paths which show up in reproduciblity failures, comparing build in path A and
build in path B, content of config.status don't end up same.

FYI, last time we tried to fixed that, some of the lines in config.status
looked like this:
S["LDFLAGS"]="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-ffile-prefix-map=/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-filesyste"\
"ms/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/sources/e2tools-0.1.2=/usr/src/debug/e2tools/0.1.2
-ffile-prefix-map"\
"=/work/x86-64-v3-poky-linu"\
"x/e2tools/0.1.2/build=/usr/src/debug/e2tools/0.1.2
-ffile-prefix-map=/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-fil"\
"esystems/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot=
-ffile-prefix-map=/srv/pokybuild/yocto-worker/"\

"reproducible-meta-oe/build/build/build-st-meta-filesystems/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroo"\
"t-native= -Wl,-z,relro,-z,now"

=> The non-reproducible paths split across line breaks.

Quoted 8 lines

This is autoconf trying to generate a portable AWK script (meaning the maximum line size for a literal is around 150). Since the "portable" here means supporting prehistoric UNIX version of awk we started working on modifying this limit in autoconf (_AC_AWK_LITERAL_LIMIT) to something more modern (1000). The goal was to avoid having non-reproducible paths split across line breaks to let sed work correctly but we never quite finished this patch.

Thanks for adding more context here. I guess we can fix OEs autoconf like
[1]
These variables are useless for running/building ptests on the target. So omitting them here
gets us moving as well.

you can test the autoconf patch and see if it is helpful in making things better in general we might be ok to maintain it in OE upstream will not accept the raised limits

[1]
https://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/i-told-you&id=b7c107fc6f0142cf848393937f3d0ee09ea90228

Quoted 51 lines
Quoted 34 lines
---
 .../recipes-utils/e2tools/e2tools_0.1.2.bb       | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta-filesystems/recipes-utils/e2tools/e2tools_0.1.2.bb +15 -2
index 219735acd1..b7b925da0e 100644
@@ -39,7 +39,21 @@ do_install_ptest() {
         ${D}${PTEST_PATH}/build/autom4te.cache \
         ${D}${PTEST_PATH}/*/*/.git ${D}${PTEST_PATH}/*/*/.github \
         ${D}${PTEST_PATH}/*/*/autom4te.cache
-    sed -i -e 's;${TMPDIR};;g' ${D}${PTEST_PATH}/build/config.status
+    sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*--sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
+        -e '/EXT2FS_CFLAGS/d' \
+        -e '/LDFLAGS/d' \
+        -e '/PKG_CONFIG_PATH/d' \
+        -e '/PKG_CONFIG_LIBDIR/d' \
+        -e 's@${S}@${PTEST_PATH}@g' \
+        -e 's@${B}@${PTEST_PATH}/build@g' \
+        -e 's@${HOSTTOOLS_DIR}@@g' \
+        -e 's@${RECIPE_SYSROOT}@@g' \
+        -i ${D}${PTEST_PATH}/build/config.status
 }
 
 RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make perl"
 
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 10 lines

Links: You receive all messages sent to this group. View/Reply Online (#122065):
https://lists.openembedded.org/g/openembedded-devel/message/122065
Mute This Topic: https://lists.openembedded.org/mt/116477328/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Yoann Congal
Smile ECS

#3 lore raw
Quoted 47 lines · Khem Raj
Quoted 27 lines · Yoann Congal
Quoted 5 lines · Khem Raj via lists.openembedded.org

Currently the path checks are escaping QA check for buildpath detection but config.status
still has paths which show up in reproduciblity failures, comparing build in path A and
build in path B, content of config.status don't end up same.

FYI, last time we tried to fixed that, some of the lines in config.status
looked like this:
S["LDFLAGS"]="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-ffile-prefix-map=/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-filesyste"\
"ms/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/sources/e2tools-0.1.2=/usr/src/debug/e2tools/0.1.2
-ffile-prefix-map"\
"=/work/x86-64-v3-poky-linu"\
"x/e2tools/0.1.2/build=/usr/src/debug/e2tools/0.1.2
-ffile-prefix-map=/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-fil"\
"esystems/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot=
-ffile-prefix-map=/srv/pokybuild/yocto-worker/"\

"reproducible-meta-oe/build/build/build-st-meta-filesystems/build-st/reproducibleB-extended/tmp/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroo"\
"t-native= -Wl,-z,relro,-z,now"

=> The non-reproducible paths split across line breaks.

Quoted 8 lines

This is autoconf trying to generate a portable AWK script (meaning the maximum line size for a literal is around 150). Since the "portable" here means supporting prehistoric UNIX version of awk we started working on modifying this limit in autoconf (_AC_AWK_LITERAL_LIMIT) to something more modern (1000). The goal was to avoid having non-reproducible paths split across line breaks to let sed work correctly but we never quite finished this patch.

Thanks for adding more context here. I guess we can fix OEs autoconf like
[1]
These variables are useless for running/building ptests on the target. So omitting them here
gets us moving as well.

Quoted 7 lines

you can test the autoconf patch and see if it is helpful in making things better in general we might be ok to maintain it in OE upstream will not accept the raised limits

[1]
https://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/i-told-you&id=b7c107fc6f0142cf848393937f3d0ee09ea90228

with the autoconf patch but without this e2tools patch that look lilke:
S["LDFLAGS"]="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-fcanon-prefix-map
-ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/sources/e2tools-0.1.2=/usr/src/debug/e2tools/0.1.2 -ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/build=/usr/src/debug/e2tools/0.1.2 -ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot= -ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot-native= -Wl,-z,relro,-z,now"
S["CFLAGS"]=" -O2 -g -fcanon-prefix-map
-ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/sources/e2tools-0.1.2=/usr/src/debug/e2tools/0.1.2 -ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/build=/usr/src/debug/e2tools/0.1.2 -ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot= -ffile-prefix-map=/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot-native=
-pipe --std=gnu99 -pedantic -Wall -Wextra -Wp,-D_FORTIFY_SOURCE=2
-fstack-clash-protection -fcf-protection"
S["CC"]="ccache x86_64-poky-linux-gcc -m64 -march=x86-64-v3
-fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security --sysroot=/work/x86-64-v3-poky-linux/e2tools/0.1.2/recipe-sysroot"

No line break, the single
sed -i -e 's;${TMPDIR};;g' ${D}${PTEST_PATH}/build/config.status
works enough to remove non-reproducible patches

Quoted 53 lines
Quoted 52 lines
Quoted 34 lines
---
 .../recipes-utils/e2tools/e2tools_0.1.2.bb       | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta-filesystems/recipes-utils/e2tools/e2tools_0.1.2.bb +15 -1
index 219735acd1..b7b925da0e 100644
@@ -39,7 +39,21 @@ do_install_ptest() {
         ${D}${PTEST_PATH}/build/autom4te.cache \
         ${D}${PTEST_PATH}/*/*/.git ${D}${PTEST_PATH}/*/*/.github \
         ${D}${PTEST_PATH}/*/*/autom4te.cache
-    sed -i -e 's;${TMPDIR};;g' ${D}${PTEST_PATH}/build/config.status
+    sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*--sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
+        -e '/EXT2FS_CFLAGS/d' \
+        -e '/LDFLAGS/d' \
+        -e '/PKG_CONFIG_PATH/d' \
+        -e '/PKG_CONFIG_LIBDIR/d' \
+        -e 's@${S}@${PTEST_PATH}@g' \
+        -e 's@${B}@${PTEST_PATH}/build@g' \
+        -e 's@${HOSTTOOLS_DIR}@@g' \
+        -e 's@${RECIPE_SYSROOT}@@g' \
+        -i ${D}${PTEST_PATH}/build/config.status
 }
 
 RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make

perl"

Quoted 11 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#122065):
https://lists.openembedded.org/g/openembedded-devel/message/122065
Mute This Topic: https://lists.openembedded.org/mt/116477328/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Yoann Congal
Smile ECS

Signature · 2 lines
Yoann Congal
Smile ECS