freedombox Debian release 22.19

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmMNfBAACgkQd8DHXntl
 CAjYxA//fzeYNzKivFOLzkd8KrDkPbXSrbKgzIufOMqX8kq4q0/pIY4gSn4QxRjc
 q9gQHpoLe9OL4HRXbbF5S0O3HlpLRF4Y5U5c+uA45n+ikKQEeUec12bWjcODs+4k
 Qq4t6vAXTFvtL+hDdIAd4TEaZxJSu/FJLhZ5Oc//3bQtRfu7Wh9xchqjNWgkdBhV
 WjplEQHGFWB6KWrE0C/ZLDeCmuTY+YhNVR2+2HwIzJoIePWIeLrmmm9icAAmKJQR
 Ry2pLCo+AY8cnni+/H6gakxvxuydR50VGglOBZB5HKTNBIH+TZwhR8zdWNFqVovj
 eL/9naFJ/C4fysrHbGnZnotIIpL8fNc65WlsnH0EmVFR2Ew5gx6Ioo/gi6W16Zce
 PH94lJ5hyZQ/3PnurYkFG82CUGgyUj7UebHizeaDVKCVBjNiR/iUUw/uL96fkQgB
 CMNFe/byMhjOkcDXMKJTEiSPyTTKJ/SlJ/I75GoiZSiqH6byiBj4HhzHm3OBlTNJ
 2Jy3PSlMTxlQp2IJ3QY9wrox2w4fDqn9ygkH3N3FXq17rPTF+lTCAtVfMTaQbQLI
 AB9fqR7j8egzFPUWVAA2NlyE4sMh/Yck/afQM5nq6WQ2MFWzR+UkVeFl19dnffYb
 xxlI37L7tCb1s+aagjxBZ2fdYqOUZ3GCYxQrjAYfOqV95/kJki4=
 =KB2Q
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEfWrbdQ+RCFWJSEvmd8DHXntlCAgFAmMXGk0ACgkQd8DHXntl
 CAiEjhAAgxwW+gl/2UsNfsM8JcyFMufWfdZh2OGsI+yfx+NNSc3BW/zFM1eemXE5
 Dr46O/cMUqe3hg6tp+7SyldkdlyHTHlK/tso3O9hsaISEXB4hkvkEAizLmvxmFXh
 eVuS4zjCoGgrA66+cuv+JaatgZHdrDq8DjKi4LOKdTDOgFISBXBsSej7QAQW/uyT
 c4u/bKP/h++xXQTFouotAziX24uMgeFzLccCAHrTq7BxKS2WY8Hj0HPemBwN4ofO
 MCBO3SwKdHmN4Nf8LcqCF5yFzbZAxNrhqLr4VhNVg7KqZ53gqWtwkoSl7OxU8w8C
 5yeQV5EaQZcxPokhcErfMmVBWnlOMRI/rNXzSRySiww/yP0E1kBFRjuGNgdBT/yY
 F1DcFLiM8NhUqA0SdH3cs06cIXBml5HiGW/qeemQ+RL9GKU2BNBI+VnaQUc/ipOs
 GnVgC7nSRBt7XW2L29StKqxG/k/uYqQqhrrD88lw60Z5x59Yfz5PxOO6y4RVedbH
 i8ZxAUranAMVMvDjlRx4cfJPtMnEtqYfbAzvo/7lOzzwdPXOghv0XgzHp5ZYMNj6
 9aPcwCj2bS9tpoTfmCazmgPL5Kj1ckKY4WUgGWHVW5wX56Xc3jmJKgGqXGcDxgZB
 wewxit3YmG3+LprJg1h7xM7Od8N1e0/luy6JsS1ysy3iSxT9A+E=
 =mA0B
 -----END PGP SIGNATURE-----

Merge tag 'v22.19' into debian/bullseye-backports

freedombox Debian release 22.19

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy 2022-09-06 06:00:44 -04:00
commit 1a9c7b4d73
275 changed files with 33272 additions and 23099 deletions

View File

@ -16,7 +16,7 @@ code-quality:
stage: test
needs: []
script:
- python3 -m flake8 --exclude actions/domainname-change,actions/dynamicdns,actions/hostname-change,actions/networks plinth actions/*
- python3 -m flake8 --exclude actions/domainname-change,actions/dynamicdns,actions/hostname-change,actions/networks container plinth actions/*
unit-tests:
stage: test

View File

@ -162,16 +162,18 @@ def subcommand_setup(arguments):
# setup freedombox site
webserver.enable('freedombox', kind='config')
webserver.enable('freedombox-tls', kind='config')
# enable serving Debian javascript libraries
webserver.enable('javascript-common', kind='config')
# default sites
webserver.enable('000-default', kind='site')
webserver.disable('000-default', kind='site')
webserver.disable('default-tls', kind='site')
webserver.enable('default-ssl', kind='site')
webserver.enable('plinth', kind='site')
webserver.enable('plinth-ssl', kind='site')
webserver.disable('default-ssl', kind='site')
webserver.disable('plinth', kind='site')
webserver.disable('plinth-ssl', kind='site')
webserver.enable('freedombox-default', kind='site')
# TODO: Check that the (name, kind) is a managed by FreedomBox before

View File

@ -1,89 +0,0 @@
#!/usr/bin/python3
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Configuration helper for Cockpit.
"""
import argparse
from plinth import action_utils
from plinth.modules.cockpit import utils
def parse_arguments():
"""Return parsed command line arguments as dictionary."""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='subcommand', help='Sub command')
subparser = subparsers.add_parser('setup',
help='Setup Cockpit configuration')
subparser.add_argument('domain_names', nargs='*',
help='Domain names to be allowed')
subparser = subparsers.add_parser(
'add-domain',
help='Allow a new domain to be origin for Cockpit\'s WebSocket')
subparser.add_argument('domain_name', help='Domain name to be allowed')
subparser = subparsers.add_parser(
'remove-domain',
help='Disallow a new domain from being origin for Cockpit\'s '
'WebSocket')
subparser.add_argument('domain_name', help='Domain name to be removed')
subparsers.required = True
return parser.parse_args()
def subcommand_setup(arguments):
"""Setup Cockpit configuration."""
aug = utils.load_augeas()
origins = [
utils.get_origin_from_domain(domain)
for domain in arguments.domain_names
]
origins += ['https://localhost', 'https://localhost:4430']
_set_origin_domains(aug, origins)
aug.set('/files' + utils.CONFIG_FILE + '/WebService/UrlRoot', '/_cockpit/')
aug.save()
action_utils.service_restart('cockpit.socket')
def _set_origin_domains(aug, origins):
"""Set the list of allowed origin domains."""
aug.set('/files' + utils.CONFIG_FILE + '/WebService/Origins',
' '.join(origins))
def subcommand_add_domain(arguments):
"""Allow a new domain to be origin for Cockpit's WebSocket."""
aug = utils.load_augeas()
origins = utils.get_origin_domains(aug)
origins.add(utils.get_origin_from_domain(arguments.domain_name))
_set_origin_domains(aug, origins)
aug.save()
def subcommand_remove_domain(arguments):
"""Disallow a domain from being origin for Cockpit's WebSocket."""
aug = utils.load_augeas()
origins = utils.get_origin_domains(aug)
try:
origins.remove(utils.get_origin_from_domain(arguments.domain_name))
except KeyError:
pass
else:
_set_origin_domains(aug, origins)
aug.save()
def main():
"""Parse arguments and perform all duties."""
arguments = parse_arguments()
subcommand = arguments.subcommand.replace('-', '_')
subcommand_method = globals()['subcommand_' + subcommand]
subcommand_method(arguments)
if __name__ == '__main__':
main()

View File

@ -142,6 +142,28 @@ def parse_arguments():
def subcommand_setup(_):
"""Disable default Apache2 Gitweb configuration."""
action_utils.webserver_disable('gitweb')
if not _get_global_default_branch():
_set_global_default_branch('main')
def _get_global_default_branch():
"""Get globally configured default branch name."""
try:
default_branch = subprocess.check_output(
['git', 'config', '--global', '--get',
'init.defaultBranch']).decode().strip()
except subprocess.CalledProcessError as exception:
if exception.returncode == 1: # Default branch not configured
return None
raise
return default_branch
def _set_global_default_branch(name):
"""Configure default branch name globally."""
subprocess.check_call(
['git', 'config', '--global', 'init.defaultBranch', name])
def _clone_with_progress_report(url, repo_dir):

View File

@ -1,46 +0,0 @@
#!/usr/bin/python3
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Configuration helper for Janus server.
"""
import argparse
from plinth import action_utils
JANUS_CONF_PATH = '/etc/janus/janus.jcfg'
def parse_arguments():
"""Return parsed command line arguments as dictionary"""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='subcommand', help='Sub command')
subparsers.add_parser('setup', help='Configure Janus server')
subparsers.required = True
return parser.parse_args()
def subcommand_setup(_):
"""Configure Janus server."""
with open(JANUS_CONF_PATH, 'r', encoding='utf-8') as config_file:
config_lines = config_file.readlines()
with open(JANUS_CONF_PATH, 'w', encoding='utf-8') as config_file:
for line in config_lines:
if '#rtp_port_range' in line:
config_file.write("\trtp_port_range = \"50176-51199\"\n")
else:
config_file.write(line)
action_utils.service_try_restart('janus')
def main():
arguments = parse_arguments()
sub_command = arguments.subcommand.replace('-', '_')
sub_command_method = globals()['subcommand_' + sub_command]
sub_command_method(arguments)
if __name__ == '__main__':
main()

View File

@ -5,21 +5,19 @@ Wrapper to handle package installation with apt-get.
"""
import argparse
import inspect
import json
import logging
import os
import subprocess
import sys
from collections import defaultdict
from importlib import import_module
import apt.cache
import apt_inst
import apt_pkg
from plinth import app as app_module
from plinth import cfg
from plinth import module_loader
from plinth.action_utils import (apt_hold_freedombox, is_package_manager_busy,
run_apt_command)
from plinth.package import Packages
@ -48,11 +46,13 @@ def parse_arguments():
'--force-missing-configuration', action='store_true',
help='force installation of missing configuration files')
subparser.add_argument(
'module', help='name of module for which package is being installed')
'app_id', help='ID of app for which package is being installed')
subparser.add_argument('packages', nargs='+',
help='list of packages to install')
subparser = subparsers.add_parser('remove', help='remove the package(s)')
subparser.add_argument(
'app_id', help='ID of app for which package is being uninstalled')
subparser.add_argument('--packages', required=True,
help='List of packages to remove', nargs='+')
@ -76,7 +76,7 @@ def subcommand_update(arguments):
def subcommand_install(arguments):
"""Install packages using apt-get."""
try:
_assert_managed_packages(arguments.module, arguments.packages)
_assert_managed_packages(arguments.app_id, arguments.packages)
except Exception as exception:
print('Access check failed:', exception, file=sys.stderr)
sys.exit(99)
@ -109,29 +109,29 @@ def subcommand_install(arguments):
def subcommand_remove(arguments):
"""Remove apt package(s)."""
sys.exit(run_apt_command(['remove'] + arguments.packages))
"""Remove packages using apt-get."""
try:
_assert_managed_packages(arguments.app_id, arguments.packages)
except Exception as exception:
print('Access check failed:', exception, file=sys.stderr)
sys.exit(99)
subprocess.run(['dpkg', '--configure', '-a'], check=False)
with apt_hold_freedombox():
run_apt_command(['--fix-broken', 'install'])
returncode = run_apt_command(['remove'] + arguments.packages)
sys.exit(returncode)
def _assert_managed_packages(module, packages):
def _assert_managed_packages(app_id, packages):
"""Check that list of packages are in fact managed by module."""
cfg.read()
module_file = os.path.join(cfg.config_dir, 'modules-enabled', module)
with open(module_file, 'r', encoding='utf-8') as file_handle:
module_path = file_handle.read().strip()
module = import_module(module_path)
module_classes = inspect.getmembers(module, inspect.isclass)
app_classes = [
cls[1] for cls in module_classes if issubclass(cls[1], app_module.App)
]
module_loader.load_modules()
app_module.apps_init()
app = app_module.App.get(app_id)
managed_packages = []
for cls in app_classes:
app = cls()
components = app.get_components_of_type(Packages)
for component in components:
managed_packages += component.possible_packages
for component in app.get_components_of_type(Packages):
managed_packages += component.possible_packages + component.conflicts
for package in packages:
assert package in managed_packages

View File

@ -1,41 +0,0 @@
#!/usr/bin/python3
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Configuration helper for Privoxy server.
"""
import argparse
from plinth import action_utils
def parse_arguments():
"""Return parsed command line arguments as dictionary."""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='subcommand', help='Sub command')
subparsers.add_parser(
'pre-install',
help='Preseed debconf values before packages are installed')
subparsers.required = True
return parser.parse_args()
def subcommand_pre_install(_):
"""Preseed debconf values before packages are installed."""
action_utils.debconf_set_selections(
['privoxy privoxy/listen-address string [::]:8118'])
def main():
"""Parse arguments and perform all duties."""
arguments = parse_arguments()
subcommand = arguments.subcommand.replace('-', '_')
subcommand_method = globals()['subcommand_' + subcommand]
subcommand_method(arguments)
if __name__ == '__main__':
main()

View File

@ -40,8 +40,6 @@ def parse_arguments():
subparsers.add_parser('get-status', help='Get Tor status in JSON format')
configure = subparsers.add_parser('configure', help='Configure Tor')
configure.add_argument('--service', choices=['enable', 'disable'],
help='Configure Tor service')
configure.add_argument('--relay', choices=['enable', 'disable'],
help='Configure relay')
configure.add_argument('--bridge-relay', choices=['enable', 'disable'],
@ -57,6 +55,9 @@ def parse_arguments():
configure.add_argument('--upstream-bridges',
help='Set list of upstream bridges to use')
subparsers.add_parser('update-ports',
help='Update firewall ports based on what Tor uses')
subparsers.add_parser('restart', help='Restart Tor')
subparsers.required = True
@ -171,9 +172,6 @@ def subcommand_configure(arguments):
"""Configure Tor."""
aug = augeas_load()
if arguments.service == 'disable':
_disable()
_use_upstream_bridges(arguments.use_upstream_bridges, aug=aug)
if arguments.use_upstream_bridges == 'enable':
@ -190,15 +188,17 @@ def subcommand_configure(arguments):
elif arguments.hidden_service == 'disable':
_disable_hs(aug=aug)
if arguments.service == 'enable':
_enable()
if arguments.apt_transport_tor == 'enable':
_enable_apt_transport_tor()
elif arguments.apt_transport_tor == 'disable':
_disable_apt_transport_tor()
def subcommand_update_ports(_):
"""Update firewall ports based on what Tor uses."""
_update_ports()
def subcommand_restart(_):
"""Restart Tor."""
if (action_utils.service_is_enabled('tor@plinth', strict_check=True)

View File

@ -79,7 +79,8 @@ Pin-Priority: 500
DIST_UPGRADE_OBSOLETE_PACKAGES: List[str] = []
DIST_UPGRADE_PACKAGES_WITH_PROMPTS = [
'firewalld', 'mumble-server', 'radicale', 'roundcube-core', 'tt-rss'
'firewalld', 'janus', 'mumble-server', 'radicale', 'roundcube-core',
'tt-rss'
]
DIST_UPGRADE_PRE_INSTALL_PACKAGES = ['base-files']

View File

@ -177,7 +177,7 @@ sudo chmod --recursive --silent a+w htmlcov
sudo chmod --silent a+w .coverage
exit 0
'''
''' # noqa
SETUP_AND_RUN_TESTS_SCRIPT = '''
set -x
@ -257,19 +257,22 @@ systemd_version = None
def parse_arguments():
"""Return parsed command line arguments as dictionary."""
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
subparsers = parser.add_subparsers(dest='subcommand', help='Sub command')
distributions = list(URLS.keys())
distribution = os.environ.get('DISTRIBUTION')
formatter_class = argparse.ArgumentDefaultsHelpFormatter
default_distribution = 'testing'
if distribution and distribution in distributions:
default_distribution = distribution
# Up
subparser = subparsers.add_parser('up', help='Bring up the container')
subparser = subparsers.add_parser('up', help='Bring up the container',
formatter_class=formatter_class)
subparser.add_argument(
'--distribution', choices=distributions, default=default_distribution,
help='Distribution of the image to download and setup')
@ -278,20 +281,23 @@ def parse_arguments():
# Print IP address
subparser = subparsers.add_parser(
'ip', help='Print the IP address of the container.')
'ip', help='Print the IP address of the container.',
formatter_class=formatter_class)
subparser.add_argument(
'--distribution', choices=distributions, default=default_distribution,
help='Distribution of the container to print IP address')
# ssh
subparser = subparsers.add_parser('ssh', help='SSH into the container')
subparser = subparsers.add_parser('ssh', help='SSH into the container',
formatter_class=formatter_class)
subparser.add_argument('--distribution', choices=distributions,
default=default_distribution,
help='Distribution of the container to SSH into')
# Run tests
subparser = subparsers.add_parser('run-tests',
help='Run tests in the container')
help='Run tests in the container',
formatter_class=formatter_class)
subparser.add_argument('--distribution', choices=distributions,
default=default_distribution,
help='Distribution of the container to run tests')
@ -300,25 +306,33 @@ def parse_arguments():
help='Additional arguments to pass to the pytest command')
# Stop
subparser = subparsers.add_parser('stop', help='Stop the container')
subparser = subparsers.add_parser('stop', help='Stop the container',
formatter_class=formatter_class)
subparser.add_argument('--distribution', choices=distributions,
default=default_distribution,
help='Distribution of the container to stop')
# Destroy
subparser = subparsers.add_parser('destroy',
help='Destroy the container image')
help='Destroy the container image',
formatter_class=formatter_class)
subparser.add_argument('--distribution', choices=distributions,
default=default_distribution,
help='Distribution of the image to delete')
# Update
subparser = subparsers.add_parser(
'update', help='Update the container image to the latest version')
'update', help='Update the container image to the latest version',
formatter_class=formatter_class)
subparser.add_argument('--distribution', choices=distributions,
default=default_distribution,
help='Distribution of the image to update')
# Display help message when no args are passed
if len(sys.argv) == 1:
parser.print_help()
sys.exit()
return parser.parse_args()
@ -917,8 +931,8 @@ def _get_ssh_command(ip_address, distribution):
return [
'ssh', '-Y', '-C', '-t', '-i',
str(public_key), '-o', 'LogLevel=error', '-o',
'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null',
f'fbx@{ip_address}'
'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', '-o',
'IdentitiesOnly=yes', f'fbx@{ip_address}'
]

View File

@ -1,18 +1,17 @@
##
## When enabled allows only SSL traffic onto Plinth. This is done by
## redirecting non-secure traffic to secure traffic. The redirect is
## permanent as recommended in:
## http://tools.ietf.org/html/rfc6797#section-7
## Allow only TLS traffic onto FreedomBox service. This is done by redirecting
## non-secure traffic to secure traffic. The redirect is permanent as
## recommended in: http://tools.ietf.org/html/rfc6797#section-7
##
## Requires the following Apache modules to be enabled:
## mod_rewrite
## mod_ssl
##
<Location /plinth>
<LocationMatch "^/(plinth|freedombox)">
RewriteEngine on
# Don't redirect for onion sites as it is not needed and leads to
# unnecessary warning.
RewriteCond %{HTTP_HOST} !^.*\.onion$ [NC]
ReWriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</Location>
</LocationMatch>

View File

@ -44,7 +44,6 @@
## other services.
##
RedirectMatch "^/$" "/plinth"
RedirectMatch "^/freedombox" "/plinth"
##
## Disable sending Referer (sic) header from FreedomBox web interface to
@ -79,10 +78,38 @@ RedirectMatch "^/freedombox" "/plinth"
## Disable browser guessing of MIME types. FreedoBox already sets good content
## types for all the common file types.
##
<Location /plinth>
<LocationMatch "^/(plinth|freedombox)">
Header set Referrer-Policy 'same-origin'
Header set Content-Security-Policy "font-src 'self'; frame-src 'none'; img-src 'self'; manifest-src 'none'; media-src 'none'; object-src 'none'; script-src 'self'; style-src 'self'; worker-src 'self'; default-src 'self'; base-uri 'none'; sandbox allow-scripts allow-popups allow-forms allow-same-origin allow-downloads; form-action 'self'; frame-ancestors 'none'; block-all-mixed-content;"
Header set X-Content-Type-Options 'nosniff'
</LocationMatch>
##
## On all sites, provide FreedomBox on a default path: /plinth
##
## Requires the following Apache modules to be enabled:
## mod_headers
## mod_proxy
## mod_proxy_http
##
<Location /freedombox>
ProxyPass http://127.0.0.1:8000/plinth
## Send the scheme from user's request to enable Plinth to redirect
## URLs, set cookies, set absolute URLs (if any) properly.
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
## Ignore any X-FORWARDED-FOR headers sent by the client and their
## proxies. Apache will still set this header with the remote
## address of the client. Apache is the first and only trusted entry
## point for FreedomBox. Any code that does not deal with this
## header properly will remain safe. For example:
## https://github.com/jazzband/django-axes/issues/286
RequestHeader unset X-Forwarded-For
</Location>
<Location /plinth>
ProxyPass http://127.0.0.1:8000/plinth
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
RequestHeader unset X-Forwarded-For
</Location>
##
@ -102,3 +129,20 @@ RedirectMatch "^/freedombox" "/plinth"
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>
##
## Send all logs to systemd journal by default. This may be overridden per host
## in <VirtualHost>. With all system logs in journald, it is possible to turn
## off persistent logging to improve SD card lifetime and performance. It is
## also easy to improve privacy by turning off logging altogether.
##
## - To obtain the old style access log run the following command (note that the
## first field is the name of the virtual host accessed as Apache format logged
## is vhost_combined):
## journalctl --identifier apache-access --output cat > access.log
##
## - To obtain the old style error log run the following command:
## journalctl --identifier apache-error --output cat > error.log
##
ErrorLog "|/usr/bin/systemd-cat --identifier=apache-error"
CustomLog "|/usr/bin/systemd-cat --identifier=apache-access" vhost_combined

View File

@ -0,0 +1,35 @@
## SPDX-License-Identifier: AGPL-3.0-or-later
##
## DO NOT EDIT. If you do, FreedomBox will not automatically upgrade.
##
## Apache configuration managed by FreedomBox. If customization is needed,
## create a new configuration file with higher priority and override directives.
##
## Default apache sites default.conf and 000-default-ssl.conf will be disabled
## for the sake of the following configuration. This is primarily to override
## the logging directives (to allow default values to prevail).
##
# Keep this in sync with apache default 000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
</VirtualHost>
# Keep this in sync with apache default default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<FilesMatch "\.(?:cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>

View File

@ -1,22 +0,0 @@
##
## On all sites, provide Plinth on a default path: /plinth
##
## Requires the following Apache modules to be enabled:
## mod_headers
## mod_proxy
## mod_proxy_http
##
<Location /plinth>
ProxyPass http://127.0.0.1:8000/plinth
## Send the scheme from user's request to enable Plinth to redirect
## URLs, set cookies, set absolute URLs (if any) properly.
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
## Ignore any X-FORWARDED-FOR headers sent by the client and their
## proxies. Apache will still set this header with the remote
## address of the client. Apache is the first and only trusted entry
## point for FreedomBox. Any code that does not deal with this
## header properly will remain safe. For example:
## https://github.com/jazzband/django-axes/issues/286
RequestHeader unset X-Forwarded-For
</Location>

221
debian/changelog vendored
View File

@ -1,3 +1,224 @@
freedombox (22.19) unstable; urgency=medium
[ James Valleroy ]
* debian: Update Spanish translation template (Closes: #1017452)
* avahi: Don't disable after tests
* ejabberd: Set hostname for test that relies on it
* upgrades: Add button to test dist-upgrade in development mode
* Translated using Weblate (French)
* janus: Convert action to privileged
* janus: Handle upgrades to 1.0.*
* upgrades: Hold janus during dist-upgrade
* locale: Update translation strings
* doc: Fetch latest manual
[ Joseph Nuthalapati ]
* tests: Make functional.is_available check faster
[ nautilusx ]
* Translated using Weblate (German)
[ Maxime Leroy ]
* Translated using Weblate (French)
[ Burak Yavuz ]
* Translated using Weblate (Turkish)
[ Eric ]
* Translated using Weblate (Chinese (Simplified))
[ Andrij Mizyk ]
* Translated using Weblate (Ukrainian)
[ 109247019824 ]
* Translated using Weblate (Bulgarian)
[ Fioddor Superconcentrado ]
* Translated using Weblate (Spanish)
[ Jiří Podhorecký ]
* Translated using Weblate (Czech)
[ nbenedek ]
* ttrss: add donation url
* d/control: Break ufw as we use firewalld
[ Veiko Aasa ]
* container: Display help message when no args are passed
* container: Show default values in command help
[ Hugel ]
* Translated using Weblate (Chinese (Simplified))
[ Sunil Mohan Adapa ]
* operation: Factor out template code into a separate file
* operation: Show operations on app page in addition to setup page
* package: Implement low-level methods for uninstalling
* forms: Implement form for uninstallation
* setup: Drop check for already running operation
* app: Add API to uninstall an app
* package: Implement uninstall in Package component
* setup: Implement operation to uninstall an app
* views: Implement a view to uninstall an app
* app: Add a menu item to trigger uninstallation
* tests: functional: Add install/uninstall test for all apps
* backups: Use AppView for the main app page
* diagnostics: Use AppView for app page
* names: Use AppView for app page
* networks: Use AppView for app page
* power: Use AppView for app page
* security: Use AppView for app page
* snapshot: Use AppView for app page
* letsencrypt: Use AppView for app page
* tor: Use AppView and Operation for app page
* jsxc: Allow disabling the app
-- James Valleroy <jvalleroy@mailbox.org> Mon, 29 Aug 2022 22:33:54 -0400
freedombox (22.18) unstable; urgency=medium
[ Maxime Leroy ]
* Translated using Weblate (French)
[ ikmaak ]
* Translated using Weblate (Dutch)
[ Burak Yavuz ]
* Translated using Weblate (Turkish)
[ Jiří Podhorecký ]
* Translated using Weblate (Czech)
* Translated using Weblate (Czech)
[ 109247019824 ]
* Translated using Weblate (Bulgarian)
[ nautilusx ]
* Translated using Weblate (German)
[ Andrij Mizyk ]
* Translated using Weblate (Ukrainian)
[ James Valleroy ]
* networks: Remove DNSSEC diagnostics
* locale: Update translation strings
* doc: Fetch latest manual
[ Cosmin Humeniuc ]
* container: Add IdentitiesOnly option to SSH
[ Veiko Aasa ]
* container: Ignore flake8 error 'line too long' in bash script text
* storage: Fix enumerating partitions without mount points
[ Sunil Mohan Adapa ]
* coturn: Fix link to ejabberd in description
* notification: Pass full context when rendering body template
* package: Run installation operation using app_id instead of module
* operation: Add module to manage threaded operations
* *: Make setup method part of App class for all apps
* *: Add setup method on all apps that don't have it
* *: Make force upgrading part of app rather than a module
* app: Drop optimization that skips setup process
* setup: Fix issue with immediate refresh after installation
* *: Drop module level app property
* setup: Drop setup_helper and use the new Operation API
* setup: Allow starting installation when package manager is busy
* backups: tests: Mark need for Django database during API tests
* matrixsynapse: Fix showing the status messages
* ejabberd: Fix showing the status messages
* ssh: tests: functional: Keep service enabled after tests
* sharing: tests: functional: Fix a flaky test by waiting
* sharing: Add installing and enable/disable like other apps
* wireguard: Fix module.app usage that is no longer available
* doc: dev: Document previously undocumented components
-- James Valleroy <jvalleroy@mailbox.org> Mon, 15 Aug 2022 20:54:46 -0400
freedombox (22.17) unstable; urgency=medium
[ ikmaak ]
* Translated using Weblate (German)
* Translated using Weblate (Dutch)
[ Burak Yavuz ]
* Translated using Weblate (Turkish)
[ Eric ]
* Translated using Weblate (Chinese (Simplified))
[ Maxime Leroy ]
* Translated using Weblate (French)
[ nbenedek ]
* wordpress: Don't install php-ssh2
[ James Valleroy ]
* help: Add "How can I help?" section to Contribute page
* locale: Update translation strings
* doc: Fetch latest manual
[ Sunil Mohan Adapa ]
* help: Update test for contribute view
* help: tests: Fix about page test by mocking version calls
-- James Valleroy <jvalleroy@mailbox.org> Mon, 01 Aug 2022 21:01:41 -0400
freedombox (22.16) unstable; urgency=medium
[ Eric ]
* Translated using Weblate (Chinese (Simplified))
[ Andrij Mizyk ]
* Translated using Weblate (Ukrainian)
[ 109247019824 ]
* Translated using Weblate (Bulgarian)
* Translated using Weblate (Bulgarian)
* Translated using Weblate (Bulgarian)
* Translated using Weblate (Bulgarian)
[ Maxime Leroy ]
* Translated using Weblate (French)
* Translated using Weblate (French)
[ Nikita Epifanov ]
* Translated using Weblate (Russian)
* Translated using Weblate (Russian)
[ Sunil Mohan Adapa ]
* cockpit: Depend on apache and setup after it
* privoxy: Use privileged decorator for actions
* cockpit: Reconfigure to allow any origin
* cockpit: Use decorator for privileged actions
* rssbridge: Whitelist all bridges by default
* rssbridge: Add functional tests
* apache: Merge old configuration files into a better location
* apache: Also configure to serve on /freedombox
* apache: Redirect all logs to systemd journal
* config: Add option to set logging mode: none/volatile/persistent
* config: Set volatile logging by default
* roundcube: Configure to log to journald
* roundcube: Use privileged to simplify actions
[ nbenedek ]
* privoxy: Restrict to private IPs, prevent access over the internet
* rssbridge: New app to generate RSS feeds for websites
* roundcube: Add fail2ban jail
[ Veiko Aasa ]
* gitweb: Switch default branch name to main for new repositories
[ James Valleroy ]
* janus: Change short description to "Video Room"
* rssbridge: Fix flake8 errors
* debian: Update copyright year
* debian: Follows policy version 4.6.1
* locale: Update translation strings
* doc: Fetch latest manual
-- James Valleroy <jvalleroy@mailbox.org> Mon, 18 Jul 2022 20:50:09 -0400
freedombox (22.15~bpo11+1) bullseye-backports; urgency=medium
* Rebuild for bullseye-backports.

4
debian/control vendored
View File

@ -50,7 +50,7 @@ Build-Depends:
sshpass,
xmlto,
xsltproc
Standards-Version: 4.6.0
Standards-Version: 4.6.1
Homepage: https://salsa.debian.org/freedombox-team/freedombox
Vcs-Git: https://salsa.debian.org/freedombox-team/freedombox.git
Vcs-Browser: https://salsa.debian.org/freedombox-team/freedombox
@ -62,6 +62,8 @@ Breaks:
plinth (<< 0.46.0~),
# Ensure fuse gets replaced by fuse3 on upgrades from buster s.t. sshfs can be installed.
fuse (<< 3),
# If ufw is installed, remove it. See issue 2247.
ufw,
Replaces:
freedombox-setup (<< 0.13~),
plinth (<< 0.46.0~),

5
debian/copyright vendored
View File

@ -67,6 +67,8 @@ Files: static/themes/default/icons/ejabberd.png
static/themes/default/icons/privoxy.png
static/themes/default/icons/privoxy.svg
static/themes/default/icons/radicale.svg
static/themes/default/icons/rssbridge.png
static/themes/default/icons/rssbridge.svg
static/themes/default/icons/zoph.png
static/themes/default/icons/zoph.svg
static/themes/default/img/network-connection.svg
@ -82,6 +84,7 @@ Comment: Placed into public domain by authors (or)
https://commons.wikimedia.org/wiki/File:Ejabberd_icon.png
https://radicale.org/css/logo.svg
https://github.com/resiprocate/resiprocate/blob/master/resip/stack/doc/reSIProcate-logo.svg
https://github.com/RSS-Bridge/rss-bridge/blob/master/static/logo_600px.png
License: public-domain
Files: doc/manual/en/images/icons/*
@ -305,7 +308,7 @@ License: OFL-1.1
Files: debian/*
Copyright: 2013 Tzafrir Cohen
2013-2019 FreedomBox Authors
2013-2022 FreedomBox Authors
License: GPL-2+
License: AGPL-3+

View File

@ -17,3 +17,5 @@ rm_conffile /etc/plinth/modules-enabled/diaspora 21.16~
rm_conffile /etc/plinth/modules-enabled/monkeysphere 21.16~
rm_conffile /etc/plinth/modules-enabled/tahoe 21.16~
rm_conffile /etc/plinth/modules-enabled/mldonkey 22.4~
rm_conffile /etc/apache2/sites-available/plinth.conf 22.16~
rm_conffile /etc/apache2/sites-available/plinth-ssl.conf 22.16~

23
debian/po/es.po vendored
View File

@ -6,37 +6,32 @@
msgid ""
msgstr ""
"Project-Id-Version: plinth 19.20\n"
"Report-Msgid-Bugs-To: plinth@packages.debian.org\n"
"POT-Creation-Date: 2019-11-18 18:11-0500\n"
"PO-Revision-Date: 2019-10-30 12:45+0100\n"
"Last-Translator: Fioddor Superconcentrado <fioddor@gmail.com>\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-31 16:07+0000\n"
"PO-Revision-Date: 2022-08-01 15:13+0200\n"
"Last-Translator: Camaleón <noelamac@gmail.com>\n"
"Language-Team: Debian L10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"X-Generator: Poedit 2.4.2\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. Type: note
#. Description
#: ../templates:1001
#: ../freedombox.templates:1001
msgid "FreedomBox first wizard secret - ${secret}"
msgstr "Secreto del asistente al primer arranque de FreedomBox - ${secret}"
#. Type: note
#. Description
#: ../templates:1001
#, fuzzy
#| msgid ""
#| "Please save this string. You will be asked to enter this in the first "
#| "screen after you launch the FreedomBox interface. In case you lose it, "
#| "you can find it in the file /var/lib/plinth/firstboot-wizard-secret."
#: ../freedombox.templates:1001
msgid ""
"Please note down the above secret. You will be asked to enter this in the "
"first screen after you launch the FreedomBox web interface. In case you lose "
"it, you can retrieve it by running the following command:"
msgstr ""
"Por favor, anote esta cadena de texto. Se le pedirá en la primera pantalla "
"al lanzar el interfaz web de FreedomBox. En caso de pérdida puede "
"recuperarla mirando el fichero /var/lib/plinth/firstboot-wizard-secret."
"al iniciar la interfaz web de FreedomBox. Si la pierde, podrá recuperarla "
"ejecutando la siguiente orden:"

View File

@ -5,3 +5,6 @@ Daemon
.. autoclass:: plinth.daemon.Daemon
:members:
.. autoclass:: plinth.daemon.RelatedDaemon
:members:

View File

@ -0,0 +1,7 @@
.. SPDX-License-Identifier: CC-BY-SA-4.0
EnableState
^^^^^^^^^^^
.. autoclass:: plinth.app.EnableState
:members:

View File

@ -7,6 +7,7 @@ Components
:caption: Available components:
info
enablestate
menu
packages
daemon
@ -15,6 +16,7 @@ Components
frontpage
domain
letsencrypt
users
staticfiles
backups
coturn

View File

@ -0,0 +1,7 @@
.. SPDX-License-Identifier: CC-BY-SA-4.0
Users
^^^^^
.. autoclass:: plinth.modules.users.components.UsersAndGroups
:members:

View File

@ -9,28 +9,33 @@ Installing packages required for the app
So far, we haven't dealt with installing the packages needed for Transmission to
work. Nor did we take care of performing the initial configuration for
Transmission. FreedomBox takes care of installing all the Debian packages
required for our app to work. All we need to do is specify the list of the
Debian packages required in the ``setup()`` method that is called during
installation:
required for our app to work. All we need to do is call the base class method in
the ``setup()`` method that of the ``TrasmissionApp`` class that is called
during installation. The base class ``setup()`` method in turn calls ``setup()``
on the ``Packages`` component which performs the actual installation:
.. code-block:: python3
:caption: ``__init__.py``
def setup(helper, old_version=None):
"""Install and configure the module."""
app.setup(old_version)
class TransmissionApp(app_module.App):
...
new_configuration = {
'rpc-whitelist-enabled': False,
'rpc-authentication-required': False
}
helper.call('post', privileged.merge_configuration, new_configuration)
helper.call('post', app.enable)
def setup(self, old_version):
"""Install and configure the app."""
super().setup(old_version)
new_configuration = {
'rpc-whitelist-enabled': False,
'rpc-authentication-required': False
}
privileged.merge_configuration(new_configuration)
self.enable()
The first time this app's view is accessed, FreedomBox shows an app installation
page and allows the user to install the app. After the app installation is
completed, the user is shown the app's configuration page.
In case of our app Transmission, first we are installing the Debian packages,
then performing the first time configuration on the app using the action script
and finally enabling the app.
In case of our app Transmission, first we are installing the Debian packages (by
calling base class ``setup()`` method), then performing the first time
configuration on the app using the action script and finally enabling the app.

View File

@ -16,7 +16,7 @@ Configure has some general configuration options:
. Hostname is the local name by which other devices on the local network can reach your !FreedomBox. The default hostname is ''freedombox''.
=== Domain Name ===
. Domain name is the global name by which other devices on the Internet can reach your !FreedomBox. The value set here is used by the [[FreedomBox/Manual/ejabberd|Chat Server (XMPP)]], [[FreedomBox/Manual/MatrixSynapse|Matrix Synapse]], [[FreedomBox/Manual/LetsEncrypt|Certificates (Let's Encrypt)]], and [[FreedomBox/Manual/Monkeysphere|Monkeysphere]].
. Domain name is the global name by which other devices on the Internet can reach your !FreedomBox. The value set here is used by the [[FreedomBox/Manual/ejabberd|Chat Server (XMPP)]], [[FreedomBox/Manual/MatrixSynapse|Matrix Synapse]], and [[FreedomBox/Manual/LetsEncrypt|Certificates (Let's Encrypt)]].
=== Webserver Home Page ===
. This is an advanced option that allows you to set something other than !FreedomBox Service as the home page to be served on the domain name of the !FreedomBox. For example, if your !FreedomBox's domain name is https://myfreedombox.rocks and you set !MediaWiki as the home page, visiting https://myfreedombox.rocks will take you to https://myfreedombox.rocks/mediawiki/ instead of the usual https://myfreedombox.rocks/plinth/.

View File

@ -24,7 +24,7 @@ If your !FreedomBox is behind a router, you will need to set up port forwarding
=== External links ===
* Website: https://www.minetest.net
* Wiki: https://wiki.minetest.net
## END_INCLUDE

View File

@ -1,34 +0,0 @@
#language en
~- [[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[es/FreedomBox/Manual/Monkeysphere|Español]] -~
<<TableOfContents()>>
## BEGIN_INCLUDE
== Monkeysphere ==
{{{#!wiki caution
This application is no longer available in !FreedomBox.
}}}
With Monkeysphere, an OpenPGP key can be generated for each configured domain serving SSH. The OpenPGP public key can then be uploaded to the OpenPGP keyservers. Users connecting to this machine through SSH can verify that they are connecting to the correct host. For users to trust the key, at least one person (usually the machine owner) must sign the key using the regular OpenPGP key signing process. See the [[http://web.monkeysphere.info/getting-started-ssh/|Monkeysphere SSH documentation]] for more details.
Monkeysphere can also generate an OpenPGP key for each Secure Web Server (HTTPS) certificate installed on this machine. The OpenPGP public key can then be uploaded to the OpenPGP keyservers. Users accessing the web server through HTTPS can verify that they are connecting to the correct host. To validate the certificate, the user will need to install some software that is available on the [[https://web.monkeysphere.info/download/|Monkeysphere website]].
=== External links ===
* Upstream project: http://web.monkeysphere.info
* User Documentation: http://web.monkeysphere.info/doc/
## END_INCLUDE
Back to [[FreedomBox/Features|Features introduction]] or [[FreedomBox/Manual|manual]] pages.
<<Include(FreedomBox/Portal)>>
----
CategoryFreedomBox

View File

@ -29,24 +29,7 @@ If your !FreedomBox is behind a router, you will need to set up port forwarding
=== Managing Permissions ===
A super user in Mumble has the ability to create administrator accounts who can in turn manage groups and channel permissions. This can be done after logging in with the username "!SuperUser" using the super user password. See [[https://wiki.mumble.info/wiki/Murmurguide|Mumble Guide]] for information on how to do this.. !FreedomBox currently does not offer a UI to get or set the super user password for Mumble. A super user password is automatically generated during Mumble setup. To get the password, login to the terminal as admin user using [[FreedomBox/Manual/Cockpit|Cockpit]] , [[FreedomBox/Manual/SecureShell|Secure Shell]] or the console. Then, to read the super user password that was automatically generated during Mumble installation run the following command:
{{{
sudo grep SuperUser /var/log/mumble-server/mumble-server.log
}}}
You should see output such as:
{{{
<W>2019-11-06 02:47:41.313 1 => Password for 'SuperUser' set to 'noo8Dahwiesh'
}}}
Alternatively, you can set a new password as follows:
{{{
sudo su -
echo "newpassword" | su mumble-server -s /bin/sh -c "/usr/sbin/murmurd -ini /etc/mumble-server.ini --readsupw"
}}}
A super user in Mumble has the ability to create administrator accounts who can in turn manage groups and channel permissions. This can be done after logging in with the username "!SuperUser" using the super user password. See [[https://wiki.mumble.info/wiki/Murmurguide|Mumble Guide]] for information on how to do this. The !SuperUser password can be set through the !FreedomBox interface.
=== External links ===

View File

@ -137,7 +137,7 @@ Some services are known '''not''' to work at this time:
=== External Links ===
https://community.openvpn.net/openvpn
* Wiki / Tracker: https://community.openvpn.net/openvpn
## END_INCLUDE

View File

@ -52,7 +52,7 @@ The default installation should provide a reasonable starting point for most. Th
=== External links ===
* Website: https://www.privoxy.org
* User manual: https://www.privoxy.org/user-manual/index.html
## END_INCLUDE

View File

@ -0,0 +1,55 @@
#language en
##TAG:TRANSLATION-HEADER-START
~- [[FreedomBox/Manual/RSSBridge|English]] - [[es/FreedomBox/Manual/RSSBridge|Español]] - [[DebianWiki/EditorGuide#translation|(+)]]-~
##TAG:TRANSLATION-HEADER-END
<<TableOfContents()>>
## BEGIN_INCLUDE
== RSS Bridge (RSS Feed Generator) ==
||<tablestyle="float: right;"> {{attachment:rssbridge-icon_en_V01.png|RSS Bridge icon}} ||
'''Available since''': version 22.16
=== What is RSS Bridge? ===
RSS-Bridge is a web application capable of generating RSS and Atom feeds for websites that don't have one. For example, with the help of RSS Bridge you can subscribe to !YouTube channels without having to have a !YouTube account.
=== Usage Example ===
==== Subscribing to a YouTube account ====
In this example, we will see one of the ways to subscribe to a given !YouTube channel.
1. Visit the !YouTube channel and copy its name to the clipboard
{{attachment:copy_channel_name.png|Copy YouTube Channel Name - FreedomBox|width=800}}
2.#2 Find "!YouTube Bridge" and click on '''show more'''
{{attachment:show_more.png|RSS Bridge Show More - FreedomBox|width=800}}
3.#3 Paste the previously copied channel name in the '''Custom name''' section and click on '''Generate Feed'''
{{attachment:paste_channel_name.png|RSS Bridge Paste Channel Name - FreedomBox|width=800}}
4.#4 From the available feed types select '''Atom'''. If you're using a Chromium based browser, this will open the Atom feed in a new tab, which you can easily copy into your feed Reader, such as [[FreedomBox/Manual/TinyTinyRSS|Tiny Tiny RSS]]
{{attachment:select_atom_feed.png|RSS Bridge Select Atom Feed - FreedomBox|width=800}}
==== Subscribing to feed with Tiny Tiny RSS ====
1. Copy the URL that RSS Bridge generated
{{attachment:copy_url.png|RSS Bridge Copy URL - FreedomBox|width=800}}
2.#2 In Tiny Tiny RSS select '''Subscribe to feed''' from the drop-down menu on the right side.
3. Paste the generated link from step one into the textbox and select '''This feed requires authentication.'''
4. Submit your !FreedomBox username and password and click on '''Subscribe'''
{{attachment:subscribe_to_feed.png|RSS Bridge Subscribe to Feed - FreedomBox|width=800}}
For a more detailed description of Tiny Tiny RSS, see [[FreedomBox/Manual/TinyTinyRSS|its manual page]]
=== External links ===
* Website: https://rss-bridge.github.io/rss-bridge/
* User documentation: https://rss-bridge.github.io/rss-bridge/General/Project_goals.html
## END_INCLUDE
Back to [[FreedomBox/Features|Features introduction]] or [[FreedomBox/Manual|manual]] pages.
<<Include(FreedomBox/Portal)>>
----
CategoryFreedomBox

View File

@ -8,6 +8,121 @@ For more technical details, see the [[https://salsa.debian.org/freedombox-team/f
The following are the release notes for each !FreedomBox version.
== FreedomBox 22.19 (2022-08-29) ==
=== Highlights ===
* jsxc: Allow disabling the app
* app: Add a menu item to trigger uninstallation
=== Other Changes ===
* app: Add API to uninstall an app
* avahi: Don't disable after tests
* backups: Use !AppView for the main app page
* container: Display help message when no args are passed
* container: Show default values in command help
* d/control: Break ufw as we use firewalld
* debian: Update Spanish translation template
* diagnostics: Use !AppView for app page
* ejabberd: Set hostname for test that relies on it
* forms: Implement form for uninstallation
* janus: Convert action to privileged
* janus: Handle upgrades to 1.0.*
* letsencrypt: Use !AppView for app page
* locale: Update translations for Bulgarian, Chinese (Simplified), Czech, French, German, Spanish, Turkish, Ukrainian
* names: Use !AppView for app page
* networks: Use !AppView for app page
* operation: Factor out template code into a separate file
* operation: Show operations on app page in addition to setup page
* package: Implement low-level methods for uninstalling
* package: Implement uninstall in Package component
* power: Use !AppView for app page
* security: Use !AppView for app page
* setup: Drop check for already running operation
* setup: Implement operation to uninstall an app
* snapshot: Use !AppView for app page
* tests: Make functional.is_available check faster
* tests: functional: Add install/uninstall test for all apps
* tor: Use !AppView and Operation for app page
* ttrss: Add donation url
* upgrades: Add button to test dist-upgrade in development mode
* upgrades: Hold janus during dist-upgrade
* views: Implement a view to uninstall an app
== FreedomBox 22.18 (2022-08-15) ==
=== Highlights ===
* networks: Remove DNSSEC diagnostics
* setup: Allow starting installation when package manager is busy
* setup: Fix issue with immediate refresh after installation
=== Other Changes ===
* *: Add setup method on all apps that don't have it
* *: Drop module level app property
* *: Make force upgrading part of app rather than a module
* *: Make setup method part of App class for all apps
* app: Drop optimization that skips setup process
* backups: tests: Mark need for Django database during API tests
* container: Add !IdentitiesOnly option to SSH
* container: Ignore flake8 error 'line too long' in bash script text
* coturn: Fix link to ejabberd in description
* doc: dev: Document previously undocumented components
* ejabberd: Fix showing the status messages
* locale: Update translations for Bulgarian, Czech, Dutch, French, German, Turkish, Ukrainian
* matrixsynapse: Fix showing the status messages
* notification: Pass full context when rendering body template
* operation: Add module to manage threaded operations
* package: Run installation operation using app_id instead of module
* setup: Drop setup_helper and use the new Operation API
* sharing: Add installing and enable/disable like other apps
* sharing: tests: functional: Fix a flaky test by waiting
* ssh: tests: functional: Keep service enabled after tests
* storage: Fix enumerating partitions without mount points
== FreedomBox 22.17 (2022-08-01) ==
=== Highlights ===
* help: Add "How can I help?" section to Contribute page
=== Other Changes ===
* locale: Update translations for Chinese (Simplified), Dutch, French, German, Turkish
* wordpress: Don't install php-ssh2
== FreedomBox 22.16 (2022-07-18) ==
=== Highlights ===
* cockpit: Reconfigure to allow any origin
* rssbridge: New app to generate RSS feeds for websites
=== Other Changes ===
* apache: Also configure to serve on /freedombox
* apache: Merge old configuration files into a better location
* apache: Redirect all logs to systemd journal
* cockpit: Depend on apache and setup after it
* cockpit: Use decorator for privileged actions
* config: Add option to set logging mode: none/volatile/persistent
* config: Set volatile logging by default
* debian: Follows policy version 4.6.1
* debian: Update copyright year
* gitweb: Switch default branch name to main for new repositories
* janus: Change short description to "Video Room"
* locale: Update translations for Bulgarian, Chinese (Simplified), French, Russian, Ukrainian
* privoxy: Restrict to private IPs, prevent access over the internet
* privoxy: Use privileged decorator for actions
* roundcube: Add fail2ban jail
* roundcube: Configure to log to journald
* roundcube: Use privileged to simplify actions
* rssbridge: Add functional tests
* rssbridge: Fix flake8 errors
* rssbridge: Whitelist all bridges by default
== FreedomBox 22.15 (2022-07-04) ==
=== Highlights ===

View File

@ -14,9 +14,9 @@ It also allows !FreedomBox to discover other devices and services running on you
Service discovery is not essential and works only on internal networks. It may be disabled to improve security especially when connecting to a hostile local network.
== Troubleshooting ==
=== Troubleshooting ===
=== Unable to reach <hostname>.local ===
==== Unable to reach <hostname>.local ====
If <hostname>.local is not able to be reached, you may simply need to disable and re-enable the Service Discovery feature in !FreedomBox.
To do this, go to '''System -> Service Discovery''', slide the toggle to the left position to disable it (it turns grey), followed by sliding it back to the right to re-enable it (it turns blue).

View File

@ -14,7 +14,8 @@
'''Available since''': version 0.18.0
=== What is Shadowsocks? ===
[[https://shadowsocks.org/en/index.html|Shadowsocks]] is a lightweight and secure SOCKS5 proxy, designed to protect your Internet traffic. It can be used to bypass Internet filtering and censorship. Your !FreedomBox can run a Shadowsocks client which can connect to a Shadowsocks server. It will also run a SOCKS5 proxy. Local devices can connect to this proxy, and their data will be encrypted and proxied through the Shadowsocks server.
Shadowsocks is a lightweight and secure SOCKS5 proxy, designed to protect your Internet traffic. It can be used to bypass Internet filtering and censorship. Your !FreedomBox can run a Shadowsocks client which can connect to a Shadowsocks server. It will also run a SOCKS5 proxy. Local devices can connect to this proxy, and their data will be encrypted and proxied through the Shadowsocks server.
=== Using the Shadowsocks client? ===
@ -36,7 +37,7 @@ To use Shadowsocks after setup, set the SOCKS5 proxy URL in your device, browser
=== External links ===
* Website: https://shadowsocks.org/en/index.html
* Website: https://shadowsocks.org/
## END_INCLUDE

View File

@ -83,54 +83,10 @@ To configure, first install the application, then in the setting page, set URL a
{{attachment:ttrssapp5.png|Tiny Tiny RSS|width=288}}
=== Subscribing to popular platforms ===
=== RSS Bridge ===
==== YouTube ====
[[FreedomBox/Manual/RSSBridge|RSS Bridge]] can be used with Tiny Tiny RSS to generate Atom/RSS links for websites that don't provide one.
1. On your computer open a text editor and copy-paste the following line:
{{{https://www.youtube.com/feeds/videos.xml?channel_id=</code>}}}
2. Open a video of the channel you would like to subscribe to. In this example we will subscribe to the !FreedomBox Foundation's !YouTube channel.
3. Under the video, right click on the channel's name, and select '''Copy Link'''. You have to make sure you copy the channel's URL this way, as there many channels with custom URL IDs. Copying the link from here will give you the uncustomized ID of the channel.
{{attachment:copy_link_youtube.png|Tiny Tiny RSS|width=960}}
4. Paste this link into your text file as well.
5. Now that you have both links, you should select the text which comes after {{{/channel/}}}, and place it next to the first link as shown in the pictures below.
{{attachment:paste_link_youtube.png|Tiny Tiny RSS|width=800}}
----
{{attachment:valid_youtube_rss_feed.png|Tiny Tiny RSS|width=800}}
6. Now you can use this link as a valid RSS feed.
{{attachment:youtube_final_step.png|Tiny Tiny RSS|width=800}}
In addition, you can make videos display inside Tiny Tiny RSS:
1. Select "Preferences" from the Actions dropdown.
2. Select Plugins
3. Turn on the plugin titled "af_youtube_embed"
4. Click on "Enable selected plugins"
Please note, that it is highly reccommended that you use one of the privacy extensions, like [[https://ublockorigin.com//|uBlockOrigin]] to avoid advertisements and intrusive trackers.
==== Reddit ====
1. Take the link of the subreddit you want to subscribe to
2. Add {{{.rss}}} after the subreddit's url.
For example the subreddit for !FreedomBox is {{{https://www.reddit.com/r/Freedombox/}}}, and {{{https://www.reddit.com/r/Freedombox/.rss}}} will give you an RSS feed.
{{attachment:subscribe_to_subreddit.png|Tiny Tiny RSS|width=800}}
=== External links ===

View File

@ -21,20 +21,24 @@
You can install wireguard from the Apps section of the !FreedomBox web interface.
=== Configuration - Debian Peers ===
* [[WireGuard#Step_1_-_Generating_Keypairs|Step 1 - Generating Keypairs]]
* [[WireGuard#Alternative_A_-_Create_configuration_manually|Step 2 - Alternative A - Manual Configuration]]
=== Usage ===
* Point-to-point tunnel
* VPN client with default route
=== Configuration - Debian Peers ===
Note: These steps are handled automatically on !FreedomBox. So you only need to follow these steps on any Debian clients that will connect to !FreedomBox, or Debian servers that !FreedomBox will connect to.
* [[WireGuard#Step_1_-_Generating_Keypairs|Step 1 - Generating Keypairs]]
* [[WireGuard#Step_2_-_Configuration|Step 2 - Alternative A - Manual Configuration]]
=== Configuration - Mobile Clients ===
WireGuard has a user space implementation for mobile devices available via the WireGuard app - available for Android and iOS (a full list of supported operating systems is available [[https://www.wireguard.com/install/|here]]).
!WireGuard has a user space implementation for mobile devices available via the !WireGuard app - available for Android and iOS (a full list of supported operating systems is available [[https://www.wireguard.com/install/|here]]).
The client can be configured in several ways:

View File

@ -38,6 +38,7 @@
<<Include(FreedomBox/Manual/Quassel, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Radicale, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Roundcube, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/RSSBridge, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Samba, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Searx, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Shadowsocks, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
@ -61,7 +62,6 @@
<<Include(FreedomBox/Manual/DynamicDNS, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Firewall, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/LetsEncrypt, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Monkeysphere, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/NameServices, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Networks, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/PageKite, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

View File

@ -38,6 +38,7 @@
<<Include(FreedomBox/Manual/Quassel, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Radicale, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Roundcube, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/RSSBridge, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Samba, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Searx, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Shadowsocks, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
@ -61,7 +62,6 @@
<<Include(FreedomBox/Manual/DynamicDNS, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Firewall, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/LetsEncrypt, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Monkeysphere, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/NameServices, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/Networks, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>
<<Include(FreedomBox/Manual/PageKite, , from="## BEGIN_INCLUDE", to="## END_INCLUDE")>>

View File

@ -22,6 +22,7 @@ Si tu !FreedomBox está detrás de un router necesitarás configurar la redirecc
=== Enlaces externos ===
* Sitio web: https://www.minetest.net
* Wiki: https://wiki.minetest.net
## END_INCLUDE

View File

@ -27,24 +27,7 @@ Si tu !FreedomBox está detrás de un router necesitarás configurar la redirecc
=== Administrar Permisos ===
En Mumble un superusuario puede crear cuentas de administrador que a su vez pueden administrar permisos a grupos y canales. Esto se puede hacer tras ingresar con el usuario "!SuperUser" y la contraseña de superusuario. Ver la [[https://wiki.mumble.info/wiki/Murmurguide|Guía de Mumble]] para obtener información respecto a cómo hacer esto. Actualmente !FreedomBox no ofrece una interfaz gráfica para obtener o establecer la contraseña de superusuario en Mumble. Se genera una contraseña de superusuario automáticamente durante la instalación de Mumble. Para obtenerla ingresa en el terminal como `admin` usando [[es/FreedomBox/Manual/Cockpit|Cockpit]] , la [[es/FreedomBox/Manual/SecureShell|Shell Segura]] o la consola. Y ejecuta el siguiente comando:
{{{
sudo grep SuperUser /var/log/mumble-server/mumble-server.log
}}}
Deberás ver una salida como esta:
{{{
<W>2019-11-06 02:47:41.313 1 => Password for 'SuperUser' set to 'noo8Dahwiesh'
}}}
O puedes establecer una contraseña nueva así:
{{{
sudo su -
echo "nuevacontraseña" | su mumble-server -s /bin/sh -c "/usr/sbin/murmurd -ini /etc/mumble-server.ini --readsupw"
}}}
En Mumble un superusuario puede crear cuentas de administrador que a su vez pueden administrar permisos a grupos y canales. Esto se puede hacer tras ingresar con el usuario "!SuperUser" y la contraseña de superusuario. Ver la [[https://wiki.mumble.info/wiki/Murmurguide|Guía de Mumble]] para obtener información respecto a cómo hacer esto. La interfaz web de !FreedomBox permite establecer la contraseña de superusuario.
=== External links ===

View File

@ -135,7 +135,7 @@ Algunos servicios '''no''' funcionan aún con OpenVPN:
=== Enlaces Externos ===
https://community.openvpn.net/openvpn
* Wiki y Administrador de tareas: https://community.openvpn.net/openvpn
## END_INCLUDE

View File

@ -49,8 +49,8 @@ La instalación de serie debería proporcionar un punto de partida razonable par
=== Enlaces externos ===
* Website: https://www.privoxy.org
* Sitio web: https://www.privoxy.org
* Manual de usuario: https://www.privoxy.org/user-manual/index.html
## END_INCLUDE

View File

@ -8,6 +8,121 @@ For more technical details, see the [[https://salsa.debian.org/freedombox-team/f
The following are the release notes for each !FreedomBox version.
== FreedomBox 22.19 (2022-08-29) ==
=== Highlights ===
* jsxc: Allow disabling the app
* app: Add a menu item to trigger uninstallation
=== Other Changes ===
* app: Add API to uninstall an app
* avahi: Don't disable after tests
* backups: Use !AppView for the main app page
* container: Display help message when no args are passed
* container: Show default values in command help
* d/control: Break ufw as we use firewalld
* debian: Update Spanish translation template
* diagnostics: Use !AppView for app page
* ejabberd: Set hostname for test that relies on it
* forms: Implement form for uninstallation
* janus: Convert action to privileged
* janus: Handle upgrades to 1.0.*
* letsencrypt: Use !AppView for app page
* locale: Update translations for Bulgarian, Chinese (Simplified), Czech, French, German, Spanish, Turkish, Ukrainian
* names: Use !AppView for app page
* networks: Use !AppView for app page
* operation: Factor out template code into a separate file
* operation: Show operations on app page in addition to setup page
* package: Implement low-level methods for uninstalling
* package: Implement uninstall in Package component
* power: Use !AppView for app page
* security: Use !AppView for app page
* setup: Drop check for already running operation
* setup: Implement operation to uninstall an app
* snapshot: Use !AppView for app page
* tests: Make functional.is_available check faster
* tests: functional: Add install/uninstall test for all apps
* tor: Use !AppView and Operation for app page
* ttrss: Add donation url
* upgrades: Add button to test dist-upgrade in development mode
* upgrades: Hold janus during dist-upgrade
* views: Implement a view to uninstall an app
== FreedomBox 22.18 (2022-08-15) ==
=== Highlights ===
* networks: Remove DNSSEC diagnostics
* setup: Allow starting installation when package manager is busy
* setup: Fix issue with immediate refresh after installation
=== Other Changes ===
* *: Add setup method on all apps that don't have it
* *: Drop module level app property
* *: Make force upgrading part of app rather than a module
* *: Make setup method part of App class for all apps
* app: Drop optimization that skips setup process
* backups: tests: Mark need for Django database during API tests
* container: Add !IdentitiesOnly option to SSH
* container: Ignore flake8 error 'line too long' in bash script text
* coturn: Fix link to ejabberd in description
* doc: dev: Document previously undocumented components
* ejabberd: Fix showing the status messages
* locale: Update translations for Bulgarian, Czech, Dutch, French, German, Turkish, Ukrainian
* matrixsynapse: Fix showing the status messages
* notification: Pass full context when rendering body template
* operation: Add module to manage threaded operations
* package: Run installation operation using app_id instead of module
* setup: Drop setup_helper and use the new Operation API
* sharing: Add installing and enable/disable like other apps
* sharing: tests: functional: Fix a flaky test by waiting
* ssh: tests: functional: Keep service enabled after tests
* storage: Fix enumerating partitions without mount points
== FreedomBox 22.17 (2022-08-01) ==
=== Highlights ===
* help: Add "How can I help?" section to Contribute page
=== Other Changes ===
* locale: Update translations for Chinese (Simplified), Dutch, French, German, Turkish
* wordpress: Don't install php-ssh2
== FreedomBox 22.16 (2022-07-18) ==
=== Highlights ===
* cockpit: Reconfigure to allow any origin
* rssbridge: New app to generate RSS feeds for websites
=== Other Changes ===
* apache: Also configure to serve on /freedombox
* apache: Merge old configuration files into a better location
* apache: Redirect all logs to systemd journal
* cockpit: Depend on apache and setup after it
* cockpit: Use decorator for privileged actions
* config: Add option to set logging mode: none/volatile/persistent
* config: Set volatile logging by default
* debian: Follows policy version 4.6.1
* debian: Update copyright year
* gitweb: Switch default branch name to main for new repositories
* janus: Change short description to "Video Room"
* locale: Update translations for Bulgarian, Chinese (Simplified), French, Russian, Ukrainian
* privoxy: Restrict to private IPs, prevent access over the internet
* privoxy: Use privileged decorator for actions
* roundcube: Add fail2ban jail
* roundcube: Configure to log to journald
* roundcube: Use privileged to simplify actions
* rssbridge: Add functional tests
* rssbridge: Fix flake8 errors
* rssbridge: Whitelist all bridges by default
== FreedomBox 22.15 (2022-07-04) ==
=== Highlights ===

View File

@ -36,7 +36,7 @@ Para usar Shadowsocks una vez instalado configura la URL del proxy SOCKS5 en tu
=== Enlaces externos ===
* Sitio web: https://shadowsocks.org/en/index.html
* Sitio web: https://shadowsocks.org
## END_INCLUDE

View File

@ -67,7 +67,7 @@ Para importar tu fichero Subscriptions.opml a TT-RSS,
Tras importar se te llevará a la sección '''Feeds''' que está en la página encima de la de OPML. Puedes ver que los ''feeds'' del lector previo figuran ahora importados en Tiny Tiny RSS. Ahora puedes empezar a usar Tiny Tiny RSS como tu lector principal.
=== Usar la app móvil ===
=== Usar la app para dispositivos móviles ===
La app oficial para Android del proyecto Tiny Tiny RSS funciona con el servidor Tiny Tiny RSS de !FreedomBox. Se sabe que la aplicación anterior TTRSS-Reader '''no''' funciona.
@ -81,7 +81,11 @@ Para configurarla, primero instálala y entonces en la página de configuración
{{attachment:ttrssapp4.png|Tiny Tiny RSS|width=288}}
{{attachment:ttrssapp5.png|Tiny Tiny RSS|width=288}}
=== Suscribirse a plataformas populares ===
=== Suscribirse a contenidos ===
==== Cualquier contenido en general ====
Se puede usar [[es/FreedomBox/Manual/RSSBridge|RSS Bridge]] junto con Tiny Tiny RSS para generar enlaces Atom/RSS para sitios web que no proporcionan ninguno.
==== YouTube ====

View File

@ -20,8 +20,10 @@ Puedes instalar !WireGuard desde la sección ''Apps'' de la interfaz de !Freedom
=== Configuración - Debian Peers ===
Nota: !FreedomBox trata estos pasos automáticamente. Así que solo necesitas seguirlos en clientes Debian que se conecten a !FreedomBox, O en servidores Debian a los que !FreedomBox se conecte.
* [[WireGuard#Step_1_-_Generating_Keypairs|Paso 1 - Generar los pares de claves]]
* [[WireGuard#Alternative_A_-_Create_configuration_manuallyS|Paso 2 - Alternativa A - Configuration Manual]]
* [[WireGuard#Step_2_-_Configuration|Paso 2 - Alternativa A - Configuración Manual]]
=== Uso ===
@ -31,7 +33,7 @@ Puedes instalar !WireGuard desde la sección ''Apps'' de la interfaz de !Freedom
=== Configuración - Clientes móviles ===
WireGuard tiene una implementación en espacio de usuario para dispositivos móviles disponible en la propia app. Funciona en Android e iOS. [[https://www.wireguard.com/install/|Aquí]] hay una lista completa de sistemas operativos compatibles.
!WireGuard tiene una implementación en espacio de usuario para dispositivos móviles disponible en la propia app. Funciona en Android e iOS. [[https://www.wireguard.com/install/|Aquí]] hay una lista completa de sistemas operativos compatibles.
El cliente se puede configurar de varias maneras:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -3,4 +3,4 @@
Package init file.
"""
__version__ = '22.15'
__version__ = '22.19'

View File

@ -7,7 +7,6 @@ import collections
import enum
import inspect
import logging
import sys
from plinth import cfg
from plinth.signals import post_app_loading
@ -51,6 +50,7 @@ class App:
class SetupState(enum.Enum):
"""Various states of app being setup."""
NEEDS_SETUP = 'needs-setup'
NEEDS_UPDATE = 'needs-update'
UP_TO_DATE = 'up-to-date'
@ -133,21 +133,17 @@ class App:
for component in self.components.values():
component.setup(old_version=old_version)
def uninstall(self):
"""De-configure and uninstall the app."""
for component in self.components.values():
component.uninstall()
def get_setup_state(self) -> SetupState:
"""Return whether the app is not setup or needs upgrade."""
current_version = self.get_setup_version()
if current_version and self.info.version <= current_version:
return self.SetupState.UP_TO_DATE
# If an app needs installing/updating but no setup method is available,
# then automatically set version.
#
# Minor violation of 'get' only discipline for convenience.
module = sys.modules[self.__module__]
if not hasattr(module, 'setup'):
self.set_setup_version(self.info.version)
return self.SetupState.UP_TO_DATE
if not current_version:
return self.SetupState.NEEDS_SETUP
@ -289,6 +285,9 @@ class Component:
def setup(self, old_version):
"""Run operations to install and configure the component."""
def uninstall(self):
"""De-configure and uninstall the component."""
def enable(self):
"""Run operations to enable the component."""
@ -464,7 +463,16 @@ class Info(FollowerComponent):
class EnableState(LeaderComponent):
"""A component to hold the enable state of an app using a simple flag."""
"""A component to hold the enable state of an app using a simple flag.
The flag is stored in the FreedomBox service database. This component
should only be used if an app does not have any other way to determine if
it is enabled or disabled by examining the state of the system. Typical
apps have daemons, web server configuration, etc. and the enabled/disabled
state of those determine the enabled/disabled state of the entire app. If
an does not have any such system state, then this component may be used to
provide enable/disable functionality for the app.
"""
@property
def key(self):
@ -550,17 +558,13 @@ def _insert_apps(app_id, app, remaining_apps, ordered_apps):
def _initialize_module(module_name, module):
"""Perform initialization on all apps in a module."""
# Perform setup related initialization on the module
from . import setup # noqa # Avoid circular import
setup.init(module_name, module)
try:
module_classes = inspect.getmembers(module, inspect.isclass)
app_classes = [
cls for _, cls in module_classes if issubclass(cls, App)
]
for app_class in app_classes:
module.app = app_class()
app_class()
except Exception as exception:
logger.exception('Exception while running init for %s: %s', module,
exception)

View File

@ -14,12 +14,32 @@ from django.utils.translation import gettext_lazy as _
import plinth
def _get_repository_choices():
"""Return the list of available repositories."""
import plinth.modules.backups.repository as repository_module
choices = [(repository.uuid, repository.name)
for repository in repository_module.get_repositories()
if repository.is_usable()]
return choices
class AppEnableDisableForm(forms.Form):
"""Form to enable / disable an app."""
should_enable = forms.BooleanField(widget=forms.HiddenInput,
required=False)
class UninstallForm(forms.Form):
"""Form to uninstall an app."""
should_backup = forms.BooleanField(
label=_('Backup app before uninstall'),
help_text=_('Restoring from the backup will restore app data.'),
required=False, initial=True)
repository = forms.ChoiceField(label=_('Repository to backup to'),
choices=_get_repository_choices)
class DomainSelectionForm(forms.Form):
"""Form for selecting a domain name to be used for
distributed federated applications

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More