deps: update images to 0.94

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2024-10-25 09:00:38 +02:00 committed by Sanne Raymaekers
parent 4f90a757dc
commit bccd1639af
1096 changed files with 411794 additions and 11488 deletions

View file

@ -7,7 +7,7 @@ import (
"github.com/google/uuid"
"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/datasizes"
)
// Argon2id defines parameters for the key derivation function for LUKS.
@ -116,7 +116,7 @@ func (lc *LUKSContainer) MetadataSize() uint64 {
}
// 16 MiB is the default size for the LUKS2 header
return 16 * common.MiB
return 16 * datasizes.MiB
}
func (lc *LUKSContainer) minSize(size uint64) uint64 {

View file

@ -5,12 +5,12 @@ import (
"reflect"
"strings"
"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/datasizes"
)
// Default physical extent size in bytes: logical volumes
// created inside the VG will be aligned to this.
const LVMDefaultExtentSize = 4 * common.MebiByte
const LVMDefaultExtentSize = 4 * datasizes.MebiByte
type LVMVolumeGroup struct {
Name string
@ -143,7 +143,7 @@ func (vg *LVMVolumeGroup) MetadataSize() uint64 {
// of the metadata and its location and thus the start of the physical
// extent. For now we assume the default which results in a start of
// the physical extent 1 MiB
return 1 * common.MiB
return 1 * datasizes.MiB
}
func (vg *LVMVolumeGroup) minSize(size uint64) uint64 {

View file

@ -7,8 +7,8 @@ import (
"github.com/google/uuid"
"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/blueprint"
"github.com/osbuild/images/pkg/datasizes"
)
type PartitionTable struct {
@ -403,7 +403,7 @@ func (pt *PartitionTable) HeaderSize() uint64 {
}
// calculate the space we need for
parts := len(pt.Partitions)
parts := uint64(len(pt.Partitions))
// reserve a minimum of 128 partition entires
if parts < 128 {
@ -413,7 +413,7 @@ func (pt *PartitionTable) HeaderSize() uint64 {
// Assume that each partition entry is 128 bytes
// which might not be the case if the partition
// name exceeds 72 bytes
header += uint64(parts * 128)
header += parts * 128
return header
}
@ -531,7 +531,7 @@ func (pt *PartitionTable) createFilesystem(mountpoint string, size uint64) error
newVol, err := vc.CreateMountpoint(mountpoint, 0)
if err != nil {
return fmt.Errorf("failed creating volume: " + err.Error())
return fmt.Errorf("failed creating volume: %w", err)
}
vcPath := append([]Entity{newVol}, rootPath[idx:]...)
size = alignEntityBranch(vcPath, size)
@ -692,7 +692,7 @@ func (pt *PartitionTable) ensureLVM() error {
// we need a /boot partition to boot LVM, ensure one exists
bootPath := entityPath(pt, "/boot")
if bootPath == nil {
_, err := pt.CreateMountpoint("/boot", 512*common.MiB)
_, err := pt.CreateMountpoint("/boot", 512*datasizes.MiB)
if err != nil {
return err
@ -751,7 +751,7 @@ func (pt *PartitionTable) ensureBtrfs() error {
// we need a /boot partition to boot btrfs, ensure one exists
bootPath := entityPath(pt, "/boot")
if bootPath == nil {
_, err := pt.CreateMountpoint("/boot", 512*common.MiB)
_, err := pt.CreateMountpoint("/boot", 512*datasizes.MiB)
if err != nil {
return fmt.Errorf("failed to create /boot partition when ensuring btrfs: %w", err)
}