Author: jow Date: 2016-02-08 15:28:57 +0100 (Mon, 08 Feb 2016) New Revision: 48679
Modified: trunk/package/network/services/dropbear/Makefile trunk/package/network/services/dropbear/patches/500-set-default-path.patch Log: dropbear: honor CONFIG_TARGET_INIT_PATH Signed-off-by: Jo-Philipp Wich <[email protected]> Modified: trunk/package/network/services/dropbear/Makefile =================================================================== --- trunk/package/network/services/dropbear/Makefile 2016-02-08 14:28:50 UTC (rev 48678) +++ trunk/package/network/services/dropbear/Makefile 2016-02-08 14:28:57 UTC (rev 48679) @@ -9,7 +9,7 @@ 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_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 @@ --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 @@ >$(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 Modified: trunk/package/network/services/dropbear/patches/500-set-default-path.patch =================================================================== --- trunk/package/network/services/dropbear/patches/500-set-default-path.patch 2016-02-08 14:28:50 UTC (rev 48678) +++ trunk/package/network/services/dropbear/patches/500-set-default-path.patch 2016-02-08 14:28:57 UTC (rev 48679) @@ -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 */ _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
