Understand/improve helper installation/check

On Linux, we need the helper bitmask-root and the polkit policy file. Let's handle this, if we merged !171 (merged) and !172 (closed)

Current situation:

  func (b *Bitmask3) InstallHelpers() error {
      // TODO use pickle module from here
      return nil 
  }
  • InstallHelpers() is exported via pkg/backend/api.go
  • the cpp code maybe runs the function
gui/main.cpp
190:    bool installHelpers  = parser.isSet("install-helpers");
211:    if (installHelpers) {
213:        InstallHelpers();

Desired behviour

  • Go code should only check if both files are there
  • not part of the Go code:
    • install helper
    • dev: install helpers via Makefile
    • prod: install helpers via package
    • current: Code asks user for sudo password...
  • Remove InstallHelpers from Bitmask interface
  • During start: check if bitmask-root + policy file exists (maybe in the Bitmask3/5 struct initialization)
    • exit? if the helpers are not there
Edited by Pea Nut