While capturing stdout and stderr and automatically logging that to system
logging daemon provides basic information, a lot of information lost in the
process.
This change logs to systemd journal directly so that rich information such as
code file, code function, code line, etc, can be captured in a structured way.
To avoid double logging, discard stdout and stderr in the systemd unit file.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Load scripts in the head with `defer` instead of at the end of the body
- Disable turbolinks for application shortcuts and manual download
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- A freshly installed FreedomBox can be hijacked by a third party and an admin
account can be created which can be used to inject malware or simply take over
the instance. Password protecting the firstboot step is a good way to avoid
this. A secret will be displayed to the user as soon as the Plinth package
is installed, which they have to enter during firstboot welcome step. Also,
writing this to a file in plinth's home in case the user loses it.
- This protection is not applicable for images built by freedom-maker and for
Amazon Machine Images.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Rely on dh_installsystemd instead of systemd-sequence.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This is the final change required for Django 2.0 support. Instead of using
MIDDLEWARE_CLASSES use MIDDLEWARE setting. Support for new style middleware was
provided in version 0.3.0, so depend on that version. Django built-in middleware
already supports new style and plinth middleware will now support new style.
The actual semantics of the middleware don't need changes. See:
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
/etc/matrix-synapse/homeserver.yaml file has several complex cases of inline
comments which are introducing bugs when parsed with ruamel.yaml
Eliminated the problem by discarding comments altogether since the YAML data is
only read by Plinth and not by a human.
Closes#1214
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- To Build-Depends list as tests depend on it.
- To Depends list as storage action needs it.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
The yaml package is not used in Plinth anywhere.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>