3909 Commits

Author SHA1 Message Date
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
2c51165f99
firewalld: Flush iptables rules before restarting firewall
This is a workaround for the problem that when restarting firewalld with
iptables backend, flushing fails and starting with nftables also fails requiring
a restart to recover the problem.

Fixes #1440.

Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-11 23:16:15 +05:30
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
12ea72eb0a
snapshot: Refactor configuration migration
- Only do the configuration based on version run the remaining setup code
  without considering version.

- Don't force upgrade/setup configuration when doing from version 4 and above.

- Force set cleanup=yes values during migration too.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 14:01:34 -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
0b9922434c
snapshot: Fix failing tests
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 14:00:11 -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
ad049af276
snapshot: Enable TIMELINE_CLEANUP and NUMBER_CLEANUP by default
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-08 13:59:30 -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
Sunil Mohan Adapa
8dbf73d3f5
syncthing: Use exact matches when enforcing trailing '/'
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:58:10 -05:00
Sunil Mohan Adapa
7cf279ccd0
radicale: Redirect to well-known URLs according to version
- Radicale 1 needs to have /radicale/.well-known/*dav to the URLs where as
  Radicale 2 needs to have /radicale to be the URLs. Hence have two separate
  apache configuration files.

- Use expr= when setting X-REMOTE-USER header to set the authenticated user name
  properly. Without this all users are using a single user '(null)' data.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:58:00 -05:00
James Valleroy
49acfa5ad1
radicale: Add support for radicale 2.x
- Remove obsolete base_prefix and well-known configs.
- Use http_x_remote_user auth type.
- Rewrite /radicale to /radicale/.
- Add ProxyPassReverse.
- Set X-Script-Name and X-Remote-User request headers.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:57:56 -05:00
James Valleroy
1b4d42cd53
radicale: Don't modify default file for radicale >= 2.1.10
/etc/default/radicale is not used in radicale 2.1.10-1 and later.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:57:50 -05:00
James Valleroy
6adec225d3
radicale: Add tests for well-known URLs
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-06 17:57:43 -05:00
Joseph Nuthalapati
a41002ddec
ci: Don't install fuse and fuse3 packages in the CI environment
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-06 03:56:46 +05:30
James Valleroy
97bb99b91c
Release v0.46.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v0.46.1
2019-01-04 23:18:08 -05:00
James Valleroy
edfc7a55ed
debian: Fix spelling errors in lintian override comment
Thanks to Chris Lamb for pointing it out.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-04 23:05:35 -05:00
Sunil Mohan Adapa
25b5eaf4d9
debian: Replace and break older versions of plinth
This is necessary to avoid errors when installing freedombox with older plinth
already installed. Also make plinth depend on latest freedombox to ensure
upgrades go smoothly.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-04 22:52:15 -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
f93b6e2d54
debian: Standards-Version is now 4.3.0
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 16:45:32 -05:00
James Valleroy
764bc7f5a7
doc: Fetch latest manual from wiki
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 16:36:36 -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
5f8965df25
debian: Rename plinth package to freedombox
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:59:08 -05:00
Sunil Mohan Adapa
d9b374137b
debian: Update short description
Plinth is no longer just the web interface but all of freedombox.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:59:02 -05:00
Sunil Mohan Adapa
399647f93c
debian: Don't change ownership recursively in postinst
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:57 -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
db8ec9e784
debian: Ignore debian/debhelper-build-stamp
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:44 -05:00
Sunil Mohan Adapa
a6479648a6
debian: Use description from freedombox.org
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:39 -05:00
Sunil Mohan Adapa
b564c9d28e
Move preseed file from freedombox-setup
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:35 -05:00
Sunil Mohan Adapa
9f93c874db
debian: Break current version of freedombox-setup
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:29 -05:00
Sunil Mohan Adapa
2e8d28c7f8
Move update-motd script from freedombox-setup
Significant re-indentation due to yapf.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:22 -05:00
Sunil Mohan Adapa
dfd9a7a298
sudoers: Allow all admin users to become superusers
- Migrated settings from freedombox-setup.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:16 -05:00
Sunil Mohan Adapa
4c1572a3f0
debian: Add dependencies from freedombox-setup
All the packages that are removed as dependencies in freedombox-setup and are
not essential for the operation of FreedomBox/Plinth have been moved to
Recommends .

The following packages were *moved* from freedombox-setup directly as is:

- bridge-utils
- curl
- devio
- dnsutils
- dosfstools
- haveged
- htop
- iftop
- iputils-ping
- iw
- libnss-gw-name
- libnss-mdns
- libnss-myhostname
- libpam-tmpdir
- libpam-abl
- locales
- locales-all
- lsof
- netcat-openbsd
- psmisc
- resolvconf
- rfkill
- tcpdump
- vim-tiny
- wget
- wireless-tools
- zile

The following packages have been *added* as they are part of standard system
utilities present in a Debian system:

- bzip2
- file
- openssh-client
- pciutils
- whois

The following packages were *dropped* as dependencies from freedombox-setup:

- dialog: no utility to an admin on command line. No scripts are currently using
  it. Any script using it should have a dependency on it.

- dnsmasq-base: network-manager is one that uses it and it already recommends
  it.

- parted: Added as dependency for the storage module which uses it.

- ssl-cert: apache2 and other packages that use it already recommend it.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:58:04 -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
Sunil Mohan Adapa
bf8fc21e08
debian: Alter control file indentation
To a more natural appearance.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-12-31 15:56:22 -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