Compare commits

...

2 Commits

Author SHA1 Message Date
Oliver Smith 50d981d600 dropbear: add sftp-server to rdepends
Related: SYS#6403
Change-Id: I4044a19d172c9617eecabd083cfbc04832591e6a
2023-05-02 13:43:17 +02:00
Oliver Smith e2224e84e9 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.

After packaging this, I realized that we could also have used
the openssh-sftp-server package from poky, a subpackage that gets built
from openssh:
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
2023-05-02 13:33:20 +02:00
2 changed files with 37 additions and 1 deletions

View File

@ -29,7 +29,9 @@ PAM_PLUGINS = "libpam-runtime \
pam-plugin-permit \
pam-plugin-unix \
"
RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)} \
sftp-server \
"
inherit autotools update-rc.d systemd

View File

@ -0,0 +1,34 @@
# 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"
# Official mirror is down as of writing. The github mirror is mentioned here:
# https://www.openssh.com/portable.html
GIT_TAG = "V_9_3_P1"
SRC_URI = "https://github.com/openssh/openssh-portable/archive/refs/tags/${GIT_TAG}.tar.gz"
SRC_URI[md5sum] = "68f7f08269c442e2728656cd97506478"
SRC_URI[sha256sum] = "c5e541b59bdad8950a8c999fe18ca1ad39f6132b042cd85fb29e788ca9f9ce47"
inherit autotools
EXTRA_OECONF += "--without-openssl --without-zlib"
S = "${WORKDIR}/openssh-portable-${GIT_TAG}"
do_compile() {
oe_runmake sftp-server
}
do_install() {
install -Dm755 "${B}"/sftp-server \
-t "${D}"/usr/libexec/
}
FILES_${PN} = "/usr/lib/sftp-server"