In case the local git config has gpg signing enabled for commits, it
causes the test commit to fail. Ensure gpg signing is disabled to
avoid this failure.
Tests:
- Gitweb functional tests passed. (Randomly there is a failure, but
seems unrelated, see #2349.)
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
- To avoid the following error when running Sphinx v5.3.0: "WARNING: Invalid
configuration value found: 'language = None'. Update your configuration to a
valid language code. Falling back to 'en' (English)."
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- This will leave /etc/{plinth,freedombox} empty by default making service more
robust to run across various environments and situations. See systemd's
explanation for more details.
- Use Debian maintainer scripts remove all the existing files in
/etc/plinth/modules-enabled.
- Read from /usr/share/freedombox/modules-enabled then from
/etc/plinth/modules-enabled and finally from /etc/freedombox/modules-enabled.
Later read ones override previously read files. Any file pointing to /dev/null
will mean the module must be ignored.
Tests:
- Clean up /etc/plinth, /etc/freedombox and
/usr/share/freedombox/modules-enabled. Run service and notice that files are
getting loaded from development folder using a debug message.
- Run setup.py and notice that files get installed in
/usr/share/freedombox/modules-enabled/ and in the next run they get loaded from
there.
- Create a override file in /etc/plinth/modules-enabled/transmission and notice
that overriden file gets priority over the one in
/usr/share/freedombox/modules-enabled.
- Link the file /etc/plinth/modules-enabled/transmission to /dev/null and notice
that is not loaded.
- Create another file in /etc/freedombox/modules-enabled/transmission and notice
that it overrides the previous two files.
- All affected modules are loaded.
- Build a new Debian package and ensure that upgrading 23.8 to new version
removes are all configuration files.
- Build developer documentation and test that Tutorial -> Full Code and Tutorial
-> Skeleton sections have been updated with references to
-.../modules-enabled/... paths.
- Install quassel and notice that certificates were copied to /var/lib/quassel
directory. Change domain to another domain and notice that certificates were
copied again to that directory.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #49.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Place the paragraph higher with the rest of them]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
PNG is for use by mobile app. SVG resize is for consistency.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- This improves modularity. Each app brings its own icons in its directory
instead of a centralized directory.
Tests:
- Install an app and notice that the installation notification has the icon.
- Visit an app's page in Apps and System (cockpit) section and ensure that the
app's icon is being shown.
- Visit the Apps and System section and notice that apps' icons are being shown.
- Visit the home page and notice that shortcuts' icons are being shown.
- Visit the URL /plinth/api/0/shortcuts and notice that the URLs for icons are
accessible and lead to proper icon files.
- Build developer documentation and notice that Tutorial -> View and Reference >
Menu pages show the expected updates.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
During uninstall step, zoph command may not be available and is_configured() may
error out. In such cases, let the base class AppView show the operations view.
Tests:
- Introduce a sleep in overridden uninstall() method for zoph. Notice that there
is an error showing the view during uninstall. Apply patch and the error is no
longer shown.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #2337.
Tests:
- Update code to stop/start a daemon that is not listed in any
Daemon/RelatedDaemon component of an app. Notice the message show.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #2342.
- Define a helper method to figure if app has backup. Use the helper method in
main AppView.
- Minor refactor of repeated code in uninstall view that gets the app and
app_id.
- Pass whether an app has backup or not into form. Delete backup related form
fields when backup is not supported. UX when fields are disabled is not nice, it
is not explained why fields are disabled. Better UX seems to be to remove the
backup fields entirely.
Tests:
- Install wireguard. In the uninstall form backup fields don't appear. Uninstall
is successful.
- Install Bepasty. In the uninstall form back fields are shown. Uninstall is
successful with and without a backup. In case backup is chosen, backup is
created and can successfully be restored.
- Run functional tests for bepasty. For wireguard uninstall test succeeds.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #2343.
- The change is needed due to change in privileged exception handling.
Tests:
- In vagrant machine, while FreedomBox service is running, run unit tests are
root user. Observe that exception is not handled properly without the patch. But
a more reasonable error is printed with the patch.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- Install version 5 of ttrss app. Update to version 6. Notice that apache is
reloaded.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Test:
- From F-droid, install and configure the app. Ensure that it works with
FreedomBox.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Reload apache for new configuration
- Increment app version to ensure new apache configuration is load immediately
after FreedomBox version upgrade.
- Don't re-enable a disabled app during app version upgrade.
- Update description to talk about the remote RPC URL for apps.
Tests:
- Use tremotesf client on LineageOS to connect on the URL /transmission-remote.
- Install transmission app freshly and notice that webserver reload was called
only once. Remote GUI is working.
- Install transmission without patches. Disable app. Apply patches, notice that
webserver was not reloaded. Enable and remote GUI is working.
- Install transmission without patches. Enable app. Apply patches, notice that
webserver was reloaded and remote GUI is working.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
We often change apache configuration for an app and when a new version of the
config is deployed the changes go un-applied until FreedomBox is restarted. Allow
specifying that config has changed in an particular version and reload of
configuration is needed.
Tests:
- Unit tests pass. The feature used in transmission works.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Check that the Hidden service hostname contains 56 bytes before the
.onion.
Helps: #2104
Tests:
- With Hidden service enabled, v3 check is passed.
- With Hidden service disabled, v3 check is skipped.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tests:
- With relay enable, relay port diagnostic is passed.
- With relay disabled, relay port diagnostic is skipped.
- With bridge relay enabled, obfs ports diagnostics are passed.
- With bridge relay disabled, obfs ports diagnostics are skipped.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Closes: #1615.
Tests:
- Throw an unconditional exception in enable_api_access() method. Reproduce the
problem described by installing ttrss app. Installation fails but ttrss shows up
in enabled list.
- Apply the patch. Try to install ttrss. When it fails, the app is not in the
enabled list.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Tiny Tiny RSS Fork calls itself "Tiny Tiny RSS" on F-Droid and "TTTRSS" on
project page.
- TTRSS-Reader is available on F-Droid and Google Play Store.
- Geekttrss is available on F-Droid.
- The original TTRSS app does not seem to be available on Google Play Store
anymore.
Tests:
- Install each app on respective platforms. Configure them and see if they work.
- Check for free software licenses on project pages.
- Click on each of the clients in the clients list in the web UI and see that
the links redirect to corresponding app pages on the appropriate store.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Mostly to avoid a repeated call to retrieve the list of changes.
- If an unknown value is read, user experience in terms of listed languages and
resetting the new language won't change.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Invoke PHP command to retrieve the list instead of parsing PHP file. This
fixes issue with regex not being generic enough to retrieve languages list using
double quotes. Also make is much more robust to future formatting changes.
- If there is an error in retrieving, which may happen due to future code
changes, fall back to showing a safe list of languages instead of making the app
unusable.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Add doc/*.wiki to the section covered by CC-BY-SA-4.0.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- When tt-rss is accessed via a smart device, authenticate the
user with basic auth, otherwise authenticate with mod_auth_pubtkt.
- I tested logging in with the official TT-RSS Android app and
Fiery Feeds for iPhone.
- Reload apache2 to apply the changes.
Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Use Authorization header instead of user agent]
[sunil: Update description to talk about both URLs]
[sunil: Increment app version to reload apache]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The older code is likely before the card approach was implemented and cached copy
had to updated. It is no longer needed as the shortcuts are not filtered based
on login required property in the template code.
Tests:
- When public visibility is enabled/disabled shortcut is properly shown on the
frontpage.
- When restarting the service the public visibility properly dictates whether
shortcut is show properly.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
The older code is likely before the card approach was implemented and cached copy
had to updated. It is no longer needed as the shortcuts are not filtered based
on login required property in the template code.
Tests:
- When public visibility is enabled/disabled shortcut is properly shown on the
frontpage.
- When restarting the service the public visibility properly dictates whether
shortcut is show properly.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Several tests failed randomly (on a slightly slow machine) while trying to
detect that a page change has occurred. Workaround this by handling the
exception thrown.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
All the apps including OpenVPN now use AppView and therefore using the standard
enable/disable button.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Drop all Samba shares when app is uninstalled
Test:
1. Install app, enable Open Share and Group Share
2. Reinstall app and confirm all shares get dropped
Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Remove /etc/openvpn when the app is uninstalled
* Tests:
1. Uninstall app and manually check if /etc/openvpn gets removed
2. Sucessfully install app
3. Functional tests: passed
4. In case we choose to purge packages in the future: I checked purging openvpn and it will not
remove /etc/openvpn.
Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Remove DATA_DIR, KEY_DIR, CONF_PATH and SYSTEMD_SERVICE_PATH
during the uninstall process. I manually ran apt-get --purge autoremove infinoted
and these files did not get deleted.
Tests:
1. Compare the output of tree -ra /etc/infinoted/ /etc/infinoted/
before and after reinstalling the app: all the files get reinstalled properly
2. Functional tests: passed
Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
In case apt full-upgrade fails for any reason, do not
continue. Otherwise, may get stuck unattended-upgrade later (#2266).
Since the dist-upgrade flag remains set, Plinth should retry the
dist-upgrade later.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>