Closes: #2050.
Current implementation of Zoph does not work with version 0.9.9 in Buster. As an
easy hack to make the app only available in Bullseye, php7.4 dependency has been
added. After making the last release for Buster, this can be removed to allow
compatibility with newer versions of PHP that become available.
An incomplete list of problems with current implementation with Buster:
- zoph --get-config is unavailable. Can be circumvented by querying the DB
directly.
- zoph --dump-config is unavailable. Can be circumvented by querying the DB
directly.
- interface.user.remote and authentication based on REMOTE_USER are unavailable.
The Apache configuration shipped by Debian package does not include FreedomBox
related LDAP configuration.
- interface.user.cli defaults to "0" instead of "1". This cases running zoph
from command line. This can be circumvented by setting this configuration value
to "1" via DB interaction.
Tests:
- On stable container, zoph is not available for installation.
- On testing container, zoph can be installed, setup and used.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Remove the percentage check, which was incorrectly checking used
percent, not free percent.
Closes: #2046.
Tests:
- Fill up disk space so that 4.5G is free. Dist upgrade does not start
due to not enough free space.
- Fill up disk space so that 5.5G is free. Dist upgrade can be
started.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Identify Freedbombox admin who installed the app to be zoph admin.
- Implement backup and restore.
- Photos directory should remain at /var/lib/zoph, for proper operation of
backups.
- There remains an issue that the App is enabled before it is configured but
will not work correctly until configuration.
- OpenStreetMap mapping is enabled. These should be configurable before
installation.
- Add initial forms.py and views.py to Zoph app, however these are currently
unused as urls.py does not invoke the view. When the view is not invoked the
Zoph App installs, with single signon, currently as the first LDAP user, rather
than the plinth user.
- The first user's preferences are not set, and need to be manually set to avoid
other errors.
* Sunil's changes
- Squash commits and re-split them.
- Drop documentation as it will be auto populated from wiki later.
- Remove outdated validation code from manifest.
- Drop some dead code.
- Don't send MySQL password over command line for improved security. Instead
rely on Unix authentication of root user similar to backup/restore process.
- Use JSON for exchanging configuration dump to avoid encoding errors.
- Add username validation to avoid a potential SQL injection.
- Update description for neural tone and brevity. Add information about how user
accounts work in FreedomBox
- Fix functional tests.
- Drop all code related to changing photos path until it is ready.
- Update URL from /zoph to /zoph/ to avoid another redirect.
- Fix disabling the app.
- Use icon that Zoph uses for favicon as logo. Update copyright file.
- Fix spelling unzip.
- Minor refactors. Run yapf and isort.
- Use subprocess.run() instead of os.popen() everywhere for better security with
argument parsing.
- Enable OpenStreetMap by default. User have a choice to disable it before using
the app. Add label to explain privacy concerns.
- Fix dropping database by using --force argument.
- Cleanup enabling the app to not enable the app when updating configuration.
- Use AppView's default template instead of overriding.
- Update functional tests to just check if the app is enabled/disabled as
expected. Checking that Zoph site is available will require reliable handling of
admin user.
Signed-off-by: John Lines <john@paladyn.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Add running spinner before every app installation step text, this
makes the fact that installation is in progress visually more noticeable.
Tested when installing the mediawiki app, the running spinner is shown
on every installation step.
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Horizontally align the text and spinner by the spinner inline]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Matrix Synapse 1.26 needs a new dependency python3-psycopg2. apt
preferences have to be updated to be able to install this package from
buster-backports.
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
- Set default SSH and Samba port for testing a container.
- Set default URL for running functional tests from within container.
- Update instructions.
Closes: #2015.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Fioddor Superconcentrado <fioddor@gmail.com>
In testing and unstable, jQuery 3.5.1 is available. For security reasons, it
removes expanding of HTML code that JSXC relies on. Restore that functionality
as shown in jQuery Upgrade Guide.
Tests performed:
- Log in JSXC. Add a contact. In the contact list, the name of the contact is
shown properly.
- Clicking on the contact open a proper chat window.
- Using to two user accounts add each other to contact lists and start
conversation, the conversation show work properly.
- Authenticating each other and performing a secure conversation should work
properly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
During 'setup' and 'update' post installation calls, the mediawiki
app page doesn't show any status information. Use the call name 'post'
instead so that the 'Performing post-install operation' message is displayed on the app page.
Fixes#2024
Tested that all the mediawiki app tests pass on first app installation.
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Fioddor Superconcentrado <fioddor@gmail.com>
Notification for dist upgrade started, or not started due to lack of
free space.
Currently, these notifications only appear once.
Tests:
- Checked each notification appears.
- Notification does not appear again after being dismissed.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
Separate checking for dist upgrade from other setup. We don't want to
start a dist upgrade during the module's setup.
Tests: Checked logs for the following:
- Up to date.
- Updates not enabled.
- Dist upgrade started.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
Fixes: #2026.
Upgrade from 1.2.1+dfsg-1+b1 to 1.3.x.
Tests:
- Install version 1.2.1+dfsg-1+b1. Change the default media directory. Run
unattended upgrades it will fail to upgrade. With the new patch, run apt update.
This will force upgrade. After upgrade the earlier set media directory is
retained.
- Functional tests run.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests performed:
- Functional tests work as expected.
- Updating the media directory works newly updated media directory is show.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #2023.
When importing the test module, datetime.now() is executed and value is kept. If
a test suite runs for a long time, the time deltas are being calculated much
later when the test case runs. This creates an difference in expected different
between the two values.
Fix this by completely removing all uses of time relative to current date time.
Only use absolute date time values. This should not reduce the effectiveness of
the test cases.
Tests performed:
- Rerun unit tests for backups module.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
After enabling the calibre app, the app uses IP 127.0.0.1 to advertise
ODPS feeds via BonJour/mDNS. It breaks accessing freedombox.local as it now
points to 127.0.0.1.
This MR disables the BonJour in Calibre.
Fixes#2027.
Tests performed on both Debian stable and testing containers:
- Check the accessability of freedombox.local:
1) Before applying patch:
- Start the container, check on the host that freedombox.local points to
correct IP address of the container:
```
host$ avahi-resolve -4 --name freedombox.local
freedombox.local 10.42.1.166
```
- Enable the calibre app. Check on the host that freedombox.local
points to wrong ip address 127.0.0.1:
```
host$ avahi-resolve -4 --name freedombox.local
freedombox.local 127.0.0.1
```
2) Stop the calibre app, apply patch (update the calibre systemd service file,
reload systemd), restart the Service Discovery app, check on the host that
freedombox.local points to correct address.
3) Start the calibre app, check on the host that freedombox.local points to
correct address.
- All the calibre functional tests pass.
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tests performed:
- Upgrade from old 2.x versions to 3.x has not been tested.
- Fresh installation of radicale 3 works (via FreedomBox). Web interface works.
Able to create a calendar.
- Upgrading from radicale 2 to radicale 3 works (via unattended-upgrades). There
were no configuration file prompts in FreedomBox (where only
/etc/radicale/config is modified).
- After upgrade, all functional test cases for radicale in FreedomBox
passed (including backup and restore of data).
- After upgrade, I have tested that permissions system as configured in
FreedomBox owner_only = allow file permissions, owner_write and authorized are
same as defined in radicale.
- These permissions have worked as expected as tested with Thunderbird.
- Radicale says that file based permissions format has changed, however,
FreedomBox relies on only the right files provided by default.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>