Invalid CPACK_PACKAGE_VERSION_PATCH on Debian Sid: "...~n/a"
On Debian Sid CPACK_VERSION* variables look as follows:
user@ArgOS-Augen:~/dev/VR/basalt$ grep "CPACK_PACKAGE_VERSION" build/CPackSourceConfig.cmake
set(CPACK_PACKAGE_VERSION "1.0.1-202403032142~n/a")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "1-202403032142~n/a")
Which in turn results in the following error message when trying to install the deb package that was generated through cpack:
user@ArgOS-Augen:~/dev/VR/basalt$ sudo dpkg -i ./basalt-monado-ubuntu-22.04-haswell-amd64.deb
dpkg: error processing archive ./basalt-monado-ubuntu-22.04-haswell-amd64.deb (--install):
parsing file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'basalt':
'Version' field value '1.0.1-202403032142~n/a': invalid character in revision number
Errors were encountered while processing:
./basalt-monado-ubuntu-22.04-haswell-amd64.deb
This seems to come from Debian Sid setting the "Release" in lsb_release to "n/a":
user@ArgOS-Augen:~/dev/VR/basalt$ lsb_release -sr
No LSB modules are available.
n/a
user@ArgOS-Augen:~/dev/VR/basalt$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux trixie/sid
Release: n/a
Codename: trixie