Changeset 48679


Ignore:
Timestamp:
2016-02-08T15:28:57+01:00 (2 years ago)
Author:
jow
Message:

dropbear: honor CONFIG_TARGET_INIT_PATH

Signed-off-by: Jo-Philipp Wich <jow@…>

Location:
trunk/package/network/services/dropbear
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/services/dropbear/Makefile

    r48243 r48679  
    1010PKG_NAME:=dropbear 
    1111PKG_VERSION:=2015.71 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     
    2424PKG_USE_MIPS16:=0 
    2525 
    26 PKG_CONFIG_DEPENDS:=CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_CURVE25519 
     26PKG_CONFIG_DEPENDS:=CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_CURVE25519 
    2727 
    2828include $(INCLUDE_DIR)/package.mk 
     29 
     30ifneq ($(DUMP),1) 
     31  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) echo $(CONFIG_TARGET_INIT_PATH) | md5s) 
     32endif 
    2933 
    3034define Package/dropbear/Default 
     
    7579        --enable-bundled-libtom 
    7680 
    77 TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections 
     81TARGET_CFLAGS += -DDEFAULT_PATH=\\\"$(TARGET_INIT_PATH)\\\" -DARGTYPE=3 -ffunction-sections -fdata-sections 
    7882TARGET_LDFLAGS += -Wl,--gc-sections 
    7983 
    8084define Build/Configure 
    8185        $(Build/Configure/Default) 
     86 
     87        $(SED) 's,^#define DEFAULT_PATH .*$$$$,#define DEFAULT_PATH "$(TARGET_INIT_PATH)",g' \ 
     88                $(PKG_BUILD_DIR)/options.h 
    8289 
    8390        awk 'BEGIN { rc = 1 } \ 
     
    98105          mv $(PKG_BUILD_DIR)/options.h.new $(PKG_BUILD_DIR)/options.h || exit 1; \ 
    99106        done 
     107 
     108        # Enforce rebuild of svr-chansession.c 
     109        rm -f $(PKG_BUILD_DIR)/svr-chansession.o 
    100110endef 
    101111 
  • trunk/package/network/services/dropbear/patches/500-set-default-path.patch

    r48243 r48679  
    11--- a/options.h 
    22+++ b/options.h 
    3 @@ -347,7 +347,7 @@ be overridden at runtime with -I. 0 disa 
     3@@ -347,7 +347,9 @@ be overridden at runtime with -I. 0 disa 
    44 #define DEFAULT_IDLE_TIMEOUT 0 
    55  
    66 /* The default path. This will often get replaced by the shell */ 
    7 -#define DEFAULT_PATH "/usr/bin:/bin" 
    8 +#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin" 
     7+#ifndef DEFAULT_PATH 
     8 #define DEFAULT_PATH "/usr/bin:/bin" 
     9+#endif 
    910  
    1011 /* Some other defines (that mostly should be left alone) are defined 
Note: See TracChangeset for help on using the changeset viewer.