9812 Commits

Author SHA1 Message Date
Joseph Nuthalapati
bbeced68f7
notifications: Add datetime to each notification
- Notifications are displayed in a user-friendly "time ago" format.

- Use last_update_time instead of created_time

Sunil:

- Some notifications don't have app name and app icon. Styling for those
notification was different due to the last update time. Revert back to
positioning for it. Use CSS float for it.

- Use localized, locale specific date/time format for the tooltip.

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>
2025-07-10 16:07:37 -07:00
Joseph Nuthalapati
efbf2a80f5
notifications: Fix setting last_update_time
The field last_update_time is set to auto_now in the Django model, but it is not
being updated when using update_or_create() since Django 4.2. This is because it
sends update_fields= argument to save().

Say, a user installed an app a few hours ago and uninstalls it now, the
notification should be updated to show the uninstallation status but it shows
the timestamp of the installation instead.

Explicitly setting the updated timestamp is one way of fixing this issue.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use django_db mark in test case]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-10 16:05:47 -07:00
Sunil Mohan Adapa
33dfc2cd41
dynamicdns: Fix a type check error
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-10 09:25:52 -07:00
Joseph Nuthalapati
8d98345e2d
dynamicdns: Switch update client to HTTP protocol
Fixes: #2520

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use params= argument instead of incorrectly contacting query params]
[sunil: Recognize error responses properly]
[sunil: Minor styling fixes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-09 20:54:46 -07:00
Joseph Nuthalapati
9fa1e18aa3
diagnostics: Add collapsible sections for results
Uses Bootstrap accordion class to do collapsible sections without adding any
custom CSS or JavaScript.

Closes #2479

Sunil:

- Create one accordion instead of many. Automatically collapsing previously
expanded item works.

- Fix dangling </section> close tag.

- Embrace accordion styling instead of header-like styling for headers. The
tables with results are distinguished from the header due to header
highlighting and margins around tables.

- Fix issue with multiple 'passed' badges show for single app. 'regroup'
template tag expects the dict to be already sorted by the selected property.

- Internationalize badge text in headers.

- Right align badges. Move repair button into the accordion header for better
appearance.

- Wrap the header on small screen sizes.

- Add additional necessary HTML attributes.

- Change 'Loading...' to 'Running...' more accurately specify the status.

- Show Running and Exception statuses in header.

- Use 'text-bg-' classes instead of 'bg-' for allow automatic selection of text
color.

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>
2025-07-07 15:35:14 -07:00
Joseph Nuthalapati
3798e519d4
featherwiki: Disable caching to avoid 412 errors
Synchronize the Apache server configuration with TiddlyWiki.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Drop no-cache and must-revalidate directives as they are redundant]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-07 12:27:54 -07:00
Joseph Nuthalapati
98d4327c49
tiddlywiki: Avoid "412: Precondition failed" error
Apache sends an instruction to the browser to not cache the TiddlyWiki file at
all. This forces the browser to fetch the new version after each write avoiding
the case "file changed on server".

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Drop no-cache and must-revalidate directives as they are redundant]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-07 12:27:35 -07:00
Joseph Nuthalapati
e444b74e93
featherwiki: Don't allow index.html as a file name
Tests:

- Creating/renaming/uploading wikis with names index[.html] does not work. Doing
so with other names work.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use validators= property instead of clean_name()]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-07 11:50:39 -07:00
Joseph Nuthalapati
d89fcd74f1
tiddlywiki: Don't allow index.html as a file name
Tests:

- Creating/renaming/uploading wikis with names index[.html] does not work. Doing
so with other names work.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use validators= property instead of clean_name()]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-07 11:49:10 -07:00
தமிழ்நேரம்
2cd4839c34
Translated using Weblate (Tamil)
Currently translated at 91.8% (1703 of 1854 strings)
2025-06-30 11:01:48 +02:00
kosagi
1606de6166
Translated using Weblate (Catalan)
Currently translated at 36.1% (670 of 1854 strings)
2025-06-26 00:04:36 +02:00
Besnik Bleta
41d4aae80f
Translated using Weblate (Albanian)
Currently translated at 99.5% (1846 of 1854 strings)
2025-06-26 00:04:34 +02:00
J AK
b2f4767654
Translated using Weblate (Albanian)
Currently translated at 99.5% (1846 of 1854 strings)
2025-06-24 23:41:58 +02:00
Priit Jõerüüt
d2f9ccf617
Translated using Weblate (Estonian)
Currently translated at 1.2% (24 of 1854 strings)
2025-06-20 00:01:46 +02:00
James Valleroy
331d214c6f
performance: Handle install for trixie
In trixie, cockpit-pcp is replaced by cockpit-bridge. However, our
packages module does not properly handle virtual packages.

- Specify cockpit-bridge and pcp as dependencies. In bookworm, they were
  dependencies of cockpit-pcp.

- Allow cockpit-bridge as a substitute for cockpit-pcp.

Tests:

- In stable container, install Performance app. Install succeeds and app
  is available.

- In testing container, install Performance app. Install succeeds and
  app is available.

- Build stable-backports package with new version. Install in stable VM.
  Install Performance app. Check that dist-upgrade succeeds. After
  dist-upgrade, Performance app is still working. Uninstalling
  Performance app works. Installing Performance app works. Diagnostics
  are all passed.

Note: There is one minor issue with the Diagnostics. Package
cockpit-bridge line is shown twice (both are passed).

Fixes: #2475

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-06-18 20:32:03 -07:00
James Valleroy
f40523a1b1
debian: Update debconf Portuguese translation
Thanks to Américo Monteiro for the patch.
2025-06-16 18:50:05 -04:00
ikmaak
ac9284f9fd
Translated using Weblate (Dutch)
Currently translated at 97.3% (1804 of 1854 strings)
2025-06-14 15:01:54 +02:00
ikmaak
7c74f997bb
Translated using Weblate (German)
Currently translated at 98.0% (1818 of 1854 strings)
2025-06-14 15:01:52 +02:00
ikmaak
f2eee96c0d
Translated using Weblate (Dutch)
Currently translated at 95.6% (1774 of 1854 strings)
2025-06-12 15:01:51 +02:00
Priit Jõerüüt
fd0c3400da
Translated using Weblate (Estonian)
Currently translated at 0.4% (9 of 1854 strings)
2025-06-04 17:01:49 +02:00
András Szűcs
d07c50d14a
Translated using Weblate (Hungarian)
Currently translated at 72.0% (1336 of 1854 strings)
2025-06-04 17:01:45 +02:00
Priit Jõerüüt
119f408270
Added translation using Weblate (Estonian) 2025-06-03 16:35:59 +02:00
Sunil Mohan Adapa
ce341b18ab
homeassistant: Add the most popular app for home automation
- Use docker container via registry.freedombox.org to obtain the package.
Specify this in the description.

- Mark the app as experimental.

- Show information that a dedicated domain is required to host Home Assistant.

- Use special YAML loader/dumper to deal with custom YAML tags in configuration
file.

- Obtain logo file from a test file in code repository with Apache license as
the actual logo files are freely licensed.

- Write functional tests without accessing the website as a dedicated domain is
necessary.

Tests:

- Functional tests work.

- Add a domain 'mydomain.example' using the Names app. Assign this domain in
Home Assistant app configuration. In /etc/hosts on the host machine add a
mapping from mydomain.example to the IP address of the container/VM. Access the
web interface using https://mydomain.example. Home Assistant web interface is
available and functional.

- After install of the app the configuration.yaml file contains the proxy
related lines are expected.

- Diagnostics work (expect the URL access).

- Re-run setup works.

- 'Launch web client' and frontpage shortcut work as expected.

- Non-admin users can't connect on port 8123.

- Home Assistant is able to establish websocket connection in its web UI.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:55 -04:00
Sunil Mohan Adapa
f83485b68c
templates: Show Launch web client button for all FreedomBox URLs
Tests:

- For Bepasty app, the 'Launch web client' button is shown.

- For Matrix app, the 'Launch web client' button is not shown.

- For Home Assistant app, the 'Launch web client' button is shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:52 -04:00
Sunil Mohan Adapa
298bb5ae58
config: Allow better Apache default home page
- Don't redirect to '/index.html' when Apache Default is set as the home page.
This allows having other files such as 'index.php' as index file in
/var/www/html/.

- If the home page is currently set to 'Apache Default' upgrade the
configuration.

Tests:

- With Home page set to 'Apache Default' apply the patches. Config setup is
re-run. The configuration file becomes empty but is still present. Correctly
value is shown in the UI. /var/www/html/index.html is still shown as the home
page.

- With Home page set to 'Bepasty' apply the patches. Config setup is re-reun.
The configuration file is not modified. Bepasty is still shown as the home page.
Correctly value is shown in the UI.

- With Home page not modified apply the patches. Config setup is re-reun. The
configuration file is created. FreedomBox is the home page. Correctly value is
shown in the UI.

- On fresh machine with patches applied, perform first run. The configuration
file is not created. FreedomBox is the home page. Correctly value is shown in
the UI.

- Changing home page to Bepasty or 'Apache Default' works. Changing back to
'FreedomBox Service (Plinth)' also works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:50 -04:00
Sunil Mohan Adapa
007d8de346
apache, letsencrypt: Create a site specific config for all domains
- Instead of just the sites that have successfully obtain certificate. This
allows customization of configuration for those sites (especially useful when
testing where LE certs are not obtained).

Tests:

- When a domain is added to the system, an apache TLS configuration is created
for the domain even though the domain does not have a successfully obtained LE
cert.

- When a domain is removed, the TLS configuration for the domain is removed.

- Add a domain without the patches. Apply the patches and restart the service.
The domain added signals are fired during the startup. This results in site
specific TLS configuration files getting created and Apache reloads. When the
service is restarted, the files are not created and Apache is not reloaded.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:48 -04:00
Sunil Mohan Adapa
d76a371f57
apache: Add component to host an app on a site's root
Tests:

- Unit tests work.

- Functional tests on bepasty work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:45 -04:00
Sunil Mohan Adapa
0fa1dcf902
apache: Generalize TLS config to use certificates only if available
- This allows TLS configuration to setup for domains that haven't yet
successfully obtained certificates yet.

Tests:

- Apply the patch on a production configuration and ensure that LE certificates
are properly used.

- With full pathset applied, on a test container, add a domain and ensure that
domain has its own site configuration and uses the snake-oil certificate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:38 -04:00
Sunil Mohan Adapa
8401b08357
apache: Allow customization to the root of a site
Tests:

- After a domain is added and a TLS configuration for the site is created,
creating each of the 4 files leads to customization for that domain. In case of
last two files, only the domain is effected.
  - /etc/apache2/includes/all-domains-include-freedombox.conf
  - /etc/apache2/includes/all-domains-include.conf
  - /etc/apache2/includes/$domain-include-freedombox.conf
  - /etc/apache2/includes/$domain-include.conf

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:36 -04:00
Sunil Mohan Adapa
2fdbe9948d
forms: Allow showing a None option during domain selection
- To be used to show that no domain is initially selected in Home Assistant. And
also to release a domain from dedicated use.

Tests:

- Install Matrix Synapse app in unstable VM. After install the setup form does
not show None as an option. Selecting a domain works as expected.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:16 -04:00
Sunil Mohan Adapa
927e1dc822
matrixsynapse: Drop help text for domain selection dropdown
- Drop the warning that app may not work properly if domain name is changed.
Currently only user of this form is matrixsynapse. There is already a warning
message that domian name change requires uninstall. This message is redundant
and incorrect.

Tests:

- Install Matrix Synapse on stable VM and ensure that the help text does not
show up.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:14 -04:00
Sunil Mohan Adapa
5b0d980035
container: Add component for managing containers using podman
Tests:

- Unit tests work.

- Enabling/disabling an app works.

- Developer documentation shows the Container in reference section.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:12 -04:00
Sunil Mohan Adapa
16f90d863b
action_utils: Allow checking result for service operations
Tests:

