latencytop: add sudo as runtime dependency
PATCH 1/1 latencytop: add sudo as runtime dependency
From: "Maxin B. John" <[email protected]>
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.
--- meta/recipes-kernel/latencytop/latencytop_0.5.bb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/recipes-kernel/latencytop/latencytop_0.5.bb +3 -0
@@ -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 \
Signature · 1 line
1.7.5.4
Quoted 16 lines · Maxin B. John
From: "Maxin B. John" <[email protected]>
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 <[email protected]>--- meta/recipes-kernel/latencytop/latencytop_0.5.bb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)meta/recipes-kernel/latencytop/latencytop_0.5.bb +0
-0
meta/recipes-kernel/latencytop/latencytop_0.5.bb LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a · line 13
Quoted 7 lines
meta/recipes-kernel/latencytop/latencytop_0.5.bb +3
-0@@ -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
Hi Richard,
Quoted 20 lines · Richard Purdie
Quoted 19 lines · Maxin B. John
From: "Maxin B. John" <[email protected]>
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 <[email protected]>--- meta/recipes-kernel/latencytop/latencytop_0.5.bb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)meta/recipes-kernel/latencytop/latencytop_0.5.bb +0
-0@@ -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)}"
Quoted 7 lines
meta/recipes-kernel/latencytop/latencytop_0.5.bb LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a · line 13
Quoted 4 lines
meta/recipes-kernel/latencytop/latencytop_0.5.bb +3
-0+# 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.
Quoted 2 lines
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.
Quoted 3 lines
Cheers,
Richard
Best Regards,
Maxin