diff -Nru manuskript-0.12.0/debian/changelog manuskript-0.12.0/debian/changelog --- manuskript-0.12.0/debian/changelog 2021-09-21 12:26:43.000000000 -0500 +++ manuskript-0.12.0/debian/changelog 2023-02-06 00:58:30.000000000 -0600 @@ -1,3 +1,12 @@ +manuskript (0.12.0-1ubuntu0.22.10.1) kinetic; urgency=medium + + * debian/patches/fix_qcolor_types.patch: Backport commit + 15edb6efb7305b9d1a192712660857ca38facace from upstream, ensuring that QColor + is not accidentally passed floating-point numbers. (LP: #1989203) + * debian/control: Update the Maintainer field + + -- Aaron Rainbolt Mon, 06 Feb 2023 00:58:30 -0600 + manuskript (0.12.0-1) unstable; urgency=medium * New upstream release. diff -Nru manuskript-0.12.0/debian/control manuskript-0.12.0/debian/control --- manuskript-0.12.0/debian/control 2021-09-21 12:26:43.000000000 -0500 +++ manuskript-0.12.0/debian/control 2023-02-06 00:58:30.000000000 -0600 @@ -1,7 +1,8 @@ Source: manuskript Section: editors Priority: optional -Maintainer: Miriam Ruiz +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Miriam Ruiz Build-Depends: debhelper (>= 9), dh-python, quilt, python3-all-dev, python3-setuptools Standards-Version: 4.6.0.1 diff -Nru manuskript-0.12.0/debian/patches/fix_qcolor_types.patch manuskript-0.12.0/debian/patches/fix_qcolor_types.patch --- manuskript-0.12.0/debian/patches/fix_qcolor_types.patch 1969-12-31 18:00:00.000000000 -0600 +++ manuskript-0.12.0/debian/patches/fix_qcolor_types.patch 2023-02-06 00:10:11.000000000 -0600 @@ -0,0 +1,48 @@ +Description: Enforce types supported by spec for QColor + This patch fixes a bug in Manuskript relating to argument types passed to + QColor. A couple spots in the code were possibly passing floating-point values + to QColor rather than integers, which was causing a crash when the user + attempted to launch Manuskript. +Author: Aaron Rainbolt +Origin: upstream, https://github.com/olivierkes/manuskript/commit/15edb6efb7305b9d1a192712660857ca38facace +Bug: https://github.com/olivierkes/manuskript/issues/957 +Forwarded: not-needed +Last-Update: 2023-02-06 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/manuskript/functions/__init__.py ++++ b/manuskript/functions/__init__.py +@@ -175,24 +175,25 @@ def randomColor(mix=None): + b = randint(0, 255) + + if mix: +- r = (r + mix.red()) / 2 +- g = (g + mix.green()) / 2 +- b = (b + mix.blue()) / 2 ++ r = int((r + mix.red()) / 2) ++ g = int((g + mix.green()) / 2) ++ b = int((b + mix.blue()) / 2) + + return QColor(r, g, b) + + +-def mixColors(col1, col2, f=.5): ++def mixColors(col1, col2, f=0.5): + fromString = False + if type(col1) == str: + fromString = True + col1 = QColor(col1) + if type(col2) == str: + col2 = QColor(col2) +- f2 = 1-f +- r = col1.red() * f + col2.red() * f2 +- g = col1.green() * f + col2.green() * f2 +- b = col1.blue() * f + col2.blue() * f2 ++ ++ f2 = 1.0 - f ++ r = int(col1.red() * f + col2.red() * f2) ++ g = int(col1.green() * f + col2.green() * f2) ++ b = int(col1.blue() * f + col2.blue() * f2) + + return QColor(r, g, b) if not fromString else QColor(r, g, b).name() + diff -Nru manuskript-0.12.0/debian/patches/series manuskript-0.12.0/debian/patches/series --- manuskript-0.12.0/debian/patches/series 2021-09-21 12:26:43.000000000 -0500 +++ manuskript-0.12.0/debian/patches/series 2023-02-06 00:00:05.000000000 -0600 @@ -1,2 +1,3 @@ add_shebangs.patch shared_OpenGL_contexts.patch +fix_qcolor_types.patch