Commit Graph
4549 Commits
Author SHA1 Message Date
James Valleroy 6aa83e7118 wireguard: Add skeleton for new app
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Use the form from base template to show enable/disable properly]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:35 -05:00
Sunil Mohan Adapa f444fba6ea network: Add method to re-activate connections after an update
- When a connection is updated with newer settings, the changes don't reflect
  unless the connection is deactivated and reactivated. Add a convenience method
  to achieve this.

- Don't perform any operation if the connection is not active.

- Wait until connection is deactivated before reactivating

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:52:32 -05:00
Sunil Mohan Adapa 42569d75ec network: Allow setting the auto-connect property on a connection
Also don't require updating all the common properties of a connection when
updating only some properties such as 'autoconnect'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:52:30 -05:00
Sunil Mohan Adapa 68e5684d10 network: Fix activating connections that don't have real devices
When a WireGuard connection is activated, it create the wireguard interface.
Looking for matching devices before activating a connection will then fail. Use
get_all_devices() API to get the list of all devices that are real and those
that will be created due to connection activation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 13:52:26 -05:00
James Valleroy 25317700c2 Translated using Weblate (French)
Currently translated at 100.0% (1163 of 1163 strings)
2020-01-18 15:42:53 +01:00
Nektarios Katakis e0518bb370 Translated using Weblate (Greek)
Currently translated at 95.0% (1105 of 1163 strings)
2020-01-17 22:21:33 +01:00
ikmaak 5ad0be5d18 Translated using Weblate (Dutch)
Currently translated at 85.0% (989 of 1163 strings)
2020-01-17 22:21:24 +01:00
Thomas Vincent 5b0235751d Translated using Weblate (French)
Currently translated at 100.0% (1163 of 1163 strings)
2020-01-17 22:21:22 +01:00
Veiko Aasa 3a202af843 samba: Add unit and functional tests
- Add functional tests
- Add unit tests for samba views
- New dependency for running functional tests: smbclient
- Make port configurable for the smbclient

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 02:47:06 +05:30
Allan Nordhøy aa69585cb6 samba: Fix spelling
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-01-16 18:23:05 +02:00
ikmaak 9b9d87bc63 Translated using Weblate (Dutch)
Currently translated at 84.6% (980 of 1159 strings)
2020-01-14 01:56:47 +01:00
James Valleroy 4386ad4f13 Release v20.0 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 19:12:07 -05:00
James Valleroy 7e1f02be7e locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 18:09:46 -05:00
Sunil Mohan Adapa 4ad3a9ee8f networks: Fix crashing when accessing network manager D-Bus API
Network Manager client fetches the basic information from Network Manager,
caches it and updates the cache whenever it receives the signal. So, create only
a single instance of it and reuse it. Reusing from different threads is
apparently fine because the underlying DBusConnection is a singleton[1] that is
meant to be used from multiple threads.

The glib main loop context that is related to the client must run even after the
network manager client object goes away[2]. So, create the network manager
client instance from a thread that continues to run the glib main thread.

This fixes an infrequent crash when accessing network manager page. The problem
was reproducible from very early version of Network Manager and FreedomBox.
However, in more recent versions of NetworkManager 1.20 with recent DBus changes
in FreedomBox, the problem is more prominent. The problem reduces to a simple
warning in NetworkManager 1.22.

Closes: #1724
Closes: #382

Tests:

- Reproduce the problem by accessing the networks app index page repeatedly.

- Create a simple test case file to reproduce the problem and ensure that the
  fix works there.

- On Network Manager 1.20 repeatedly access the networks app index page and
  create/delete/activate/deactivate/show connections.

- On Network Manager 1.22 repeatedly access the networks app index page and
  create/delete/activate/deactivate/show connections.

Links:

1) https://developer.gnome.org/gio/unstable/GDBusConnection.html#g-bus-get-sync