- Functional tests for bepasty, nextcloud, torproxy app work.

- Adding/removing a domains works.

- After first setup, nscd service is masked.

- Re-run setup on miniflux app works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:10 -04:00
Sunil Mohan Adapa
3c9814cb78
action_utils: Add support for device mappings in podman containers
Tests:

- Functional tests for nextcloud app work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:08 -04:00
Sunil Mohan Adapa
d8983c8942
dynamicdns: Add info about subdomains with Foundation's service
Tests:

- Visit the dynamicdns app. The new description about subdomains appears.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:06 -04:00
Sunil Mohan Adapa
b494f8a993
names: Add information about adding static domains/subdomains
Tests:

- Visit the add static domain page. Notice that additional form description is
visible.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:04 -04:00
Sunil Mohan Adapa
15f71fe7e0
letsencrypt: Drop old app migration code
- In version 23.6.2 (Debian Bookworm), the migration code is already present.
This means all users on bookworm would have migrated already. We don't have
support users upgrading directly from a version older than bookworm.

Tests:

- First setup works as expected when starting the service on a fresh container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:14:02 -04:00
Sunil Mohan Adapa
3b1eba216a
uninstall: Use reverse order when uninstalling components
Tests:

- Functional tests for bepasty app work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-30 15:13:59 -04:00
kosagi
ad2908630c
Translated using Weblate (Catalan)
Currently translated at 28.0% (520 of 1854 strings)
2025-05-29 10:01:45 +00:00
kosagi
f5f02d3432
Translated using Weblate (Catalan)
Currently translated at 25.5% (473 of 1854 strings)
2025-05-21 16:01:51 +00:00
Максим Горпиніч
9b7dfc4830
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1854 of 1854 strings)
2025-05-21 16:01:48 +00:00
kosagi
e6c30a5ae6
Translated using Weblate (Catalan)
Currently translated at 17.8% (331 of 1854 strings)
2025-05-17 21:51:14 +02:00
Sripath Roy Koganti
d7677c64e2
Translated using Weblate (Telugu)
Currently translated at 100.0% (1854 of 1854 strings)
2025-05-14 19:03:08 +02:00
James Valleroy
9b465faa10
Release v25.9 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v25.9
2025-05-05 20:31:43 -04:00
James Valleroy
ba7f74bf71
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-05 20:28:58 -04:00
Sunil Mohan Adapa
8c6c31d991
minetest: Create the configuration directory if necessary for Trixie
Closes: #2514

- On Trixie the configuration directory is /etc/luanti and not /etc/minetest.
So, it needs to be created.

Tests:

- On Trixie and Bookworm, updating configuration works. On Trixie, directory is
created if it does not exist.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-05 19:57:08 -04:00
Sunil Mohan Adapa
daa7c326b8
minetest: Work with new luanti binary in Trixie
- Based on suggestion from Benedek[1].

Links

1) https://salsa.debian.org/freedombox-team/freedombox/-/issues/2514#note_608054

Tests:

- On Trixie, freshly install minetest server. The server is successfully running.
Command line for the process shows that gameid is minetest_game. Configuration
file is /etc/luanti/default.conf.

- Update configuration. The update is successful. The configuration
/etc/minetest/minetest.conf is created. The server command line shows using
/etc/minetest/minetest.conf as the configuration file.

- On Bookworm, freshly install minetest server. The server is running. Updating
configuration works. Command line shows that /etc/minetest/minetest.conf is
being used.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-05-05 19:57:05 -04:00
Torra-Merin
e0c5d042d5
Translated using Weblate (Catalan)
Currently translated at 9.6% (179 of 1854 strings)
2025-05-03 00:04:07 +02:00
Torra-Merin
7d4de6fed4
Added translation using Weblate (Catalan) 2025-05-01 23:48:59 +02:00
swaroop02-cse
40742bd95d
Translated using Weblate (Telugu)
Currently translated at 99.9% (1853 of 1854 strings)
2025-04-30 09:52:41 +02:00