summaryrefslogtreecommitdiff
path: root/package/network/services/dropbear
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-02-08 14:28:57 +0000
committerJo-Philipp Wich <jow@openwrt.org>2016-02-08 14:28:57 +0000
commitb78aae793e20e06defa1e75ab4d30dbb6807c139 (patch)
tree44df99dabbbbb2a8e64e0b96fa6f7eb3dce6db99 /package/network/services/dropbear
parentcc289e0adb936bf350db2037544d7eb8e5b084c3 (diff)
downloadmtk-20170518-b78aae793e20e06defa1e75ab4d30dbb6807c139.zip
mtk-20170518-b78aae793e20e06defa1e75ab4d30dbb6807c139.tar.gz
mtk-20170518-b78aae793e20e06defa1e75ab4d30dbb6807c139.tar.bz2
dropbear: honor CONFIG_TARGET_INIT_PATH
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48679
Diffstat (limited to 'package/network/services/dropbear')
-rw-r--r--package/network/services/dropbear/Makefile16
-rw-r--r--package/network/services/dropbear/patches/500-set-default-path.patch7
2 files changed, 17 insertions, 6 deletions
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 65a5e79..39ab04b 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
PKG_VERSION:=2015.71
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
@@ -23,10 +23,14 @@ PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
-PKG_CONFIG_DEPENDS:=CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_CURVE25519
+PKG_CONFIG_DEPENDS:=CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_CURVE25519
include $(INCLUDE_DIR)/package.mk
+ifneq ($(DUMP),1)
+ STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) echo $(CONFIG_TARGET_INIT_PATH) | md5s)
+endif
+
define Package/dropbear/Default
URL:=http://matt.ucc.asn.au/dropbear/
endef
@@ -74,12 +78,15 @@ CONFIGURE_ARGS += \
--disable-zlib \
--enable-bundled-libtom
-TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections
+TARGET_CFLAGS += -DDEFAULT_PATH=\\\"$(TARGET_INIT_PATH)\\\" -DARGTYPE=3 -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
define Build/Configure
$(Build/Configure/Default)
+ $(SED) 's,^#define DEFAULT_PATH .*$$$$,#define DEFAULT_PATH "$(TARGET_INIT_PATH)",g' \
+ $(PKG_BUILD_DIR)/options.h
+
awk 'BEGIN { rc = 1 } \
/'DROPBEAR_CURVE25519'/ { $$$$0 = "$(if $(CONFIG_DROPBEAR_CURVE25519),,// )#define 'DROPBEAR_CURVE25519'"; rc = 0 } \
{ print } \
@@ -97,6 +104,9 @@ define Build/Configure
>$(PKG_BUILD_DIR)/options.h.new && \
mv $(PKG_BUILD_DIR)/options.h.new $(PKG_BUILD_DIR)/options.h || exit 1; \
done
+
+ # Enforce rebuild of svr-chansession.c
+ rm -f $(PKG_BUILD_DIR)/svr-chansession.o
endef
define Build/Compile
diff --git a/package/network/services/dropbear/patches/500-set-default-path.patch b/package/network/services/dropbear/patches/500-set-default-path.patch
index 648c391..3f65250 100644
--- a/package/network/services/dropbear/patches/500-set-default-path.patch
+++ b/package/network/services/dropbear/patches/500-set-default-path.patch
@@ -1,11 +1,12 @@
--- a/options.h
+++ b/options.h
-@@ -347,7 +347,7 @@ be overridden at runtime with -I. 0 disa
+@@ -347,7 +347,9 @@ be overridden at runtime with -I. 0 disa
#define DEFAULT_IDLE_TIMEOUT 0
/* The default path. This will often get replaced by the shell */
--#define DEFAULT_PATH "/usr/bin:/bin"
-+#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin"
++#ifndef DEFAULT_PATH
+ #define DEFAULT_PATH "/usr/bin:/bin"
++#endif
/* Some other defines (that mostly should be left alone) are defined
* in sysoptions.h */