The installed /usr/bin/libtool script sourced by any recipe that
inherits libtool contains build_alias=, build= and build_os= lines
populated by config.status with the *build machine's* triplet
(e.g. build=x86_64-pc-linux-gnu, build_alias=x86_64-linux). Those
values vary between autobuilder workers whose config.guess reports
different vendors or OS strings, which makes libtool.rpm non-
reproducible across the autobuilder pool and shows up as a diff in
the reproducibility selftest.
Extend the sanitising sed in remove-buildpaths.inc to blank those
three lines the same way the existing rules blank sysroot and
build-path references.
Verified locally: before this change the installed libtool contained
`build_alias=x86_64-linux`, `build=x86_64-pc-linux-gnu` and
`build_os=linux-gnu`; after this change all three lines are empty.
Assisted-by: AI - OpenAI
Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-e 's@^\(predep_objects="\).*@\1"@' \
-e 's@^\(postdep_objects="\).*@\1"@' \
-e "s@${HOSTTOOLS_DIR}/@@g" \
+ -e 's@^build_alias=.*@build_alias=@' \
+ -e 's@^build=.*@build=@' \
+ -e 's@^build_os=.*@build_os=@' \
-i ${D}${bindir}/libtool
}