OpenWrt Forum Archive

Topic: build failure when including openssh-client in image

The content of this topic has been archived on 19 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Since about 2 weeks, building an image including openssh-client fails in the following fashion:

Collected errors:
* pkg_run_script: package "openssh-client" preinst script returned status 126.
* preinst_configure: Aborting installation of openssh-client.
* opkg_install_cmd: Cannot install package openssh-client-utils.
* pkg_run_script: package "openssh-client" preinst script returned status 126.
* preinst_configure: Aborting installation of openssh-client.
* opkg_install_cmd: Cannot install package openssh-client.

I've tried commenting out everything inside the preinit script (from the Makefile in which it is generated), but that doesn't seem to do the trick.

I've tried this for a trunk build for a TP-Link WDR4900 and a Netgear WNDR3700v2. Have been building my own images for the last 3 years or so, and am currently running an image including openssh-client on the '4900 (Barrier Breaker r40526). In that version there was no problem compiling.

Any ideas on the cause, or how to investigate this further? Should I attempt git bisect to find which commit broke things?

You need to post the full log, since the actual error happens way up.

Borromini wrote:

You need to post the full log, since the actual error happens way up.

Pasted the output of make V=s here http://pastebin.com/U2WZQqji

There's only an (ignored) error 123 in clean-staging that I can see.

Looked through the output (V=s) of a make after dirclean and spotted this:

Installing openssh-client-utils (6.6p1-1) to root...
Installing openssh-client (6.6p1-1) to root...
sh: /tmp/opkg-xI14yc/openssh-client-X9gm4r/preinst: Permission denied
Installing openssh-client (6.6p1-1) to root...
sh: /tmp/opkg-xI14yc/openssh-client-X9gm4r/preinst: Permission denied
Installing openssh-keygen (6.6p1-1) to root...

One step further - now to figure out what causes the problem with the preinst script in the /tmp directory.

bdeblier wrote:

Installing openssh-client-utils (6.6p1-1) to root...
Installing openssh-client (6.6p1-1) to root...
sh: /tmp/opkg-xI14yc/openssh-client-X9gm4r/preinst: Permission denied
Installing openssh-client (6.6p1-1) to root...
sh: /tmp/opkg-xI14yc/openssh-client-X9gm4r/preinst: Permission denied
Installing openssh-keygen (6.6p1-1) to root...

We're not supposed to execute files in the /tmp directory. Of course this fails since I have the noexec mount option on my /tmp. This is a security problem in the build system.

The discussion might have continued from here.