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