3349 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
480562890a
nextcloud: Drop diagnostic for checking availability of docker.com
Tests:

- Run diagnostics for nextcloud and notice that there is not check to reach
docker.com.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-15 16:46:52 -05:00
Sunil Mohan Adapa
983c0f53af
nextcloud: Switch to using FreedomBox container registry
- Should fix issues related to rate limiting on docker.io and improve privacy
for our users.

Tests:

- Install nextcloud, install succeeds. 'podman image list' shows that image is
from registry.freedombox.org.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-15 16:46:41 -05:00
Sunil Mohan Adapa
d14eb15a43
ui: Drop logo backgrounds for index, apps, and system pages
- When the box shadows are dropped, the cards overlay on those backgrounds is
not pleasant.

Tests:

- MediaWiki functional tests pass.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-12 13:19:47 -05:00
Sunil Mohan Adapa
3c07d245d4
networks: wifi: In new connection page set form defaults properly
- When a link on 'Nearby Wi-Fi Networks' page is clicked, a new Wi-Fi connection
page is shown. In this form, the DNS-over-TLS and IPv6 method radio buttons are
not pre-selected with default value. Fix this by setting default values for
them.

Tests:

- On a system with Wi-Fi device, click on 'Nearby Wi-Fi Networks', click on a
Wi-Fi network and go to new Wi-Fi connection creation page. Notice that values
for DNS-over-TLS and IPv6 connection method are filled in. Simply clicking
'Submit' creates the connection.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-11 15:47:28 +02:00
Sunil Mohan Adapa
064f3c6c0c
networks: Overhaul Wi-Fi network scan page
Fixes: #1725.

- Show multiple Wi-Fi devices in separate tables so that users can pick them
understanding what they are. Also avoids some confusion related to why APs are
duplicated.

- Request scanning if the last scan time was long ago.

- Show the last scanned time.

- Refresh page in 10 seconds if scan has been requested so that the results of
scan can be shown without user explicitly refreshing the page. Show spinner when
scan has been requested and we are awaiting results.

- Refresh page every 60 seconds in other cases.

- When an SSID can't be decoded into a string, don't show it.

- Don't show hidden networks with no SSID set.

- Improve the styling for signal strength.

- Show a message when no Wi-Fi devices are present.

- Show a message when no Wi-Fi networks are found for a device.

Tests:

- Test on a machine with Wi-Fi device available.

- When page is loaded is for the first time, spinner is shown and refresh
happens in 10 seconds. After refresh if the scan has not completed, again,
spinner is shown and page is reloaded in 10 seconds. Otherwise, spinner is not
shown and page is reloaded in 60 seconds.

- Hidden networks are not shown.

- On a machine with no Wi-Fi devices, 'No Wi-Fi device detected.' message is
shown.

- Clicking on a network takes us to new Wi-Fi network connection page with
'connection name', 'network interface' and SSID filled in correctly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-11-11 13:28:34 +02:00
Sunil Mohan Adapa
c381271601
rssbridge: Mention miniflux in app description similar to tt-rss
Tests:

- App description appears as expected. Links work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 12:18:12 +02:00
Sunil Mohan Adapa
c5a967a1a2
i18n: Fix translation of FreedomBox name in various places
Tests:

- With a locale that has translation for the 'FreedomBox' source string, check
the following locations have translated string for 'FreedomBox':

  - Default backup repository label.

  - Firewall app description.

  - Network forms for: topology, internet connection type, and router
  configuration.

  - RSS-Bridge app description.

  - TiddlyWiki app description.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 12:17:34 +02:00
Sunil Mohan Adapa
0e59b67bbd
networks: Fix display of strength and channel for Wi-Fi connections
- Currently, strength and channel information is not shown for Wi-Fi connections
in connection information page. This is a regression related to handling SSID as
a binary string. Fix this.

- Also fix the styling to not make signal strength too prominent.

Tests:

- On a machine with Wi-Fi network device. Viewing the Wi-Fi connection
information does not signal strength and channel without patch but show with the
patch.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 08:41:04 +02:00
Sunil Mohan Adapa
bfdb05bf0d
networks: Fix editing wireless connections with SSID field
Fixes: #2447.

- When editing an existing wireless connection, SSID field shows as "b'myap'"
instead of "myap". Fix this.

Tests:

- On a machine with a wireless connection, edit the connection. Without the
patch, form show SSID incorrectly. With the patch, it shows the correct value.

- Unit tests in test_network.py pass when run as root.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 08:39:56 +02:00
Sunil Mohan Adapa
6084b95a65
help: Add all footer links to about page
Fixes: #2464.

- This page will act as replacement for the footer links in the home page.

- Remove link to FreedomBox Foundation and add link to Weblate project. We
already have a donate link to the foundation website.

Tests:

- About page is shown as expected. Old 'Learn more' button is no more. So is the
last paragraph.

- Styling is as expected. All the section have equal width.

- All links work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:13 -04:00
Sunil Mohan Adapa
62e67c6c99
help: Make about page available to unauthenticated users
- This page will replace the rather large footer in the front page.

Tests:

- Log out. Visit the help about page. It is available without redirection to
login page. Version related alert is not shown.

- Log in. Visit the help about page. It is available. Version related alert is
shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:10 -04:00
Sunil Mohan Adapa
c8c753af29
ui: Remove the noise background
- Update the mediawiki functional tests which were using this image.

- Slightly increase the darkness of the shadow around the cards to compensate
for the loss of the contrast with the noise background.

Tests:

- Re-run mediawiki functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 09:25:07 -04:00
Sunil Mohan Adapa
e6fb96b381
backups: Sort list of apps in backup, restore, and schedules
Fixes: #2364

Tests:

- Set language to English. Go to backups -> create. List of apps is sorted
alphabetically and case is ignored. Take a backup.

- Click on restore for the new backup. The list of apps is again sorted
alphabetically and case is ignored.

- Click on schedules. List of apps is sorted and alphabetically and case is
ignored.

- Repeat tests with Spanish locale.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 10:14:01 +02:00
Sunil Mohan Adapa
15e9c6cad9
backups: Better explanation for the format of upload file
Fixes: #2115.

Tests:

- Visit the backups upload page. Notice that the new help text is as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 09:50:55 +02:00
James Valleroy
33b41a66c3
ejabberd: Set mod_mam default to always
This helps various clients to use MAM.

Fixes: #2338

Tests:

- Functional tests for ejabberd pass.

- Install ejabberd and enable MAM. Check that default is set to always
  in the configuration.

- Without this change, install ejabberd and enable MAM. Then restart
  plinth with this change. The configuration is changed from never to
  always. After several minutes, ejabberd is running again.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-24 10:33:38 -07:00
Veiko Aasa
df52acc329
users: tests: functional: Check LDAP information is correct after renaming user
Tests performed in stable and testing containers:
  - All the users module tests pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:24:35 -07:00
Veiko Aasa
f12e634bc9
users: Delete or move home folder when user is deleted or renamed
On user deletion, user's home folder is also deleted. Admins have an
option to avoid deleting user's home by inactivating the user instead.

This commit also removes user deletion buttons from the user's list
page and adds this option to the user edit page. The user's edit form
asks for a confirmation if the user deletion is requested. This change
also means that the confirmation password is now required to delete a user.

Also:
  - Add a simple username validation to the privileged actions.
  - Functional tests: Create a fixture to login as an admin before every test.
  - Functional tests: Add a test to check that SSH passwordless login works
    after user is renamed to validate correct SSH related path permissions.
  - Privileged tests: Add `test_` prefix to the generated random string which
    makes easier to check and cleanup created home folders.
  - Minor quote fixes.

Tests performed in stable and testing containers:
  - Run all the users module tests twice, no failures in tests.
  - When user is the last admin, both "Active" and "Delete user"
    checkboxes are disabled.

Closes #2451.

[sunil]

- Refactor the JS code:

  - Ensure that DOM elements are lookup after DOM content is loaded.

  - Styling changes. Reduce the number of globals, name the global names
  somewhat more unique.

  - Click the button instead of submitting the form to disable the button.

- Template changes:

  - Add a body for the confirmation dialog to talk about disabling the user and
  deleting the home directory.

  - Change the label of the confirm button to make it more
  explicit (recommendation from many UX guides).

  - Styling.

- Functional tests:

  - Fix visibility checking of an element to use the correct splinter API.

  - Simplify clicking the edit user link.

- Minor update to form checkbox help text.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:13:25 -07:00
Sunil Mohan Adapa
4bde5309c5
nextcloud: Fix install failure due to PrivateTmp=yes
Fixes: #2463.

- When FreedomBox service is run via systemd and if the unit has PrivateTmp=yes
as was recently introduced, then 'podman exec --user www-data' fails with error
'Error: unable to find user www-data: no matching entries in passwd file'.

- The problem seems isolated to this specific instance and does not seem to
effect the container start up (which happens via systemd).

Tests:

- Without the patch, start FreedomBox service via systemd and install Nextcloud.
It fails.

- With the patch, install succeeds and functional tests for Nextcloud succeed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 11:06:19 -04:00
Sunil Mohan Adapa
f6fbb2f021
help: tests: Fix tests failing due to tags related changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-18 19:16:41 -07:00
Sunil Mohan Adapa
3f954f9549
tests: functional: Create utility to set user preferred locale
- Move it from the users app functional tests file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:25 -07:00
Sunil Mohan Adapa
079b4324f6
help, system: Stop using submenu.sorted_items
- This fixes a regression in showing menu items on the help:index page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:03 -07:00
Sunil Mohan Adapa
5fa9bf2928
*: tags: Adjust tags and style
- Don't use title casing, instead use simple capitalization.

- Add some tags.

- Drop outdated tags like 'VoIP', 'IM' while emphasizing 'Audio chat', 'Video
chat', 'Encrypted messaging' instead.

- Try to clarify server vs. web client with tags.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:07:57 -07:00
Joseph Nuthalapati
e5b7ed4faf
*: Implements tags for apps
- Add tags to Info component of apps. Use only English tags for all operations.
Localized tags are used for presentation to the user only. Add tags to all the
apps. Conventions (English):

  1. Tags describing use cases should be in kebab case.

  2. Protocols in tag names should be in their canonical format.

  3. Tags needn't be 100% technically correct. This can get in the way of
  comparing apps using a tag. Words that describe use cases that users can
  easily understand should be preferred over being pedantic.

  4. Tags should be short, ideally not more than 2 words. Avoid conjunctions
  like "and", "or" in tags.

  5. Avoid redundant words like "server", or "web-clients". Most apps on
  FreedomBox are either servers or web clients.

  6. Keep your nouns singular in tags.

- Use query
params to filter the Apps page by tags. When all tags are removed, redirect to /apps.

- Add UI elements to add and remove tag filters in the Apps page. Make the UI
similar to GitLab issue tags. Since there are 40 apps, there will be at least 40
tags. Selecting a tag from a dropdown will be difficult on mobile devices. A
fuzzy search is useful to find tags to add to the filter. Allow user to find the
best match for the search term and highlight it visually. The user can then
press Enter to select the highlighted tag. Make tag search case-insensitive.
Make the dropdown menu scrollable with a fixed size. User input is debounced by
300 ms during search.

- tests: Add missing mock in test_module_loader.py

- Add functional tests

[sunil]

- 'list' can be used instead of 'List' for typing in recent Python versions.

- Reserve tripe-quoted strings for docstrings.

- Undo some changes in module initialization, use module_name for logging
errors.

- isort and yapf changes.

- Encode parameters before adding them to the URL.

Tests:

- Tested the functionality of filtering by tag with one tag and two tags.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:07:54 -07:00
Joseph Nuthalapati
56a055639d
backups: Use new utility for handling file uploads
- Use dedicated directory for uploads

- Uploaded backup archives are owned by root and read-only (0o600)

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Fix checking the relativeness of file path before removing]
[sunil: Create backups upload path recursively]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-14 12:52:45 -07:00
Veiko Aasa
770ec09557
ssh: Start server after nslcd service
Fixes an issue where SSH server is available but users can't login because LDAP
user services are not yet started.

Tests performed:
 - Installed new ssh systemd override conf, rebooted, ensured that the sshd
 service starts after the nslcd service.

Relates to #2452.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-14 10:52:20 -07:00
Sunil Mohan Adapa
4bc13f063f
calibre: tests: functional: Fix occasional failure in add book test
- When a library is added to using the FreedomBox interface and immediately
Calibre interface is loaded, the library does not immediately get listed in the
list of libraries. We will have to fresh the page to see the new library. Do
this.

Tests:

- Run functional tests for calibre on Testing distribution multiple times
without failures.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-11 12:43:04 +03:00
Sunil Mohan Adapa
fc86f3e507
wordpress: tests: functional: Fix tests on Trixie
- In versions of WordPress in Debian Trixie and up the editing widget is inside
of an iframe instead of as a direct child of the main document. Elements inside
these iframes can't be queried directly and one must be the 'context' of the
iframe before querying elements inside.

- Fix the failures by using the splinter API to query inside iframe.

Tests:

- Run functional tests on WordPress in stable and testing containers twice.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-11 12:40:54 +03:00
Veiko Aasa
56791df57e
syncthing: Fix app setup in Debian testing
Syncthing from Debian testing uses new config directory if the
legacy configuration folder doesn't exist.

Tests performed in stable and testing containers:
 - All syncthing tests pass when running twice.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2024-10-10 09:42:34 +03:00
Sunil Mohan Adapa
7671f4a749
first_boot: Add notification for next steps after first setup
- Since there is no way to reach the next steps page from the interface, provide
a notification for it. Until the notification is dismissed, the user can reach
this page with the notification.

Tests:

- On testing and stable containers, remove the sqlite file start the service.
Complete the first setup wizard. After reaching the 'setup complete' page,
notice that there is a notification for next steps to take. Title, icon, message
and button text and styling are as expected.

- Clicking on 'See next steps' takes us to next steps page.

- Clicking on dismiss removes the notification.

- Restarting the service does not bring back the notification.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-10 09:23:36 +03:00
Sunil Mohan Adapa
35312bd672
first_boot: Allow the next steps page to be revisited
- Currently, after the user arrives the 'next steps' page after completing the
first setup, trying to refresh the page takes us away from the page to the index
page.

- Since this page lists a lot of steps, user can't be expected to memorize the
contents of the page and perform them one after the another. Opening the links
in popups instead of navigating away from page helps but not full solve the
problem.

- If the page is a regular page and not part of the first step wizard, this page
is a simple Django page. It can be refreshed. Back button can be used to view
the page after navigating from it again.

Tests:

- On stable and testing containers, remove the sqlite3 file and start the
service. This will trigger the first setup wizard. As a last step of the wizard,
the 'setup complete! Next steps:' page is shown.

- Refreshing the page works.

- Navigating away from the page and using the back button to return to it works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-10 09:23:36 +03:00
Sunil Mohan Adapa
7033b7cf1e
upgrades: Show notification to remind user to run updates manually
- This is needed as we don't have software updates step during first setup
anymore.

Tests:

- Trigger first setup by removing /var/lib/plinth/plinth.sqlite3 and re-running
the service. After completing the setup, a notification is shown with correct
severity, title, app icon, message and options. Dismiss remove the
notifications. 'Go to Software Updates' takes us to updates app.

- After dismissing the notification, re-running the service does not show
notification again.

- Increasing the app version number also does not show notification again.

- Re-running the app setup does not show notification again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-10 09:23:35 +03:00
Sunil Mohan Adapa
ed3363105a
networks: Remove first boot steps for connectivity/topology
- We have not yet implemented the main reason they exist. To guide users to
establish reachability with Tor hidden services, Pagekite, Dynamic DNS, etc.

- We now have a 'Next steps' page that talks about configuring network
connections. The networks page linked from here has these steps prominently
listed.

- In the future we will implement a wizard for reachability and these steps will
still be used. However, they don't have to part of first setup. They can add
them as notification and as part of next steps page.

- It is good to have a simplified first setup wizard. It is seldom tested
properly.

Tests:

- Run the first setup wizard by removing /var/lib/plinth/plinth.sqlite3 and
running the service. Notice that the software update step is not shown and
wizard completes successfully.

[vexch: Minor quote fix in functional tests]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-10 09:19:01 +03:00
Sunil Mohan Adapa
a998995f36
upgrades: Remove step upgrade during first setup
- Remove the first setup wizard step to run security upgrades. At the time of
its introduction, it was felt that this is very important. Some things have
changed since then:

  - We have mechanism for queuing package operations. Users can now trigger
  software updates and start installing apps before that is completed. Or vice
  versa. Earlier if the software updates were running, app install used to fail
  with an error.

  - There were no notifications. Since then we have added 'first setup'
  notification for important topics such as Privacy. This step can be replaced
  with a notification.

  - Automatic diagnostics and a diagnostic to notify of updated packages also
  helps bring attention to software updates if they are missed during first
  setup.

- A proposed change will re-introduce an advice to run updates in the 'Next
steps' wizard step along with a button trigger it right there.

- The new notification for software updates will bring more attention to running
updates as part of first setup.

- It would be nice not be stuck in the first setup wizard for a long period and
make it look simple. It improves the fun factor of setting up FreedomBox.

- It would present an opportunity to utilize the parallel installation of
apps/updates to the full extent. Although this can also be done by skipping the
progress step after updates are run.

- First wizard steps tend to get less testing.

Tests:

- Run the first setup wizard by removing /var/lib/plinth/plinth.sqlite3 and
running the service. Notice that the software update step is not shown and
wizard completes successfully.

- On stable container, backports step is shown as expected (if not already
enabled).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-10 09:02:58 +03:00
Sunil Mohan Adapa
fb2d26a16c
firstboot: Hide navigation toggler in mobile layouts
Tests:

- Start first boot by removing /var/lib/plinth/plinth.sqlite3 and starting
service. Switch to responsive design mode and select a phone layout. Notice that
an inactive toggler appears during bootup/welcome/account first boot steps.

- With the patch, the toggler button does not appear during those steps. After
the account step, the toggler appears and is functional with help menu.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-08 13:45:41 +03:00
Sunil Mohan Adapa
17952c9cf3
firstboot: Improve the setup complete page with more setups
Fixes: #888.

- Suggest all the steps that a typical user should likely take.

- Custom styling to make the page look good.

- Open the links in new windows as this page can't be reached again.

- Add a button for software updates as this can be done easily and the most
important step.

Tests:

- Trigger first setup by removing plinth.sqlite3. Notice the improved setup
complete page. Text and icons are as expected. Links work and open in a new
window. Clicking on 'Update now' button opens a page to software updates with
manual upgrade triggered.

- Mobile view looks good.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-08 13:45:05 +03:00
Sunil Mohan Adapa
a7911469ee
nextcloud: During upgrade wait properly for upgrade to complete
- Before rerunning setup operations.

Tests:

- Install version 28-fpm (one version older than the current stable). Then
change it stable-fpm and increment the nextcloud app version at the same time.
Start the service. Notice that nextcloud app setup is rerun, container will be
updated by podman to newer version. Setup completes successfully with the patch
but fails arbitrarily otherwise as the setup process does not wait for the
upgrade to complete and tries to prematurely re-run setup operations.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-07 18:09:11 -04:00
Sunil Mohan Adapa
2a30d64f08
nextcloud: Fix existing installs to upgrade properly
Fixes: #2433.

Tests:

- Without the patches, as described in the bug, create an installation that is
facing the problem. Ensure that 'podman exec --user www-data
nextcloud-freedombox /var/www/html/occ config:system:get overwrite.cli.url'
shows an empty value.

- Apply patches, nextcloud app is updated and configuration value is set to
'http://localhost/nextlcoud' by running 'podman exec --user www-data
nextcloud-freedombox /var/www/html/occ config:system:get overwrite.cli.url'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-07 18:09:07 -04:00
Sunil Mohan Adapa
db92640f3c
names: Don't hard depend on systemd-resolved
Fixes: #2453

- It will be installed later.

Tests:

- Build the Debian package with all the changes and notice that it neither has
dependency on resolvconf nor on systemd-resolved.

- Version 24.18 can upgrade to this package using unattended-upgrade. For this
place the package in a folder repository and add this repository to apt
sources.list and tweak unattened-upgrades settings to accept the new repository.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:35:04 +03:00
Sunil Mohan Adapa
5611585790
names: Schedule a task to install systemd-resolved when possible
- Don't schedule if the package is already installed.

Tests:

- With systemd-resolved installed and without internet connectivity start a
fresh instance (without first setup). Setup succeeds but systemd-resolved is not
installed.

- Wait in develop mode for 180 seconds. Setup for names app is re-run. Ensure
that internet connectivity is not available and systemd-package is not
installed. Setup still succeeds.

- On next run, ensure that internet connectivity is available, systemd-resolved
is installed. Setup succeeds.

- On next run, setup is not re-run for names app.

- When service is restarted, the task is not even scheduled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:34:54 +03:00
Sunil Mohan Adapa
7e8819d7d5
names: Try to install systemd-resolved during app setup
- If installing systemd-resolved for the first time, set fallback DNS setting to
True irrespective of the app version.

Tests:

- Ensure that systemd-resolved is not installed. On a fresh systemd without
first setup done, run service.

- Names app setup is run and systemd-resolved is installed if internet
connection is available. Setup succeeds. Fallback DNS setting is true in privacy
app. systemd-resolved has been restarted and current DNS known to Network
Manager has been populated in it. Name resolution works.

- If Internet connection is not available, setup still succeeds but
systemd-resolved package is not installed.

- Rerun setup without internet connectivity. Setup succeeds without installing
systemd-resolved.

- Rerun setup with internet connectivity. Setup succeeds and installs
systemd-resolved. Fallback DNS setting is true in privacy app. systemd-resolved
has been restarted and current DNS known to Network Manager has been populated
in it. Name resolution works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:34:37 +03:00
Sunil Mohan Adapa
70c37f309e
names: Don't control resolved daemon when package is not installed
Tests:

- Ensure that systemd-resolved is not installed.

- There is no warning showing that systemd-resolved daemon is not running.

- When re-running setup, systemd-resolved is not enabled.

- Diagnostic shows a warning that systemd-resolved is not installed.

- Ensure that systemd-resolved is installed.

- If daemon is not running, warning shown that it is not running.

- If daemon is running, warning is not shown.

- When re-running setup, systemd-resolved is enabled.

- Diagnostic shows that the daemon is running when running and not running when
it is not.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:34:21 +03:00
Sunil Mohan Adapa
5c06b6c31a
names: Don't show resolver status if package is not installed
Tests:

- Ensure that systemd-resolved package is not installed.

- Resolver status table is now shown.

- Instead a message is shown with button to re-run setup. Clicking the button
re-runs setup of the names app.

- Configuration form is also now shown.

- If systemd-resolved package is installed during re-run of setup, then status
table is shown.

- Message to install systemd-resolved is not shown.

- Configuration form is shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:34:01 +03:00
Sunil Mohan Adapa
0a10ced950
names: Perform resolve diagnostics only if resolved is installed
Tests:

- Ensure that systemd-resolved is not installed. Run diagnostics on names app.
There should be no diagnostic related to resolving address for deb.debian.org.

- Ensure that systemd-resolved is installed. Run diagnostics on names app. There
should be diagnostic related to resolving address for deb.debian.org.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:33:49 +03:00
Sunil Mohan Adapa
64e244e24a
networks: Don't show DNS-over-TLS when resolved is not installed
Tests:

- Ensure that systemd-resolved is not installed. The privacy section is entirely
hidden in the connection information page.

- Ensure that systemd-resolved is installed. The privacy section is shown in the
connection information page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:33:15 +03:00
Sunil Mohan Adapa
1f17728321
networks: Disable DNS-over-TLS option if resolved is not installed
Tests:

- Ensure that systemd-resolved package is not installed. DNS-over-TLS field is
disabled.

- Submitting the form works with and without changes.

- Value of global DNS-over-TLS setting shows as 'unknown'.

- Current value of DNS-over-TLS for this connection is show in the form.

- Ensure that systemd-resolved package is installed. DNS-over-TLS field is
enabled.

- Submitting the form works with and without changes.

- Value of the global DNS-over-TLS setting shows the current value set in names
app.

- Current value of DNS-over-TLS for this connection is show in the form.

- Introduce an exception in get_resolved_configuration privileged action and
notice that value shows up as 'unknown' in the form.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:32:54 +03:00
Sunil Mohan Adapa
71ed5f16c2
privacy: Disable DNS fallback option if resolved is not installed
Tests:

- Ensure that systemd-resolved is not installed.

- Notice that form field for Fallback DNS servers is disabled. Form value is
unchecked (default value when initial value is not provided).

- Submitting the form works with and without changes.

- Ensure that systemd-resolved is installed.

- Notice that form field for Fallback DNS servers is not disabled. Form value
reflects the current state of fallback dns as shown in names app.

- Submitting the form works with and without changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:32:34 +03:00
Sunil Mohan Adapa
dd16034e3c
names: Introduce method to check if resolved is installed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-07 01:32:02 +03:00
Veiko Aasa
cfe3946b9a
transmission: tests: Fix functional test failures in Debian testing
Tests performed in stable and testing containers:
 - Run all the transmission tests twice - all pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-06 08:56:00 -07:00
Sunil Mohan Adapa
2f33026577
kiwix: Don't leave invalid .zim in library after a failed attempt
Tests:

- Without patch, upload an invalid zim file, 'Failed to add content'... message
is shown. The library's content directory contains that invalid file. Try to add
the file again and the message shown is 'File already exists'.

- With patch, upload an invalid zim file, 'Failed to add content'... message is
shown. The library's content directory does not contain that file. Try to add
the file again and the same message is shown.

- Functional tests for kiwix pass. Repeating just the test
test_add_invalid_zim_file works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-03 11:46:23 +03:00
Joseph Nuthalapati
876cace107
tiddlywiki: Avoid writing duplicate temporary files
Tests:

- Raise an error by editing code in create, upload, rename and delete
operations. Notice that the details error messages are shown with a drop-down.

- Upload a wiki and it works. The name is as expected.

- Upload the wiki again notice that the duplicate wiki error is shown.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use new utility for uploading]
[sunil: Better error message display in the UI]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-03 11:45:59 +03:00