5503 Commits

Author SHA1 Message Date
James Valleroy
10924a1dca
Release v20.9 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v20.9
2020-05-18 19:43:25 -04:00
James Valleroy
eac1256b4b
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 19:42:28 -04:00
James Valleroy
3da46d40b9
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 18:39:09 -04:00
Artem
d31ee29d0e
Translated using Weblate (Russian)
Currently translated at 74.8% (946 of 1264 strings)
2020-05-19 00:17:52 +02:00
Luis A. Arizmendi
6e32ae9045
Translated using Weblate (Spanish)
Currently translated at 100.0% (1264 of 1264 strings)
2020-05-19 00:17:52 +02:00
Sunil Mohan Adapa
f74ca9044a
performance: Launch the Cockpit graphs directly if possible
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 18:13:21 -04:00
Sunil Mohan Adapa
d93de4fa61
upgrades: Add information about service restart and system reboot
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-18 14:28:03 -07:00
Sunil Mohan Adapa
6ee60647c9
upgrades: Always schedule a reboot at 02:00 local time
Test:

- Downgrade kernel (linux-image-amd64) to earlier version.
- Reboot into the older kernel.
- Remove the newer kernel package.
- Run FreedomBox in develop mode.
- Run unattended-upgrades --debug to upgrade all packages.
- At the end a message is printed that shutdown is scheduled.
- Check /run/systemd/shutdown/scheduled file and see that microseconds since
  epoch is set to tomorrow 02:00 local time.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-18 14:28:00 -07:00
James Valleroy
7c38dad03d
upgrades: Enable Automatic-Reboot option of unattended-upgrades
Closes #654.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-18 14:27:52 -07:00
James Valleroy
0b5c195e17
upgrades: Add needrestart to restart services as needed
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-18 14:27:28 -07:00
Sunil Mohan Adapa
935db83d8b
tor: Fix stopping server during backup/restore
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 13:47:28 -04:00
Sunil Mohan Adapa
664067aa13
quassel: Fix stopping server during backup/restore
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 13:47:25 -04:00
Sunil Mohan Adapa
e66988840b
mumble: Stop server during backup/restore
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 13:47:22 -04:00
Sunil Mohan Adapa
317b5207f6
minidlna: Stop daemon during backup/restore
Backup and restore the configuration file too.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 13:47:20 -04:00
Sunil Mohan Adapa
74dac0b49d
mediawiki: Stop jobrunner during backup/restore
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 13:47:16 -04:00
Sunil Mohan Adapa
d44283d9ba
minidlna: cosmetic: isort fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 08:49:31 -04:00
James Valleroy
3c85846fa2
minidlna: Move sysctl config to /etc/sysctl.d/50-freedombox.conf
/etc/sysctl.conf is owned by procps package.

Test: Run minidlna install on fresh image.
- /etc/sysctl.conf is not modified.
- /etc/sysctl.d/50-freedombox.conf has the expected content.
- /proc/sys/fs/inotify/max_user_watches contains 100000.

- Running with these changes upgrades app version and triggers a setup. Changes
in /etc/sysctl.conf are removed. After undoing the changes /etc/sysctl.conf is
identical to pristine version installed from procps package. This can be
obtained by running; rm -f /etc/sysctl.conf ; apt install --reinstall procps -o
Dpkg::Options::=--force-confmiss

Closes #1802.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Undo changes done in /etc/sysctl.conf in older versions]
[sunil: Increment app version to trigger configuration migration]
[sunil: Ensure that app is not re-enabled during migration]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-18 08:49:24 -04:00
Sunil Mohan Adapa
0b1219a90c
first_setup: Fix regression with logo not showing
Logo is not shown when first setup is running in the background and the first
setup busy page is shown. This is a regression when PNG logos were moved to a
different folder.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-17 17:36:55 -04:00
Sunil Mohan Adapa
4dfa9436b1
power: cosmetic: Fix flake8 warnings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-17 17:36:52 -04:00
Sunil Mohan Adapa
355b2be90e
package: Fix error log when checking if package manager is busy
Reuse the method in package.py that checks is package manager is busy without
printing and error log.

Tests performed:

- Try to install a package and wait at the apt confirmation prompt.

- Go to power index page /sys/power/ . It shows a warning that package manager
is busy. No error log is printed.

- Go to system restart page. It shows a warning that package manager is busy. No
error log is printed.

- Go to system poweroff page. It shows a warning that package manager is busy.
No error log is printed.

- Without package manager being busy, above warnings are not shown.

- Go to manual update package. It shows as updating if apt is busy, otherwise
shows the manual update button.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-17 17:36:49 -04:00
James Valleroy
dbf70b9fef
quassel: Use systemd sandboxing features
Tests:
- Installed Quassel and diagnostics are passed.
- Quassel client connection is successful.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Remove RemainAfterExit=no as it is default]
[sunil: Remove ReadWritePaths= as {Logs|State}Directory= take care of it]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-17 13:41:13 -07:00
Sunil Mohan Adapa
e51d027618
storage: Auto-mount disks, notify of failing disks
- Remove freedombox-udiskie.service file. Don't run udiskie anymore. Use our own
implementation of auto-mounting.

