mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
- Remove the first setup wizard step to run security upgrades. At the time of its introduction, it was felt that this is very important. Some things have changed since then: - We have mechanism for queuing package operations. Users can now trigger software updates and start installing apps before that is completed. Or vice versa. Earlier if the software updates were running, app install used to fail with an error. - There were no notifications. Since then we have added 'first setup' notification for important topics such as Privacy. This step can be replaced with a notification. - Automatic diagnostics and a diagnostic to notify of updated packages also helps bring attention to software updates if they are missed during first setup. - A proposed change will re-introduce an advice to run updates in the 'Next steps' wizard step along with a button trigger it right there. - The new notification for software updates will bring more attention to running updates as part of first setup. - It would be nice not be stuck in the first setup wizard for a long period and make it look simple. It improves the fun factor of setting up FreedomBox. - It would present an opportunity to utilize the parallel installation of apps/updates to the full extent. Although this can also be done by skipping the progress step after updates are run. - First wizard steps tend to get less testing. Tests: - Run the first setup wizard by removing /var/lib/plinth/plinth.sqlite3 and running the service. Notice that the software update step is not shown and wizard completes successfully. - On stable container, backports step is shown as expected (if not already enabled). Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
Forms for configuring unattended-upgrades.
|
|
"""
|
|
|
|
from django import forms
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from plinth.modules import upgrades
|
|
|
|
|
|
class ConfigureForm(forms.Form):
|
|
"""Configuration form to enable/disable automatic upgrades."""
|
|
auto_upgrades_enabled = forms.BooleanField(
|
|
label=_('Enable auto-update'), required=False, help_text=_(
|
|
'When enabled, FreedomBox automatically updates once a day.'))
|
|
|
|
dist_upgrade_enabled = forms.BooleanField(
|
|
label=_('Enable auto-update to next stable release'), required=False,
|
|
help_text=_('When enabled, FreedomBox will update to the next stable '
|
|
'distribution release when it is available.'))
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
"""Disable options as necessary."""
|
|
super().__init__(*args, **kwargs)
|
|
|
|
self.fields['dist_upgrade_enabled'].disabled = \
|
|
not upgrades.can_enable_dist_upgrade()
|
|
|
|
|
|
class BackportsFirstbootForm(forms.Form):
|
|
"""Form to configure backports during first boot wizard."""
|
|
backports_enabled = forms.BooleanField(
|
|
label=_('Activate frequent feature updates (recommended)'),
|
|
required=False, initial=True)
|