The service was failing with 'Read-only file system' when trying to create
discovered_sensors.json in the /etc/sensorpajen config directory.
Changes:
- config.py: Add STATE_DIR for runtime state
- System mode: /var/lib/sensorpajen (writable at runtime)
- Dev mode: config/ (same as config directory)
- config.py: Use STATE_DIR for discovered_sensors.json path
- debian/postinst: Create and own /var/lib/sensorpajen
- debian/sensorpajen.service: Add /var/lib/sensorpajen to ReadWritePaths
- debian/postinst: Remove discovered_sensors.json.example copy (created at runtime)
This separates:
- Config: /etc/sensorpajen (static, not updated by service)
- State: /var/lib/sensorpajen (dynamic, updated by service at runtime)
- Remove debian/compat file (conflicts with Build-Depends)
- Fix debian/install to use correct readme.md filename
- Update verify-deb.sh to mark debian/compat as optional
- Add -Zgzip flag to dpkg-buildpackage for compatibility
(uses gzip instead of zstd for better compatibility)
- Update verify-deb.sh to check optional vs required files
Package now builds and installs successfully on systems
without zstd support.