Change all write paths to /var/run/python-validity

This is to ensure functionality of the python-validity
on systems who restrict write access to the /usr directory,
like Fedora Silverblue.
This commit is contained in:
Jonatan Steuernagel 2023-04-18 16:46:45 +02:00
parent ae76d37821
commit a73bd66ef3
No known key found for this signature in database
GPG key ID: BE63A27135DE14E3
4 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@ from usb import core as usb_core
from validitysensor.firmware_tables import FIRMWARE_NAMES, FIRMWARE_URIS
from validitysensor.usb import SupportedDevices
python_validity_data = '/usr/share/python-validity/'
python_validity_data = '/var/run/python-validity/'
def download_and_extract_fw(dev_type, fwdir, fwuri=None):

View file

@ -191,7 +191,7 @@ class Device(dbus.service.Object):
return hexlify(tls.app(unhexlify(cmd))).decode()
backoff_file = '/usr/share/python-validity/backoff'
backoff_file = '/var/run/python-validity/backoff'
# I don't know how to tell systemd to backoff in case of multiple instance of the same template service, help!

View file

@ -20,7 +20,7 @@ from .usb import usb, CancelledException
from .util import assert_status, unhex
# TODO: this should be specific to an individual device (system may have more than one sensor)
calib_data_path = '/usr/share/python-validity/calib-data.bin'
calib_data_path = '/var/run/python-validity/calib-data.bin'
line_update_type1_devices = [
0xB5, 0x885, 0xB3, 0x143B, 0x1055, 0xE1, 0x8B1, 0xEA, 0xE4, 0xED, 0x1825, 0x1FF5, 0x199

View file

@ -8,7 +8,7 @@ from .flash import write_flash_all, write_fw_signature, get_fw_info
from .sensor import reboot, write_hw_reg32, read_hw_reg32, identify_sensor
from .usb import usb, SupportedDevices
firmware_home = '/usr/share/python-validity'
firmware_home = '/var/run/python-validity'
def default_fwext_name():