Skip to content

Commit

Permalink
deb: warn about buggy python3-grpcio version (1.30.2-3build6)
Browse files Browse the repository at this point in the history
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
 - #647

(cherry picked from commit c89b490)
  • Loading branch information
gustavo-iniguez-goya committed Jul 1, 2024
1 parent a6fe895 commit 5877e6c
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion utils/packaging/ui/deb/debian/postinst
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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#

0 comments on commit 5877e6c

Please sign in to comment.