6413 Commits

Author SHA1 Message Date
James Valleroy
4696acccf1
Release v21.4.4 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.4.4
2021-07-16 09:08:38 -04:00
James Valleroy
af1d21ce3b
action_utils: Don't print when unholding freedombox package
Some actions that use this function are expected to output
JSON. Any output from apt-mark can interfere with this.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-07-15 20:22:58 -04:00
James Valleroy
a24fcb2c90
upgrades: Check for held freedombox package daily
Guard against removing a hold while the package manager is busy.

Test:
1. Place hold on freedombox package.
2. Wait 3 minutes in development mode.
   - Package is held.
3. Touch /var/lib/freedombox/package-held.
4. Wait 3 minutes in development mode.
   - Package is not held.
   - Flag is removed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-07-15 20:22:46 -04:00
James Valleroy
967d68cb92
upgrades: Check for held freedombox package in manual update
This is to recover from a situation where the package is held, and
then plinth process is interrupted so it cannot release the hold.

We check for and recover from this situation when installing new apps,
and when running dist upgrade. This provides another way to recover
from the problem, by running manual update.

Tests:

- (normal) No hold on freedombox package, and flag is not set. Run
  manual update. Afterwards, there is no hold, and flag is not set.

- (admin preference) Place hold on freedombox package, but flag is not
set. Run manual update. Afterwards, there is still a hold, but flag is
not set.

- (recovery) Place hold on freedombox package, but flag is
set. Run manual update. Afterwards, there is no hold, and flag is not
set.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-07-15 20:22:33 -04:00
James Valleroy
9c57347931
action_utils: Use flag to indicate freedombox package has been held
In case the plinth process is interrupted, the "finally" block that is
meant to unhold the package may not be executed, and the package will
stay held. The flag is used to indicate this situation, so it can be
resolved the next time apt_hold_freedombox is used.

Tests:

- (normal) No hold on freedombox package, and flag is not set. Install
  any app. Afterwards, there is no hold, and flag is not set.

- (admin preference) Place hold on freedombox package, but flag is not
  set. Install any app. Afterwards, there is still a hold, but flag is
  not set.

- (recovery) Place hold on freedombox package, but flag is
  set. Install any app. Afterwards, there is no hold, and flag is not
  set.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-07-15 20:22:22 -04:00
James Valleroy
eccc355203
action_utils: Separate function to hold freedombox package
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-07-15 20:22:07 -04:00
James Valleroy
3c975660f8
Release v21.4.3 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.4.3
2021-07-07 10:33:55 -04:00
James Valleroy
735e47f348
debian: Ensure fuse gets replaced by fuse3
Apply patch from Andreas Beckmann <anbe@debian.org> for #990758.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-07-06 16:55:33 -04:00
James Valleroy
afd737d956
Release v21.4.2 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.4.2
2021-03-28 10:54:53 -04:00
James Valleroy
5c55610234
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-28 10:54:23 -04:00
Burak Yavuz
d10b22c6ad
Translated using Weblate (Turkish)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-28 09:11:07 -04:00
Kirill Schmidt
7e599958fe
first_boot: Use session to verify first boot welcome step
Closes: #2074

sunil's changes:

- Ensure that secret is not asked for a second time after creating admin user
and logging in (this happens due to discarding of old session and creating new
one).

- Ensure that this logic is not applied to user using FreedomBox images who are
not required to input the first wizard secret.

- Change the name of the session variable for readability.

Tests performed:

- Without the patch, start first boot wizard on the first browser on a
  FreedomBox image (or run the file `base64 < /dev/urandom | head -c 16 | sed -e
  's+$+\n+' > /var/lib/plinth/firstboot-wizard-secret`). Finish the welcome step
  with first wizard secret. Then open a second browser or from another computer
  visit the web interface. The first wizard secret is not asked and user can
  create an admin account.

- Repeat with fresh image again with the patch. To mimic fresh image, one may
  run `sudo rm -f /var/lib/plinth/plinth.sqlite3` and `echo "password" | | sudo
  /freedombox/actions/users remove-user tester`. This time when a different
  browser other than the one that provided the first wizard secret try to access
  the account creation page, a redirection will occur to welcome page. Providing
  the first wizard secret takes the user to account creation page.

- Accessing network first wizard page or internal pages on second browser also
  takes one back to the welcome page.

- Accessing help pages from second browser requires login.

- Accessing account login page from second browser is allowed. After creating
  the account from first browser, second browser can login and continue the
  wizard.

- Clearing cookies in the middle of the wizard takes the user back to welcome
  page.

- Clear cookies in the middles of the wizard. Visit the wizard, go to first boot
  welcome page. Provide secret and the wizard will continue where it was left
  off.

- Clear cookies in the middles of the wizard. Visit the wizard, go to first boot
  welcome page. Access login page, login as admin. Then first wizard secret is
  not asked. First wizard can be continued.

- On a fresh image, simply complete the first wizard. No change to earlier flow
  is noticed. First wizard secret is only asked once at the beginning.

- On a fresh image, remove the file /var/lib/plinth/firstboot-wizard-secret.
  First wizard can be completed without the secret.

[sunil: improvements to original patch by Kirill Schmidt]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-28 09:07:13 -04:00
Reza Almanda
23757db9ec
Translated using Weblate (Indonesian)
Currently translated at 10.6% (155 of 1453 strings)
2021-03-28 09:05:28 -04:00
Michalis
5c76fe89ec
Translated using Weblate (Greek)
Currently translated at 73.5% (1068 of 1453 strings)
2021-03-28 09:05:06 -04:00
nautilusx
108760c39c
Translated using Weblate (German)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-28 09:04:48 -04:00
Burak Yavuz
93ce37808a
Translated using Weblate (Turkish)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-28 09:02:29 -04:00
James Valleroy
80327ad792
Release v21.4.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.4.1
2021-03-13 11:56:46 -05:00
James Valleroy
3dbbd1d642
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-03-13 11:55:23 -05:00
Fioddor Superconcentrado
88f9edc508
Translated using Weblate (Spanish)
Currently translated at 99.9% (1452 of 1453 strings)
2021-03-13 10:58:08 -05:00
Michalis
22ba14ee56
Translated using Weblate (Greek)
Currently translated at 73.0% (1062 of 1453 strings)
2021-03-13 10:58:02 -05:00
Michael Breidenbach
06dc5192a7
Translated using Weblate (Swedish)
Currently translated at 99.9% (1452 of 1453 strings)
2021-03-13 10:57:54 -05:00
Veiko Aasa
631e10c09e
deluge: Fix daemon user not in freedombox-share group after installation
Add the debian-deluged user to the freedombox-share group *before* running
app setup. The app setup process restarts the deluged daemon
after which the process has correct group ownerships.

Tests done in Debian stable and testing dev containers:
- After installing the deluge app, checked from /proc/--process-id--/status that
the deluged daemon process has the freedombox-share group.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-05 17:36:07 -08:00
Veiko Aasa
8df60f596e
deluge, mldonkey, syncthing, transmission: Depend on nslcd.service
Add nslcd.service as a dependency to the services that depend on users
and groups defined in LDAP. deluged, mldonkey-server, syncthing@syncthing
and transmission-daemon services depend on freedombox-share LDAP group.

Closes #2061