- Schedule disk failure checking to 3 seconds after application initialization.
Also perform auto-mounting at that time.

- Listen to new filesystems added and auto-mount them.

- Listen to disk failing attribute and report to user via a notification.

- Add rules to polkit-1 to allow plinth user to mount drives.

- Add simple abstractions over DBusProxy objects make accessing properties
simpler.

- Replicate udiskie's approach to mounting disks.

- Mount as root user for now using command line instead of DBus API. This is to
keep compatibility with older code that mounted under /media/root with relaxed
permissions.

Udiskie analysis:

  - On device added, media added, perform auto_add
  - On device changed and is addable and old state is not addable or removeable
  - Automount condition:
    - Matches configuration
    - Not ignored
    - is_filesystem and not mounted -> mount
    - crypto device -> try unlock -> if success, mount
    - is partition table
      - Get all non-ignored devices, if partition then mount
  - Mount condition:
    - Is not ignored
    - Is filesystem
    - Find device with path
    - Get options from configuration
    - Is ntfs and executable ntfs-3g is not available
    - Call mount
  - No support for udisks1
  - Built-in rules
    - {'symlinks': '/dev/mapper/docker-*', 'ignore': True}
    - {'symlinks': '/dev/disk/by-id/dm-name-docker-*', 'ignore': True}
    - {'is_loop': True, 'is_ignored': False, 'loop_file': '/*', 'ignore': False}
    - {'is_block': False, 'ignore': True}
    - {'is_external': False, 'is_toplevel': True, 'ignore': True}
    - {'is_ignored': True, 'ignore': True}

Tests performed:
  - Create a CDROM in VM, inject media. Disk should get mounted.
  - Create a temp file. mkfs.ext4 it at top level. losetup it. It should not get
    auto mounted as it is a top level internal device.
  - Create a temp file. Create two partitions and format the partitions. kpartx
    -a on it. Both the file systems should get mounted.
  - Create a temp file. luksformat it. Create a filesystem. luksopen the file.
    It should get auto mounted.
  - Checking for disk space repeatedly happens every 3 minutes.
  - Drives are checked for healthy status only once, 3 seconds after FreedomBox is started.
  - FreedomBox is able to mount disks while running as 'plinth' user with
    policykit-1 version 0.105-26.
  - FreedomBox is able to mount disks while running as 'plinth' user with
    policykit-1 version 0.116-2 from experimental.
  - Temporarily flip the is_failing condition in report_failing_drive. When
    FreedomBox is restarted, notification about drives failing show up. When the
    condition is reverted to normal, the notification is withdrawn.
  - Build new Debian package and upgrade system with 20.8 installed. Two files
    should be removed:
    /var/lib/systemd/deb-systemd-helper-enabled/freedombox-udiskie.service.dsh-also
    /etc/systemd/system/multi-user.target.wants/freedombox-udiskie.service .
    systemctl status freedombox-udiskie.service should report no such unit.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-05-16 11:42:23 +03:00
Sunil Mohan Adapa
b3663075a0
notification: Expand and clarify restriction on id property
- This is to allow arbitrary strings to be part of id property via base32
encoding.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-15 18:00:53 -07:00
Sunil Mohan Adapa
6216f7872c
glib: Allow scheduling non-repeating tasks in separate threads
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-15 18:00:49 -07:00
Joseph Nuthalapati
8b721a27ef
functional-tests: Move Disable tests to the end
Disabling an application at the end of test suite frees us system
resources for the remaining applications.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-12 18:27:50 -07:00
Joseph Nuthalapati
adc1c67e12
functional-tests: Skip network setup wizard
Fixes #1781

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Update to work with latest code]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-12 17:50:06 -07:00
Sunil Mohan Adapa
55f4573e93
firewall: Reload firewalld so it works with newly installed services
firewalld has no problem retrieving service information for just-installed
files, it only fails when adding/removing those services to zones. A reload is
needed before those services can be used.

Don't perform firewalld reload during setup.py or debian/postinst. Instead
reload when firewalld throws an error that it does not know a service. This
approach is more minimally intrusive and does not run reload operations when no
services need to be loaded, during Debian package building etc.

Closes: #376.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-12 10:59:55 -04:00
Sunil Mohan Adapa
b763391dfb
daemon: bind: cosmetic: yapf, isort formatting
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-12 08:11:30 -04:00
Sunil Mohan Adapa
e3228467f3
bind: Add daemon alias for bind9 -> named
bind9 package version 1:9.16.1-2 in unstable renamed bind9.service to
named.service. The new service file contains Alias=bind9.service. Use this
support multiple versions of the package across Debian stable, testing and
unstable.

