3605 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
87331e7c97
gitweb: Don't use privileged action feature to run as different user
- Instead implement running specific commands inside the privileged action as a
specific user.

Tests:

- Gitweb functional tests and unit tests work.

- Running various operations such as clone, create, set branch, rename, etc. all
result in repositories (and all their contents) owned by www-data:www-data.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:22:40 +05:30
Sunil Mohan Adapa
7a4fb9d9f6
gitweb: Use pathlib API more
Tests:

- Existing gitweb repos are listed properly. Newly created repos are reported
  properly.

  - Directories without .git extension or starting with . are not shown.

  - Private repos are shown as private and public ones as public.

- Cloning progress is shown properly in the list of repos.

  - Cloning starts with 0%.

  - Cloning file is removed after completion of cloning process.

  - Cloning is done into .temp directory.

  - After cloning repo can be checked out as expected.

- Getting/setting of default branch/description/owner/private works.

- Getting the list of branches work when selecting the default branch.

- Creating new blank repo works.

- Deleting a repo works

- Uninstalling the app works. All repos are removed.

- Retrieving non-existent repo shows error as expected

- Backup/restore of repos works as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:22:15 +05:30
Sunil Mohan Adapa
46c3ac90f3
email: Fix Thunderbird auto configuration failure
- When there is no URL name provided, the view fails to render when computing
breadcrumbs from middleware. Provide a name so that the URL does not lead to a
500 HTTP error.

Tests:

- Accessing the URL on development machine does not lead to an error page.

- On a production machine, when trying to use Thunderbird account setup wizard,
without the patch, Thunderbird says that it found configuration by enumerating
common names for the domain. A 500 error can be seen in the journal. After the
change in patch, Thunderbird says that it found the configuration from the
provider. A 200 success code can be seen from journal.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-05 07:33:03 -04:00
Joseph Nuthalapati
5e1345f0df
backups: Trim translatable string
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-02 12:26:36 +05:30
Veiko Aasa
35b03aa5df
samba: Update client list
Removed android apps that have been discontinued and added SambaLite
app.

Tested that SambaLite works with Samba app.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-01 23:18:54 +05:30
Sunil Mohan Adapa
52cde4c0b6
upgrades: Don't allow needs-restart to restart privileged daemon
Fixes: #2534.

- Otherwise, if python standard library is updated, needs-restart will determine
that the freedombox-privileged.service needs to be restarted. The service may
have triggered the 'apt-get install' operation that triggered needs-restart in
the first place. That causes the install operation to fail.

Tests:

- Installing Calibre app which also brings in python standard library update
succeeds and freedombox-privileged.service is not restarted during 'apt-get
install' operation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-01 23:14:25 +05:30
Sunil Mohan Adapa
411bec8f53
syncthing: Update Android clients to Syncthing-Fork
Closes: #2539.

- MPL 2.0 is a free software license.
https://www.gnu.org/licenses/license-list.html#MPL-2.0

Tests:

- Links in the app page work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-08-31 11:03:20 +05:30
Joseph Nuthalapati
0a9341851f
power: logind config to ignore laptop lid close
Defined two settings for ignoring laptop lid close action. They handle
the two cases - running on battery power and running on external power.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-08-29 20:50:47 -07:00
Sunil Mohan Adapa
5cee6563cc
diagnostics: Fix notification severity when skipping tests
Fixes: #2531.

- Currently, when a diagnostics test is skipped, the notification shows up with
'error' severity. Instead of this, treat 'skipped' and 'not done' tests as
passed for the purpose of the notification.

Tests:

- Change code in package.py to set the result of diagnostic test to be 'SKIPPED'
and 'NOT_DONE', in both cases, the notification is not shown after running full
diagnostic runs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-08-21 19:38:33 +05:30
Sunil Mohan Adapa
f27b222657
homeassistant: Fix typo in description
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-08-20 08:33:25 -07:00
Sunil Mohan Adapa
493dd7b3d3
email: Increment app version number to trigger dovecot restart
- Since we have important fixes deployed that we would like to get effected
immediately.

Tests:

- Not tested.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-08-18 20:31:25 -04:00
Sunil Mohan Adapa
e02263c93b
dovecot: Fix location of Inbox in dovecot 2.4
- Dovecot is upgraded from 2.3 to 2.4, users are unable to see the old mails
from before the upgrade. New mails can be received but old mails can't be
accessed. Old mails are still present in
/var/mail/{usernmame}/mail/mailboxes/... New mails are being stored in
/var/mail/{username}/u.*. Other mailboxes such as 'Sent' are not affected.

Tests:

