7691 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
145b3ecc65
operation: Show operations on app page in addition to setup page
- Will be utilized by uninstall.

Tests:

- Operation progress is shown during uninstall of coturn app.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-29 08:28:17 -04:00
Sunil Mohan Adapa
6c67091ede
operation: Factor out template code into a separate file
- To be reused with app.html

Tests:

- During installation of the coturn app, operation progress is shown in the
page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-29 08:27:03 -04:00
Hugel
64e01fcfba
Translated using Weblate (Chinese (Simplified))
Currently translated at 69.0% (1019 of 1475 strings)
2022-08-24 05:19:09 +02:00
Veiko Aasa
2f1feeadf1
container: Show default values in command help
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Use the default formatter on all the subparsers]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-23 11:19:42 -07:00
Veiko Aasa
7f959ad304
container: Display help message when no args are passed
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2022-08-23 10:51:41 -07:00
James Valleroy
ecc31fe1fd
upgrades: Hold janus during dist-upgrade
Tests:

1. Install Janus on stable system.

2. Start a dist-upgrade to testing.

- Janus is held during dist-upgrade.

- Janus is force upgraded by Plinth after dist-upgrade is complete.

Closes: #2254.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-23 09:18:40 -07:00
James Valleroy
042dd95de5
janus: Handle upgrades to 1.0.*
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-23 09:18:31 -07:00
James Valleroy
6ede12da25
janus: Convert action to privileged
Tests: Run functional tests for janus.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-23 09:18:19 -07:00
nbenedek
7fc3ce7c20
d/control: Break ufw as we use firewalld
Some VPS providers preconfigure ufw which can break the
FreedomBox installation process on plain Debian. To
prevent this, make the freedombox package remove ufw.

Tests I made:
1. Enabled ufw on a Debian system
2. Built a custom package with the modification in the
control file
3. Installed the custom packge.

Result: ufw gets removed before the execution of
`update-initramfs: Generating /boot/initrd.img-5.10.0-17-amd64`

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-23 08:58:05 -07:00
nbenedek
0a47b38c6d
ttrss: add donation url
Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2022-08-23 18:12:51 +05:30
Jiří Podhorecký
8697e5a000
Translated using Weblate (Czech)
Currently translated at 100.0% (1475 of 1475 strings)
2022-08-20 17:16:00 +02:00
James Valleroy
32dcf595d3
Translated using Weblate (French)
Currently translated at 99.8% (1473 of 1475 strings)
2022-08-19 15:01:00 +02:00
Fioddor Superconcentrado
60f3fce7ec
Translated using Weblate (Spanish)
Currently translated at 100.0% (1475 of 1475 strings)
2022-08-19 14:58:06 +02:00
109247019824
32dfa479b7
Translated using Weblate (Bulgarian)
Currently translated at 32.8% (484 of 1475 strings)
2022-08-18 19:21:52 +02:00
Andrij Mizyk
0f6896975c
Translated using Weblate (Ukrainian)
Currently translated at 82.9% (1224 of 1475 strings)
2022-08-18 19:21:52 +02:00
Eric
23e9841dd0
Translated using Weblate (Chinese (Simplified))
Currently translated at 68.8% (1015 of 1475 strings)
2022-08-18 19:21:51 +02:00
Burak Yavuz
f25170ec4b
Translated using Weblate (Turkish)
Currently translated at 100.0% (1475 of 1475 strings)
2022-08-18 19:21:51 +02:00
Maxime Leroy
a2bc26ac26
Translated using Weblate (French)
Currently translated at 99.8% (1473 of 1475 strings)
2022-08-18 19:21:51 +02:00
nautilusx
0c89d73e48
Translated using Weblate (German)
Currently translated at 100.0% (1475 of 1475 strings)
2022-08-18 19:21:50 +02:00
James Valleroy
83bfc51931
upgrades: Add button to test dist-upgrade in development mode
Tests:

- In non-development mode, button does not appear.

