diff options
Diffstat (limited to 'system/OpenSnitch/patches')
-rw-r--r-- | system/OpenSnitch/patches/fix-setup.py.patch | 21 | ||||
-rw-r--r-- | system/OpenSnitch/patches/modify-go.mod-file.patch | 22 | ||||
-rw-r--r-- | system/OpenSnitch/patches/remove-debian-path.patch | 15 | ||||
-rw-r--r-- | system/OpenSnitch/patches/use-system-python-packages.patch | 22 |
4 files changed, 80 insertions, 0 deletions
diff --git a/system/OpenSnitch/patches/fix-setup.py.patch b/system/OpenSnitch/patches/fix-setup.py.patch new file mode 100644 index 0000000000..c0ea3d94d5 --- /dev/null +++ b/system/OpenSnitch/patches/fix-setup.py.patch @@ -0,0 +1,21 @@ +This patch was taken from Arch Linux repositories: +https://gitlab.archlinux.org/archlinux/packaging/packages/opensnitch/-/blob/main/fix-setup.py.patch +--- a/ui/setup.py ++++ b/ui/setup.py +@@ -28,11 +28,9 @@ These rules can last forever, until the app restart or just one time.', + packages=find_packages(), + include_package_data = True, + package_data={'': ['*.*']}, +- data_files=[('/usr/share/applications', ['resources/opensnitch_ui.desktop']), +- ('/usr/share/kservices5', ['resources/kcm_opensnitch.desktop']), +- ('/usr/share/icons/hicolor/scalable/apps', ['resources/icons/opensnitch-ui.svg']), +- ('/usr/share/icons/hicolor/48x48/apps', ['resources/icons/48x48/opensnitch-ui.png']), +- ('/usr/share/icons/hicolor/64x64/apps', ['resources/icons/64x64/opensnitch-ui.png']), +- ('/usr/share/metainfo', ['resources/io.github.evilsocket.opensnitch.appdata.xml'])], ++ data_files=[('share/applications', ['resources/opensnitch_ui.desktop']), ++ ('share/kservices5', ['resources/kcm_opensnitch.desktop']), ++ ('share/icons/hicolor/scalable/apps', ['resources/icons/opensnitch-ui.svg']), ++ ('share/metainfo', ['resources/io.github.evilsocket.opensnitch.appdata.xml'])], + scripts = [ 'bin/opensnitch-ui' ], + zip_safe=False) + diff --git a/system/OpenSnitch/patches/modify-go.mod-file.patch b/system/OpenSnitch/patches/modify-go.mod-file.patch new file mode 100644 index 0000000000..7b16668a1e --- /dev/null +++ b/system/OpenSnitch/patches/modify-go.mod-file.patch @@ -0,0 +1,22 @@ +# This patch was adapted from the one on Arch Linux: +https://gitlab.archlinux.org/archlinux/packaging/packages/opensnitch/-/blob/main/add-go.sum-file.patch +--- a/daemon/go.mod ++++ b/daemon/go.mod +@@ -9,10 +9,16 @@ require ( + github.com/google/nftables v0.1.0 + github.com/google/uuid v1.3.0 + github.com/iovisor/gobpf v0.2.0 ++ github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 ++ github.com/mdlayher/netlink v1.4.2 ++ github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb + github.com/varlink/go v0.4.0 + github.com/vishvananda/netlink v0.0.0-20210811191823-e1a867c6b452 ++ github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae + golang.org/x/net v0.0.0-20211209124913-491a49abca63 + golang.org/x/sys v0.0.0-20211205182925-97ca703d548d ++ golang.org/x/text v0.3.6 ++ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 + google.golang.org/grpc v1.32.0 +- google.golang.org/protobuf v1.26.0 // indirect ++ google.golang.org/protobuf v1.26.0 + ) diff --git a/system/OpenSnitch/patches/remove-debian-path.patch b/system/OpenSnitch/patches/remove-debian-path.patch new file mode 100644 index 0000000000..6cb62752cd --- /dev/null +++ b/system/OpenSnitch/patches/remove-debian-path.patch @@ -0,0 +1,15 @@ +This patch watch taken from Arch Linux repositories: +https://gitlab.archlinux.org/archlinux/packaging/packages/opensnitch/-/blob/main/remove-debian-path.patch +--- a/ui/bin/opensnitch-ui ++++ b/ui/bin/opensnitch-ui +@@ -35,10 +35,6 @@ from concurrent import futures + + import grpc + +-dist_path = '/usr/lib/python3/dist-packages/' +-if dist_path not in sys.path: +- sys.path.append(dist_path) +- + from opensnitch.service import UIService + from opensnitch.config import Config + from opensnitch.utils import Themes, Utils, Versions, Message diff --git a/system/OpenSnitch/patches/use-system-python-packages.patch b/system/OpenSnitch/patches/use-system-python-packages.patch new file mode 100644 index 0000000000..441e01c480 --- /dev/null +++ b/system/OpenSnitch/patches/use-system-python-packages.patch @@ -0,0 +1,22 @@ +This patch was taken from Arch Linux repositories: +https://gitlab.archlinux.org/archlinux/packaging/packages/opensnitch/-/blob/main/use-system-python-packages.patch +--- a/ui/Makefile ++++ b/ui/Makefile +@@ -3,16 +3,13 @@ all: opensnitch/resources_rc.py + install: + @pip3 install --upgrade . + +-opensnitch/resources_rc.py: translations deps ++opensnitch/resources_rc.py: translations + @pyrcc5 -o opensnitch/resources_rc.py opensnitch/res/resources.qrc + sed -i 's/^import ui_pb2/from . import ui_pb2/' opensnitch/ui_pb2* + + translations: + @cd i18n ; make + +-deps: +- @pip3 install -r requirements.txt +- + clean: + @rm -rf *.pyc + @rm -rf opensnitch/resources_rc.py |