summaryrefslogtreecommitdiffstats
path: root/system/OpenSnitch/patches
diff options
context:
space:
mode:
Diffstat (limited to 'system/OpenSnitch/patches')
-rw-r--r--system/OpenSnitch/patches/fix-setup.py.patch21
-rw-r--r--system/OpenSnitch/patches/remove-debian-path.patch15
-rw-r--r--system/OpenSnitch/patches/use-system-python-packages.patch22
3 files changed, 58 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/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