- On testing system, button does not appear.

- On stable system in development mode, the button appears.

- Pressing the button starts a dist-upgrade.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Join strings that fit in the same line]
[sunil: Fix indentation in template]
[sunil: Change 'dist-upgrade' to 'distribution upgrade' in UI strings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-18 08:47:03 -07:00
Joseph Nuthalapati
f2bc91e876
tests: Make functional.is_available check faster
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-18 07:45:10 -07:00
James Valleroy
fd3166442f
ejabberd: Set hostname for test that relies on it
The test uses freedombox.local as the domain. This requires that Avahi
is enabled, and the hostname is set to freedombox.

Fixes #2232.

Test:
- ejabberd functional tests pass even after running tests for config
and avahi.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-16 10:47:40 -07:00
James Valleroy
18a79e1420
avahi: Don't disable after tests
It is used by other tests, such as ejabberd's.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-08-16 10:47:26 -07:00
James Valleroy
fa8954464b
debian: Update Spanish translation template
Thanks to Camaleón <noelamac@gmail.com>.

Closes: #1017452
2022-08-16 09:54:55 -04:00
James Valleroy
7071a05f47
Release v22.18 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v22.18
2022-08-15 20:55:15 -04:00
James Valleroy
29f7d8d209
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 20:53:57 -04:00
James Valleroy
52e2a52856
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 20:22:57 -04:00
Sunil Mohan Adapa
ce709ca8ce
doc: dev: Document previously undocumented components
Tests:

- Build HTML and ensure build succeeds that the changes are reflected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 18:55:02 -04:00
Sunil Mohan Adapa
bd90e59fa3
wireguard: Fix module.app usage that is no longer available
Tests:

- Add a new server and delete it.

- Add a new client and delete it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:51 -04:00
Sunil Mohan Adapa
f8136e8c8f
sharing: Add installing and enable/disable like other apps
- With the new setup mechanism automatic setup of app is no longer possible.

- Enabling/disabling is desirable by the user.

- During initial setup, ensure that Apache configuration file exists. Upgrade
for existing users to create the file.

- Enabling/disabling the app enables/disables the web server configuration file.

- Diagnostics are not available, disable them explicitly as auto-detect does not
work.

- Use the regular app base template instead of custom one.

- Use framework base classes for view and functional tests.

Tests:

- Run functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:49 -04:00
Sunil Mohan Adapa
d96a0a0a38
sharing: tests: functional: Fix a flaky test by waiting
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:47 -04:00
Sunil Mohan Adapa
b140a8104f
ssh: tests: functional: Keep service enabled after tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:44 -04:00
Sunil Mohan Adapa
2dfa8abeca
ejabberd: Fix showing the status messages
Django template language does not support overriding blocks that are from
included pages. The status messages were shown as part of the description and
when app header was introduced, these messages were no longer being shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:42 -04:00
Sunil Mohan Adapa
6af46e8e00
matrixsynapse: Fix showing the status messages
Django template language does not support overriding blocks that are from
included pages. The status messages were shown as part of the description and
when app header was introduced, these messages were no longer being shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:39 -04:00
Sunil Mohan Adapa
4b570e38da
backups: tests: Mark need for Django database during API tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:37 -04:00
Sunil Mohan Adapa
492d3a463c
setup: Allow starting installation when package manager is busy
Allows multiple apps to be queued up for installation. The operation for
installing the package will wait for the package manager to become available.
Wait for 24 hours before giving up.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:34 -04:00
Sunil Mohan Adapa
4cb1477c0d
setup: Drop setup_helper and use the new Operation API
- Task of managing an operation's progress is now performed by the new Operation
class. Drop them from setup helper.

- Task of providing install() method is now moved to package module. Instead of
storing operation specific data in setup_helper like objects, store them in
thread specific storage that can retrieved anywhere during the operation without
holding references.

- Progress of an operation show as a progress bar is currently missing. This
will be regression until fixed later.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:32 -04:00
Sunil Mohan Adapa
900c0d30b9
*: Drop module level app property
module.app property usage is greatly reduced because setup() and force_upgrade()
method are now part of App class instead of at the module level. Remove the
remaining minor cases of usage and drop the property altogether.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:29 -04:00
Sunil Mohan Adapa
0a9514228f
setup: Fix issue with immediate refresh after installation
When refresh_page_sec is set to zero (immediate refresh), the template does not
treat that as needing refresh at all. Fix this by distinguishing zero from None.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:27 -04:00
Sunil Mohan Adapa
7a36ee23f5
app: Drop optimization that skips setup process
When an app does not implement module setup() method, trying to get setup
version automatically results in App being updated to latest version. This
optimization seems hardly used and does not work when setup() is moved to App
from module level. Remove it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:24 -04:00
Sunil Mohan Adapa
bb2cbace6c
*: Make force upgrading part of app rather than a module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:22 -04:00
Sunil Mohan Adapa
f6ef0135d2
*: Add setup method on all apps that don't have it
This is needed for the apps to get enabled soon after installation. In case of
'sharing' app, a shortcut will appear on the apps page. This also brings
uniformity to help later refactoring.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:19 -04:00
Sunil Mohan Adapa
75f6abac1e
*: Make setup method part of App class for all apps
- Primary purpose is to complete the App API and allow for multiple apps to be
present in a module without a single clashing setup() method. Secondary
objective is to get rid of SetupHelper instance simple use App instance instead.

- This brings us closer to not needing to implement setup() method for some of
the typical apps.

- Remove default value None for old_version parameter.

  - A valid integer value is always passed to this call.

  - The value of None is undefined.

  - Simplifies the App API slightly.

- Drop setting 'pre', 'post' values to indicate the stage of setup for the App.

  - Simplifies the setup methods significantly. Eliminates a class of
  bugs (some of them seen earlier).

  - The UI can show a simple 'installing...' or progress spinner instead of
  individual stages.

  - There are currently many inconsistencies where many operations are not
  wrapped in helper.call() calls.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:16 -04:00
Sunil Mohan Adapa
cbef3e0163
operation: Add module to manage threaded operations
- Show a Django message if desired. Keep the operation after completion so that
the message can be collected later.

- Show notifications for running operations

  - Only if show_notification flag is set.

  - Use a custom template so that spinner can be shown.

- Log generously for operation creation, scheduling, running and completion.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:13 -04:00
Sunil Mohan Adapa
c6b69b2f41
package: Run installation operation using app_id instead of module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:10 -04:00
Sunil Mohan Adapa
fee21cba0d
notification: Pass full context when rendering body template
- Important information such as id of the notification should be available when
rendering the body template.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:06 -04:00
Sunil Mohan Adapa
5f8d3e30d0
coturn: Fix link to ejabberd in description
Tests:

- Clicking on the link in the coturn app description takes us to ejabberd app
page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-14 18:46:58 -04:00
Veiko Aasa
41a3148d3a
storage: Fix enumerating partitions without mount points
Fixes an issue where accessing Storage and Samba app pages throws a
HTTP error 500 when there are disk partitions without mount points.

Fixes #1904 #2245

Tested when an USB stick with Debian installer image is attached to
Freedombox board - both Storage and Samba apps work.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2022-08-13 15:59:57 -07:00
Veiko Aasa
12d02fecfb
container: Ignore flake8 error 'line too long' in bash script text
Also add container script to flake8 test in gitlab-ci.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2022-08-09 19:48:22 +03:00
Cosmin Humeniuc
bd71f9667c
container: Add IdentitiesOnly option to SSH
- Invoke ssh with the 'IdentitiesOnly` option enabled in order to
force the use of the configured authentication identity. This is
needed in situations where ssh-agent offers many different identities.

Closes #2243

Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2022-08-09 19:48:22 +03:00