From c89b4908cedf3762bb4c3b936e814f15b3857bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Tue, 2 Jul 2024 00:02:46 +0200 Subject: [PATCH] deb: warn about buggy python3-grpcio version (1.30.2-3build6) Ubuntu jammy package python3-grpcio, version 1.30.2-3build6, has a bug which causes applications to use 100% of the CPU. If after installing we detect that the buggy version is installed, display a warning to the user with instructions on how to solve the problem and links to the bug reports. More information: - https://bugs.launchpad.net/ubuntu/+source/grpc/+bug/1971114 - https://github.com/evilsocket/opensnitch/issues/647 --- utils/packaging/ui/deb/debian/postinst | 32 +++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/utils/packaging/ui/deb/debian/postinst b/utils/packaging/ui/deb/debian/postinst index d43346a53c..885c439948 100755 --- a/utils/packaging/ui/deb/debian/postinst +++ b/utils/packaging/ui/deb/debian/postinst @@ -1,7 +1,35 @@ -#!/bin/sh +#!/bin/bash set -e +# https://github.com/evilsocket/opensnitch/issues/647 +wa_grpcio_647() +{ + badversion="1.30.2-3build6" + source /etc/os-release + if [ "$ID" = "linuxmint" -o "$ID" = "ubuntu" -o "$ID" = "pop" -o "$ID" = "elementary" -o "$ID" = "zorin" ]; then + v=$(dpkg-query -W -f '${Version}' python3-grpcio) + if [ "$v" = "$badversion" ]; then + echo + echo + echo "@@@@@@@@@@@@@@@@@@@ WARNING @@@@@@@@@@@@@@@@@@@@" + echo " invalid python3-grpcio version installed" + echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + echo "Installed python3-grpcio package ($badversion) has a bug which makes opensnitch UI unresponsive." + echo + echo "Launch opensnitch-ui, and if it consumes 100% of the CPU, try this:" + echo "~ $ sudo apt install python3-pip" + echo "~ $ pip3 install grpcio==1.44.0" + echo + echo "More information:" + echo " - https://bugs.launchpad.net/ubuntu/+source/grpc/+bug/1971114" + echo " - https://github.com/evilsocket/opensnitch/issues/647" + echo + echo + fi + fi +} + autostart_by_default() { deskfile=/etc/xdg/autostart/opensnitch_ui.desktop @@ -16,4 +44,6 @@ if command -v gtk-update-icon-cache >/dev/null && test -f /usr/share/icons/hicol gtk-update-icon-cache --quiet /usr/share/icons/hicolor/ fi +wa_grpcio_647 + #DEBHELPER#