T8311: fix initramfs hook "dpkg-architecture: command not found"#1127
Merged
c-po merged 1 commit intovyos:currentfrom Mar 2, 2026
Merged
T8311: fix initramfs hook "dpkg-architecture: command not found"#1127c-po merged 1 commit intovyos:currentfrom
c-po merged 1 commit intovyos:currentfrom
Conversation
|
👍 |
Commit f487756 ("T8311: De-hardcode arch for live-build-config 10-vyos-addons") introduced a regression where an unavailable third-party helper script was invoked during initramfs hook execution, breaking the ISO build process. update-initramfs: Generating /boot/initrd.img-6.6.127-vyos live-boot: core filesystems devices utils wget blockdev. /etc/initramfs-tools/hooks/10-vyos-addons: line 3: dpkg-architecture: command not found The dpkg-architecture helper, provided by the dpkg-dev package, is not available during hook execution. The same result can be achieved using GNU coreutils instead: On x86_64 (aka amd64) both yield the same result: $ echo $(uname -m)-linux-gnu x86_64-linux-gnu $ echo $(dpkg-architecture -qDEB_HOST_MULTIARCH) x86_64-linux-gnu On aarch64 (aka arm64) both yield the same result: $ echo $(uname -m)-linux-gnu aarch64-linux-gnu $ echo $(dpkg-architecture -qDEB_HOST_MULTIARCH) aarch64-linux-gnu
dmbaturin
approved these changes
Mar 1, 2026
Member
There was a problem hiding this comment.
I think using uname is probably a good idea because coreutils are guaranteed to be installed in any functional system while everything else is highly variable, and dpkg-dev in chroot serve no other useful purposes.
I find the hardcoded suffix -linux-gnu aesthetically unappealing but I'm happy to go with that because there's no chance we'll realistically support GNU/Hurd or any other kernel in VyOS as a build option, and Debian has no official non-GNU flavors, and the $cpu-$os-$flavor format is very unlikely to change.
sever-sever
approved these changes
Mar 2, 2026
Member
sever-sever
left a comment
There was a problem hiding this comment.
Use (uname -m) instead of dpkg-architecture for chroot.
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change summary
Commit f487756 ("T8311: De-hardcode arch for live-build-config 10-vyos-addons") introduced a regression where an unavailable third-party helper script was invoked during initramfs hook execution, breaking the ISO build process.
The
dpkg-architecturehelper, provided by the dpkg-dev package, is not available during hook execution. The same result can be achieved using GNUcoreutilsinstead:On x86_64 (aka amd64) both yield the same result:
On aarch64 (aka arm64) both yield the same result:
Types of changes
Related Task(s)
Related PR(s)
How to test / Smoketest result
After the fix, building a new ISO and navigation to the
live-bootsection shows no more errors:Checklist: