]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
ci: include the Lua binding in the .deb packages
authorTobias Oetiker <tobi@oetiker.ch>
Tue, 19 May 2026 16:13:01 +0000 (18:13 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Tue, 19 May 2026 16:13:01 +0000 (18:13 +0200)
The build-deb job installed liblua5.1-0-dev but no Lua interpreter, so
configure's AC_PATH_PROG(LUA, lua) found nothing and silently skipped
the binding -- every .deb shipped without it. Install lua5.4 and
liblua5.4-dev and symlink /usr/bin/lua, so configure detects Lua and
its $LUA matches the lua5.4.pc prefix (needed before it trusts the
pkg-config flags).

Also add a staged-tree check that fails the release if any compiled
binding -- Perl, Python, Tcl or Lua -- is missing, so a silent skip
can no longer slip into a release unnoticed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
.github/workflows/release.yml
CHANGES

index b79fd931bab32ac04c8a8f24732f9635475738aa..59d259bb936cdabc3dd5dae8f3765f8c29b5f034 100644 (file)
@@ -437,9 +437,17 @@ jobs:
               libperl-dev \
               python3-dev python3-setuptools \
               tcl-dev \
-              liblua5.1-0-dev \
+              lua5.4 liblua5.4-dev \
               ruby ruby-dev rubygems-integration
           gem install --no-document fpm
+          # configure.ac finds Lua via AC_PATH_PROG(LUA, lua) and only trusts
+          # the pkg-config flags when prefix/bin/lua equals $LUA. Debian ships
+          # the interpreter as the versioned `lua5.4` with no unversioned
+          # `lua`, so without this symlink configure silently skips the Lua
+          # binding (LUA=no) and the .deb ships without it. The symlink must
+          # be exactly /usr/bin/lua: lua5.4.pc has prefix=/usr, so configure
+          # compares against /usr/bin/lua before using `pkg-config --cflags`.
+          ln -sf lua5.4 /usr/bin/lua
 
       - name: Bump version in working tree
         uses: ./.github/actions/bump-version
@@ -462,6 +470,27 @@ jobs:
           make
           make install DESTDIR="$PWD/stage"
 
+      # configure skips a binding silently (no build error) when its toolchain
+      # is missing — that is exactly how the Lua binding went missing from
+      # earlier .deb releases. Assert each compiled binding landed in the stage
+      # tree so a regression fails the release instead of shipping quietly.
+      # Ruby is checked separately below: it escapes /opt and is relocated next.
+      - name: Verify language bindings were built
+        run: |
+          set -e
+          check() {
+            local name="$1"; shift
+            if [ -z "$(find stage/opt -type f "$@" 2>/dev/null | head -1)" ]; then
+              echo "::error::$name binding missing from staged tree"
+              exit 1
+            fi
+            echo "ok: $name binding staged"
+          }
+          check Perl   -name RRDs.so
+          check Python -name 'rrdtool*.so' -path '*python*'
+          check Tcl    -name 'tclrrd*.so'
+          check Lua    -name 'rrd.so*' -path '*lua*'
+
       # Ruby's mkmf installs the compiled extension into the interpreter's
       # own sitearchdir (/usr/local/lib/<arch>/site_ruby), ignoring our
       # --prefix — so RRD.so lands outside /opt and fpm (which packages only
diff --git a/CHANGES b/CHANGES
index 1464b6fbee7255e8ae17d7c9a1304f83bc33fb77..3f6b502867b6be3e3a468d37ed8739a377e7ae43 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ RRDtool - master ...
 ====================
 Bugfixes
 --------
+* The Linux .deb packages were missing the Lua language binding @oetiker
 
 Features
 --------