- Mails received in the inbox before the upgrade to dovecot 2.4 are now visible.
Without the patch, pre-upgrade mails are not visible and newly received mails
are stored in /var/mail/{username} instead of /var/mail/{username}/mailboxes/...

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-08-18 20:31:17 -04:00
Sunil Mohan Adapa
8692bd20ee
dovecot: Allow login using email address with dovecot version 2.4
- Users were able to login using email address during dovecot 2.3 on Bookworm.
It was incorrectly assumed that there were not able to do that. Hence the
feature was not ported to 2.4. Early upgraders have reported this issue.

Tests:

- Login using full email address in the User Name field in Thunderbird. Without
the patch, the login fails and with the patch, it succeeds.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-08-18 20:31:14 -04:00
Sunil Mohan Adapa
fe7d478099
sogo: Allow adding IMAP accounts and changing full name
Configuration provided by David (https://discuss.freedombox.org/u/david/)

Tests:

- Install SOGo without patch and apply the patch. The app setup is run and new
version of configuration file is installed. After logging into SOGo:

  - Mail settings shows an option to add IMAP account.

  - Editing Full Name in the identity of the default account is now possible.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-08-18 09:26:12 -04:00
Sunil Mohan Adapa
a70611a2e9
tests: Ensure that privileged daemon is not used during tests
- Fallback to sudo based privileged implementation. Privileged daemon tests are
still to be implemented.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-08-16 22:42:15 +05:30
Sunil Mohan Adapa
4220511eb7
ui: Use system's UI fonts on all platforms instead of Lato
- The most pleasant font on any system is the default system font.

  - It is the most optimized and styled font for the system considering screen
  type and screen sizes.

  - Used by all the system apps. Websites can become consistent with system apps
  by using system fonts. GNOME, KDE, Ubuntu, Android, Chrome OS, iOS, and MacOS,
  all have their own system fonts.

  - Changed by the user using OS settings if they don't like it.

- Many popular sites have started using system fonts.

- No extra fonts have to be loaded making page loading jerk free and much
faster. On the first FreedomBox UI page load, the largest item is the font.

- We won't have carry the binary woff files in FreedomBox source tree anymore.
Also eliminates a bunch of lintian warnings.

- Lato font was used because it is prescribed by the FreedomBox identity manual.
Lato can still be used in other places such as marketing materials.

Tests:

- System font is used in the UI. When system font is changed in Gnome settings
and browser is restarted, the new font is shown in the UI.

- Check that the overall layout of the app grids is not effected by the font
size change.

- Check that all the tables in the UI are not affected by the font change.

- Backups repository listing shows each backup archive in one line.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-08-03 06:29:38 +05:30
Sunil Mohan Adapa
1f98dfcad1
setup: Perform a check for app availability after the page loads
- Using AJAX request instead of loading the initial page slowly.

Tests:

- Unit tests passes.

- Deluge app is not available in bookworm and is available in Trixie.

- When app is available, no message is shown. Install button is enabled.

- When app is not available a proper warning alert message is shown. Install
button is disabled.

- During check for the availability, the progress message is shown. Install
button is disabled.

- When Javascript is disabled on the page, no availability check is performed.
Install button is enabled.

- When an exception is raised in the is-available view, error message is shown.
Install button is enabled.

- When is-available view return HTML response, error message is shown. Install
button is enabled.

- When is-available view invalid JSON response, error message is shown. Install
button is enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-08-02 21:06:17 +05:30
Sunil Mohan Adapa
a99508a6b2
distupgrade: Update Trixie's release date as announced
Tests:

- Distribution upgrade page shows the updated date.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-08-01 20:00:40 -04:00
Sunil Mohan Adapa
30432aa9b6
distupgrade: Handle comments in sources.list file
Tests:

- Add a comment and /etc/apt/sources.list file. Distribution upgrade page does
not load and fails with an error.

- With the patch, page loads properly. Distribution upgrade can be triggered.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix test for release date]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-08-01 20:00:32 -04:00
Benedek Nagy
bd656386b9
email: Add full text search capability
Add Full Text Search capability to Dovecot.
- Add 'dovecot-fts-xapian' to the list of packages for the email app.
- Add relevant configs for both dovecot 2.3 and 2.4
- Add a systemd timer to periodically clean search indexes

Configurations taken from plugin's upstream documentation:
https://github.com/grosjo/fts-xapian

Sunil:

- Tweak the dovecot 2.4 configuration. Remove explicit configuration same as or
close to default values.

- Drop the timer service for cleaning up the index. Dovecot documentation that
FTS plugins do it themselves.

- Drop the re-indexing command on setup. This could not be properly tested. On
first search, indexes will be created for mailboxes that don't have them.

Tests done:

- Perform a fresh install, on both Bookworm and Trixie, confirm the install is
successful, confirm the systemd service runs with exit 0.

- On Bookworm, apply the patches on an existing setup, confirm the patches apply
as expected.

