podman: fix documentation build issues

podman commit dfec510b41b5 [go-md2man: use vendored-in version, not
system] removes the shell test for go-md2man, which means our native
executable is not found.

While we could export GOMD2MAN and point it to our sysroot version
(${RECIPE_SYSROOT_NATIVE}/usr/bin/go-md2man), we could run into the
issues with formatting that the podman commit is trying to avoid.

If we pass our build host architecture to the build, it will be
used and the executable created as part of the compilation.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2023-11-09 05:12:32 +00:00
parent 9232b20362
commit 5587dd1535

View File

@ -11,7 +11,6 @@ REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6"
DEPENDS = " \
go-metalinter-native \
go-md2man-native \
gpgme \
libseccomp \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
@ -90,7 +89,11 @@ do_compile() {
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
oe_runmake BUILDTAGS="${BUILDTAGS}"
# podman now builds go-md2man and requires the host/build details
export NATIVE_GOOS=${BUILD_GOOS}
export NATIVE_GOARCH=${BUILD_GOARCH}
oe_runmake NATIVE_GOOS=${BUILD_GOOS} NATIVE_GOARCH=${BUILD_GOARCH} BUILDTAGS="${BUILDTAGS}"
}
do_install() {