Skip to contentSkip to conversation

Fixes for Eclipse Qemu debug

PATCH In review bavery 6 participants 11 messages Aug 8, 2016 – Aug 9, 2016

lore
Share & tools
lore

bavery

author
#0 lore raw

cover Fixes for Eclipse Qemu debug

This patch set fixes YOCTO #9362. The busybox resize utility was running on ssh connections from Eclipse and causing Eclipse to fail to start gdbserver. Furthermore, the opensftp server wasn't starting up correctly without the openssh-server.

Thanks go to Max Krummenacher <[email protected]> for suggesting a good solution to the serial/ssh connection issue in basefiles:etc/profile!

-Brian

The following changes since commit dfc016fbf13e62f7767edaf7abadf1d1b72680b2:

maintainers.inc: remove augeas (2016-08-04 20:56:11 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib bavery/eclipse-resize-fixup
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/eclipse-resize-fixup

bavery (2):
packagegroup-core-eclipse-debug: add openssh server to support
openssh-sftp-server
base-files: restrict resize to run on serial consoles only in profile

│·

 recipes-core/base-files/base-files/profile                    | 7 ++++---
 recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

--
1.9.1

author
#1 lore raw

PATCH 1/2 packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server lets the sftp server start up correctly.

YOCTO #9362

---
 recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb +1 -0
index c45463f..c32fef5 100644
@@ -6,4 +6,5 @@ RDEPENDS_${PN} = "\
     gdbserver \
     tcf-agent \
     openssh-sftp-server \
+    openssh \
     "
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/2 base-files: restrict resize to run on serial consoles only in profile │·

We don't need/wan't to run resize on an ssh connection. It's useless and it breaks the Eclipse SSH debug connection. So, we added a check.

YOCTO #9362

---
 recipes-core/base-files/base-files/profile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
recipes-core/base-files/base-files/profile +4 -3
index e98e786..ba1b9ba 100644
@@ -6,7 +6,7 @@ EDITOR="vi"			# needed for packages like cron, git-commit
 test -z "$TERM" && TERM="vt100"	# Basic terminal capab. For screen etc.
 
 if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
-	TZ="UTC"		# Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html 
+	TZ="UTC"		# Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
 				# for an explanation of how to set this to your local timezone.
 	export TZ
 fi
@@ -29,10 +29,11 @@ if [ -d /etc/profile.d ]; then
 fi
 
 if [ -x /usr/bin/resize ];then
-  /usr/bin/resize >/dev/null
+  # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
+  # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
+  test `tty | cut -c1-8` = "/dev/tty" && resize >/dev/null
 fi
 
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
 
 umask 022
-
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

In reply to bavery
Quoted 2 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server lets the sftp server start up correctly.

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND on it instead ?

Quoted 19 lines

YOCTO #9362

---
 recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb +1 -0
index c45463f..c32fef5 100644
@@ -6,4 +6,5 @@ RDEPENDS_${PN} = "\
     gdbserver \
     tcf-agent \
     openssh-sftp-server \
+    openssh \
     "
#4 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

Quoted 8 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND on it instead ?

Or rather, since there are multiple providers of ssh-server(openssh and dropbear that I know of), shouldn't there be a PREFERRED_PROVIDER_virtual/ssh-server, that openssh-sftp-server could RDEPEND on ?

Quoted 22 lines
Quoted 21 lines

YOCTO #9362

---
 recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb b/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb index c45463f..c32fef5 100644

recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb +1 -0
@@ -6,4 +6,5 @@ RDEPENDS_${PN} = "\
     gdbserver \
     tcf-agent \
     openssh-sftp-server \
+    openssh \
     "
#5 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

In reply to Jacob Kroon
Quoted 8 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND
on it instead ?

I suspect you are right and that it needs an RDEPENDS if it doesn't work without it. It also needs a comment explaining the dependency so someone doesn't remove it.

Cheers,

Richard

#6 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

Quoted 9 lines · Richard Purdie
Quoted 5 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

Quoted 7 lines
Quoted 3 lines

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND
on it instead ?

I suspect you are right and that it needs an RDEPENDS if it doesn't work without it. It also needs a comment explaining the dependency so someone doesn't remove it.

I have been using

Quoted 9 lines

Cheers,

Richard
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#7 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

Quoted 16 lines · Khem Raj
Quoted 14 lines · Richard Purdie
Quoted 8 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND
on it instead ?

Quoted 5 lines
Quoted 3 lines

I suspect you are right and that it needs an RDEPENDS if it doesn't work without it. It also needs a comment explaining the dependency so someone doesn't remove it.

I have been using

ignore this wrong thread and sent wrongly.

Quoted 11 lines
Quoted 10 lines

Cheers,

Richard
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

In reply to Richard Purdie
Quoted 6 lines · On Mon, 08 Aug 2016 09:04:20 Richard Purdie wrote:
Quoted 5 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

Quoted 7 lines
Quoted 3 lines

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND
on it instead ?

I suspect you are right and that it needs an RDEPENDS if it doesn't work without it. It also needs a comment explaining the dependency so someone doesn't remove it.

Using openssh-sftp-server with dropbear used to work, so it would be interesting to know when it broke and if it's possible to fix it.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#9 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

Quoted 14 lines · Paul Eggleton
Quoted 10 lines · On Mon, 08 Aug 2016 09:04:20 Richard Purdie wrote:
Quoted 8 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND
on it instead ?

Quoted 6 lines
Quoted 3 lines

I suspect you are right and that it needs an RDEPENDS if it doesn't work without it. It also needs a comment explaining the dependency so someone doesn't remove it.

Using openssh-sftp-server with dropbear used to work, so it would be interesting to know when it broke and if it's possible to fix it.

yes, in angstrom that is the default combination as well. I think it still is functional.

#10 lore raw

Re: [PATCH 1/2] packagegroup-core-eclipse-debug: add openssh server to support openssh-sftp-server

Hi,

I spent some time today and could not replicate the issues I had with dropbear+openssh-sftp-server under Eclipse. Since I ran into these issues while tracking down the busybox/resize issue it could easily have been a red herring.

So, I'm resending with the openssh-server patch removed. -brian
an Intel employee

Quoted 32 lines · Khem Raj
Quoted 2 lines

On Aug 8, 2016, at 1:45 PM, Paul Eggleton <[email protected]>

Quoted 12 lines · wrote:
Quoted 10 lines · On Mon, 08 Aug 2016 09:04:20 Richard Purdie wrote:
Quoted 8 lines · Jacob Kroon
Quoted 3 lines · bavery

The openssh-sftp-server was already part of the pakagegroup. Adding the openssh-server
lets the sftp server start up correctly.

If openssh-sftp-server cannot run without openssh, shouldn't it RDEPEND
on it instead ?

Quoted 6 lines
Quoted 3 lines

I suspect you are right and that it needs an RDEPENDS if it doesn't work without it. It also needs a comment explaining the dependency so someone doesn't remove it.

Using openssh-sftp-server with dropbear used to work, so it would be interesting to know when it broke and if it's possible to fix it.

yes, in angstrom that is the default combination as well. I think it still is functional.

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core