- On a production like setup, set dovecot 2.4 to debug mode and check the
journal logs while receiving an email: The logs confirm that the fts module is
loaded and that it automatically creates a db for the indexes. I also opened the
newly created db file with less and confirmed that the human readable parts
contain my recent email.

- Using Sogo, perform a full search (including headers and body). Search works
and indexes are freshly created on all the folders.

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-07-23 15:46:11 -07:00
Sunil Mohan Adapa
38b3962bbc
email: Start servers during re-setup if they are not running
- This helps during distribution upgrade from dovecot 2.3 to 2.4. Dovecot will
stop running due to dovecot server 2.4 not understanding version 2.3
configuration files. When setup is re-run, starting the daemons again is the
right thing to do.

Tests:

- With email app installed, upgrade from bookworm to trixie. Dovecot is stopped
during distribution upgrade but after freedombox service runs, it recovers and
starts running again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-20 07:54:09 -07:00
Benedek Nagy
271603a435
email: Add support for Dovecot 2.4
Sunil:

- When dovecot package is upgrade from 2.3 to 2.4 during distribution upgrade,
automatically re-run setup.

- Upgrade existing setups to new scheme by re-running setup with incremented app
version.

- Don't query dovecot version during app initialization. Instead overwrite the
DropinConfigs component to query dovecot version during setup and enable
operations.

- Use apt.Cache() to retrieve the installed version of dovecot package. Use
plinth.utils.Version to parse the version and perform a comparison.

- Split even configuration files that have not changed for simplicity.

- Add/update links in Dovecot configuration files.

Tests:

- Install email app on a testing container. Ensure that all files in
/etc/dovecot/conf.d/ are linked properly to 2.4 versions. TLS configuration is
accurate. Use Sogo to test login and sending mails.

  - User with LDAP account and correct password is able to login.

  - User without LDAP account or incorrect password is unable to login.

  - Send mail with Sogo to another account on the server. Notice that mails are
  stored in /var/mail/{user}/mail/ with mail:mail ownership in mbox format.

  - Logging in with email such as user@example.com works. Capital letters are
  allowed.

  - "Archive", "Drafts", "Sent", "Junk", "Trash" folders are automatically
  created and are marked with special flags. Creating additional folders such
  as "Sent Items" also results in them having special flags.

  - Thunderbird is able to connect via SSL with a self-signed certificate
  exception.

  - When an example spam message is sent, it is automatically moved to "Junk"
  folder after getting marked by rspamd.

  - When a message is moved to Junk folder, it is learned as spam by rspamd as
  seen in its admin console.

  - When a message is moved out of Junk folder (to other than "Trash" folder),
  it is learned as not-spam by rspamd as seen in its admin console.

- Install email app on a stable container with patches. Ensure that all files in
/etc/dovecot/conf.d/ are linked properly to 2.3 versions. TLS configuration is
accurate. Use Sogo to test login and sending mails.

- Install email app on a stable container without patches. Apply patches. Ensure
that all files in /etc/dovecot/conf.d/ are linked properly to 2.3 versions. TLS
configuration is accurate for dovecot 2.3. Use Sogo to test login and sending
mails. Perform distribution upgrade to testing. Ensure that all files in
/etc/dovecot/conf.d/ are linked properly to 2.3 versions. TLS configuration is
accurate for dovecot 2.4. Use Sogo to test login and sending mails.

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-07-20 07:54:05 -07:00
Benedek Nagy
6605460df5
sogo: Fix typo in configuration for sieve server
Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-13 01:15:21 -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
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
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
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
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
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
Sunil Mohan Adapa
04bbcc3f3c
upgrades: Allow packages to be upgraded from stable-updates
Closes: #2512.

- Newer versions of packages such as tzdata are uploaded to
bookworm-updates (first?). However, unattended-upgrades is not configured to get
package updates from bookworm-updates even though it is configured in
/etc/apt/sources.list. So, manually installation will work but not
unattended-upgrades. Fix this by explicitly allowing bookworm-updates in
FreedomBox configuration modifications for unattended-upgrades.

Tests:

- Start a bookworm VM. tzdata package is at version 2025a-0+deb12u1. Latest
version available in bookworm-updates is 2025b-0+deb12u1. Running
'unattended-upgrades -d' on command line does not upgrade the package with that
patches.

- Apply patches, run 'sudo make build install' and rerun unattended-upgrades.
tzdata package upgrades to latest version.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-19 10:31:25 -04:00
Veiko Aasa
92aa66114c
users: Fix unable to delete user
Fixes an issue where confirming user deletion is not submitting the user
edit form.

Also fixes an issue where the user edit submit button is disabled after user
deletion confirmation is cancelled.

Fixes #2513.

