Package: release.debian.org User: release.debian....@packages.debian.org Usertags: unblock
Hi, please consider unblocking this new release of hexchat. It fixes a crash on exit in the python plugin, caused by something that python 3.7 did. From my side it went unnoticed till now because nothing notifies me of crashes, and clearly my window manager hid it from me... I never though of running it off a terminal… also I'm sorry I misinterpreted/ignored the relevant bug, only a recent bug in ubuntu triggered me to act on it. While on it I also renamed (really, just renumbered) the other two patches… sorry for the littel noise in the debdiff, but it really is not doing anything extra apart the renaming (git is more clear). -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
diffstat for hexchat-2.14.2 hexchat-2.14.2 changelog | 7 patches/0001-Build-for-both-python2-and-python3-by-default.patch | 100 ++++++++++ patches/0002-Build-for-both-python2-and-python3-by-default.patch | 100 ---------- patches/0002-Fix-FTBFS-on-non-linux.patch | 29 ++ patches/0003-Fix-FTBFS-on-non-linux.patch | 29 -- patches/0003-Python-plugin-Call-EndInterpreter-when-deinit-ing-th.patch | 35 +++ patches/series | 5 7 files changed, 174 insertions(+), 131 deletions(-) diff -Nru hexchat-2.14.2/debian/changelog hexchat-2.14.2/debian/changelog --- hexchat-2.14.2/debian/changelog 2018-12-03 14:17:35.000000000 +0100 +++ hexchat-2.14.2/debian/changelog 2019-05-25 11:48:26.000000000 +0200 @@ -1,3 +1,10 @@ +hexchat (2.14.2-4) unstable; urgency=medium + + * Add a patch to fix a probable crash while unloading the Python plugin + when using Python 3.7. LP: #1830246; Closes: #921208 + + -- Mattia Rizzolo <mat...@debian.org> Sat, 25 May 2019 11:48:26 +0200 + hexchat (2.14.2-3) unstable; urgency=medium [ Ondřej Nový ] diff -Nru hexchat-2.14.2/debian/patches/0001-Build-for-both-python2-and-python3-by-default.patch hexchat-2.14.2/debian/patches/0001-Build-for-both-python2-and-python3-by-default.patch --- hexchat-2.14.2/debian/patches/0001-Build-for-both-python2-and-python3-by-default.patch 1970-01-01 01:00:00.000000000 +0100 +++ hexchat-2.14.2/debian/patches/0001-Build-for-both-python2-and-python3-by-default.patch 2019-05-25 11:48:26.000000000 +0200 @@ -0,0 +1,100 @@ +From: Mattia Rizzolo <mat...@debian.org> +Date: Tue, 13 Mar 2018 23:41:47 +0100 +Subject: Build for both python2 and python3 by default + +Forwarded: not-needed +--- + data/misc/meson.build | 11 ++++++++--- + meson_options.txt | 7 +++++-- + plugins/meson.build | 2 +- + plugins/python/meson.build | 20 ++++++++++++-------- + 4 files changed, 26 insertions(+), 14 deletions(-) + +diff --git a/data/misc/meson.build b/data/misc/meson.build +index f7f1c27..ca091e8 100644 +--- a/data/misc/meson.build ++++ b/data/misc/meson.build +@@ -98,9 +98,14 @@ if get_option('with-plugin') and get_option('with-appdata') + ] + endif + +- if get_option('with-python') != 'false' ++ if get_option('with-python2') != 'false' + plugin_metainfo += [ +- ['Python', 'Provides a scripting interface in Python', 'GPL-2.0+'] ++ ['Python2', 'Provides a scripting interface in Python2', 'GPL-2.0+'] ++ ] ++ endif ++ if get_option('with-python3') != 'false' ++ plugin_metainfo += [ ++ ['Python3', 'Provides a scripting interface in Python3', 'GPL-2.0+'] + ] + endif + +@@ -124,4 +129,4 @@ if get_option('with-plugin') and get_option('with-appdata') + install_dir: get_option('install-plugin-metainfo') ? metainfodir : '', + ) + endforeach +-endif +\ No newline at end of file ++endif +diff --git a/meson_options.txt b/meson_options.txt +index 100a5ee..083da91 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -48,8 +48,11 @@ option('with-lua', type: 'string', value: 'luajit', + option('with-perl', type: 'string', value: 'perl', + description: 'Perl scripting plugin, value is path to perl executable or "false"' + ) +-option('with-python', type: 'string', value: 'python3', +- description: 'Python scripting plugin. value is pkg-config name to use or "false"' ++option('with-python2', type: 'string', value: 'python2', ++ description: 'Python 2 scripting plugin. value is pkg-config name to use or "false"' ++) ++option('with-python3', type: 'string', value: 'python3', ++ description: 'Python 3 scripting plugin. value is pkg-config name to use or "false"' + ) + option('with-sysinfo', type: 'boolean', + description: 'System information plugin, requires libpci on Unix' +diff --git a/plugins/meson.build b/plugins/meson.build +index 6d41182..0eb1c89 100644 +--- a/plugins/meson.build ++++ b/plugins/meson.build +@@ -30,7 +30,7 @@ if get_option('with-perl') != 'false' + subdir('perl') + endif + +-if get_option('with-python') != 'false' ++if get_option('with-python2') != 'false' or get_option('with-python3') != 'false' + subdir('python') + endif + +diff --git a/plugins/python/meson.build b/plugins/python/meson.build +index e24f0c6..27eab59 100644 +--- a/plugins/python/meson.build ++++ b/plugins/python/meson.build +@@ -1,12 +1,16 @@ +-python_opt = get_option('with-python') +-if python_opt.startswith('python3') +- python_dep = dependency(python_opt, version: '>= 3.3') +-else +- python_dep = dependency(python_opt, version: '>= 2.7') +-endif ++python2_opt = get_option('with-python2') ++python2_dep = dependency(python2_opt, version: '>= 2.7') ++python3_opt = get_option('with-python3') ++python3_dep = dependency(python3_opt, version: '>= 3.3') + +-shared_module('python', 'python.c', +- dependencies: [libgio_dep, hexchat_plugin_dep, python_dep], ++shared_module('python2', 'python.c', ++ dependencies: [libgio_dep, hexchat_plugin_dep, python2_dep], ++ install: true, ++ install_dir: plugindir, ++ name_prefix: '', ++) ++shared_module('python3', 'python.c', ++ dependencies: [libgio_dep, hexchat_plugin_dep, python3_dep], + install: true, + install_dir: plugindir, + name_prefix: '', diff -Nru hexchat-2.14.2/debian/patches/0002-Build-for-both-python2-and-python3-by-default.patch hexchat-2.14.2/debian/patches/0002-Build-for-both-python2-and-python3-by-default.patch --- hexchat-2.14.2/debian/patches/0002-Build-for-both-python2-and-python3-by-default.patch 2018-09-23 20:36:03.000000000 +0200 +++ hexchat-2.14.2/debian/patches/0002-Build-for-both-python2-and-python3-by-default.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,100 +0,0 @@ -From: Mattia Rizzolo <mat...@debian.org> -Date: Tue, 13 Mar 2018 23:41:47 +0100 -Subject: Build for both python2 and python3 by default - -Forwarded: not-needed ---- - data/misc/meson.build | 11 ++++++++--- - meson_options.txt | 7 +++++-- - plugins/meson.build | 2 +- - plugins/python/meson.build | 20 ++++++++++++-------- - 4 files changed, 26 insertions(+), 14 deletions(-) - -diff --git a/data/misc/meson.build b/data/misc/meson.build -index f7f1c27..ca091e8 100644 ---- a/data/misc/meson.build -+++ b/data/misc/meson.build -@@ -98,9 +98,14 @@ if get_option('with-plugin') and get_option('with-appdata') - ] - endif - -- if get_option('with-python') != 'false' -+ if get_option('with-python2') != 'false' - plugin_metainfo += [ -- ['Python', 'Provides a scripting interface in Python', 'GPL-2.0+'] -+ ['Python2', 'Provides a scripting interface in Python2', 'GPL-2.0+'] -+ ] -+ endif -+ if get_option('with-python3') != 'false' -+ plugin_metainfo += [ -+ ['Python3', 'Provides a scripting interface in Python3', 'GPL-2.0+'] - ] - endif - -@@ -124,4 +129,4 @@ if get_option('with-plugin') and get_option('with-appdata') - install_dir: get_option('install-plugin-metainfo') ? metainfodir : '', - ) - endforeach --endif -\ No newline at end of file -+endif -diff --git a/meson_options.txt b/meson_options.txt -index 100a5ee..083da91 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -48,8 +48,11 @@ option('with-lua', type: 'string', value: 'luajit', - option('with-perl', type: 'string', value: 'perl', - description: 'Perl scripting plugin, value is path to perl executable or "false"' - ) --option('with-python', type: 'string', value: 'python3', -- description: 'Python scripting plugin. value is pkg-config name to use or "false"' -+option('with-python2', type: 'string', value: 'python2', -+ description: 'Python 2 scripting plugin. value is pkg-config name to use or "false"' -+) -+option('with-python3', type: 'string', value: 'python3', -+ description: 'Python 3 scripting plugin. value is pkg-config name to use or "false"' - ) - option('with-sysinfo', type: 'boolean', - description: 'System information plugin, requires libpci on Unix' -diff --git a/plugins/meson.build b/plugins/meson.build -index 6d41182..0eb1c89 100644 ---- a/plugins/meson.build -+++ b/plugins/meson.build -@@ -30,7 +30,7 @@ if get_option('with-perl') != 'false' - subdir('perl') - endif - --if get_option('with-python') != 'false' -+if get_option('with-python2') != 'false' or get_option('with-python3') != 'false' - subdir('python') - endif - -diff --git a/plugins/python/meson.build b/plugins/python/meson.build -index e24f0c6..27eab59 100644 ---- a/plugins/python/meson.build -+++ b/plugins/python/meson.build -@@ -1,12 +1,16 @@ --python_opt = get_option('with-python') --if python_opt.startswith('python3') -- python_dep = dependency(python_opt, version: '>= 3.3') --else -- python_dep = dependency(python_opt, version: '>= 2.7') --endif -+python2_opt = get_option('with-python2') -+python2_dep = dependency(python2_opt, version: '>= 2.7') -+python3_opt = get_option('with-python3') -+python3_dep = dependency(python3_opt, version: '>= 3.3') - --shared_module('python', 'python.c', -- dependencies: [libgio_dep, hexchat_plugin_dep, python_dep], -+shared_module('python2', 'python.c', -+ dependencies: [libgio_dep, hexchat_plugin_dep, python2_dep], -+ install: true, -+ install_dir: plugindir, -+ name_prefix: '', -+) -+shared_module('python3', 'python.c', -+ dependencies: [libgio_dep, hexchat_plugin_dep, python3_dep], - install: true, - install_dir: plugindir, - name_prefix: '', diff -Nru hexchat-2.14.2/debian/patches/0002-Fix-FTBFS-on-non-linux.patch hexchat-2.14.2/debian/patches/0002-Fix-FTBFS-on-non-linux.patch --- hexchat-2.14.2/debian/patches/0002-Fix-FTBFS-on-non-linux.patch 1970-01-01 01:00:00.000000000 +0100 +++ hexchat-2.14.2/debian/patches/0002-Fix-FTBFS-on-non-linux.patch 2019-05-25 11:48:26.000000000 +0200 @@ -0,0 +1,29 @@ +From: Mattia Rizzolo <mat...@debian.org> +Date: Sun, 23 Sep 2018 13:17:56 +0200 +Subject: Fix FTBFS on non-linux + +Signed-off-by: Mattia Rizzolo <mat...@debian.org> +--- + plugins/sysinfo/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/sysinfo/meson.build b/plugins/sysinfo/meson.build +index aac52e8..8b67da2 100644 +--- a/plugins/sysinfo/meson.build ++++ b/plugins/sysinfo/meson.build +@@ -13,13 +13,13 @@ sysinfo_includes = [] + sysinfo_cargs = [] + + system = host_machine.system() +-if system == 'linux' or system == 'darwin' ++if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'darwin' + sysinfo_includes += 'shared' + sysinfo_sources += [ + 'shared/df.c' + ] + +- if system == 'linux' ++ if system == 'linux' or system == 'gnu' or system.startswith('gnu/') + libpci = dependency('libpci', required: false, method: 'pkg-config') + if libpci.found() + sysinfo_deps += libpci diff -Nru hexchat-2.14.2/debian/patches/0003-Fix-FTBFS-on-non-linux.patch hexchat-2.14.2/debian/patches/0003-Fix-FTBFS-on-non-linux.patch --- hexchat-2.14.2/debian/patches/0003-Fix-FTBFS-on-non-linux.patch 2018-09-23 20:36:03.000000000 +0200 +++ hexchat-2.14.2/debian/patches/0003-Fix-FTBFS-on-non-linux.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -From: Mattia Rizzolo <mat...@debian.org> -Date: Sun, 23 Sep 2018 13:17:56 +0200 -Subject: Fix FTBFS on non-linux - -Signed-off-by: Mattia Rizzolo <mat...@debian.org> ---- - plugins/sysinfo/meson.build | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/sysinfo/meson.build b/plugins/sysinfo/meson.build -index aac52e8..8b67da2 100644 ---- a/plugins/sysinfo/meson.build -+++ b/plugins/sysinfo/meson.build -@@ -13,13 +13,13 @@ sysinfo_includes = [] - sysinfo_cargs = [] - - system = host_machine.system() --if system == 'linux' or system == 'darwin' -+if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'darwin' - sysinfo_includes += 'shared' - sysinfo_sources += [ - 'shared/df.c' - ] - -- if system == 'linux' -+ if system == 'linux' or system == 'gnu' or system.startswith('gnu/') - libpci = dependency('libpci', required: false, method: 'pkg-config') - if libpci.found() - sysinfo_deps += libpci diff -Nru hexchat-2.14.2/debian/patches/0003-Python-plugin-Call-EndInterpreter-when-deinit-ing-th.patch hexchat-2.14.2/debian/patches/0003-Python-plugin-Call-EndInterpreter-when-deinit-ing-th.patch --- hexchat-2.14.2/debian/patches/0003-Python-plugin-Call-EndInterpreter-when-deinit-ing-th.patch 1970-01-01 01:00:00.000000000 +0100 +++ hexchat-2.14.2/debian/patches/0003-Python-plugin-Call-EndInterpreter-when-deinit-ing-th.patch 2019-05-25 11:48:26.000000000 +0200 @@ -0,0 +1,35 @@ +From: Mattia Rizzolo <mat...@debian.org> +Date: Sat, 25 May 2019 11:37:50 +0200 +Subject: Python plugin: Call EndInterpreter when deinit'ing the plugin + +Commonly-encountered bug when using Hexchat 2.14 on Python 3.7. + +The next upstream release will have a completely rewritten Python +plugin that won't need this patch (check the upstream bug). + +Bug: https://github.com/hexchat/hexchat/issues/2237 +Bug-Debian: https://bugs.debian.org/921208 +Bug-Ubuntu: https://bugs.launchpad.net/bug/1830246 +Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1632039 +Author: @ncoghlan, on the upstream bug +Forwarded: not-needed + +Signed-off-by: Mattia Rizzolo <mat...@debian.org> +--- + plugins/python/python.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/plugins/python/python.c b/plugins/python/python.c +index 4403474..475756b 100644 +--- a/plugins/python/python.c ++++ b/plugins/python/python.c +@@ -2806,6 +2806,9 @@ hexchat_plugin_deinit(void) + xchatout_buffer = NULL; + + if (interp_plugin) { ++ PyThreadState *tstate = ((PluginObject*)interp_plugin)->tstate; ++ PyThreadState_Swap(tstate); ++ Py_EndInterpreter(tstate); + Py_DECREF(interp_plugin); + interp_plugin = NULL; + } diff -Nru hexchat-2.14.2/debian/patches/series hexchat-2.14.2/debian/patches/series --- hexchat-2.14.2/debian/patches/series 2018-12-03 14:17:35.000000000 +0100 +++ hexchat-2.14.2/debian/patches/series 2019-05-25 11:48:26.000000000 +0200 @@ -1,2 +1,3 @@ -0002-Build-for-both-python2-and-python3-by-default.patch -0003-Fix-FTBFS-on-non-linux.patch +0001-Build-for-both-python2-and-python3-by-default.patch +0002-Fix-FTBFS-on-non-linux.patch +0003-Python-plugin-Call-EndInterpreter-when-deinit-ing-th.patch
signature.asc
Description: PGP signature