disk: add packages for LUKS containers
Add the packages required for LUKS containers to the build root when getting the list of packages from the PartitionTable.
This commit is contained in:
parent
eb731e031d
commit
c38c7ad126
1 changed files with 10 additions and 0 deletions
|
|
@ -613,6 +613,7 @@ func (pt *PartitionTable) GetBuildPackages() []string {
|
|||
hasXFS := false
|
||||
hasFAT := false
|
||||
hasEXT4 := false
|
||||
hasLUKS := false
|
||||
|
||||
introspectPT := func(e Entity, path []Entity) error {
|
||||
switch ent := e.(type) {
|
||||
|
|
@ -631,6 +632,8 @@ func (pt *PartitionTable) GetBuildPackages() []string {
|
|||
case "ext4":
|
||||
hasEXT4 = true
|
||||
}
|
||||
case *LUKSContainer:
|
||||
hasLUKS = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -652,6 +655,13 @@ func (pt *PartitionTable) GetBuildPackages() []string {
|
|||
if hasEXT4 {
|
||||
packages = append(packages, "e2fsprogs")
|
||||
}
|
||||
if hasLUKS {
|
||||
packages = append(packages,
|
||||
"clevis",
|
||||
"clevis-luks",
|
||||
"cryptsetup",
|
||||
)
|
||||
}
|
||||
|
||||
return packages
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue