8348 Commits

Author SHA1 Message Date
Vayaluru koushik
5e216e7162
Translated using Weblate (Telugu)
Currently translated at 92.7% (1414 of 1525 strings)
2023-10-18 08:55:48 +02:00
Ajay
9bd9a678c0
Translated using Weblate (Arabic)
Currently translated at 0.9% (14 of 1525 strings)
2023-10-18 08:55:38 +02:00
Harshitha Chandra
432174938b
Translated using Weblate (Telugu)
Currently translated at 92.7% (1415 of 1525 strings)
2023-10-18 08:55:38 +02:00
KOMALA gunji
ceaadfd0e1
Translated using Weblate (Telugu)
Currently translated at 92.7% (1415 of 1525 strings)
2023-10-18 08:55:38 +02:00
L.sandeep Kumar Reddy
9f4e602c4c
Translated using Weblate (Telugu)
Currently translated at 92.7% (1415 of 1525 strings)
2023-10-18 08:55:38 +02:00
Nellore Mohan
92e1869e73
Translated using Weblate (Telugu)
Currently translated at 92.7% (1415 of 1525 strings)
2023-10-18 08:54:18 +02:00
Ajay
23067d428a
Translated using Weblate (Telugu)
Currently translated at 92.8% (1416 of 1525 strings)
2023-10-18 08:53:48 +02:00
Sunil Mohan Adapa
83536650d7
Translated using Weblate (Telugu)
Currently translated at 92.7% (1415 of 1525 strings)
2023-10-18 04:29:26 +02:00
Sunil Mohan Adapa
1681f8e86c
Translated using Weblate (Telugu)
Currently translated at 92.3% (1408 of 1525 strings)
2023-10-18 02:05:38 +02:00
Sunil Mohan Adapa
cfdf92cf0d
kiwix: Fix various issues after review
- Fix icon paths in copyright file.

- Minor refactoring.

- Add Kiwix library link to app page as well as users may want to see the
  content available before installing the app.

- Consolidate terminology to 'content package' for UI and just 'package'
internally.

- Drop unused SYSTEM_USER constant.

- Simplify the ExecStart= in systemd service file.

- Fix incorrect i18n caused by non-lazy formatting of strings.

- Confirm that xml parsing is not vulnerable as expat library of required
version is used in Debian bookworm.

- Don't start the kiwix daemon when managing library if app is disabled.

- Ignore errors when removing files during uninstallation.

- Handle failures more gracefully when library XML file does not have required
attributes.

- Update SVG/PNG icons to adhere to FreedomBox guidelines.

- Trim block translations in templates.

- Drop comments/deadcode inside translation strings.

- Drop a comment inside add content page that only makes sense with multiple
methods for adding content.

- tests: Don't use pkg_resources library as it is deprecated. We can use
importlib.resources library in future if we run tests on zip installations.

- Fix potential security issues while writing file to tmp directory.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-17 13:40:31 -07:00
Joseph Nuthalapati
34976ac4b0
kiwix: Add app for Kiwix offline Wikipedia reader
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-17 13:40:22 -07:00
Nikitha1960
16993e0b34
Translated using Weblate (Telugu)
Currently translated at 92.2% (1407 of 1525 strings)
2023-10-13 14:01:48 +00:00
Sanjanaa2703
92a2c081e5
Translated using Weblate (Telugu)
Currently translated at 91.5% (1396 of 1525 strings)
2023-10-12 15:26:18 +02:00
Sanjanaa2703
f2acc63b92
Translated using Weblate (Telugu)
Currently translated at 91.4% (1395 of 1525 strings)
2023-10-12 15:25:42 +02:00
Sanjanaa2703
6ab89687a7
Translated using Weblate (Telugu)
Currently translated at 91.4% (1394 of 1525 strings)
2023-10-12 15:25:18 +02:00
Nikitha1960
ab4386a1a9
Translated using Weblate (Telugu)
Currently translated at 91.4% (1394 of 1525 strings)
2023-10-12 15:25:18 +02:00
Sanjanaa2703
05e02c1e1b
Translated using Weblate (Telugu)
Currently translated at 90.6% (1382 of 1525 strings)
2023-10-12 15:19:18 +02:00
Nikitha1960
19cfc442f7
Translated using Weblate (Telugu)
Currently translated at 90.6% (1382 of 1525 strings)
2023-10-12 15:19:18 +02:00
bittin1ddc447d824349b2
9fc04b1b72
Translated using Weblate (Swedish)
Currently translated at 100.0% (1525 of 1525 strings)
2023-10-10 08:00:42 +00:00
Sripath Roy Koganti
6da5d808dd
Translated using Weblate (Telugu)
Currently translated at 88.7% (1354 of 1525 strings)
2023-10-10 08:00:41 +00:00
Sunil Mohan Adapa
36d9f2611f
matrix-synapse: Update warning on how to change domain name
- It does not look like matrix-synapse will ever support changing domain name.

- Our only recourse is to uninstall and install the app. Mention this solution
to users and its consequences upfront.

Tests:

- Test that message got updated during setup after installation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-07 05:54:30 +09:00
Sunil Mohan Adapa
dbd59c0ef5
upgrades: Allow matrix-synapse to be installed from bookworm
- Update the outdated apt preferences file that still refers to
bullseye-backports instead of bookworm-backports.

- Perform matching using n= instead of a= for matching distribution codename.

- Drop preferences for libraries that were only required in bullseye-backports
and not in bookworm-backports.

Tests:

- Install matrix-synapse app in testing container and stable container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-07 05:54:27 +09:00
Sunil Mohan Adapa
a0032856fd
diagnostics: Refactor background diagnostics task
- When running full diagnostics manually, we can use the Operation class. This
allows us to use many of its features.

  - Ensure only one task is running at any time. No need to use running_task
  global variable and a lock for it.

  - Don't run the operation if app install/uninstall or other potentially
  contentious tasks are running.

  - Since Operation object creates a thread, don't create another one with
  glib.schedule(). Don't wait unnecessarily for the operation to finish in the
  glib thread (or glib created thread).

- Since the app will show progress of operations when an operation is running,
it would not be possible to show progress of diagnostics running. So, create a
separate page for diagnostics results.

Tests:

- Run diagnostics and see redirection happens to diagnostics results page.
Results page shows ongoing tests. It refreshes automatically. When tests are
completed, 'Re-run diagnostics' button is shown.

- When visiting /diagnostics/full/ URL is visited without running the test. Only
the re-run button is shown. No results are shown. If tests have been run, re-run
button along with results are shown.

- On the app page, if the tests have been run, a button for viewing results is
shown. Otherwise, the button is not shown.

- In development mode, background diagnostics are run after 3 minutes (change
the time to 150 seconds if database locked errors show up). Results are
available in the results page.

- Make a diagnostic test fail by changing code or disabling a daemon. Run
diagnostics and notice that a notification is shown with the button to go to the
results. Clicking on the button shows the results page. Clicking dismiss removes
the notification.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-07 04:52:28 +09:00
Sunil Mohan Adapa
465e452daf
diagnostics: Refactor check IDs, tests and background checks
- Ensure that each diagnostic test category can be identified by easy prefix
matching on the test ID.

- Give a different unique IDs each different kind of test. More specific tests
of a type get a different kind of ID.

- Make comparison of diagnostic test results in test cases more comprehensive.

- Simplify code that shows the number if issues identified.

- In many languages, there is complex logic to write plural forms. Plurals
can't be handled by assuming singular = 1 item and plural is > 1. Translation of
messages in Notification does not support plurals properly. Avoid this for now
by using sometimes incorrect plural form.

- For i18n we should avoid joining phrases/words. Words don't always maintain
order after translation.

- Notify about the total number of issues in diagnostics and not just the most
severe category. This is likely to draw more attention and avoid i18n
complexity.

- Dismiss the diagnostic notification if the latest run succeeded completely.

Tests:

- Unit tests pass.

- Diagnostics for following apps works: networks (drop-in config),
apache (daemon, listen address, internal firewall, external firewall),
tor (netcat), torproxy (internal only firewall, torproxy url, torproxy using
tor), privoxy (privoxy url, package available, package latest),

- Untested: Is release file available method in upgrades app.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-07 04:52:22 +09:00
Sunil Mohan Adapa
a233bbfd9b
operation: Add unique ID for each operation
- Helps in retrieving an operation that is currently running.

