]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
release: disable check-rpaths QA, fix python env path, add ruby diag fix-rpm-rpath-qa-and-ruby-diagnostic 1318/head
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 18 May 2026 09:37:36 +0000 (11:37 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 18 May 2026 09:37:36 +0000 (11:37 +0200)
The RPM build failed in %install: RHEL's check-rpaths QA script
rejects the deliberate /opt/rrdtool/lib RPATH that our binaries need
to locate librrd. Disable it for this package with
`%global __brp_check_rpaths %{nil}` — the RPATH is intentional and is
the whole mechanism by which the /opt build avoids system linker
config.

rrdtool-env.sh.in globbed `$ROOT/lib/python*` for the Python binding,
but on RHEL-family 64-bit systems the module installs under `lib64`
(observed: /opt/rrdtool/lib64/python3.9/site-packages). Glob `lib*`
so both `lib` and `lib64` are found.

The same run also revealed Ruby's mkmf ignores --prefix and installs
RRD.so into Ruby's own tree (/usr/local/lib64/ruby/...), outside
/opt/rrdtool. RPM caught it as an unpackaged file; fpm silently drops
it, so the DEBs from that run ship with no Ruby binding at all. Add a
read-only diagnostic step to build-deb that records where RRD.so lands
and the mkmf variables behind it, so the relocation fix can be made
from data rather than guesswork. @oetiker

.github/workflows/release.yml
conftools/rrdtool-env.sh.in
conftools/rrdtool-opt.spec

index a9c5ca691601cd5788633867c59a47bda5223c1a..551c4ad9d722c4bb1a043355187d48ce5265a99c 100644 (file)
@@ -427,6 +427,22 @@ jobs:
           make
           make install DESTDIR="$PWD/stage"
 
+      # Diagnostic: Ruby's mkmf ignores --prefix and installs the binding
+      # into Ruby's own tree. This step records where it actually landed
+      # and the mkmf variables that decided it, so the relocation fix can
+      # be made precisely. Read-only; never fails the job.
+      - name: Diagnose ruby binding placement
+        run: |
+          echo "=== bindings/ruby/Makefile key install vars ==="
+          grep -E '^(prefix|exec_prefix|libdir|rubylibprefix|RUBY_BASE_NAME|sitedir|sitelibdir|sitearchdir|ruby_version|sitearch|arch|RUBYARCHDIR|RUBYLIBDIR|target_prefix)[[:space:]]*=' \
+              bindings/ruby/Makefile || echo "(bindings/ruby/Makefile not found)"
+          echo "=== RRD.so location(s) in stage/ ==="
+          rrdso=$(find stage -name 'RRD.so')
+          echo "${rrdso:-(RRD.so not found in stage/)}"
+          echo "=== staged content outside /opt (expected: none) ==="
+          outside=$(find stage -mindepth 1 -maxdepth 1 -not -name opt)
+          echo "${outside:-(clean: only opt/ present)}"
+
       - name: Post-install touches (rpath + env helper)
         run: |
           set -e
index 3f7b435acc4ce4de664c98add0c3260f23864ade..af53a592abab3052b0bdac7404975ae303349b3d 100644 (file)
@@ -15,7 +15,7 @@ export PKG_CONFIG_PATH="$ROOT/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
 
 export PERL5LIB="$ROOT/lib/perl${PERL5LIB:+:$PERL5LIB}"
 
-PY_SP=$(ls -d "$ROOT"/lib/python*/site-packages 2>/dev/null | head -1)
+PY_SP=$(ls -d "$ROOT"/lib*/python*/site-packages 2>/dev/null | head -1)
 [ -n "$PY_SP" ] && export PYTHONPATH="$PY_SP${PYTHONPATH:+:$PYTHONPATH}"
 
 RB_ARCH=$(ls -d "$ROOT"/lib/ruby/*-* 2>/dev/null | head -1)
index 7f0c189d3e5238a7f51671ee1f3058023538fea0..0eccf0437919a461255bc80195387714cf4f4793 100644 (file)
@@ -7,6 +7,12 @@
 #
 # @VERSION@ is substituted by the release workflow before invoking rpmbuild.
 
+# Our binaries carry a deliberate RPATH of /opt/rrdtool/lib — that is how
+# they locate librrd without any system linker config. RHEL's check-rpaths
+# QA script rejects every non-standard RPATH and fails the build, so it
+# must be disabled for this package.
+%global __brp_check_rpaths %{nil}
+
 Name:           rrdtool-1-opt
 Version:        @VERSION@
 Release:        1%{?dist}