8825 Commits

Author SHA1 Message Date
Veiko Aasa
430f9c6737
storage: Add an option to include help text to directory selection form
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-05-02 10:59:16 -07:00
James Valleroy
c66435bf74
Release v24.9 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.9
2024-04-22 21:03:15 -04:00
James Valleroy
92a022260b
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-22 20:32:24 -04:00
James Valleroy
f60a162a09
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-22 20:03:54 -04:00
Yurt Page
ff975e427f
Translated using Weblate (Russian)
Currently translated at 92.2% (1445 of 1567 strings)
2024-04-22 19:07:46 +02:00
Sunil Mohan Adapa
b5783aec9e
config: Handle dropin config files with limited permissions
- During enable/disable of the component, status of the dropin configuration
files was being checked from non-privileged process. If the dropin configuration
file or its parent is readable only by root, then the operation fails. Fix this
by performing the status check in privileged mode.

Tests:

- Unit tests pass.

- Dropin configuration file for redis server works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:42:11 -04:00
Sunil Mohan Adapa
ff434b65f4
nextcloud: Allow backup/restore when app is disabled
- Also restart the container after restoring the database and its password. This
seems to be required (perhaps to flush caches) for a successful database
connection.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:42:08 -04:00
Sunil Mohan Adapa
b336c2f9ea
nextcloud: Minor update to description regarding users' usage
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:42:06 -04:00
Sunil Mohan Adapa
819b3480a9
nextcloud: Add warning that the app is experimental
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:42:04 -04:00
Sunil Mohan Adapa
ca5b088730
nextcloud: Expand on the warning about container usage
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:42:02 -04:00
Sunil Mohan Adapa
c371f77e3b
nextcloud: Remove fail2ban jail, brute force protection present
Nextcloud has a built-in brute force protection[1]. Combined with good password
policies, fail2ban is not required. Built-in protection is better than fail2ban
because, fail2ban makes the service unavailable which causes some confusion to a
genuine user.

Links:

1) https://docs.nextcloud.com/server/19/admin_manual/configuration_server/bruteforce_configuration.html

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:59 -04:00
Sunil Mohan Adapa
7ab7d949af
nextcloud: When backup fails, unset the maintenance mode
- Put dump operation in a try/finally block.

- Create context manager to simplify.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:57 -04:00
Sunil Mohan Adapa
0f663f8381
nextcloud: Minor changes to cron timer units
- Add documentation URL for Nextcloud cron.php.

- Use '-f' flag to php to match what documentation recommends.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:55 -04:00
Sunil Mohan Adapa
d7b05385c6
nextcloud: Use secrets module generate passwords
- It choose highest security random number automatically.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:52 -04:00
Sunil Mohan Adapa
547db1608b
nextcloud: Use a separate DB for redis
- While nextcloud has a good prefix for all the keys it stores, flushing the
database (for nextcloud or other apps) is easier if it stores it's keys in a
separate database. Assign DB index at 8 (database number 9). Index 7 is taken by
rspamd on FreedomBox.

- Flush only Nextcloud's DB after restore instead of the entire server.

- Ignore errors during flush if redis server is not running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:50 -04:00
Sunil Mohan Adapa
12374d8783
nextcloud: Don't set password on redis server
- Before we can enable this added protection, we need to address a couple of
issues:

  - Redis password is restored after a restore. This means that if nextcloud's
  backup is restored on a machine where redis server already has a password set,
  then the password won't match with the password configured for other apps that
  are using redis.

  - When email server is already installed before this patch and then nextcloud
  is installed. rspamd will fail to connect to redis server. This even with the
  changes intended on the email server as the setup version in those changes has
  not been incremented.

- Restart redis-server only when needed. This avoids major disruption caused due
un-persisted cache and locks removed.

- Don't use Redis for caching of server-local data as this APCu seems to be
preferred by upstream containers.

- Don't set filelocking.enabled=true as this is already the default.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:47 -04:00
Sunil Mohan Adapa
281aaa9462
nextcloud: Retrieve database password in a more robust way
- Eliminate the need for parsing the complex file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:45 -04:00
Sunil Mohan Adapa
72c8a3f7b8
nextcloud: Minor refactoring
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:42 -04:00
Sunil Mohan Adapa
722da5b0d5
nextcloud: Don't show incorrect phone region when it is not set
Tests:

- Install nextcloud and notice that the default phone region is 'Not set'.
Select phone region, it sets properly. Set it to 'Not set' and that works too.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:40 -04:00
Sunil Mohan Adapa
138cdd6e3f
nextcloud: Refactor setting admin password
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:38 -04:00
Sunil Mohan Adapa
833122c931
nextcloud: Connect to slapd for LDAP using Unix socket
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:35 -04:00
Sunil Mohan Adapa
858d4a4337
nextcloud: Connect to redis using Unix socket
- Connecting using Unix socket allows us to drop having to make redis listen on
the containers IP address.

- Instead configure redis to listen on unix socket.

- Keep the configuration file separate and include it the main configuration
file. This allows easier configuration changes in the future.

- Ensure that the drop-in configuration is available during setup.

- Ensure that redis is running during setup. This is important when app is
upgraded while it is disabled. Or when setup is re-run.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:33 -04:00
Sunil Mohan Adapa
0f2760fbf8
nextcloud: Improve database permission granting
- GRANT with IDENTIFIED BY is not recommended anymore by MySQL. Use separate
CREATE and GRANT statements.

- Ensure that CREATE USER only runs when the user does not exist.

- Ensure that database password is always updated with a separate ALTER USER
statement.

- Factor out database querying into a separate method.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:30 -04:00
Sunil Mohan Adapa
ecaede79ee
action_utils, nextcloud: Make podman util more generic
It is unlikely that other containers will need the same volume with path for
/var/www/html.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:28 -04:00
Sunil Mohan Adapa
c38814b1bc
nextcloud: Don't fail uninstall if DB or user don't not exist
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:26 -04:00
Sunil Mohan Adapa
da3f498609
nextcloud: Ensure that database is running when running setup
- Database will be running if mysql has just been installed.

- However, after disabling all apps, it is no longer running. After this trying
to install/reinstall nextcloud fails. Fix this by ensuring that mysql is always
running during setup.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-04-19 06:41:24 -04:00
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