- Merge backports functionality into upgrades module.
- No need to enable systemd timer as dh_installsystemd automatically enables
this during package installation and upgrade.
- Use https:// and deb.debian.org for repository checking. When using Tor for
package installations request the URL via Tor.
- Make daily checking service more generic for all kind of future apt repository
updates.
- Force removal of repository file during purge to avoid failures.
- Don't add contrib/non-free as backports is intended to be enabled for just the
freedombox package and it is free. When the need arises, we can introduce
contrib/non-free. This also eliminates an issue that adding these components
doesn't work without the usage of tor.
- Allow generate apt preferences file to avoid lintian complaining about its
presence. Remove on purge.
- Add unattended upgrades origin pattern to allow it to upgrade from backports
repositories.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Shadowsocks server will fail to start if the domain cannot be
resolved.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Downloaded archives can't be fully extracted as tar.gz is incomplete at the
end and corrupt. This is due to complete gzip streaming implementation that is
does not flush the final bytes of gzip stream. Remove custom implementation
and get gzipped stream directly from borg.
- Fix mimetype for .tar.gz to application/gzip.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Don't set bufsize to 1 while streaming backup download. This is only effective
with text streams with universal_newline flag set. An actual buffer size of 1
is very inefficient and plain wrong. Leave the python default of
io.DEFAULT_BUFFER_SIZE.
- Minor simplification to argument passing.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
When radicale 2.x is available in testing, the migration can be
triggered by bumping the module's version.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The link is hidden but not removed. librejs will still parse it. Ideally we
would want to do this from <link data-jslicense='1' href=''> but that seems to
cause problems for librejs.
Librejs users can still find out about the license of Javscript script file
using Librejs menu.
We already have a link to FreedomBox source code in the home page.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Add information about all JS licenses into the Javascript licenses page so that
librejs detects it. In all Plinth pages and jsxc launch page.
Add doctype and fix styling.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Closes#1442.
When disk is very busy, sending KILL signal to the process may not kill it
immediately. So wait upto 5 minutes for it. This does not increase the time in a
regular case if the kill works immediately.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use the X-Forwarded-For header only if specified in the configuration. This
makes FreedomBox safe to use when not behind a reverse proxy server (although
we are unlikely to do this).
- When fetching the IP address to reset after successful login, use the
X-Forwarded-For header only if specified in the configuration.
- Minor flake8 refactorings.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Run yapf for automatic formatting.
- Move disable test to the end so that after all test are run, app is usually
disabled.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
- Make command line arguments more readable.
- Don't collect and reprint the logs. Let them be printed directly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
The status log file had been removed previously.
Closes#1461
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Fix the following warning:
"DeprecationWarning: Using or importing the ABCs from 'collections' instead of
from 'collections.abc' is deprecated, and in 3.8 it will stop working"
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
When visiting homepage as a non-admin user, don't throw an error into the
console about not being able to get root partition information. This is a
regression from refactoring during backups change.
Fixes: #1468.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
With newer version of radicale (>2.1), when configuration is changed, it is not
applied until the application is disabled and re-enabled.
Also make sure that configuration changes don't start a daemon when it is
disabled.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
The default rights file shipped in radicale 2.x package is equivalent
to owner_only. By setting this as our default, we can avoid any change
to the default config.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The default, remote_user, works ok when using uwsgi.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Not used with uwsgi, which is enabled for radicale 2.x.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>