2) https://developer.gnome.org/libnm/stable/NMClient.html#nm-client-get-main-context

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 17:22:39 -05:00
Sunil Mohan Adapa 7695047606 networks: Remove unused method
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 17:22:36 -05:00
Sunil Mohan Adapa b5ae03239c networks: Refactor creating a network manager client
This allows better control on how to create and maintain the network manager
client.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 17:22:32 -05:00
James Valleroy 693b109806 security: Add explanation of sandboxing
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-13 12:11:05 -08:00
James Valleroy f6c7f77c0f matrixsynapse: Allow upgrade to 1.8.*
- Use new configuration from package.
- Re-run the post-install to set our custom config.
- Re-apply setting for public registration if enabled.

Tested by manually downgrading matrix-synapse to 1.6.1-1 and then
running apt update.

Fixes #1754.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-13 11:55:04 -08:00
Nektarios Katakis 5b399ef2f7 Translated using Weblate (Greek)
Currently translated at 82.9% (961 of 1159 strings)
2020-01-13 15:50:40 +01:00
Ralf Barkow 5db2bdb261 Translated using Weblate (German)
Currently translated at 100.0% (1159 of 1159 strings)
2020-01-13 15:50:35 +01:00
Veiko Aasa ff27f1d21b deluge: Manage starting/stoping deluged
- run deluged daemon with default configuration location
- deluge-web: autoconnect to the deluged daemon
- functional tests: assert deluge-web is connected to the deluged daemon

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-12 15:55:49 -05:00
Thomas Vincent 92d8d4fb3a Translated using Weblate (French)
Currently translated at 97.7% (1132 of 1159 strings)
2020-01-07 07:21:19 +01:00
Michael Breidenbach 3b6c9816bd Translated using Weblate (German)
Currently translated at 100.0% (1159 of 1159 strings)
2020-01-07 07:21:18 +01:00
Nektarios Katakis 5001f10c68 Translated using Weblate (Greek)
Currently translated at 75.4% (874 of 1159 strings)
2020-01-06 00:21:21 +01:00
James Valleroy 0460ecf89f openvpn: Add diagnostic for ipv6 port
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 15:18:06 -05:00
Allan Nordhøy 93d394c09b Translated using Weblate (Norwegian Bokmål)
Currently translated at 88.4% (1024 of 1159 strings)
2020-01-04 15:30:47 +01:00
James Valleroy b0bc7e8e76 Translated using Weblate (Greek)
Currently translated at 68.7% (796 of 1159 strings)
2020-01-04 15:30:46 +01:00
Michael Breidenbach ce2f75f02d Translated using Weblate (German)
Currently translated at 100.0% (1159 of 1159 strings)
2020-01-04 15:30:46 +01:00
James Valleroy 5efe5f80ef Translated using Weblate (Greek)
Currently translated at 68.7% (796 of 1159 strings)
2020-01-04 15:17:40 +01:00
Nektarios Katakis ac981d50ff Translated using Weblate (Greek)
Currently translated at 68.7% (796 of 1159 strings)
2020-01-04 15:16:56 +01:00
Sunil Mohan Adapa 0a48175249 storage: Ignore errors resizing partition during initial setup
On Raspberry Pi 3B+ image, it was observed that resizing partition fails during
initial setup. Due to this, Apache, SSH and Plinth become unavailable. Since
resizing the partition is not a critical operation to perform to bring up
FreedomBox, it is safe it ignore the error. In these cases, the user will have
to the storage app and retry manually after bring prompted by low disk space
message.

Tests:

- Introduce deliberate error in expand partition operation. Modify code to
  always detect that partition can be expanded. Remove storage module from
  plinth_module table in plinth.sqlite3. Run plinth. Notice that storage setup
  is run but expanding partition fails. Even after expanding partition fails,
  storage module is fully setup. Plinth proceeds with starting web server and
  storage module is found in the plinth_module table of plinth.sqlite3.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 09:08:43 -05:00
Joseph Nuthalapati cfe014a3f4 mediawiki: Allow admin to set default skin
Fixes #1731

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Refactor getting skins and form field for simplicity]
[sunil: Remove incorrect change to showing success form message]
[sunil: Minor simplification to editing the configuration]
[sunil: Read configuration value enclosed in single as well as double quote]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-03 16:31:28 -08:00
Joseph Nuthalapati 890d45bd64 mediawiki: Use a mobile-friendly skin by default
- Timeless is a mobile-friendly skin.
- This is a cheaper solution for FreedomBox as compared hosting a
  separate mobile website like the WikiMedia sites do

Fixes #1732

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Remove unneeded upgrade to app version number]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-03 16:31:25 -08:00
Michael Breidenbach e5d2adb2e2 Translated using Weblate (Swedish)
Currently translated at 100.0% (1159 of 1159 strings)
2020-01-03 08:55:57 +01:00
Doma Gergő b478eb2330 Translated using Weblate (Hungarian)
Currently translated at 91.2% (1057 of 1159 strings)
2020-01-03 08:55:55 +01:00
Nektarios Katakis b06c114cf9 Translated using Weblate (Greek)
Currently translated at 31.8% (368 of 1159 strings)
2020-01-03 08:55:54 +01:00
Michael Breidenbach 5caa800db9 Translated using Weblate (German)
Currently translated at 99.9% (1158 of 1159 strings)
2020-01-03 08:55:40 +01:00
Sunil Mohan Adapa 9e166f799c gitweb: Fix flake8 error that is causing pipeline failures
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-02 17:49:02 -08:00
Nektarios Katakis 018767aaae openvpn: Enable support for communication among all clients
Closes: #1694

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-02 16:54:29 -08:00
Veiko Aasa 171f2976cf gitweb: Add tests for views
- Delete unused key from repo info dict
- Rename actions test file

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Make URLs setup cleanup properly, minor cosmetics and warning fixes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-02 16:31:37 -08:00
Veiko Aasa e6b0d732d5 users: Fix test fixture that disables console login restrictions
Fixes pytest StopIteration errors when console login restrictions are disabled
before running tests.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2020-01-02 19:04:38 +02:00
James Valleroy 38442ef7a0 Release v19.24 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 21:18:16 -05:00
James Valleroy 82ada81f19 locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 20:44:24 -05:00
erlendnagel 5919c06fe8 Translated using Weblate (Dutch)
Currently translated at 85.3% (973 of 1141 strings)
2019-12-31 02:40:42 +01:00
Ralf Barkow 7f7c3222f1 Translated using Weblate (German)
Currently translated at 96.4% (1100 of 1141 strings)
2019-12-31 02:40:41 +01:00
Sunil Mohan Adapa 8a4fd1def4 mediawiki: Fix problem with session cache failing logins
Set the session cache to use database. This will also have the added benefit of
sessions persisting across reboots (and PHP session cleanups). See bug report on
why this is needed. https://salsa.debian.org/freedombox-team/plinth/issues/1736

We are unfortunately modifying the MediaWiki settings that file that we are
shipping when preferences are modified in the FreedomBox UI. This means that if
a newer version of this settings file is shipped, then FreedomBox package will
show configuration file prompts. To solve this, introduce a new static settings
file that will have lower priority than the file modified by FreedomBox UI.

Closes: #1736.

Tests:

- Test that running FreedomBox daemon with changes runs the MediaWiki app's
  setup and introduces the new line into LocalSettings.php

- That LocalSettings.php will be populated with lines to include
  FreedomBoxStaticSettings.php and FreedomBoxSettings.php in that order when
  'actions/mediawiki setup' is run. This should work when no lines are present,
  one of the lines is already present and both the lines are already present.

- Test that running './setup.py install' installs FreedomBoxStaticSettings.php.

- Test that MediaWiki runs without FreedomBoxStaticSettings.php

- Test that private wiki and public registrations settings work with the new
  changes.

- Run functional tests for MediaWiki app with the changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 20:38:30 -05:00
James Valleroy 89aefc00cf security: List whether each app is sandboxed
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: i18n for yes, no, N/A strings, avoid changing an i18ned string]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-30 12:29:23 -08:00
Sunil Mohan Adapa 1be1af9b18 minidlna: Fix showing clients information
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:38:05 -05:00
Sunil Mohan Adapa f65b4ec407 views: Don't require sending diagnostics module name separately
- Reuse the app_id already available to the view.

- Implement automatically detecting if an app has implemented diagnostics.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:38:02 -05:00
Sunil Mohan Adapa 636aa05b66 app: Implement API to check if app/component has diagnostics
- Use the API to skip diagnosing apps that don't implement diagnostics.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:38:00 -05:00