Add support for unattended updates#1562
Conversation
89d97ca to
6fe0347
Compare
This commit introduces unattended-update cron consumer. Unattended updates are configurable to perform update autonomously or to wait for admin to reboot. Unattended upadate reuses UPDATE URL from check-update and is configurable under system/software yang. Cron consumer downloads release tar and extracts .pkg(used by rauc) under /var/lib/misc/unattended-update. Resolves: kernelkit#1301 Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
6fe0347 to
0dc380a
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds an “unattended update” feature path to the system software update flow, integrating it with the existing schedule/cron consumer mechanism and extending the YANG model to configure autonomous installs and reboot policy.
Changes:
- Add
unattended-updateas a new scheduled cron consumer alongsidecheck-update. - Extend the system software YANG model to add
/system/software/unattended-updateand liftupdate-urlto/system/software/update-url. - Add a new
/usr/sbin/unattended-updatescript plus sharedupdate-commonhelpers; updatecheck-updateto reuse those helpers.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/confd/yang/confd/infix-system@2026-07-02.yang | Adds a versioned infix-system module revision that includes the software submodule changes. |
| src/confd/yang/confd/infix-system.yang | Adds the 2026-07-02 revision entry for unattended-update/update-url changes. |
| src/confd/yang/confd/infix-system-software@2026-07-02.yang | Adds a versioned software submodule defining update-url and unattended-update config. |
| src/confd/yang/confd/infix-system-software.yang | Updates the live software submodule with shared update-url and new unattended-update container. |
| src/confd/yang/confd.inc | Switches the compiled module list to infix-system@2026-07-02.yang. |
| src/confd/src/system-software.c | Registers a new cron consumer for /system/software/unattended-update. |
| src/confd/src/schedule.c | Exposes a read-only list of registered cron consumers (for dependency tracking). |
| src/confd/src/core.h | Declares the new schedule_consumers() accessor. |
| src/confd/src/core.c | Adds dependency tracking for schedule consumers by auto-adding referenced schedules to diffs. |
| doc/ChangeLog.md | Adds an unreleased changelog entry describing unattended upgrades. |
| board/common/xattrs | Adds a scratch directory entry for staging unattended-update downloads. |
| board/common/rootfs/usr/sbin/unattended-update | New scheduled job script to download and install an update bundle, optionally rebooting. |
| board/common/rootfs/usr/sbin/check-update | Refactors to use shared update helpers and shared software/update-url. |
| board/common/rootfs/usr/libexec/infix/update-common | New shared helper library for probing releases, comparing versions, and locating bundle assets. |
| board/common/post-build.sh | Ensures the unattended-update scratch directory exists in the target rootfs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Copilot actually found something useful, or what do you think @mattiaswal ? |
Looks like it. |
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
|
Nice work on this! Only minor issues left from Copilot's findings. I'll leave it up to @mattiaswal to do the final approval of this work (since he best knows the requirements). |
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
This commit introduces unattended-update cron consumer. Unattended updates are configurable to perform update autonomously or to wait for admin to reboot. Unattended upadate reuses UPDATE URL from check-update and is configurable under system/software yang. Cron consumer downloads release tar and extracts .pkg(used by rauc) under /var/lib/misc/unattended-update. PR also introduces migration script due to yang consolidation in relation to update url.
Resolves: #1301
Description
Checklist
Tick relevant boxes, this PR is-a or has-a: