7576 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
bfa11beb73
*: pylint: Don't inherit from 'object'
- This was required in Python 2 but useless in Python 3.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-04 19:46:15 -04:00
Sunil Mohan Adapa
c73f88b925
*: pylint: Suppress unused argument warnings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-04 19:46:06 -04:00
Sunil Mohan Adapa
3c7bc4a192
*: pylint: Explicitly specify encoding when open a file
This is recommended by PEP-0597: https://peps.python.org/pep-0597/

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-04 19:45:57 -04:00
Joseph Nuthalapati
05815bc992
ci: Use compatible versions of Selenium and Splinter
This is a temporary fix until Splinter addresses the breaking changes in Selenium 4.3.0

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-04 19:26:40 -04:00
James Valleroy
892deefdca
upgrades: Hold packages one at a time
`apt-mark hold PACKAGES` accepts a list of packages. But if one of the
package is missing from the apt repository, then it will fail to hold
any of the listed packages. So it is necessary to try to hold each
package by itself.

Test:
- Run dist-upgrade from bullseye to bookworm. mumble-server package is
currently missing from bookworm, but it should not cause an error in
dist-upgrade.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-07-01 10:22:42 -04:00
James Valleroy
c70006d03a
upgrades: Re-add workaround for grub
For dist-upgrade from buster to bullseye, we had a workaround to avoid
grub error during upgrade. The workaround is still needed for
dist-upgrade from bullseye to bookworm.

Helps #2057.

Test:
1. Build freedombox package for bullseye-backports with this fix
included.
2. Install package in bullseye vagrant box.
3. Enable automatic updates, and start dist upgrade from action.
4. Check journal to see if there is an error from grub.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-07-01 09:30:40 -04:00
Guillermo Lopez Alejos
957ddf5a2d
backups: Unmount repositories before and after backup
[sunil: Make the umount code specific to SSH repositories]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-30 15:31:16 -07:00
Guillermo Lopez Alejos
d7a1ea03a3
backups: Add options to keep sshfs shares responsive
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-30 15:31:13 -07:00
Artem
d7c9c89257
Translated using Weblate (Ukrainian)
Currently translated at 81.0% (1179 of 1455 strings)
2022-06-30 20:19:52 +02:00
Joseph Nuthalapati
77f9037219
tests: functional: Simplify GitLabCI configuration
- The GitLab CI Runner no longer directly runs AWS CLI commands
- The Runner calls two AWS Lambda functions for running or terminating the app servers
- The Lambda functions invoke AWS APIs using the Python boto3 library

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-30 09:32:26 -07:00
nbenedek
35b50a2c71
users: create home directories for newly created users
Test I made: Created a few users, then appied the changes
and rebooted FreedomBox. After reboot I created another user
whose home directory could now be listed.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-30 09:07:52 -07:00
109247019824
12f157071b
Translated using Weblate (Bulgarian)
Currently translated at 29.3% (427 of 1455 strings)
2022-06-29 23:17:36 +02:00
Nikita Epifanov
559ab48e9b
Translated using Weblate (Russian)
Currently translated at 99.7% (1451 of 1455 strings)
2022-06-29 23:17:35 +02:00
nbenedek
0d37809eb8
mediawiki: Add regex validator to the domain field
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-29 13:01:37 -07:00
nbenedek
26f576bb79
mediawiki: Remove wgLogo as it is not needed in Bullseye
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-29 09:29:37 -07:00
nbenedek
9ca56c728e
mediawiki: Remove Buster specific code not needed in Bullseye
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-29 09:29:09 -07:00
James Valleroy
402b5594aa
Release v22.14.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.14.1
2022-06-27 08:45:18 -04:00
James Valleroy
9603521813
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-27 08:45:12 -04:00
Jiří Podhorecký
5d862f1a1f
Translated using Weblate (Czech)
Currently translated at 100.0% (1455 of 1455 strings)
2022-06-25 02:20:09 +02:00
Sunil Mohan Adapa
696a876df4
mumble: tests: Add functional tests for setting the passwords
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-24 08:41:57 -04:00
Sunil Mohan Adapa
c772534a35
mumble: Don't set the root channel name unless it is changed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-24 08:41:50 -04:00
Sunil Mohan Adapa
f8b4aa9d6f
mumble: Backup/restore the configuration file
This allows the root channel name to be preserved as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-24 08:41:42 -04:00
Sunil Mohan Adapa
fb70fdef6e
actions: Note that privileged actions can't output to stdout
- This can be improved later by using a IPC mechanism other than stdin/stdout.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-24 08:41:34 -04:00
Sunil Mohan Adapa
7470821dc7
mumble: Use privileged decorator for superuser actions
- Don't use command line argument for sending the join password for security.

