[OE-core] [PATCH] dropbear: hack around different sftp-server path definitions
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Fri Apr 26 16:38:45 UTC 2013
oe defines libexecdir to be different for each package which breaks
the expectations of dropbear which searches 'sftp-server' within
${libexecdir}.
Patch tries to guess the correct location of the sftp-server helper
program by testing for oe's idea of libexecdir. People on irc told
they are using the traditional '/usr/libexec' in their distribution so
that this case is handled as well.
Patch is not perfect, but solves the problem for now.
Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
---
meta/recipes-core/dropbear/dropbear.inc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 945e3d7..2a44a0c 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -32,6 +32,14 @@ inherit autotools update-rc.d
INITSCRIPT_NAME = "dropbear"
INITSCRIPT_PARAMS = "defaults 10"
+# workaround different libexecdir definition in oe; it does not fix
+# the multilib issues but mades sftp work again when dropbear and
+# openssh-sftp-server are for the same architecture.
+_sftp_server_path = "${@\
+ ['${libexecdir}/sftp-server','${libdir}/openssh/sftp-server']\
+ [d.getVar('libexecdir', True).endswith(d.expand('/${BPN}'))]}"
+CFLAGS += "-DSFTPSERVER_PATH=\\"${_sftp_server_path}\\""
+
CFLAGS_prepend = " -I. "
LD = "${CC}"
--
1.8.1.4
More information about the Openembedded-core
mailing list