5005 Commits

Author SHA1 Message Date
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
57c8bea9a5
storage: Make partition resizing work with parted 3.3
On Raspberry Pi 3B+ image, it was observed that resizing partition fails during
initial setup. Due to this, Apache, SSH and Plinth become unavailable. This is
due newer version of parted 3.3 (Debian testing/unstable) which does not work
with ---pretend-input-tty option as previously expected of parted 3.2 (Debian
buster).

Fix the problem by sending answers to promoted questions via stdin instead of
via command line. This solution works on both versions of parted, i.e., 3.2 and
3.3.

Tests:

- On a freshly built Raspberry Pi 3B+ unstable image the problem is
  reproducible. Running expand partition fails repeatedly.

- Downgrade version of parted to 3.2 observe that the expanding operation runs
  fine. Upgrade to version parted 3.3 again.

- Apply the patch on the action script. Re-run expanding partition and observe
  that the problem is resolved. The version of parted is 3.3.

- Downgrade the version of parted to 3.2. Downsize the partition, re-run
  expanding partition.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-04 09:08:51 -05: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>
v19.24
2019-12-30 21:18:16 -05:00
James Valleroy
86ccf5b2ed
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 21:17:14 -05:00
James Valleroy
b4a0c7e908
debian: Update Dutch debconf translation (Closes: #947136)
Thanks to Frans Spiesschaert for the patch.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 20:52:28 -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
Sunil Mohan Adapa
e0dba2cc17
apache: Move diagnostics for checking URLs into apache module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:57 -05:00
Sunil Mohan Adapa
c617cecc02
daemon: Move diagnosing using netcat to daemon module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:54 -05:00
Sunil Mohan Adapa
97d8166f31
daemon: Move diagnosing port listening into daemon module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:52 -05:00
Sunil Mohan Adapa
a1fd8f45be
cosmetic: Yapf and isort fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:49 -05:00
Sunil Mohan Adapa
2ebb565c92
diagnostics: Use new component based API for all diagnostic tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:46 -05:00
Sunil Mohan Adapa
1f14c42af5
firewall: Implement new diagnostic tests to check port status
- Test that a port meant to available to internal network is available.

- Test that a port meant to available to external network is available.

- Test that a port meant to unavailable to external network is unavailable.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:43 -05:00
Sunil Mohan Adapa
68bc2f45a5
daemon: Implement diagnostic test to check if a daemon is running
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:41 -05:00
Sunil Mohan Adapa
9cc3ddea2c
daemon: Implement diagnostic test for daemon component
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:38 -05:00
Sunil Mohan Adapa
0d5493dae7
apache: Implement diagnostic test for web server component
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:35 -05:00
Sunil Mohan Adapa
50644b02a4
app: Introduce API to run diagnostics on an app
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:32 -05:00
Sunil Mohan Adapa
d9f6928001
app: Introduce API to return a list of all apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:29 -05:00
Sunil Mohan Adapa
176e7ecae3
help: Refactor to move app into __init__.py for consistency
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:19 -05:00
Kunal Mehta
592060e057
mediawiki: Pass --quick when running update.php
By default update.php will pause for 5 seconds before doing anything
to remind the user to make a backup before the script runs. Since we're
running it in a separate process where the user won't get that opportunity
anyways, skip the 5 second delay by passing `--quick`.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 18:09:20 -08:00
James Valleroy
ddd1abdb8a
upgrades: Add systemd sandboxing features to repository setup service
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 17:49:13 -08:00
James Valleroy
c91939710b
storage: Add systemd sandboxing features to udiskie service
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 17:49:10 -08:00
James Valleroy
1498a9ae83
infinoted: Use systemd sandboxing features
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 17:49:07 -08:00
James Valleroy
b4e00d2574
deluge: Use systemd sandboxing features
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Remove directive for unused logs directory]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 17:48:31 -08:00
James Valleroy
bc748ed5bb
mldonkey: Add ProtectKernelLogs
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 17:47:49 -08:00
James Valleroy
c9d9d4736b
firewall: Support upgrading firewalld to 0.8
Closes #1737.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-12-29 14:46:36 -08:00
Veiko Aasa
aa2aa56c46
users: Add tests for the Samba user database
Fix: after renaming a user delete old username from the Samba password database

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-29 16:59:04 -05:00
Veiko Aasa
962e5b488f
storage: Tests for the directory validation action
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-26 16:37:01 -05:00
James Valleroy
fc69c8418f
debian: Update French debconf translation (Closes: #947386)
Thanks to Jean-Pierre Giraud for the patch.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-26 13:36:44 -05:00
Allan Nordhøy
863eb077d9
Translated using Weblate (Norwegian Bokmål)
Currently translated at 90.0% (1027 of 1141 strings)
2019-12-26 14:21:22 +01:00
Doma Gergő
35c2b225e1
Translated using Weblate (Hungarian)
Currently translated at 91.8% (1048 of 1141 strings)
2019-12-26 14:21:21 +01:00
Nektarios Katakis
cc6208e25f
Translated using Weblate (Greek)
Currently translated at 5.9% (67 of 1141 strings)
2019-12-26 14:21:20 +01:00
Michael Breidenbach
1428b3ebef
Translated using Weblate (Swedish)
Currently translated at 100.0% (1141 of 1141 strings)
2019-12-22 21:21:11 +01:00