jspricke / ros-deb-builder-action

Github Action to convert ROS packages to Debian packages
BSD 3-Clause "New" or "Revised" License
65 stars 24 forks source link

Build script generates Debian-incompatible version if tags start with a letter #5

Closed esteve closed 1 year ago

esteve commented 1 year ago

When generating a package for https://github.com/tier4/tamagawa_imu_driver the build.sh script will use the latest tag from the repo, which is not compatible with the Debian naming conventions are therefore sbuild aborts:

+ sbuild --chroot-mode=unshare --no-clean-source --no-run-lintian --dpkg-source-opts=-Zgzip -z1 --format=1.0 -sn --build-dir=/home/runner/apt_repo --extra-package=/home/runner/apt_repo --extra-repository=deb h
ttp://packages.ros.org/ros2/ubuntu jammy main --extra-repository-key=/home/runner/ros-archive-keyring.gpg
dpkg-parsechangelog: warning: /home/runner/ros-deb-builder-action/src/sensor_component/external/tamagawa_imu_driver/debian/changelog(l1): version 'v0.11.0beta-4-g28ad3cd-2023.02.01.12.25' is invalid: version n
umber does not start with digit
LINE: ros-humble-tamagawa-imu-driver (v0.11.0beta-4-g28ad3cd-2023.02.01.12.25) jammy; urgency=high
E: Bad version unknown in /home/runner/ros-deb-builder-action/src/sensor_component/external/tamagawa_imu_driver/debian/changelog

The most straightforward solution would be to remove that tag from the repo or use one that follows the Debian conventions, but the build.sh script could also warn about and default to a safe value (like when there are no tags)

jspricke commented 1 year ago

This should already be fixed in the rosotest branch, can you give it a try?

esteve commented 1 year ago

@jspricke that's great! Is there a way to continue where the build process stopped or do I have to start over?

jspricke commented 1 year ago

There is currently nothing implemented but you could add a test if the resulting .deb is already in place. Maybe we should have that as a --continue, wanne send a PR?

esteve commented 1 year ago

@jspricke I can look into that, unfortunately our packages don't have tags and the Debian packages seem to be versioned as 0-$DATE.$TIME (e.g. ros-humble-autoware-testing_0-2023.02.01.13.26_amd64.deb), which would change in every run. But I'll give it a try anyway.

jspricke commented 1 year ago

Correct, we need the date for ABI rebuilds. You can use a glob similar to here: https://github.com/jspricke/ros-deb-builder-action/blob/rosotest/build.sh#L81

jspricke commented 1 year ago

I've pushed the improved version generation to main, any progress on the --continue flag? Should I help?

esteve commented 1 year ago

@jspricke I won't have time to work on it, but feel free to work on it yourself if you have a spare moment

jspricke commented 1 year ago

Closing as fixed with 1f3c90a and 42b0186.