Skip to content

Commit

Permalink
package/dropbear: Add separate configuration option for dropbear server
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
  • Loading branch information
shenki committed Jun 2, 2019
1 parent 8988666 commit 6bb1331
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package/dropbear/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion package/dropbear/dropbear.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
DROPBEAR_LICENSE = MIT, BSD-2-Clause, BSD-3-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
Expand All @@ -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)"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6bb1331

Please sign in to comment.