5867 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
04a0fd7b78
doc: wikiparser: Show icons with full size
Setting the height to 26 in the XML file results in HTML getting a 16px size.
16x16 is original size of all the icons. This was first proposed with a size of
20 in the original wikiparser MR.

Tests:

- Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox.
Confirm by diffing with manual generated without the code changes.

- Open all affected pages and the full manual page and confirm that images sizes
are 16px (original size).

- Check all affected pages and the full manual page in FreedomBox interface and
confirm that images sizes are 16px (original size).

- Check all affected sections in the generated PDF.

- Repeat tests for English and Spanish manuals.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-15 15:23:27 -04:00
Sunil Mohan Adapa
57c60d9ac6
doc: wikiparser: Use icons from the icons directory
Currently some icons are duplicated between the images/ directory and
images/icons/ directory. De-duplicate and only use the icons from images/icons
directory.

Tests:

- Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox.
Confirm by diffing with manual generated without the code changes.

- Open all affected pages and the full manual page and confirm that images are
loading properly.

- Check all affected pages and the full manual page in FreedomBox interface and
confirm that images are loading properly.

- Check all affected sections in the generated PDF.

- Repeat tests for English and Spanish manuals.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-15 15:23:24 -04:00
Q.-A. Nick
91d96b9f72
upgrades, security: Update the messages describing backports
See https://salsa.debian.org/sunilmohan/plinth/-/merge_requests/1 for discussion
on the topic.

Signed-off-by: Q.-A. Nick <email.bug@arcor.de>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-15 11:22:04 -07:00
Sunil Mohan Adapa
1b7349867e
doc: manual: Fetch latest manual, remove non-existent images/pages
Remove all .raw.wiki files and images (except icons). Then fetch the latest
manual.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-14 23:19:35 -07:00
Fioddor Superconcentrado
4c9e5dbc24
snapshots: Clarify description for disabling yearly snapshots
BTW, choice literals translated.

Close #1937.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-14 15:40:51 -07:00
Fioddor Superconcentrado
43ab6db456
i18n: Mark strings missed for translation
Helps: #1938.

    backups/forms.py:
	- ChoiceField labeled to allow translation.
	- Translation applied to hard coded literals.

    config/forms.py:
	Lazy translation applied to literals that were translated but still
	displayed in english to non-english users.

    diagnostics_results.html:
	Apply translation to results. Use gettext_noop to mark for translation.

    dynamicdns/forms.py:
	Apply translation to choice literals.

    i2p/views.py:
	Lazy translation applied to literals that were translated but still
	displayed in english to non-english users.

    names.html:
	Apply translation to table headers.

    performance/__init__.py:
	Apply translation to description literals.

    radicale/forms.py:
	ChoiceField labeled to allow translation.

    users/forms.py:
	CharField labeled to allow translation.

    QA:
	- Literals visually verified.
	- No errors in py.test-3.
	- Yapf applied (only) to changed files.
	- No remarks by flake8 to changed file.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Separate out the translations]
[sunil: Fix i18n for diagnostics]
[sunil: dynamicdns: Also do i18n for string GnuDIP]
[sunil: searx: Revert an incorrect removal of import]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-14 15:39:19 -07:00
Fioddor Superconcentrado
13998ea977
HACKING.md: Instructions for container-related troubleshooting
A 'Troubleshooting' section added under 'Using Containers' chapter with 2 hints.
References to files and directories were sometimes marked as code sometimes not.
I've standardized them. Bullets in 'Requirements for Development OS' section
visually stress the alternatives.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-14 14:36:35 -07:00
Sunil Mohan Adapa
893ecbed1b
matrixsynapse: Perform a one time conversion to new config format
- This will allow us to remove the code needed for force upgrading. Upgrade code
can be dropped after a while.

- This will ensure that all our users have a single configuration format which
will make future testing easier.

- We can notify the users of a single overwrite now and be assured that in
future, the overwrites of configuration will not happen.

- We don't have to monitor for changes to configuration files in future version
of the package.

- Keep old configuration as a backup file and restore a pristine copy with
--reinstall and --force-confmiss.

Tests:

- Install the app freshly. Configuration file is unchanged, new config snippets
are created. App is running.

- Install the app with code before new configuration changes. Notice that old
configuration format is used. Then switch the code to a branch with current
changes. Setup is automatically executed. The package is reinstalled. After
re-installation, the main config file is restored. Configuration snippets exist.
value of public registration and domain is preserved. Backup file exists with
previous configuration contents.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-14 16:49:54 -04:00
Sunil Mohan Adapa
f59fc5e33b
package: Add ability to reinstall a package
- Also add ability restore missing configuration files during reinstall.

- Reinstall is useful for restoring the original configuration files of the
package.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-14 16:49:51 -04:00
Reg Me
b9e47dcf0b
Translated using Weblate (Dutch)
Currently translated at 73.7% (959 of 1300 strings)
2020-09-14 16:36:14 +02:00
Ralf Barkow
ae0202d87d
Translated using Weblate (German)
Currently translated at 100.0% (1300 of 1300 strings)
2020-09-14 16:36:14 +02:00
James Valleroy
2b4f2aa15f
debian: Temporarily revert source package rename
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-13 19:49:51 -07:00
Sunil Mohan Adapa
271f88d9ed
backports: When upgrading from older version, assumed requested
- This helps the case where an user installs FreedomBox on Buster and then after
finishing the first boot wizard and before repositories have been setup,
upgrades to latest FreedomBox version.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-11 10:55:49 -04:00
Sunil Mohan Adapa
ff4b4414fd
upgrades, security: Use consistent terminology 'activate'
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-11 10:55:42 -04:00
Sunil Mohan Adapa
b12d994760
upgrades: Separate concepts for backports enabled vs. requested
It is confusing to combine the user's intent of wanting to have backports
activated with whether they have actually been configured in the system.

- Separate out checking for requested which is a key in the kvstore from enabled
which is about checking system configuration for backports.

- Implement convenience method for setting whether user requested backports.

- Do not base the status display (in security and upgrades modules) on the
configuration status and instead focus on user intent.

  - If user requested backports but they have not been enabled yet due to not
  being available, show as activated. System will keep trying the background and
  configure eventually.

  - If user requested backports but their configuration is outdated yet due to
  newer release, show as activated. System will keep trying in the background
  and configure latest settings eventually.

- In all places where backports enabling is being checked, split the logic for
'can be activated' from 'already activated' and 'user requested activation'
properly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-11 10:55:10 -04:00
Sunil Mohan Adapa
86de956118
upgrades: Fix issue with checking if backports is current
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-11 10:55:03 -04:00
James Valleroy
d2f6fe9556
upgrades: Use kvstore and then file to determine if backports are enabled
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-11 10:54:57 -04:00
James Valleroy
65d8f82ae1
upgrades: Add first boot step to configure backports
Closes: #1855.

Tests:

- On unstable, first boot step is not shown. Backports are not
  enabled.

- On testing, tested enabling backports at first boot step. Backports
  are enabled.

- On testing, tested not enabling backports. Backports are not enabled
  and can be activated later.

- On testing, confirmed that functional tests can click through the
  first boot step.

- On stable with backports, first boot step is not shown. Backports
  are enabled.

- On stable, tested enabling backports at first boot step. Backports
  are enabled.

- On stable, tested not enabling backports. Backports are not enabled
  and can be activated later.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Avoid two different i18n strings with almost same content]
[sunil: Use box_name instead of hardcoded FreedomBox name]
[sunil: Use consistent terminology 'activate' instead of 'enable']
[sunil: Rename the wizard, form, view, url for consistency with existing code]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-11 10:54:02 -04:00
James Valleroy
2f7b3264d1
upgrades: Display correct backports info for unstable
Backports are not enabled and cannot be activated on unstable.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Add statement that backports may not be necessary]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-09-11 10:53:43 -04:00
James Valleroy
8f4681fd10
upgrades: Change backports activation message wording
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-11 10:53:37 -04:00
James Valleroy
05ca4301b1
matrixsynapse: Use conf.d snippets
Instead of changing original conffile.

Closes: #1787.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 17:00:48 -07:00
Veiko Aasa
c136f27707
gitweb: Add ability to change default branch
Now it is possible to change default branch when editing a repository.

Gitweb site shows default branch as a main branch and the 'git clone'
command checks out to default branch.

Added unit and functional tests. Splitted one large 'test_actions'
into multiple tests.

Tests performed:
- All gitweb unit and functional tests pass.
- Created a repository from a remote repository which has default
  branch other than master. Confirmed that the 'Edit repository'
  page shows correct branch and gitweb site shows this branch as
  a default branch

Closes #1925

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 14:37:17 -07:00
Sunil Mohan Adapa
95c99bf3ce
doc: wikiparser: Reduce build verbosity
- Make begin and end markers the default values in the wikiparser arguments so
that they don't have to passed in every time.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 01:56:31 -07:00
Sunil Mohan Adapa
099d877b8f
doc: wikiparser: Make it easier to run with a #! at the top
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 01:56:28 -07:00
Sunil Mohan Adapa
95452c1313
doc: wikiparser: Fix issue with some URL containing dup. lang part
When getting context in included images, the original context might already have
a language component. Don't add it again if it does.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 01:56:25 -07:00
Sunil Mohan Adapa
0296cfc97f
doc: wikiparser: Fix a minor flake8 issue
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 01:55:50 -07:00
Fioddor Superconcentrado
42037b8330
doc: wikiparser: Resolve URLs for locally available pages
Closes: #1793

