6449 Commits

Author SHA1 Message Date
James Valleroy
a485decaec
Translated using Weblate (Indonesian)
Currently translated at 44.7% (652 of 1456 strings)
2021-04-23 01:47:25 +02:00
James Valleroy
6d53e6f150
Translated using Weblate (Indonesian)
Currently translated at 44.7% (652 of 1456 strings)
2021-04-23 01:32:44 +02:00
Benedek Nagy
9f24bf086e
Translated using Weblate (Hungarian)
Currently translated at 88.5% (1290 of 1456 strings)
2021-04-22 23:32:17 +02:00
whenwesober
a5b890165e
Translated using Weblate (Indonesian)
Currently translated at 44.7% (652 of 1456 strings)
2021-04-22 23:32:17 +02:00
Michael Breidenbach
667ab7e77b
Translated using Weblate (Swedish)
Currently translated at 100.0% (1456 of 1456 strings)
2021-04-22 23:32:11 +02:00
Burak Yavuz
4aa642de40
Translated using Weblate (Turkish)
Currently translated at 100.0% (1456 of 1456 strings)
2021-04-22 23:32:11 +02:00
ikmaak
5085c1064b
Translated using Weblate (Dutch)
Currently translated at 100.0% (1456 of 1456 strings)
2021-04-22 23:32:10 +02:00
James Valleroy
34848d64ba
Release v21.5 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.5
2021-04-19 20:37:31 -04:00
James Valleroy
d595921903
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-04-19 20:36:57 -04:00
James Valleroy
5d8e7797ec
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-04-19 18:51:55 -04:00
Carlos Henrique Lima Melara
0ce610c074
docs: Set the version attribute as required instead of optional
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-04-17 09:55:06 -07:00
Carlos Henrique Lima Melara
08a7c7870e
docs: Add missing imports in tutorial as pointed in #2078
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-04-17 09:54:54 -07:00
Carlos Henrique Lima Melara
213e01abcd
doc: Add filename to code snippets in tutorial
[sunil: Add caption for another file too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-04-17 09:53:55 -07:00
Joseph Nuthalapati
ec67b71aa6
coturn: Mention ejabberd in app description
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-04-16 17:53:05 -04:00
James Valleroy
9b446d5dd1
coturn: Validate TURN URIs if provided in form
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>

- Re-use the same validator in Matrix Synapse.
- Avoid importing plinth classes in actions files.
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-04-16 17:52:57 -04:00
Joseph Nuthalapati
7a30470cb5
ejabberd: STUN/TURN configuration
This implementation is very similar to that of Matrix Synapse with a lot
of code duplicated.

One major difference is that ejabberd doesn't have a conf.d/ directory.
So, the managed configuration and overridden configuration cannot be
cleanly separated.

Whether the configuration is managed or not is determined by the
presence of a file under `/etc/ejabberd`. Managed coturn configuration
isn't stored in ejabberd, since only one set of configuration can be
stored at a time. If the admin chooses to use the managed configuration,
the current coturn configuration is fetched and used to configure
ejabberd.

Fixes #1978

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-04-16 17:52:48 -04:00
Besnik Bleta
d70816d0e5
Translated using Weblate (Albanian)
Currently translated at 38.6% (562 of 1453 strings)
2021-04-16 15:27:17 +02:00
Besnik Bleta
bcdd80e8d5
debian: Add Albanian (sq) locale
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-04-14 16:16:45 -07:00
Sunil Mohan Adapa
e0ebfecc27
Update copyright year
Closes: #2079.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-04-14 16:10:14 -07:00
Weblate
28ec4665ff
Added translation using Weblate (Albanian) 2021-04-14 10:34:20 +02:00
Michalis
26c472c16f
Translated using Weblate (Greek)
Currently translated at 73.5% (1068 of 1453 strings)
2021-04-14 06:27:09 +02:00
池边树下
07278e6c36
Translated using Weblate (Chinese (Simplified))
Currently translated at 43.0% (625 of 1453 strings)
2021-04-14 06:27:09 +02:00
whenwesober
4dacab9754
Translated using Weblate (Indonesian)
Currently translated at 10.7% (156 of 1453 strings)
2021-04-12 15:27:08 +02:00
Johannes Keyser
68bf1b9fd0
Translated using Weblate (German)
Currently translated at 100.0% (1453 of 1453 strings)
2021-04-12 15:27:08 +02:00
James Valleroy
1e8a91dd55
diagnostics: Use lock to protect results
Closes: #514.

Test: Ran diagnostics with all apps enabled.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-04-02 19:55:13 +03:00
James Valleroy
c293a01a1f
letsencrypt: Always return a diagnostics result
Return a warning result if no domains are configured.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-04-02 19:54:36 +03:00
fliu
26b6bbcb52
container script: Must convert env. var. string to a Path object
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-30 21:06:58 +03:00
fliu
968726d152
HACKING.md: added some troubleshooting information
- Disk space requirements
- How to get around the Network Manager error

Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-30 21:05:05 +03:00
Michael Breidenbach
7e5ada3e77
Translated using Weblate (Swedish)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-30 18:26:46 +02:00
James Valleroy
48d7f68ed5
config, dynamicdns, pagekite: Remove incorrect use of str
This was used before to ensure the domain name was ASCII. However, str
does not convert to ASCII in Python 3.

Note that in config module, which sets the system domain name, the
domain is already restricted to alphanumerics, hyphen, and period.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-29 12:59:47 +03:00
James Valleroy
0b630037f9
pagekite: Convert entered kite name to lower case
Let's Encrypt certificate paths use lower-case kite name.

Test: Pagekite functional tests are passing.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-29 12:59:32 +03:00
James Valleroy
929e7626f0
dynamicdns: Convert entered domain name to lower case
Domain name is not case sensitive, but Let's Encrypt certificate paths
use lower-case domain name.

Add an extra 1 second delay to tests that configure DynamicDNS domain.

Test: DynamicDNS functional tests are passing.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-29 12:59:20 +03:00
James Valleroy
bdd078a406
dynamicdns: Wait after changing domain name in tests
After a domain name change, Let's Encrypt will restart the webserver
and could cause a connection failure.

Test: DynamicDNS functional tests are passing.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-29 12:59:07 +03:00
James Valleroy
043b329e7d
config: Convert entered domain name to lower case
Domain name is not case sensitive, but Let's Encrypt certificate paths
use lower-case domain name.

Closes: #1964.

Tests: Config functional tests passed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-29 12:58:13 +03:00
Burak Yavuz
adae894362
Translated using Weblate (Turkish)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-28 15:10:09 +02:00
Kirill Schmidt
f2005f56aa first_boot: Use session to verify first boot welcome step
Closes: #2074

sunil's changes:

- Ensure that secret is not asked for a second time after creating admin user
and logging in (this happens due to discarding of old session and creating new
one).

- Ensure that this logic is not applied to user using FreedomBox images who are
not required to input the first wizard secret.

- Change the name of the session variable for readability.

Tests performed:

- Without the patch, start first boot wizard on the first browser on a
  FreedomBox image (or run the file `base64 < /dev/urandom | head -c 16 | sed -e
  's+$+\n+' > /var/lib/plinth/firstboot-wizard-secret`). Finish the welcome step
  with first wizard secret. Then open a second browser or from another computer
  visit the web interface. The first wizard secret is not asked and user can
  create an admin account.

- Repeat with fresh image again with the patch. To mimic fresh image, one may
  run `sudo rm -f /var/lib/plinth/plinth.sqlite3` and `echo "password" | | sudo
  /freedombox/actions/users remove-user tester`. This time when a different
  browser other than the one that provided the first wizard secret try to access
  the account creation page, a redirection will occur to welcome page. Providing
  the first wizard secret takes the user to account creation page.

- Accessing network first wizard page or internal pages on second browser also
  takes one back to the welcome page.

- Accessing help pages from second browser requires login.

- Accessing account login page from second browser is allowed. After creating
  the account from first browser, second browser can login and continue the
  wizard.

- Clearing cookies in the middle of the wizard takes the user back to welcome
  page.

- Clear cookies in the middles of the wizard. Visit the wizard, go to first boot
  welcome page. Provide secret and the wizard will continue where it was left
  off.

- Clear cookies in the middles of the wizard. Visit the wizard, go to first boot
  welcome page. Access login page, login as admin. Then first wizard secret is
  not asked. First wizard can be continued.

- On a fresh image, simply complete the first wizard. No change to earlier flow
  is noticed. First wizard secret is only asked once at the beginning.

- On a fresh image, remove the file /var/lib/plinth/firstboot-wizard-secret.
  First wizard can be completed without the secret.

[sunil: improvements to original patch by Kirill Schmidt]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-27 18:57:01 -07:00
Aditya Pratap Singh
c1f2b32b94 container: Work in the absence of systemd in PATH, for eg. in Arch
Closes: #2072
2021-03-27 09:34:22 -07:00
James Valleroy
95236bcb78 ci: Merge with Salsa CI pipeline
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-27 09:28:30 -07:00
Reza Almanda
081a833ef2
Translated using Weblate (Indonesian)
Currently translated at 10.6% (155 of 1453 strings)
2021-03-25 00:29:39 +01:00
Michalis
066cada046
Translated using Weblate (Greek)
Currently translated at 73.5% (1068 of 1453 strings)
2021-03-22 19:29:55 +01:00
nautilusx
72696aebb7
Translated using Weblate (German)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-22 19:29:54 +01:00
Veiko Aasa
78427f730c
users: Fix unit test failures when LDAP is empty
When LDAP is set up but the first admin is not yet set up, some of the
users module tests fail because known admin users is deleted before other
users. A known admin user must exists to delete existing users.

Fix this by deleting a known admin user only after deleting other users
when cleaning up tests.

Tests performed on Debian stable and testing:
- All the users module unit tests pass:
  - when LDAP is not set up yet
  - after LDAP is set up but empty
  - after first admin user has set up using the web UI

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-20 10:18:31 -04:00
Burak Yavuz
c1bcf30e44
Translated using Weblate (Turkish)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-15 09:03:17 +01:00
Fioddor Superconcentrado
fe9a2b8cdd
Translated using Weblate (Spanish)
Currently translated at 99.9% (1452 of 1453 strings)
2021-03-12 14:03:07 +01:00
Michalis
7f5c646cd3
Translated using Weblate (Greek)
Currently translated at 73.0% (1062 of 1453 strings)
2021-03-08 14:16:18 +01:00
Michael Breidenbach
8fe37843f8
Translated using Weblate (Swedish)
Currently translated at 99.9% (1452 of 1453 strings)
2021-03-08 14:16:17 +01:00
Joseph Nuthalapati
1fca2465aa
container: distribution as environment variable
Allow distribution to be passed as an environment variable.

Fixes #1914

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-07 07:41:27 -05:00
Joseph Nuthalapati
4b0899fd65
docs: Improve Developer Documentation index page
- Improved readability.
- Changed hierarchy of headings.
- Reduced emphasis on unnecessary/redundant things.
- Added links to go back to the main websites.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-07 07:14:30 -05:00
Max Rockatansky
efbb39b2a3
security: Clarify vulnerability count and provide link to more info
Update security_report.html text to clarify what vulnerability total
numbers mean, and give more info to learn what the vulnerabilties are.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
[jvalleroy: Make URL a link]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-06 09:39:53 -05:00
Sunil Mohan Adapa
186596cfbf
config: Install and configure zram for swap
Closes: Debian #805108.

Primary motivation is to provide swap for FreedomBox machines. On all FreedomBox
images, currently there is no swap configured. Swap on disk may not be good for
SBCs most of which use SD card for storage. We wish for processes to not get
killed when hard memory limit is reached.

Zram seems like a good solution to the problem suitable not only for SBCs but
also for desktops and bigger machines. Fedora is currently using Zram as its
default swap solution configured by the installer. Zram creates a block device
with a configured size. Writing blocks into the device compresses them and
stores them in RAM. This block device can be configured as swap among other
things. See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/blockdev/zram.rst

Set the size of the swap to be 50% of RAM. Expected compression is about 1:2.
That means, in an average case, 25% of RAM is consumed to provide the swap
device. This results in the system being able to consume about 125% of RAM
capacity to run processes. This value is inspired by Fedora.
https://fedoraproject.org/wiki/Changes/SwapOnZRAM .

Zram based swap takes priority over disk based swap (due the priority being set
to 100). This reduces IO and improves latency on machines that already have a
swap device.

On containers, zramswap.service fails to start as it will not be possible to
insert the 'zram' kernel module from within the container. This should not cause
any further problems.

Since 'config' app is an essential app, zram-tools now becomes a hard dependency
of freedombox package.

For FreedomBox images, zram-tools will be pre-installed and pre-configured. So,
it will work on first boot. For users installing FreedomBox via apt or those
upgrading from an older version, zram-tools will be newly installed but
configuration will not be picked up until the next reboot. Restarting
zramswap.service is not done because it may not be a safe/successful operation.

systemd-zram-generator is a project that essentially does what zram-tools. It
appears to be a better implementation and we may migrate to it when it becomes
available in Debian. Migration expected to be straight forward.

Tests performed:

- Running `sudo -u plinth ./run --list-dependencies` shows zram-tools as a
dependency.

- On a container, `systemctl status zramswap.service` shows as failed.

- On a virtual machine, confirm that configuration is installed properly. Run
`./setup.py install; systemctl daemon-reload; systemctl show zramswap.service |
grep Environment`.

- On a virtual machine, ensure that you have more than 512MiB or RAM. Then
restart zramswap.service. This should create a swap space of 50% of RAM
capacity. Confirm with `free` and `zramswap status`.

- Restarting the VM retains the swap that has been setup.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-06 09:00:28 -05:00