tests: workaround missing go dependencies in debian-9
The debian-9 image we use has no golang-1.10 anymore. This makes
the tests fail right now. To fix this we need to install the latest
golang available via skretch-backports. This may change so there is
a small script that detects the right version.
add DBus methods for controlling brightness and dynamically detect backlights
The kernel supports many different backlights with differing names in
/sys/devices, so listing them in static rules is cumbersome and there is
a maintenance burden of keeping in sync with new devices. The kernel
will put a symlink under /sys/class/backlight for each backlight, so we
can dereference the symlink for the /sys/devices paths. This works well
for permanently attached devices like laptop screens or other primary
screens since they aren't expected to change (even if they did on
reboot, snapd would notice this and adjust the policy).
snapd will not notice a new hotplugged monitor (but would if it was
plugged in on boot). A future update could utilize snapd's hotplug
support.
Some applications need access to raw disks (eg, smartctl and hdparm) or
disks at the block level (eg, flashing tools). This interface provides
this access. Since read access gives the snap access to all data on the
device and write access allows changing the contents of the disk, this
interface is considered a "super-privileged" interface since it grants
device ownership to the snap.
Tested with 'hdparm -t /dev/sda', 'smartctl --test=short /dev/sda' and
'smartctl --all /dev/sda'.