From 3140454c3c97dca3202cbcb77b7c45701fdaa7ff Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 26 Apr 2023 14:04:19 +0200 Subject: [PATCH] sftp-server: new package Package OpenSSH's sftp-server program, so we can install it as dependency of dropbear in a future patch. Once sftp-server is installed, the scp tool from OpenSSH can be used with the SFTP protocol, without enabling the legacy flag for the legacy SCP protocol. The sftp-server binary is 126K in size. After packaging this, I realized that we could also have used the openssh-sftp-server package from poky: https://gitea.sysmocom.de/sysmo-bts/generic-poky/src/branch/pyro/meta/recipes-connectivity/openssh But let's use this extra package now, it uses the most recent OpenSSH source and doesn't build the rest of OpenSSH which we don't need. Related: SYS#6403 Change-Id: I376bc31413935f7a560afd916a623228550dc6fe --- .../sftp-server/sftp-server_9.3p1.bb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 recipes-extra/sftp-server/sftp-server_9.3p1.bb diff --git a/recipes-extra/sftp-server/sftp-server_9.3p1.bb b/recipes-extra/sftp-server/sftp-server_9.3p1.bb new file mode 100644 index 0000000..f0e937a --- /dev/null +++ b/recipes-extra/sftp-server/sftp-server_9.3p1.bb @@ -0,0 +1,30 @@ +# Package OpenSSH's sftp server, so the openssh client finds it and doesn't +# need to be run with a flag to use the legacy SCP protocol (SYS#6403) +SUMMARY = "OpenSSH's sftp-server" +DESCRIPTION = "OpenSSH's sftp-server, to be used with dropbear" +HOMEPAGE = "http://www.openssh.com/" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE;md5=072979064e691d342002f43cd89c0394" +DEPENDS = "" +SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz" + +SRC_URI[md5sum] = "3430d5e6e71419e28f440a42563cb553" +SRC_URI[sha256sum] = "e9baba7701a76a51f3d85a62c383a3c9dcd97fa900b859bc7db114c1868af8a8" + +inherit autotools + +EXTRA_OECONF += "--without-openssl --without-zlib" + +S = "${WORKDIR}/openssh-${PV}" + +do_compile() { + oe_runmake sftp-server +} + +do_install() { + install -Dm755 "${B}"/sftp-server \ + -t "${D}"/usr/libexec/ +} + +FILES_${PN} = "/usr/libexec/sftp-server"