2626 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
bed43564c3
searx: Use action utils for uwsgi configuration management
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 19:51:30 -05:00
Sunil Mohan Adapa
2c59bbe0f3
action_utils: Implement utilities for managing uwsgi configurations
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 19:51:25 -05:00
James Valleroy
72b59c0190
radicale: Switch to uwsgi for radicale 2.x
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 19:51:21 -05:00
James Valleroy
64036e2066
setup: Fix spelling error
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 17:43:02 -05:00
Sunil Mohan Adapa
d1ead29251
setup: Don't perform is-package-manager-busy checks when not needed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 17:40:31 -05:00
Sunil Mohan Adapa
915b8013d9
setup: Reduce refresh time when application is already installed
In the event setup page is being shown after the application installation is
already completed. Immediately reload instead of waiting for 3 seconds are
usual.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 17:40:26 -05:00
Sunil Mohan Adapa
65f1af7a7b
setup: Minor flake8 fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 17:40:22 -05:00
Sunil Mohan Adapa
de82f5002d
setup: Handle showing setup page after app completes installation
- During the rendering of the view, the state of installation may keep changing.
  This may lead to inconsistencies in the page. Avoid that by collecting the
  state once and then reusing that throughout the rendering process.

- During the time that setup middleware's checked of setup state of an app and
  rendering of app's setup view, if the setup process could get completed. This
  will lead to setup page being shown even after the application is installed.
  Handle this case and show a proper page instead of 'Submit Query' button on
  the page. Fixes #1360. This can be easily replicated by introducing a 10
  second sleep after setup middle checks of the application is 'up-to-date'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-14 17:40:02 -05:00
Sunil Mohan Adapa
1faee11d4d
django: Use Argon2 password hash
Passwords will be automatically upgraded for each user on login.

Usernames not yet upgraded are vulnerable to user enumeration attack due to
difference in password check timing.

No need to add build dependency on python3-argon2 because tests use a different
Django configuration which does not use argon2 hash.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-13 14:46:15 -05:00
Sunil Mohan Adapa
039461b846
backups: yapf fixes
Reviewed-by: Michael Pimmer <info@fonfon.at>
2018-12-11 23:38:30 +01:00
Sunil Mohan Adapa
f4b0c4dc9f
backups: Don't fail tests when borg is not installed
When a user running tests is root and borg is not installed, several tests fail
due to missing borg. Skip these tests when borg is not installed.

Reviewed-by: Michael Pimmer <info@fonfon.at>
2018-12-11 23:37:38 +01:00
Sunil Mohan Adapa
03936f8c35
cockpit: Update description
This is primary due to changes in the way Cockpit is doing authentication.

- Only admin users are allowed now. Users outside the admin group won't be able
  to login.

- All functions are working (if the reuse password for system functions box is
  checked during login).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-11 16:27:32 +05:30
Sunil Mohan Adapa
5b58f0597d
cockpit: Add link to manual page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-11 16:27:20 +05:30
Joseph Nuthalapati
b0ef84f54a
snapshot: Handle "Config in use" error
Fixes #1132

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-09 19:06:28 -08:00
Sunil Mohan Adapa
7ee4d13dce Show Gujarati in the list of UI languages
- Explicitly setup the list of Django languages. Keep them sorted by language
  code.

- Fallback to language name when Django can't provide locale language name.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-09 14:52:02 +05:30
Sunil Mohan Adapa
201b256fe5 main: Separate out CherryPy code into a separate module
This will help with modularizing the code as well as abstracting out CherryPy
for potential later replacement.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-09 14:52:02 +05:30
Sunil Mohan Adapa
40ecce554f main: Separate out Django setup into a separate module
This has less to do with abstraction than to do with modularization.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-09 14:52:02 +05:30
Joseph Nuthalapati
3d68f38738
snapshots: Handle installation on non-btrfs filesystems
Fixes #1147

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 15:13:04 -08:00
Sunil Mohan Adapa
d192e73506
snapshot: Update descriptions and UI options
- Mention that btrfs filesystems are only supported 'currently'.

- Clarify 'Free Space'. Explain how it actually works.

- Show '%' after the number in free space drop down. Also add 70%.

- Maintain the earlier order of showing timeline snapshots first and then
  software snapshots. This is order of importance.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 14:01:19 -08:00
Sunil Mohan Adapa
1ec5b213ad
snapshot: Minor styling fixes
- Avoid use of _ in functional steps.

- flake8 fixes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 14:00:26 -08:00
Joseph Nuthalapati
4fdd68cb3b
snapshot: Merge the functionality of the migrate command into setup
- Added a command-line argument called --old-version to the setup command based
  on which it can decide whether to do a new setup or a migration.
- Removed the migrate command.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 13:59:56 -08:00
Joseph Nuthalapati
e19cab80ad
snapshot: Improve description
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 13:59:44 -08:00
Joseph Nuthalapati
f68070c758
snapshot: ui: Remove NUMBER_MIN_AGE setting and add FREE_LIMIT
The free space limit value is allowed to a maximum of 60%, since setting the
it to a value higher than possible will effectively disable snapshotting.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org
2019-01-08 13:59:15 -08:00
Joseph Nuthalapati
8ba0bda869
snapshot: Fix snapshots filling up the disk
- Snapper's cleanup algorithms don't apply limits unless they are specified in
the form of ranges. Changed all limit values in the configuration to ranges.
- Also, all MIN_AGE values have been set to 0 to avoid the disk space filling up
in case of a large number of snapshots generated in a very short amount of time.
- FREE_LIMIT has been increased to 30% from the default 20% since backup
archives also take up disk space on the root partition.

Fixes #1435

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 13:57:46 -08:00
James Valleroy
97bb99b91c
Release v0.46.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-04 23:18:08 -05:00
Allan Nordhøy
bf0b7578f2 Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1013 of 1013 strings)
2019-01-04 23:12:13 +01:00
Joseph Nuthalapati
c3ae35c4b0
clients: Rename DAVdroid to DAVx5
Fixes #1441

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-04 14:11:33 -08:00
prolinux ukraine
f7e8ccb38a
Translated using Weblate (Ukrainian)
Currently translated at 8.6% (87 of 1013 strings)
2019-01-04 18:06:32 +01:00
James Valleroy
d8f161adce
Release v0.46.0 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 16:46:58 -05:00
James Valleroy
ec91638059
locale: Run update_translations
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 16:16:55 -05:00
Sunil Mohan Adapa
d40ef19a25
debian: Fix lintian warning about vcs ignore file
W: plinth: package-contains-vcs-control-file
usr/lib/python3/dist-packages/plinth/tests/.gitignore

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:49 -05:00
Sunil Mohan Adapa
bbd56ad9b6
storage: Add parted as dependency module
parted is being used in action scripts.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:57:55 -05:00
Petter Reinholdtsen
f9742966bb
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1013 of 1013 strings)
2018-12-31 21:09:02 +01:00
Sunil Mohan Adapa
35c70861dc
logging: Remove references to old log files
- Remove access/error log references in configuration files and tests.

- Ensure that /var/log/plinth directory is not created anymore.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-30 13:45:23 -05:00
Petter Reinholdtsen
f625b16c16
Translated using Weblate (Norwegian Bokmål)
Currently translated at 98.2% (995 of 1013 strings)
2018-12-28 09:08:49 +01:00
Sunil Mohan Adapa
91ba56e3ce
letsencrypt: Use macros for configuring sites
Makes it trivial to alter site configuration for all domains at once. Also
possible to easily switch to TLS modules other than mod_gnutls.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-26 09:20:05 -05:00
Sunil Mohan Adapa
6afbd0d9fc
logging: Implement colors for console messages
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-23 17:18:25 -05:00
Sunil Mohan Adapa
bc55edd186
logging: Separate logging init logic into a module
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-23 17:18:21 -05:00
Sunil Mohan Adapa
f36753fcb8
logging: Log to systemd journal directly
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>
2018-12-23 17:18:13 -05:00
Sunil Mohan Adapa
dc7bd96ed7
logging: Don't log to a log file
Instead log only to the console and let daemon wrapper (systemd in Debian) take
the logs from the console and log them to system log. There are many advantages
for logging to system log instead of handling files on our own:

- No need to handle log file rotation. This can be configured in many ways and
  we don't have to support that. System's log daemon handles this. Closes #1353.

- Remaining system logs such as sudo and audit logs can be along with FreedomBox
  logs for better debugging.

- It is possible to do remote logging based on system logger.

- It is possible to make the logs tamper resistant based on system logger
  configuration.

Since timestamp is automatically logged by system log daemon, remove timestamps
from log format. When running on console, timestamps are not very useful.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-23 17:18:04 -05:00
Sunil Mohan Adapa
a541ea06b7
logging: Make cherrypy log to the main log
- Access log is not populated by cherrpy anymore.

- CherrPy does not log WSGI handler requests at all. So the request for HTML
  pages actually is never logged. Only static file requests which are hardly
  useful are logged.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-23 17:17:56 -05:00
Sunil Mohan Adapa
8a7c849fbf
logging: Don't log static file requests
They are rarely useful. Refactor setup of static file serving to a method to
avoid repetition.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-23 17:17:45 -05:00
prolinux ukraine
c5ac291146
Translated using Weblate (Ukrainian)
Currently translated at 3.0% (30 of 1013 strings)
2018-12-19 22:12:11 +01:00
advocatux
d16091726d
Translated using Weblate (Spanish)
Currently translated at 100.0% (1013 of 1013 strings)
2018-12-19 22:01:10 +01:00
Johannes Keyser
03bc72bfe2
Translated using Weblate (German)
Currently translated at 100.0% (1013 of 1013 strings)
2018-12-19 22:00:36 +01:00
Pavel Borecki
2ad9c05dcc
Translated using Weblate (Czech)
Currently translated at 100.0% (1013 of 1013 strings)
2018-12-19 21:59:43 +01:00
James Valleroy
b6cd60b647
Release v0.45.0 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-17 19:06:31 -05:00
James Valleroy
dcfad32b22
Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-17 18:33:50 -05:00
Allan Nordhøy
7c026ec100
Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.9% (991 of 992 strings)
2018-12-18 00:32:00 +01:00
ssantos
ec496b1692
Translated using Weblate (German)
Currently translated at 100.0% (992 of 992 strings)
2018-12-17 13:08:43 +01:00