Commit Graph
364 Commits
Author SHA1 Message Date
James Valleroy 441eee7e1f doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-11-06 21:02:47 -05:00
James Valleroy 2a8b9b94ba app: Update diagnose() docstring
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Add reference documentation for the DiagnosticCheck and Result classes]
[sunil: Add link to DiagnosticCheck class from docstring]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-10-30 22:09:00 -07:00
James Valleroy dabd09a364 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-10-23 20:35:23 -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
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 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
James Valleroy a2c5e315d8 doc: Fetch latest manual 2023-09-11 20:46:40 -04:00
James Valleroy bc90be15f3 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-28 20:46:06 -04:00
James Valleroy 63bba4cb8f doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-08-14 21:08:00 -04:00
James Valleroy 13f0896853 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-07-31 20:38:07 -04:00
James Valleroy 4232bc1ec2 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-07-17 22:01:05 -04:00
James Valleroy 6201d91b44 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-19 20:44:24 -04:00
James Valleroy 855fe8fc20 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 22:06:21 -04:00
Sunil Mohan Adapa 598e1e3b4a config: Add new component for managing drop-in /etc/ config files
- Use two separate strategies: one to symlink from /etc to files in /usr/ and
two to copy files from /usr to /etc. The latter is needed for some rare cases
where symlinks don't work because the daemon runs in a chrooted environment.

- Update tutorial and reference sections in developer documentation.

Tests:

- Unit tests works and are comprehensive.

- Using the component in apps works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:27:23 -04:00
Sunil Mohan Adapa 5d83469c27 doc/dev: Set language code explicitly in Sphinx configuration
- To avoid the following error when running Sphinx v5.3.0: "WARNING: Invalid
configuration value found: 'language = None'. Update your configuration to a
valid language code. Falling back to 'en' (English)."

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-13 07:09:20 -04:00
Sunil Mohan Adapa 40eecb6446 *: Move modules-enabled files to /usr/share
- This will leave /etc/{plinth,freedombox} empty by default making service more
robust to run across various environments and situations. See systemd's
explanation for more details.

- Use Debian maintainer scripts remove all the existing files in
/etc/plinth/modules-enabled.

- Read from /usr/share/freedombox/modules-enabled then from
/etc/plinth/modules-enabled and finally from /etc/freedombox/modules-enabled.
Later read ones override previously read files. Any file pointing to /dev/null
will mean the module must be ignored.

Tests:

- Clean up /etc/plinth, /etc/freedombox and
/usr/share/freedombox/modules-enabled. Run service and notice that files are
getting loaded from development folder using a debug message.

- Run setup.py and notice that files get installed in
/usr/share/freedombox/modules-enabled/ and in the next run they get loaded from
there.

- Create a override file in /etc/plinth/modules-enabled/transmission and notice
that overriden file gets priority over the one in
/usr/share/freedombox/modules-enabled.

- Link the file /etc/plinth/modules-enabled/transmission to /dev/null and notice
that is not loaded.

- Create another file in /etc/freedombox/modules-enabled/transmission and notice
that it overrides the previous two files.

- All affected modules are loaded.

- Build a new Debian package and ensure that upgrading 23.8 to new version
removes are all configuration files.

- Build developer documentation and test that Tutorial -> Full Code and Tutorial
-> Skeleton sections have been updated with references to
-.../modules-enabled/... paths.

- Install quassel and notice that certificates were copied to /var/lib/quassel
directory. Change domain to another domain and notice that certificates were
copied again to that directory.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-13 07:08:43 -04:00
James Valleroy eb7bacd663 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-08 21:12:06 -04:00
Sunil Mohan Adapa b47417479d doc/dev: Update copyright year
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-07 13:11:34 -04:00
Sunil Mohan Adapa ac3754fa2f theme: Move icons to app folders
- This improves modularity. Each app brings its own icons in its directory
instead of a centralized directory.

Tests:

- Install an app and notice that the installation notification has the icon.

- Visit an app's page in Apps and System (cockpit) section and ensure that the
app's icon is being shown.

- Visit the Apps and System section and notice that apps' icons are being shown.

- Visit the home page and notice that shortcuts' icons are being shown.

- Visit the URL /plinth/api/0/shortcuts and notice that the URLs for icons are
accessible and lead to proper icon files.

- Build developer documentation and notice that Tutorial -> View and Reference >
Menu pages show the expected updates.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-07 13:11:27 -04:00
James Valleroy 1d1a76110d doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-24 21:46:26 -04:00
James Valleroy d438db4460 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 20:50:15 -04:00
James Valleroy 0df5b2d6e0 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-13 21:52:25 -04:00
James Valleroy bc1e44f9af doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-02-27 20:33:11 -05:00
James Valleroy 766e7aa7b5 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-02-13 21:05:44 -05:00
James Valleroy 0aee0bec64 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-01-30 20:36:16 -05:00
James Valleroy 0f828207ea doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-01-16 20:32:16 -05:00
James Valleroy acef5d2dff doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2023-01-03 11:54:44 -05:00
James Valleroy e086e3fa7b doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-19 20:58:57 -05:00
James Valleroy daf8238106 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-05 21:37:00 -05:00
Sunil Mohan Adapa 4bf347dbe3 firewall: Introduce component for local service protection
- Automatically handle a setup of the component getting added to an existing
app.

Tests:

- Run unit tests

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-12-05 20:46:49 -05:00
James Valleroy 231b0a8896 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-11-21 20:31:53 -05:00
James Valleroy 25a2cc0cda doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-11-07 20:57:23 -05:00
James Valleroy c538871057 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-24 20:37:31 -04:00
James Valleroy 4730e85585 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-16 11:41:54 -04:00
James Valleroy 23d807fe25 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-10 21:56:32 -04:00
Sunil Mohan Adapa 5c5fc9eb61 actions: Drop unused superuser_run and related methods
Tests:

- All tests in patch series have been done with this patch applied
- Unit tests pass

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:54:03 -04:00
Sunil Mohan Adapa 74678c1d69 doc: dev: Minor example code refactor
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:50:31 -04:00
James Valleroy 02239e6747 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-26 20:45:55 -04:00
James Valleroy ba0a0cb8a9 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-09-12 21:07:02 -04:00
James Valleroy a4d0cfb646 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-29 22:33:34 -04:00
James Valleroy 29f7d8d209 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 20:53:57 -04:00
Sunil Mohan Adapa ce709ca8ce doc: dev: Document previously undocumented components
Tests:

- Build HTML and ensure build succeeds that the changes are reflected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 18:55:02 -04:00
Sunil Mohan Adapa 75f6abac1e *: Make setup method part of App class for all apps
- Primary purpose is to complete the App API and allow for multiple apps to be
present in a module without a single clashing setup() method. Secondary
objective is to get rid of SetupHelper instance simple use App instance instead.

- This brings us closer to not needing to implement setup() method for some of
the typical apps.

- Remove default value None for old_version parameter.

  - A valid integer value is always passed to this call.

  - The value of None is undefined.

  - Simplifies the App API slightly.

- Drop setting 'pre', 'post' values to indicate the stage of setup for the App.

  - Simplifies the setup methods significantly. Eliminates a class of
  bugs (some of them seen earlier).

  - The UI can show a simple 'installing...' or progress spinner instead of
  individual stages.

  - There are currently many inconsistencies where many operations are not
  wrapped in helper.call() calls.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-15 10:36:16 -04:00
James Valleroy 2ba85dff33 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-01 21:00:06 -04:00
James Valleroy 62ba17c8a5 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-18 20:49:26 -04:00
James Valleroy 70f9af7341 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-04 21:42:33 -04:00
James Valleroy 9603521813 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-27 08:45:12 -04:00
James Valleroy fc0ce69ddb doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 20:51:27 -04:00
Sunil Mohan Adapa a68776d04b doc: dev: Use and recommend new privileged actions
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-20 18:17:07 -04:00
James Valleroy f092da6b04 doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2022-06-06 21:58:53 -04:00