Robotics StackExchange | Archived questions

Create a Deb file from two Ros Packages

Hello, I would like to create a DEB file for the packages A and B. Let's consider that everything it's perfect and I dont have any dependencies troubles. I can create a deb for A and a deb for B.

It's possible to create a deb file from a ros package using bloom-generate, but this tool only works with one package at a time.

Is it possible to create a deb file for package A and B? Do I need to create a MetaPackage with these two packages?

Asked by billyDong on 2018-05-02 09:59:47 UTC

Comments

Is your goal to build one deb containing two ROS packages or build both packages with one command?

Asked by nuclearsandwich on 2018-05-02 17:10:43 UTC

@nuclearsandwich My goal is to have an installation file that install two packages. Can I do that? Do I have to create a metapackage with these two packages? The simpler the best, if I could build two (or more) packages with one command that would be perfect..

Asked by billyDong on 2018-05-03 04:25:20 UTC

Answers

Metapackages don't contain any significant contents on their own, they pull in a set of desired packages as dependencies. So in order to easily use metapackages your package A and B debs need to be available in a repository somewhere.

A non-ROS specific way to construct metapackages is described in https://askubuntu.com/questions/33413/how-to-create-a-meta-package-that-automatically-installs-other-packages#33417 It assumes that your package A and B are installable from a repository.

To my knowledge there are not tools in the ROS ecosystem for constructing a single debian binary package from multiple existing binaries.

Asked by nuclearsandwich on 2018-05-25 14:18:45 UTC

Comments

To my knowledge there are not tools in the ROS ecosystem for constructing a single debian binary package from multiple existing binaries.

Running catkin_make install (or equivalent catkin_tools) using checkinstall?

Asked by gvdhoorn on 2018-05-25 14:29:17 UTC

@gvdhoorn how would that work? I've tried before and it creates an install folder, but what can I do with it?

Asked by billyDong on 2018-06-04 05:08:13 UTC

You can use checkinstall. But it comes with a price. You can combine any number of packages in one Debian archive file. But install macro calls in CMakeLists.txt files must point to an absolute path. If you use catkin variables such as CATKIN_PACKAGE_INCLUDE_DESTINATION or CATKIN_PACKAGE_LIB_DESTINATION, it won't work. Instead, for instance, you should do:

 install(DIRECTORY include/${PROJECT_NAME}/
       DESTINATION /opt/ros/kinetic/include/
 )

After that, executing catkin config --install && checkinstall catkin buildsuffices. When the command finishes, you will see an output of Debian package. When you extract its content with dpkg -x <package_name>, you can actually inspect which folders are archived.

Asked by tahsinkose on 2019-05-17 08:07:38 UTC

Comments

Could you provide more details/example how to do this? I had problems using checkinstall. I was installing my packages in a custom directory and trying to pack it. But after the checkinstall command and compilation the deb file is empty. Do you know what could be happen?

Asked by GL on 2023-01-17 09:58:37 UTC

You can package up multiple packages using ROS bundling https://github.com/mikepurvis/ros-bundling

Asked by tfoote on 2019-05-20 00:53:05 UTC

Comments