The update workflow is updated as follows: Instead of running just
superflore, we run:
1. superflore --dry-run ...
2. maintainers/scripts/update-ament-vendor.sh && git commit
3. superflore --pr-only ...
The first command updates the overlay as before, but does not submit a
PR. The second step updates ament_vendor metadata according to the
updated overlay and the third command creates the PR with all updates.
I tried to make the step 2 as fast and efficient as possible, but it
may happen that it will run for long time (about 1 hour in my
testing). The reason is that, for example, if gz-msgs-vendor package
gets updated, the update of other vendored packages depending on it,
e.g., gz-sim-vendor, will have to build the updated gz-msgs-vendor,
because it is not yet in the cachix cache.
These files were generated by running
./maintainers/scripts/update-ament-vendor.sh several times, to reach
the fix point. This is needed because some vendored packages depend on
other and the depending package cannot be updated before the dependent
package.
The information is stored in vendored-source.json files in the package
directories. The file can be automatically generated by running
command like this:
$(nix-build -A rosPackages.jazzy.gz-math-vendor.updateAmentVendor)'
This command executes Cmake for the given package with an alternative
implementation of the ament_vendor Cmake macro, which generates the
file instead of fetching the source code. The above command generates
`distros/jazzy/gz-math-vendor/vendored-source.json` files with this
content:
{
"url": "https://github.com/gazebosim/gz-math.git",
"rev": "gz-math7_7.5.2",
"hash": "sha256-LwYeyv8nwX06n5ju+ra2uqNMedMSLRumem8qDHXtNns="
}
patchAmentVendorGit function is updated to pick the information about
patching from that file instead of from its arguments.
patchGzAmentVendorGit is updated similarly and the check for version
mismatch is removed, because it would not work (version information is
not available from function arguments) and more importantly, it
is (hopefully) no longer needed, because the version will always be
updated automatically by CI.
Many packages fail to compile with Boost 1.87. Updating them to Boost
1.87 would be non-trivial amount of work and given the approaching
Noetic EOL, it wouldn't pay off. Mixing different Boost versions in
the distribution also leads to failures so setting 1.86 for all
packages seems to be the best option.
Patching gazebo after its end-of-life has little sense, especially
given that the changes wouldn't be trivial. Therefore, we downgrade
boost to fix the build.
I need to override laser-geometry (see next commit), which also needs
the distutils override. In the current implementation the distutils
override replaces the manual override. With this change, both
overrides are composed.
Without this change, gtsam is built against a vendored copy, which is
different version (3.3) than what's in nixpkgs (3.4). Dependent
packages using Eigen then fail with the following error:
/nix/store/lic85q2svs3ymv0zkgl727af9khm1x4l-ros-jazzy-gtsam-4.2.0-r4/include/gtsam/base/Vector.h:76:30: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
76 | GTSAM_EIGEN_VERSION_MAJOR==EIGEN_MAJOR_VERSION,
| ^
/nix/store/lic85q2svs3ymv0zkgl727af9khm1x4l-ros-jazzy-gtsam-4.2.0-r4/include/gtsam/base/Vector.h:76:30: note: the comparison reduces to '(3 == 4)'
This is the case for mola_state_estimation (which was recently added
to ROS) as well as for some 3rd-party ROS packages I worked with.