-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for building packages for the recording server #8788
Add support for building packages for the recording server #8788
Conversation
Just for clarification: The recording server only communicates with the Nextcloud instance, right? (In contrast to the HPB itself, which also communicates with the clients). So if NC and recording server can communicate internally, you would not need to expose the recording server externally, is that correct? |
And with the HPB iirc
Correct as per my assumptions |
Yes, both Nextcloud server and HPB.
Correct as well. In fact, given that it requires installing typical desktop software in a server system (like a web browser) I would firewall the recording server machine to allow access only to/from the Nextcloud server and the HPB (and maybe the STUN/TURN server, depending on the setup, although in general it should not be needed). |
Maybe we should add that as a recommendation or "best practice" or something. Docker-in-docker (dind) would be another alternative I could imagine. |
Of course, I intended to mention it in the setup instructions :-) |
e4f3e15
to
f044bce
Compare
Sigh... I rebased the branch but forgot to commit the documentation 🤦 Anyway, fixed now. Feel free to rebase, review and merge once #9120 is merged. |
9ee878f
to
21d4584
Compare
21d4584
to
34994b8
Compare
0da747c
to
5656d1b
Compare
stdeb supports setting SOURCE_DATE_EPOCH to have reproducible builds, so it is now set to the git timestamp of the recording directory for the recording server and the date of the root directory in the source Python package for the dependencies. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Installed files can not be renamed with the standard ".install" syntax; "dh-exec" needs to be used instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Rather than having to call "python3" and specify the module an executable to be called just as "nextcloud-talk-recording" was added for convenience. However, right now it is not possible to just specify a module to be loaded; as a function is needed to entry module is now wrapped in a function that is explicitly called for the executable and implicitly called when the module is loaded, thus keeping the previous behaviour. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The recording server does not need to be run as root, although it needs a home directory to store some Firefox and Pulseaudio related files (not explicitly created by the recording server but by the services themselves). Therefore a system user, which can not log in, but with a home directory, is used to run it. The systemd addon for dh is used when creating the package, so "dh_systemd_enable" and "dh_systemd_start" will be automatically called when building the package. Those helpers will take care of enabling and starting the service as needed when the package is installed. Nevertheless, as a custom ".postint" script is used "#DEBHELPER#" needs to be explicitly called to add the code of the helpers. Unfortunately the service is named "python3-nextcloud-talk-recording", just like the package, as renaming the service requires a "debian/rules" file with a content like: override_dh_installsystemd: dh_installsystemd --name=nextcloud-talk-recording but stdeb provides its own "debian/rules" files and there does not seem to be a way to extend/customize it. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The script creates one container for each supported distribution, installs the needed dependencies and then builds the packages. The recording server directory is mounted in the containers so the packages can be built in the "build" subdirectory of the actual recording server directory. In the containers the building is done as the owner of the recording server directory, so the built files are also owned by that user. For simplicity, and given that the containers are not expected to be used for anything else, the volume with the recording server is mounted as a direct child of the root directory (forgive me FSH for I have sinned). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The benchmark tool has a specific dependency (psutil) that is not required for the rest of the recording server. However, for simplicity, rather than splitting the benchmark in its own Python project and package its dependency and helper script is now included in the main project and package (the code was already there). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
By default stdeb prefixes the package name with "python3-". However, even if other Python modules could import the Python code of the recording server it is not designed as a library, it is an executable that happens to be written in Python, so to speak. Moreover, besides the Python code itself the package also includes a configuration file and a systemd service, which do not belong to "python3-" packages (there are also helper executable scripts, although those are allowed in "python3-" packages). Due to all that the package "python3-nextcloud-talk-recording" is now renamed to "nextcloud-talk-recording". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
5656d1b
to
2b3c9d0
Compare
Building the packages through |
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
793d2fd
to
4c3e06c
Compare
While referencing the documentation elsewhere I realized that the installation was described without having described first the machine that the recording server should be installed in. Due to that I moved the System setup introduction and the Hardware requirements to the beginning of the document. At the same time I am not fully convinced of the change, though, but I do not know why 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested after the latest changes, worked and generated the following files:
./ubuntu22.04/deb/python3-selenium_4.8.2-1~ubuntu22.04_all.deb
./ubuntu22.04/deb/python3-pulsectl_22.3.2-1~ubuntu22.04_all.deb
./ubuntu22.04/deb/nextcloud-talk-recording_0.1-1~ubuntu22.04_all.deb
./ubuntu22.04/deb/python3-certifi_2022.12.7-1~ubuntu22.04_all.deb
./ubuntu22.04/deb/python3-trio-websocket_0.9.2-1~ubuntu22.04_all.deb
./ubuntu20.04/deb/python3-selenium_4.8.2-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-urllib3_1.26.14-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/nextcloud-talk-recording_0.1-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-requests_2.25.0-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-certifi_2022.12.7-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-pulsectl_22.3.2-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-pyvirtualdisplay_3.0-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-trio-websocket_0.9.2-1~ubuntu20.04_all.deb
./ubuntu20.04/deb/python3-trio_0.21.0-1~ubuntu20.04_all.deb
./debian11/deb/python3-certifi_2022.12.7-1~debian11_all.deb
./debian11/deb/python3-pulsectl_22.3.2-1~debian11_all.deb
./debian11/deb/python3-trio_0.21.0-1~debian11_all.deb
./debian11/deb/python3-selenium_4.8.2-1~debian11_all.deb
./debian11/deb/nextcloud-talk-recording_0.1-1~debian11_all.deb
./debian11/deb/python3-trio-websocket_0.9.2-1~debian11_all.deb
./debian11/deb/python3-pyvirtualdisplay_3.0-1~debian11_all.deb
Also the changes made to the documentation make sense to me.
Then time to fixup |
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
78ea1f6
to
e6cd521
Compare
Requires #9120
🚧 TODO
author
)ffmpeg
orfirefox
)server.conf.in
as/etc/nextcloud-talk-recording/server.conf