package/openssh: adding a way to install only sftp-server
PATCH 1/1 package/openssh: adding a way to install only sftp-server
This patch adds a way to install only sftp-server in case it is needed by other packages (like dropbear) or a full openssh installation is not needed.
--- package/openssh/Config.in | 9 +++++++++ package/openssh/openssh.mk | 10 ++++++++++ 2 files changed, 19 insertions(+)
package/openssh/Config.in +9 -0
@@ -9,3 +9,12 @@ config BR2_PACKAGE_OPENSSH friends. http://www.openssh.com/ + +if BR2_PACKAGE_OPENSSH + +config BR2_PACKAGE_OPENSSH_SFTP_ONLY + bool "install only sftp" + help + Install only sftp binary (ex: dropbear sftp support) + +endif
package/openssh/openssh.mk +10 -0
@@ -88,4 +88,14 @@ endef OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_SSH_COPY_ID +ifeq ($(BR2_PACKAGE_OPENSSH_SFTP_ONLY),y) +define OPENSSH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/sftp-server \ + $(TARGET_DIR)/usr/libexec/sftp-server +endef +undefine OPENSSH_INSTALL_INIT_SYSTEMD +undefine OPENSSH_INSTALL_INIT_SYSV +undefine OPENSSH_POST_INSTALL_TARGET_HOOKS +endif + $(eval $(autotools-package))
Signature · 1 line
2.17.1
PATCH 1/1 package/openssh: adding a way to install only sftp-server
Hello Angelo,
Quoted 3 lines · On Fri, 15 Feb 2019 23:02:57 +0100 Angelo Compagnucci…
This patch adds a way to install only sftp-server in case it is needed by other packages (like dropbear) or a full openssh installation is not needed.
Why not using package/gesftpserver/ if you need a sftp server in a dropbear-only environment ?
package/openssh/Config.in config BR2_PACKAGE_OPENSSH · line 15
Quoted 3 lines
package/openssh/Config.in +3
-0+if BR2_PACKAGE_OPENSSH + +config BR2_PACKAGE_OPENSSH_SFTP_ONLY
Options "FOO_ONLY" are not really nice. If we really want to do this, then we probably want:
BR2_PACKAGE_OPENSSH_SSHBR2_PACKAGE_OPENSSH_SSHDBR2_PACKAGE_OPENSSH_SFTP_SERVER
etc.
Quoted 11 lines
package/openssh/Config.in +5
-0+ bool "install only sftp" + help + Install only sftp binary (ex: dropbear sftp support) + +endifpackage/openssh/openssh.mk +0
-0@@ -88,4 +88,14 @@ endef
package/openssh/openssh.mk endef · line 98
Quoted 10 lines
package/openssh/openssh.mk +8
-0OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_SSH_COPY_ID +ifeq ($(BR2_PACKAGE_OPENSSH_SFTP_ONLY),y) +define OPENSSH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/sftp-server \ + $(TARGET_DIR)/usr/libexec/sftp-server +endef +undefine OPENSSH_INSTALL_INIT_SYSTEMD +undefine OPENSSH_INSTALL_INIT_SYSV +undefine OPENSSH_POST_INSTALL_TARGET_HOOKS
Yerk, "undefine". We don't use this anywhere else in Buildroot packages :-/
Could you consider using gesftpserver ? :-)
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/openssh: adding a way to install only sftp-server
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hello Angelo,
On Fri, 15 Feb 2019 23:02:57 +0100
Angelo Compagnucci <[email protected]> wrote:
Quoted 6 lines
Quoted 3 lines
This patch adds a way to install only sftp-server in case it is needed by other packages (like dropbear) or a full openssh installation is not needed.
Why not using package/gesftpserver/ if you need a sftp server in a dropbear-only environment ?
Yes, my thoughts exactly!
Signature · 1 line
Bye, Peter Korsgaard