[PATCH] dropbear: allow disabling support for scp

Hans Dedecker dedeckeh at gmail.com
Thu Aug 13 15:51:58 EDT 2020


Hi,

On Wed, Jul 22, 2020 at 3:34 PM Rui Salvaterra <rsalvaterra at gmail.com> wrote:
>
> If not needed, disabling scp allows for a nice size reduction.
>
> Dropbear executable size comparison:
>
> 153621 bytes (baseline)
> 133077 bytes (without scp)
>
> In other words, we trim a total of 20544 bytes.
>
> [Note: This patch is on top of
> "dropbear: fix ssh alternative when dbclient isn't built"]
>
> Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
> ---
>  package/network/services/dropbear/Config.in | 4 ++++
>  package/network/services/dropbear/Makefile  | 8 +++++---
>  2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in
> index 0ac84ee206..b9ecbc815b 100644
> --- a/package/network/services/dropbear/Config.in
> +++ b/package/network/services/dropbear/Config.in
> @@ -102,4 +102,8 @@ config DROPBEAR_DBCLIENT
>         bool "Build dropbear with dbclient"
>         default y
>
> +config DROPBEAR_SCP
> +       bool "Build dropbear with scp"
> +       default y
> +
>  endmenu
> diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
> index edd20909b1..8b57b214ae 100644
> --- a/package/network/services/dropbear/Makefile
> +++ b/package/network/services/dropbear/Makefile
> @@ -31,7 +31,7 @@ PKG_CONFIG_DEPENDS:= \
>         CONFIG_DROPBEAR_RSA CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \
>         CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \
>         CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \
> -       CONFIG_DROPBEAR_DBCLIENT
> +       CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP
>
>  include $(INCLUDE_DIR)/package.mk
>
> @@ -53,7 +53,9 @@ define Package/dropbear
>    CATEGORY:=Base system
>    TITLE:=Small SSH2 client/server
>    DEPENDS:= +DROPBEAR_ZLIB:zlib
> -  ALTERNATIVES:=100:/usr/bin/scp:/usr/sbin/dropbear
> +  ALTERNATIVES:=
> +  $(if $(CONFIG_DROPBEAR_SCP),ALTERNATIVES+= \
> +         100:/usr/bin/scp:/usr/sbin/dropbear,)
>    $(if $(CONFIG_DROPBEAR_DBCLIENT),ALTERNATIVES+= \
>           100:/usr/bin/ssh:/usr/sbin/dropbear,)
>
> @@ -149,7 +151,7 @@ endef
>  define Build/Compile
>         +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
>                 $(TARGET_CONFIGURE_OPTS) \
> -               PROGRAMS="dropbear $(if $(CONFIG_DROPBEAR_DBCLIENT),dbclient,) dropbearkey scp" \
> +               PROGRAMS="dropbear $(if $(CONFIG_DROPBEAR_DBCLIENT),dbclient,) dropbearkey $(if $(CONFIG_DROPBEAR_SCP),scp,)" \
>                 MULTI=1 SCPPROGRESS=1
>         +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
>                 $(TARGET_CONFIGURE_OPTS) \
> --
> 2.27.0
The patch is not applying anymore :

Applying: dropbear: allow disabling support for scp
error: sha1 information is lacking or useless
(package/network/services/dropbear/Config.in).
error: could not build fake ancestor

Can you send a V2 based on latest master ?

Hans
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list