Menu

#1657 Debian 10 Buster install failure

v4.2.0
open
nobody
None
none
1
2019-10-11
2019-10-11
No

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.

Discussion

  • Geoff Stevens

    Geoff Stevens - 2019-10-11

    Okay, looked harder in the package, found rxapid.service

    Better circumvention:

    repackaged the deb after edited postinst from line 91 to end:

    # Debian specific set up for rxapid
    if [ -x /usr/bin/systemctl ] || [ -x /usr/sbin/systemctl ]; then
       ln -s ${data_dir}/rxapid.service /lib/systemd/system/rxapid.service
       ln -s /lib/systemd/system/rxapid.service /etc/systemd/system/multi-user.target.wants/rxapid.service
       systemctl --system daemon-reload
       systemctl start rxapid.service
    else
       cp ${bin_dir}/rxapid       /etc/init.d
       update-rc.d rxapid start 89 2 3 4 5 . stop 89 0 1 6 . > /dev/null 2>&1
       /etc/init.d/rxapid start
    fi
    

    which seems to install and uninstall reliably.

     
  • Geoff Stevens

    Geoff Stevens - 2019-10-11

    but won't install twice without complaint unless DEBIAN/prerm gets fixed to remove the added symlink, line 73 to end:

    # Debian specific removal of rxapid
    if [ -x /usr/bin/systemctl ] || [ -x /usr/sbin/systemctl ]; then
       systemctl stop rxapid.service
       rm -f /etc/systemd/system/multi-user.target.wants/rxapid.service
       rm -f /lib/systemd/system/rxapid.service
       systemctl --system daemon-reload
    else
       if [ -e /etc/init.d/rxapid ]; then
          /etc/init.d/rxapid stop
       fi
       rm -f /etc/init.d/rxapid
       update-rc.d rxapid remove
    fi
    
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB