Package not found when using a base image with an extra repository #2953
-
mkosi commit the issue has been seen withUsed host distributionUbuntu 24.04 Used target distributionUbuntu 22.04 Linux kernel version used6.8.0-39-generic CPU architectures issue was seen onNone Unexpected behaviour you sawI expect
Used mkosi config# Directory structure:
# ./mkosi.images
# ./mkosi.images/base
# ./mkosi.images/base/mkosi.skeleton
# ./mkosi.images/base/mkosi.skeleton/etc
# ./mkosi.images/base/mkosi.skeleton/etc/apt
# ./mkosi.images/base/mkosi.skeleton/etc/apt/sources.list.d
# ./mkosi.images/base/mkosi.skeleton/etc/apt/sources.list.d/hashicorp.list
# ./mkosi.images/base/mkosi.skeleton/etc/apt/trusted.gpg.d
# ./mkosi.images/base/mkosi.skeleton/etc/apt/trusted.gpg.d/hashicorp-archive-keyring.gpg
# ./mkosi.images/base/mkosi.conf
# ./mkosi.images/consul-server
# ./mkosi.images/consul-server/mkosi.conf
# ./mkosi.conf
# ./mkosi.conf
[Output]
Format=none
[Distribution]
Distribution=ubuntu
Release=jammy
Architecture=x86-64
# ./mkosi.images/base/mkosi.conf
[Output]
Format=tar
[Content]
Packages=linux-image-generic,grub-efi-amd64-signed,shim-signed
# ./mkosi.images/consul-server/mkosi.conf
[Config]
Dependencies=base
[Output]
Format=disk
[Content]
BaseTrees=%O/base
Bootable=true
Bootloader=grub
UnifiedKernelImages=no
Packages=consul mkosi outputhttps://gist.github.com/rodrigol-chan/c1243c4eb7a4823b241c18d0250133a7 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This is working as expected, we don't use any package manager configuration from base trees by default. You can pick it up explicitly by using |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick reply! It now fails with the following two errors. Full
I've amended the configuration as you suggested. I had to set ────────────────────────────────────────────────────────────────────────────────
File: mkosi.conf
────────────────────────────────────────────────────────────────────────────────
[Output]
Format=none
[Distribution]
Distribution=ubuntu
Release=jammy
Architecture=x86-64
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
File: mkosi.images/base/mkosi.conf
────────────────────────────────────────────────────────────────────────────────
[Output]
Format=directory
[Content]
Packages=linux-image-generic,grub-efi-amd64-signed,shim-signed
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
File: mkosi.images/consul-server/mkosi.conf
────────────────────────────────────────────────────────────────────────────────
[Config]
Dependencies=base
[Distribution]
PackageManagerTrees=%O/base/etc/apt:/etc/apt
[Output]
Format=disk
[Content]
BaseTrees=%O/base
Bootable=true
Bootloader=grub
UnifiedKernelImages=no
Packages=consul
──────────────────────────────────────────────────────────────────────────────── |
Beta Was this translation helpful? Give feedback.
-
@rodrigol-chan Please check the access mode on mkosi.skeleton/etc/apt. It's probably too restrictive. It should be 755 for this to work. |
Beta Was this translation helpful? Give feedback.
This is working as expected, we don't use any package manager configuration from base trees by default. You can pick it up explicitly by using
PackageManagerTrees=%O/base/etc/apt:/etc/apt
in the consul-server image.