Is there a way to build a private .deb release for ROS 2 project? Like calling $ colcon build but instead of generates a build directories, it generates a .deb package.
I’ve already search and found about bloom, buildfarm, jenkins etc. but i still have no idea on how to use those tools or whether those are the right tools to be used.
Thanks all for the answer, i’m already be able to build the Debian package using the ROS answers that provided by @flynneva. I haven’t tried using CPack for ROS 2 project though, but as in this thread, i think it’s not recommended to used it in ROS 2 project.
Anyway in case you are wondering how to create a Debian package for ROS 2 project, i did it as follows:
That’s a nice guide, haven’t seen one too in the ROS documentation. Actually i’m already planned to write it later, but i have been busy doing something else and don’t have time to write that yet.
Love where this is headed, and great work on the documentation.
We build debians for our ROS packages for installation on field units (using a private apt server), and I’ve done it 3 ways:
using the bloom-generate rosdebian tool
manually creating the debian folder and appropriate files (using tools debuild and others)
using cpack
Each has pros/cons. cpack is pretty easy but not straightforward. Here’s an example of a library from a vendor we simply forked and added the cpack installation to create a debian.
Using the bloom as a template and then modifying is super useful, as it adds all the ROS niceities, but we ended up wanting to use more of the power of debian (installing other files, postinst setup, configuration, having an actual changelog, etc.) so we opted for setting up and checking in our own debian folder.
The downside is that you’ve got duplication of the dependencies in package.xml and debian/control. Here’s an example of a fork of the realsense-ros lib that has a debian control file for ros1 melodic package creation:
Our circleci uses this to build a debian and install it on our package server(s).
I would love to assist further in helping with the debian-ization in ROS. I’m torn between just using stock debian setup, and the bloom tooling. If I was a good true OSS zealot, I’d insist we just use stock debian tools, if I was a true ROS developer, I’d insist we keep improving bloom. I’m somewhere in between.