Skip to content

Commit

Permalink
Include and build grpc 1.59 and protobuf 4.24.4.
Browse files Browse the repository at this point in the history
There are a number of versions post-grpc 1.44 that have a bug which
causes 100% cpu use when idle (polling at a 2ms interval instead of
200ms).

1.59 seems to have that fixed, but requires a newer protobuf, so we
need to build that as well. This gets us out of range of some potential
vulnerabilities that were discovered in protobuf.

- change deb build type to 'any' (arch-dependent)
- remove old dependencies
- add debug package

grpc/grpc#30428

GHSA-8gq9-2x98-w8hf
  • Loading branch information
mtwebster committed Oct 16, 2023
1 parent 80aba20 commit dfbdb4e
Show file tree
Hide file tree
Showing 14,235 changed files with 2,824,034 additions and 12,988 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 16 additions & 5 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ Maintainer: Linux Mint <[email protected]>
Build-Depends:
debhelper-compat (= 12),
appstream,
cython3,
curl,
dh-python,
gnome-pkg-tools (>= 0.10),
meson (>= 0.45.0),
policykit-1,
python3-grpc-tools (>= 1.14.0),
python3-protobuf (>= 3.6.1),
python3-dev,
python3-setuptools,
gobject-introspection
Standards-Version: 3.9.6

Package: warpinator
Architecture: all
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends:
gir1.2-glib-2.0,
Expand All @@ -26,8 +27,6 @@ Depends:
python3-gi,
python3-setproctitle,
python3-xapp (>= 1.6.0),
python3-grpcio (>= 1.16.0),
python3-protobuf (>= 3.6.1),
python3-cryptography,
python3-nacl,
python3-netaddr,
Expand All @@ -36,3 +35,15 @@ Depends:
${misc:Depends},
${python3:Depends}
Description: Allows simple local network file sharing.

Package: warpinator-dbg
Section: debug
Priority: extra
Architecture: any
Depends:
warpinator (= ${binary:Version}),
${misc:Depends},
Description: Allows simple local network file sharing.
.
This package contains the debugging symbols for the bundled
grpcio and protobuf modules.
8 changes: 4 additions & 4 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
%:
dh $@ --with=python3,gir

override_dh_auto_configure:
dh_auto_configure -- \
-Dbundle-grpc-with-py310=true

override_dh_python3:
dh_python3 usr/libexec/warpinator

override_dh_auto_test:

override_dh_strip:
dh_strip --dbg-package=warpinator-dbg
4 changes: 4 additions & 0 deletions debian/warpinator.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/etc
/usr/bin
/usr/libexec
/usr/share
8 changes: 1 addition & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ meson_source_root = meson.current_source_dir()
include_firewall_mod = get_option('include-firewall-mod')
bundle_zeroconf = get_option('bundle-zeroconf')
bundle_landlock = get_option('bundle-landlock')

# grpc 1.30.2 on ubuntu 22.04 is broken
pymod = import('python')
python3 = pymod.find_installation('python3')
bundle_grpc = python3.language_version().version_compare('3.10') and \
get_option('bundle-grpc-with-py310') and \
host_machine.cpu() == 'x86_64'
bundle_grpc = get_option('bundle-grpc')

subdir('data')
subdir('src')
Expand Down
6 changes: 3 additions & 3 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ option('bundle-landlock',
description: 'Include the landlock python module (https://github.com/Edward-Knight/landlock).'
)

option('bundle-grpc-with-py310',
option('bundle-grpc',
type: 'boolean',
value: false,
description: 'grpc 1.30.2 is broken on Ubuntu 22.04. Setting this to true will bundle 1.46.3 IF python version is 3.10.'
value: true,
description: 'Build and bundle grpc and protobuf'
)
1 change: 1 addition & 0 deletions src/config.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ libdir="@libdir@"
libexecdir="@libexecdir@"
include_firewall_mod=@include_firewall_mod@
bundle_zeroconf=@bundle_zeroconf@
bundle_grpc=@bundle_grpc@
PACKAGE="@PACKAGE@"
VERSION="@VERSION@"
GETTEXT_PACKAGE="@gettext_package@"
Expand Down
Loading

0 comments on commit dfbdb4e

Please sign in to comment.