Rename the Python package to daynivo_kiosk
src/voxip_kiosk -> src/daynivo_kiosk, with every import, the launchers, install.sh, the Makefile and the manager's gunicorn app path. An upgrade replaces /usr/lib/voxip-kiosk/python as a whole, so the old package disappears; tested by upgrading an installation of the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d0f3206ff4
commit
6733aacb6e
62 files changed
+43
-43
No files matched your search
@@ -30,7 +30,7 @@ dev:
|
||||
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 'voxip_kiosk.web:create_app()' run --host 127.0.0.1 --port 8080
|
||||
$(DEV_ENV) $(PY) -m flask --app 'daynivo_kiosk.web:create_app()' run --host 127.0.0.1 --port 8080
|
||||
|
||||
image:
|
||||
./image/build.sh
|
||||
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.ctl import main # noqa: E402
|
||||
from daynivo_kiosk.ctl import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.agent import main # noqa: E402
|
||||
from daynivo_kiosk.agent import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.browser import main # noqa: E402
|
||||
from daynivo_kiosk.browser import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.healthcheck import main # noqa: E402
|
||||
from daynivo_kiosk.healthcheck import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.helper import main # noqa: E402
|
||||
from daynivo_kiosk.helper import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.manager import main # noqa: E402
|
||||
from daynivo_kiosk.manager import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -4,6 +4,6 @@ import sys
|
||||
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
|
||||
from voxip_kiosk.updater import main # noqa: E402
|
||||
from daynivo_kiosk.updater import main # noqa: E402
|
||||
|
||||
sys.exit(main())
|
||||
@@ -180,7 +180,7 @@ daynivo-kiosk-os/
|
||||
├── update.sh update met backup van configuratie
|
||||
├── uninstall.sh verwijderen (--purge voor alles)
|
||||
├── bin/ dunne launchers → /usr/lib/voxip-kiosk/
|
||||
├── src/voxip_kiosk/ Python-package (alle logica)
|
||||
├── src/daynivo_kiosk/ Python-package (alle logica)
|
||||
│ ├── config.py laden/valideren/atomair opslaan
|
||||
│ ├── validation.py gedeelde invoervalidatie
|
||||
│ ├── cdp.py Chrome DevTools Protocol-client
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ VOXIP_DEFAULT_URL=$(printf %q "$VOXIP_DEFAULT_URL")
|
||||
VOXIP_DEVICE_NAME=$(printf %q "$VOXIP_DEVICE_NAME")
|
||||
EOF
|
||||
cat > "$PAYLOAD/BUILD-INFO" <<EOF
|
||||
voxip_kiosk_os=$VERSION
|
||||
daynivo_kiosk_os=$VERSION
|
||||
source_revision=$SOURCE_REV
|
||||
pi_gen_ref=$PI_GEN_REF
|
||||
pi_gen_commit=$PI_GEN_COMMIT
|
||||
|
||||
+4
-4
@@ -54,7 +54,7 @@ while [[ $# -gt 0 ]]; do
|
||||
done
|
||||
|
||||
[[ $EUID -eq 0 ]] || die "Voer dit script uit met sudo."
|
||||
[[ -f "$SRC/src/voxip_kiosk/config.py" ]] || die "Start install.sh vanuit de Daynivo Kiosk OS-repository."
|
||||
[[ -f "$SRC/src/daynivo_kiosk/config.py" ]] || die "Start install.sh vanuit de Daynivo Kiosk OS-repository."
|
||||
|
||||
in_chroot() {
|
||||
if command -v systemd-detect-virt >/dev/null 2>&1 && systemd-detect-virt --chroot --quiet; then
|
||||
@@ -126,7 +126,7 @@ say "Programmabestanden installeren"
|
||||
install -d -m 0755 "$LIB" "$SHARE" "$DOC"
|
||||
rm -rf "$LIB/python.new"
|
||||
install -d -m 0755 "$LIB/python.new"
|
||||
tar -C "$SRC/src" --exclude='__pycache__' --exclude='*.pyc' -cf - voxip_kiosk | tar -C "$LIB/python.new" -xf -
|
||||
tar -C "$SRC/src" --exclude='__pycache__' --exclude='*.pyc' -cf - daynivo_kiosk | tar -C "$LIB/python.new" -xf -
|
||||
chown -R root:root "$LIB/python.new"
|
||||
chmod -R u=rwX,go=rX "$LIB/python.new"
|
||||
python3 -m compileall -q "$LIB/python.new" >/dev/null
|
||||
@@ -172,7 +172,7 @@ PYRUN=(python3 -I -c)
|
||||
"${PYRUN[@]}" '
|
||||
import json, os, sys
|
||||
sys.path.insert(0, "/usr/lib/voxip-kiosk/python")
|
||||
from voxip_kiosk import config as c
|
||||
from daynivo_kiosk import config as c
|
||||
path, default, url, name = sys.argv[1:5]
|
||||
updates = {}
|
||||
if url: updates["url"] = url
|
||||
@@ -220,7 +220,7 @@ for dir in /etc/chromium/policies/managed /etc/chromium-browser/policies/managed
|
||||
install -D -m 0644 "$SRC/config/chromium/voxip-kiosk.json" "$dir/voxip-kiosk.json"
|
||||
done
|
||||
|
||||
ADMIN_PORT="$(python3 -I -c 'import sys; sys.path.insert(0, "/usr/lib/voxip-kiosk/python"); from voxip_kiosk.config import load_config; print(load_config(__import__("pathlib").Path(sys.argv[1]))["admin_port"])' "$ETC/config.json")"
|
||||
ADMIN_PORT="$(python3 -I -c 'import sys; sys.path.insert(0, "/usr/lib/voxip-kiosk/python"); from daynivo_kiosk.config import load_config; print(load_config(__import__("pathlib").Path(sys.argv[1]))["admin_port"])' "$ETC/config.json")"
|
||||
install -d -m 0755 /etc/avahi/services
|
||||
sed "s#<port>8080</port>#<port>${ADMIN_PORT}</port>#" "$SRC/config/avahi-voxip.service" > /etc/avahi/services/voxip-kiosk.service
|
||||
chmod 0644 /etc/avahi/services/voxip-kiosk.service
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -55,7 +55,7 @@ def gunicorn_argv(paths: Paths, config: dict) -> list[str]:
|
||||
if config["admin_https"]:
|
||||
cert, key = ensure_certificate(paths)
|
||||
argv += ["--certfile", str(cert), "--keyfile", str(key)]
|
||||
argv.append("voxip_kiosk.web:create_app()")
|
||||
argv.append("daynivo_kiosk.web:create_app()")
|
||||
return argv
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
File renamed without changes.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5
-5
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk.paths import Paths
|
||||
from daynivo_kiosk.paths import Paths
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
@@ -39,7 +39,7 @@ class FakeHelper:
|
||||
self.responses = {}
|
||||
|
||||
def call(self, verb, *args, payload=None, timeout=60):
|
||||
from voxip_kiosk.helper_client import HelperError
|
||||
from daynivo_kiosk.helper_client import HelperError
|
||||
|
||||
self.calls.append((verb, args, payload))
|
||||
if self.fail:
|
||||
@@ -53,7 +53,7 @@ class FakeCDP:
|
||||
self.fail = None
|
||||
|
||||
def _do(self, name, *args):
|
||||
from voxip_kiosk.cdp import CDPError
|
||||
from daynivo_kiosk.cdp import CDPError
|
||||
|
||||
self.calls.append((name, args))
|
||||
if self.fail:
|
||||
@@ -80,7 +80,7 @@ def fake_cdp():
|
||||
@pytest.fixture
|
||||
def quiet_system(monkeypatch):
|
||||
"""Keep the web tests independent of the machine they run on."""
|
||||
from voxip_kiosk import netinfo, services, sysinfo
|
||||
from daynivo_kiosk import netinfo, services, sysinfo
|
||||
|
||||
monkeypatch.setattr(services, "summary", lambda: {
|
||||
"browser": {"unit": services.BROWSER_UNIT, "status": "ok", "label": "Actief", "restarts": "2", "since": ""},
|
||||
@@ -106,7 +106,7 @@ def quiet_system(monkeypatch):
|
||||
|
||||
@pytest.fixture
|
||||
def app(paths, fake_helper, fake_cdp, quiet_system):
|
||||
from voxip_kiosk.web import create_app
|
||||
from daynivo_kiosk.web import create_app
|
||||
|
||||
application = create_app(paths, helper=fake_helper, cdp=fake_cdp)
|
||||
application.config["TESTING"] = True
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@ import json
|
||||
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk.agent import Agent, HUNG_RELOAD_AFTER, HUNG_RESTART_AFTER
|
||||
from voxip_kiosk.cdp import CDPError
|
||||
from voxip_kiosk.config import save_config
|
||||
from daynivo_kiosk.agent import Agent, HUNG_RELOAD_AFTER, HUNG_RESTART_AFTER
|
||||
from daynivo_kiosk.cdp import CDPError
|
||||
from daynivo_kiosk.config import save_config
|
||||
|
||||
|
||||
class Clock:
|
||||
|
||||
@@ -2,8 +2,8 @@ import json
|
||||
from pathlib import Path
|
||||
from urllib.parse import parse_qs, urlsplit
|
||||
|
||||
from voxip_kiosk import browser as b
|
||||
from voxip_kiosk.config import DEFAULTS
|
||||
from daynivo_kiosk import browser as b
|
||||
from daynivo_kiosk.config import DEFAULTS
|
||||
|
||||
XRANDR = """Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 7680 x 7680
|
||||
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
|
||||
|
||||
@@ -4,7 +4,7 @@ import stat
|
||||
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk import config as c
|
||||
from daynivo_kiosk import config as c
|
||||
|
||||
|
||||
def test_default_file_matches_defaults(paths):
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk import services
|
||||
from voxip_kiosk.cdp import CDPError
|
||||
from voxip_kiosk.config import save_config
|
||||
from voxip_kiosk.healthcheck import CDP_FAILURES_BEFORE_RESTART, DISPLAY_RETRY_AFTER, HealthCheck
|
||||
from daynivo_kiosk import services
|
||||
from daynivo_kiosk.cdp import CDPError
|
||||
from daynivo_kiosk.config import save_config
|
||||
from daynivo_kiosk.healthcheck import CDP_FAILURES_BEFORE_RESTART, DISPLAY_RETRY_AFTER, HealthCheck
|
||||
|
||||
|
||||
class World:
|
||||
|
||||
@@ -3,8 +3,8 @@ import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk import helper as h
|
||||
from voxip_kiosk.config import load_config
|
||||
from daynivo_kiosk import helper as h
|
||||
from daynivo_kiosk.config import load_config
|
||||
|
||||
|
||||
class Recorder:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk import netconfig as n
|
||||
from voxip_kiosk.validation import ValidationError
|
||||
from daynivo_kiosk import netconfig as n
|
||||
from daynivo_kiosk.validation import ValidationError
|
||||
|
||||
|
||||
def test_validate_static_ethernet():
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from voxip_kiosk import services, sysinfo
|
||||
from daynivo_kiosk import services, sysinfo
|
||||
|
||||
|
||||
def test_parse_throttled():
|
||||
|
||||
@@ -6,8 +6,8 @@ import tarfile
|
||||
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk import updater as u
|
||||
from voxip_kiosk.config import save_config
|
||||
from daynivo_kiosk import updater as u
|
||||
from daynivo_kiosk.config import save_config
|
||||
|
||||
API = u.RELEASE_API
|
||||
BASE = "https://git.example.nl/rothman/daynivo-kiosk-os/releases/download"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk import validation as v
|
||||
from daynivo_kiosk import validation as v
|
||||
|
||||
|
||||
@pytest.mark.parametrize("url", [
|
||||
|
||||
+5
-5
@@ -2,8 +2,8 @@ import json
|
||||
|
||||
import pytest
|
||||
|
||||
from voxip_kiosk.config import load_config
|
||||
from voxip_kiosk.web import auth
|
||||
from daynivo_kiosk.config import load_config
|
||||
from daynivo_kiosk.web import auth
|
||||
|
||||
from .conftest import PASSWORD, csrf_from, token
|
||||
|
||||
@@ -113,7 +113,7 @@ def test_password_change_invalidates_other_sessions(app, logged_in):
|
||||
|
||||
|
||||
def test_idle_session_expires(app, logged_in, monkeypatch):
|
||||
from voxip_kiosk.web import views
|
||||
from daynivo_kiosk.web import views
|
||||
|
||||
real = views.time.time
|
||||
monkeypatch.setattr(views.time, "time", lambda: real() + views.IDLE_TIMEOUT + 5)
|
||||
@@ -141,7 +141,7 @@ def test_public_clients_blocked(client, addr, allowed):
|
||||
|
||||
|
||||
def test_same_subnet_global_ipv6_allowed():
|
||||
from voxip_kiosk.web.security import client_allowed
|
||||
from daynivo_kiosk.web.security import client_allowed
|
||||
|
||||
assert client_allowed("2a02:a210:1:2::99", False, ["2a02:a210:1:2::5/64"])
|
||||
assert not client_allowed("2a02:a210:9:9::99", False, ["2a02:a210:1:2::5/64"])
|
||||
@@ -180,7 +180,7 @@ def test_pages_render(logged_in, path):
|
||||
|
||||
|
||||
def test_dashboard_masks_token(logged_in, paths):
|
||||
from voxip_kiosk.config import save_config
|
||||
from daynivo_kiosk.config import save_config
|
||||
|
||||
save_config(paths.config_file, {"url": "https://portal.example.nl/display/hal?token=supergeheimtoken99"})
|
||||
body = logged_in.get("/").get_data(as_text=True)
|
||||
|
||||
Reference in new issue
Block a user