ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Hooks to install files outside of /opt/ros in Debian packages?

asked 2016-07-20 17:47:50 -0500

mdhorn gravatar image

We have a driver package that requires adding udev rules to ensure the system device files have proper permissions. Rather than having some manual step(s) documented, I'd like to have the ROS package just install the required file.

Are there any hooks that are available to have the ROS build farm add install rules for files outside of the /opt/ros hierarchy? Specifically I'd like to install a file in /etc/udev/rules.d/

I've notice that packages put docs in /usr/share/doc/ros-<distro>-<package>/changelog.Debian.gz, but I don't see what rule added the change log to this location.

Also, is there any support for maintainer scripts? Future drivers may require building loadable kernel modules and I was hoping to use the postinst maintainer script to run DKMS to build the required modules if the kernel is not already patched.

edit retag flag offensive close merge delete


Maybe check the Debian packages (from Debian repos).they don't use /opt at all. E.g package python-gencpp contains /etc/ros/genmsg/gencpp.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2016-07-22 01:15:31 -0500 )edit

I could manually create rules to accomplish my goal, but I wondering if there are hooks available so that I can have a package built in the ROS build farm implement this.

mdhorn gravatar image mdhorn  ( 2016-07-22 14:21:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-22 15:11:43 -0500

William gravatar image

In general it's a bad idea to do this, because then packages from two different ROS distributions will be installing conflicting files. For example, if you release your package for both Indigo and Jade, then the binary deb's for your packages on those distributions will not be installable at the same time, which defeats the whole point of having things installed to /opt/ros/<distro>.

You can use a debian hook if you want. If there is a debian folder in a package, then bloom will leave the files there and only add the rules, control, etc files. See:

For example, the pointgrey camera driver package installs udev rules:

edit flag offensive delete link more


This exactly what I need to know. Thank you.

mdhorn gravatar image mdhorn  ( 2016-07-25 15:26:44 -0500 )edit

Question Tools



Asked: 2016-07-20 17:47:50 -0500

Seen: 274 times

Last updated: Jul 22 '16