Skip to content

Commit

Permalink
rrdtool - do include lua5.4 libs, withdraw rrdtool-1.8.0-r0, other cl…
Browse files Browse the repository at this point in the history
…eanups (#34944)

The thing that brought me here was that rrdtool was not co-installable
with lua5.4, which didn't make any sense. It was actually copying the
installed lua5.4 libraries to the target (not building them).

The fixes here are then:
a. do not include lua5.4 itself
b. build the rrd lua module and include it
c. move things to the -doc package
d. separate out python bindings into py3.12-rrdtool e. add more tests

---------

Signed-off-by: Scott Moser <smoser@brickies.net>
  • Loading branch information
smoser authored Nov 25, 2024
1 parent 22cfb2f commit d006d14
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 12 deletions.
56 changes: 48 additions & 8 deletions rrdtool.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package:
name: rrdtool
version: 1.9.0
epoch: 1
epoch: 2
description: Data logging and graphing application
copyright:
- license: GPL-2.0-or-later

vars:
lua-version: 5.4
py-version: 3.13

environment:
contents:
packages:
Expand All @@ -30,8 +34,7 @@ environment:
- libtool
- libxft-dev
- libxml2-dev
- lua5.4
- lua5.4-dev
- lua${{vars.lua-version}}-dev
- openssf-compiler-options
- pango
- pango-dev
Expand All @@ -40,8 +43,9 @@ environment:
- perl-xml-parser
- pkgconf-dev
- posix-libc-utils
- py3.12-setuptools
- python3-dev
- py${{vars.py-version}}-setuptools
- python-${{vars.py-version}}-base-dev
- readline-dev
- zlib-dev

pipeline:
Expand All @@ -52,7 +56,10 @@ pipeline:
tag: v${{package.version}}

- runs: |
export CPPFLAGS="-I/usr/include/pango-1.0/pango"
ln -sf lua${{vars.lua-version}} /usr/bin/lua
ln -sf lua5.4/liblua.so /usr/lib/liblua.so
ln -sf python${{vars.py-version}} /usr/bin/python3
ln -sf python${{vars.py-version}} /usr/bin/python
- uses: autoconf/configure
with:
Expand All @@ -72,6 +79,9 @@ pipeline:
find "${{targets.destdir}}" -name '.packlist' -delete
find "${{targets.destdir}}" -name 'perllocal.pod' -delete
- name: give owner write so strip can run as non-root
runs: chmod -R u+w ${{targets.destdir}}/usr/lib

- uses: strip

subpackages:
Expand All @@ -90,7 +100,12 @@ subpackages:
- name: rrdtool-doc
pipeline:
- uses: split/manpages
description: rrdtool manpages
- runs: |
ushr=${{targets.subpkgdir}}/usr/share
mkdir -p "$ushr/doc" "$ushr/rrdtool"
mv ${{targets.destdir}}/usr/share/doc/rrdtool-${{package.version}} "$ushr/doc"
mv ${{targets.destdir}}/usr/share/rrdtool/examples "$ushr/rrdtool"
description: rrdtool manpages and docs

- name: perl-rrd
pipeline:
Expand All @@ -105,9 +120,21 @@ subpackages:
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib/
mv /usr/lib/lua* "${{targets.subpkgdir}}"/usr/lib/
mv ${{targets.destdir}}/usr/lib/lua* "${{targets.subpkgdir}}"/usr/lib/
description: Lua interface for rrdtool

- name: py${{vars.py-version}}-rrdtool
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib/
mv ${{targets.destdir}}/usr/lib/python* "${{targets.subpkgdir}}/usr/lib"
test:
pipeline:
- uses: python/import
with:
imports: |
import rrdtool
- name: rrdtool-cached
pipeline:
- runs: |
Expand Down Expand Up @@ -148,6 +175,19 @@ subpackages:
"${{targets.destdir}}"/usr/bin/rrdupdate \
"${{targets.subpkgdir}}"/usr/bin
description: RRDtool standalone create,update,info utilities
test:
pipeline:
- runs: |
set +x
fail() { echo "FAIL:" "$@" 1>&2; exit 1; }
for p in rrdinfo rrdcreate rrdupdate; do
# actually expect exit value 1, there is no -h or -v
out=$($p) && rc=$? || rc=$?
[ $rc -eq 0 -o $rc -eq 1 ] || fail "$p exited unexpected value $rc"
echo "$out" | grep -q "Usage: $p" ||
fail "$p output did not contain 'Usage: $p'. output: $output"
echo "PASS: $p output contained 'Usage: $p'"
done
update:
enabled: true
Expand Down
13 changes: 9 additions & 4 deletions withdrawn-packages.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
istio-install-cni-1.22-1.23.0-r0.apk
istio-install-cni-1.22-compat-1.23.0-r0.apk
istio-install-cni-1.22-1.23.0-r1.apk
istio-install-cni-1.22-compat-1.23.0-r1.apk
lua-rrd-1.8.0-r0.apk
perl-rrd-1.8.0-r0.apk
rrdtool-1.8.0-r0.apk
rrdtool-cached-1.8.0-r0.apk
rrdtool-cached-openrc-1.8.0-r0.apk
rrdtool-cgi-1.8.0-r0.apk
rrdtool-dev-1.8.0-r0.apk
rrdtool-doc-1.8.0-r0.apk
rrdtool-utils-1.8.0-r0.apk

0 comments on commit d006d14

Please sign in to comment.