resolve_url() now checks for local help pages and shortcuts the links that point
to them to the local copy. Unit doctests have been included also. Expectations
of 2 preexisting tests resulted impacted by the new logic (shortcutted links)
and were adapted accordingly. New doctests unveiled some rough edge of the
previous logic, so the processing of keyword-protocolled links was fine-tuned to
pollish them.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Fixed minor indentation, flake8 issues, styling, comments]
[sunil: Use file exists checking instead of iterating directory]
[sunil: Stricter checking using regex for possible local URLs]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-09 01:55:15 -07:00
Joseph Nuthalapati
d3fd77008e
container: Use builds with build-deps included
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-09-05 16:58:31 -07:00
Sunil Mohan Adapa
50fb524972
firewall: Show port forwarding info contextually
- When port forwarding configuration is not required in the router, don't show
the ports information.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-09-04 16:32:46 +03:00
Sunil Mohan Adapa
f58b5f8962
networks: Expose API to get/set network meta info
- API can be consumed by other apps.

- Consistently, get/set store keys and default values without repeated code.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-09-04 16:32:37 +03:00
Sunil Mohan Adapa
3375ba7d19
kvstore: Allow module to be imported before Django init
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-09-04 16:32:31 +03:00
Sunil Mohan Adapa
495f93af24
firewall: Show port forwarding info in tabular format
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-09-04 16:32:22 +03:00
Sunil Mohan Adapa
4aa8e6da09
firewall: Use service files for showing port forwarding info
- Start showing port ranges properly.

- Fixes issue with Coturn TURN relay ports not being shown.

Closes: #1851.

Tests:

- Visit each of affected apps and see the port forwarding information. The
information is same as before.

- HTTP and HTTPS ports are not shown.

- Coturn app shows additional port ranges for TURN relay ports.

- Shadowsocks app does not show port forwarding information as it is internal
only.

- Visit one of the apps not effected by the patch. There is no section related
to port forwarding.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-09-04 16:31:52 +03:00
Artem
c218f3845f
Translated using Weblate (Russian)
Currently translated at 100.0% (1300 of 1300 strings)
2020-09-03 23:36:09 +02:00
Burak Yavuz
3d48200afa
Translated using Weblate (Turkish)
Currently translated at 100.0% (1300 of 1300 strings)
2020-09-01 20:41:39 +02:00
Fioddor Superconcentrado
aaca2edd99
wireguard: Add 'Learn more...' link for help page
Closes: #1907.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-31 17:24:53 -07:00
Sunil Mohan Adapa
14035f51e7
doc: Fetch latest manual
- To get WireGuard pages.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-31 14:29:10 -07:00
Fioddor Superconcentrado
0d4d3beea3
jsxc, sharing: Add 'Learn more...' link for help pages
Solves #1907 for JSXC and Sharing pages. WireGuard is not yet included in the
manual and missing pages show an ugly error.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Formatted using yapf]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-30 17:04:19 -07:00
Burak Yavuz
987f74ee0b Translated using Weblate (Turkish)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
Diego Roversi
b35379f28a Translated using Weblate (Italian)
Currently translated at 49.3% (641 of 1300 strings)
2020-08-30 20:23:16 +02:00
Fioddor Superconcentrado
79480d331c Translated using Weblate (Spanish)
Currently translated at 98.7% (1284 of 1300 strings)
2020-08-30 20:23:16 +02:00
Johannes Keyser
c333c7bdb3 Translated using Weblate (German)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
Nikita Epifanov
f90f6488b9 Translated using Weblate (Russian)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
Michael Breidenbach
7e08f1d8dc Translated using Weblate (Swedish)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
Burak Yavuz
152154261a Translated using Weblate (Turkish)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
Michael Breidenbach
ffb7d83e58 Translated using Weblate (German)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
Dietmar
f3add3b792 Translated using Weblate (German)
Currently translated at 100.0% (1300 of 1300 strings)
2020-08-30 20:23:16 +02:00
James Valleroy
6a2973f629
debian: Remove unused vars from postinst
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-29 18:31:30 -07:00
James Valleroy
238c0cecd6
debian: Don't show first wizard secret on command line
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-29 18:31:11 -07:00
James Valleroy
822c322d20
apache: Disable mod_status
Prevent leaking private info through Tor onion service or Pagekite.

Tests:

- When starting plinth, apache setup is run. Status module is
disabled, and apache2 is restarted.

- sunil: After upgrade, status page is not available.

- sunil: mod_status is available in stable (2.4.38-3+deb10u3) and
testing/unstable (2.4.46-1).

Closes: #1935.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-29 18:27:25 -07:00