From 3d8e128b75cce772509eefa9488c37621a52b89e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Mar 2026 11:32:08 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20python-=D0=BF?= =?UTF-8?q?=D0=B0=D0=BA=D0=B5=D1=82=D0=B0=20nextcloud.talk.recording=20?= =?UTF-8?q?=D0=B2=20f7cloud.talk.recording?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docker-compose/Dockerfile | 10 +++--- .../docs/encoders.md | 4 +-- .../docs/installation.md | 26 +++++++-------- .../packaging/Makefile | 30 +++++++++--------- opt/f7cloud-talk-recording-src/pyproject.toml | 10 +++--- .../talk/recording/BackendNotifier.py | 0 .../talk/recording/Benchmark.py | 4 +-- .../talk/recording/Config.py | 0 .../talk/recording/Participant.py | 0 .../recording/RecorderArgumentsBuilder.py | 2 +- .../talk/recording/Server.py | 2 +- .../talk/recording/Service.py | 0 .../talk/recording/__init__.py | 0 .../talk/recording/__main__.py | 0 .../BackendNotifier.cpython-312.pyc | Bin .../__pycache__/Config.cpython-312.pyc | Bin .../__pycache__/Participant.cpython-312.pyc | Bin .../RecorderArgumentsBuilder.cpython-312.pyc | Bin .../__pycache__/Server.cpython-312.pyc | Bin .../__pycache__/Service.cpython-312.pyc | Bin .../__pycache__/__init__.cpython-312.pyc | Bin .../__pycache__/__main__.cpython-312.pyc | Bin .../entry_points.txt | 4 +-- .../start-container.sh | 8 ++--- .../tests/ConfigTest.py | 2 +- .../tests/ServerTest.py | 2 +- 26 files changed, 52 insertions(+), 52 deletions(-) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/BackendNotifier.py (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/Benchmark.py (99%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/Config.py (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/Participant.py (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/RecorderArgumentsBuilder.py (98%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/Server.py (99%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/Service.py (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__init__.py (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__main__.py (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/BackendNotifier.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/Config.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/Participant.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/RecorderArgumentsBuilder.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/Server.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/Service.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/__init__.cpython-312.pyc (100%) rename opt/f7cloud-talk-recording-src/src/{nextcloud => f7cloud}/talk/recording/__pycache__/__main__.cpython-312.pyc (100%) diff --git a/opt/f7cloud-talk-recording-src/docker-compose/Dockerfile b/opt/f7cloud-talk-recording-src/docker-compose/Dockerfile index 741e00c..3555287 100644 --- a/opt/f7cloud-talk-recording-src/docker-compose/Dockerfile +++ b/opt/f7cloud-talk-recording-src/docker-compose/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get --assume-yes upgrade # Common dependencies RUN apt-get --assume-yes install software-properties-common -# nextcloud-talk-recording dependencies +# f7cloud.talk.recording dependencies RUN apt-get --assume-yes install ffmpeg pulseaudio python3-pip xvfb RUN pip3 install --upgrade requests @@ -30,10 +30,10 @@ RUN apt-get --assume-yes install chromium COPY ./docker-compose/wrap_chromium_binary /opt/bin/wrap_chromium_binary RUN /opt/bin/wrap_chromium_binary -# nextcloud-talk-recording config +# f7cloud.talk.recording config RUN useradd --create-home recording -COPY server.conf.in /etc/nextcloud-talk-recording/server.conf -RUN sed --in-place 's/#listen =.*/listen = 0.0.0.0:8000/' /etc/nextcloud-talk-recording/server.conf +COPY server.conf.in /etc/f7cloud.talk.recording/server.conf +RUN sed --in-place 's/#listen =.*/listen = 0.0.0.0:8000/' /etc/f7cloud.talk.recording/server.conf # Deploy recording server RUN mkdir --parents /tmp/recording @@ -48,4 +48,4 @@ RUN rm --recursive --force /tmp/recording # Switch user and start the recording server WORKDIR "/home/recording/" USER "recording" -CMD ["python3", "-m", "nextcloud.talk.recording", "--config", "/etc/nextcloud-talk-recording/server.conf"] +CMD ["python3", "-m", "f7cloud.talk.recording", "--config", "/etc/f7cloud.talk.recording/server.conf"] diff --git a/opt/f7cloud-talk-recording-src/docs/encoders.md b/opt/f7cloud-talk-recording-src/docs/encoders.md index 881df9e..01f14d2 100644 --- a/opt/f7cloud-talk-recording-src/docs/encoders.md +++ b/opt/f7cloud-talk-recording-src/docs/encoders.md @@ -22,7 +22,7 @@ Note that playing a video file may cause a CPU usage even higher than rendering ### Usage example -The different options accepted by the benchmark tool can be seen with `nextcloud-talk-recording-benchmark --help` (or, if the helper script is not available, directly with `python3 -m nextcloud.talk.recording.Benchmark --help`). +The different options accepted by the benchmark tool can be seen with `f7cloud.talk.recording-benchmark --help` (or, if the helper script is not available, directly with `python3 -m f7cloud.talk.recording.Benchmark --help`). Each run of the benchmark tool records a single video (or audio) file with the given options. Using a Bash script several runs can be batched to check the result of running different options. For example: ``` @@ -57,6 +57,6 @@ do # Split the input tuple on "," IFS="," read FFMPEG_OUTPUT_VIDEO FILENAME_SUFFIX <<< "${TEST}" # Run the test - nextcloud-talk-recording-benchmark --length 300 --ffmpeg-output-video "${FFMPEG_OUTPUT_VIDEO}" /tmp/recording/files/example.mkv /tmp/recording/files/test-"${FILENAME_SUFFIX}".webm + f7cloud.talk.recording-benchmark --length 300 --ffmpeg-output-video "${FFMPEG_OUTPUT_VIDEO}" /tmp/recording/files/example.mkv /tmp/recording/files/test-"${FILENAME_SUFFIX}".webm done ``` diff --git a/opt/f7cloud-talk-recording-src/docs/installation.md b/opt/f7cloud-talk-recording-src/docs/installation.md index 4c6146a..8acb5c6 100644 --- a/opt/f7cloud-talk-recording-src/docs/installation.md +++ b/opt/f7cloud-talk-recording-src/docs/installation.md @@ -19,8 +19,8 @@ Finally disk size will also depend on the number of simultaneous recordings, as ## Installation type * For customers pre-built packages are available, please refer to [the Nextcloud Talk Recording Server section of the portal](https://portal.nextcloud.com/article/Installation/Installation---Nextcloud-Talk-Recording-Server). -* For some GNU/Linux distributions the installation can be done through packages. Please see the [instructions to build packages](https://github.com/nextcloud/nextcloud-talk-recording/blob/main/docs/building.md). -* A ["manual" installation](https://github.com/nextcloud/nextcloud-talk-recording/blob/main/docs/installation.md#manual-installation) is required in all other cases. +* For some GNU/Linux distributions the installation can be done through packages. Please see the [instructions to build packages](https://github.com/nextcloud/f7cloud.talk.recording/blob/main/docs/building.md). +* A ["manual" installation](https://github.com/nextcloud/f7cloud.talk.recording/blob/main/docs/installation.md#manual-installation) is required in all other cases. ### Prerequisites @@ -68,15 +68,15 @@ In Debian and Ubuntu the built packages can be installed by first changing to th apt install ./*.deb ``` -Note that given that the packages do not belong to a repository it is not possible to just install `nextcloud-talk-recording`, as the other deb packages would not be taken into account if not explicitly given. +Note that given that the packages do not belong to a repository it is not possible to just install `f7cloud.talk.recording`, as the other deb packages would not be taken into account if not explicitly given. -Besides installing the recording server and its dependencies a _nextcloud-talk-recording_ user is created to run the recording server, and a systemd service is created to start the recording server when the machine boots. +Besides installing the recording server and its dependencies a _f7cloud.talk.recording_ user is created to run the recording server, and a systemd service is created to start the recording server when the machine boots. -Although it is possible to configure the recording server to use Chromium/Chrome instead of Firefox only Firefox is officially supported, so only Firefox is a dependency of the `nextcloud-talk-recording` package. In order to use Chromium/Chrome it needs to be manually installed. +Although it is possible to configure the recording server to use Chromium/Chrome instead of Firefox only Firefox is officially supported, so only Firefox is a dependency of the `f7cloud.talk.recording` package. In order to use Chromium/Chrome it needs to be manually installed. ### Manual installation -Please make sure you cloned the main branch of the [Nextcloud Talk Recording Server repository](https://github.com/nextcloud/nextcloud-talk-recording). Currently the recording server in the main branch is backwards compatible with previous Talk releases, so the latest version from the main branch is expected to be used. +Please make sure you cloned the main branch of the [Nextcloud Talk Recording Server repository](https://github.com/nextcloud/f7cloud.talk.recording). Currently the recording server in the main branch is backwards compatible with previous Talk releases, so the latest version from the main branch is expected to be used. The recording server has the following non-Python dependencies: - FFmpeg @@ -91,13 +91,13 @@ Those dependencies must be installed, typically using the package manager of the Then, the recording server and all its Python dependencies can be installed using Python pip. Note that the recording server is not available in the Python Package Index (PyPI); you need to manually clone the git repository and then install it from there: ``` -git clone https://github.com/nextcloud/nextcloud-talk-recording -python3 -m pip install "file://$(pwd)/nextcloud-talk-recording" +git clone https://github.com/nextcloud/f7cloud.talk.recording +python3 -m pip install "file://$(pwd)/f7cloud.talk.recording" ``` -The recording server does not need to be run as root (and it should not be run as root). It can be started as a regular user with `nextcloud-talk-recording --config {PATH_TO_THE_CONFIGURATION_FILE)` (or, if the helper script is not available, directly with `python3 -m nextcloud.talk.recording --config {PATH_TO_THE_CONFIGURATION_FILE)`. Nevertheless, please note that the user needs to have a home directory. +The recording server does not need to be run as root (and it should not be run as root). It can be started as a regular user with `f7cloud.talk.recording --config {PATH_TO_THE_CONFIGURATION_FILE)` (or, if the helper script is not available, directly with `python3 -m f7cloud.talk.recording --config {PATH_TO_THE_CONFIGURATION_FILE)`. Nevertheless, please note that the user needs to have a home directory. -You might want to configure a systemd service (or any equivalent service) to automatically start the recording server when the machine boots. The sources for the _.deb_ packages include a service file in _recording/packaging/nextcloud-talk-recording/debian/nextcloud-talk-recording.service_ that could be used as inspiration. +You might want to configure a systemd service (or any equivalent service) to automatically start the recording server when the machine boots. The sources for the _.deb_ packages include a service file in _recording/packaging/f7cloud.talk.recording/debian/f7cloud.talk.recording.service_ that could be used as inspiration. ## System setup @@ -105,7 +105,7 @@ Independently of how it was installed the recording server needs to be configure ### Recording server configuration -When the recording server is started through its systemd service the configuration will be loaded from `/etc/nextcloud-talk-recording/server.conf`. If `nextcloud-talk-recording` is directly invoked the configuration file to use can be set with `--config XXX`. +When the recording server is started through its systemd service the configuration will be loaded from `/etc/f7cloud.talk.recording/server.conf`. If `f7cloud.talk.recording` is directly invoked the configuration file to use can be set with `--config XXX`. The configuration file must be edited to set the Nextcloud servers that are allowed to use the recording server, as well as the credentials for the recording server to use the signaling servers of those Nextcloud servers. Please refer to the sections below for the details. @@ -236,7 +236,7 @@ It is typically one of the cases below: - The shared secret between the signaling server and the recording server (`internalsecret` in signaling sections) is not the same (`Authentication failed for signaling server` is shown in the logs of the recording server). - If the shared secret is not set to any value in the signaling server configuration file (`clients->internalsecret` in `/etc/nextcloud-spreed-signaling/server.conf`) the authentication is not even tried and the recording server is just rejected by the signaling server (`Internal clients are not supported by the signaling server, is \'internalsecret\' set in the signaling server configuration file?` is shown in the logs of the recording server). Note that if Talk < 22.0.0, < 21.1.0 or < 20.1.7 is used rather than that message a `selenium.common.exceptions.TimeoutException` is shown instead in the logs, but a timeout does not necessarily mean that the shared secret is not set. - The recording server was not able to connect to the signaling server. Both the logs of the recording server and the signaling server may provide some hints, although the problem is typically related to the firewall. -- The ffmpeg configuration is invalid (`recorder ended unexpectedly` is shown in the logs of the recording server; note that this error could appear in other (strange) cases too, like if ffmpeg crashes). The specific cause can be seen in the messages tagged as `nextcloud.talk.recording.Service.recorder`. +- The ffmpeg configuration is invalid (`recorder ended unexpectedly` is shown in the logs of the recording server; note that this error could appear in other (strange) cases too, like if ffmpeg crashes). The specific cause can be seen in the messages tagged as `f7cloud.talk.recording.Service.recorder`. ### The recording fails to be uploaded @@ -250,7 +250,7 @@ The recording server was not able to connect to Janus, the WebRTC gateway (or, i In some rare cases it can be related as well to the network topology and how the browsers handle WebRTC connections; in those cases changing the browser used to do the recordings may solve the issue. -To diagnose this problem and check which WebRTC candidates are being tried to establish the connection between the recording server and Janus it is possible to access the browser window being used to do a recording using `x11vnc`. It must be launched as the same user that started the X server, `nextcloud-talk-recording`. As that user does not have a login shell it needs to be specified when running `su`: `su - nextcloud-talk-recording --shell /bin/bash --command "x11vnc -rfbport 5900 -display :XXX"`, where `XXX` is the display number used by the X server used for the recording. Each recording has its own X server, so for simplicity it is recommended to test this when there is a single recording; in that case `-display :0` will typically connect to the expected X server. For extra security it would be recommended to tunnel the VNC connection through SSH. Please refer to `x11vnc` help. +To diagnose this problem and check which WebRTC candidates are being tried to establish the connection between the recording server and Janus it is possible to access the browser window being used to do a recording using `x11vnc`. It must be launched as the same user that started the X server, `f7cloud.talk.recording`. As that user does not have a login shell it needs to be specified when running `su`: `su - f7cloud.talk.recording --shell /bin/bash --command "x11vnc -rfbport 5900 -display :XXX"`, where `XXX` is the display number used by the X server used for the recording. Each recording has its own X server, so for simplicity it is recommended to test this when there is a single recording; in that case `-display :0` will typically connect to the expected X server. For extra security it would be recommended to tunnel the VNC connection through SSH. Please refer to `x11vnc` help. Once `x11vnc` is running a VNC viewer can be started in a different machine that has a graphic server and access to the recording server machine to see and interact with the browser window. The browser will be running in kiosk mode, so there will be no address bar nor menu. However, in the case of Firefox, the WebRTC candidates can be checked by first opening a new tab with `Ctrl+T` and then, in the new tab, "opening" the address bar with `Ctrl+L` and then typing `about:webrtc` to load the helper page with the WebRTC connections. diff --git a/opt/f7cloud-talk-recording-src/packaging/Makefile b/opt/f7cloud-talk-recording-src/packaging/Makefile index 2f5f077..b996c28 100644 --- a/opt/f7cloud-talk-recording-src/packaging/Makefile +++ b/opt/f7cloud-talk-recording-src/packaging/Makefile @@ -9,7 +9,7 @@ DEBIAN_VERSION ?= $(RELEASE)~$(OS_VERSION) BUILD_DIR ?= build/$(OS_VERSION) -NEXTCLOUD_TALK_RECORDING_VERSION := $(shell cd ../src && python3 -c "from nextcloud.talk.recording import __version__; print(__version__)") +NEXTCLOUD_TALK_RECORDING_VERSION := $(shell cd ../src && python3 -c "from f7cloud.talk.recording import __version__; print(__version__)") PULSECTL_VERSION := 22.3.2 PYVIRTUALDISPLAY_VERSION := 3.0 @@ -47,22 +47,22 @@ $(call build-deb-package,$(1),$(2),$$($(call timestamp-from-source-python-packag $(call copy-binary-deb-package,$(1),$(2),python3-$(3)) endef -build-packages-deb: build-packages-deb-nextcloud-talk-recording build-packages-deb-nextcloud-talk-recording-dependencies +build-packages-deb: build-packages-deb-f7cloud.talk.recording build-packages-deb-f7cloud.talk.recording-dependencies $(BUILD_DIR)/deb: mkdir --parents $(BUILD_DIR)/deb -build-packages-deb-nextcloud-talk-recording: $(BUILD_DIR)/deb/nextcloud-talk-recording_$(NEXTCLOUD_TALK_RECORDING_VERSION)-$(DEBIAN_VERSION)_all.deb -$(BUILD_DIR)/deb/nextcloud-talk-recording_$(NEXTCLOUD_TALK_RECORDING_VERSION)-$(DEBIAN_VERSION)_all.deb: | $(BUILD_DIR)/deb +build-packages-deb-f7cloud.talk.recording: $(BUILD_DIR)/deb/f7cloud.talk.recording_$(NEXTCLOUD_TALK_RECORDING_VERSION)-$(DEBIAN_VERSION)_all.deb +$(BUILD_DIR)/deb/f7cloud.talk.recording_$(NEXTCLOUD_TALK_RECORDING_VERSION)-$(DEBIAN_VERSION)_all.deb: | $(BUILD_DIR)/deb $(call build-source-python-package,$(BUILD_DIR),../) # Starting with setup tools 69.3 the name of the generated Python source # package is canonicalized based on PEP 625, so it becomes - # "nextcloud_talk_recording". The name of the Debian binary package is + # "f7cloud.talk.recording". The name of the Debian binary package is # not affected, so it is still matches the project name, - # "nextcloud-talk-recording". + # "f7cloud.talk.recording". - $(call extract-source-python-package,nextcloud_talk_recording,$(NEXTCLOUD_TALK_RECORDING_VERSION)) + $(call extract-source-python-package,f7cloud.talk.recording,$(NEXTCLOUD_TALK_RECORDING_VERSION)) # Add extra files needed to create Debian packages: # - debian/py3dist-overrides: Python dependencies to Debian dependencies for @@ -78,14 +78,14 @@ $(BUILD_DIR)/deb/nextcloud-talk-recording_$(NEXTCLOUD_TALK_RECORDING_VERSION)-$( # - stdeb.cfg: additional configuration for stdeb (not needed in the # regenerated Python package, as stdeb loads it before changing to the # uncompressed source Python package). - cp --recursive nextcloud-talk-recording/. $(BUILD_DIR)/nextcloud_talk_recording-$(NEXTCLOUD_TALK_RECORDING_VERSION)/ - cp ../server.conf.in $(BUILD_DIR)/nextcloud_talk_recording-$(NEXTCLOUD_TALK_RECORDING_VERSION)/ + cp --recursive f7cloud.talk.recording/. $(BUILD_DIR)/f7cloud.talk.recording-$(NEXTCLOUD_TALK_RECORDING_VERSION)/ + cp ../server.conf.in $(BUILD_DIR)/f7cloud.talk.recording-$(NEXTCLOUD_TALK_RECORDING_VERSION)/ # Build a source Debian package (with the systemd addon for dh) and then, # from it, a binary Debian package. - cd $(BUILD_DIR)/nextcloud_talk_recording-$(NEXTCLOUD_TALK_RECORDING_VERSION)/ && SOURCE_DATE_EPOCH=$$($(call timestamp-from-git,../../../../)) SETUPTOOLS_USE_DISTUTILS=stdlib python3 setup.py --command-packages=stdeb.command sdist_dsc --with-dh-systemd --debian-version $(DEBIAN_VERSION) bdist_deb + cd $(BUILD_DIR)/f7cloud.talk.recording-$(NEXTCLOUD_TALK_RECORDING_VERSION)/ && SOURCE_DATE_EPOCH=$$($(call timestamp-from-git,../../../../)) SETUPTOOLS_USE_DISTUTILS=stdlib python3 setup.py --command-packages=stdeb.command sdist_dsc --with-dh-systemd --debian-version $(DEBIAN_VERSION) bdist_deb - $(call copy-binary-deb-package,nextcloud_talk_recording,$(NEXTCLOUD_TALK_RECORDING_VERSION),nextcloud-talk-recording) + $(call copy-binary-deb-package,f7cloud.talk.recording,$(NEXTCLOUD_TALK_RECORDING_VERSION),f7cloud.talk.recording) # Builds the Python dependencies that are not included in at least one of the # Ubuntu supported releases: @@ -95,11 +95,11 @@ $(BUILD_DIR)/deb/nextcloud-talk-recording_$(NEXTCLOUD_TALK_RECORDING_VERSION)-$( # # requests < 2.25 is not compatible with urllib3 >= 1.26, which is required by # selenium. -build-packages-deb-nextcloud-talk-recording-dependencies: build-packages-deb-nextcloud-talk-recording-dependencies-$(OS_VERSION) +build-packages-deb-f7cloud.talk.recording-dependencies: build-packages-deb-f7cloud.talk.recording-dependencies-$(OS_VERSION) -build-packages-deb-nextcloud-talk-recording-dependencies-debian11: build-packages-deb-pulsectl build-packages-deb-pyvirtualdisplay build-packages-deb-selenium build-packages-deb-selenium-dependencies -build-packages-deb-nextcloud-talk-recording-dependencies-ubuntu20.04: build-packages-deb-pulsectl build-packages-deb-pyvirtualdisplay build-packages-deb-requests build-packages-deb-requests-dependencies build-packages-deb-selenium build-packages-deb-selenium-dependencies -build-packages-deb-nextcloud-talk-recording-dependencies-ubuntu22.04: build-packages-deb-pulsectl build-packages-deb-selenium build-packages-deb-selenium-dependencies +build-packages-deb-f7cloud.talk.recording-dependencies-debian11: build-packages-deb-pulsectl build-packages-deb-pyvirtualdisplay build-packages-deb-selenium build-packages-deb-selenium-dependencies +build-packages-deb-f7cloud.talk.recording-dependencies-ubuntu20.04: build-packages-deb-pulsectl build-packages-deb-pyvirtualdisplay build-packages-deb-requests build-packages-deb-requests-dependencies build-packages-deb-selenium build-packages-deb-selenium-dependencies +build-packages-deb-f7cloud.talk.recording-dependencies-ubuntu22.04: build-packages-deb-pulsectl build-packages-deb-selenium build-packages-deb-selenium-dependencies build-packages-deb-pulsectl: $(BUILD_DIR)/deb/python3-pulsectl_$(PULSECTL_VERSION)-$(DEBIAN_VERSION)_all.deb $(BUILD_DIR)/deb/python3-pulsectl_$(PULSECTL_VERSION)-$(DEBIAN_VERSION)_all.deb: | $(BUILD_DIR)/deb diff --git a/opt/f7cloud-talk-recording-src/pyproject.toml b/opt/f7cloud-talk-recording-src/pyproject.toml index 4d4a7f6..8758191 100644 --- a/opt/f7cloud-talk-recording-src/pyproject.toml +++ b/opt/f7cloud-talk-recording-src/pyproject.toml @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: AGPL-3.0-or-later [project] -name = "nextcloud-talk-recording" +name = "f7cloud.talk.recording" description = "Recording server for Nextcloud Talk" authors = [ { name = "Nextcloud Talk Team" }, @@ -34,14 +34,14 @@ dev = [ ] [project.urls] -repository = "https://github.com/nextcloud/nextcloud-talk-recording" +repository = "https://github.com/nextcloud/f7cloud.talk.recording" [project.scripts] -nextcloud-talk-recording = "nextcloud.talk.recording.__main__:main" -nextcloud-talk-recording-benchmark = "nextcloud.talk.recording.Benchmark:main" +f7cloud.talk.recording = "f7cloud.talk.recording.__main__:main" +f7cloud.talk.recording-benchmark = "f7cloud.talk.recording.Benchmark:main" [tool.setuptools.dynamic] -version = {attr = "nextcloud.talk.recording.__version__"} +version = {attr = "f7cloud.talk.recording.__version__"} [tool.pylint.basic] argument-naming-style = 'camelCase' diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/BackendNotifier.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/BackendNotifier.py similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/BackendNotifier.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/BackendNotifier.py diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Benchmark.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Benchmark.py similarity index 99% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Benchmark.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Benchmark.py index 6cf7df9..826b5a2 100644 --- a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Benchmark.py +++ b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Benchmark.py @@ -20,7 +20,7 @@ import psutil import pulsectl from pyvirtualdisplay import Display -from nextcloud.talk.recording import RECORDING_STATUS_AUDIO_AND_VIDEO, RECORDING_STATUS_AUDIO_ONLY +from f7cloud.talk.recording import RECORDING_STATUS_AUDIO_AND_VIDEO, RECORDING_STATUS_AUDIO_ONLY from .Config import Config from .RecorderArgumentsBuilder import RecorderArgumentsBuilder from .Service import newAudioSink, processLog @@ -152,7 +152,7 @@ class BenchmarkService: self._display.start() # Start new audio sink for the audio output of the player. - self._audioModuleIndex, audioSinkIndex, audioSourceIndex = newAudioSink("nextcloud-talk-recording-benchmark") + self._audioModuleIndex, audioSinkIndex, audioSourceIndex = newAudioSink("f7cloud.talk.recording-benchmark") audioSinkIndex = str(audioSinkIndex) audioSourceIndex = str(audioSourceIndex) diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Config.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Config.py similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Config.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Config.py diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Participant.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Participant.py similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Participant.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Participant.py diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/RecorderArgumentsBuilder.py similarity index 98% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/RecorderArgumentsBuilder.py index 43676db..be5e493 100644 --- a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/RecorderArgumentsBuilder.py +++ b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/RecorderArgumentsBuilder.py @@ -7,7 +7,7 @@ Module to get the arguments to start the recorder process. """ -from nextcloud.talk.recording import RECORDING_STATUS_AUDIO_AND_VIDEO +from f7cloud.talk.recording import RECORDING_STATUS_AUDIO_AND_VIDEO from .Config import config class RecorderArgumentsBuilder: diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Server.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Server.py similarity index 99% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Server.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Server.py index c74c0f9..0344150 100644 --- a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Server.py +++ b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Server.py @@ -22,7 +22,7 @@ from werkzeug.exceptions import BadRequest, Forbidden, NotFound from werkzeug.middleware.dispatcher import DispatcherMiddleware from nextcloud.talk import recording -from nextcloud.talk.recording import RECORDING_STATUS_AUDIO_AND_VIDEO +from f7cloud.talk.recording import RECORDING_STATUS_AUDIO_AND_VIDEO from .Config import config from .Service import Service diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Service.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Service.py similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/Service.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/Service.py diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__init__.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__init__.py similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__init__.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__init__.py diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__main__.py b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__main__.py similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__main__.py rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__main__.py diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/BackendNotifier.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/BackendNotifier.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/BackendNotifier.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/BackendNotifier.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Config.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Config.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Config.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Config.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Participant.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Participant.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Participant.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Participant.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/RecorderArgumentsBuilder.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/RecorderArgumentsBuilder.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/RecorderArgumentsBuilder.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/RecorderArgumentsBuilder.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Server.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Server.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Server.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Server.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Service.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Service.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/Service.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/Service.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/__init__.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/__init__.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/__init__.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/__init__.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/__main__.cpython-312.pyc b/opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/__main__.cpython-312.pyc similarity index 100% rename from opt/f7cloud-talk-recording-src/src/nextcloud/talk/recording/__pycache__/__main__.cpython-312.pyc rename to opt/f7cloud-talk-recording-src/src/f7cloud/talk/recording/__pycache__/__main__.cpython-312.pyc diff --git a/opt/f7cloud-talk-recording-src/src/nextcloud_talk_recording.egg-info/entry_points.txt b/opt/f7cloud-talk-recording-src/src/nextcloud_talk_recording.egg-info/entry_points.txt index b984b05..14dd6fe 100644 --- a/opt/f7cloud-talk-recording-src/src/nextcloud_talk_recording.egg-info/entry_points.txt +++ b/opt/f7cloud-talk-recording-src/src/nextcloud_talk_recording.egg-info/entry_points.txt @@ -1,3 +1,3 @@ [console_scripts] -nextcloud-talk-recording = nextcloud.talk.recording.__main__:main -nextcloud-talk-recording-benchmark = nextcloud.talk.recording.Benchmark:main +f7cloud.talk.recording = f7cloud.talk.recording.__main__:main +f7cloud.talk.recording-benchmark = f7cloud.talk.recording.Benchmark:main diff --git a/opt/f7cloud-talk-recording-src/start-container.sh b/opt/f7cloud-talk-recording-src/start-container.sh index f9253b6..8537e7b 100755 --- a/opt/f7cloud-talk-recording-src/start-container.sh +++ b/opt/f7cloud-talk-recording-src/start-container.sh @@ -178,9 +178,9 @@ if [ -z "$(docker ps --all --quiet --filter name="^/$CONTAINER$")" ]; then echo "Installing recording backend inside container" docker exec $CONTAINER python3 -m pip install file:///tmp/recording/ - echo "Copying configuration from server.conf.in to /etc/nextcloud-talk-recording/server.conf" - docker exec $CONTAINER mkdir --parent /etc/nextcloud-talk-recording/ - docker cp server.conf.in $CONTAINER:/etc/nextcloud-talk-recording/server.conf + echo "Copying configuration from server.conf.in to /etc/f7cloud.talk.recording/server.conf" + docker exec $CONTAINER mkdir --parent /etc/f7cloud.talk.recording/ + docker cp server.conf.in $CONTAINER:/etc/f7cloud.talk.recording/server.conf elif $CUSTOM_CONTAINER_OPTIONS; then # Environment variables are excluded from this warning. echo "WARNING: Using existing container, custom container options ignored" @@ -193,4 +193,4 @@ if [ -n "$(docker ps --all --quiet --filter status=exited --filter name="^/$CONT fi echo "Starting recording backend" -docker exec --tty --interactive --user recording $ENVIRONMENT_VARIABLES --workdir /home/recording $CONTAINER python3 -m nextcloud.talk.recording --config /etc/nextcloud-talk-recording/server.conf +docker exec --tty --interactive --user recording $ENVIRONMENT_VARIABLES --workdir /home/recording $CONTAINER python3 -m f7cloud.talk.recording --config /etc/f7cloud.talk.recording/server.conf diff --git a/opt/f7cloud-talk-recording-src/tests/ConfigTest.py b/opt/f7cloud-talk-recording-src/tests/ConfigTest.py index 954c1a1..18d0f1d 100644 --- a/opt/f7cloud-talk-recording-src/tests/ConfigTest.py +++ b/opt/f7cloud-talk-recording-src/tests/ConfigTest.py @@ -9,7 +9,7 @@ from ipaddress import ip_network import pytest -from nextcloud.talk.recording.Config import Config +from f7cloud.talk.recording.Config import Config class ConfigTest: diff --git a/opt/f7cloud-talk-recording-src/tests/ServerTest.py b/opt/f7cloud-talk-recording-src/tests/ServerTest.py index 074adef..7d85e3b 100644 --- a/opt/f7cloud-talk-recording-src/tests/ServerTest.py +++ b/opt/f7cloud-talk-recording-src/tests/ServerTest.py @@ -16,7 +16,7 @@ import pytest sys.modules['pulsectl'] = {} # pylint: disable=wrong-import-position -from nextcloud.talk.recording.Server import isAddressInNetworks, TrustedProxiesFix +from f7cloud.talk.recording.Server import isAddressInNetworks, TrustedProxiesFix @pytest.mark.parametrize('address, networks, expectedResult', [ ('192.168.57.42', [], False),