Compare commits

..

No commits in common. "d5062ef5eaaee4bee3863f0193ecdef870eea7ef" and "21694c5e991ee879d57ff5e54dbe2d015cc06938" have entirely different histories.

12 changed files with 81 additions and 97 deletions

View File

@ -16,7 +16,7 @@ RUN apt-get dist-upgrade -y
# Install freedombox package so that plint:plinth user/group are created etc.
RUN apt-get install -y freedombox/trixie-backports
RUN systemctl disable plinth.service
RUN systemctl mask plinth.service
# Don't ask for the secret in first wizard
RUN rm -f /var/lib/plinth/firstboot-wizard-secret

View File

@ -16,7 +16,8 @@
- apt-get update
- apt-get -y install make
- make provision-dev
- make wait-while-first-setup
- sudo -u plinth ./run --develop > plinth.log 2>&1 &
- while ! grep -q "Setup finished" plinth.log; do sleep 1; echo -n .; done
script:
- FREDOMBOX_URL=https://localhost FREEDOMBOX_SSH_PORT=22 FREEDOMBOX_SAMBA_PORT=445 pytest -v --durations=10 --include-functional --splinter-headless --instafail --template=html1/index.html --report=functional-tests.html
artifacts:

View File

@ -143,12 +143,12 @@ directory:
guest$ cd /freedombox
```
FreedomBox Service runs as plinth.service in the container. This service
restarts when it detects a change to the source code file. This provides a quick
feedback cycle during development. To watch service logs run:
Run the development version of FreedomBox Service in the container using the
following command. This command continuously deploys your code changes into the
container providing a quick feedback cycle during development.
```bash
guest$ sudo freedombox-logs
guest$ freedombox-develop
```
If you have changed any system configuration files during your development,
@ -156,8 +156,7 @@ you will need to run the following to install those files properly on to the
system and their changes to reflect properly.
```bash
guest$ sudo make build install ;
guest$ sudo systemctl restart plinth.service
guest$ sudo make build install
```
Note: This development container has automatic upgrades disabled by default.
@ -374,12 +373,13 @@ After logging into the virtual machine (VM), the source code is available in
vm$ cd /freedombox
```
FreedomBox Service runs as plinth.service in the virtual machine. This service
restarts when it detects a change to the source code file. This provides a quick
feedback cycle during development. To watch service logs run:
Run the development version of FreedomBox Service (Plinth) from your source
directory in the virtual machine using the following command. This command
continuously deploys your code changes into the virtual machine providing a
quick feedback cycle during development.
```bash
vm$ sudo freedombox-logs
vm$ freedombox-develop
```
If you have changed any system configuration files during your development,

View File

@ -161,16 +161,6 @@ Environment=PYTHONPATH=/freedombox/
endef
export DEVELOP_SERVICE_CONF
define DEVELOP_LOGS_SCRIPT
#!/usr/bin/bash
set -e
set -x
journalctl --follow --unit=plinth.service --unit=freedombox-privileged.service
endef
export DEVELOP_LOGS_SCRIPT
# Run basic setup for a developer environment (VM or container)
provision-dev:
# Install newer build dependencies if any
@ -180,15 +170,9 @@ provision-dev:
# Install latest code over .deb
$(MAKE) build install
# Configure privileged and web daemon for development setup
# Configure privileged daemon for development setup
mkdir -p /etc/systemd/system/freedombox-privileged.service.d/
echo "$$DEVELOP_SERVICE_CONF" > /etc/systemd/system/freedombox-privileged.service.d/develop.conf
mkdir -p /etc/systemd/system/plinth.service.d/
echo "$$DEVELOP_SERVICE_CONF" > /etc/systemd/system/plinth.service.d/develop.conf
# Create a command to easily watch service logs
echo "$$DEVELOP_LOGS_SCRIPT" > /usr/bin/freedombox-logs
chmod 755 /usr/bin/freedombox-logs
# Reload newer systemd units, ignore failure
-systemctl daemon-reload
@ -199,10 +183,6 @@ provision-dev:
-test -d /run/systemd/system && \
systemctl enable --now freedombox-privileged.socket
# Enable and restart plinth service if it is running
-systemctl enable plinth.service
-systemctl restart plinth.service
# Stop any ongoing upgrade, ignore failure
-killall -9 unattended-upgr
@ -227,12 +207,6 @@ provision-dev:
DEBIAN_FRONTEND=noninteractive apt-get install --yes ncurses-term \
sshpass bash-completion
wait-while-first-setup:
while [ x$$(curl -k https://localhost/plinth/status/ 2> /dev/null | \
json_pp 2> /dev/null | grep 'is_first_setup_running' | \
tr -d '[:space:]' | cut -d':' -f2 ) != 'xfalse' ] ; do \
sleep 1; echo -n .; done
.PHONY: \
build \
check \
@ -245,5 +219,4 @@ wait-while-first-setup:
configure \
install \
provision \
update-translations \
wait-while-first-setup
update-translations

View File

@ -62,7 +62,7 @@ See the [HACKING.md](https://salsa.debian.org/freedombox-team/freedombox/blob/ma
# Localization
[![Translation status](https://hosted.weblate.org/widget/freedombox/horizontal-auto.svg)](https://hosted.weblate.org/engage/freedombox/)
[![Translation status](https://hosted.weblate.org/widgets/freedombox/-/287x66-white.png)](https://hosted.weblate.org/engage/freedombox/?utm_source=widget)
# License

10
Vagrantfile vendored
View File

@ -24,13 +24,17 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell", inline: <<-SHELL
cd /freedombox/
make provision-dev
echo 'alias freedombox-develop="cd /freedombox; sudo -u plinth /freedombox/run --develop"' >> /home/vagrant/.bashrc
SHELL
config.vm.provision "tests", run: "never", type: "shell", path: "plinth/tests/functional/install.sh"
config.vm.post_up_message = "FreedomBox virtual machine is ready
for development. Plinth will be available at https://localhost:4430/plinth
(with an invalid SSL certificate). To watch logs:
for development. You can run the development version of Plinth using
the following command.
$ vagrant ssh
$ sudo freedombox-logs
$ freedombox-develop
Plinth will be available at https://localhost:4430/plinth (with
an invalid SSL certificate).
"
config.trigger.after [:up, :resume, :reload] do |trigger|

View File

@ -196,6 +196,9 @@ cd /freedombox/
sudo apt-get -y install make
sudo make provision-dev
echo 'alias freedombox-develop="cd /freedombox; sudo -u plinth /freedombox/run --develop"' \
>> /home/fbx/.bashrc
# Make some pytest related files and directories writable to the fbx user
sudo touch geckodriver.log
sudo chmod a+rw geckodriver.log
@ -238,7 +241,25 @@ fi
# Run the plinth server if functional tests are requested
if [[ "{pytest_command}" =~ "--include-functional" ]]
then
make -C /freedombox wait-while-first-setup
is_plinth_running=0
ps -ax -o cmd | grep -q "^sudo -u plinth /freedombox/run" && \
is_plinth_running=1
ps -ax -o cmd | grep -q "^/usr/bin/python3 /usr/bin/plinth" && \
is_plinth_running=1
if [[ $is_plinth_running -eq 1 ]]
then
echo "> In machine: Plinth is already running"
else
echo -n "> In machine: Starting plinth ... "
sudo -u plinth /freedombox/run --develop > plinth.log 2>&1 &
while ! grep -q "Setup finished" plinth.log
do
sleep 1
echo -n .
done
echo
fi
if [[ "{pytest_command}" != *"--splinter-headless"* ]]
then
@ -1053,7 +1074,7 @@ Folder overlay : (host, read-only){project_folder}
SSH easily : {script} ssh {options}
Run tests : {script} run-tests {options} [ --pytest-args ... ]
Watch FreedomBox logs : sudo freedombox-logs
Run FreedomBox inside : freedombox-develop
Web access : https://{ip_address}/
Ports access : Any port on {ip_address}

View File

@ -3,7 +3,6 @@
import argparse
import logging
import os
import sys
import threading
@ -122,8 +121,7 @@ def main():
arguments = parse_arguments()
cfg.read()
if arguments.develop or os.getenv('FREEDOMBOX_DEVELOP', '') == '1':
cfg.develop = True
if arguments.develop:
# Use the config in the current working directory
cfg.read_file(cfg.get_develop_config_path())

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: FreedomBox UI\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-07 00:04+0000\n"
"PO-Revision-Date: 2025-10-30 04:24+0000\n"
"PO-Revision-Date: 2025-10-27 16:02+0000\n"
"Last-Translator: Coucouf <coucouf@coucouf.fr>\n"
"Language-Team: French <https://hosted.weblate.org/projects/freedombox/"
"freedombox/fr/>\n"
@ -4784,14 +4784,13 @@ msgid ""
"gaming systems (such as PS3 and Xbox 360) or applications such as totem and "
"Kodi."
msgstr ""
"MiniDLNA est un serveur de médias simplifié qui vise une compatibilité "
"complète avec les clients DLNA et UPnP-AV. Le démon MiniDLNA est capable de "
"servir des fichiers de médias (musique, photos et vidéos) à des clients "
"réseau. DLNA/UPnP est un protocole sans configuration et est compatible avec "
"tout appareil ayant la certification DLNA comme les lecteurs portables, les "
"smartphones, les télévisions et les consoles de jeu "
"(comme la PS3 ou la Xbox 360) ainsi que les applications telles que Totem ou "
"Kodi."
"MiniDLNA est un serveur de médias simple ayant pour but dêtre entièrement "
"compatible avec les clients DLNA et UPnP-AV. Le démon MiniDLNA est capable "
"de servir des fichiers de médias (musique, photos et vidéos) à des clients "
"sur un réseau. DLNA/UPnP est un protocole sans configuration et est "
"compatible avec tout appareil ayant la certification DLNA comme les lecteurs "
"portables, les smartphones, les télévisions et les systèmes de jeu (comme la "
"PS3 ou la Xbox 360) ainsi que les applications telles que Totem ou Kodi."
#: plinth/modules/minidlna/__init__.py:45
msgid "MiniDLNA"
@ -10079,8 +10078,8 @@ msgid ""
"route all outgoing traffic from {box_name} through the VPN."
msgstr ""
"Il peut être utilisé pour se connecter à un fournisseur de réseau privé "
"virtuel VPN proposant un service WireGuard et router tout le trafic sortant "
"de la {box_name} à travers ce VPN."
"virtuel VPN proposant un service WireGuard, pour router tout le trafic "
"sortant de la {box_name} à travers ce VPN."
#: plinth/modules/wireguard/__init__.py:26
#, python-brace-format
@ -10089,10 +10088,10 @@ msgid ""
"travelling. While connected to a public Wi-Fi network, all traffic can be "
"securely relayed through {box_name}."
msgstr ""
"Une autre usage possible est de connecter un appareil mobile à votre "
"{box_name} pendant un déplacement. Même si votre appareil est connecté à un "
"réseau Wi-Fi public, tout votre trafic sera alors relayé via votre {box_name}"
" de manière sécurisée."
"Une autre utilisation possible est de connecter un appareil mobile à votre "
"{box_name} pendant un déplacement. Même si celui-ci est connecté à un réseau "
"Wi-Fi public, tout votre trafic sera alors relayé via votre {box_name} de "
"manière sécurisée."
#: plinth/modules/wireguard/forms.py:32
msgid "Invalid key."
@ -10110,12 +10109,12 @@ msgid ""
"Public key of the peer. Example: "
"MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
msgstr ""
"Clé publique du pair. Exemple : MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= "
"."
"Clé publique du serveur. Exemple : "
"MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
#: plinth/modules/wireguard/forms.py:70
msgid "Endpoint of the server"
msgstr "Point de terminaison du serveur"
msgstr "Point dentrée du serveur"
#: plinth/modules/wireguard/forms.py:71
msgid ""
@ -10134,12 +10133,12 @@ msgid ""
"Provided by the server operator, a long string of characters. Example: "
"MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
msgstr ""
"Il sagit dune longue chaîne de caractères fournie par lopérateur du "
"serveur. Par exemple : MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
"Fourni par le gestionnaire du serveur, il sagit dune longue chaîne de "
"caractères. Par exemple : MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
#: plinth/modules/wireguard/forms.py:82
msgid "Client IP address provided by server"
msgstr "Adresse IP du client fournie par le serveur"
msgstr "Adresse IP client fournie par le serveur"
#: plinth/modules/wireguard/forms.py:83
msgid ""
@ -10148,8 +10147,8 @@ msgid ""
"192.168.0.10."
msgstr ""
"Adresse IP attribuée à cette machine sur le réseau privé virtuel VPN une "
"fois connectée au serveur distant. Cette valeur est généralement fournie par "
"lopérateur du serveur. Par exemple : 192.18.0.10."
"fois connecté au serveur distant. Cette valeur est généralement fournie par "
"le gestionnaire du serveur. Par exemple : 192.18.0.10."
#: plinth/modules/wireguard/forms.py:89
msgid "Private key of this machine"
@ -10164,9 +10163,9 @@ msgid ""
msgstr ""
"Paramètre optionnel. De nouvelles clés privée/publique seront générées si ce "
"champ est laissé vide. La clé publique pourra ensuite être communiquée au "
"serveur. Il sagit de la méthode recommandée, même si certains opérateurs de "
"serveur insistent pour fournir eux même cette clé. Exemple : MConEJFIg6+"
"DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
"serveur. Il sagit de la méthode recommandée, même si certains gestionnaires "
"de serveur insistent pour fournir eux même cette clé. Exemple : "
"MConEJFIg6+DFHg2J1nn9SNLOSE9KR0ysdPgmPjibEs= ."
#: plinth/modules/wireguard/forms.py:98
msgid "Pre-shared key"
@ -10190,8 +10189,8 @@ msgstr "Utiliser cette connexion pour y envoyer tout le trafic sortant"
#: plinth/modules/wireguard/forms.py:107
msgid "Typically checked for a VPN service through which all traffic is sent."
msgstr ""
"À activer lorsque le service de réseau privé virtuel VPN doit être utilisé "
"pour envoyer tout le trafic."
"À activer en général pour un service de réseau privé virtuel VPN à travers "
"lequel tout le trafic est envoyé."
#: plinth/modules/wireguard/manifest.py:45
msgid "VPN client"
@ -10212,7 +10211,7 @@ msgstr "IP autorisées"
#: plinth/modules/wireguard/templates/wireguard.html:19
#: plinth/modules/wireguard/templates/wireguard.html:78
msgid "Last Connected Time"
msgstr "Dernière connexion"
msgstr "Date de dernière connexion"
#: plinth/modules/wireguard/templates/wireguard.html:38
#, python-format
@ -10246,7 +10245,7 @@ msgstr "En tant que client"
#: plinth/modules/wireguard/templates/wireguard.html:69
#, python-format
msgid "Servers that %(box_name)s will connect to:"
msgstr "Serveurs auxquels la %(box_name)s se connecte :"
msgstr "Serveurs auxquels la %(box_name)s va se connecter :"
#: plinth/modules/wireguard/templates/wireguard.html:76
#: plinth/modules/wireguard/templates/wireguard_delete_server.html:20
@ -10301,7 +10300,7 @@ msgstr "Clé publique du client :"
#: plinth/modules/wireguard/templates/wireguard_show_client.html:25
msgid "IP address to use for client:"
msgstr "Adresse IP à utiliser par le client :"
msgstr "Adresse IP à utiliser pour le client :"
#: plinth/modules/wireguard/templates/wireguard_show_client.html:29
#: plinth/modules/wireguard/templates/wireguard_show_server.html:32
@ -10310,7 +10309,7 @@ msgstr "Clé pré-partagée :"
#: plinth/modules/wireguard/templates/wireguard_show_client.html:33
msgid "Server endpoints:"
msgstr "Points de terminaisons du serveur :"
msgstr "Serveurs distants :"
#: plinth/modules/wireguard/templates/wireguard_show_client.html:41
#: plinth/modules/wireguard/templates/wireguard_show_server.html:28
@ -10330,7 +10329,7 @@ msgstr "Données reçues :"
#: plinth/modules/wireguard/templates/wireguard_show_client.html:61
#: plinth/modules/wireguard/templates/wireguard_show_server.html:60
msgid "Latest handshake:"
msgstr "Dernier établissement dune liaison (« handshake ») :"
msgstr "Dernier « handshake » :"
#: plinth/modules/wireguard/templates/wireguard_show_server.html:14
#, python-format

View File

@ -30,10 +30,9 @@ class FirstBootMiddleware(MiddlewareMixin):
if user_requests_login:
return
# Don't interfere with help or status pages
# Don't interfere with help pages
user_requests_help = request.path.startswith(reverse('help:index'))
user_requests_status = request.path.startswith(reverse('status'))
if user_requests_help or user_requests_status:
if user_requests_help:
return
# Don't interfere with first setup progress page. When first setup is

View File

@ -18,7 +18,6 @@ system_urlpatterns = [
urlpatterns = [
re_path(r'^$', views.index, name='index'),
re_path(r'^status/$', views.status, name='status'),
re_path(r'^language-selection/$',
public(views.LanguageSelectionView.as_view()),
name='language-selection'),

View File

@ -178,16 +178,6 @@ def index(request):
})
@public
def status(request):
"""Return the status of service in JSON format."""
status = {
'is_available': True,
'is_first_setup_running': setup.is_first_setup_running
}
return JsonResponse(status)
def _pick_menu_items(menu_items, selected_tags):
"""Return a sorted list of menu items filtered by tags."""