Add a daemon-only build path (no Python GUI) that builds the eBPF objects
against the running kernel's headers, deriving the BPF DataLayout from
clang and finalizing with opt; a structural unprivileged check target; an
install path that never clobbers existing units/config/rules; an Arch
PKGBUILD.in + prepare.sh and a test_install.sh harness. Document the
workflow and the event-loss diagnostics in README.md and ebpf_prog/README.
Gitignore the compiled ebpf_prog/*.o artifacts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
In ff05d94f41 python311-PyQt6 was added as
dependency, to help users install some needed dependencies automatically
on old versions of Tumbleweed.
However on new versions, it also install this package, which is not the
default python3 version. Besides, python3-qt6 exists as dependency on
latest versions.
So let's use again python3-qt6 for SuSe. If someone wants to install the
GUI on older versions of Tumbleweed (~2024-2025), they'll need to
install PyQt6 via pip.
Closes: #1576
The v1.8.0 rpm UI package was built with rpm 6.x, which caused the error
"Unrecognized archive format" when installing it with rpm-ostree.
Adding %define _rpmformat 4 fixes this issue.
Some distros like OpenSuse Leap 15.6 ships with python3.6 by default.
PyQt6 is not available for python3.6, but python311-PyQt6 is.
So there's no generic python3-PyQt6, but python311-PyQt6.
In this specific case, the user will have to change the default python3
version to python3.11. And they'll have to install some packages like
slugify from pip.
But as a best effort, we'll try to install PyQt6 from the distro
repositories.
- distribute daemon/data/rules/ with the daemon packages.
- added a new system fw rule to allow localhost connections (disabled
by default).
Closes: #965.
We were distributing locales twice, under opensnitch/i18n/ and
opensnitch/i18n/locales/.
This also caused to display an empty language in the Preferences
languages combo box.
- deb: added python3-packaging dependency.
- rpm:
* make python3-notify2 package optional.
* Added python3-packaging as dependency to load dynamically the
protobuffers (python3-packaging for Fedora, python-rpm-packaging
metapackage for OpenSuse).
Protobuffers compiled with protobuf < 3.20.0 are incompatible with
protobuf >= 4.0.0:
https://github.com/evilsocket/opensnitch/wiki/GUI-known-problems#gui-does-not-show-up
This has been a source of problems for some users (#1214, #647), and
in some distributions, previous protobuffer does no longer work due to
incompatibility with the protobuf package version installed
(OpenSuse Tumbleweed).
So in order to solve this issue, we provide several protobuffers,
for old and new protobuf versions:
proto/ui_pb2* for protobuf >= 4.0.0
proto/pre3200/ui_pb2* for protobuf >= 3.6.0 and < 3.20.0
To avoid import errors, each protobuffer must be placed in its own
directory, and the name of the protobuffer files must be named with
the syntax <prefix>_pb2.py/<prefix>_pb2_grpc.py:
ui_pb2.py and ui_pb2_grpc.py
The default compiled protobuffer will be opensnitch/proto/ui_*.py
instead of opensnitch/ui_*.py
We were not handling configuration upgrades properly on rpm based
systems.
Now local changes to default-config.json and system-fw.json are kept,
and if the distributed files changes in the future, new files will be
created with the extension .rpmnew
Previously after installing the rpm GUI package, we created a symlink to
our .desktop file for all users, under /home/*/.config/autostart/
If the path didn't exist we created it, unfortunately as root, which
caused some problems with other applications like Gnome Tweaks.
Now a link is created under /etc/xdg/autostart/, which is what we use
with the debian packages.
Closes: #1068
Starting from a python3 release, distutils no longer install scripts
under /usr/bin by default, but under /usr/local/bin.
(around opensnitch v1.6.0-c5).
This causes on some immutable distros not to install the GUI, for
example Fedora SilverBlue:
https://github.com/projectatomic/rpm-ostree/issues/233Closes#880
- Don't rename libbpf's bpf_map_def struct, and distribute the needed bpf
headers.
The bpf_map_def struct has been deprecated for quite some time now,
and it was been removed on >= 6.2 anyway.
We still need it, because we use gobpf.
- Improved compilation behaviour:
- We don't require the kernel sources anymore. We can just use the
kernel headers from the distribution.
- There's no need to copy the sources to the kernel tree, the modules
can be compiled from the ebpf_prog/ dir.
- Compiling against kernels 6.x seems to solve the problem we had with
VPNs, where connections were not intercepted with modules compiled
against 5.8, on kernels >= 5.19.
The modules has been tested on kernels 4.17, 5.4, 5.10, 5.15, 6.1 and
6.2 (kernel connections included).
Closes: #939