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
This commit is contained in:
Gustavo Iñiguez Goia 2024-07-02 00:02:46 +02:00
parent acdd2b34ec
commit c89b4908ce
Failed to generate hash of commit

View file

@ -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#