Services (daynivo-kiosk-*, daynivo-network-guard, daynivo-boot-import), programs in /usr/lib/daynivo-kiosk, folders /etc, /var/lib, /var/log and /var/cache daynivo-kiosk*, the system user daynivo, DAYNIVO_* settings, the plymouth theme, network profiles daynivo-eth0/wlan0, the image stage and its first user daynivoadmin. install.sh moves a kiosk installed up to 1.2.x over once: old services stopped and removed, folders moved (configuration, password, browser profile, logs) with symlinks under the old names, the voxip user renamed with the same uid, network profiles renamed unless a change awaits confirmation, and old leftovers removed. Tested by upgrading a configured 1.2.0 installation in a container, and running the install a second time. Old names keep working where people type or place them: voxip-config.json, voxip-authorized_keys, voxip-network-reset, voxip-kiosk-ctl, and VOXIP_DEFAULT_URL / VOXIP_DEVICE_NAME for image builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.9 KiB
Makefile
41 lines
1.9 KiB
Makefile
PY ?= .venv/bin/python
|
|
DEV := $(CURDIR)/.dev
|
|
DEV_ENV := PYTHONPATH=src DAYNIVO_CONFIG_DIR=$(DEV)/etc DAYNIVO_STATE_DIR=$(DEV)/state DAYNIVO_LOG_DIR=$(DEV)/log \
|
|
DAYNIVO_SHARE_DIR=$(DEV)/share DAYNIVO_AGENT_RUN_DIR=$(DEV)/run DAYNIVO_BROWSER_RUN_DIR=$(DEV)/run \
|
|
DAYNIVO_NETWORK_STATE_DIR=$(DEV)/net DAYNIVO_HELPER=/nonexistent/daynivo-kiosk-helper
|
|
|
|
.PHONY: venv test lint test-bookworm dev image clean
|
|
|
|
venv:
|
|
python3 -m venv .venv && .venv/bin/pip install -q -r requirements-dev.txt
|
|
|
|
test:
|
|
$(PY) -m pytest
|
|
|
|
lint:
|
|
shellcheck -S warning install.sh update.sh uninstall.sh image/build.sh image/stage-daynivo/prerun.sh \
|
|
image/stage-daynivo/00-daynivo/00-run.sh bin/daynivo-kiosk-x
|
|
|
|
# The test suite against the exact Python/Flask/argon2 versions that Raspberry Pi OS Bookworm ships.
|
|
test-bookworm:
|
|
docker run --rm -v "$(CURDIR)":/src:ro debian:bookworm bash -c '\
|
|
apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
|
python3 python3-flask python3-argon2 python3-websocket python3-pytest shellcheck >/dev/null && \
|
|
cp -r /src /work && cd /work && rm -rf .venv && python3 -m pytest -p no:cacheprovider && \
|
|
shellcheck -S warning install.sh install-online.sh update.sh uninstall.sh tools/release-upload.sh image/build.sh bin/daynivo-kiosk-x'
|
|
|
|
# Web interface on http://127.0.0.1:8080 with throwaway state in .dev/ (system actions fail gracefully).
|
|
dev:
|
|
mkdir -p $(DEV)/etc $(DEV)/state $(DEV)/log $(DEV)/run $(DEV)/net $(DEV)/share
|
|
test -f $(DEV)/etc/config.json || cp config/config.default.json $(DEV)/etc/config.json
|
|
cp VERSION $(DEV)/share/VERSION
|
|
@echo "Setupcode: zie $(DEV)/etc/setup-code (wordt aangemaakt bij de start)"
|
|
$(DEV_ENV) $(PY) -m flask --app 'daynivo_kiosk.web:create_app()' run --host 127.0.0.1 --port 8080
|
|
|
|
image:
|
|
./image/build.sh
|
|
|
|
clean:
|
|
rm -rf .dev .pytest_cache image/work
|
|
find . -name __pycache__ -type d -prune -exec rm -rf {} +
|