Re: [OpenWrt-Devel] [PATCH] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist

2018-06-25 Thread Yousong Zhou
On Sat, 23 Jun 2018 at 00:51, Rosen Penev  wrote:
>
> On Fri, Jun 22, 2018 at 1:53 AM Yousong Zhou  wrote:
> >
> > On Sun, 17 Jun 2018 at 11:07, Rosen Penev  wrote:
> > >
> > > If you run opkg install openssh-client and then remove it, the ssh client
> > > symlink that was initially there goes away. This avoids that problem.
> > >
> >
> > opkg's "alternatives" support fits this situation perfectly.  Please
> > take busybox ip and ip-tiny, ip-full as an example.
> >
> Hmm? Dropbear needs to be installed alongside OpenSSH in order to edit
> sshd_config to enable root login.

Sorry, failed to get how this symlink management thing affects root login.

I created a pull request for openssh-client [1] and patches also
dropbear [2] to use the alternatives support in opkg.  The
alternatives support intends to be a general solution to the
preinst/postrm hook or PATH precedence hack.

 [1] https://github.com/openwrt/packages/pull/6344
 [2] 
https://git.openwrt.org/?p=openwrt/staging/yousong.git;a=shortlog;h=refs/heads/ssh-alt

yousong

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist

2018-06-22 Thread Rosen Penev
On Fri, Jun 22, 2018 at 1:53 AM Yousong Zhou  wrote:
>
> On Sun, 17 Jun 2018 at 11:07, Rosen Penev  wrote:
> >
> > If you run opkg install openssh-client and then remove it, the ssh client
> > symlink that was initially there goes away. This avoids that problem.
> >
>
> opkg's "alternatives" support fits this situation perfectly.  Please
> take busybox ip and ip-tiny, ip-full as an example.
>
Hmm? Dropbear needs to be installed alongside OpenSSH in order to edit
sshd_config to enable root login.
> yousong

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist

2018-06-22 Thread Yousong Zhou
On Sun, 17 Jun 2018 at 11:07, Rosen Penev  wrote:
>
> If you run opkg install openssh-client and then remove it, the ssh client
> symlink that was initially there goes away. This avoids that problem.
>

opkg's "alternatives" support fits this situation perfectly.  Please
take busybox ip and ip-tiny, ip-full as an example.

yousong

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist

2018-06-19 Thread Rosen Penev
On Tue, Jun 19, 2018 at 9:56 AM, Paul Oranje  wrote:
> Can opkg remove not restore the original softlink to dropbear ? (bottom-line 
> reinstall dropbear)
Possible.
> And even when that isn't an option, why also move the dropbear binary to sbin 
> and not just the softlink ?
Simpler patch
>
> Paul
>
>> Op 17 jun. 2018, om 05:06 heeft Rosen Penev  het volgende 
>> geschreven:
>>
>> If you run opkg install openssh-client and then remove it, the ssh client
>> symlink that was initially there goes away. This avoids that problem.
>>
>> Signed-off-by: Rosen Penev 
>> ---
>> package/network/services/dropbear/Makefile | 18 +-
>> .../services/dropbear/files/dropbear.init  |  2 +-
>> 2 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/package/network/services/dropbear/Makefile 
>> b/package/network/services/dropbear/Makefile
>> index 21ac09f724..41f51b284b 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:=2017.75
>> -PKG_RELEASE:=5
>> +PKG_RELEASE:=6
>>
>> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>> PKG_SOURCE_URL:= \
>> @@ -57,7 +57,7 @@ endef
>>
>> define Package/dropbear/conffiles
>> /etc/dropbear/dropbear_rsa_host_key
>> -/etc/config/dropbear
>> +/etc/config/dropbear
>> endef
>>
>> define Package/dropbearconvert
>> @@ -128,13 +128,13 @@ define Build/Compile
>> endef
>>
>> define Package/dropbear/install
>> - $(INSTALL_DIR) $(1)/usr/sbin
>> - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
>> - $(INSTALL_DIR) $(1)/usr/bin
>> - $(LN) ../sbin/dropbear $(1)/usr/bin/scp
>> - $(LN) ../sbin/dropbear $(1)/usr/bin/ssh
>> - $(LN) ../sbin/dropbear $(1)/usr/bin/dbclient
>> - $(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey
>> + $(INSTALL_DIR) $(1)/sbin
>> + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/sbin/dropbear
>> + $(INSTALL_DIR) $(1)/bin
>> + $(LN) ../sbin/dropbear $(1)/bin/scp
>> + $(LN) ../sbin/dropbear $(1)/bin/ssh
>> + $(LN) ../sbin/dropbear $(1)/bin/dbclient
>> + $(LN) ../sbin/dropbear $(1)/bin/dropbearkey
>>   $(INSTALL_DIR) $(1)/etc/config
>>   $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
>>   $(INSTALL_DIR) $(1)/etc/init.d
>> diff --git a/package/network/services/dropbear/files/dropbear.init 
>> b/package/network/services/dropbear/files/dropbear.init
>> index 2225113498..d9a6bd4959 100755
>> --- a/package/network/services/dropbear/files/dropbear.init
>> +++ b/package/network/services/dropbear/files/dropbear.init
>> @@ -6,7 +6,7 @@ START=50
>> STOP=50
>>
>> USE_PROCD=1
>> -PROG=/usr/sbin/dropbear
>> +PROG=/sbin/dropbear
>> NAME=dropbear
>> PIDCOUNT=0
>> EXTRA_COMMANDS="killclients"
>> --
>> 2.17.1
>>
>>
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/listinfo/openwrt-devel
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist

2018-06-19 Thread Paul Oranje
Can opkg remove not restore the original softlink to dropbear ? (bottom-line 
reinstall dropbear)
And even when that isn't an option, why also move the dropbear binary to sbin 
and not just the softlink ?

Paul

> Op 17 jun. 2018, om 05:06 heeft Rosen Penev  het volgende 
> geschreven:
> 
> If you run opkg install openssh-client and then remove it, the ssh client
> symlink that was initially there goes away. This avoids that problem.
> 
> Signed-off-by: Rosen Penev 
> ---
> package/network/services/dropbear/Makefile | 18 +-
> .../services/dropbear/files/dropbear.init  |  2 +-
> 2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/package/network/services/dropbear/Makefile 
> b/package/network/services/dropbear/Makefile
> index 21ac09f724..41f51b284b 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:=2017.75
> -PKG_RELEASE:=5
> +PKG_RELEASE:=6
> 
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
> PKG_SOURCE_URL:= \
> @@ -57,7 +57,7 @@ endef
> 
> define Package/dropbear/conffiles
> /etc/dropbear/dropbear_rsa_host_key
> -/etc/config/dropbear 
> +/etc/config/dropbear
> endef
> 
> define Package/dropbearconvert
> @@ -128,13 +128,13 @@ define Build/Compile
> endef
> 
> define Package/dropbear/install
> - $(INSTALL_DIR) $(1)/usr/sbin
> - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
> - $(INSTALL_DIR) $(1)/usr/bin
> - $(LN) ../sbin/dropbear $(1)/usr/bin/scp
> - $(LN) ../sbin/dropbear $(1)/usr/bin/ssh
> - $(LN) ../sbin/dropbear $(1)/usr/bin/dbclient
> - $(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey
> + $(INSTALL_DIR) $(1)/sbin
> + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/sbin/dropbear
> + $(INSTALL_DIR) $(1)/bin
> + $(LN) ../sbin/dropbear $(1)/bin/scp
> + $(LN) ../sbin/dropbear $(1)/bin/ssh
> + $(LN) ../sbin/dropbear $(1)/bin/dbclient
> + $(LN) ../sbin/dropbear $(1)/bin/dropbearkey
>   $(INSTALL_DIR) $(1)/etc/config
>   $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
>   $(INSTALL_DIR) $(1)/etc/init.d
> diff --git a/package/network/services/dropbear/files/dropbear.init 
> b/package/network/services/dropbear/files/dropbear.init
> index 2225113498..d9a6bd4959 100755
> --- a/package/network/services/dropbear/files/dropbear.init
> +++ b/package/network/services/dropbear/files/dropbear.init
> @@ -6,7 +6,7 @@ START=50
> STOP=50
> 
> USE_PROCD=1
> -PROG=/usr/sbin/dropbear
> +PROG=/sbin/dropbear
> NAME=dropbear
> PIDCOUNT=0
> EXTRA_COMMANDS="killclients"
> -- 
> 2.17.1
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist

2018-06-16 Thread Rosen Penev
If you run opkg install openssh-client and then remove it, the ssh client
symlink that was initially there goes away. This avoids that problem.

Signed-off-by: Rosen Penev 
---
 package/network/services/dropbear/Makefile | 18 +-
 .../services/dropbear/files/dropbear.init  |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/package/network/services/dropbear/Makefile 
b/package/network/services/dropbear/Makefile
index 21ac09f724..41f51b284b 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:=2017.75
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
@@ -57,7 +57,7 @@ endef
 
 define Package/dropbear/conffiles
 /etc/dropbear/dropbear_rsa_host_key
-/etc/config/dropbear 
+/etc/config/dropbear
 endef
 
 define Package/dropbearconvert
@@ -128,13 +128,13 @@ define Build/Compile
 endef
 
 define Package/dropbear/install
-   $(INSTALL_DIR) $(1)/usr/sbin
-   $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
-   $(INSTALL_DIR) $(1)/usr/bin
-   $(LN) ../sbin/dropbear $(1)/usr/bin/scp
-   $(LN) ../sbin/dropbear $(1)/usr/bin/ssh
-   $(LN) ../sbin/dropbear $(1)/usr/bin/dbclient
-   $(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey
+   $(INSTALL_DIR) $(1)/sbin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/sbin/dropbear
+   $(INSTALL_DIR) $(1)/bin
+   $(LN) ../sbin/dropbear $(1)/bin/scp
+   $(LN) ../sbin/dropbear $(1)/bin/ssh
+   $(LN) ../sbin/dropbear $(1)/bin/dbclient
+   $(LN) ../sbin/dropbear $(1)/bin/dropbearkey
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
$(INSTALL_DIR) $(1)/etc/init.d
diff --git a/package/network/services/dropbear/files/dropbear.init 
b/package/network/services/dropbear/files/dropbear.init
index 2225113498..d9a6bd4959 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -6,7 +6,7 @@ START=50
 STOP=50
 
 USE_PROCD=1
-PROG=/usr/sbin/dropbear
+PROG=/sbin/dropbear
 NAME=dropbear
 PIDCOUNT=0
 EXTRA_COMMANDS="killclients"
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel