8159 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
cd512bd24c
mediawiki: Use drop-in config component for /etc files
- Don't ship /etc/mediawiki/FreedomBoxSettings.php anymore. Create the file on
first setup. Keep old file on update.

- Simplify and unify how the configuration settings are read and written.

Tests:

- Run unit and functional tests.

- All the drop-in config files in /etc/ are symlinks.

- Shipped configuration is effective.

- Upgrade from older version keeps old configuration.

- Config files are all symlinks in /etc/

- When upgrading from older version FreedomBoxSettings.php does not change.
  FreedomBoxStaticSettings.php becomes a symlink.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:16 -04:00
Sunil Mohan Adapa
c326b35238
matrixsynapse: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Login to Matrix using app.element.io works.
- Fail2ban rules work

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:13 -04:00
Sunil Mohan Adapa
0e82c58f1b
letsencrypt: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Unable to test renewal hook

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:10 -04:00
Sunil Mohan Adapa
0bddd4bb54
janus: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Web interface is accessible

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:08 -04:00
Sunil Mohan Adapa
6688ec9a20
ikiwiki: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks in /etc/
- Creating blog and wiki works
- Wiki is accessible

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:05 -04:00
Sunil Mohan Adapa
4950639fbf
i2p: Use drop-in config component for /etc files
Tests:

- Could not test as the app is uninstallable

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:01 -04:00
Sunil Mohan Adapa
340c8bd156
email: Use drop-in config component for /etc files
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:28:58 -04:00
Sunil Mohan Adapa
99b23b75a4
deluge: Use drop-in config comonents for /etc files
Tests:

- Could not test as the app is not installable.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:28:54 -04:00
Sunil Mohan Adapa
13db2c2372
gitweb: Use drop-in config component for /etc files
Tests:

- Config files are all symlinks /etc/
- Configuration file is effective
- Web interface works
- Web interface authentication works

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:27:32 -04:00
Sunil Mohan Adapa
ad13211f7e
debian/install: Add new place in /usr to keep drop-in config files
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:27:28 -04:00
Sunil Mohan Adapa
598e1e3b4a
config: Add new component for managing drop-in /etc/ config files
- Use two separate strategies: one to symlink from /etc to files in /usr/ and
two to copy files from /usr to /etc. The latter is needed for some rare cases
where symlinks don't work because the daemon runs in a chrooted environment.

- Update tutorial and reference sections in developer documentation.

Tests:

- Unit tests works and are comprehensive.

- Using the component in apps works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:27:23 -04:00
Sunil Mohan Adapa
9cc5ecc909
*: Fix icons not present in the generated .deb
Closes: #2352.

Perform a recursive glob with '**' when performing search files to installed
from static folder so that icons files are found and installed as extra package
data.

Tests:

- Build a .deb package and confirm that none of the icons files have been
installed into /usr/lib/python3/dist-packages/plinth directory. With the fix,
rebuild the package and confirm that .png and .svg files are present at least
some plinth/modules/*/static/icons/* path.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-04 13:10:23 -04:00
James Valleroy
4878e7f021
shadowsocksserver: Use shared manual page with Client
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-29 16:37:27 -04:00
James Valleroy
e719b1ed49
shadowsocksserver: Add separate app for Shadowsocks server
Closes: #729.

Tests:

- Install Shadowsocks Server. Install Shadowsocks Client, and set the
  server to localhost, and set the same password as the server. Use
  curl to connect to local SOCKS proxy on port 1080 and fetch a
  website.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Update some docstring comments for shadowsocks clients]
[sunil: Use the term Censorship instead of network filters]
[sunil: Prevent enabling both apps when setup is re-run]
[sunil: Update typehint for a privileged method to be minimal]
[sunil: Accept connections from external IPs too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-05-23 13:58:39 -07:00
James Valleroy
1e905d8553
Release v23.10 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.10
2023-05-22 21:14:59 -04:00
Frederico Gomes
38835a85d6
Translated using Weblate (Portuguese)
Currently translated at 31.0% (468 of 1506 strings)
2023-05-22 17:50:51 +02:00
ikmaak
68e948837b
Translated using Weblate (Dutch)
Currently translated at 100.0% (1506 of 1506 strings)
2023-05-22 17:50:49 +02:00
Frederico Gomes
57cff2f9cb
Translated using Weblate (Portuguese)
Currently translated at 13.0% (196 of 1506 strings)
2023-05-20 16:49:27 +02:00
James Valleroy
143188a363
gitweb: Disable gpg signing in tests
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>
2023-05-19 22:21:56 +03:00
Sunil Mohan Adapa
5d83469c27
doc/dev: Set language code explicitly in Sphinx configuration
- 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>
2023-05-13 07:09:20 -04:00
Sunil Mohan Adapa
40eecb6446
*: Move modules-enabled files to /usr/share
- 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>
2023-05-13 07:08:43 -04:00
Ihor Hordiichuk
88d7e1c934
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1506 of 1506 strings)
2023-05-10 16:49:27 +02:00
Burak Yavuz
a2bae58343
Translated using Weblate (Turkish)
Currently translated at 100.0% (1506 of 1506 strings)
2023-05-10 16:49:27 +02:00
ikmaak
91564e574c
Translated using Weblate (Dutch)
Currently translated at 99.4% (1498 of 1506 strings)
2023-05-10 16:49:26 +02:00
gallegonovato
e0245b99a4
Translated using Weblate (Spanish)
Currently translated at 100.0% (1506 of 1506 strings)
2023-05-10 16:49:25 +02:00
James Valleroy
6cce7126dd
Release v23.9 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.9
2023-05-08 21:12:59 -04:00
James Valleroy
eb7bacd663
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-08 21:12:06 -04:00
James Valleroy
d5dbf6b9fc
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-08 20:38:48 -04:00
James Valleroy
119ab20c17
help: Add information on obtaining source code
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>
2023-05-08 12:19:54 -07:00
Nobuhiro Iwamatsu
1c0702dac4
Translated using Weblate (Japanese)
Currently translated at 1.4% (22 of 1486 strings)
2023-05-08 01:50:02 +02:00
Sunil Mohan Adapa
b47417479d
doc/dev: Update copyright year
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-07 13:11:34 -04:00
Sunil Mohan Adapa
b4b727b3b7
minidlna: Resize icon and export to PNG also
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>
2023-05-07 13:11:31 -04:00
Sunil Mohan Adapa
ac3754fa2f
theme: Move icons to app folders
- 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>
2023-05-07 13:11:27 -04:00
Sunil Mohan Adapa
f30c028289
zoph: Don't fail at showing app view during uninstall
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>
2023-05-07 10:46:23 -04:00
Sunil Mohan Adapa
c8a8d4bf33
service: Remove reference to managed_services in a message
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>
2023-05-07 07:36:54 -04:00
Sunil Mohan Adapa
8b7c0fb0bf
uninstall: Fix issue with uninstall of apps that have no backup
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>
2023-05-06 07:08:06 -04:00
Sunil Mohan Adapa
43a2734917
storage: Handle mount error properly
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>
2023-05-06 06:56:53 -04:00
Sunil Mohan Adapa
e525d0ff72
ttrss: Use the apache component to restart apache on config change
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>
2023-05-03 08:00:43 -04:00
Sunil Mohan Adapa
31e4616470
transmission: Add Tremotesf to list of client apps
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>
2023-05-03 08:00:40 -04:00
Sunil Mohan Adapa
209e9c681e
transmission: Allow remote UIs to connect
- 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>
2023-05-03 08:00:37 -04:00
Sunil Mohan Adapa
1406f53019
apache: Reload apache using component if config changes
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>
2023-05-03 08:00:34 -04:00
James Valleroy
3c4771ed00
tor: Rename Hidden service to Onion service
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-05-02 08:44:00 -07:00
James Valleroy
f9e039b4cb
tor: Check if Hidden service is version 3
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>
2023-05-02 08:43:52 -07:00
James Valleroy
56adc7ae22
tor: Only diagnose relay ports if feature enabled
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>
2023-05-02 08:43:38 -07:00
Sunil Mohan Adapa
3922d7c71f
ttrss: Don't show app in enabled list of apps if install fails
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>
2023-04-29 08:47:23 -04:00
Sunil Mohan Adapa
537cc749d1
ttrss: Update list of clients
- 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>
2023-04-29 06:22:22 -04:00
Sunil Mohan Adapa
3d1beaf640
mediawiki: Simplify retrieving the default language
- 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>
2023-04-27 08:39:28 -04:00
Sunil Mohan Adapa
f3621a274d
mediawiki: Make retrieving list of supported languages robust
- 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>
2023-04-27 08:39:25 -04:00
Sunil Mohan Adapa
dcd8ef9634
mediawiki: Make a utility method public
For use later.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-27 08:39:23 -04:00
James Valleroy
b423733ec4
debian: Follows policy v4.6.2
No changes are needed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-26 06:10:41 -07:00