mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
upgrades: Use privileged decorator for actions
Tests:
- DONE: Functional tests work
- DONE: Initial setup works
- DONE: Automatic upgrades are enable by default
- DONE: apt preferences have been updated
- DONE: Enabling backports works
- DONE: Configuration file is created
- DONE: Correct status is shown in the app page
- DONE: Enabling/disabling automatic upgrades works
- DONE: Configuration file is updated
- DONE: Correct status is shown in the app page
- DONE: Manual triggering of updates work
- DONE: Log is shown properly in the app page
- DONE: Checking for distribution upgrade works
- DONE: Distribution upgrade from stable to testing works
- DONE: When running on btrfs distribution, snapshot is created before.
- DONE: Snapshots will be disable before upgrade and re-enabled later.
- DONE: When searx is enabled before upgrade, it's uwsgi will be disabled and
re-enabled later.
- Failures due to freedombox package not being the latest version (with the
changes).
- DONE: Development Vagrant box
- DONE: Automatic updates are disabled during development setup
- DONE: Development Container
- DONE: Automatic updates are disabled during development setup
- DONE: On stable, backports are enabled when running tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
11a27d8efc
commit
66c1ddc404
5 files changed
+110
-181
No files matched your search
@@ -193,7 +193,7 @@ mount -o remount /freedombox
|
||||
if [[ "{distribution}" == "stable" && ! -e $BACKPORTS_SOURCES_LIST ]]
|
||||
then
|
||||
echo "> In container: Enable backports"
|
||||
/freedombox/actions/upgrades activate-backports
|
||||
/freedombox/actions/actions upgrades activate_backports --no-args
|
||||
fi
|
||||
|
||||
echo "> In container: Upgrade packages"
|
||||
@@ -698,7 +698,10 @@ def _setup(image_file, distribution):
|
||||
return
|
||||
|
||||
logger.info('In container: Disabling automatic updates temporarily')
|
||||
_runc(image_file, ['/usr/share/plinth/actions/upgrades', 'disable-auto'])
|
||||
contents = 'APT::Periodic::Update-Package-Lists "0";\n' \
|
||||
'APT::Periodic::Unattended-Upgrade "0";\n'
|
||||
_runc(image_file, ['tee', '/etc/apt/apt.conf.d/20auto-upgrades'],
|
||||
input=contents.encode())
|
||||
|
||||
logger.info('In container: Disabling FreedomBox service')
|
||||
_runc(image_file, ['systemctl', 'disable', 'plinth'],
|
||||
|
||||
Reference in new issue
Block a user