diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff5bbea51..531950364 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: debian:unstable +image: debian:testing before_script: - export DEBIAN_FRONTEND=noninteractive diff --git a/actions/shadowsocks b/actions/shadowsocks index 1ade9ec33..21ebc62d1 100755 --- a/actions/shadowsocks +++ b/actions/shadowsocks @@ -7,12 +7,15 @@ Helper script for configuring Shadowsocks. import argparse import json import os +import subprocess import sys from plinth import action_utils from plinth.modules import shadowsocks -SHADOWSOCKS_CONFIG = '/etc/shadowsocks-libev/freedombox.json' +SHADOWSOCKS_CONFIG_SYMLINK = '/etc/shadowsocks-libev/freedombox.json' +SHADOWSOCKS_CONFIG_ACTUAL = \ + '/var/lib/private/shadowsocks-libev/freedombox/freedombox.json' def parse_arguments(): @@ -26,6 +29,11 @@ def parse_arguments(): subparsers.add_parser('merge-config', help='Merge JSON config from stdin with existing') + # Migrations + subparsers.add_parser( + 'migrate-1-2', + help='Move shadowsocks config file to a secure location') + subparsers.required = True return parser.parse_args() @@ -35,23 +43,25 @@ def subcommand_setup(_): # Only client socks5 proxy is supported for now. Disable the # server component. action_utils.service_disable('shadowsocks-libev') + if not os.path.islink(SHADOWSOCKS_CONFIG_SYMLINK): + os.symlink(SHADOWSOCKS_CONFIG_ACTUAL, SHADOWSOCKS_CONFIG_SYMLINK) -def subcommand_get_config(arguments): +def subcommand_get_config(_): """Read and print Shadowsocks configuration.""" try: - print(open(SHADOWSOCKS_CONFIG, 'r').read()) + print(open(SHADOWSOCKS_CONFIG_SYMLINK, 'r').read()) except Exception: sys.exit(1) -def subcommand_merge_config(arguments): +def subcommand_merge_config(_): """Configure Shadowsocks.""" config = sys.stdin.read() config = json.loads(config) try: - current_config = open(SHADOWSOCKS_CONFIG, 'r').read() + current_config = open(SHADOWSOCKS_CONFIG_SYMLINK, 'r').read() current_config = json.loads(current_config) except (OSError, json.JSONDecodeError): current_config = {} @@ -59,16 +69,20 @@ def subcommand_merge_config(arguments): new_config = current_config new_config.update(config) new_config = json.dumps(new_config, indent=4, sort_keys=True) + open(SHADOWSOCKS_CONFIG_SYMLINK, 'w').write(new_config) - # XXX: Config file with password is world-readable. This is the - # same as the default config file, but find a way to avoid this. - # See https://salsa.debian.org/freedombox-team/plinth/-/merge_requests/1724 - old_umask = os.umask(0o022) - try: - open(SHADOWSOCKS_CONFIG, 'w').write(new_config) - finally: - os.umask(old_umask) + action_utils.service_restart(shadowsocks.managed_services[0]) + +def subcommand_migrate_1_2(_): + """Move shadowsocks config file to a secure location.""" + if os.path.isfile(SHADOWSOCKS_CONFIG_SYMLINK): # ignoring symlinks + os.makedirs('/var/lib/private/shadowsocks-libev/freedombox/', + exist_ok=True) + os.replace(SHADOWSOCKS_CONFIG_SYMLINK, SHADOWSOCKS_CONFIG_ACTUAL) + os.symlink(SHADOWSOCKS_CONFIG_ACTUAL, SHADOWSOCKS_CONFIG_SYMLINK) + + subprocess.check_call(['systemctl', 'daemon-reload']) action_utils.service_restart(shadowsocks.managed_services[0]) diff --git a/actions/storage b/actions/storage index a3a11ef1e..508dc6d11 100755 --- a/actions/storage +++ b/actions/storage @@ -333,6 +333,9 @@ def subcommand_usage_info(_): def subcommand_validate_directory(arguments): """Validate a directory""" + if os.geteuid() == 0: + raise RuntimeError('You must not be root to run this command') + directory = arguments.path def part_exists(path): @@ -349,14 +352,15 @@ def subcommand_validate_directory(arguments): if not os.path.exists(directory): # doesn't exist print('ValidationError: 1') + return if not os.path.isdir(directory): # is not a directory print('ValidationError: 2') - if not os.access(directory, os.R_OK): + elif not os.access(directory, os.R_OK): # is not readable print('ValidationError: 3') - if arguments.check_writable or arguments.check_creatable: + elif arguments.check_writable or arguments.check_creatable: if not os.access(directory, os.W_OK): # is not writable print('ValidationError: 4') diff --git a/debian/changelog b/debian/changelog index 2f698ac70..6b648de8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,63 @@ +plinth (20.4) unstable; urgency=medium + + [ Thomas Vincent ] + * Translated using Weblate (French) + * Translated using Weblate (French) + + [ Sunil Mohan Adapa ] + * networks: Fixes for networks wizards + * avahi: Use generic app view + * privoxy: Use generic app view + * infinoted: Move views to a separate views module + * help: Rename views modules as 'views' + * networks: Rename views modules as 'views' + * diagnostics: Rename views modules, move utilities to main module + * backups: cosmetic: Rename .inc file to .html + * css: Merge responsive.css into main style file + * css: cosmetic: Rename plinth.css to main.css + * views: Don't send app to template context + * app: Fix showing app name in port forwarding information + * networks: Rename polkit JS authority rules file + * firewalld: Add polkit JS authority rules files + * networks: Show router wizard before Internet connection type wizard + * networks: Don't show router wizard if not behind a router + * networks: If topology wizard is skipped, skip router wizard too + * apache: Handle transition to php 7.4 + + [ Joseph Nuthalapati ] + * Translated using Weblate (Telugu) + * shadowsocks: Move user settings to state directory + + [ Veiko Aasa ] + * storage: Directory selection form improvements + * transmission: Allow one to submit download directory if it is creatable + * plinth: Increase sqlite busy timeout from default 5s to 30s + * upgrades: Clean apt cache every week + * apps: Do not show status block if service is running + * i2p: New style app page layout + * quassel: Fix unable to disable application without choosing a domain name + + [ Luis A. Arizmendi ] + * Translated using Weblate (Spanish) + + [ Nektarios Katakis ] + * networks: Add form for network topology + * networks: Add page for network topology form + * networks: First boot view for network topology wizard + * networks: First boot step for network topology wizard + * networks: Save networks topology type to DB + * networks: Update main networks page Internet connectivity section + + [ Michael Breidenbach ] + * Translated using Weblate (Swedish) + + [ James Valleroy ] + * ci: Switch to testing image + * locale: Update translation strings + * doc: Fetch latest manual + + -- James Valleroy Mon, 09 Mar 2020 20:01:44 -0400 + plinth (20.3~bpo10+1) buster-backports; urgency=medium * Rebuild for buster-backports. diff --git a/doc/manual/en/Apache_userdir.raw.xml b/doc/manual/en/Apache_userdir.raw.xml index 30ad42583..1d6a301b4 100644 --- a/doc/manual/en/Apache_userdir.raw.xml +++ b/doc/manual/en/Apache_userdir.raw.xml @@ -1 +1 @@ -
FreedomBox/Manual/Apache_userdir32019-02-27 00:08:57JamesValleroyremove wiki links22019-02-17 21:44:22MikkelKirkgaardNielsenrefer to ourselves as User websites, add basics table from new template12019-02-13 23:15:52MikkelKirkgaardNielsenadd draft page
User websites (userdir)
What is User websites?User websites is a module of the Apache webserver enabled to allow users defined in the FreedomBox system to expose a set of static files on the FreedomBox filesystem as a website to the local network and/or the internet according to the network and firewall setup. Application basicsCategory File sharing Available since version 0.9.4Upstream project website Upstream end user documentation
ScreenshotAdd when/if an interface is made for Plinth
Using User websitesThe module is always enabled and offers no configuration from the Plinth web interface. Currently its existence is not even visible in the Plinth web interface. Using the modules capability to serve documents requires just to place the documents in the designated directory in a Plinth user's home directory in the filesystem. This directory is: public_html Thus the absolute path for the directory of a user named fbx with home directory in /home/fbx will be /home/fbx/public_html. User websites will serve documents placed in this directory when requests for documents with the URI path "~fbx" are received. For the the example.org domain thus a request for the document example.org/~fbx/index.html will transfer the file in /home/fbx/public_html/index.html.
Using SFTP to create public_html and upload documentsTo be written Back to Features introduction or manual pages. InformationSupportContributeReportsPromoteOverview Hardware Live Help Where To Start Translate Calls Talks Features Vision Q&A Design To Do Releases Press Download Manual Code Contributors Blog FreedomBox for Communities FreedomBox Developer Manual HELP & DISCUSSIONS: Discussion Forum - Mailing List - #freedombox irc.debian.org | CONTACT Foundation | JOIN Project Next call: Saturday, March 14th at 14:00 UTC Latest news: Announcing Pioneer FreedomBox Kits - 2019-03-26 This page is copyright its contributors and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. CategoryFreedomBox
\ No newline at end of file +
FreedomBox/Manual/Apache_userdir62020-02-26 22:51:55JamesValleroyrephrase52020-02-26 22:50:33JamesValleroyPlinth -> FreedomBox42020-02-26 22:49:27JamesValleroysimply wording32019-02-27 00:08:57JamesValleroyremove wiki links22019-02-17 21:44:22MikkelKirkgaardNielsenrefer to ourselves as User websites, add basics table from new template12019-02-13 23:15:52MikkelKirkgaardNielsenadd draft page
User websites (userdir)
What is User websites?User websites is a module of the Apache webserver enabled to allow users defined in the FreedomBox system to expose a set of static files on the FreedomBox filesystem as a website to the local network and/or the internet according to the network and firewall setup. Application basicsCategory File sharing Available since version 0.9.4Upstream project website Upstream end user documentation
ScreenshotAdd when/if an interface is made for FreedomBox
Using User websitesThe module is always enabled and offers no configuration from the FreedomBox web interface. There is no configuration or status page shown for this module in the FreedomBox web interface. To serve documents, place the files in the designated directory in a FreedomBox user's home directory in the filesystem. This directory is: public_html Thus the absolute path for the directory of a user named fbx with home directory in /home/fbx will be /home/fbx/public_html. User websites will serve documents placed in this directory when requests for documents with the URI path "~fbx" are received. For the the example.org domain thus a request for the document example.org/~fbx/index.html will transfer the file in /home/fbx/public_html/index.html.
Using SFTP to create public_html and upload documentsTo be written Back to Features introduction or manual pages. InformationSupportContributeReportsPromoteOverview Hardware Live Help Where To Start Translate Calls Talks Features Vision Q&A Design To Do Releases Press Download Manual Code Contributors Blog FreedomBox for Communities FreedomBox Developer Manual HELP & DISCUSSIONS: Discussion Forum - Mailing List - #freedombox irc.debian.org | CONTACT Foundation | JOIN Project Next call: Saturday, March 14th at 14:00 UTC Latest news: Announcing Pioneer FreedomBox Kits - 2019-03-26 This page is copyright its contributors and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. CategoryFreedomBox
\ No newline at end of file diff --git a/doc/manual/en/freedombox-manual.raw.xml b/doc/manual/en/freedombox-manual.raw.xml index 1ff711f7a..86c850d1e 100644 --- a/doc/manual/en/freedombox-manual.raw.xml +++ b/doc/manual/en/freedombox-manual.raw.xml @@ -1153,13 +1153,13 @@ dd if=temp/usr/lib/u-boot/A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin of= Screenshot - Add when/if an interface is made for Plinth + Add when/if an interface is made for FreedomBox
Using User websites - The module is always enabled and offers no configuration from the Plinth web interface. Currently its existence is not even visible in the Plinth web interface. - Using the modules capability to serve documents requires just to place the documents in the designated directory in a Plinth user's home directory in the filesystem. + The module is always enabled and offers no configuration from the FreedomBox web interface. There is no configuration or status page shown for this module in the FreedomBox web interface. + To serve documents, place the files in the designated directory in a FreedomBox user's home directory in the filesystem. This directory is: public_html Thus the absolute path for the directory of a user named fbx with home directory in /home/fbx will be /home/fbx/public_html. User websites will serve documents placed in this directory when requests for documents with the URI path "~fbx" are received. For the the example.org domain thus a request for the document example.org/~fbx/index.html will transfer the file in /home/fbx/public_html/index.html.
@@ -10094,6 +10094,68 @@ wget https://www.thinkpenguin.com/files/ath9k_firmware_free-version/htc_7010.fw]
Release Notes The following are the release notes for each FreedomBox version. +
+ FreedomBox 20.4 (2020-03-09) + + + apache: Handle transition to php 7.4 + + + app: Fix showing app name in port forwarding information + + + apps: Do not show status block if service is running + + + i2p: New style app page layout + + + locale: Update translations for French, Telugu, Spanish, and Swedish + + + networks: Add first boot step for network topology wizard + + + networks: Add form for network topology + + + networks: Don't show router wizard if not behind a router + + + networks, firewall: Support newer version of policykit + + + networks: Fixes for networks wizards access and user experience + + + networks: If topology wizard is skipped, skip router wizard too + + + networks: Show router wizard before Internet connection type wizard + + + plinth: Increase sqlite busy timeout from default 5s to 30s + + + quassel: Fix unable to disable application without choosing a domain name + + + shadowsocks: Move user settings to state directory + + + storage: Directory selection form improvements + + + transmission: Allow to submit download directory if it is creatable + + + upgrades: Clean apt cache every week + + + views: Improve template security + + +
FreedomBox 20.3 (2020-02-24) diff --git a/doc/manual/es/Apache_userdir.raw.xml b/doc/manual/es/Apache_userdir.raw.xml index 9ba3f6da0..d76c6e8c4 100644 --- a/doc/manual/es/Apache_userdir.raw.xml +++ b/doc/manual/es/Apache_userdir.raw.xml @@ -1 +1 @@ -
es/FreedomBox/Manual/Apache_userdir42019-10-21 14:19:20fioddorCorrección menor32019-10-21 14:17:11fioddorCorrección menor22019-08-29 12:55:24fioddorCorrección menor12019-08-29 12:50:13fioddorSe crea la versión española.
Sitios Web de Usuario (User websites) (userdir)
¿Qué es User websites?User websites es un módulo del servidor web Apache habilitado para permitir a los usuarios definidos en el sistema FreedomBox exponer un conjunto de archivos del sistema de ficheros de FreedomBox como sitio web a la red local y/o a internet de acuerdo a la configuración de la red y el cortafuegos. Datos básicos de la aplicaciónCategoría Compartición de archivos Disponible desde la versión 0.9.4Sitio web del proyecto original Documentación original de usuario
Captura de pantallaAñadir cuando/si se crea un interfaz para Plinth
Usar User websitesEl módulo está siempre activado y no ofrece configuración desde el interfaz web de Plinth. Actualmente ni siquiera muestra que exista. Para servir documentos con el módulo solo se necesita poner los documentos en un subdirectorio designado /home/<un_usuario_de_plinth>/public_html. User websites servirá los documentos que haya en este directorio cuando se reciban peticiones con la URI ~<un_usuario_de_plinth>. Por tanto para un dominio ejemplo.org con un usuario pepe una petición ejemplo.org/~pepe/index.html transferirá el fichero /home/pepe/public_html/index.html.
Usar SFTP para crear public_html y subir archivosPendiente de redactar Volver a la descripción de Funcionalidades o a las páginas del manual. InformaciónSoporteContribuyeInformesPromueveIntroducción Hardware Ayuda en línea Dónde empezar Traduce Reuniones Charlas Funcionalidades Visión Preguntas y Respuestas Diseño Por hacer Releases Prensa Descargas Manual Codigo Fuente Contribuyentes Blog FreedomBox para Comunidades Manual del Desarrolador de FreedomBox AYUDA y DEBATES: Foro de Debate - Lista de Correo - #freedombox irc.debian.org | CONTACTO Fundación | PARTICIPA Proyecto Next call: Saturday, March 14th at 14:00 UTC Latest news: Announcing Pioneer FreedomBox Kits - 2019-03-26 Esta página está sujeta a copyright y sus autores la publican bajo la licencia pública Creative Commons Atribución-CompartirIgual 4.0 Internacional (CC BY-SA 4.0). CategoryFreedomBox
\ No newline at end of file +
es/FreedomBox/Manual/Apache_userdir52020-03-01 11:59:06fioddorSe alinea con la versión 06 en inglés del 26 de febrero de 202042019-10-21 14:19:20fioddorCorrección menor32019-10-21 14:17:11fioddorCorrección menor22019-08-29 12:55:24fioddorCorrección menor12019-08-29 12:50:13fioddorSe crea la versión española.
Sitios Web de Usuario (User websites) (userdir)
¿Qué es User websites?User websites es un módulo del servidor web Apache habilitado para permitir a los usuarios definidos en el sistema FreedomBox exponer un conjunto de archivos del sistema de ficheros de FreedomBox como sitio web a la red local y/o a internet de acuerdo a la configuración de la red y el cortafuegos. Datos básicos de la aplicaciónCategoría Compartición de archivos Disponible desde la versión 0.9.4Sitio web del proyecto original Documentación original de usuario
Captura de pantallaAñadir cuando/si se crea un interfaz para FreedomBox
Usar User websitesEl módulo está siempre activado y el interfaz web de FreedomBox no ofrece configuración ni página de estado para este módulo. Para servir documentos con el módulo solo se necesita poner los documentos en un subdirectorio designado /home/<un_usuario_de_plinth>/public_html. User websites servirá los archivos que haya en este directorio cuando se reciban peticiones con la URI ~<un_usuario_de_freedombox>. Por tanto para un dominio ejemplo.org con un usuario pepe una petición ejemplo.org/~pepe/index.html transferirá el fichero /home/pepe/public_html/index.html.
Usar SFTP para crear public_html y subir archivosPendiente de redactar Volver a la descripción de Funcionalidades o a las páginas del manual. InformaciónSoporteContribuyeInformesPromueveIntroducción Hardware Ayuda en línea Dónde empezar Traduce Reuniones Charlas Funcionalidades Visión Preguntas y Respuestas Diseño Por hacer Releases Prensa Descargas Manual Codigo Fuente Contribuyentes Blog FreedomBox para Comunidades Manual del Desarrolador de FreedomBox AYUDA y DEBATES: Foro de Debate - Lista de Correo - #freedombox irc.debian.org | CONTACTO Fundación | PARTICIPA Proyecto Next call: Saturday, March 14th at 14:00 UTC Latest news: Announcing Pioneer FreedomBox Kits - 2019-03-26 Esta página está sujeta a copyright y sus autores la publican bajo la licencia pública Creative Commons Atribución-CompartirIgual 4.0 Internacional (CC BY-SA 4.0). CategoryFreedomBox
\ No newline at end of file diff --git a/doc/manual/es/freedombox-manual.raw.xml b/doc/manual/es/freedombox-manual.raw.xml index 185c4eb7e..d1851f0ee 100644 --- a/doc/manual/es/freedombox-manual.raw.xml +++ b/doc/manual/es/freedombox-manual.raw.xml @@ -1028,14 +1028,13 @@ dd if=temp/usr/lib/u-boot/A20-OLinuXino-Lime2/u-boot-sunxi-with-spl.bin of= Captura de pantalla - Añadir cuando/si se crea un interfaz para Plinth + Añadir cuando/si se crea un interfaz para FreedomBox
Usar User websites - El módulo está siempre activado y no ofrece configuración desde el interfaz web de Plinth. Actualmente ni siquiera muestra que exista. - Para servir documentos con el módulo solo se necesita poner los documentos en un subdirectorio designado /home/<un_usuario_de_plinth>/public_html. - User websites servirá los documentos que haya en este directorio cuando se reciban peticiones con la URI ~<un_usuario_de_plinth>. Por tanto para un dominio ejemplo.org con un usuario pepe una petición ejemplo.org/~pepe/index.html transferirá el fichero /home/pepe/public_html/index.html. + El módulo está siempre activado y el interfaz web de FreedomBox no ofrece configuración ni página de estado para este módulo. Para servir documentos con el módulo solo se necesita poner los documentos en un subdirectorio designado /home/<un_usuario_de_plinth>/public_html. + User websites servirá los archivos que haya en este directorio cuando se reciban peticiones con la URI ~<un_usuario_de_freedombox>. Por tanto para un dominio ejemplo.org con un usuario pepe una petición ejemplo.org/~pepe/index.html transferirá el fichero /home/pepe/public_html/index.html.
Usar SFTP para crear public_html y subir archivos @@ -9976,6 +9975,68 @@ wget https://www.thinkpenguin.com/files/ath9k_firmware_free-version/htc_7010.fw]
Release Notes The following are the release notes for each FreedomBox version. +
+ FreedomBox 20.4 (2020-03-09) + + + apache: Handle transition to php 7.4 + + + app: Fix showing app name in port forwarding information + + + apps: Do not show status block if service is running + + + i2p: New style app page layout + + + locale: Update translations for French, Telugu, Spanish, and Swedish + + + networks: Add first boot step for network topology wizard + + + networks: Add form for network topology + + + networks: Don't show router wizard if not behind a router + + + networks, firewall: Support newer version of policykit + + + networks: Fixes for networks wizards access and user experience + + + networks: If topology wizard is skipped, skip router wizard too + + + networks: Show router wizard before Internet connection type wizard + + + plinth: Increase sqlite busy timeout from default 5s to 30s + + + quassel: Fix unable to disable application without choosing a domain name + + + shadowsocks: Move user settings to state directory + + + storage: Directory selection form improvements + + + transmission: Allow to submit download directory if it is creatable + + + upgrades: Clean apt cache every week + + + views: Improve template security + + +
FreedomBox 20.3 (2020-02-24) diff --git a/functional_tests/support/service.py b/functional_tests/support/service.py index 1ef4470a8..2ddbe5ef9 100644 --- a/functional_tests/support/service.py +++ b/functional_tests/support/service.py @@ -23,12 +23,12 @@ def get_service_module(service_name): def is_running(browser, service_name): interface.nav_to_module(browser, get_service_module(service_name)) - return len(browser.find_by_css('.running-status.active')) != 0 + return len(browser.find_by_id('service-not-running')) == 0 def is_not_running(browser, service_name): interface.nav_to_module(browser, get_service_module(service_name)) - return len(browser.find_by_css('.running-status.inactive')) != 0 + return len(browser.find_by_id('service-not-running')) != 0 def eventually(function, args=[], timeout=30): diff --git a/plinth/__init__.py b/plinth/__init__.py index 3e6e60614..9c3c1535d 100644 --- a/plinth/__init__.py +++ b/plinth/__init__.py @@ -3,4 +3,4 @@ Package init file. """ -__version__ = '20.3' +__version__ = '20.4' diff --git a/plinth/locale/bg/LC_MESSAGES/django.po b/plinth/locale/bg/LC_MESSAGES/django.po index 941b74df4..8b8dfcffe 100644 --- a/plinth/locale/bg/LC_MESSAGES/django.po +++ b/plinth/locale/bg/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-24 19:12-0500\n" +"POT-Creation-Date: 2020-03-09 19:13-0400\n" "PO-Revision-Date: 2019-10-12 14:52+0000\n" "Last-Translator: Nevena Mircheva \n" "Language-Team: Bulgarian