5694 Commits

Author SHA1 Message Date
Federico Ceratto
d399013d82 Release v. 20.13 to Unstable debian/20.13 2020-07-18 12:14:39 +01:00
Doma Gergő
a1d2a55bd1
Translated using Weblate (Hungarian)
Currently translated at 80.7% (1038 of 1286 strings)
2020-07-16 18:41:53 +02:00
Yogesh
d1232b49f9
Translated using Weblate (Kannada)
Currently translated at 0.1% (2 of 1286 strings)
2020-07-16 18:41:53 +02:00
Allan Nordhøy
665072d7f2
Translated using Weblate (Swedish)
Currently translated at 99.0% (1274 of 1286 strings)
2020-07-15 11:41:53 +02:00
Allan Nordhøy
154d0978b9
Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.4% (1099 of 1286 strings)
2020-07-15 11:41:53 +02:00
Adolfo Jayme Barrientos
91486654cf
Translated using Weblate (Spanish)
Currently translated at 99.1% (1275 of 1286 strings)
2020-07-15 11:41:52 +02:00
James Valleroy
d5bebba6e7
Prepare for v20.13 release
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-13 19:06:50 -04:00
James Valleroy
1e31f73e40
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-13 19:04:38 -04:00
James Valleroy
aa0ec071c3
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-13 18:34:13 -04:00
Doma Gergő
bda7202837
Translated using Weblate (Hungarian)
Currently translated at 81.0% (1038 of 1280 strings)
2020-07-14 00:29:40 +02:00
Tang Zongxun
fa7e62a6e1
Translated using Weblate (Chinese (Simplified))
Currently translated at 48.8% (625 of 1280 strings)
2020-07-14 00:29:40 +02:00
Allan Nordhøy
7dde001ad5
Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.0% (1089 of 1280 strings)
2020-07-14 00:29:39 +02:00
James Valleroy
f8eb6c8cc6
upgrades: Refactor use of lsb_release
Tests:
- On unstable and testing:
  - Ran functional tests for upgrades.
  - Ran actions "upgrades setup" and "upgrades setup-repositories".
- On testing:
  - In develop mode, activated backports.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:32 -07:00
James Valleroy
a60341f0d8
upgrades: Split apt preferences into 2 files
- 50freedombox4.pref handles freedombox package from current
  backports. Whenever upgrading to a new Debian release, backports can
  be activated for the new release, and will always include the
  freedombox package at the start.

- 51freedombox-apps.pref handles apps, and each entry is particular to
  a Debian release. For example, after bullseye release, entries from
  bullseye-backports can be added, and entries from buster-backports
  can be removed.

Tests:
- In testing container, run setup in development mode. Apt preferences
  files have the expected content.
- In stable vagrant box, install deb with these changes. Apt
  preferences files have the expected content.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:29 -07:00
James Valleroy
2f1a6dc0f7
upgrades: Show dist of backports to be activated
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:26 -07:00
James Valleroy
6ac3d85bae
upgrades: Enable backports for testing only in development mode
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:23 -07:00
James Valleroy
2176ab97ad
upgrades: Rewrite apt prefs file when activating backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:19 -07:00
James Valleroy
ca91120fdc
upgrades: Check that backports is for current release
- If backports is for older release, then it can be activated again to
  upgrade to latest release. (Plan is to make this automatic, but
  leave the manual option as a fallback.)

- Security notice still shown if older backports are enabled.

Tests:

- On Buster system, change distribution in
  /etc/apt/sources.list.d/freedombox2.list to
  stretch-backports. Updates page shows button to activate backports
  again. Activate and check the source list to confirm that it has
  buster-backports again.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:16 -07:00
James Valleroy
6b0744c1c7
upgrades: Use only sources file to determine if backports enabled
Tests:
- Build deb and install in buster image. Manually remove backports
  sources file. Security page does not show backports notice. Updates
  page shows button to activate backports.
- Activate backports from updates page. Success message is shown and
  button to activate backports is removed. Security page shows
  backports notice.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:13 -07:00
James Valleroy
7caed57caf
upgrades: Add button to activate backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:44:10 -07:00
James Valleroy
f41cc116a1
security: Move backports notice to security page
Move get_backports_in_use to upgrades.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:42:29 -07:00
James Valleroy
d042c3c60c
upgrades: Use codename to pin freedombox from backports
Skip writing apt preferences when running sid.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:42:22 -07:00
James Valleroy
92d39c0b6c
upgrades: Use current release codename when enabling backports
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:42:15 -07:00
James Valleroy
d758a917e3
upgrades: Parameterize backports dist name
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-13 14:42:06 -07:00
James Valleroy
172ffe106b
upgrades: Update apt cache before manual update
Test:
- Run manual update. `journalctl -u freedombox-manual-upgrade` shows
  that apt cache was updated.

Closes: #1708.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Split the update command into ExecStartPre= with return code ignored]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-12 20:39:34 -07:00
Benjamin Ortiz
5e6a661648
backups: Allow remote repository usernames to start with numbers
Although useradd recommends starting with either a lowercase letter or an
underscore, there is nothing that consistently adheres to this recommendation
across systems. Because some systems do not follow this recommendation and this
recommendation is not a hard requirement, we should not prevent connections at
the validation stage.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-07-12 19:26:54 -07:00
Veiko Aasa
b9fe3fb491
minidlna: Do not expose statistics over public web
Tested that after this change, only admins can see the MiniDLNA
statistics page https://<freedombox>/_minidlna/ over the web.

Everybody can still see the page on local network using
an address http://<freedombox>:8200/

MiniDLNA web page shows how many media files are served and
some information (IP, MAC address) about the connected clients.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-12 10:11:51 -04:00
Sunil Mohan Adapa
b1f2c6e446
debian: Rename source package to freedombox from plinth
From documentation[1][2], it appears that the proper way to rename the source
package is simply to change the source package name. The binaries will be
treated generated from a new source package name. The old source package will
then not have any binaries associated with it. This will prompt the 'dak
cruft-report' tool to automatically remove the old source package[3]. No further
action will necessary to remove the old source package.

Links:

1) https://wiki.debian.org/RenamingPackages

2) https://www.debian.org/doc/manuals/developers-reference/pkgs.html#moving-removing-renaming-orphaning-adopting-and-reintroducing-packages

3) https://wiki.debian.org/ftpmaster_Removals

Tests:

- Build .deb package. Package is built successfully. Source package name is
'freedombox'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-12 09:20:22 -04:00
Sunil Mohan Adapa
0247a0eacd
static: Drop unused link to Lato ttf font
Tests:

- Interface shows Lato font as usual in apps and system pages.

- Build .deb package. Lintian does not show a warning related override for the
TTF font.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-12 09:20:18 -04:00
Doma Gergő
23bc27291a
Translated using Weblate (Hungarian)
Currently translated at 80.8% (1035 of 1280 strings)
2020-07-11 17:41:48 +02:00
Joseph Nuthalapati
7d143c9ef2
container: Remove external depenceny - dateutil
Used a function from the standard library instead.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-07-11 11:57:55 +03:00
Joseph Nuthalapati
359a0acd1a
container: Add option to update the container image
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-07-11 11:57:12 +03:00
Joseph Nuthalapati
01a757c38a
functional-tests: Fail fast on install failure
Tested against ejabberd's failing installation. The entire test suite
gets marked as failed if the application installation fails.

Fixes #1902 #1895

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-07-08 12:50:22 +03:00
James Valleroy
c544160a94
Release v20.12.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v20.12.1
2020-07-05 15:41:09 -04:00
Milo Ivir
4cc254da1e
Translated using Weblate (German)
Currently translated at 100.0% (1280 of 1280 strings)
2020-07-05 21:35:03 +02:00
Sunil Mohan Adapa
144c8c9d95
cfg, frontpage: Ignore errors while reading config and shortcuts
- Ignore errors while trying to expand a file path list into its .d components
path list.

- Ignore errors when reading shortcuts fails a file for any reason.

- Errors when reading configuration file already ignored. os.path.isfile() and
configparser.Configparser.read() do not raise an exception under any
circumstances.

Analysis:

Regression in 20.12 reported at
https://discuss.freedombox.org/t/fb-20-12-solved-plinth-fails-to-start-due-to-new-frontpage-py-shortcuts-and-filesystem-permissions/994/4

- freedom-maker creates /var/lib/freedombox/ with mode 755 as root but this only
applies for disk images.

- freedombox.postinst, networks, apache check for the existence of
/var/lib/freedombox/is-freedombox-disk-image .

- Samba creates /var/lib/freedombox with mode 755 as root.

- Backups creates /var/lib/freedombox/borgbackup but not the parent directory?

- Shortcuts are now read from /var/lib/freedombox/.

Tests performed:

- Create directories /var/lib/freedombox and /etc/freedombox with permission set
to 750. In case of configuration, an early warning message is printed and in
case of shortcuts warnings are printed but service starts properly. Changing the
permission to 755 removes the warnings.

- Ensure 755 permission on above two directories. Create non-empty files
custom-shortcuts.json and freedombox.config with permissions 640. In case of
config no warning is printed (silently ignored) and in case of shortcuts,
warning is printed that file could not be read but service starts properly.
Changing the permission to 644, no warnings are printed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-05 15:29:36 -04:00
Petter Reinholdtsen
00b38c8bdb
Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.0% (1089 of 1280 strings)
2020-07-04 21:41:46 +02:00
J. Lavoie
96caad1bce
Translated using Weblate (French)
Currently translated at 99.0% (1268 of 1280 strings)
2020-07-03 00:41:46 +02:00
Robert Pollak
6f085abcb1
Translated using Weblate (German)
Currently translated at 99.7% (1277 of 1280 strings)
2020-07-03 00:41:46 +02:00
nautilusx
7fdf0601fc
Translated using Weblate (German)
Currently translated at 99.8% (1278 of 1280 strings)
2020-07-01 18:41:46 +02:00
Sunil Mohan Adapa
af276461fc
Release v20.12 to unstable
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
v20.12
2020-06-29 16:41:18 -07:00
Sunil Mohan Adapa
0a1fff30a7
doc: Fetch latest manual
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-06-29 16:37:38 -07:00
Sunil Mohan Adapa
0800afb58e
locale: Update translation strings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-06-29 15:46:25 -07:00
Sunil Mohan Adapa
8ab551f285
apache: Relax CSP to allow web workers for JSXC
Closes: #1893.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 23:31:03 +03:00
James Valleroy
41dc3b4f96
networks: Correct wording of internet connection form
Change "overtime" to "over time", also matches the other choice in the
form.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-06-29 09:47:09 -07:00
Sunil Mohan Adapa
110ec7d744
apache: Set CSP and other common security headers
Tests performed:

- Fonts Lato is properly and displayed.

- No <frame>, <iframe>, <video>, <audio>, <track>, <embed>, <object>, <applet>
tags are used in FreedomBox source code.

- Checked that there are no images referring to external URLs. Most of the
common images such as apps lists, system list, networks and manual show images
properly.

- Styles specified in main.css work as well as page specific styles such as in
networks. Firefox developer console shows inline styles loaded.

- JSXC is able to make XHR requests to ejabberd.

- Able to launch <a> links with _target='blank' such as in /help/support/.

- When visiting external websites, such as in donate page, Referer header is not
sent. When visiting page within FreedomBox interface, Referer header is sent
with path.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:09:36 +03:00
Sunil Mohan Adapa
c865a1cd89
jsxc: Remove inline javascript
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:09:20 +03:00
Sunil Mohan Adapa
3efff2fa42
js: Simplify auto-refresh page logic
- Implement ability to refresh page at the framework level so that every page
does not need to handle it.

- Refresh after number of seconds specified in context of the view.

Tests performed:

- Trigger the following functions and ensure that page reload after 3 seconds
during the running operation while it does refresh before and after the
operation.
  - Diagnostics tests from the module.
  - Gitweb repository cloning.
  - Monkeysphere publish key to server.
  - OpenVPN setup.
  - Tor configuration update.
  - Manual software update.
  - App installation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:09:04 +03:00
Sunil Mohan Adapa
1b5a10a628
backups: Remove custom handling of progress on the restore button
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:08:47 +03:00
Sunil Mohan Adapa
ff84d3f97e
templates: Disable button and show spinner on submit for all forms
Tests performed:

- Submit a form and notice that button has a spinner soon after click.

- Select a from like Gitweb repository creation form and submit it. After submit
go back to previous form using back button. Notice that button has been restored
to proper state.

- Without filling valid information the form, press submit. Notice that the
button does not change to a spinner.

- Check installing an app, snapshots management, network forms, wireguard forms,
etc.

- Test on Firefox and Chromium.

- Test with LibreJS that the script is accepted as valid free software license.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:08:23 +03:00