i am trying to build a snap based on deconz. It is build using Qt5 and is using Qtserialport.
QtSerialport creates a lock file for a connected interface in /var/lock, in a confined snap this fails. I tried to use Layouts to map /var/lock into $SNAP_DATA without success. Because /var/lock is already a symlink to /run/lock. So i tried to create a layout definition to /run/lock but this fails with “can not create a top level directory /run”.
Are there alternatives or to get access to /var/lock?
Currently running in devmode, but that is not a solution for production.
It doesn’t look like the QtSerialport code allows you to customise the lock file path like that:
It is creating the standard lock files like LCK..ttyS0.
@mapero: if it is an option for you, perhaps you could build your own copy of QtSerialport with the locking code disabled. Your lock files wouldn’t be visible to host system executables, so disabling the locking code entirely isn’t a big loss.