Skip to content

Add support for unattended updates#1562

Draft
saba8814 wants to merge 4 commits into
kernelkit:mainfrom
saba8814:feat/unattended-updates
Draft

Add support for unattended updates#1562
saba8814 wants to merge 4 commits into
kernelkit:mainfrom
saba8814:feat/unattended-updates

Conversation

@saba8814

@saba8814 saba8814 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@saba8814
saba8814 marked this pull request as draft July 2, 2026 13:39
@saba8814
saba8814 force-pushed the feat/unattended-updates branch from 89d97ca to 6fe0347 Compare July 2, 2026 13:45
@saba8814
saba8814 marked this pull request as ready for review July 2, 2026 13:47
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-update as a new scheduled cron consumer alongside check-update.
  • Extend the system software YANG model to add /system/software/unattended-update and lift update-url to /system/software/update-url.
  • Add a new /usr/sbin/unattended-update script plus shared update-common helpers; update check-update to 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.

Comment thread src/confd/src/core.c
Comment thread board/common/rootfs/usr/sbin/unattended-update
Comment thread src/confd/yang/confd/infix-system-software.yang Outdated
Comment thread src/confd/yang/confd/infix-system-software.yang
@troglobit

Copy link
Copy Markdown
Contributor

Copilot actually found something useful, or what do you think @mattiaswal ?

@mattiaswal

Copy link
Copy Markdown
Contributor

Copilot actually found something useful, or what do you think @mattiaswal ?

Looks like it.

@saba8814
saba8814 marked this pull request as draft July 15, 2026 07:12
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 21 changed files in this pull request and generated 8 comments.

Comment thread board/common/rootfs/usr/sbin/unattended-update Outdated
Comment thread board/common/rootfs/usr/libexec/infix/update-common Outdated
Comment thread board/common/rootfs/usr/libexec/infix/update-common Outdated
Comment thread board/common/rootfs/usr/sbin/check-update Outdated
Comment thread board/common/rootfs/usr/sbin/unattended-update Outdated
Comment thread src/confd/src/schedule.c Outdated
Comment thread doc/ChangeLog.md Outdated
Comment thread doc/ChangeLog.md
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
Comment thread doc/ChangeLog.md Outdated

@troglobit troglobit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment from me only, as follow-up to Copilot. Re-requesting another review from it now...

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 21 changed files in this pull request and generated 2 comments.

Comment thread src/confd/src/schedule.c Outdated
Comment thread src/confd/yang/confd/infix-system-software.yang
@troglobit

Copy link
Copy Markdown
Contributor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for unattended upgrades

4 participants