Creating dpkg files for each package in a workspace

asked 2019-08-26 01:13:12 -0600

ALTinners gravatar image

updated 2019-08-26 16:37:02 -0600

I'm looking to package up our workspace into deployable dpkg objects, but I'm having trouble finding a nice way to get catkin_make do this for us.

Lets say I have 3 packages, foo, bar, qux in my src workspace directory - each one containing their own debian folder and deb objects can be built for each one using debuild -us -uc -b in the respective package directory.

Can I run any invocation of catkin_make which allows for catkin to build the source and run the debuild -us -uc -b command for each package. catkin_make install does not seem to do it - which I guess is not surprising as catkin_make is not a Debian specific tool.

The intended purpose of this is to package up a workspace with several ROS packages that work in tandem - if they compile and pass all tests (ie: catkin_make run_tests is OK) then that particular snapshot of code can be packaged and deployed - we are looking at a rapid deployment rate of several times per day.

I'm using Kinetic if that makes a significant difference.

edit retag flag offensive close merge delete



Can you tell us which Q&As on this board and/or other resources you've already found? There are quite a few, and we'd like to avoid discussing things that you've already considered but didn't end up working for your use-case.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-26 02:17:11 -0600 )edit

@gvdhoorn Updated above - its mainly that our packages are developed as a set with reasonably hard links between them - yes; it kind of defeats the purpose of modulisation but that's how the project ended up. The main reason to not just do a big monolithic package is some subsets of the packages are deployed for partial implementations of the whole stack. I found answers like which are about manipulating the workspace into a monolithic package - we want to simply run debuild iteratively in src without writing our own scripts on top of catkin (if possible)

ALTinners gravatar image ALTinners  ( 2019-08-26 16:40:55 -0600 )edit

In the end, the buildfarm runs exactly the sequence of commands you mention (with some variations, depending on what is exactly being packaged).

Bloom just generates a debuild compatible source tarball and uploads it to the release repository of your package (in the default release process). There are a few Q&As on ROS Answers that show how to use Bloom to generate just the debian infrastructure for your package, but not upload anything. When you have that, you should be able to run the regular commands.

I don't have a link to any examples right now unfortunately. And Bloom is rather geared towards usage with the ROS buildfarm (whether private or public), so it's not a very well-documented use-case.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-27 03:43:07 -0600 )edit

And as you'd already found out:

Can I run any invocation of catkin_make which allows for catkin to build the source and run the debuild -us -uc -b command for each package.

no, that is not what Catkin's job is.

If you'd really want to, you could add a custom target to your CMakeLists.txt that invokes debuild .. for you, and then just run catkin_make <name_of_your_custom_target>, but that seems rather ugly.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-27 03:44:25 -0600 )edit