Closes: #1816.

Tests performed:

- Enable the service. 'service enable bind9' is called but fails with error
ignored. 'service enable named' is also called but succeeds. Running 'service
is-enable bind9' and 'service is-enabled named' return success. App page show
enabled, there are no errors on the page.

- When app is enabled, there is no message that service is not running.

- When diagnostics are run, it shows that bind9 service is running.

- Disable the app. 'service disable bind9' is called. Running 'service is-enable
bind9' and 'service is-enabled named' return errors. App page shows disabled,
there are no errors.

- Repeat tests on Debian stable.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-12 08:11:26 -04:00
Sunil Mohan Adapa
6d2f4b6cea
daemon: Allow using an alias when enabling a daemon
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-12 08:11:23 -04:00
Sunil Mohan Adapa
7f7b5b4e67
performance: Add basic functional tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-11 22:26:45 -07:00
fred1m
e465645594
performance: Add app for system monitoring
- Using cockpit-pcp in ‘System’ section.

Signed-off-by: fred1m <frederic.le-meur@ac-versailles.fr>
[sunil: Minor grammar fix in description, minor styling]
[sunil: Drop the icon completely in favor of just the font icon]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-11 22:15:12 -07:00
Joseph Nuthalapati
c624538788
samba: Change description to Network File Storage
Discussion on the forum:
https://discuss.freedombox.org/t/what-is-samba-app/699

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-11 20:18:57 -07:00
James Valleroy
c8b2cc0b8e
functional_tests: snapshot: Skip delete all when there are no snapshots
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-11 21:46:06 -04:00
Sunil Mohan Adapa
20f2ff9370
snapshot: Fix issues with restore and delete
- Avoid no-response error when deleting a snapshot. This is caused when disk is
full and delete operation tries to store data in session which is stored on
disk. The session update fails and there are no values to delete. This case in
not handled and return a None in view causing a 500 error. Use GET params
instead.

- Delete all functionality that is meant to speed up deleting snapshots has
regressed and is currently never used. Further, there are more types of
snapshots that can't be deleted that needs to be handled in delete all
functionality. Drop it for now.

- When snapper list is run the snapshot number can contain '-', '+' or '*'
suffixed to it. Currently only '*' is handled. This leads to failure in listing
the snapshots after a restore snapshot'. Fix this is properly parsing. Also it
is no longer needed to query 'btrfs' command to know the snapshot that will
used at next boot. '+' or '*' means that.

- Don't list snapshot number '0'. It is never listed to the user and it can
never be deleted. It represents the current system.

- Properly implement checking for default and active snapshots. Don't let delete
operation on either of them.

- Fix regression with disabling the delete button when there are no snapshots
that can be deleted.

Tests performed:

- Before any snapshot is restored, the labels 'will be used at next boot' and
'in use' are not shown. Snapshot with number 0 is not shown.

- Immediately after restoring a snapshot, the 'will be used at next boot' label
will shown up on snapshot that is going to boot next.

- After rebooting after restore, the snapshot that has been restored will show
'will be used at next boot' and 'in use' labels. Restoring another snapshot will
move the 'will be used at next boot' label to the new restore snapshot but keep
the 'in use' label on the current snapshot until next reboot. Snapshot with
number 0 is not shown.

- Delete check boxes are not shown against the 'in use' and 'will be used at
next boot' snapshots. Entering their values manually in the URL in the delete
screen will lead them to be ignored.

- Select multiple snapshots and click delete. The details appear properly in the
confirmation window. Deleting will delete the snapshots.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-11 21:44:39 -04:00
Fioddor Superconcentrado
9c4431ec16 Folder remained unrenamed. Should have changed along with git links. 2020-05-11 16:25:06 +00:00
Michael Breidenbach
b008697a0e
Translated using Weblate (Swedish)
Currently translated at 100.0% (1264 of 1264 strings)
2020-05-11 12:41:31 +02:00
Michael Breidenbach
17e3150a28
Translated using Weblate (German)
Currently translated at 100.0% (1264 of 1264 strings)
2020-05-11 12:41:30 +02:00
James Valleroy
d437f61423
snapshot: Set as essential module
Storage Snapshots will be installed by default. It will only be usable
if filesystem is btrfs. For other filesystems, a message is displayed
that it is not available.

Closes #1284.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-05-06 12:00:34 -07:00
Petter Reinholdtsen
ab16dec26b Translated using Weblate (Norwegian Bokmål)
Currently translated at 86.7% (1091 of 1257 strings)
2020-05-06 08:11:56 +02:00
James Valleroy
dac7bc4f8c
Release v20.8 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v20.8
2020-05-04 20:55:02 -04:00
James Valleroy
d8d67790db
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-04 20:44:38 -04:00
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