1361 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
bd20b6570b
ttrss: Implement upgrade from 17.4 to 18.12
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 23:50:45 -05:00
Sunil Mohan Adapa
0dea9e80f3
ttrss: Make setup process reusable
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 23:50:42 -05:00
Sunil Mohan Adapa
2f0bc29239
firewalld: Implement upgrading from 0.4.x to 0.6.x
- firewalld is always on an active. Running setup is not a problem.

- Installing new configuration and applying changes on top is more reliable.
  Changes to be done are not configuration settings but FreedomBox defaults.

Fixes: #1367.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 23:50:40 -05:00
James Valleroy
d4fa87bbf1
users: When ssh used in tests, add users to admin group
This allows the tests to pass even if logins are restricted by
security module.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 20:09:43 -08:00
James Valleroy
7ee48da299
security: Migrate access config to new file
Fixes #1504

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 20:09:40 -08:00
Sunil Mohan Adapa
b8d4b55c0a
openvpn: Make frontpage shortcut appear after an upgrade
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 18:13:39 -05:00
Joseph Nuthalapati
0457f34c21
openvpn: Increment version number for easy-rsa 3 migration
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 18:13:34 -05:00
Sunil Mohan Adapa
2aef91b187
config: Don't pass configuration file argument to action
Due to security risk that a compromised Plinth process will give adversary the
ability to write to any file on the system.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 13:23:04 -08:00
Joseph Nuthalapati
d1d3eae3db
config: Reset home page setting in freedombox.conf during migration
While moving the home page configuration to a new file, also reset the home page
path in freedombox.conf to its default setting of /plinth.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-03-01 13:22:58 -08:00
Joseph Nuthalapati
668d4de77a
matrix-synapse: Fix LDAP login issue
Pass the `mail` attribute as an empty string instead of None (null in yaml)

Fixes #1484

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-28 19:13:59 -08:00
Sunil Mohan Adapa
ec68eb3d89
setup: Make additional info available for force upgrading
This includes list of packages for which conffile prompts will be shown. For
each package current version of the package, new version of the package and list
of configuration files that were modified.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 20:48:51 -05:00
Sunil Mohan Adapa
7862325bb6
apache: Increment app version number
To trigger setting up all the necessary modules again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 20:13:48 -05:00
Sunil Mohan Adapa
3af207a4e8
sso: Pre-enable necessary apache modules
To avoid Apache restart during installation (although sso is an essential app
and this is not an issue).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 20:13:42 -05:00
James Valleroy
1eed7d581d
ttrss: Add backup support
- Use backup hooks to dump and restore database.
- Add functional test for backup and restore.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-26 15:23:47 -08:00
James Valleroy
8a60581f3d
radicale: Add description of web interface
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-26 12:50:11 -08:00
Joseph Nuthalapati
a4887ef0d0
users: Add nscd as a dependency
Currently, nscd comes as a recommended package of nslcd, which is a dependency
of Plinth. Plinth needs nscd to work. An installation with the --no-recommends
option will cause errors in Plinth.

Users is an essential package in plinth. nscd is now a managed package of users.

Fixes #1213

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-26 11:07:24 -08:00
Sunil Mohan Adapa
d51a2b6865
bind: Handle conffile prompt during upgrade
- Simply keep the old configuration as the configuration format for bind is
  unlikely to change due to its stability. Future versions may consider checking
  for version of package being upgraded to.

- Don't start service if not already running.

- Don't perform firewall changes.

- No need to rerun setup as old configuration is being kept.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-26 06:24:22 -05:00
Joseph Nuthalapati
b33b44b526
config: Fix error when setting JSXC as the home page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:31:08 -05:00
Joseph Nuthalapati
bd43ed515e
config: Remove Apache home page configuration from freedombox.conf
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:31:05 -05:00
Joseph Nuthalapati
bedc5ff96d
config: Add option to use Apache's default home page as home page
This supports the use case of hosting a website on FreedomBox at Apache's web
root. This makes the assumption that index.html is a file in the website.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:31:02 -05:00
Joseph Nuthalapati
8bc34f84c3
config: Rename Default App to Webserver Home Page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:59 -05:00
Joseph Nuthalapati
a87b0ff596
config: Migrate default app configuration to new conf file
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:55 -05:00
Joseph Nuthalapati
209d8e7b3a
config: Fix Ikiwiki entries not showing up as default apps
- When a user selects their Ikiwiki wiki or blog as the default app, the UI
  doesn't reflect that. It still shows Plinth as the default app. This commit
  fixes the bug.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:51 -05:00
Joseph Nuthalapati
5ad22114ed
config: Move default-app configuration to a dedicated file
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:45 -05:00
Sunil Mohan Adapa
c2f7bd6354
backups: Fix failing test case
When run on empty directory FileNotFoundError is raised. Include it in the list
of expected errors.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-18 21:51:29 -05:00
Sunil Mohan Adapa
df76e6afa4
tor: Use fixed 9001 port for relaying
When ORPort is set to 'auto', Tor automatically allocates a port for it. During
it's first run, we able to extract the port number and open the firewall port.
However, unlike for pluggable transports, Tor does not seem to store this port
for future reuse in the state file. It hence opens a new port every time it is
started. This leads to a new port being assigned on next Tor startup and leads
to relay functionality not being reachable from outside.

According to the documentation, only possible values for ORPort are a fixed
number or 0 (disable) or auto (current behavior). Choose 9001 as this is the
commonly used port number for ORPort. The recommended port number of 443 is not
possible in FreedomBox due it is use for other purposes.

Closes: #1495.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-18 07:13:19 -05:00
Sunil Mohan Adapa
595997ff7c
tor: Styling changes due to yapf
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-18 07:13:15 -05:00
Joseph Nuthalapati
1dc1278a88
config: Consolidate get_domainname() implementation into config
- Use the function get_domainname() in config module everywhere
- Delete duplicate implementations in ejabberd and jsxc

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-14 16:39:30 -08:00
Joseph Nuthalapati
938dadcae0
tor: Fix deprecation warning W605 for '\' character in regex
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-14 15:33:34 -08:00
Sunil Mohan Adapa
e448ab6380
matrixsynapse: Better checking for valid certificate
If a valid certificate is available but not yet setup, the earlier code assumes
there is a valid certificate.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 19:34:04 -08:00
Sunil Mohan Adapa
ee38f32f2b
letencrypt: Fix issue with disabling matrixsynapse checkbox
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 15:40:47 -08:00
Sunil Mohan Adapa
781ac3d5dd
matrixsynapse: Fix issues with showing certificate warning
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 15:40:05 -08:00
Sunil Mohan Adapa
3961ccf415
matrixsynapse: Remove hard-coded URL
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-13 15:38:45 -08:00
Joseph Nuthalapati
a918f9a885
matrix-synapse: Use Let's Encrypt certificates
Matrix requires valid certificates for federation with other servers from
version 1.0 onward. If the FreedomBox server already has LE cert and private
key, copy them into /etc/matrix-synapse

- Add certificate renewal hooks for Matrix Synapse. Reusing the certificate
  renewal mechanism built for ejabberd with matrix-synapse as well. One notable
  difference is that Matrix Synapse doesn't support switching the domain name or
  dropping the Let's Encrypt certificate.

- Use self-signed certificate if there is no LE certificate. Matrix Synapse
  server startup fails if the files homeserver.tls.crt and homeserver.tls.key
  are missing.

- Copy Apache's snakeoil certificates to /etc/matrix-synapse when LE
  certificates are not available. Prefer LE certificates if available.

- Display warning if no valid LE certificate is found.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-02-13 11:29:36 -08:00
Sunil Mohan Adapa
a821517e91
radicale: Simplify upgrading to newer packages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-13 06:42:55 -05:00
James Valleroy
6536e86b15
radicale: Fix server URLs in client info
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:56:08 -08:00
James Valleroy
5aa957c6ba
radicale: Remove obsolete diagnostics
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:56:02 -08:00
James Valleroy
03b935333f
radicale: Bump version to 2
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:55:56 -08:00
James Valleroy
11e86cf8f8
radicale: Log errors during upgrade
Avoid raising errors which could cause endless loop of setup process
failing.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-11 13:55:25 -08:00
Sunil Mohan Adapa
ab64bd17a3
apache: Switch to mod_ssl from mod_gnutls
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:28:09 -05:00
Sunil Mohan Adapa
49640fdfce
monkeysphere: Fix handling of multiple domains and keys
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-09 12:27:57 -05:00
J. Carlos Romero
722fa39c2a
mldonkey: Add to the description the three available front-ends
Signed-off-by: J. Carlos Romero <juancarlos.romero@gmail.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 22:05:06 -08:00
J. Carlos Romero
59e41927bf
mldonkey: Add some more clients to the module page
Signed-off-by: J. Carlos Romero <juancarlos.romero@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 22:05:03 -08:00
James Valleroy
779ccb3bca
datetime: Switch from chrony to systemd-timesyncd
Previously, we switched from ntp to chrony. However, since chrony
conflicts with ntp, this change in dependency causes
unattended-upgrades to skip upgrading freedombox.

Switch to systemd-timesyncd, which does not conflict with either
package. We can switch back to chrony after all users have upgraded to
the most recent release.

Closes #1486

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-07 16:32:35 -08:00
Sunil Mohan Adapa
6e188524e2
backups: Fix styling for upload size warning
Make it conditional such that when the disk space information is not available
due to errors, we don't display the warning.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:06 -05:00
Sunil Mohan Adapa
ff8d85a88f
backups: Add link to manual page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:04 -05:00
Sunil Mohan Adapa
f15505e6f4
backups: Add title and description to other pages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:12:02 -05:00
Sunil Mohan Adapa
3be15a87e6
backups: Move subsubmenu below description
Closes: #1466.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:11:59 -05:00
Sunil Mohan Adapa
8da5b21d80
backups: Use icon for add repository button
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:11:57 -05:00
Sunil Mohan Adapa
d99c356336
backups: Rename 'Abort' buttons to 'Cancel'
Like most other pages in the interface, use 'Cancel' buttons instead of 'Abort'
buttons.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-07 19:11:53 -05:00