8103 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
4be7ce0f5d
tests: functional: Update detecting page changes
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>
2023-04-24 20:54:58 -04:00
Sunil Mohan Adapa
fcbcf1775c
tests: functional: Remove handling for custom enable/disable buttons
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>
2023-04-24 20:54:55 -04:00
Ihor Hordiichuk
5761718583
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1486 of 1486 strings)
2023-04-23 14:48:14 +02:00
109247019824
31411a97c7
Translated using Weblate (Bulgarian)
Currently translated at 46.8% (696 of 1486 strings)
2023-04-19 11:52:31 +02:00
nbenedek
f52bfab993
samba: Completely uninstall app
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>
2023-04-16 13:15:39 +05:30
nbenedek
4d7651c89f
openvpn: Completely uninstall app
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>
2023-04-16 12:40:10 +05:30
nbenedek
7e960e7491
infinoted: Completely uninstall app
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>
2023-04-16 12:37:47 +05:30
James Valleroy
99dfe9fe1e
upgrades: Check apt result during dist-upgrade
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>
2023-04-16 11:04:40 +05:30
nbenedek
e3c285c4cb
ttrss: Completely uninstall app
Set debconf values so that the database gets dropped when the package is removed

Tests:

* Install App and subscribe to a feed
* Apply patches, then reinstall app: confirm the feed is purged
* Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-16 10:37:52 +05:30
nbenedek
82101cc9b3
tor: Completely uninstall app
Tests:
* Manually reinstall the app and check if hidden service is regenerated
* Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-16 09:59:36 +05:30
nbenedek
6c14b9a304
syncthing: Remove unused pathlib import so job code-quality can pass
Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-16 09:58:47 +05:30
nbenedek
50b6fd4093
mediawiki: Completely uninstall app
Tests:
1. Install Mediawiki, set the admin password and edit the main page
2. Reinstall app: password and wiki content are set back to default
3. After the reinstall, I test uploading an image and backing up/restoring the
   app

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
[sunil: Fix functional tests by setting up after re-install]
[sunil: Fix functional test by account for change in delete button ID]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-16 09:35:09 +05:30
nbenedek
30b0019865
wordpress: Completely uninstall app
* When app is uninstalled, remove config files and drop the database
* Declare PUBLIC_ACCESS_FILE with pathlib.Path
* Add public access file to the backup manifest

Tests:
1. Install and setup wordpress
2. Reinstall the app and confirm that the initial setup page is shown to the user
3. Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, minor refactoring]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-14 18:58:59 +05:30
nbenedek
f1d2139c2d
syncthing: Completely uninstall app
Remove config file when app is uninstalled

Tests:
1. Install app and add a share
2. Reinstall app and confirm that the share doesn't exist

The order of the functional tests should be modified
since 'test_add_remove_folder' fails

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
[sunil: Remove the entire configuration directory]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-14 17:11:31 +05:30
nbenedek
77318806c2
sharing: Completely uninstall app
Test: Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-13 08:40:08 +05:30
nbenedek
95e370a1bf
shadowsocks: Completely uninstall app
Test: Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-13 08:14:47 +05:30
nbenedek
6ab0be6f9a
shaarli: Completely uninstall app
* remove data directory when app is uninstalled

Tests:
1. Install and configure the app
2. Reinstall app and confirm the initial setup page is shown

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
[sunil: Fix uninstall test by setting up after reinstall]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-13 07:27:28 +05:30
nbenedek
be7fd45393
searx: Completely uninstall app
* If only the SETTINGS_FILE gets removed, the setup
    process fails afterwards
* Don't remove the public access file since the setup process
    will remove it anyway

Test: Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-12 15:45:04 +05:30
nbenedek
17e062e829
rssbridge: Completely uninstall app
* make ENABLE_LIST a constant
and declare PUBLIC_ACCESS_FILE with pathlib.Path()
* add PUBLIC_ACCESS_FILE to the backup manifest
* Remove PUBLIC_ACCESS_FILE and ENABLE_LIST

Tests:
1. Install the app and enable public access
2. Reinstall the app and confirm the public access is reset to default
3. Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-12 15:10:17 +05:30
nbenedek
f11074ab9d
roundcube: Completely uninstall app
* remove local config and sqlite file
* add them to the backup manifest

Tests:
1. Modify the user's email address inside roundcube
2. Reinstall the app and confirm the modification was reset
3. Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-12 14:48:47 +05:30
nbenedek
1659b456d1
matrixsynapse: Completely uninstall app
Remove database, mediafiles and freedombox configs.
Removal of certs are not neccessary since the next setup will
overwrite them

Test:
1. Install the app and set a domain
2. Reinstall the app and confirm the domain can be set like it's the first time

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
[sunil: Fix uninstall functional test]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-12 14:44:45 +05:30
nbenedek
b2ad4088aa
ikiwiki: Completely uninstall app
Tests:
1. Create a wiki and a blog
2. Reinstall the app and confirm the sites get deleted

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-11 12:52:25 +05:30
nbenedek
53f4edb016
gitweb: Completely uninstall app, remove repositories
Tests:
1. Install app, create a repository
2. Reinstall app and confirm the repository is removed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-11 12:32:15 +05:30
nbenedek
615c47e49f
deluge: Completely uninstall app
Remove deluge default file, config directory, and systemd service file

Test:
1. In a Vagrant box manually install the app
2. Modify the default download path and change the default password
3. Uninstall the app
4. Confirm that the download path and password are reset to default
5. Also test enabling and disabling the app after reinstallation

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstings and make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-11 10:45:16 +05:30
nbenedek
db2d42c5ac
coturn: Completely uninstall app
Tests:

* Verify from the UI that after reinstalling the app a new secret is generated
* Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-11 10:04:16 +05:30
nbenedek
3d71869211
bepasty: Completely uninstall app
During the uninstall process:

* Remove bepasty data directory
* Remove freedombox config file
* Remove bepasty user (and group)

Test:

* Manually test if data is indeed removed
* Run functional tests

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
[sunil: Remove bapasty group as well]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-11 09:58:57 +05:30
109247019824
a6e728fc0f
Translated using Weblate (Bulgarian)
Currently translated at 46.2% (688 of 1486 strings)
2023-04-11 02:02:09 +02:00
Veiko Aasa
6dd45779db
gitweb: Make globally configured features overridable per-repository
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-09 19:56:08 +05:30
Veiko Aasa
7481aacd82
gitweb: Disable snapshot feature
Closes: #2335.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-09 19:55:51 +05:30
James Valleroy
97cc58a833
datetime: Use unique component ID for related daemon
The original change worked ok in a container, but failed in
virtualbox. This was due to the component being replaced by the Daemon
component that had the same ID, on systems where time is managed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-08 19:14:52 +05:30
nbenedek
2da0d42409
mediawiki: Fix broken view on Bullseye due to language selection
Mediawiki on Bullseye ships with a different location for the Names.php file.
This patch makes sure that the old location is also checked for the file.

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Fix checking if the file exists.]
[sunil: Use similar paths for both versions of MediaWiki]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-08 19:09:01 +05:30
Coucouf
3bba38c21d
Translated using Weblate (French)
Currently translated at 100.0% (1486 of 1486 strings)
2023-04-08 01:10:43 +02:00
Sunil Mohan Adapa
96318e5f94
coturn: Prevent package removal when roundcube is uninstalled
Closes: #2328.

Coturn depends on sqlite3 package. As sqlite3 is listed as a package in
roundcube, it is removed when roundcube is uninstalled. This results in the
removal of coturn as well. Prevent this by listing sqlite3 package explicitly in
coturn app.

Tests:

- Without the patch, install coturn and roundcube. When roundcube is
uninstalled, coturn package is no longer installed.

- Apply the patch, install coturn and roundcube. When roundcube is uninstalled,
coturn and sqlite3 packages are still installed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-07 10:55:34 -04:00
Sunil Mohan Adapa
8c1f73f54c
datetime: Re-implment backup/restore for timezone
Closes: #2326.

Earlier /etc/timezone was used to store timezone. Now, we use /etc/localtime
symlink instead. Since the change, backup/restore for timezone has not been
working. Implement this by backing up and restoring the new symlink. Borg
understands symlinks so it properly backs them up and restore them.

When the symlink is restored, timedatectl does not immediately show the new
timezone. This is because a DBus activated daemon 'systemd-timedated' which
supplies the information for timedatectl needs to be reloaded. Add this service
to list of services that backup framework needs to restart.

Tests:

- Set a new timezone. Backup datetime app. Set another timezone. Restore the
datetime app. Visiting the datetime app shows the restored timezone as expected
and timedatectl on command line also immediately shows the expected timezone.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-07 09:53:00 -04:00
109247019824
65bc5afe86
Translated using Weblate (Bulgarian)
Currently translated at 44.4% (660 of 1486 strings)
2023-04-06 20:52:21 +02:00
James Valleroy
48ff4dd441
ci: Force pip install for functional tests
See 550f9192ae4e5c4dd486ba08738ecee322929fce.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Rely fully on running the install.sh script remove the pip3 rerun]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-05 08:50:10 -04:00
Sunil Mohan Adapa
4cfc2fb4f2
tests: functional: Make install script work for Bullseye
- Pip option --break-system-packages is available only from Bookworm.

- Remove --user to that the script works can be used broadly.

Tests:

- On a fresh stable container, running functional tests works. Without the
patch, it fails.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-05 08:50:08 -04:00
James Valleroy
2cd693e3e6
HACKING: Force pip to install packages to system environment
See 550f9192ae4e5c4dd486ba08738ecee322929fce.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: pip option --break-system-packages works only from Bookworm]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-05 08:50:02 -04:00
nbenedek
a5283771e0
calibre: Remove libraries during uninstallation
Test:
1. Install Calibre, add a few books and libraries
2. Uninstall, then install Calibre
3. The default Library is present and empty

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-03 11:04:36 +05:30
Sunil Mohan Adapa
b21d88419c
tests: Don't error during collection if selenium is not installed
This fixes the current pipeline failures.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-01 19:52:41 -04:00
James Valleroy
c00e06ef10
Revert "locale: Update translation strings"
This reverts commit bc9f9d8c34c07bdbe3bd695e5a896d6bd55ff505.

Reverting so that translators can continue to work on the content in
debian/bookworm branch during the freeze period.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 21:44:45 -04:00
James Valleroy
339095daca
Release v23.7 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.7
2023-03-27 20:52:54 -04:00
James Valleroy
d438db4460
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 20:50:15 -04:00
James Valleroy
bc9f9d8c34
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 20:23:54 -04:00
nbenedek
f88f37c80e
mediawiki: Allow setting site language code
Closes: #2137

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 20:14:34 -04:00
Sunil Mohan Adapa
92aff3e63c
matrixsynapse: Add token based registration verification
- Allow setting registration verification to token based registration
verification.

- Configure the server with registration secret. Use the registration secret to
register an admin account for FreedomBox's use. Store the access token provided
during registration for future use.

- Use Admin API and the access token to create a registration verification
token. Show list of all registration tokens on app page.

Tests:

- On a fresh installation, setup succeeds, public registration is disabled.
Enabling public registration sets verification to be disabled by default.
Registration tokens are not shown in status.

- Without the patch, install the app and enable public registration. Apply the
patches. After update registration verification will show as disabled.

- Setting verification method to registration token works.
freedombox-registration-secret.yaml file is created. This file has 0o600
permissions and is owned by matrix-synapse:nogroup.
freedombox-admin-access-token.txt file is created. This file has 0o600
permissions and is owned by root:root. List of registration tokens are shown in
status section. Registration with Element app works with the token listed.

- Disabling registration verification works. Registration tokens are not shown
in status section. Registration with Element app works without verification.

- Disable app. Try to update the verification configuration to use tokens. An
error should be thrown that configuration can't be updated when app is disabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 17:07:08 -04:00
Veiko Aasa
485107604f
tests: functional: Fix setting first ethernet connection as internal
Tested that all samba tests pass in testing container. Also checked that
connection type texts are not translated, thus safe to use in xpath search.

Fixes #2333.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-26 11:26:28 -04:00
Sunil Mohan Adapa
e048e6814c
container: Increase wait time to accommodate slower architectures
This is for arm64 boards like Raspberry Pi and cross-arch VMs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-26 10:07:13 -04:00
Sunil Mohan Adapa
fa1711f84f
container: Fix resizing disk image containing multiple partitions
Closes: #2324.

The arm64 image contains two partitions in a GPT partition table. First is the
EFI partition and the second is the root partition. The container script
currently assumes that there will only be one partition in the image file. Fix
this by picking up the partition number of the last partition and resizing that.
GPT partition table also requires relocating the second copy of the partition
table to the end before partition resize can succeed.

Tests:

- Create testing containers in arm64 and amd64 architectures.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-26 10:07:08 -04:00
Veiko Aasa
9c0e339daf
container: Force pip to install packages to system environment
Without the change, pip refuses to install into system environment due to
changes outlined in PEP 668. The following error is thrown: 'error:
externally-managed-environment'.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-26 08:49:39 -04:00