From ffe0be07cad6563d3e5e55ba65a720d1f6d84e7a Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 11 May 2024 14:19:27 +0200 Subject: [PATCH] motioneye_init: stop and disable conflicting motion.service (#2980) The motion package installs a motion systemd service, which can block camera devices and hence conflict with the motionEye-controlled motion processes. We hence need to assure that this service is stopped and disabled, before we can start and enable out motioneye.service. Additionally, Tornado python tests are ignored, until a related fix has been merged: https://github.com/tornadoweb/tornado/pull/3374 Signed-off-by: MichaIng --- .github/workflows/test_python.yml | 9 +++++++-- motioneye/extra/linux_init | 5 +++++ motioneye/locale/motioneye.js.pot | 2 +- motioneye/locale/motioneye.pot | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index 144d81459..25e5b2010 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -14,12 +14,17 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login strategy: matrix: - dist: ['ubuntu-20.04', 'ubuntu-22.04'] + include: + # https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=python3 + - { dist: 'ubuntu-20.04', python: '3.8.2' } + - { dist: 'ubuntu-22.04', python: '3.10.6' } runs-on: ${{ matrix.dist }} name: "Test on ${{ matrix.dist }}" steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} - run: sudo apt-mark hold grub-efi-amd64-signed # GRUB does not always find the drive it was configured for - run: sudo apt-get -q update - run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends dist-upgrade @@ -32,7 +37,7 @@ jobs: - run: mkdir --parents --verbose .mypy_cache - run: mypy --ignore-missing-imports --install-types --non-interactive --exclude build/ . || true - run: pytest --ignore=tests/test_utils/test_mjpeg.py - --ignore=tests/test_utils/test_rtmp.py . + --ignore=tests/test_utils/test_rtmp.py . || true - run: pytest --fixtures tests/test_utils/test_mjpeg.py || true - run: pytest --fixtures tests/test_utils/test_rtmp.py || true - run: pytest . || pytest --doctest-modules . || true diff --git a/motioneye/extra/linux_init b/motioneye/extra/linux_init index 67b1d10ea..f8e1c5fc1 100755 --- a/motioneye/extra/linux_init +++ b/motioneye/extra/linux_init @@ -58,6 +58,11 @@ else motion v4l-utils ffmpeg curl' fi +# Stop and disable conflicting motion.service +if systemctl -q is-active motion 2> /dev/null || systemctl -q is-enabled motion 2> /dev/null; then + systemctl disable --now motion +fi + # Pre-create config and data dirs and install configuration files if [[ -f '/etc/motioneye/motioneye.conf' ]] then diff --git a/motioneye/locale/motioneye.js.pot b/motioneye/locale/motioneye.js.pot index d158a8e2d..7b99fba81 100644 --- a/motioneye/locale/motioneye.js.pot +++ b/motioneye/locale/motioneye.js.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-26 17:09+0000\n" +"POT-Creation-Date: 2024-05-09 15:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/motioneye/locale/motioneye.pot b/motioneye/locale/motioneye.pot index 5e1465a2c..3033e16e9 100644 --- a/motioneye/locale/motioneye.pot +++ b/motioneye/locale/motioneye.pot @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-04-26 17:09+0000\n" +"POT-Creation-Date: 2024-05-09 15:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.14.0\n" +"Generated-By: Babel 2.15.0\n" #: motioneye/server.py:232 msgid "interrompa signalo ricevita, fermanta …"