summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2016-06-24 13:53:09 +0930
committerJoel Stanley <joel@jms.id.au>2019-03-05 13:30:58 +1030
commit83a3d5a4ae04e35b16678f1299202e5eaa151bd4 (patch)
tree4cf5f753dd45a911a25c22c6946d0da2f4928c46
parentbe24e9e7aa684569ccfd0435678477db37a33d99 (diff)
downloadbuildroot-83a3d5a4ae04e35b16678f1299202e5eaa151bd4.tar.gz
buildroot-83a3d5a4ae04e35b16678f1299202e5eaa151bd4.zip
package/dropbear: Add separate configuration option for dropbear server
Currently, the dropbear package installs both client and server components. This means that when we only want the client binaries, we also get the server, which is run from init. Even though it's a multi-call binary (the client and server exist in the same executable), we can define which parts are compiled-in. We'd also like to selectively install the links and init scripts. This change introduces a separate configuration for the dropbear server. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--package/dropbear/Config.in6
-rw-r--r--package/dropbear/dropbear.mk9
2 files changed, 14 insertions, 1 deletions
diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in
index 62f77bad9d..f170b010a3 100644
--- a/package/dropbear/Config.in
+++ b/package/dropbear/Config.in
@@ -28,6 +28,12 @@ config BR2_PACKAGE_DROPBEAR_CLIENT
and are therefore always build regardless this setting:
dropbear, dropbearkey, dropbearconvert, scp
+config BR2_PACKAGE_DROPBEAR_SERVER
+ bool "dropbear ssh server"
+ default y
+ help
+ Enable the dropbear ssh server, run from init
+
config BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS
bool "disable reverse DNS lookups"
help
diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index a5a8243bd4..4ff35dab40 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -10,7 +10,7 @@ DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
DROPBEAR_LICENSE = MIT, BSD-2-Clause-like, BSD-2-Clause
DROPBEAR_LICENSE_FILES = LICENSE
DROPBEAR_TARGET_BINS = dropbearkey dropbearconvert scp
-DROPBEAR_PROGRAMS = dropbear $(DROPBEAR_TARGET_BINS)
+DROPBEAR_PROGRAMS = $(DROPBEAR_TARGET_BINS)
# Disable hardening flags added by dropbear configure.ac, and let
# Buildroot add them when the relevant options are enabled. This
@@ -23,6 +23,11 @@ DROPBEAR_PROGRAMS += dbclient
DROPBEAR_TARGET_BINS += dbclient ssh
endif
+ifeq ($(BR2_PACKAGE_DROPBEAR_SERVER),y)
+DROPBEAR_PROGRAMS += dropbear
+DROPBEAR_TARGET_BINS += dropbear
+endif
+
DROPBEAR_MAKE = \
$(MAKE) MULTI=1 SCPPROGRESS=1 \
PROGRAMS="$(DROPBEAR_PROGRAMS)"
@@ -87,6 +92,7 @@ endef
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_CUSTOM_PATH
+ifeq ($(BR2_PACKAGE_DROPBEAR_SERVER),y)
define DROPBEAR_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/dropbear/dropbear.service \
$(TARGET_DIR)/usr/lib/systemd/system/dropbear.service
@@ -103,6 +109,7 @@ endef
else
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
endif
+endif
ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),)
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_ENABLE_REVERSE_DNS
OpenPOWER on IntegriCloud