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
..
2023-05-07 13:11:34 -04:00

.. SPDX-License-Identifier: CC-BY-SA-4.0

Editing the Developer Documentation
===================================

About
*****

The doc/dev directory in FreedomBox repository contains the FreedomBox Developer
Manual. Specifically the tutorial for writing new applications and API reference
for writing apps for FreedomBox. It is kept as part of the main FreedomBox
source code with the expectation that when the API changes the developer
documentation is also updated in the same patch set.

Setup on Debian
***************

Install the following Debian packages:

* python3-sphinx
* python3-sphinx-autobuild

If your preferred text editor doesn't have support for the reStructuredText
format, you can install a simple desktop application called ReText. It has live
preview support with split panes.

Viewing changes live in your browser
************************************

You do not need the virtual machine used for FreedomBox development running to
edit this documentation.

Run `make livehtml` from the current directory in the host machine. Visit
http://127.0.0.1:8000 to view the changes live in your browser as you edit the
.rst files in this directory. Your browser reloads the page automatically each
time you save an .rst file in the documentation.