fix: first-boot security updates read Debian's security.sources #34
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/inithooks!34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/secupdates-debian-security"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Dir::Etc::sourcelist=/etc/apt/sources.list.d/security.sources.sources. common's bootstrap wrote that file with an enabled archive.turnkeylinux.org stanza in it, so the first boot of a Keel image fetched from the TurnKey archive. Keel-Linux/common#30 now writessecurity.sourceswith Debian's security archive alone, and the hook reads that name.SEC_UPDATES_SOURCESoverrides the path for the tests.security.debian.org, where the updates come from, instead of archive.turnkeylinux.org.archive.turnkeylinux.orgis removed from the branding test's ALLOWED list.Review fixes (second commit)
set -o pipefail.dist-upgrade,dpkg --configureandapt-get updateall pipe intotee, so a failure ended as tee's success. The listing of/lib/modulesand/bootnow tolerates a missing/boot, as in containers, which would otherwise fail under pipefail.curladded to Depends). If that fails, orapt-get updatefails, it logscannot reach ...orapt-get update failedto syslog and to the hook's log, namesturnkey-install-security-updates, and exits 0. Before, an offlineapt-get updatestopped the hook under -e with nothing logged.forceis recorded only after a successful install, on both the preseeded and the screen path. A failed install, or one that never ran because the machine was offline, leaves no record.secupdates-ask.pystill checks DNS for security.debian.org and shows its error dialog, which fails the hook. That is unchanged here and can be aligned in a follow-up if wanted.Verification
On the step8 Web image in an LXC container, with common#30 applied:
turnkey-install-security-updates(SEC_UPDATES=FORCE) read only security.debian.org trixie-security. With libpng16-16t64 rolled back to the trixie version, the hook fetched1.6.48-1+deb13u6from security.debian.org and installed it. Hook exit 0, and/var/lib/inithooks/sec-updatessaysforce.Test plan
bats tests/test-secupdates.bats: 20 pass (11 new, RED first); kcov 98.6 percent of 95secupdatespytest tests/: 383 pass