** Description changed: + [Impact] + + An erroneous shell command in the current version of lua5.5 on Resolute + whose intent is to dynamically generate the minor version number instead + injects a preprocessor macro into the version string in the `lua5.5.pc` + file, producing an invalid `version`. This breaks anything that depends + on this to determine the Lua version. + + The fix replaces this with a C++ snippet that uses the headerfile to get + the version (both major and minor). + + [Test Plan] + + Excerpt from the original bug's reproducer: + ``` + apt-get update -q -q --yes + apt-get install -q -q --yes lua5.5 liblua5.5-dev + export PCDIR=$(pkgconf lua5.5 --variable pcfiledir) + head -n4 $PCDIR/lua5.5.pc + ``` + Current output: + ``` + prefix=/usr + major_version=5.5 + version=5.5.#define LUA_VERSION_RELEASE LUAI_TOSTR(LUA_VERSION_RELEASE_N) + lib_name_include=lua5.5 + ``` + Expected output: + ``` + prefix=/usr + major_version=5.5 + version=5.5.0 + lib_name_include=lua5.5 + ``` + + [Where Problems Could Occur] + + - This fix dynamically generates all version information, not just the minor + number. This means that if a another error of this kind occurs later, then + both versions would be affected. This would cause more breakage. + + - We're now using C++ directly to make the version numbers. This now makes it + dependent on any external C++ issues. + + [Original Description] + https://salsa.debian.org/lua- team/lua-5-5/-/commit/a407d9fb1d11431b020fab83e861361c6b3ae446?file_path=debian%2Frules#note_780460 There is a problem here because this results in an __error__ in `$PCDIR/lua5.5.pc`: `version=5.5.#define LUA_VERSION_RELEASE LUAI_TOSTR(LUA_VERSION_RELEASE_N)` Steps to reproduce: % `docker run -it ubuntu:26.04` ```bash apt-get update -q -q --yes apt-get install -q -q --yes lua5.4 liblua5.4-dev lua5.5 liblua5.5-dev luarocks lua -v # Lua 5.1.5 # Even though we just installed 5.4 and 5.5, I think luarocks v3.13 fixes this. luarocks --version # /usr/bin/luarocks 3.8.0 # Not current >= 3.13.0 with valuable lua5.5 fixes. export PCDIR=$(pkgconf lua5.5 --variable pcfiledir) head -n4 $PCDIR/lua5.5.pc # The error is visible. diff $PCDIR/lua5.4.pc $PCDIR/lua5.5.pc | grep -E '^[<>] [^#]' # No error in lua5.4.pc. sed -i '/^version=5\.5\.\#define /c\version=5.5.0' $PCDIR/lua5.5.pc # Fix the error. diff $PCDIR/lua5.4.pc $PCDIR/lua5.5.pc | grep -E '^[<>] [^#]' # Error is gone. ``` https://discourse.ubuntu.com/t/apt-install-liblua5-5-dev-contains-a-typo-the-breaks-luarocks/85150 Perhaps related to https://bugs.launchpad.net/ubuntu/+source/lua5.5/+bug/2160601 ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: liblua5.5-dev 5.5.0-3 Uname: Linux 6.12.76-linuxkit aarch64 ApportVersion: 2.34.0-0ubuntu2 Architecture: arm64 CasperMD5CheckResult: unknown CloudBuildName: ubuntu-oci:minimized CloudSerial: 20260627 Date: Tue Jul 14 11:05:40 2026 ProcEnviron: PATH=(custom, no user) TERM=xterm SourcePackage: lua5.5 UpgradeStatus: No upgrade log present (probably fresh install)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2160598 Title: lua5.5.pc file has an error in the version variable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lua5.5/+bug/2160598/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
