new file mode 100644
@@ -0,0 +1,83 @@
+Upstream-Status: Submitted [https://sourceware.org/pipermail/systemtap/2026q2/028333.html]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git i/configure.ac w/configure.ac
+index 6fb99da40..01457bafb 100644
+--- i/configure.ac
++++ w/configure.ac
+@@ -525,38 +525,47 @@ AC_CHECK_HEADERS([rpm/rpmcrypto.h], [
+ have_rpmcrypto_h=yes
+ AC_MSG_NOTICE([separate rpm/rpmcrypto.h])])
+
+-dnl Look for readline.
+-dnl
+-dnl First save the orignal value of LIBS.
+-LIBS_no_readline=$LIBS
+
+-dnl Check how for readline presence and how to link with it. On some
+-dnl systems you need to add a termcap compatible library.
+-have_libreadline="no"
+-AC_MSG_CHECKING([how to link readline libs])
+-for libtermcap in "" tinfo ncursesw ncurses curses termcap; do
+- if test -z "$libtermcap"; then
+- READLINE_LIBS="-lreadline"
++AC_ARG_WITH([readline],
++ AS_HELP_STRING([--without-readline],[disable use of readline]), [], [with_readline="check"])
++
++if test "$with_readline" != no; then
++ dnl Look for readline.
++ dnl
++ dnl First save the orignal value of LIBS.
++ LIBS_no_readline=$LIBS
++
++ have_libreadline="no"
++ dnl Check how for readline presence and how to link with it. On some
++ dnl systems you need to add a termcap compatible library.
++ AC_MSG_CHECKING([how to link readline libs])
++ for libtermcap in "" tinfo ncursesw ncurses curses termcap; do
++ if test -z "$libtermcap"; then
++ READLINE_LIBS="-lreadline"
++ else
++ READLINE_LIBS="-lreadline -l$libtermcap"
++ fi
++ LIBS="$READLINE_LIBS $LIBS_no_readline"
++ AC_LINK_IFELSE(
++ [AC_LANG_CALL([],[readline])],
++ [have_libreadline="yes"])
++ if test "$have_libreadline" = "yes"; then
++ break
++ fi
++ done
++
++ if test "$have_libreadline" = "no" -a "$with_readline" = "yes"; then
++ AC_MSG_ERROR([cannot find libreadline])
++ elif test "$have_libreadline" = "no" -a "$with_readline" = "check"; then
++ AC_MSG_RESULT([libreadline not found])
++ READLINE_LIBS=""
+ else
+- READLINE_LIBS="-lreadline -l$libtermcap"
++ AC_MSG_RESULT([$READLINE_LIBS])
++ AC_DEFINE(HAVE_LIBREADLINE, [1],
++ [Define if you have the readline library (-lreadline).])
+ fi
+- LIBS="$READLINE_LIBS $LIBS_no_readline"
+- AC_LINK_IFELSE(
+- [AC_LANG_CALL([],[readline])],
+- [have_libreadline="yes"])
+- if test "$have_libreadline" = "yes"; then
+- break
+- fi
+-done
+-if test "$have_libreadline" = "no"; then
+- AC_MSG_RESULT([none])
+- READLINE_LIBS=""
+-else
+- AC_MSG_RESULT([$READLINE_LIBS])
+- AC_DEFINE(HAVE_LIBREADLINE, [1],
+- [Define if you have the readline library (-lreadline).])
++ AC_SUBST([READLINE_LIBS])
+ fi
+-AC_SUBST([READLINE_LIBS])
+ AM_CONDITIONAL([HAVE_LIBREADLINE], [test "$have_libreadline" = "yes"])
+
+ dnl End of readline checks: restore LIBS
@@ -32,6 +32,7 @@ PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod"
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
inherit autotools gettext pkgconfig systemd
inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
@@ -6,6 +6,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git;protocol=https;branch=master;t
file://0001-Install-python-modules-to-correct-library-dir.patch \
file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
file://0001-elaborate.cxx-fix-32-bit-build.patch \
+ file://readline.patch \
"
SRCREV = "911a1354aac264651fda932061e7f20d2ecc2471"
systemtap will try and use libreadline if it's available which isn't good for determinism. Add an option, and disable it by default. Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../systemtap/systemtap/readline.patch | 83 +++++++++++++++++++ .../recipes-kernel/systemtap/systemtap_5.4.bb | 1 + .../systemtap/systemtap_git.inc | 1 + 3 files changed, 85 insertions(+) create mode 100644 meta/recipes-kernel/systemtap/systemtap/readline.patch