- murmurd can switch to mumble-server UID before performing database operations.
Remove code to switch to mumble-server user.

- murmurd seems to return correct response code of 0 upon successfully setting
the password. Simplify code accordingly.

- Use subprocess.run() instead of subprocess.Popen for convenience.

Tests:

- Run functional and unit tests on Debian stable.

- Perform a fresh installation.

- Verify that setting super user password works.

- Verify that setting root channel names works.

- Verify that setting join password works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-24 08:41:23 -04:00
Sunil Mohan Adapa
a55e63b7f4
matrixsynapse: Allow new dependency to be installed from backports
Closes: #2230.

- matrix-synapse >= 1.59.1-1 requires python3-unpaddedbase64 >= 2.1.0~

Tests:

- On a stable container, matrixsynapse app is not installable.

- With the changes, start FreedomBox service, setup will run on the upgrades
module and /etc/apt/preferences.d/51freedombox-apps.conf will be changed to
include the two new entries. After this, matrix-synapse app is installable.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-24 08:18:27 -04:00
109247019824
223b1c9417
Translated using Weblate (Bulgarian)
Currently translated at 24.1% (352 of 1455 strings)
2022-06-22 19:14:53 +02:00
Eric
e5eadf059b
Translated using Weblate (Chinese (Simplified))
Currently translated at 69.6% (1013 of 1455 strings)
2022-06-22 19:14:52 +02:00
Burak Yavuz
e79d8b5258
Translated using Weblate (Turkish)
Currently translated at 100.0% (1455 of 1455 strings)
2022-06-22 19:14:52 +02:00
ikmaak
7ad9350596
Translated using Weblate (Dutch)
Currently translated at 100.0% (1455 of 1455 strings)
2022-06-22 19:14:51 +02:00
ikmaak
762b2299a0
Translated using Weblate (German)
Currently translated at 99.7% (1452 of 1455 strings)
2022-06-22 19:14:51 +02:00
James Valleroy
041e154696
Release v22.14 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.14
2022-06-20 20:52:43 -04:00
James Valleroy
fc0ce69ddb
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 20:51:27 -04:00
James Valleroy
a3b2751200
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 20:22:26 -04:00
Sunil Mohan Adapa
e4f8a7942f
ejabberd: Revert changes to always keep localhost (aa5b1cea126d37)
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-20 17:06:03 -07:00
Sunil Mohan Adapa
15038ae24c
transmission: Simplify actions using the privileged decorator
Tests:

- Get and set the storage path.

- Functional tests pass.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 18:17:18 -04:00
Sunil Mohan Adapa
a68776d04b
doc: dev: Use and recommend new privileged actions
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 18:17:07 -04:00
Sunil Mohan Adapa
4fed6921d6
actions: Add a decorator for marking superuser actions
Any privileged action (a method) can be marked as such with the new decorator. A
call to the method will be serialized into a sudo call (or later into a D-Bus
call). The method arguments are turned to JSON and method is called as
superuser. Arguments are de-serialized and are verified for type before the
actual call as superuser. Return values are serialized and returned where they
are de-serialized. Exceptions are also serialized and de-serialized.