Tests performed:
- Deleting a user works.
- All the users module tests pass.
- After cancelling the user deletion confirmation dialog, the user edit
  submit button is clickable.
- On the app pages, submit buttons are disabled when app enabling or disabling
is in progress.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-04-15 12:02:15 -07:00
Sunil Mohan Adapa
7a9ed1cad0
zoph: Don't use mod-php instead continue to use php-fpm
Zoph package depends on libapache2-mod-php. This installed and enables mod-php.
Also the process model for apache is switched to prefork. In FreedomBox, we want
mod-event and php-fpm. So, immediately after installing the package, re-run
apache setup to ensure that PHP related changes are undone.

Tests:

- On Bookworm and Trixie, install zoph. Ensure that 'a2query -m php-8.{2,4}'
show that mod-php is disabled. Also 'a2query -m mpm_event' shows it is enabled
and prefork is disabled. Apache is restarted during installation.

- On Bookworm install without patch and notice that mod-php is installed. Apply
patches and notice that mod-php and mpm_prefork are disabled while mpm_event is
enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-13 10:51:19 -04:00
Sunil Mohan Adapa
f7d289bcd6
zoph: Don't fail while uninstalling
Fixes: https://discuss.freedombox.org/t/solved-zoph-uninstall-failure/3431

There is a debconf question being asked about remove the uploaded files while
uninstalling the package. If it is not answered, removal fails. So, answer the
question during installation.

Re-run setup so that answer is set.

Tests:

- In Bookworm and Trixie, install the app, upload an image and uninstall it.
Uninstall is successful and directory /var/lib/zoph does not exist.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-13 10:51:16 -04:00
Sunil Mohan Adapa
6cdab95049
bind: Keep configuration during distribution upgrades
Closes: #2511.

- By adding bind9 to the list of packages to be held during distribution
upgrade.

Tests:

- Install bind app on Bookworm. Check that /etc/bind/named.conf.options has been
updated. Run distribution upgrade to Trixie. Notice that the configuration file
is unchanged. A new .dpkg-dist file is available with the new version of the
configuration. Journal messages show that bind was held during distupgrade and
force upgrade was later run on it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-13 08:47:23 -04:00
Sunil Mohan Adapa
e9f21b6ae1
distupgrade: Use new configuration file instead of halting upgrade
Closes: #2509

If the user has changed a configuration file of a package outside of FreedomBox,
the distribution upgrade process could face a configuration file prompt and fail
midway. When using unattended-upgrades, these packages are not a problem as they
would left untouched at an old version and the rest of the system would be
upgraded. In case of distribution upgrade, these packages could cause the
distribution upgrade to fail and leave the system in an unusable state. Rather
than halt distribution upgrade midway due to a configuration file prompt, it is
better to overwrite with the new configuration. Backup copy of the old
configuration will be available to the user to later merge with the new
configuration.

For packages managed by FreedomBox, packages with configuration file prompt will
be held back during upgrade and later carefully upgraded with merge. These
package are not subject to --force-confnew option.

Tests:

- Install GNOME and edit the configuration file
/etc/fwupd/remotes.d/lvfs-testing.conf. Upgrade to Trixie. Distribution upgrade
was successful. Notice that the configuration file was force upgraded. Log shows
that new configuration file was installed as requested. Running 'apt -f install'
shows that there are not apt fixes pending.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-11 12:01:34 -04:00
Sunil Mohan Adapa
4308f8ea01
sogo: Adjust apache configuration to work on Trixie
Closes: #2507.

In Bookworm, /usr/lib/GNUStep/SOGo/WebServerResources is a symlink to
/usr/share/GNUStep/SOGo/WebServerResources. On Trixie, the directory
/usr/lib/GNUStep does not exist. In both cases,
/usr/share/GNUStep/SOGo/WebServerResources is where the actual resources are.
Update apache configuration to use /usr/share instead of /usr/lib/.

Tests:

- On Bookworm and Trixie, install sogo and ensure that the web UI is working.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Benedek Nagy <contact@nbenedek.me>
2025-04-09 23:03:15 +02:00
James Valleroy
e4586eeb72
upgrades: Cleanup use of return value from _apt_run
_apt_run does not return anything.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Update test case]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-04-07 18:28:00 -07:00
James Valleroy
97cc901fe6
upgrades: Remove unused import
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-07 20:59:29 -04:00
Sunil Mohan Adapa
5d96bb9250
mediawiki: Update configuration to work with version 1.4 (Trixie)
Closes: #2505

Tests:

- Install app on Bookworm. Web interface works. 'Special pages' page shows
'rename user' page. That page loads.

- Dist-upgrade to Trixie. Database upgrade is performed by FreedomBox service
soon after the distribution upgrade. App still works. 'Special pages' page shows
'rename user' page. That page loads.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-07 20:59:26 -04:00