Fixes: #2151.
Tests:
- Before this patch, --list-dependencies does not list zram-tools. After this
patch, --list-dependencies lists zram-tools.
- After this patch, --list-dependencies exactly matches the output from
freedombox release without Packages component changes.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This situation happens when building the package with cowbuilder.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
debian/rules uses --list-dependencies to collect the dependencies of
all essential modules. Ensure that the list is not empty.
Helps #2149.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Avoid any potential problems with sqlite3 not being present.
- Avoid any potential problems with secret key not being available. Avoid
accidentally creating the secret key hardware/container images.
Tests:
- --list-dependencies works with and without secret key and plinth sqlite3.
- --list-dependencies works with plinth and root users.
- --list-dependencies does not create the sqlite3 database or the secret key.
- Running app works in normal mode and creates the secret key.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This allows app initialization to happen without Django being configured.
Tests:
- Update unit tests.
- Visit /app, /system and /help pages. All the icons are listed properly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This allows the entire app construction process not to require Django.
Tests:
- An app with url is None (ejabberd) and one without (transmission) show their
on the frontpage. Both shortcuts work as expected.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When a public repo is added, upon startup, the front page shortcut is shown.
- When all public repos are removed, upon startup, the front page shortcut is
not shown.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When enabled, when domain name or hostname changes, ejabberd actions are
triggered.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When onion services are enabled, upon startup, names module shows the onion
domain.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When configured, upon startup, pagekite domains shows up in the names module.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When domain name is changed in config module. The updated names shows up in
the names module.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- On startup, LE tries to obtain certs during post app initialization.
- When domain is added, LE tried to obtain certificates.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- After startup, the configured domain name shows up in names module.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This keeps the LE module working better when the domain name is changed after
startup.
Tests:
- Untested. The module is not enabled yet. LE functionality in email server is
not fully functional.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When configured, after startup, Dynamic DNS domain shows up in names module.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When a print message is added in low disk space checking method, it is printed
every 3 minutes.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When a domain is added it is added to the configuration file.
- When a domain is removed it is removed from the configuration file.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- After startup, names module shows a .local domain if app is enabled.
- If app is disabled, .local domain is not shown.
- When hostname is changed, .local domain name in names modules changes.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Loading module is only for importing python modules and determining the order
in which they should be loaded.
- Initializing apps will create the instances which involves just creating the
components of the apps.
- Post initialization involves connecting to signals, running configuration
fixes, etc.
Tests:
- All apps that have post initialization step have been tested.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
During __init__, only component building must be done. All other operations go
in to post_init(). This allows for cleaner initialization from various
scenarios which simply have to query the app instead of fully initializing it.
Tests:
- None.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- When a timer is provided to 'systemctl show' not all expected keys are
provided in the result. This leads to a KeyError exception.
- Also the security analysis for a timer unit is not useful. Instead perform the
analysis on the corresponding .service unit.
Closes: #2145
Tests:
- Before the patch, Wordpress shows as not sandboxed. The security report page
crashes on Debian testing setup.
- After the patch, there is no crash. Wordpress shows as sandboxed with 86%
coverage.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Include the new component reference in the components index]
[sunil: Minor changes to component doc string]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: isort all files]
[sunil: Remove component in datetime component as managed_packages is empty]
[sunil: Minor refactor in minidlna for consistency]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Time to delay after app is enabled, before checking
diagnosics. Default value is 0 (no delay).
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>