5461 Commits

Author SHA1 Message Date
James Valleroy
e522bcbf22
debian: Use debhelper compat level 13
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 20:02:16 -04:00
James Valleroy
47b03168ef
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 20:01:29 -04:00
Sunil Mohan Adapa
b1fd0c93dc
datetime: Disable diagnostics when no tests are available
Closes: #1846

Tests:

- When systemd-timesyncd is running, 'Run Diagnostics' button is shown and two
diagnostics results are shown. The two results appears on the diagnostics app
results too.

- When systemd-timesyncd is not running, 'Run Diagnostics' button is not shown.
Datetime app is not included the diagnostics app page results.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 19:48:43 -04:00
Sunil Mohan Adapa
1b6c2e60c0
mediawiki: Partial fix for installing on testing
This is workaround for /usr/bin/php pointing to a different version than what
php-defaults (and php-mbstring, php-xml) points to. See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959742

Tests performed:

- On unstable, install MediaWiki and open the web interface.

- On testing, install MediaWiki and open the web interface.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 19:21:28 -04:00
Sunil Mohan Adapa
ce23f07e92
datetime: Don't expect synced time in diagnostics inside VMs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 18:46:29 -04:00
Sunil Mohan Adapa
57daf338c8
datetime: Refactor handling systemd-timesyncd not running in VMs
- Merged the two DateTimeApp classes. In future, we will remove all
module.init() methods in favor of automatically performing the operations from
module_loader.

- Also fix an error running './run --list-dependencies' when running without
systemd support inside a test case container:

   ERROR plinth.module_loader Exception while running init for <module 'plinth.modules.datetime' from '/builds/sunilmohan/plinth/plinth/modules/datetime/__init__.py'>: Command '['systemctl', 'show', '--property=ConditionResult', '--value', 'systemd-timesyncd']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/builds/sunilmohan/plinth/plinth/module_loader.py", line 123, in _initialize_module
    init()
  File "/builds/sunilmohan/plinth/plinth/modules/datetime/__init__.py", line 77, in init
    if _is_time_managed():
  File "/builds/sunilmohan/plinth/plinth/modules/datetime/__init__.py", line 112, in _is_time_managed
    output = subprocess.check_output([
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['systemctl', 'show', '--property=ConditionResult', '--value', 'systemd-timesyncd']' returned non-zero exit status 1.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
CC: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 18:46:22 -04:00
James Valleroy
b1780f5e09
snapshot: Fix title
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-04 15:20:20 -07:00
James Valleroy
9ed61200f2
snapshot: Fix message when not available
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-04 15:20:03 -07:00
James Valleroy
941142f241
data: Print hostname and IP addresses before console login
- Incorporate changes proposed by Sunil.

Closes freedom-maker#60.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-03 08:08:01 -04:00
Sunil Mohan Adapa
b4e6c03bd7
coturn: New app to manage Coturn TURN/STUN server
- Shows URLs and shared secret that communication servers like matrix-synapse
should be configured to. Later we will implement auto-configuring those servers.

- Allow selecting domain for the sake of TLS/DTLS certificate installation.

- Simplify systemd service file options. Drop log file and pid file support as
they are not needed with systemd. Add security options.

- Set custom configuration file by overriding systemd service file options so
that we don't have a problem with conffile prompts.

- Implement functional tests (and automatic diagnostics).

- Custom icon selected from the Noun project as Coturn project does not have
one.

- Backup/restore configuration file and certificates.

- Document some questions regarding configuration options.

Tests performed:

- App is not listed in the app page if 'advanced' flag is disabled.

- App name, icon and short description shows up correctly in apps page.

- App name, icon, short description, description, manual link, enable/disable
button and diagnostics link show up currently in app page.

- Verify that configuration used by coturn server is the FreedomBox
configuration by checking the cert path in the log output.

- PID file is not created in /var/run/turnserver/. It goes into /dev/null
according to the log output.

- No log file is created other than what is collected by systemd from command
line.

- systemctl show coturn.service shows all the intended restrictions such as
NoNewPrivileges, Protect* options.

- Run functional tests.

- Ensure that backup of configuration file works by taking backup, changing the
secret and restoring. During backup and restore coturn should be stopped and
started as per logs.

- Build Debian package. No warnings about the copyright file.

- Enabling the app enables the service and runs it.

- Disabling the app disables the service and stop it.

- All diagnostics tests pass.

- Diagnostic tests show firewall port coturn-freedombox for internal and
external networks, service coturn, and each listening port for udp4, udp6, tcp4
and tcp6.

- Information in the firewall page shows up properly. Enabling the app opens
firewall ports, and disabling it closes them.

- When the app is installed, if a cert domain is available, it will be used.
When multiple domains are available, one of them is picked.

- Status shows 4 URLs with the currently selected domain and secret key.

- Changing domain to another domain succeeds and reflects in the status
information.

- When no domain is configured. Installing the app succeeds. No domain is shown
in the list of domains.

- When domain is changed, the certificates files in /etc/coturn/certs are
overwritten.

- Certificates have the ownership turnserver:turnserver. Public key is cert.pem
has 644 permissions. Private is pkey.pem has 600 permissions. /etc/coturn/certs
is owned by root:root.

- Let's encrypt certificates are setup immediately after install.

- Port forwarding information shows all ports except for relay ports.

- Trying to create a user with username 'turnserver' throws an error. This
happens even when coturn is not installed yet.

- After installing coturn, the configuration file /etc/coturn/freedombox.conf is
created with ownership root:turnserver and permissions 640. The directory
/etc/coturn is created with ownership root:root and permissions 755.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix copied form_valid comment]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-02 18:51:23 -04:00
fred1m
efe84419b1
mumble: Add Mumla to the list of clients
* `py.test-3 plinth/modules/mumble/manifest.py` said only two warnings
(could not create cache path {path})

* `sudo -u plinth /vagrant/run --develop` and https://localhost:4430/ had
show me what I expected

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-02 12:50:24 -07:00
Michael Breidenbach
c01a04a31d Translated using Weblate (Swedish)
Currently translated at 100.0% (1257 of 1257 strings)
2020-05-02 10:11:56 +02:00
Nathan
ef60238be9 Translated using Weblate (French)
Currently translated at 100.0% (1257 of 1257 strings)
2020-05-02 10:11:56 +02:00
Luis A. Arizmendi
1e29f7da0e Translated using Weblate (Spanish)
Currently translated at 100.0% (1257 of 1257 strings)
2020-05-02 10:11:56 +02:00
Anonymous
a0dea36da6 Translated using Weblate (Spanish)
Currently translated at 100.0% (1257 of 1257 strings)
2020-05-02 10:11:56 +02:00
Joseph Nuthalapati
00d33aa37a
HACKING: Correction to macOS package manager name
Homebrew is the correct name of the package manager, not Brew.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-01 08:07:03 -07:00
Joseph Nuthalapati
6fa752b7c5
HACKING: More detailed instructions for VirtualBox
Add more detailed instructions for installing VirtualBox manually on
Debian and its derivatives.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-01 08:06:32 -07:00
Sunil Mohan Adapa
c69c5f8317
ci: Update link to container in Docker registry
Move Gitlab docker related files to .ci folder

Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-05-01 17:15:48 +05:30
Sunil Mohan Adapa
16202e6f3a
*: Update links to repository and project page
- The repository has been renamed from 'plinth' to 'freedombox'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-05-01 17:14:23 +05:30
Veiko Aasa
4d59713d79
minidlna: Make app installable inside unprivileged container
Use systemd-sysctl to reload sysctl configuration which ignores
fs.inotify.max_user_watches parameter inside unprivileged
container.

Closes #1830

Tests performed:

- Install minidlna using FreedomBox on KVM virtual machine. Installation
succeeds and the max_user_watches parameter
`cat /proc/sys/fs/inotify/max_user_watches` has changed.

- Install minidlna using FreedomBox on unprivileged systemd-nspawn container.
Installation succeeds (and the max_user_watches parameter hasn't changed).

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-04-29 21:14:21 -07:00
Veiko Aasa
40ac492a87
minidlna: Add functional tests that enable and disable application
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
2020-04-29 20:56:37 -07:00
Sunil Mohan Adapa
1f0552c66f
HACKING: Minor indentation fix 2020-04-29 20:51:18 -07:00
Fioddor Superconcentrado
c77b90bf8c Directions to install VirtualBox when it's not part of the Debian-based distro, like Buster. 2020-04-28 12:08:32 +00:00
nautilusx
0f850f6821
Translated using Weblate (German)
Currently translated at 100.0% (1257 of 1257 strings)
2020-04-27 18:11:16 +02:00
Artem
579600b0a7
Translated using Weblate (Russian)
Currently translated at 75.4% (949 of 1257 strings)
2020-04-25 16:11:15 +02:00
Joseph Nuthalapati
d5a3c7f4cd
Translated using Weblate (Telugu)
Currently translated at 65.3% (821 of 1257 strings)
2020-04-25 16:11:15 +02:00
Veiko Aasa
7d77a26761
datetime: Handle timesyncd service runs conditionally
systemd-timesyncd service does not run if we have another NTP daemon installed
or FreedomBox runs inside a container where the host manages the time. In this
case, make the application as unmanaged - app can't be disabled, no app
diagnostics is shown and enable/disable functional tests are skipped.

Closes #1616

Tests performed:
- Run FreedomBox inside a KVM virtualization module, check that
  systemd-timesyncd is running, datetime app can be disabled and all
  diagnostics and date_and_time functional tests pass.
- Run FreedomBox inside a systemd-nspawn container, check that
  systemd-timesyncd is not running, datetime app can't be disabled,
  the diagnostics button is not shown and two date_and_time functional tests
  are skipped.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-25 09:56:00 -04:00
Sunil Mohan Adapa
a327bf650b
storage: Fix tests by wrestling with auto-mounting of disks
- Also properly cleanup mounted file systems.

- When a file system is created, it is automatically mounted by udiskie (or
FreedomBox itself). This leads loop back setups not getting cleaned and btrfs
check failing to check a mounted disk. Force check in case of btrfs and umount
ignoring errors before cleanup.

Closes: #1839.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-25 08:04:30 -04:00
James Valleroy
41498ba9f6
d/copyright: Fix path to visual_design
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:15:58 -04:00
Sunil Mohan Adapa
ff44a7de5a
static: Don't ship visual design file and unused images
- Move all the unused image files into doc/visual_design directory.

- Reduces the size of the shipped .deb binary significantly.

Closes: #1840.

Tests performed:

- Ensure that each of the files moves are not referenced anywhere in the source
code.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:10:02 -04:00
Sunil Mohan Adapa
68132f5dce
setup.py: Don't install/ship .po files
- These files are not necessary for the running of the program. Only .mo files
are referenced by gettext library at runtime.

- This reduces the size of the .deb binary.

Tests performed:

- Build Debian packages. Upgrade on a stable setup. Switch language to Spanish
and notice UI strings in Spanish.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:59 -04:00
Sunil Mohan Adapa
858c270b49
mediawiki: Reuse existing images in functional tests
Tests performed:

- Re-run mediawiki functional tests

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:56 -04:00
Sunil Mohan Adapa
e745031ab2
static: Reduce the size of the background noise image
Instead of tiling a 512px x 512px image, use 128px x 128px. The different is not
noticeable. Reduces the web page size for all pages by 120KiB. Also reduces the
shipped package size.

Tests performed:

- Visually compare the web page before and after the change. Notice no
difference.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:54 -04:00
Sunil Mohan Adapa
2526c98de6
static: Use SVG logo during first wizard welcome step
- This removes the need to ship a 67K file and scales better.

- Rename the file to have lowercase chars only for consistency.

Tests performed:

- Goto home page, see the logo at the bottom properly displayed.

- Goto the first wizard welcome page, notice that the logo is displayed. Also
the dimensions of the image are same as without the change.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:51 -04:00
Sunil Mohan Adapa
af5e0e1b24
debian: Remove timer to setup repositories properly
When removing systemd services, dh_installsystemd has no idea about services
present in the older versions that been removed. So, it generates no handling
scripts for those services. No convenience methods exist too.

dh_installsystemd uses deb-systemd-helper which maintains state files in
/var/lib/systemd/deb-systemd-helper-enabled/*.dsh-also. These files need to
removed apart from symlinks created in /etc/systemd/system enable services are
enabled. If the service/timer is currently running, stop it too.

Use deb-systemd-helper and deb-systemd-invoke to achieve this.

Closes: #1835

Tests performed:

- Install a freedombox version older than 20.5. Upgrade to 20.5. Notice the
incorrect symlink
/etc/systemd/system/multi-user.target.wants/freedombox-setup-repositories.timer
and also the state file
/var/lib/systemd/deb-systemd-helper-enabled/freedombox-setup-repositories.timer.dsh-also
Then upgrade to a .deb packages built with the patch. The two files will be
removed. No extra messages are warnings are printed during package upgrade.

- Install a freedombox version older than 20.5. Upgrade to .deb packages built
with this patch. Notice the same results.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 15:45:01 -04:00
Sunil Mohan Adapa
05670257fd
web_server: Suppress warnings that static directories don't exist
When JSXC is not installed, currently we get warnings that jsxc directories are
not found when we start the web server.

Suppress warning that some of the static directories don't exist. Since there is
no way to add/remove those tree mounts at will, we need to add them all before
hand even if they don't exist now. If the directories becomes available later,
CherryPy serves them just fine.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-04-24 10:52:47 +03:00
Veiko Aasa
2d963ec461
users: Try-restart service after service is added to the sharing group
Try-restart the service (instead of restart) after adding service to the
freedombox-share group to avoid starting the service if app is disabled.

Tests performed:
- Remove syncthing user from the freedombox-share group, disable
  syncthing app, increase app version. After the app is upgraded,
  verify that syncthing user is in the freedombox-share group and
  syncthing@syncthing.service remains disabled.
- Remove syncthing user from the freedombox-share group, enable
  syncthing app, increase app version. After the app is upgraded,
  verify that syncthing user is in the freedombox-share group and
  logs show that syncthing@syncthing.service was restarted.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-04-23 11:21:01 -07:00
Nektarios Katakis
4187a19c34
syncthing: add to freedombox-share group
Closes: #1808

Test performed:
- Install samba in development VM and create open share (owned from root:freedombox-share).
- install syncthing and create syncronization folder in the above openshare.
- Sync files from desktop peer to development VM one on the above folder.

Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-04-23 13:58:07 +01:00
Joseph Nuthalapati
1b3359faf7
Translated using Weblate (Telugu)
Currently translated at 65.2% (820 of 1257 strings)
2020-04-23 09:11:17 +02:00
Luis A. Arizmendi
faf9257bdd
Translated using Weblate (Spanish)
Currently translated at 100.0% (1257 of 1257 strings)
2020-04-23 09:11:17 +02:00
James Valleroy
167895b537
Release v20.7 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v20.7
2020-04-20 18:39:06 -04:00
James Valleroy
7cc84f4331
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-20 18:12:00 -04:00
James Valleroy
5efe523bec
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-20 17:54:31 -04:00
Fioddor Superconcentrado
fa4d9fe283 Clarifications: source directory within VM, and prompts marking where the commands must be executed (host or VM). Plus, some code decorations enabled (by providing languaje). 2020-04-20 16:14:17 +00:00
James Valleroy
0d059b7553
matrixsynapse: Handle upgrade to 1.12.*
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-04-19 16:46:48 -07:00
James Valleroy
6d1c637c1d
upgrades: Allow installation of python3-twisted from backports
- matrix-synapse >= 1.12 requires python3-twisted >= 18.9.0-8~.

- python3-twisted requires matching version of python3-twisted-bin.

- Increment upgrades module version.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-04-19 11:23:59 -07:00
Veiko Aasa
d26e87661b
gitweb: Improve error handling when creating repository
If an error occurs during creation of a git repository, delete possibly
corrupted git repository directory and show more specific error message.

Closes #1829

Tests performed:
- Gitweb unit and functional tests pass
- Create a small disk for git repositories:
  > dd if=/dev/zero of=disk.img iflag=fullblock bs=128k count=100 && sync
  > mkfs.ext4 disk.img
  > mount -o loop disk.img /var/lib/git/
- Clone a large repository https://salsa.debian.org/freedombox-team/plinth
  Disk got full during cloning remote repository. Repository listing do not
  show this repository anymore. (No errors is shown to the user.)
- Fill disk space:
  > head -c 1G </dev/urandom > /var/lib/git/myfile
- Disk is full. Cloning an existing remote repository fails with an error
  message (No space left on device)
- Disk is full. Creating a new repository fails with an error message
  (No space left on device)

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-18 15:23:11 -04:00
Joseph Nuthalapati
202980b6d5
Translated using Weblate (Telugu)
Currently translated at 64.9% (816 of 1257 strings)
2020-04-15 15:11:14 +02:00
Localisation Lab
4a435f0ca0
Translated using Weblate (French)
Currently translated at 100.0% (1257 of 1257 strings)
2020-04-15 15:11:14 +02:00
vihor
14b4c6b795
Translated using Weblate (Serbian)
Currently translated at 11.2% (141 of 1257 strings)
2020-04-13 07:34:40 +02:00