summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/inetutils/inetutils_2.4.bb
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-08-31 12:22:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-02 07:47:47 +0100
commit91179f89db127063dbdf998e15d63e04d6be53f7 (patch)
treebb4fce7acd73d29b33854a983f425c936996243a /meta/recipes-connectivity/inetutils/inetutils_2.4.bb
parent79d453eb0caf304454146c9c59744150b678e64d (diff)
downloadopenembedded-core-91179f89db127063dbdf998e15d63e04d6be53f7.tar.gz
inetutils: don't guess target paths
inetutils guesses a lot of target paths in cross builds, and warns that some of them are known to be wrong (for example, whether /proc/net/dev exists is guessed as 'no'). Add a post-configure function to check for these warnings, and pass --with-path-* as appropriate to set the paths explicitly. This means we can remove the patch which was setting PATH_PROCNET_DEV, and the autoconf cache value inetutils_cv_path_login. The downside is that these --with-path-* options are not real autoconf options, so the "unknown options" warning is emitted. Losing those is an acceptable compromise, so disable it. Musl doesn't implement utmp and has stub defines for _PATH_UTMP but not _PATH_UTMPX, so we need to set the X variants explicitly. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/inetutils/inetutils_2.4.bb')
-rw-r--r--meta/recipes-connectivity/inetutils/inetutils_2.4.bb21
1 files changed, 18 insertions, 3 deletions
diff --git a/meta/recipes-connectivity/inetutils/inetutils_2.4.bb b/meta/recipes-connectivity/inetutils/inetutils_2.4.bb
index 85e9f642b3..d3f9e9e5fa 100644
--- a/meta/recipes-connectivity/inetutils/inetutils_2.4.bb
+++ b/meta/recipes-connectivity/inetutils/inetutils_2.4.bb
@@ -20,7 +20,6 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \
file://rsh.xinetd.inetutils \
file://telnet.xinetd.inetutils \
file://tftpd.xinetd.inetutils \
- file://inetutils-1.9-PATH_PROCNET_DEV.patch \
file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
file://0001-CVE-2023-40303-ftpd-rcp-rlogin-rsh-rshd-uucpd-fix-ch.patch \
file://0002-CVE-2023-40303-Indent-changes-in-previous-commit.patch \
@@ -42,15 +41,31 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no,"
PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6,"
EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
- inetutils_cv_path_login=${base_bindir}/login \
--with-libreadline-prefix=${STAGING_LIBDIR} \
--enable-rpath=no \
-"
+ --with-path-login=${base_bindir}/login \
+ --with-path-cp=${base_bindir}/cp \
+ --with-path-uucico=${libexecdir}/uuico \
+ --with-path-procnet-dev=/proc/net/dev \
+ "
+
+EXTRA_OECONF:append:libc-musl = " --with-path-utmpx=/dev/null/utmpx --with-path-wtmpx=/dev/null/wtmpx"
# These are horrible for security, disable them
EXTRA_OECONF:append = " --disable-rsh --disable-rshd --disable-rcp \
--disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd"
+# The configure script guesses many paths in cross builds, check for this happening
+do_configure_cross_check() {
+ if grep "may be incorrect because of cross-compilation" ${B}/config.log; then
+ bberror Default path values used, these must be set explicitly
+ fi
+}
+do_configure[postfuncs] += "do_configure_cross_check"
+
+# The --with-path options are not actually options, so this check needs to be silenced
+ERROR_QA:remove = "unknown-configure-option"
+
do_configure:prepend () {
export HELP2MAN='true'
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath