Commit Graph
8949 Commits
Author SHA1 Message Date
Sunil Mohan Adapa 52c4783c4a nextcloud: Improve setting up LDAP configuration
Running ldap:test-config before enabling the 'user_ldap' app lead to bad output.
'app:enable' and 'ldap:set-config' are idempotent. So, re-run them in setup.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:21 -04:00
Sunil Mohan Adapa d9132661c5 nextcloud: Improve check used to test if installation wizard is done
Use the status command to retrieve the accurate status of installation instead
of checking for existence of admin user account.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:19 -04:00
Sunil Mohan Adapa 7c305fb295 nextcloud: Fail on errors when configuring the app
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:17 -04:00
Sunil Mohan Adapa fba3d6339b nextcloud: Connect to mysql using socket instead of TCP
- This eliminates the need to reconfigure mysql.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:14 -04:00
Sunil Mohan Adapa 96035c2e2d nextcloud: Drop a repeated creation of systemd service file
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:11 -04:00
Sunil Mohan Adapa da036f4488 nextcloud: Fix configuring trusted proxies setting
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:08 -04:00
Sunil Mohan Adapa 07c29dca7e nextcloud: Refactor container creation code
- Reduce nesting necessary nesting.

- Add some type annotations.

- Simplify writing command output to a file by passing file handle to
subprocess.run().

- Create a path for volume to eliminate some duplication.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:40:59 -04:00
Sunil Mohan Adapa 03c7ddb0c4 nextcloud: Add network interface to firewall zone after creating it
- The network interface will not exist until it is created with podman network.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:40:50 -04:00
Sunil Mohan Adapa 89e9fe2335 nextcloud: Rename the systemd service names
- Avoid unnecessary abbreviations for consistency.

- Change file paths into pathlib paths.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:40:38 -04:00
Ray Kuo f173634319 Translated using Weblate (Chinese (Traditional))
Currently translated at 16.8% (264 of 1567 strings)
2024-04-17 10:03:35 +02:00
Joseph Nuthalapati 720c1ec54b tests: functional: Disable functional tests
The GitLab CI runners for functional tests were deprovisioned.

Disabling the jobs for functional tests until we provision replacement GitLab CI runners.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-04-10 11:22:39 -07:00
大王叫我来巡山 0b1ea108ab Translated using Weblate (Chinese (Simplified))
Currently translated at 66.4% (1042 of 1567 strings)
2024-04-10 06:54:44 +02:00
gallegonovato baeafd4eac Translated using Weblate (Spanish)
Currently translated at 100.0% (1567 of 1567 strings)
2024-04-10 06:54:43 +02:00
Besnik Bleta 1535c352a7 Translated using Weblate (Albanian)
Currently translated at 99.6% (1562 of 1567 strings)
2024-04-09 22:35:18 +02:00
Burak Yavuz 9941da29ff Translated using Weblate (Turkish)
Currently translated at 100.0% (1567 of 1567 strings)
2024-04-09 22:35:18 +02:00
James Valleroy 0a70199434 Release v24.8 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.8
2024-04-09 07:26:04 -04:00
Sunil Mohan Adapa 4bbff86ff3 doc: Fetch latest manual
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-04-08 20:21:35 -07:00
James Valleroy ff403c8af6 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-08 22:41:42 -04:00
James Valleroy 2c56128d5b locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-08 20:48:00 -04:00
Johannes Keyser 3cb580464a Translated using Weblate (German)
Currently translated at 100.0% (1554 of 1554 strings)
2024-04-08 09:01:49 +02:00
Sunil Mohan Adapa 68b52295e7 actions: Don't repeat action traceback in stderr
It is already available separately and now printed nicely. In cases where the
exception is caused outside of the action method, continue to print stderr.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-07 19:31:52 -04:00
James Valleroy 6f0897e702 diagnostics: Don't store list of app objects with results
current_results['apps'] was not being used anywhere.

Make are_results_available() check more specific, and to align with what is
stored in the database.

Tests:

- Run full diagnostics and check the results.

- Restart plinth, and check that the diagnostic results are loaded from the
  database.

Helps: #2410

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-04-04 08:48:19 -07:00
John Doe 7ffc5233c1 Translated using Weblate (French)
Currently translated at 100.0% (1554 of 1554 strings)
2024-04-02 20:01:48 +02:00
James Valleroy 2b16bdb5cd upgrades: Re-enable unattended-upgrade during dist-upgrade
Previously, when dist-upgrading from bullseye to bookworm, there was an issue
where unattended-upgrade gets stuck. See #2266.  However, it does not get stuck
when dist-upgrading from bookworm to trixie.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-04-01 08:33:04 -07:00
Sunil Mohan Adapa fdaba80de3 ttrss: Ensure that database is removed after uninstall
- Setting ttrss/purge to 'true' in debconf is not retrained after the package
has been install. So, set it again just before package removal.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-31 20:49:01 -04:00
Sunil Mohan Adapa 7c5c960400 ttrss: Improve backup and restore of the database
- Don't dump all the databases on the server. Instead dump only the ttrss
database and its role.

- Use database configuration instead of hardcoded database name 'ttrss'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-31 20:48:36 -04:00
Sunil Mohan Adapa f3b4c6f85e ttrss: tests: functional: Uninstall during backup/restore test
- This checks backup/restore step more accurately with new database user vs. old
database user.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-31 20:48:25 -04:00
Sunil Mohan Adapa a28dc369d3 ttrss: Include dbconfig configuration file in backup
- This will ensure that dbconfig is every triggered and regenerates the
configuration/setup, everything is consistent.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-31 20:48:19 -04:00
Sunil Mohan Adapa 90df34df86 zoph: Include dbconfig configuration file in backup
- This will ensure that dbconfig is every triggered and regenerates the
configuration/setup, everything is consistent.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-31 20:48:11 -04:00
Sunil Mohan Adapa b5c641097a zoph: Re-add a safety check when reading the setup state of the app
- Similar check was removed in 6646512a0a when it
was that it was not needed.

Tests:

- Run functional tests for zoph.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-31 20:48:00 -04:00
ikmaak 9366597b77 Translated using Weblate (Dutch)
Currently translated at 99.5% (1547 of 1554 strings)
2024-03-30 17:18:26 +01:00
Sunil Mohan Adapa 701f8e6dc9 nextcloud: Diasble app until more testing and review changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-29 15:48:19 -07:00
Benedek Nagy 60f8a3f3db nextcloud: Configure redis caching, create static PHP file
Configure caching for Nextcloud with Redis running on the host, create static
php file under
/var/lib/containers/storage/volumes/nextcloud-volume-fbx/_data/config. Nextcloud
communicates with Redis via the bridge adapter, which isn't a loopback device.
For this reason, setting a redis password is required. In addition, configure
the email app to accomodate the changes.

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-29 15:45:07 -07:00
Benedek Nagy b21af70510 nextcloud: Add option to configure the default phone region
This setting is necessarry to pass the setup warning under
/nextcloud/settings/admin/overview

Note: during testing the field only becomes visible once
the freedombox-develop command is restarted

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#default-phone-region

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
[sunil: Add missing docstring]
[sunil: Update form label for consistency]
[sunil: Reduce number of success form messages]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-29 15:44:27 -07:00
Benedek Nagy 8ef680f450 nextcloud: Add backup/restore
Signed-off-by: Benedek Nagy <contact@nbenedek.me>
[sunil: Simplify method signature and name for setting maint. mode]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-29 15:44:22 -07:00
Benedek Nagy 3d8967a20a nextcloud: Add new app based on podman container
Nextcloud has long been a desired app for FreedomBox, however, due to
difficulties around Debian packaging, it hasn't yet been implemented. This
branch creates an app for Nextcloud with the help of Podman. Podman is a
containarization technology, like Docker, but with some extra features
that make its integration into FreedomBox convenient. If the podman
approach turns out to be favorable, we should consider writing a podman
specific module.

How does this work?

The app installs the podman and default-mysql-server Debian packages.
In other apps, such as MediaWiki, FreedomBox chooses SQLite
which eases maintenance and backup/restore. However, this
would bring a significant performance degrade for Nextcloud, hence the
choice of Mysql. Other apps, like Wordpress already use Mysql, so it is
installed on the host as opposed to installing it in a sepatate
container. A firewalld rich rule is created, so the Nextcloud container
can communicate with the db and OpenLDAP.

The podman package comes with a systemd service and timer for
automatically upgrading containers that are labeled as
"io.containers.autoupdate=registry". podman-auto-update.timer is managed
by FreedomBox. We might add a drop-in file for the timer to make it
more consistent with unattended-upgrades.

Podman natively supports creating systemd services for individual
containers. The generated systemd service is then managed by FreedomBox.

The current container image is based on Debian and runs apache inside the container.
To avoid running apache redundantly (both on the host and inside the
container) it would be preferable to use the nextcloud:stable-fpm image
instead, which seems to require creating a new virtual host.

Configure /.well-known URIs to redirect to /nextcloud. There is a conflict with
Radicale if both apps are running.

Put the podman1 interface into the trusted firewalld zone. This results in the
container gaining Internet access which is necessary to downloading Nextcloud
applications and federating with other Nextcloud instances. After applying the
patches, I opened my instance to the Internet to make sure this configuration
doesn't accidentally expose services. I scanned TCP ports 3306 and 6379 (after
installing and binding redis-server to the bridge interface). After that, I
installed the Tor app and put the default WAN interface to the external zone to
confirm that port 9050/TCP does not get exposed through the bridge interface.

To-do:
* test the fpm image
* test running the container in rootless mode for better security

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
[sunil: Add missing docstrings]
[sunil: Make some methods private to module]
[sunil: Run yapf for formatting]
[sunil: Remove a comment to hide form when app is disabled]
[sunil: Update form labels]
[sunil: I18N for client names]
[sunil: Reduce number success messages in form for easy i18n and consistency]
[sunil: Reorganize patch series, squash fixes]
[sunil: Tweak auto update daemon component's ID]
[sunil: Add blank lines for formatting]
[sunil: Minor refactoring for _run_occ method]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-29 15:44:11 -07:00
Benedek Nagy c169537975 action_utils: Add generic utils for managing podman containers
Signed-off-by: Benedek Nagy <contact@nbenedek.me>
[sunil: Rename methods]
[sunil: yapf formatting]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-29 15:44:05 -07:00
Benedek Nagy 1ad1eb266a network: Skip of bridge interfaces in connections list
Don't list the bridge interface in the Networks page as it is not meant to be
modified by users and would only create confusion.

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
2024-03-29 15:43:52 -07:00
Veiko Aasa 0c47956c2a gitweb: Fix an issue when cloning existing repository
Skip all the other git clone progress log lines. Fixes
occasional `'total_progress' not defined` error.

Tested in the testing container that cloning exisiting repository
works.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-28 13:59:41 -07:00
Allan Nordhøy ee7c6373fc Translated using Weblate (Norwegian Bokmål)
Currently translated at 73.8% (1148 of 1554 strings)
2024-03-28 02:01:49 +01:00
John Doe b1c5c5fa75 Translated using Weblate (French)
Currently translated at 99.0% (1540 of 1554 strings)
2024-03-28 02:01:48 +01:00
gallegonovato 7c3491a71a Translated using Weblate (Spanish)
Currently translated at 100.0% (1554 of 1554 strings)
2024-03-28 02:01:47 +01:00
Besnik Bleta fb8d796fa0 Translated using Weblate (Albanian)
Currently translated at 99.4% (1546 of 1554 strings)
2024-03-26 12:03:14 +01:00
大王叫我来巡山 a3cd247daa Translated using Weblate (Chinese (Simplified))
Currently translated at 66.9% (1040 of 1554 strings)
2024-03-26 12:03:14 +01:00
Burak Yavuz 0cfe37b243 Translated using Weblate (Turkish)
Currently translated at 100.0% (1554 of 1554 strings)
2024-03-26 12:03:13 +01:00
James Valleroy f735f183b7 Release v24.7 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.7
2024-03-25 21:13:22 -04:00
James Valleroy 5a7a0c1268 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-25 21:12:40 -04:00
James Valleroy d4dbf27629 locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-25 20:45:28 -04:00
Sunil Mohan Adapa 8d0455aa45 matrixsynapse: Prevent setup page from being shown during uninstall
Fixes: #2381.

When app is being uninstalled, it is disabled. Use that to not show the setup
page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-25 18:27:30 -04:00
Sunil Mohan Adapa 1612318b60 package: Don't remove packages of other apps on uninstall
Fixes: #2376.
Fixes: #2317.

When an app is removed, its packages are purged. However, there is another
installed app that needs these packages, we should keep those packages. We have
already implemented checking the packages against other apps' packages. However,
we are not checking if we are removing dependencies of other apps' packages.
This will still result in removal apps' packages.

To solve this problem, get list of packages of all the apps, then iterate over
their dependencies recursively and compile a comprehensive list of packages to
keep. Use this to reduce the set of packages to remove.

Tests:

- Without the patch, install bepasty and janus. Uninstall janus app and notice
that bepasty package is removed. With the patch, the problem is not observed.

- Printing the comprehensive list of packages to keep shows an extensive set
computed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-23 18:31:38 -04:00