- 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>
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>
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>
- 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>
- 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>
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>
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>
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>
[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>
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>
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>
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>
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>
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>
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>