Tests done with apps deluge, mldonkey, syncthing and transmission,
in both debian stable and testing dev containers, after applying changes:
- After installing an app and after reboot, the daemon user is a member
of the freedombox-share group.
- Checked with the `systemctl show` command that nslcd.service is added to
After=... dependencies.
- All the functional tests pass (in Debian stable, closed manually
the syncthing usage reporting form - #2059).

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-05 17:33:40 -08:00
Fioddor Superconcentrado
64b3fb98b2
config: Fix tests related to user home directory
Closes: #2014

- test_homepage_mapping_skip_ci: Don't expect fbx to run the test.
- test_homepage_field: Check additional precondition.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Minor refactoring to avoid flake8 warnings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-03-05 16:23:55 -08:00
Burak Yavuz
378b2bdaba
Translated using Weblate (Turkish)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-05 19:50:48 +01:00
ikmaak
f514d6cfa2
Translated using Weblate (Dutch)
Currently translated at 100.0% (1453 of 1453 strings)
2021-03-05 19:50:47 +01:00
Fioddor Superconcentrado
2618d77d93 Generating developer documentation. 2021-03-05 13:12:54 +00:00
Michalis
fef06f1d3c Translated using Weblate (Greek)
Currently translated at 73.4% (1064 of 1449 strings)
2021-03-03 17:50:56 +01:00
Karol Werner
ad184e8bea Translated using Weblate (Polish)
Currently translated at 34.9% (506 of 1449 strings)
2021-03-03 17:50:55 +01:00
Dietmar
45ee9dd4f2 Translated using Weblate (German)
Currently translated at 100.0% (1449 of 1449 strings)
2021-03-03 17:50:55 +01:00
James Valleroy
8f6b6f87a0
Release v21.4 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.4
2021-02-28 21:37:19 -05:00
James Valleroy
2fd66b93f1
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-02-28 20:53:59 -05:00
James Valleroy
bcb2ff1b75
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-02-28 20:15:59 -05:00
Sunil Mohan Adapa
52b2c17ec3
matrix-synapse, coturn: Fix minor pipeline failures
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-28 17:08:55 -08:00
Joseph Nuthalapati
b7007eb873
matrix-synapse: Update description to talk about TURN configuration
Sunil:

- Minor update to the TURN server message.

- Drop updating the FAQ link since there may not be much time for translators to
translate the changed message due to our current release schedule. The old link
still works.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-28 16:28:56 -08:00
Joseph Nuthalapati
2ffde1b646
matrix-synapse: Auto configure STUN/TURN using coturn server
- Matrix Synapse will automatically pick up the locally installed coturn server
during its installation. This handles only the case where coturn is installed
and configured with a valid TLS domain name before matrix-synapse is installed.

- Allow overriding STUN/TURN config. Matrix Synapse uses the local coturn
server's configuration by default. However, an administrator can override the
STUN/TURN configuration from FreedomBox web interface. Allow administrator's
overrides to co-exist with FreedomBox's managed STUN/TURN configuration.
Administrator's configuration, if it exists, always overrides FreedomBox's
managed configuration. Any updates to FreedomBox's managed configuration will
have no impact on the administrator's configuration since the latter takes
precedence.

Sunil:

- Collapse multiple turn actions into a single one for simplicity. Sending empty
configuration means removal of the configuration.

- Ensure that when removing configuration file is idempotent.

- Manage TURN configuration even when app setup is not yet completed. This fixes
issue with TURN configuration not getting setup on app installation and setup.

- Fix issue with TURN configuration getting updated on form submission even when
the field is not changed. This is due to mismatch between the browser submitted
\r\n with the internal \n.

- Simplify JavaScript for the form and attach handlers only after DOM is ready.

- Drop the no-JS message since the loss of functionality is trivial and to
reduce translation burden.

- Fix issue with URIs and secret parameters not getting updated unless the
managed checkbox changes.

- Drop specialized success messages for TURN configuration update to reduce
translation burden.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-28 16:28:53 -08:00
Joseph Nuthalapati
fd4339aef4
coturn: Remove advanced flag, make app visible to all
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-28 16:28:49 -08:00
Joseph Nuthalapati
6e93633584
coturn: Minor refactor view to use utility to generate URIs
Sunil:
 - Join the string in the template instead of the view.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-28 16:28:46 -08:00
Joseph Nuthalapati
ceacde67b9
coturn: Add new component for usage of coturn by other apps
Sunil:

 - Add TurnConfiguration to reference documentation. Add more details in
 docstrings.

 - Rename the component to TurnConsumer since 'Component' in the name is
 redundant and unconventional. Also, hopefully, the component will retain the
 API over multiple TURN servers.

 - Log when notifying other components about configuration change.

 - Use TurnConfiguration class more widely.

 - Refactor for simplicity.

 - Additional tests.

 - Move URI generation code into TurnConfiguration.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-02-28 16:28:41 -08:00
James Valleroy
db993ecb16
upgrades: Disable searx during dist-upgrade
Avoid high CPU usage due to uwsgi continuously restarting before searx
config is upgraded.

Helps #1644.

Tests: Ran dist-upgrade for each case:

- Without searx installed -> no log messages related to searx.

- With searx installed but not enabled -> searx config is upgraded.

- With searx installed and enabled -> searx is disabled, later config
  is upgraded, and searx is re-enabled. Searx page can be accessed at
  the end.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-02-24 11:34:25 +02:00
Kornelijus Tvarijanavičius
826b20c1d9
Translated using Weblate (Lithuanian)
Currently translated at 0.2% (4 of 1449 strings)
2021-02-22 11:50:50 +01:00
Dietmar
09e11b85a7
Translated using Weblate (Italian)
Currently translated at 54.2% (786 of 1449 strings)
2021-02-20 23:50:29 +01:00
Benedek Nagy
00ff50e483
Translated using Weblate (Hungarian)
Currently translated at 89.2% (1293 of 1449 strings)
2021-02-19 16:50:45 +01:00
Dietmar
fea671e872
Translated using Weblate (German)
Currently translated at 100.0% (1449 of 1449 strings)
2021-02-19 16:50:45 +01:00
Sunil Mohan Adapa
864de1be42
ui: Fix buttons jumping on click in snapshots page
Fixes: #2049.

This is regression introduced by me in 213cf16f8daa66dbfd3c761a61483c959c753559.
Although this case was tested for regression, the test setup was incorrect.

Tests:

- In networks page to details of a connection, the Delete button is aligned to
the right.

- In snapshots page, the Create Snapshot button is aligned to the left and
Delete Snapshots button is aligned to the right. Clicking on the buttons does
not change their position.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-02-18 18:07:52 -05:00
Michael Breidenbach
013a91ed5d
Translated using Weblate (Swedish)
Currently translated at 100.0% (1449 of 1449 strings)
2021-02-16 05:50:29 +01:00
Dietmar
f13be05bc5
Translated using Weblate (Italian)
Currently translated at 54.1% (785 of 1449 strings)
2021-02-16 05:50:28 +01:00
Coucouf
086f5752a2
Translated using Weblate (French)
Currently translated at 100.0% (1449 of 1449 strings)
2021-02-16 05:50:28 +01:00
Dietmar
dd023a3e3f
Translated using Weblate (German)
Currently translated at 99.9% (1448 of 1449 strings)
2021-02-16 05:50:27 +01:00
James Valleroy
d6e75a1250
plinth: Disable start rate limiting for service
Allow plinth service to restart an unlimited number of times, with 5
seconds delay.

Test:

- After introducing an error in plinth startup code, the service is
  restarted every 5 seconds without limit.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-02-15 11:46:26 +02:00