Open stonier opened 10 years ago
Some information on passwordless settings for sudoers
:
# One user, snorri, one command privelege without a password
snorri ALL = NOPASSWD: /opt/ros/indigo/bin/rosget
ORDER IS VERY IMPORTANT!!!! - this command should be last (if I recall correctly).
Perhaps you can also configure sudoers without a full pathname (just expect it on the path). This would be useful to ensure rosget
would work even when in the source workspace.
This is required for #196.
@dirk-thomas (@wjwwood) is this already implemented in rosdep
? If not, do you have a suggestion for implementing this?
sudoers
seems to do the trick. However, we now face a new problem: How to update the environment variables to let the app manager/roslaunch know about the newly installed packages, especially important for nodelets.
Any ideas?
Which variable contains the information about available packages, nodelets, etc.?
PS: Some hints for modifying suders using a script. This would be important when enabling automatic installation when install the app manager: http://stackoverflow.com/questions/323957/how-do-i-edit-etc-sudoers-from-a-script http://stackoverflow.com/questions/8784761/adding-users-to-sudoers-through-shell-script?lq=1
especially important for nodelets.
Currently this is a showstopper. In our current situation we already have a nodelet manager running (launched by the capability server). After the app manager installed a package, which contains a nodelet, the running nodelet manager is not aware of it and the load nodelet service call fails.
I was playing around with nodelet and pluginlib, but couldn't find a way to update the list of available plugins, e.g. calling refreshDeclaredClasses()
(http://docs.ros.org/hydro/api/pluginlib/html/class__loader__imp_8h_source.html#l00619) did not do the trick.
@dirk-thomas @esteve do you have an idea how this could be implemented.
I am pretty sure that rosdep
does nothing in regards to sudoers
. It simply need to be invoked with sudo rosdep init
. I am not sure what you would like rosdep to provide for this?
The menthod refreshDeclaredClasses
in pluginlib should be the right way of doing so. Since it uses roslib which uses rospack behind the scene all queries are potentially using cached data. Try invoking rospack profile
before to ensure that the cache has been invalidated / refreshed.
Dirk, updating the cache using rospack profile
together with refreshDeclaredClasses
did indeed do the trick. Please take a look at the newly created issues for nodelet and pluginlib (see links above) to check, if we can get this implemented quickly.
Regarding the other issues, my basic question is: What is a good way to allow automatic installation of ROS packages and their system dependencies?
rosget
linked by Daniel further up seems like a pre-rosdep. Since it only could install ros packages, adding password-less usage of this tool did not add a big security risk as opposed to doing the same for apt-get
. Now, I wonder, if we could use rosdep
in place of rosget
and by allowing only password-less use of rosdep
lower the potential security leak.
Also, I'm curious, if you have found a good way to resolve the permission problem for rosdep
- either by using sudoers or doing it in a different way?
Ye olde
multimaster_experimental
had a nice way of handling this (I think they used this for the pr2 as well). It consisted ofros-*
.rosget
in/etc/sudoers