Closed highsciguy closed 1 year ago
What version is "current usbguard"? "usbguard/Rule.hpp" exists in the latest release, i.e. 1.1.2.
Can you please post your build log?
My claim above is missleading. The header is actually in https://github.com/USBGuard/usbguard/tree/main/src/Library/public/usbguard/Rule.hpp
It is missing on my Ubuntu-based system where I do not find any headers (such as in a -dev package) with usbguard and libusbguard0 installed.
Probably, if usbguard-applet-qt is not dead, I actually miss the build instructuions.
What I do ist
git clone https://github.com/pinotree/usbguard-applet-qt
cd usbguard-applet-qt/
mkdir build
cd build
cmake ..
and that gets me (in the first place)
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Checking for module 'libusbguard'
-- No package 'libusbguard' found
CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:603 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
CMakeLists.txt:6 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "build/usbguard-applet-qt/build/CMakeFiles/CMakeOutput.log".
According to the version of cmake I see, it looks like you are using Ubuntu 22.04 -- is that correct? If so, the version of usbguard shipped there is 1.1.1+ds-3.
In versions of usbguard older than 1.1.1+ds-6, the usbguard source as available in Debian, Ubuntu, and derivatives did not ship any libusbguard-dev
package, which is currently needed to build this applet. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961374 for my request to add it few years ago.
Unfortunately, in the version of Ubuntu you are using (again, assuming it is 22.04), you cannot build this applet with the usbguard shipped there. A long term plan I have is to stop using the usbguard library altogether, which is used currently only for parsing the rules.
Your guess wrt. my system being Ubuntu 22.04 is correct. Since there is no usbguard-applet-qt for the platform either I have no GUI. Thanks for the bugreport. Do you have any insights/news regarding the fate of usbguard-dbus? It looks like the interface could be a Qt Plasmoid as well.
This will not compile anymore with current usbguard. Some of the headers used in the project such as "usbguard/Rule.hpp" simply do not exist anymore.