Skip to content

Build libmarinholab-sas-core .deb (sas_cpp) into the PPA alongside the ROS .debs - #5

Merged
mmmarinho merged 3 commits into
lyricalfrom
add-sas-cpp-deb-to-ppa
Sep 22, 2026
Merged

mmmarinho merged 3 commits into
lyricalfrom
add-sas-cpp-deb-to-ppa

Conversation

@mmmarinho

@mmmarinho mmmarinho commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

What this does

Adds the libmarinholab-sas-core .deb (non-ROS C++ core from MarinhoLab/sas_cpp) to the PPA build, alongside the ROS package .debs.

This is the prerequisite of the sas_core thin wrapper (SmartArmStack/sas_core#12): its CMakeLists does find_package(marinholab_sas_core REQUIRED), and every downstream package that links the core needs the .deb present before colcon build and before the ROS .deb builds.

Changes

1. build_ros2.sh — one new section (after the clone loop, before the colcon check):

git clone --branch "main" \
    https://github.com/MarinhoLab/sas_cpp.git
cd sas_cpp
bash tools/bump-changelog.sh
dpkg-buildpackage -us -uc -b
cd ..
dpkg -i ./libmarinholab-sas-core_*.deb
  • sas_cpp is not a colcon package (no package.xml), so it cannot go through the existing PRE_BUILD/bloom loop — it uses its own debian/ packaging (clean dh/cmake rules, dpkg-buildflags-based).
  • Ref defaults to main, overridable via SAS_CPP_REF.
  • Rolling version: the clone is full (no --depth) so sas_cpp's own tools/version.sh can count commits since the monthly version tag, and tools/bump-changelog.sh (idempotent dch) stamps debian/changelog with the rolling YY.MM.NN version before dpkg-buildpackage — so the .deb version tracks the branch content (same scheme as the SAS_VERSION timestamp of the ROS .debs).
  • The .deb (and its dbgsym .ddeb) are written into tmp_ros2/, so the existing PPA pipeline (extract_debian_from_container.sh globbing /root/tmp_ros2/*.deb / *.ddeb → GH release → dpkg-scanpackages --multiversion → Pages PPA) ships it automatically, no workflow changes.

2. prebuild_ros2.sh — one extra package in the builder image: devscripts (provides dch, required by tools/bump-changelog.sh). Without it the build aborts at dpkg-checkbuilddeps/dch: command not found.

Verification

Ran the new section verbatim inside ghcr.io/marinholab/gazebo:jazzy (arm64, the same base the builder image uses), with prebuild_ros2.sh + devscripts first:

  1. tools/bump-changelog.sh → idempotent, changelog stamped with tools/version.sh output
  2. dpkg-buildpackage -us -uc -b → libmarinholab-sas-core_<version>_arm64.deb + dbgsym .ddeb
  3. dpkg -i → installs cleanly; dpkg -L shows lib + CMake package config
  4. CMake consumer probe (real project): find_package(marinholab_sas_core) → link marinholab::sas::core + Eigen3::Eigen → runs a Clock loop (probe ok 0.013s, exit 0)
  5. Legacy include probe: #include <sas_core/sas_clock.hpp> + namespace sas alias against the installed lib → compiles and runs (exit 0)

Known limitation / follow-ups

  • Tag naming: tools/version.sh counts commits since tag v${YY.MM} (e.g. v26.09), but sas_cpp's current tag is 26.09 (no v). Until the tag is renamed (or version.sh adjusted), the rolling component is 00 and the version stays 26.09.00. The mechanism itself works: once the monthly v* tag exists, new commits → 26.09.NN.
  • Once the .deb is on the PPA: add a rosdep key + <depend> libmarinholab-sas-core</depend> to the wrapper's package.xml so ros-jazzy-sas-core declares a proper Depends; then replace the in-image build block in the sas_core PR's docker/Dockerfile with apt-get install -y libmarinholab-sas-core.

To publish: run the sas deb builder workflow (workflow_dispatch) as usual.


This pull request was created by an AI agent (OpenHands) on behalf of the repository owner.

The sas_core thin wrapper requires the non-ROS C++ core provided by
MarinhoLab/sas_cpp as the libmarinholab-sas-core .deb (find_package
marinholab_sas_core). It is not a colcon package (no package.xml), so it
cannot go through the existing bloom loop; build it from its own
debian/ packaging before colcon build, using sas_cpp main by default
(overridable via SAS_CPP_REF).

The .deb lands in tmp_ros2/ next to the ROS package .debs, so the
existing PPA extract/scan/deploy pipeline ships it automatically.

Co-authored-by: openhands <openhands@all-hands.dev>
Drop --depth 1 so sas_cpp's own tools/version.sh can count commits
since the monthly version tag, and run tools/bump-changelog.sh (dch)
to stamp debian/changelog with the rolling YY.MM.NN version before
dpkg-buildpackage. Verified: changelog bump is idempotent, .deb builds
and installs, find_package consumer probe runs a Clock.

Co-authored-by: openhands <openhands@all-hands.dev>
tools/bump-changelog.sh (run by build_ros2.sh before dpkg-buildpackage)
needs dch, which is not in the base image.

Co-authored-by: openhands <openhands@all-hands.dev>

@mmmarinho mmmarinho left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mmmarinho
mmmarinho merged commit ab3cafc into lyrical Sep 22, 2026
@mmmarinho
mmmarinho deleted the add-sas-cpp-deb-to-ppa branch September 22, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants