reassign 1036947 syncthing-gtk
retitle 1036947 syncthing-gtk: Invalid version number breaks other packages
affects 1036947 whipper
severity 1036947 critical
tags 1036947 + patch
thanks
Thanks for reporting this bug. I can indeed reproduce the failure with whipper
when syncthing-gtk is installed, with pretty much any whipper command.
As kindly mentioned by Nicolas Dandrimont on IRC, this seems to be a bug with
syncthing-gtk itself, and not directly with whipper. As such, I'm reassigning this bug to
syncthing-gtk and I've changed the severity to critical ("makes unrelated software
on the system break").
The current syncthing-gtk version is not valid, as it doesn't respect PEP-440.
Only ASCII letters ([a-zA-Z]), ASCII digits ([0-9]) and periods (.) are allowed
after the initial + and this is what ends up crashing whipper (and maybe other
packages?).
I tried rebuilding the package with version
0.9.4.4+ds.git20221205.12a9702d29ab-1 (replacing the last 2 + by dots) and it
does fix the issue, but it sounds like the wrong way to fix the issue.
I am not very familiar with syncthing-gtk's code, but it seems the issue spawns
from the get_version() function in setup.py, which uses git tags to find the
proper version.
Hardcoding a suitable version (say 0.9.4.4) in that file instead of using
version=get_version() works too, but also sounds like the wrong solution, at
least in the long term. For the sake of the upcoming release (and making sure
whipper isn't broken randomly by syncthing-gtk), I'd say it is the simplest
solution. I've thus attached a patch, and I encourage the maintainers to apply
it and ask for an unblocking request post-haste.
Cheers,
[1]: https://peps.python.org/pep-0440/
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Louis-Philippe Véronneau
⢿⡄⠘⠷⠚⠋ po...@debian.org / veronneau.org
⠈⠳⣄
Description: This hotfix patch fixes a problem with syncthing-gtk's current
Debian version not respecting PEP-440 and thus crashing other packages. By
bypassing the get_version() function altogether, the version used by the
package doesn't include the git hash.
This patch should probably be revisited after the release of Debian Bookworm
to find long-term solution.
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/1036947
Author: Louis-Philippe Véronneau <po...@debian.org>
Index: syncthing-gtk/setup.py
===================================================================
--- syncthing-gtk.orig/setup.py
+++ syncthing-gtk/setup.py
@@ -119,7 +119,7 @@ if __name__ == "__main__":
]
setup(
name='syncthing-gtk',
- version=get_version(),
+ version='0.9.4.4',
description='GTK3 GUI for Syncthing',
url='https://github.com/syncthing/syncthing-gtk',
packages=['syncthing_gtk'],