- Prevent starting an operation that is already running.

Tests:

- Unit tests work.

- Installing, uninstalling an app works.

- For upgrading an app works.

- Running background diagnostics works.

- Updating tor configuration works.

- Updating torproxy configuration works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-07 04:52:17 +09:00
James Valleroy
79f36e6a0c
diagnostics: Add DiagnosticCheck dataclass
- Set unique check_id for each diagnostic check.

- Result is a string-based enumeration. The default value (NOT_DONE) can be
  used for diagnostic checks that have not been completed yet.

- Result is StrEnum so that the return value of check_url can still be used
  directly as a diagnostic result.

Closes: #2375

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-07 04:52:13 +09:00
James Valleroy
d9491d5762
diagnostics: Run daily check and notify on failures
- One notification is shown with a count of the highest severity issues.

- Un-dismiss the notification, so it is shown even if previously dismissed.

- Add link to see the results, which are stored in a global variable.

- Add a lock for running_task.

Tests:

- Notification with 2 warnings shown on stable container due, to packages not
  upgraded.

- Change the firewalld default zone to public. After the next run, the
  notification changes to an error, and shows 1 failure.

Helps #2366.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-07 04:52:08 +09:00
Benedek Nagy
8bafabe2f9
backup: Fix bug in adding existing unencryped backup location
borg throws and warning "Warning: Attempting to access a previously unknown
unencryped repository!\nDo you want to continue?" and then fails while asking
for a manual confirmation. Avoid this by telling borg not to prompt (and confirm
yes).

This commit provides a fix for the issue described here:

https://discuss.freedombox.org/t/how-do-i-restore-freedombox/2022/10

[sunil: Drop the part about handling the error message]
Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-04 10:41:22 -07:00
Sunil Mohan Adapa
9cfd8a2e55
email: Fix issue with install caused by missing drop-in config file
During installation of email app, sievec is run on
/etc/dovecot/freedombox-sieve-after/sort-spam.sieve file to produce a binary
version of the file. However, this file is not available until after the app is
enabled. This is due to the newly introduced drop-in configuration mechanism. To
fix this, during setup, enable the drop-in configuration component responsible
for this file. The component is newly split from the component that deals with
all drop-in components so that not all the drop-in configuration files are
symlinked.

There is no change needed to the app when the drop-in configuration component is
split into multiple components. This is true for all three state of the app;
not-installed, installed-enabled, and installed-disabled.

Tests:

- Install latest code with ./setup.py install. Install the app and it works.

- Uninstall the app and reinstall. It works. There are no warnings that config
file have been replaced with symlinks.

- /etc/dovecot/freedombox-sieve-after has the sort-span.svbin binary sievec
compiled file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-02 14:06:02 +09:00
Jiří Podhorecký
577358b7dd
Translated using Weblate (Czech)
Currently translated at 100.0% (1525 of 1525 strings)
2023-10-01 16:00:05 +02:00
Ihor Hordiichuk
70acc1aa19
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1525 of 1525 strings)
2023-09-29 14:01:01 +02:00
Dietmar
f1c1bad203
Translated using Weblate (German)
Currently translated at 99.6% (1520 of 1525 strings)
2023-09-29 14:01:00 +02:00
Burak Yavuz
20f3cc900d
Translated using Weblate (Turkish)
Currently translated at 100.0% (1525 of 1525 strings)
2023-09-27 10:59:24 +00:00
ikmaak
755ac4df76
Translated using Weblate (Dutch)
Currently translated at 100.0% (1525 of 1525 strings)
2023-09-27 10:59:24 +00:00
gallegonovato
61c3a4438a
Translated using Weblate (Spanish)
Currently translated at 100.0% (1525 of 1525 strings)
2023-09-27 10:59:23 +00:00
James Valleroy
db5444558f
Release v23.18 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v23.18
2023-09-25 20:47:40 -04:00
James Valleroy
c73e24708d
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:46:55 -04:00
James Valleroy
c1e5b3bfd3
locale: Update translations strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:16:49 -04:00
Sunil Mohan Adapa
eba41aa295
pyproject: Add configuration for mypy to ignore some libraries
- This way, we know what we are overriding and can use type annotations for
libraries where they are available.

- Invocation of mypy tool on command line becomes straight forward.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:42 -04:00
Sunil Mohan Adapa
bb7782a464
*: Add some additional type annotations
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:38 -04:00
Sunil Mohan Adapa
38ece87c6c
*: Utilize newer 3.10 syntax for type hints
Tests:

- mypy does not show any errors.

- Installing ejabberd app works. Privileged actions run fine.

- Unit tests work.

- No additional testing was done as type annotations don't have any effect at
runtime.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:34 -04:00
Sunil Mohan Adapa
a86a86d605
gitlab-ci: Make passing mypy checks mandatory
- There are no more checks that are failing.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:31 -04:00
Sunil Mohan Adapa
2dd00a8f08
*: Fix all typing hint related errors
- Try to mark class variables in component classes.

- Leave typing hints generic, such as 'list' and 'dict' where content is usually
not filled, too complex, or context is unimportant.

- backups: Handle failure for tarfile extraction so that methods are not called
on potentially None valued variables.

- backups: Prevent potentially passing a keyword argument twice.

- dynamicdns: Deal properly with outcome of urlparsing.

- ejabberd: Deal with failed regex match

- email: Fix a mypy compliant when iterating a filtered list.

- tor: Don't reuse variables for different typed values.

- tor: Don't reuse variables for different typed values.

- operation: Return None explicitly.

- operation: Ensure that keyword argument is not repeated.

Tests:

- Where only typing hints were modified and no syntax error came up, additional
testing was not done.

- `mypy --ignore-missing-imports .` run successfully.

- Generate developer documentation.

- Service runs without errors upon start up.

- backups: Listing and restoring specific apps from a backup works.

- backups: Mounting a remote backup repository works.

- NOT TESTED: dynamicdns: Migrating from old style configuration works.

- ejabberd: Verify that setting coturn configuration works.

- email: Test that showing configuration from postfix works.

- tor: Orport value is properly shown.

- transmission: Configuration values are properly set.

- users: Running unit tests as root works.

- operation: Operation status messages are show properly during app install.

- ./setup.py install runs

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:24 -04:00
Sunil Mohan Adapa
a709f3a6a8
gitlab-ci: Perform backports tests on bookworm instead of bullseye
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:21 -04:00
Sunil Mohan Adapa
ac84258f05
upgrades: Fix detecting apt over tor during upgrade
- This was missed during the split of tor/torproxy apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:16 -04:00
Sunil Mohan Adapa
995749a975
wordpress: Use absolute path in service file
This is the recommended approach. On Debian, php is usually resolved to
/usr/bin/php.

Tests:

- Tests with absolute path in service file were performed as part of testing
done in https://salsa.debian.org/freedombox-team/freedombox/-/issues/2373 . No
separate testing was done.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 17:41:11 -04:00
rsquared
a6165c997a
ikiwiki: Disable discussion pages by default for new wiki/blog
Closes: #2102.

- Wiki: Unchanged behavior is to have discussion pages enabled. To post users
must login.

- Blog: Earlier behavior is to allow anonymous users to post comments. They go
into the moderation queue when posted. This could lead to a lot of spam comments
to moderate. New behavior is to allow posting comments only when logged in.

- Blog: discussion => 0 does not effect comments. It is meant for discussion
page on the blog's home page (and possibly other pages). Discussion on those
pages is disabled by default.

- The changes only apply to defaults. Everything can be changed from Setup page.

Testing:

- Test the above described behavior in Debian testing.

- Debian stable testing was not done as the version of ikiwiki is that same as
testing.

[sunil: Drop removal of discussion from wiki pages]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-09-25 12:58:04 -07:00
James Valleroy
4b90e7618f
middleware: tests: Add tests for common error middleware
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-09-22 11:20:08 -07:00
Brian Ó Donnell
557a3b2588
middleware: Add new middleware to handle common errors like DB busy
- During database error such as 'database is locked', show a special message
asking users to try again instead of submitting a bug report.

[sunil: Minor formatting, rename the template file name]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix missing import]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-09-22 11:19:47 -07:00
109247019824
81cbd307f5
Translated using Weblate (Bulgarian)
Currently translated at 46.1% (703 of 1523 strings)
2023-09-18 19:00:45 +00:00