Version OORexx-4.2.0-1.debian700.x86_64.deb
OS: Debian 10 Buster
Reproduce by: dpkg -i OORexx-4.2.0-1.debian700.x86_64.deb
Symptom:
Failed to start rxapid.service: Unit rxapid.service not found.
dpkg: error processing package oorexx (--install):
installed oorexx package post-installation script subprocess returned error exit status 5
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
oorexx
The problem is in debian/postinst:
if [ -x /usr/bin/systemctl ] || [ -x /usr/sbin/systemctl ]; then
ln -s %{_datadir}/ooRexx/rxapid.service /etc/systemd/system/multi-user.target.wants/rxapid.service
systemctl --system daemon-reload
systemctl start rxapid.service
(the italic is caused by leftcurlybracket+underbar)
This produces a symbolic link, but not one you'd want
root@machine:/etc/systemd/system/multi-user.target.wants# ls -la rx*
lrwxrwxrwx 1 root root 33 Oct 11 04:55 rxapid.service -> %{_datadir}/ooRexx/rxapid.service
because therer is no percent+leftcurlybracket+underbar+datadir variable. Maybe ${datadir}?
Even if the symlink wasn't bad, there is no rxapid.service file in the package.
Even if there were an rxapid.service file, it needs to be accessible via the path /lib/systemd/system/rxapid.service (symlinked or installed there, unsure of correct policy)
Circumvention:
Get rxapid.service from
https://sourceforge.net/p/oorexx/code-0/HEAD/tree/main/trunk/platform/unix/rxapid.service
and install in /lib/systemd/system (or install elsewhere and symlink from here)
symlink to /lib/systemd/system/rxapid.service from /etc/systemd/system/mult-user.target.wants/
systemctl --daemon-reload
systemctl start rxapid.service
Result: rxapid runs
user@machine:~$ ./test.rex
3 - parse version v;
>>> "REXX-ooRexx_4.2.0(MT)_64-bit 6.04 29 Dec 2013"
>=> V <= "REXX-ooRexx_4.2.0(MT)_64-bit 6.04 29 Dec 2013"
3 - say v
>V> V => "REXX-ooRexx_4.2.0(MT)_64-bit 6.04 29 Dec 2013"
>>> "REXX-ooRexx_4.2.0(MT)_64-bit 6.04 29 Dec 2013"
REXX-ooRexx_4.2.0(MT)_64-bit 6.04 29 Dec 2013
4 - push '123'
>L> "123"
>>> "123"
5 - pull what
>>> "123"
>=> WHAT <= "123"
6 - say what
>V> WHAT => "123"
>>> "123"
123
The install works without a problem on Debian 9, for some reason it got installed as an /etc/init.d-style script. Not sure why based on that preinst.
Still, I'm impressed that a package built in 2013 is still (nearly correctly) installable and executable.
Anonymous
Okay, looked harder in the package, found rxapid.service
Better circumvention:
repackaged the deb after edited postinst from line 91 to end:
which seems to install and uninstall reliably.
but won't install twice without complaint unless DEBIAN/prerm gets fixed to remove the added symlink, line 73 to end: