- 767 is the maximum for that size used by bootstrap. 768 and up are treated as
different size.
- magin-bottom is redundant
- Don't do text-align: center for description text. It does not match with form
elements and heading that follow. It also makes reading longer text harder.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
- 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>
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: #1724Closes: #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>
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>
- 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>
- 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>
Speedup actions script startup time from 3.6s to 0.45s on
A20-OLinuXino-LIME2 hardware, improve top three slowest imports:
- don't import constant from manifest (saves 2.7s)
- defer importing actions_utils and augeas (saves 0.3s + 0.15s)
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This enables clients to connect to servers on IPv6 networks. After the
connection, the tunnel works just like before.
- Make sure that after upgrading the server configuration, if the server is
running (which means it was enabled), restart the server to reflect the new
configuration.
- Don't increment the app version number as it has already been incremented in
this release cycle.
Tests:
- Check that the listen address before the change is 0.0.0.0:1194 and after
upgrade (temporarily increment app version number again) the listen address
automatically changes to *:1194.
- Download the new client profile and use it connect to the server on IPv4
network and observe that there is error during connection.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This package adds a single command on_ac_power to the system which is used by
unattended-upgrades to avoid running upgrades when on batter power.
Closes: #1753.
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. 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>