The method must have be strictly typed and should not have keyword-only
arguments. Currently supported types are int, float, str, dict/Dict, list/List
and Optional.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 18:16:47 -04:00
nbenedek
3ec086411b
mediawiki: Add option to change the site name
[sunil: Update the form description for styling]
[sunil: Show the default site name when nothing is set]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-20 14:13:28 -07:00
Sunil Mohan Adapa
aa5b1cea12
ejabberd: Make localhost disabled option in domain selection
Remove the label description that says the localhost option is not shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-20 12:51:41 -07:00
James Valleroy
1a39212313
ejabberd: Add multi-select form for domains
Choices includes all of the available domain names in the system, as
well as any domains that are in ejabberd configuration.

Tests:

- Disable a domain. It is removed from ejabberd config.

- Enable a domain. It is added to ejabberd config.

- Enable all name services. Run ejabberd functional tests and observe
  that they pass.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-20 11:09:31 -07:00
James Valleroy
7d4c3dbb67
ejabberd: Automatically use coturn
Closes #2183.

Tests:

- Install Ejabberd. "Automatically manage audio/video call setup" is
  enabled.

- Set a domain name and install Coturn. Ejabberd config is updated.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-20 11:09:18 -07:00
James Valleroy
b43e42ac7a
tests: Add a dummy parameter for middlewares
From the Django 4.0 release notes: The get_response argument for
django.utils.deprecation.MiddlewareMixin.__init__() is required and
doesn’t accept None.

It appears that any non-None value can be used here, so I pass in
`True` when initializing middlewares for tests. I don't know if this
was the intended value, but it does fix the tests.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-20 10:40:48 -07:00
Sunil Mohan Adapa
2a0239b6ba
users: Fix deleting user LDAP entry with Django 4.0
Helps: #2228.

In Django 4.0, form_valid() method should be overridden instead of delete()
method. This is because DeleteView inherits from FormMixin. To make the code
work for Django 2.2 and up, implement both methods but make delete() method
available only after base __init__() so that Django does not show a warning with
Django 4.0.

Tests:

- Run unit tests on stable, testing and unstable containers.

- Create a temporary user and delete the user. User deletion success message
must be show. Create another user with the same username as the deleted user (to
ensure that deletion actually happened). Perform the test on stable, testing and
unstable containers.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 10:23:17 -04:00
Sunil Mohan Adapa
5d0a7c6d16
translation: Don't use session for storing lang pref in Django 4.0
Helps: #2228.

- In Django 3.0, storing language preference in session key is deprecated and
only the language cookie is used. In Django 4.0, this functionality is
completely removed along with the constant LANGUAGE_SESSION_KEY.

- Debian stable (Bullseye) uses Django 2.2 and this depends on code to store
language preference in session key. To work on Django 2.2 through 4.0, check if
the constant is available and then set the session key of the constant is found.

Tests:

- Change language in user edit page and see that it is persisted.

- After logout, the new language is still set.

- Changing language as anonymous user works.

- Run tests in stable, testing and unstable containers.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 08:15:58 -04:00
nbenedek
16ab0e4fc9
janus: improve description about coturn
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
[james: Remove space]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-18 10:40:26 -04:00
schiriki
7028e3d022
Add char field to set a password that is required to join the server
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
[james: Apply yapf formatting]
[james: Minor adjustment to help text]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-18 10:26:51 -04:00
109247019824
a7c9248200
Translated using Weblate (Bulgarian)
Currently translated at 24.2% (351 of 1447 strings)
2022-06-17 21:15:38 +02:00
Coucouf
1599bacfb0
Translated using Weblate (French)
Currently translated at 99.5% (1440 of 1447 strings)
2022-06-17 21:15:37 +02:00
Nikita Epifanov
51a68e7651
Translated using Weblate (Russian)
Currently translated at 99.7% (1444 of 1447 strings)
2022-06-13 14:19:14 +02:00
109247019824
159e42e26b
Translated using Weblate (Bulgarian)
Currently translated at 21.5% (312 of 1447 strings)
2022-06-08 18:16:52 +02:00