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'.
Vlc snap is not published for x86 and we use it to verify that search by arch is
correctly done. However, there is another snap 'mjpg-streamer' which needs to be
accounted for.
Signed-off-by: Maciej Borzecki <email address hidden>