4450 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
f2ea0b9065
backups: Require passphrase for encryption in add repository form
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:44:09 +05:30
Sunil Mohan Adapa
2a2cc41f1d
backups: Handle SSH keys for old stored repositories
- Assume that their SSH public keys are not unverified.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:44:01 +05:30
Sunil Mohan Adapa
661a00198e
backups: Minor styling changes
- Add docstrings.

- Add blank lines for extra readability.

- Use <span> instead of <i> tag for icon in template.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:43:49 +05:30
Sunil Mohan Adapa
984b7dca88
backups: Cleanup auto-mounting SSH repositories
Remove auto-mounting of repositories during instantiation entirely. It is better
to explicitly mount later.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:43:40 +05:30
Sunil Mohan Adapa
9c8674baa3
backup: Allow SSH directory paths with : in them
- From SSH manual, a path may contain : if it is presented as absolute path.
  Update regular expression for splitting accordingly.

- Allow Null paths similar to SSH.

- Perform a full regular expression match when splitting path.

- Simplify regular expression.

- Update tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:43:28 +05:30
Sunil Mohan Adapa
c8a292d308
backups: Minor fixes to host verification view template
- Remove <br> tags. They have no semantics and should be replaced with uniform
  styling.

- Minor changes to messages.

- Remove <p> tags from internationalized messages.

- Rename button label from ' Verify ' to 'Verify Host'. Extra spaces are
  incorrect.

- Fix indentation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:43:12 +05:30
Joseph Nuthalapati
bd1874d774
backups: Add regex validation for ssh_repository field
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:43:08 +05:30
Joseph Nuthalapati
2c97e1e02e
backups: Read file path of known_hosts directly from plinth.config
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:43:02 +05:30
Joseph Nuthalapati
795ed9d735
backups: Remove unnecessary context manager for paramiko SFTPClient
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:56 +05:30
Joseph Nuthalapati
9f71c5867e
ui: Create reusable CSS class for collapsible-button
.collapsible-button is used by both "Client Apps" and the "How to verify?"
button in backups:verify-ssh-hostkey page.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:48 +05:30
Joseph Nuthalapati
3a6dcbe7a7
Verify SSH hostkey before mounting
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:41 +05:30
Joseph Nuthalapati
7684814a5c
backups: Fix functional tests broken due to URL changes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:37 +05:30
Joseph Nuthalapati
de7275d4a5
backups: ssh remotes: Refactoring
- Make url scheme consistent
- Add an FA icon to the drop-down button in VerifySshHostkeyView
- Refactoring to reduce code duplication

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:31 +05:30
Joseph Nuthalapati
0b43caf81d
Add SSH hostkey verification
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:25 +05:30
Joseph Nuthalapati
f85e7829b9
backups: tests: Fix issue with usage of fixture 'needs_root'
Fixtures cannot be currently included into other fixtures by using
@pytest.mark.fixtures('fixture_name')
They have to be included as parameters instead.
See bug: https://github.com/pytest-dev/pytest/issues/3664

Also increase the scope of needs_root to the highest, i.e. session, so that it
can be used by any kind of fixture.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:20 +05:30
Joseph Nuthalapati
f4f9e2c465
backups: Skipping tests temporarily
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:14 +05:30
Joseph Nuthalapati
ee21dcfbb8
backups: Avoid using sudo in tests
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:10 +05:30
Joseph Nuthalapati
d451b54286
backups: Add test for adding ssh remotes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:02 +05:30
Joseph Nuthalapati
95f9f5c712
backups: Minor refactoring in forms.py
Break up clean() into multiple private methods

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:56 +05:30
Joseph Nuthalapati
56babf5cb4
backups: Fix issue with repository not being initialized
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:48 +05:30
Joseph Nuthalapati
3a8fbdd799
debian: Add python3-paramiko to build dependencies
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:36 +05:30
Joseph Nuthalapati
67404a1c2d
backups: Make paramiko a dependency of freedombox package
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:28 +05:30
Joseph Nuthalapati
3270ba875a
backups: Text change on index page
Change heading text to "Existing backup locations" in backups index page.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:18 +05:30
Joseph Nuthalapati
cbb177414f
backups: YAPF formatting
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:41:11 +05:30
Joseph Nuthalapati
fb67c60a84
backups: Avoid creating duplicate SSH remotes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:40:51 +05:30
Joseph Nuthalapati
e618e08fe7
backups: Improve UX of adding ssh remote
- Create empty directory if not exists
- Check if the directory is empty
  - if not empty, check if it's an existing backup repository
  - else throw an error

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:40:35 +05:30
Luis A. Arizmendi
10cf3ee536 Translated using Weblate (Spanish)
Currently translated at 100.0% (1043 of 1043 strings)
2019-07-02 19:13:55 +02:00
Doma Gergő
833a6d2632 Translated using Weblate (Hungarian)
Currently translated at 100.0% (1043 of 1043 strings)
2019-07-02 19:13:55 +02:00
Doma Gergő Mihály
d0c9d542f2
matrixsynapse: Fix missing translation mark
Missing translation mark in "matrix-synapse.html" fixed. Closes: #1588.

Signed-off-by: Doma Gergő Mihály <domag02@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-02 10:12:05 -07:00
ZeroAurora
4aba253a6f
Translated using Weblate (Chinese (Simplified))
Currently translated at 57.0% (594 of 1043 strings)
2019-06-28 20:01:06 +02:00
THANOS SIOURDAKIS
58148f890d
Added translation using Weblate (Greek) 2019-06-25 21:54:10 +02:00
James Valleroy
e2b13a218f
Release v19.10 to experimental
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v19.10
2019-06-24 20:07:11 -04:00
James Valleroy
3360ff388e
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-24 20:06:11 -04:00
James Valleroy
5a2aaae8d6
locale: Update translations strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-24 19:49:08 -04:00
Sunil Mohan Adapa
c6bbc847b4
syncthing: Open firewall ports for listening and discovery
- Closes #1592.

- Use firewall service definition 'syncthing' already available.

- Open externally also, helps in syncing with peers on the Internet. Open
  discovery port also externally and syncthing deal with the traffic.

- Based on https://docs.syncthing.net/users/firewall.html

Test:

- Install version 2, syncthing firewall service is enabled in internal and
  external zones.

- Disable app, syncthing firewall service is removed. Enable app, syncthing
  firewall service is added.

- Install version 1, upgrade to version 2, syncthing firewall service is added.

- Install version 1, disable syncthing, upgrade to version 2, syncthing firewall
  service is not added. Enable syncthing, firewall service is added.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-24 18:11:35 -04:00
Petter Reinholdtsen
1867cc6e50
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (1045 of 1045 strings)
2019-06-22 08:01:21 +02:00
adaragao
e1c0e99cb8
Translated using Weblate (Portuguese)
Currently translated at 7.2% (75 of 1045 strings)
2019-06-22 08:01:20 +02:00
Allan Nordhøy
adb4a988c2
Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.8% (1043 of 1045 strings)
2019-06-19 00:01:04 +02:00
Pavel Borecki
a8c19295ea
Translated using Weblate (Czech)
Currently translated at 100.0% (1045 of 1045 strings)
2019-06-19 00:01:03 +02:00
ssantos
4dc4cae04e
Translated using Weblate (German)
Currently translated at 100.0% (1045 of 1045 strings)
2019-06-19 00:01:02 +02:00
Mesut Akcan
399c7007d0
Translated using Weblate (Turkish)
Currently translated at 82.3% (860 of 1045 strings)
2019-06-19 00:01:01 +02:00
James Valleroy
6064067a3a
functional_tests: Add shortcut- prefix to test home page config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-13 18:38:14 -07:00
Sunil Mohan Adapa
23f37a3a3d
app: Set app as enabled only when the daemon is enabled
- For avahi, datetime and SSH.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:18:08 -04:00
Sunil Mohan Adapa
20aa2abe3b
radicale: Workaround issue with creating log directory
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:18:05 -04:00
Sunil Mohan Adapa
e4351b6b97
Introduce daemon component to handle systemd units
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:18:02 -04:00
Sunil Mohan Adapa
46f162d093
app: Add unique ID to each app class
Also maintain a global list of apps

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:59 -04:00
Sunil Mohan Adapa
e55a85bdd1
app: Rename get() method to get_component()
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:56 -04:00
Sunil Mohan Adapa
862d87920a
Introduce uwsgi component to manage uWSGI configuration
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:53 -04:00
Sunil Mohan Adapa
4100d36381
Introduce webserver component for managing Apache configuration
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:49 -04:00
Sunil Mohan Adapa
ca2c7dbeb0
Introduce firewall component for opening/closing ports
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:45 -04:00