SeattleMeshnet / meshbox

The Hyperboria peering device
https://github.com/hyperboria/cjdns
GNU General Public License v3.0
141 stars 25 forks source link

postinst directive (opkg) calls unknown function 'default_postinst' #40

Closed wfleurant closed 9 years ago

wfleurant commented 9 years ago

ar71xx platform running barrier_breaker firmware. opkg sucessfully installed from buildbot snapshots for 'lastest' (not meshbox/for-14.07). collected "errors" but did not disrupt installation.

root@OpenWrt:/etc/config# opkg update
Downloading http://downloads.openwrt.org/barrier_breaker/14.07-rc1/ar71xx/mikrotik/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker.
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/meshbox/Packages.gz.
Updated list of available packages in /var/opkg-lists/meshbox.
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/packages//Packages.gz.
Updated list of available packages in /var/opkg-lists/meshbox_packages.
root@OpenWrt:/etc/config# opkg install luci-app-cjdns
Installing luci-app-cjdns (1.3-4) to root...
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/meshbox/luci-app-cjdns_1.3-4_ar71xx.ipk.
Installing cjdns (0.16-2) to root...
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/meshbox/cjdns_0.16-2_ar71xx.ipk.
Installing kmod-tun (3.10.44-1) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07-rc1/ar71xx/mikrotik/packages/kmod-tun_3.10.44-1_ar71xx.ipk.
Installing libpthread (0.9.33.2-1) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07-rc1/ar71xx/mikrotik/packages/libpthread_0.9.33.2-1_ar71xx.ipk.
Installing librt (0.9.33.2-1) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07-rc1/ar71xx/mikrotik/packages/librt_0.9.33.2-1_ar71xx.ipk.
Installing lua-bencode (2.1.0-1) to root...
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/packages//lua-bencode_2.1.0-1_ar71xx.ipk.
Installing dkjson (2.5-2) to root...
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/packages//dkjson_2.5-2_ar71xx.ipk.
Installing luasocket (3.0-rc1-20130909-2) to root...
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/packages//luasocket_3.0-rc1-20130909-2_ar71xx..
Installing lua-sha2 (0.2.0-1) to root...
Downloading http://buildbot.meshwith.me/snapshots/ar71xx-master/latest/packages/packages//lua-sha2_0.2.0-1_ar71xx.ipk.
Configuring lua-bencode.
//usr/lib/opkg/info/lua-bencode.postinst: line 4: default_postinst: not found
Configuring libpthread.
Configuring kmod-tun.
[ 1293.150000] tun: Universal TUN/TAP device driver, 1.6
[ 1293.150000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Configuring luasocket.
//usr/lib/opkg/info/luasocket.postinst: line 4: default_postinst: not found
Configuring dkjson.
//usr/lib/opkg/info/dkjson.postinst: line 4: default_postinst: not found
Configuring librt.
Configuring lua-sha2.
//usr/lib/opkg/info/lua-sha2.postinst: line 4: default_postinst: not found
Configuring cjdns.
//usr/lib/opkg/info/cjdns.postinst: line 4: default_postinst: not found
Configuring luci-app-cjdns.
//usr/lib/opkg/info/luci-app-cjdns.postinst: line 4: default_postinst: not found
Collected errors:
 * pkg_run_script: package "lua-bencode" postinst script returned status 127.
 * opkg_configure: lua-bencode.postinst returned 127.
 * pkg_run_script: package "luasocket" postinst script returned status 127.
 * opkg_configure: luasocket.postinst returned 127.
 * pkg_run_script: package "dkjson" postinst script returned status 127.
 * opkg_configure: dkjson.postinst returned 127.
 * pkg_run_script: package "lua-sha2" postinst script returned status 127.
 * opkg_configure: lua-sha2.postinst returned 127.
 * pkg_run_script: package "cjdns" postinst script returned status 127.
 * opkg_configure: cjdns.postinst returned 127.
 * pkg_run_script: package "luci-app-cjdns" postinst script returned status 127.
 * opkg_configure: luci-app-cjdns.postinst returned 127.
root@OpenWrt:/etc/config# cjdroute --version
[ 1681.270000] warning: process `cjdroute' used the deprecated sysctl system call with 1.40.6.
Cjdns protocol version: 16
wfleurant commented 9 years ago

Note: cjdns-postinst-pkg file (with --genconf) is OK

However, all other exit codes of 127 are attempting to call function default_postinst

root@OpenWrt:~# cat /usr/lib/opkg/info/cjdns.postinst
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@
wfleurant commented 9 years ago

Ah. The only postinst directive is cjdns/Makefile -- the call to default_postinst is a feature in openwrt/trunk /lib/functions.sh. Works in meshbox/for-14.07