9944 Commits

Author SHA1 Message Date
109247019824
84a79d923d
Translated using Weblate (Bulgarian)
Currently translated at 56.1% (1055 of 1879 strings)
2025-09-24 05:02:05 +02:00
Максим Горпиніч
c69e870420
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1879 of 1879 strings)
2025-09-24 05:02:04 +02:00
大王叫我来巡山
4fe7a72cc1
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 61.4% (1155 of 1879 strings)
2025-09-24 05:02:02 +02:00
Burak Yavuz
f548bafcfb
Translated using Weblate (Turkish)
Currently translated at 100.0% (1879 of 1879 strings)
2025-09-24 05:02:00 +02:00
James Valleroy
028e3b1b96
Release v25.12 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v25.12
2025-09-22 20:23:37 -04:00
James Valleroy
695cd44010
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-22 20:22:44 -04:00
James Valleroy
b2827946c4
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-22 20:06:02 -04:00
Sunil Mohan Adapa
9ddb83a741
views: Fix 'internal server error' when showing 404 page
Closes: #2517.

Tests:

- Without the patch, run without --develop option and visit a non-exiting page
like /plinth/foo/. It results in '500 internal server error' instead of 404
non-found error.

- With the patch, the '404' page is shown. Breadcrumbs show only a link to the
home page with home icon.

- Accessing a page like /plinth/apps/bepasty/add?foo redirects it to
/plinth/apps/bepasty/add/?foo.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-22 19:44:39 -04:00
Sunil Mohan Adapa
2862862161
api: Fix showing icons for custom shortcuts
Tests:

- Add a custom shortcut and provide a custom icon for it in
/var/www/plinth/custom/static/icons/. Visit the page /plinth/api/1/shortcuts/.
The icon path for the custom shortcut is correct and accessible from browser.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-22 19:43:06 -04:00
Sunil Mohan Adapa
729690792f
index: Generalize showing custom shortcut icons
Instead of detecting 'custom' in the name of the icons (which can happen if the
icon basename itself contains the word 'custom'), check if the icon is already
an absolute URL path.

Tests:

- Add a custom shortcut and provide a custom icon for it in
/var/www/plinth/custom/static/icons/. Visit the frontpage and ensure that the
icon is visible.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-22 19:42:53 -04:00
Sunil Mohan Adapa
ced83a31e9
zoph: Fix cases when CLI user is set to "autodetect"
Closes: #2538

Tests:

- Without the patch, set the Zoph CLI User to "autodetect" and notice the
failure to load Zoph page.

- With the patch, set user to "autodetect" and access the app page. It is
updated to the first admin user in Zoph DB.

- Try with updating Zoph configuration.

- Try with re-running Zoph setup.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-21 13:25:58 -04:00
Sunil Mohan Adapa
5758bdba2a
upgrades: Overwrite apt sources lens with bug fixes
Fixes: #2251
Fixes: #2426

- Temporarily add a bug fix for the one-line style apt sources format. Upstream
submission: https://github.com/hercules-team/augeas/pull/865 .

- Currently, only two options with keys arch= or trusted= are allowed. However,
as documented in apt manual page[1], there are many different options possible.
Apt itself parses these options in a much more generic way[2][3].

- Fixes allow parsing all the different options allowed by apt. A practical
example (accepted by apt) is also provided as a test case.

Tests:

- Add the following line to one of the apt sources file in
/etc/apt/sources.list.d: "deb
[signed-by=/usr/share/keyrings/debian-archive-trixie-stable.gpg]
https://deb.debian.org/debian trixie main". In augtool, print
/augeas/files/etc/apt/sources.list.d//error.

- With the patch, run 'make build install' and errors in augtool disappear.

- In tor proxy app, enabling/disabling apt through tor works. The files in
/etc/apt/ are updated as expected.

Link: https://manpages.debian.org/trixie/apt/sources.list.5.en.html
Link: 3c9399e643/apt-pkg/sourcelist.cc (L215)
Link: 3c9399e643/apt-pkg/contrib/strutl.cc (L245)
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-21 08:11:50 -04:00
Sunil Mohan Adapa
a98e6f7563
upgrades: Multiple fixes for parsing Apt's Deb822 style sources
- Allow DOS style line endings

- Allow preceding, trailing, and repeating empty lines

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-21 08:11:48 -04:00
Sunil Mohan Adapa
795bd1fd9e
torproxy: When disabling apt over tor fails, report error properly
- It is not possible to disable apt over tor for as many files as possible with
the current code because even an error in a single file will result in entire
process failing. Instead, implement a way to disable the exception.

Tests:

- Add an unparsable line into the one of the apt sources files. Disabling apt
over tor works and all file but the error file are modified.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-21 08:11:44 -04:00
Jiří Podhorecký
0e78cfb8c7
Translated using Weblate (Czech)
Currently translated at 100.0% (1878 of 1878 strings)
2025-09-20 21:02:02 +02:00
Sunil Mohan Adapa
f7fff4d980
ci: functional: Provision the privileged daemon properly
- These is no need to set sudo related configuration for running actions.

- We need to enable and start freedombox-privileged daemon.

- Use 'make provision-dev' to simplify all setup.

- Update the check for 'setup finished' message.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-09-19 15:40:56 -07:00
Sunil Mohan Adapa
567e34d467
bepasty: tests: Fix functional test failure to missing / in URL
Helps: #2517.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-09-19 11:13:12 -07:00
Sunil Mohan Adapa
5a55b59939
diagnostics, help: Link to diagnostics page logs in 500 error page
Closes: #2414.

- Remove separate implementation for showing logs in help page.

- Add link to the page in diagnostics app so that FreedomBox logs can more
easily be discovered by users.

Tests:

- Raise an exception in the common error middleware to cause a 500 internal
server error. Run FreedomBox service with the --develop option and notice that
500 error page is served. There, the link to logs page works. It shows the logs
for Diagnostics app.

- Diagnostics page description is update. Link to logs page works.

- Diagnostics page shows logs for plinth.service and freedombox-develop.service.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-18 16:35:23 +03:00
Sunil Mohan Adapa
e82d959c85
views: Add a menu entry and view for showing logs of an app
Tests:

- View logs menu entry is shown only for apps with daemons. It is now shown for
others such as Backups. It does not add menu for apps such as power.

- View logs entry for Date & Time shows show logs for multiple units. View logs
entry for Nextcloud shows many units.

- The textarea occupies full width. It is not editable. It is always scrolled to
the bottom. Control-A and Control-C selects all the text in it. It is re-sizable
vertically.

- The header shows unit name and unit description correctly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-18 16:35:23 +03:00
Sunil Mohan Adapa
0661d7da7c
app: Add ability to retrieve logs from all systemd units of an app
Tests:

- Upto 200 lines are shown in the logs. The description and unit name of the app
is correct.

- Apps without systemd units don't have 'View Logs' menu item.

- Nextcloud container logs are shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-18 16:35:23 +03:00
Roman Akimov
b3d5ee30ed
Translated using Weblate (Russian)
Currently translated at 99.0% (1860 of 1878 strings)
2025-09-18 10:02:01 +00:00
Roman Akimov
ba2ec2db07
Translated using Weblate (Russian)
Currently translated at 98.7% (1854 of 1878 strings)
2025-09-17 11:02:02 +02:00
ikmaak
e6bf7fe68a
Translated using Weblate (Dutch)
Currently translated at 97.6% (1833 of 1878 strings)
2025-09-17 11:02:01 +02:00
Sunil Mohan Adapa
aee81477bd
ci: Don't include defunct extract-source job
- According to a recent change in Salsa CI[1], this job does nothing.

- There is a syntax error that causes entire pipeline file from becoming valid.

Link: 2dd7850308
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-15 15:31:45 +03:00
Sunil Mohan Adapa
46da3db69d
ci: Update container for functional tests from bookworm to trixie
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-09-12 14:53:51 -07:00
Sunil Mohan Adapa
c95ee766aa
bepasty: tests: Override backup/restore test properly
- The current name does not the match the base class method it intends to
override.

Tests:

- Run functional tests for bepasty -v option and notice that only one backup and
restore test runs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-09-12 11:24:19 -07:00
Dietmar
a2668b405b
Translated using Weblate (Italian)
Currently translated at 47.1% (886 of 1878 strings)
2025-09-11 18:02:03 +00:00
Dietmar
2355e52d21
Translated using Weblate (German)
Currently translated at 98.4% (1849 of 1878 strings)
2025-09-11 18:02:00 +00:00
Максим Горпиніч
2a62d62365
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1878 of 1878 strings)
2025-09-10 04:02:00 +00:00
大王叫我来巡山
e6b16b5ea8
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 61.5% (1156 of 1878 strings)
2025-09-10 04:01:59 +00:00
Burak Yavuz
24d35a15a3
Translated using Weblate (Turkish)
Currently translated at 100.0% (1878 of 1878 strings)
2025-09-10 04:01:58 +00:00
James Valleroy
d0d621b594
Release v25.11 to unstable v25.11 2025-09-08 20:28:34 -04:00
James Valleroy
5e9e739870
doc: Fetch latest manual 2025-09-08 20:27:36 -04:00
James Valleroy
83dcd9655e
locale: Update translation strings 2025-09-08 19:52:09 -04:00
Sunil Mohan Adapa
b7df34d175
matrixsynapse, upgrades: Install select packages from unstable
Tests:

- On stable, testing distributions applying the patches and restarting the
services causes two files to be created on the system.
/etc/apt/sources.list.d/freedombox-unstable.list and
/etc/apt/preferences.d/50freedombox-dist.pref. In unstable distributions the
files are not created.

- Installing Matrix Synapse on all three distributions works. Initial domain
configuration works. All diagnostic tests pass.

- On stable and testing distributions, running 'apt policy matrix-synapse' shows
that priority for package from unstable is 200 higher than installed package
priority of 100. Same for the package python3-pympler. Running 'apt policy
freedombox' shows that package from -backports has a priority of 500 that is
same as the priority of non-backports package.

Tests:

- During re-run of setup, unstable sources are setup.

- Matrix synapse app shows updated description.

- Upgrades app shows updated description about frequent feature updates.

- On oldstable, stable, and testing distributions unstable sources are setup.
But not on unstable.

- On stable, testing distributions applying the patches and restarting the
services causes two files to be created on the system.
/etc/apt/sources.list.d/freedombox-unstable.list and
/etc/apt/preferences.d/50freedombox-unstable.pref. In unstable distributions the
files are not created.

- Installing Matrix Synapse on all four distributions works. Initial domain
configuration works. All diagnostic tests pass.

- On oldstable, stable, and testing distributions, running 'apt policy
python3-pympler matrix-synapse python3-python-multipart' shows that priority for
package from unstable is 200 higher than installed package priority of 100.
Running 'apt policy freedombox' shows that package from -backports has a
priority of 500 that is same as the priority of non-backports package.

- When frequent feature updates is not enabled, the app can't be installed.
"This application is currently not available in your distribution." message is
shown. After enabling frequent feature updates, the apps can be installed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-08 19:33:56 -04:00
Sunil Mohan Adapa
d8c727a109
package: Don't consider uninstalled packages as available
- Ensure that packages that are not installable to negative priority are not
shown as available.

Tests:

- Set priority of an available package to less than 0. This package will be
shown as not-available in the app install page.

- Normal apps are shown as available and can be installed as usual.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-08 19:33:52 -04:00
Sunil Mohan Adapa
866daf27ef
package: Refresh apt cache if sources list is newer
- When backports repository or unstable repository freshly added by the updates
app. We will like apps to become available due to newly available Debian
packages. For this to happen 'apt update' must be called before checking if an
app is available.

Tests:

- Freshly apply the patches for upgrades app. Setup is re-run and unstable
sources file is introduced. Immediately visit the Matrix app and notice that is
shown as available and can be installed immediately.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-08 19:33:48 -04:00
Sunil Mohan Adapa
fecd6a3577
upgrades: Overhaul detection of distribution
- Move some utilities to utils.py from distupgrade.py and __init__.py.

- This fixes issues with apt preferences being set on unstable
distribution (despite code that tries to prevent it).

- There is no way to distinguish between 'testing' and 'unstable' distributions
in Debian using commands like lsb_release (powered by /etc/os-release). See:
https://lwn.net/Articles/984635/ . So, use the value set in
/etc/apt/sources.list.

Tests: (tested entire patchset)

- Deluge can be installed in trixie.

- Auto-distribution upgrade button is checked during setup on stable and
oldstable but not on testing and unstable.

- Auto-distribution upgrade button is enabled in the form on stable and
oldstable but not on testing and unstable.

- Backports wizard step is skipped on unstable (non-develop mode), but not on
oldstable, stable, testing, and unstable (develop mode).

- If backports are not activated during first wizard, then backports can be
activated on upgrades app page if distribution is oldstable, stable, testing, or
unstable (non-develop mode) but not unstable (develop mode).

- During re-run of setup, setting up backport sources is skipped if already
setup.

- Backports sources files are not added in testing (non-develop) and
unstable (non-develop) distributions. Backports sources are added to oldstable,
stable, testing (develop) and unstable (develop). Unstable sources sources are
not added to unstable but added to oldstable, stable, and testing.

- Backports sources file is added with correct code name bookworm/trixie for
oldstable, stable, and testing distributions.

- When backports sources is set to 'bookworm-backports' on Trixie distribution,
re-running setup updates them to 'trixie-backports'.

- Preferences files are added in oldstable, stable, and testing distributions
but not unstable.

- If unstable and another distro is present in apt sources, then it is treated
as unstable as shown in the distribution upgrade page.

- Current codename is shown properly from sources.list in oldstable, stable,
testing, and unstable in distribution upgrade page.

- NOT TESTED: If distribution upgrade is interrupted, then continue page is
shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-09-08 19:33:33 -04:00
Sunil Mohan Adapa
4a0e35f806
dynamicdns: Handle showing errors from GnuDIP
- Recently we have changed to using HTTP protocol for GnuDIP updates. These
involve using requests library. For exceptions raised by this library the
arguments may not all be JSON serializable. So, explicitly convert them into
strings.

Tests:

- Turn of network connection to the machine. Trigger a Dynamic DNS update by
re-submitting configuration form. This will results in an error message shown
in status table instead of an unhandled exception.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 22:00:04 +05:30
Sunil Mohan Adapa
f94d8c661d
privileged_daemon: Log only to journal and not console
- This prevents double logging for all log statements in privileged daemon.

- Also drop conditional checking for systemd.journal python module. We hard
depend on python3-systemd package which has it.

Tests:

- All logs messages from privileged daemon log only once to the journal.

- For main service, the log message happens on console only when running on the
command line. When the systemd service is started, it is only logged to the
journal.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:24:34 +05:30
Sunil Mohan Adapa
0c6f04b55f
actions, backups: Fix tests depending on sudo based actions
Tests:

- Mounting/unmounting of remote SSH repositories works.

- Creating repo, creating/deleting/list archives work.

- If a privileged method raises an exception after outputting to stdout (using
action_utils.run) then stdout is shown in the HTML UI message.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:24:10 +05:30
Sunil Mohan Adapa
944c427f44
actions: Framework for capturing stdout/stderr in privileged daemon
Tests:

- If there is a syntax error in communication with privileged server. 'stdout'
and 'stderr' keys are present in 'exception' dictionary of the reply.

- If there is a error in the privileged method in communication with privileged
server. 'stdout' and 'stderr' keys are present in 'exception' dictionary of the
reply. The values are filled with output of the command that have been run.

- If a privileged method uses action_utils.run, then raising an exception in the
method shows proper stdout and stderr in the UI HTML message.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:23:55 +05:30
Sunil Mohan Adapa
7b2acf247e
actions: Drop sudo based privileged actions
Tests:

- /usr/share/plinth/actions/actions is not installed.

- Code check works on plinth directory and container script only

- Provisioning a container does not add sudo configuration for actions. 'fbx'
user can perform 'sudo' operations.

- Make install does not install actions based sudo configuration. Admin users
can perform sudo operations.

- Exporting backup archive works. Validating a transmission directory works.
Some of the privileged operations works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:23:45 +05:30
Sunil Mohan Adapa
a580437de2
privileged_daemon: Introduce a command line client for the API
- Similar call signature as actions/actions.

Tests:

- Running make install places a binary file in /usr/bin/freedombox-cmd

- Running 'freedombox-cmd upgrades get_log --no-args' works.

- Running 'freedombox-cmd upgrades activate_backports --no-args' works.

- Running 'freedombox-cmd storage usage_info --no-args' works.

- Running 'freedombox-cmd sshfs is_mounted --no-args' works.

- echo '{"args": ["USERNAME", "AUTH_USER", "AUTH_PASSWORD"], "kwargs": {}}' |
sudo freedombox-cmd users remove_user.

- Distribution upgrade from Bookworm to Trixie works.

  - Snapshots are disabled and re-enabled during upgrade.

  - /etc/apt/sources.list changes are completed on completion.

- If a command fails, the return code is not 0.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:23:36 +05:30
Sunil Mohan Adapa
143e4a00bd
actions, backup: Implement raw output for privileged daemon
- Regression: downloading does not work with sudo based action anymore. However,
sudo based actions are to be removed in later patches.

Tests:

- Downloading tar backup archive works. Untar works. Downloading gives upto
10MiB/s speed.

- If API is not called with _raw_output=True, then special exception is raised.

- Downloading tar file from command line using nc also works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:23:25 +05:30
Sunil Mohan Adapa
0aa3ee5a70
actions: Simplify raw output code in privileged methods
Tests:

- Downloading tar backup archive works. Untar works. Downloading gives upto
10MiB/s speed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:23:16 +05:30
Sunil Mohan Adapa
5ef639d23b
actions: Drop feature to run privileged action as another user
- Used after migration gitweb and storage calls to using
action_utils.run_as_user.

Tests:

- Gitweb operations and directory validations works when privileged daemon is
running or not running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:23:04 +05:30
Sunil Mohan Adapa
773460dde9
storage: 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:

- In transmission, setting the download directory is valid if

  - A parent level directory is writable by transmission daemon and child does
  not exist.

  - A leaf level directory is writable by transmission daemon when leaf exists.

  - A leaf level exists and is not a directory.

- In MiniDLNA, setting the directory works only if it exists and is readable.
Work when write permission is not available.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-09-05 20:22:54 +05:30
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