fermentrack
fermentrack copied to clipboard
Tilt_tests.py does not detect setcap correcly when run in a docker container
The scripts tests for settings connected to Bluetooth and it give the wrong recommendations for the capability check.
From what I can see the results for getcap differs when run from within a container.
In Ubuntu the return value (of getcap) is as expected. /usr/bin/python3.8 = cap_net_admin,cap_net_raw+eip
But when run from within the docker container the response is /usr/bin/python3.8 = cap_net_admin,cap_net_raw=eip
Since the script searches for +eip it fails when run from within a docker container even if the pre-reqs are correct.
The solution is simple to just search for "eip" and not "+eip" in the above file. Will test this once more when I have the offical docker up and running.
I've ended up removing this test as part of an upcoming release of Fermentrack that no longer targets non-containerized installs, as we have control (via the Dockerfile) of exactly what flags are set. Going to tag this as pending pull, and close once everything is merged to Master.