* RFC: eclipse debug functionality issue
@ 2016-08-04 21:20 Brian Avery
2016-08-05 2:49 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Brian Avery @ 2016-08-04 21:20 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2004 bytes --]
The core issue:
The busybox resize command breaks the eclipse ssh debug stream. This is
because the resize command for busybox sends a set of cursor control escape
sequences to stderr. The resize cfg was added to Krogoth and is still in
master. The point of resize is to set the environment and terminal
settings to the current xterm window size.
Additional complexity:
eclipse-debug is an IMAGE_FEATURE. If it is turned on by a user in
local.conf via EXTRA_IMAGE_FEATURES then I can conditionally turn off
busybox/resize in the cfg file. Unfortunately, if a user makes a new image
with IMAGE_FEATURES += " eclipse-debug " in it, I do not see this from the
scope of the busybox##.bb recipe.
So, there are a couple of ways to solve this and I'm not sure which is the
best one.
1) conditionally turn off the resize.cfg if eclipse-debug is in
extra-image-features. Also, make a rm_resize.bbclass to rm the
usr/bin/resize from the rootfs in a do_rootfs[postfuncs] which can be
inherited by the various sdk images we build.
This is problematic since if a user makes a new image recipe of their own
and includes eclipse-debug but doesn't inherit the rm_resize.bbclass
eclipse debug will fail.
2) elevate eclipse-debug to a distro feature which would make it visible to
the busybox###.bb recipe. Unfortunately, it is really an image specific
set of packages to be included so elevating it doesn't seem reasonable.
3) use the update-alternatives method (busybox is currently doing this
for syslog) to make a separate busybox-resize package and make an eclipse
friendly resize package that is empty and add the eclipse one to the
eclipse-debug packagegroup.
4) Just turn off resize or patch it so it doesn't try to control the cursor
via escape sequences sent to stderr but still sets up the environment.
It's worth noting that the ubuntu resize doesn't send escape sequences to
any of the streams.
5) Something else?
Thanks,
Brian
an Intel employee
[-- Attachment #2: Type: text/html, Size: 2309 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: eclipse debug functionality issue
2016-08-04 21:20 RFC: eclipse debug functionality issue Brian Avery
@ 2016-08-05 2:49 ` Khem Raj
2016-08-05 8:58 ` Max Krummenacher
0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2016-08-05 2:49 UTC (permalink / raw)
To: Brian Avery, openembedded-core
On 8/4/16 2:20 PM, Brian Avery wrote:
> The core issue:
> The busybox resize command breaks the eclipse ssh debug stream. This is
> because the resize command for busybox sends a set of cursor control
> escape sequences to stderr. The resize cfg was added to Krogoth and is
> still in master. The point of resize is to set the environment and
> terminal settings to the current xterm window size.
>
> Additional complexity:
> eclipse-debug is an IMAGE_FEATURE. If it is turned on by a user in
> local.conf via EXTRA_IMAGE_FEATURES then I can conditionally turn off
> busybox/resize in the cfg file. Unfortunately, if a user makes a new
> image with IMAGE_FEATURES += " eclipse-debug " in it, I do not see this
> from the scope of the busybox##.bb recipe.
>
> So, there are a couple of ways to solve this and I'm not sure which is
> the best one.
>
> 1) conditionally turn off the resize.cfg if eclipse-debug is in
> extra-image-features. Also, make a rm_resize.bbclass to rm the
> usr/bin/resize from the rootfs in a do_rootfs[postfuncs] which can be
> inherited by the various sdk images we build.
>
> This is problematic since if a user makes a new image recipe of their
> own and includes eclipse-debug but doesn't inherit the rm_resize.bbclass
> eclipse debug will fail.
>
> 2) elevate eclipse-debug to a distro feature which would make it visible
> to the busybox###.bb recipe. Unfortunately, it is really an image
> specific set of packages to be included so elevating it doesn't seem
> reasonable.
>
> 3) use the update-alternatives method (busybox is currently doing this
> for syslog) to make a separate busybox-resize package and make an
> eclipse friendly resize package that is empty and add the eclipse one to
> the eclipse-debug packagegroup.
>
> 4) Just turn off resize or patch it so it doesn't try to control the
> cursor via escape sequences sent to stderr but still sets up the
> environment. It's worth noting that the ubuntu resize doesn't send
> escape sequences to any of the streams.
this seems to be best option.
>
> 5) Something else?
>
> Thanks,
> Brian
> an Intel employee
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: eclipse debug functionality issue
2016-08-05 2:49 ` Khem Raj
@ 2016-08-05 8:58 ` Max Krummenacher
2016-08-05 16:19 ` Brian Avery
0 siblings, 1 reply; 4+ messages in thread
From: Max Krummenacher @ 2016-08-05 8:58 UTC (permalink / raw)
To: Khem Raj, Brian Avery, openembedded-core
Hi Brian
Am Donnerstag, den 04.08.2016, 19:49 -0700 schrieb Khem Raj:
>
> On 8/4/16 2:20 PM, Brian Avery wrote:
> > The core issue:
> > The busybox resize command breaks the eclipse ssh debug stream.
> > This is
> > because the resize command for busybox sends a set of cursor
> > control
> > escape sequences to stderr. The resize cfg was added to Krogoth and
> > is
> > still in master. The point of resize is to set the environment and
> > terminal settings to the current xterm window size.
> >
> > Additional complexity:
> > eclipse-debug is an IMAGE_FEATURE. If it is turned on by a user in
> > local.conf via EXTRA_IMAGE_FEATURES then I can conditionally turn
> > off
> > busybox/resize in the cfg file. Unfortunately, if a user makes a
> > new
> > image with IMAGE_FEATURES += " eclipse-debug " in it, I do not see
> > this
> > from the scope of the busybox##.bb recipe.
> >
> > So, there are a couple of ways to solve this and I'm not sure which
> > is
> > the best one.
> >
> > 1) conditionally turn off the resize.cfg if eclipse-debug is in
> > extra-image-features. Also, make a rm_resize.bbclass to rm the
> > usr/bin/resize from the rootfs in a do_rootfs[postfuncs] which can
> > be
> > inherited by the various sdk images we build.
> >
> > This is problematic since if a user makes a new image recipe of
> > their
> > own and includes eclipse-debug but doesn't inherit the
> > rm_resize.bbclass
> > eclipse debug will fail.
> >
> > 2) elevate eclipse-debug to a distro feature which would make it
> > visible
> > to the busybox###.bb recipe. Unfortunately, it is really an image
> > specific set of packages to be included so elevating it doesn't
> > seem
> > reasonable.
> >
> > 3) use the update-alternatives method (busybox is currently doing
> > this
> > for syslog) to make a separate busybox-resize package and make an
> > eclipse friendly resize package that is empty and add the eclipse
> > one to
> > the eclipse-debug packagegroup.
> >
> > 4) Just turn off resize or patch it so it doesn't try to control
> > the
> > cursor via escape sequences sent to stderr but still sets up the
> > environment. It's worth noting that the ubuntu resize doesn't
> > send
> > escape sequences to any of the streams.
>
> this seems to be best option.
We fixed this by only executing resize if logging in from a serial
console:
http://git.toradex.com/cgit/meta-toradex.git/commit/?h=V2.6-next&id=9d1
32ea3cf75562ef5610dd6ff1c89d0cffa334d
I guess one could apply the same fix to here
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/b
ase-files/base-files/profile?h=krogoth
Regards
Max
> >
> > 5) Something else?
> >
> > Thanks,
> > Brian
> > an Intel employee
> >
> >
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: eclipse debug functionality issue
2016-08-05 8:58 ` Max Krummenacher
@ 2016-08-05 16:19 ` Brian Avery
0 siblings, 0 replies; 4+ messages in thread
From: Brian Avery @ 2016-08-05 16:19 UTC (permalink / raw)
To: Max Krummenacher; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 3189 bytes --]
Thanks Max!
I like your approach a lot; and yes, the same fix works in our /etc/profile.
-Brian
an Intel employee
On Fri, Aug 5, 2016 at 1:58 AM, Max Krummenacher <max.oss.09@gmail.com>
wrote:
> Hi Brian
>
> Am Donnerstag, den 04.08.2016, 19:49 -0700 schrieb Khem Raj:
> >
> > On 8/4/16 2:20 PM, Brian Avery wrote:
> > > The core issue:
> > > The busybox resize command breaks the eclipse ssh debug stream.
> > > This is
> > > because the resize command for busybox sends a set of cursor
> > > control
> > > escape sequences to stderr. The resize cfg was added to Krogoth and
> > > is
> > > still in master. The point of resize is to set the environment and
> > > terminal settings to the current xterm window size.
> > >
> > > Additional complexity:
> > > eclipse-debug is an IMAGE_FEATURE. If it is turned on by a user in
> > > local.conf via EXTRA_IMAGE_FEATURES then I can conditionally turn
> > > off
> > > busybox/resize in the cfg file. Unfortunately, if a user makes a
> > > new
> > > image with IMAGE_FEATURES += " eclipse-debug " in it, I do not see
> > > this
> > > from the scope of the busybox##.bb recipe.
> > >
> > > So, there are a couple of ways to solve this and I'm not sure which
> > > is
> > > the best one.
> > >
> > > 1) conditionally turn off the resize.cfg if eclipse-debug is in
> > > extra-image-features. Also, make a rm_resize.bbclass to rm the
> > > usr/bin/resize from the rootfs in a do_rootfs[postfuncs] which can
> > > be
> > > inherited by the various sdk images we build.
> > >
> > > This is problematic since if a user makes a new image recipe of
> > > their
> > > own and includes eclipse-debug but doesn't inherit the
> > > rm_resize.bbclass
> > > eclipse debug will fail.
> > >
> > > 2) elevate eclipse-debug to a distro feature which would make it
> > > visible
> > > to the busybox###.bb recipe. Unfortunately, it is really an image
> > > specific set of packages to be included so elevating it doesn't
> > > seem
> > > reasonable.
> > >
> > > 3) use the update-alternatives method (busybox is currently doing
> > > this
> > > for syslog) to make a separate busybox-resize package and make an
> > > eclipse friendly resize package that is empty and add the eclipse
> > > one to
> > > the eclipse-debug packagegroup.
> > >
> > > 4) Just turn off resize or patch it so it doesn't try to control
> > > the
> > > cursor via escape sequences sent to stderr but still sets up the
> > > environment. It's worth noting that the ubuntu resize doesn't
> > > send
> > > escape sequences to any of the streams.
> >
> > this seems to be best option.
>
> We fixed this by only executing resize if logging in from a serial
> console:
>
> http://git.toradex.com/cgit/meta-toradex.git/commit/?h=V2.6-next&id=9d1
> 32ea3cf75562ef5610dd6ff1c89d0cffa334d
>
> I guess one could apply the same fix to here
> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/b
> ase-files/base-files/profile?h=krogoth
>
> Regards
> Max
>
> > >
> > > 5) Something else?
> > >
> > > Thanks,
> > > Brian
> > > an Intel employee
> > >
> > >
> > >
> > >
>
>
[-- Attachment #2: Type: text/html, Size: 4657 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-05 16:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 21:20 RFC: eclipse debug functionality issue Brian Avery
2016-08-05 2:49 ` Khem Raj
2016-08-05 8:58 ` Max Krummenacher
2016-08-05 16:19 ` Brian Avery
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox