runlatex.sh: Detect fvextra versions with known minor regression
fvextra versions from v1.11.0 to v1.13.2 (latest) have a minor regression
which ignores fancyvrb's "samepage=true" key. It is used in perfbook to
prevent short snippets from broken across columns/pages. This is a minor
regression but affects reproducible build of perfbook.
Add commands at the final phase of runlatex.sh to detect those buggy
fvextra and emit suggestion of installing unaffected fvextra.
Unfortunately, distro texlive packages based on upstream TeX Live since
early March 2025 are all affected by this regression, including debian
trixie and opensuse/leap 16.0 (Long Term Support); and ubuntu plucky
and questing (Rolling release); as well as archlinux and
opensuse/tumbleweed (Rapid release) as of this writing.
This issue was reported upstream at [1].
Link: https://github.com/gpoore/fvextra/issues/32 [1]
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/utilities/runlatex.sh b/utilities/runlatex.sh
index 17d833a..d5b1844 100644
--- a/utilities/runlatex.sh
+++ b/utilities/runlatex.sh
@@ -169,6 +169,22 @@
echo "### Consider upgrading to Ubuntu 20.04 LTS or later. ###"
echo "############################################################"
fi
+# fvextra version check (Ubuntu 25.04 and 25.10 have buggy one
+FVEXTRA_VER=`grep -E -e 'fvextra .* v[0-9\.]+' $basename.log | \
+ sed -e 's/.* \(v.*\) fv.*/\1/'`
+#echo $FVEXTRA_VER
+FVEXTRA_BUGGY_SINCE=v1.11.0
+FVEXTRA_BUGGY_UNTIL=v1.13.2
+
+fvextra_since=`env printf "$FVEXTRA_BUGGY_SINCE\n$FVEXTRA_VER" | sort -V | head -n 1`
+fvextra_until=`env printf "$FVEXTRA_BUGGY_UNTIL\n$FVEXTRA_VER" | sort -V | tail -n 1`
+
+if [ $fvextra_since = $FVEXTRA_BUGGY_SINCE -a $fvextra_until = $FVEXTRA_BUGGY_UNTIL ] ; then
+ echo "Buggy fvextra $FVEXTRA_VER detected."
+ echo "It causes undesirable page/column breaks in short code snippets."
+ echo "Consider installing fvextra < $FVEXTRA_BUGGY_SINCE or > $FVEXTRA_BUGGY_UNTIL."
+fi
+
# to avoid redundant run of bibtex and pdflatex
touch $basename.bbl
touch $basename.pdf