The venv had dependencies installed but not the sensorpajen package itself,
causing 'No module named sensorpajen' errors when running.
Changes:
- After installing dependencies from requirements.txt
- Now also runs 'pip install --no-deps .' to install sensorpajen
- Uses --no-deps to avoid re-installing already-installed dependencies
- Installed in /opt/sensorpajen where pyproject.toml exists
Fixes: ModuleNotFoundError: No module named 'sensorpajen'
- Move chown -R before setcap to preserve Bluetooth capabilities
- setcap must be applied after ownership is set, not before
- Ensures Python executable has proper Bluetooth permissions for venv
- Add requirements.txt to debian/install
- Update postinst to use requirements.txt for pip install
- Install from requirements.txt instead of -e . (editable install)
- Ensures bluepy and paho-mqtt are installed in venv
- Fixes 'ModuleNotFoundError: No module named bluetooth' on startup
- Add override_dh_builddeb with -Zgzip flag
- Ensures package uses gzip instead of zstd compression
- Provides better compatibility with older dpkg versions
- Package now installs successfully on all systems
- 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.
- Create debian/ directory structure with all required files:
- control: Package metadata and dependencies
- compat: Debhelper compatibility level
- changelog: Version history
- rules: Build instructions
- install: File installation mappings
- postinst: Post-installation setup (user, venv, setcap)
- prerm: Pre-removal script (stop service)
- postrm: Post-removal script (cleanup, preserve config)
- sensorpajen.service: System-wide systemd unit
- Update config.py to support dual-mode operation:
- Auto-detects system installation (/opt/sensorpajen)
- Uses /etc/sensorpajen for config in system mode
- Falls back to PROJECT_ROOT/config for development
- Update scripts/approve-sensors.sh for system paths:
- Detects system vs development installation
- Uses correct venv and config paths
- Create scripts/verify-deb.sh: Automated build and verification
- Create debian/README.md: Comprehensive packaging documentation
Package features:
- System-wide installation to /opt/sensorpajen/
- Configuration in /etc/sensorpajen/ (preserved on upgrade/remove)
- Dedicated sensorpajen system user
- Automatic venv creation with dependencies
- Bluetooth capabilities set automatically
- Service auto-enabled but waits for config before starting
- Dual-mode code supports both system and development installations