9278 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
54b956c602
ui: Drop the temporary fix for missing popper.js 2.0
- Latest version of libjs-bootstrap5 depends on
node-popper2. However, version in Debian bookworm still continue to have
incorrect dependency. So, add explicit dependency on node-popper2 until we stop
supporting Bookworm.

Tests:

- In stable and testing VMs, install node-popper2 and notices that the following
work as expected:
  - User menu dropdown in desktop and mobile layouts.
  - Help menu dropdown in desktop and mobile layouts.
  - Notification dropdown.
  - App extra actions dropdown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-24 11:20:16 +02:00
pesder
d14739c8ad
Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 20.3% (365 of 1798 strings)
2025-01-24 04:38:26 +01:00
Benedek Nagy
00a4ff3b41
email: Make rspamd learn spam/ham when the user marks mails as junk or not junk.
Add two sieve scripts for spam/ham learning. When the user moves a mail
from anywhere to junk, or from junk to anywhere (except for trash) the
mail is piped into the respective rspamc learn_spam/learn_ham command.
The rspamc command is run as the mail user and the command requires that
the user can connect to localhost:11334. Because of that, add the mail
user to the allowed users that can access protected services.

The sievec compilation of the new scripts requre the dovecot-antispam
package, so install it and increment the email version number.

Closes: #2487
Imroves: #56

Tests done:
1. Apply the patches on an existing install
2. Confirm the firewall and the email app get updated
3. Move a mail from inbox to junk and confirm that rspamd statistics for
   "Learned" mails increment by one.
4. Move back the mail from junk to inbox and confirm the number
   increments again.
5. Move the mail to trash and confirm the script doesn't execute.
6. Repeat steps 3-5 with mail_debug = yes in /etc/dovecot/dovecot.conf
   and confirm the script esxecution further by reading the debug logs.

[Sunil]

- Split the configuration file 90-freedombox-sieve.conf into
90-freedombox-imap.conf and merge the remaining with 95-freedombox-sieve.conf.

- These changes do not need dovecot-anitspam package. Remove it from packages
list for the app.

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-01-23 15:36:32 -08:00
Sunil Mohan Adapa
861796d21b
nextcloud: tests: functional: Fix test for modified structure of UI
- The DOM structure of the nextcloud UI seems to have changed.

Tests:

- In functional tests, with the updated code, test_create_folder test passes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-21 17:47:16 -05:00
Sunil Mohan Adapa
b15bca2fe4
nextcloud: tests: functional: Set override domain testing on VM
Closes: #2437

- The port part of the override domain was not being set properly. Set this
properly.

Tests:

- Running tests on am VM spawned by the container script works (it does not
require port).

- Running tests on Vagrant VM has not been tested.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-21 17:47:13 -05:00
Sunil Mohan Adapa
d2dd547fac
ui: Fix missing arrow on dropdown form fields
Closes: #2488.

This is due to outdated django-bootstrap-form package that does not set
.form-select class on dropdowns as needed by Bootstrap 5.

Tests:

- On stable and testing VMs, dropdowns in the 'Add backup location' page show
arrows.

- On a mobile layout, the overflowing text does not overlap onto the dropdown
arrow.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-21 11:31:45 +02:00
109247019824
0a35c91de5
Translated using Weblate (Bulgarian)
Currently translated at 55.0% (990 of 1798 strings)
2025-01-16 12:00:32 +01:00
Sunil Mohan Adapa
acc3fa1bdb
gnome: Add changes missing from branch merge
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-01-15 15:15:09 -08:00
Sunil Mohan Adapa
837ed09dc3
gnome: Add app to provide a graphical desktop environment
- This app is useful for people who can connect a monitor, a keyboard, and a
mouse to their FreedomBox.

- Later this app allow a headless FreedomBox to be used as a remote desktop
server. Users will be able to connect and access desktop applications from LAN
or WAN.

- No functional tests as they will likely fail in CI and container setups.

Tests:

- In a VM, install the app. Installation succeeds.

- Disabling the app makes systemd switch to multi-user.target shutting down any
service that any mean for GUI such as gnome-remote-desktop.service. Graphical
login is not shown on the VM's virtual monitor.

- Enabling the app make systemd switch to graphical.target and all the services
are started again. Graphical login is shown on the VM's virtual monitor.

- Login to desktop using VM's graphical terminal works. Settings, apps, browser
etc. work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-15 17:56:16 +02:00
Sunil Mohan Adapa
dbb4391b61
action_utils: Implement methods to get/set the systemd boot target
- To be used in GNOME app.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-15 17:55:50 +02:00
Besnik Bleta
cb487e1e4c
Translated using Weblate (Albanian)
Currently translated at 99.6% (1791 of 1798 strings)
2025-01-15 05:00:40 +01:00
109247019824
8ddcf83811
Translated using Weblate (Bulgarian)
Currently translated at 54.8% (987 of 1798 strings)
2025-01-15 05:00:39 +01:00
Jiří Podhorecký
84f29fde45
Translated using Weblate (Czech)
Currently translated at 100.0% (1798 of 1798 strings)
2025-01-15 05:00:38 +01:00
大王叫我来巡山
66e912b998
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 63.0% (1134 of 1798 strings)
2025-01-15 05:00:36 +01:00
Burak Yavuz
c13dba245d
Translated using Weblate (Turkish)
Currently translated at 100.0% (1798 of 1798 strings)
2025-01-15 05:00:35 +01:00
Dietmar
9cf92cf3f1
Translated using Weblate (German)
Currently translated at 98.6% (1774 of 1798 strings)
2025-01-15 05:00:34 +01:00
James Valleroy
62e5689c70
Release v25.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v25.1
2025-01-13 21:40:03 -05:00
James Valleroy
8d14cc5ce9
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 21:40:03 -05:00
James Valleroy
6035e8732a
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 20:33:58 -05:00
gfbdrgng
ddaad0bdf5
Translated using Weblate (Russian)
Currently translated at 97.9% (1751 of 1788 strings)
2025-01-14 02:32:15 +01:00
Sunil Mohan Adapa
17ff564eeb
email: Fix regression error when installing/operation app
- In tags cleanup code, the front page shortcut for email uses different tags
than those provided in the manifest. When the app is instantiated in privileged
code without setting up Django, this causes an error even though gettext_noop is
used. Workaround by using a custom method for this.

Tests:

- Installing, enabling/disabling email apps works.

- 'make update-translations' output shows that django.pot has been updated and
the tags in question are part of the POT file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 19:39:38 -05:00
Sunil Mohan Adapa
28e4fe0791
backups: Make all generated archive names consistent
- For scheduled backups and automatic backups generated when uninstalling apps,
make the generated archive name similar to automatic name given no name is
specified when creating an archive.

Tests:

- Set schedule on a local repository, uninstall an application, and create a
backup archive without a name. The timestamp in generated backup archives in all
three cases is similar in format.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 19:17:37 -05:00
Sunil Mohan Adapa
d710ab0790
backups: Properly cleanup after downloading an archive
Closes: #2354.

- Process spawned for raw IO should be collected using wait(). Closing the
specially created pipe early causes an exception in the child process when it
tries to write to stderr the JSON result of executed method.

Tests:

- Monitor the output of 'journalctl -f'. Download and archive. Without the
patch, an error is printed as described in the bug. With the but no such error
is printed. Downloaded file is the same in both cases.

- Writing a log message in cleanup_func shows that the process has been waited
for and the FDs have been closed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 19:17:33 -05:00
Sunil Mohan Adapa
03484bd026
backups: Add warning that services may become unavailable
Closes: #1500.

Tests:

- Form shows description.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 19:17:30 -05:00
Sunil Mohan Adapa
872e161ec2
backups: Handle error when there is not enough space on disk
Tests:

- Fill up disk to have very little space left. Perform a large backup operation
by writing a large file to one of the directories to be backed up. Try to
perform the backup and notice that a nice error message is shown that there is
not enough disk space instead of a generic error message.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-13 19:17:25 -05:00
Sunil Mohan Adapa
055e7603b2
email: Show DNS entries for all domains instead of just primary
- Promote reverse DNS information to primary heading.

- Add information that only one domain have reverse DNS configured.

- Clarify that ISP are also responsible for reverse DNS.

- Show reverse DNS records only for primary domain.

Tests:

- View email app. List of domains is shown in the domain section. Primary domain
is marked with a special icon.

- Clicking on the domain works. DNS and reverse DNS information is shown. DKIM
key information is present.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:30:48 +01:00
Sunil Mohan Adapa
900a7e6fdb
email: Create DKIM keys for all known domains
- Instead of just the primary domain. This bring us closer to working equally
well on all the domains.

- App version number has not be incremented because it has already been
incremented for this release cycle.

Tests:

- When re-running the setup of email app. Notice that all the domains have DKIM
keys now.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:30:39 +01:00
Sunil Mohan Adapa
26a61d67b9
dynamicdns: Use the public IP lookup URL from privacy app
- Drop the configuration field from all the forms.

- Those using a different value for public IP lookup URL must now set the value
again in the privacy app. Privacy app will show the review notification again
for this reason.

Tests:

- Functional and unit tests pass.

- Printing the external IP address during the update task shows correct value.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:30:23 +01:00
Sunil Mohan Adapa
ed519187c5
privacy: Show notification for privacy settings again
- Since a new option has been introduced the privacy app.

Tests:

- When the patch is applied and service is restart, privacy app's setup is run
again and notification is shown when it has already been dismissed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:30:15 +01:00
Sunil Mohan Adapa
81c5268ff6
privacy: Add option in UI to set lookup URL for public IPs
- This will act as centralized location to set the URL to lookup IP addresses.

Tests:

- When no value is set initially, the URL for Foundation is shown. This also
happens when the value is removed from 'plinth_kvstore' sqlite3 table.

- When empty value is set it, the empty value is set in DB and show in the UI.

- When no value is changed and form is updated, message is shown that settings
have not changed.

- When value is changed and form is updated the updated value is shown in the
form, message is shown that configuration has been updated.

- Updated URL value reflects in the email app and errors change accordingly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:30:06 +01:00
Benedek Nagy
15291fdb8a
email: Show reverse DNS entries to be configured
Imroves: https://salsa.debian.org/freedombox-team/freedombox/-/issues/56

[sunil]

- Show reverse DNS records for both IPv4 and IPv6 addresses.

- Use utility to lookup public IP addresses.

- Rename the template context variable and method to use less technical terms.

- Use Python's ipaddress module to compute the PTR record's domain value.

- Don't retrieve primary domain at the module level.

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:29:50 +01:00
Sunil Mohan Adapa
a4b8f3e27f
privacy: Introduce utility to lookup external IP address
This will later become a setting in the privacy app. It will be used by email,
dynamicdns, and networks apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-01-13 21:28:23 +01:00
Sunil Mohan Adapa
42d1225f5b
views: Use tags from menu or shortcut instead of the app
- Also remove the extra unwanted space between the tags.

- This allows different shortcuts of the same app to have different tags on the
home page. Example: email shortcuts on the home page.

- This also allows custom shortcuts to have their own tags without being
attached to any app provided by FreedomBox.

- Filter shown menu items by tags on the menu item rather than tags on the app.
They could be different.

Tests:

- Home page shows shortcuts with tags.

- Apps and system pages show shortcuts with apps.

- Apps are properly filtered when tags are clicked on in the app page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:09:23 +05:30
Sunil Mohan Adapa
ffc95019f0
apps: Only show app tags all the tags in apps page search box
- Earlier tags of all the apps from help, system, and apps pages were shown.
Now, only show tags from apps in the apps page.

- There is no need to override language since menu.tags which is sames as
info.tags is already a list of untranslated strings.

Tests:

- List of tags is shown in the dropdown when tag search bar is clicked. This
list contains translated tags when language is set to Spanish. The sort order is
per the translated locale.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:08:48 +05:30
Sunil Mohan Adapa
7cad8e47be
app: Stop showing short description on installation page
Since there are currently no apps with short description, it does not show
already anyway.

Tests:

- Installing an app works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:08:35 +05:30
Sunil Mohan Adapa
f2d99106af
doc: dev: Remove short description and add tags to all components
Tests:

- Build developer documentation and ensure that there are no errors during build
and all changes are reflected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:08:25 +05:30
Sunil Mohan Adapa
89bce7a344
app: Add tags to menu and frontpage components
- Add typing information for init methods Info, Shortcut, and Menu to easily
  identify problems.

- Update docstrings for these components.

- Updates test cases to deal with tags instead of short description.

- Update custom shortcuts code to read tags and ignore short description.

- Update API to send tags instead of custom shortcuts.

- OpenVPN special treatment of info.description in Shortcut

Tests:

- All unit tests pass and type checking succeeds.

- All apps show icons with tags in apps and system section.

- In help section cards don't show tags.

- In front page, enabled apps show shortcuts with tags.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:08:10 +05:30
Sunil Mohan Adapa
196a2deb6f
app: Allow apps to instantiate without Django initialization
- When tags are added to Menu and Shortcut components, we will need to access
info.tags which tries to extract the original string from lazy proxy. This
requires Django initialized. When privileged process tries to initialize the app
without initializing Django, this leads to an error. Fix this by extracing the
original string from a lazy proxy a hacky way.

Tests:

- Running diagnostics does not show errors with Django initialization in checks
for configuration links.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:07:59 +05:30
Sunil Mohan Adapa
67cef398e1
miniflux: Ignore an type check error with pexpect library
- Even though pexpect is set for override in pyproject.toml latest
mypy==1.13.0-2 on Debian testing throws an error here.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:07:43 +05:30
Dietmar
a62e66daec
Translated using Weblate (German)
Currently translated at 99.1% (1772 of 1788 strings)
2025-01-09 08:38:19 +01:00
Veiko Aasa
fbd6adeac1
deluge: tests: functional: Fix deluge client logged in detection
Tests:
 - All deluge functional tests pass and monitored that there are no
 unreasonable delays in deluge web client while tests are running.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-07 18:40:48 +05:30
Sunil Mohan Adapa
78cba1e217
ui: Don't place JS file at the bottom of the page
- They should only be present in the <head>. Since all files are loaded with
'defer' attribute, it is no longer needed to place the JS files at the bottom of
the page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 12:09:01 +02:00
Sunil Mohan Adapa
c45bdf56dd
ui: js: Load all JS files in deferred mode to speed up page load
- This improves page rendering time. If JS files are not loaded in deferred or
async mode, they will halt the page rendering until JS files are loaded from
network.

- 'defer' mode guarantees that the load order is same as the order in which JS
files appeared in the HTML page.

Tests:

- Run at least one function of each affected JS file and ensure that is works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 12:08:51 +02:00
Sunil Mohan Adapa
ddd2d5b4a3
ui: Drop remnants of already removed background images
- Due to their fixed widths they were causing the drop down navigation bar to
placed incorrectly in mobile view.

Tests:

- In mobile view in home, apps, system, and help pages the navbar dropdown
button is placed correctly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:46:24 +02:00
Sunil Mohan Adapa
2f0ec1a1cd
web_framework: Disable caching templates files in development mode
- When a template page is updated, we are having to restart service in order for
the new changes to reflect. This is due to caching of template files starting
Django 4.1[1]. Disable this behavior in development mode to allow reload the
browser page to see changes reflected.

Links:

https://docs.djangoproject.com/en/5.0/releases/4.1/#templates

Tests:

- Change a template file and reload the page without restarting service. The
changes should reflect immediately.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:45:57 +02:00
Sunil Mohan Adapa
9b8b0cd254
ui: Fix missing variables in Bootstrap 5.2/Debian stable
- Most notable of the problems is the missing hover color on cards.

Tests:

- Cards have a gray hover color.

- Forms with errors have input boxes with red borders and help text with red
color.

- Select all button in created backup has a border.

- UI is consistent across stable and testing for tested cases.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:40:19 +02:00
Sunil Mohan Adapa
f568d75539
ui: Update section header style to increase size, remove underline
- Currently, there is a bug with section header with Bootstrap 5 migration in
stable. It causes the section headers not to have underline in Debian stable but
only in Debian testing. This is due to the variable --bs-secondar-border-subtle
being defined only in Bootstrap 5.3 (testing) but not in Bootstrap 5.2 (stable).

- The removal of the border is actually reducing visual noise. So, commit to it
by removing the border even on testing. To Increase contrast to the section
headers, increase their font size (but reduce font weight).

Tests:

- In testing and stable VMs, the style is same and as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:40:19 +02:00
gfbdrgng
dba6c1f4a9
Translated using Weblate (Russian)
Currently translated at 97.8% (1750 of 1788 strings)
2025-01-07 08:01:33 +00:00
gfbdrgng
12c240803f
Translated using Weblate (Russian)
Currently translated at 96.8% (1732 of 1788 strings)
2025-01-06 08:11:07 +01:00
James Valleroy
6f1d97e009
Release v24.26.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.26.1
2025-01-05 12:17:24 -05:00