All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] latencytop: add sudo as runtime dependency
@ 2013-01-04 11:30 Maxin B. John
  2013-01-04 14:27 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Maxin B. John @ 2013-01-04 11:30 UTC (permalink / raw)
  To: yocto, openembedded-core; +Cc: Maxin B. John, scott.a.garman

From: "Maxin B. John" <maxin.john@enea.com>

Latencytop needs superuser privileges. The latencytop plugin in
eclipse invokes it as 'sudo latencytop'. So, it will be good to
include sudo as a runtime dependency.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
---
 meta/recipes-kernel/latencytop/latencytop_0.5.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
index 3e35bf9..a148a47 100644
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a
 
 DEPENDS = "virtual/libintl ncurses glib-2.0  ${@base_contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
 
+# latencytop and it's eclipse support need sudo
+RDEPENDS_${PN} = "sudo"
+
 PR = "r3"
 
 SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] latencytop: add sudo as runtime dependency
  2013-01-04 11:30 [PATCH] latencytop: add sudo as runtime dependency Maxin B. John
@ 2013-01-04 14:27 ` Richard Purdie
  2013-01-04 15:41   ` Maxin B. John
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2013-01-04 14:27 UTC (permalink / raw)
  To: Maxin B. John; +Cc: yocto, scott.a.garman, openembedded-core

On Fri, 2013-01-04 at 12:30 +0100, Maxin B. John wrote:
> From: "Maxin B. John" <maxin.john@enea.com>
> 
> Latencytop needs superuser privileges. The latencytop plugin in
> eclipse invokes it as 'sudo latencytop'. So, it will be good to
> include sudo as a runtime dependency.
> 
> Signed-off-by: Maxin B. John <maxin.john@enea.com>
> ---
>  meta/recipes-kernel/latencytop/latencytop_0.5.bb |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> index 3e35bf9..a148a47 100644
> --- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> +++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> @@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a
>  
>  DEPENDS = "virtual/libintl ncurses glib-2.0  ${@base_contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
>  
> +# latencytop and it's eclipse support need sudo
> +RDEPENDS_${PN} = "sudo"
> +
>  PR = "r3"

Shouldn't the eclipse support RDEPEND on sudo, not latencytop? There are
several ways you could run latencytop without sudo...

Following this logic, we'd add an RDEPENDS on sudo for every app that
could possibly need root privs.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] latencytop: add sudo as runtime dependency
  2013-01-04 14:27 ` Richard Purdie
@ 2013-01-04 15:41   ` Maxin B. John
  0 siblings, 0 replies; 3+ messages in thread
From: Maxin B. John @ 2013-01-04 15:41 UTC (permalink / raw)
  To: Richard Purdie; +Cc: yocto, scott.a.garman, openembedded-core

Hi Richard,
On Fri, Jan 04, 2013 at 02:27:42PM +0000, Richard Purdie wrote:
> On Fri, 2013-01-04 at 12:30 +0100, Maxin B. John wrote:
> > From: "Maxin B. John" <maxin.john@enea.com>
> > 
> > Latencytop needs superuser privileges. The latencytop plugin in
> > eclipse invokes it as 'sudo latencytop'. So, it will be good to
> > include sudo as a runtime dependency.
> > 
> > Signed-off-by: Maxin B. John <maxin.john@enea.com>
> > ---
> >  meta/recipes-kernel/latencytop/latencytop_0.5.bb |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> > index 3e35bf9..a148a47 100644
> > --- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> > +++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
> > @@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a
> >  
> >  DEPENDS = "virtual/libintl ncurses glib-2.0  ${@base_contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
> >  
> > +# latencytop and it's eclipse support need sudo
> > +RDEPENDS_${PN} = "sudo"
> > +
> >  PR = "r3"
> 
> Shouldn't the eclipse support RDEPEND on sudo, not latencytop? There are
> several ways you could run latencytop without sudo...

I agree. We can run latencytop without sudo. However, it is possible
to install the Eclipse Yocto Plug-in from the downloads.yoctoproject.org.
So, it may not be necessary to build the Eclipse Yocto Plug-in
support in-order to use it.

In that case, when we use the latencytop plugin from Eclipse by
connecting to a target board running linux, it will fail with the
following output:
# sudo : command not found

It is because of this line in 'LatencytopHandler.java':
private static String initCmd="export
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin; cd; sudo latencytop\r"; 

This line 'assumes' that every target board with latencytop also have
sudo. Please correct me if I am wrong.
 
> Following this logic, we'd add an RDEPENDS on sudo for every app that
> could possibly need root privs.
I didn't mean that :) 
This is a special case for latencytop. Please let me know your comments.

> Cheers,
> 
> Richard
Best Regards,
Maxin



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-04 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 11:30 [PATCH] latencytop: add sudo as runtime dependency Maxin B. John
2013-01-04 14:27 ` Richard Purdie
2013-01-04 15:41   ` Maxin B. John

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.