bootctl: rework/modernize "unlink" and add Varlink API for it

Among other things this changes tracking of the location of resources
during GC from using the BootEntrySource enum rather than a path, since
we have that and it is more efficient and easier to grok.
This commit is contained in:
Lennart Poettering
2026-05-01 07:10:31 +02:00
parent 4d0f6ac593
commit e68bf712be
10 changed files with 611 additions and 125 deletions
+6 -4
View File
@@ -40,8 +40,10 @@ _bootctl() {
--dry-run'
[ARG]='--esp-path --boot-path --root --image --image-policy --install-source
--variables --random-seed --make-entry-directory --entry-token --json
--efi-boot-option-description --secure-boot-auto-enroll --private-key
--private-key-source --certificate --certificate-source'
--efi-boot-option-description --efi-boot-option-description-with-device
--secure-boot-auto-enroll --private-key
--private-key-source --certificate --certificate-source
--oldest'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
@@ -67,7 +69,7 @@ _bootctl() {
--install-source)
comps="image host auto"
;;
--random-seed|--variables|--secure-boot-auto-enroll)
--random-seed|--variables|--secure-boot-auto-enroll|--oldest|--efi-boot-option-description-with-device)
comps="yes no"
;;
--json)
@@ -85,7 +87,7 @@ _bootctl() {
local -A VERBS=(
[STANDALONE]='help status install update remove is-installed random-seed list set-timeout set-timeout-oneshot cleanup'
[BOOTENTRY]='set-default set-oneshot set-sysfail unlink'
[BOOTENTRY]='set-default set-oneshot set-sysfail set-preferred unlink'
[BOOLEAN]='reboot-to-firmware'
[FILE]='kernel-identify kernel-inspect'
)