Update osbuild/images to v0.77.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
725c5cdb25
commit
a9923febd8
40 changed files with 252 additions and 169 deletions
2
vendor/github.com/osbuild/images/pkg/blueprint/filesystem_customizations.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/blueprint/filesystem_customizations.go
generated
vendored
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/pathpolicy"
|
||||
"github.com/osbuild/images/pkg/pathpolicy"
|
||||
)
|
||||
|
||||
type FilesystemCustomization struct {
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/blueprint/fsnode_customizations.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/blueprint/fsnode_customizations.go
generated
vendored
|
|
@ -11,8 +11,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/pathpolicy"
|
||||
"github.com/osbuild/images/pkg/customizations/fsnode"
|
||||
"github.com/osbuild/images/pkg/pathpolicy"
|
||||
)
|
||||
|
||||
// validateModeString checks that the given string is a valid mode octal number
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/disk/disk.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/disk/disk.go
generated
vendored
|
|
@ -24,8 +24,9 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
|
||||
"slices"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/disk/partition_table.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/disk/partition_table.go
generated
vendored
|
|
@ -37,7 +37,7 @@ const (
|
|||
RawPartitioningMode PartitioningMode = "raw"
|
||||
|
||||
// BtrfsPartitioningMode creates a btrfs layout.
|
||||
BtfrsPartitioningMode PartitioningMode = "btrfs"
|
||||
BtrfsPartitioningMode PartitioningMode = "btrfs"
|
||||
|
||||
// DefaultPartitioningMode is AutoLVMPartitioningMode and is the empty state
|
||||
DefaultPartitioningMode PartitioningMode = ""
|
||||
|
|
@ -100,7 +100,7 @@ const (
|
|||
func NewPartitionTable(basePT *PartitionTable, mountpoints []blueprint.FilesystemCustomization, imageSize uint64, mode PartitioningMode, requiredSizes map[string]uint64, rng *rand.Rand) (*PartitionTable, error) {
|
||||
newPT := basePT.Clone().(*PartitionTable)
|
||||
|
||||
if basePT.features().LVM && (mode == RawPartitioningMode || mode == BtfrsPartitioningMode) {
|
||||
if basePT.features().LVM && (mode == RawPartitioningMode || mode == BtrfsPartitioningMode) {
|
||||
return nil, fmt.Errorf("%s partitioning mode set for a base partition table with LVM, this is unsupported", mode)
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ func NewPartitionTable(basePT *PartitionTable, mountpoints []blueprint.Filesyste
|
|||
ensureLVM = false
|
||||
case DefaultPartitioningMode, AutoLVMPartitioningMode:
|
||||
ensureLVM = len(newMountpoints) > 0
|
||||
case BtfrsPartitioningMode:
|
||||
case BtrfsPartitioningMode:
|
||||
ensureBtrfs = true
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported partitioning mode %q", mode)
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
|
|
@ -5,6 +5,8 @@ import (
|
|||
"math/rand"
|
||||
"strings"
|
||||
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/environment"
|
||||
"github.com/osbuild/images/internal/workload"
|
||||
|
|
@ -18,7 +20,6 @@ import (
|
|||
"github.com/osbuild/images/pkg/platform"
|
||||
"github.com/osbuild/images/pkg/policies"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type imageFunc func(workload workload.Workload, t *imageType, bp *blueprint.Blueprint, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
generated
vendored
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/environment"
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/ami.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/ami.go
generated
vendored
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
// TODO: move these to the EC2 environment
|
||||
const amiKernelOptions = "console=tty0 console=ttyS0,115200n8 rd.blacklist=nouveau nvme_core.io_timeout=4294967295"
|
||||
const amiKernelOptions = "console=tty0 console=ttyS0,115200n8 nvme_core.io_timeout=4294967295"
|
||||
|
||||
// default EC2 images config (common for all architectures)
|
||||
func baseEc2ImageConfig() *distro.ImageConfig {
|
||||
|
|
@ -249,7 +249,7 @@ func mkAMIImgTypeAarch64() *rhel.ImageType {
|
|||
[]string{"image"},
|
||||
)
|
||||
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultImageConfig = defaultAMIImageConfig()
|
||||
|
|
|
|||
21
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/distro.go
generated
vendored
21
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/distro.go
generated
vendored
|
|
@ -82,17 +82,6 @@ func newDistro(name string, major, minor int) *rhel.Distribution {
|
|||
mkOCIImgType(rd),
|
||||
)
|
||||
|
||||
x86_64.AddImageTypes(
|
||||
&platform.X86{
|
||||
BIOS: true,
|
||||
UEFIVendor: rd.Vendor(),
|
||||
BasePlatform: platform.BasePlatform{
|
||||
ImageFormat: platform.FORMAT_QCOW2,
|
||||
},
|
||||
},
|
||||
mkOpenstackImgType(),
|
||||
)
|
||||
|
||||
x86_64.AddImageTypes(
|
||||
&platform.X86{
|
||||
BIOS: true,
|
||||
|
|
@ -121,16 +110,6 @@ func newDistro(name string, major, minor int) *rhel.Distribution {
|
|||
mkWSLImgType(),
|
||||
)
|
||||
|
||||
aarch64.AddImageTypes(
|
||||
&platform.Aarch64{
|
||||
UEFIVendor: rd.Vendor(),
|
||||
BasePlatform: platform.BasePlatform{
|
||||
ImageFormat: platform.FORMAT_QCOW2,
|
||||
},
|
||||
},
|
||||
mkOpenstackImgType(),
|
||||
)
|
||||
|
||||
aarch64.AddImageTypes(
|
||||
&platform.Aarch64{},
|
||||
mkTarImgType(),
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/options.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/options.go
generated
vendored
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
|
|
|
|||
47
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/qcow2.go
generated
vendored
47
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/qcow2.go
generated
vendored
|
|
@ -54,31 +54,6 @@ func mkOCIImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
return it
|
||||
}
|
||||
|
||||
func mkOpenstackImgType() *rhel.ImageType {
|
||||
it := rhel.NewImageType(
|
||||
"openstack",
|
||||
"disk.qcow2",
|
||||
"application/x-qemu-disk",
|
||||
map[string]rhel.PackageSetFunc{
|
||||
rhel.OSPkgsKey: openstackCommonPackageSet,
|
||||
},
|
||||
rhel.DiskImage,
|
||||
[]string{"build"},
|
||||
[]string{"os", "image", "qcow2"},
|
||||
[]string{"qcow2"},
|
||||
)
|
||||
|
||||
it.DefaultImageConfig = &distro.ImageConfig{
|
||||
Locale: common.ToPtr("en_US.UTF-8"),
|
||||
}
|
||||
it.KernelOptions = "ro"
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
||||
func qcow2CommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet {
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
|
|
@ -154,28 +129,6 @@ func qcow2CommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet {
|
|||
return ps
|
||||
}
|
||||
|
||||
func openstackCommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet {
|
||||
ps := rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
// Defaults
|
||||
"@core",
|
||||
"langpacks-en",
|
||||
"tuned",
|
||||
|
||||
// From the lorax kickstart
|
||||
"cloud-init",
|
||||
"qemu-guest-agent",
|
||||
"spice-vdagent",
|
||||
},
|
||||
Exclude: []string{
|
||||
"dracut-config-rescue",
|
||||
"rng-tools",
|
||||
},
|
||||
}
|
||||
|
||||
return ps
|
||||
}
|
||||
|
||||
func qcowImageConfig(d *rhel.Distribution) *distro.ImageConfig {
|
||||
ic := &distro.ImageConfig{
|
||||
DefaultTarget: common.ToPtr("multi-user.target"),
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/options.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/options.go
generated
vendored
|
|
@ -5,7 +5,7 @@ import (
|
|||
"log"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
|
|
|
|||
8
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/ami.go
generated
vendored
8
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/ami.go
generated
vendored
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
// TODO: move these to the EC2 environment
|
||||
const amiKernelOptions = "console=tty0 console=ttyS0,115200n8 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295"
|
||||
const amiKernelOptions = "console=tty0 console=ttyS0,115200n8 net.ifnames=0 nvme_core.io_timeout=4294967295"
|
||||
|
||||
// default EC2 images config (common for all architectures)
|
||||
func baseEc2ImageConfig() *distro.ImageConfig {
|
||||
|
|
@ -363,7 +363,7 @@ func mkEC2SapImgTypeX86_64(osVersion string, rhsm bool) *rhel.ImageType {
|
|||
)
|
||||
|
||||
it.Compression = "xz"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 processor.max_cstate=1 intel_idle.max_cstate=1"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 nvme_core.io_timeout=4294967295 processor.max_cstate=1 intel_idle.max_cstate=1"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultImageConfig = sapImageConfig(osVersion).InheritFrom(defaultEc2ImageConfigX86_64(osVersion, rhsm))
|
||||
|
|
@ -412,7 +412,7 @@ func mkAMIImgTypeAarch64() *rhel.ImageType {
|
|||
[]string{"image"},
|
||||
)
|
||||
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultImageConfig = defaultAMIImageConfig()
|
||||
|
|
@ -437,7 +437,7 @@ func mkEC2ImgTypeAarch64(osVersion string, rhsm bool) *rhel.ImageType {
|
|||
)
|
||||
|
||||
it.Compression = "xz"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultImageConfig = defaultEc2ImageConfig(osVersion, rhsm)
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/options.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/options.go
generated
vendored
|
|
@ -5,7 +5,7 @@ import (
|
|||
"log"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/manifest/ostree_deployment.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/manifest/ostree_deployment.go
generated
vendored
|
|
@ -521,8 +521,8 @@ func createMountpointService(serviceName string, mountpoints []string) *osbuild.
|
|||
Type: osbuild.Oneshot,
|
||||
RemainAfterExit: false,
|
||||
// compatibility with composefs, will require transient rootfs to be enabled too.
|
||||
ExecStartPre: []string{"/bin/sh -c \"if grep -Uq composefs /run/ostree-booted; then chattr -i /; fi\""},
|
||||
ExecStopPost: []string{"/bin/sh -c \"if grep -Uq composefs /run/ostree-booted; then chattr +i /; fi\""},
|
||||
ExecStartPre: []string{"/bin/sh -c \"if grep -Uq composefs /run/ostree-booted; then echo 'Warning: composefs enabled! ensure transient rootfs is enabled too.'; else chattr -i /; fi\""},
|
||||
ExecStopPost: []string{"/bin/sh -c \"if grep -Uq composefs /run/ostree-booted; then echo 'Warning: composefs enabled! ensure transient rootfs is enabled too.'; else chattr +i /; fi\""},
|
||||
ExecStart: []string{"mkdir -p " + strings.Join(mountpoints, " ")},
|
||||
}
|
||||
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/osbuild/anaconda_stage.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/osbuild/anaconda_stage.go
generated
vendored
|
|
@ -1,8 +1,9 @@
|
|||
package osbuild
|
||||
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/pkg/customizations/anaconda"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type AnacondaStageOptions struct {
|
||||
|
|
|
|||
15
vendor/github.com/osbuild/images/pkg/osbuild/bootc_install_to_filesystem_stage.go
generated
vendored
15
vendor/github.com/osbuild/images/pkg/osbuild/bootc_install_to_filesystem_stage.go
generated
vendored
|
|
@ -3,6 +3,8 @@ package osbuild
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
)
|
||||
|
||||
|
|
@ -35,11 +37,22 @@ func NewBootcInstallToFilesystemStage(options *BootcInstallToFilesystemOptions,
|
|||
return nil, fmt.Errorf("expected exactly one container input but got: %v (%v)", len(inputs.Images.References), inputs.Images.References)
|
||||
}
|
||||
|
||||
// Don't mount any custom mountpoints.
|
||||
// Only mount the minimum required mounts for bootc:
|
||||
// /, /boot, and /boot/efi, if they are already defined.
|
||||
requiredMountpoints := []string{"/", "/boot", "/boot/efi"}
|
||||
reqMounts := make([]Mount, 0, len(mounts))
|
||||
for _, mount := range mounts {
|
||||
if slices.Contains(requiredMountpoints, mount.Target) {
|
||||
reqMounts = append(reqMounts, mount)
|
||||
}
|
||||
}
|
||||
|
||||
return &Stage{
|
||||
Type: "org.osbuild.bootc.install-to-filesystem",
|
||||
Options: options,
|
||||
Inputs: inputs,
|
||||
Devices: devices,
|
||||
Mounts: mounts,
|
||||
Mounts: reqMounts,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/osbuild/cloud_init_stage.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/osbuild/cloud_init_stage.go
generated
vendored
|
|
@ -3,7 +3,7 @@ package osbuild
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"slices"
|
||||
)
|
||||
|
||||
type CloudInitStageOptions struct {
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/osbuild/rpm_stage.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/osbuild/rpm_stage.go
generated
vendored
|
|
@ -1,8 +1,9 @@
|
|||
package osbuild
|
||||
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type RPMStageOptions struct {
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/policies/policies.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/policies/policies.go
generated
vendored
|
|
@ -1,7 +1,7 @@
|
|||
package policies
|
||||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/pathpolicy"
|
||||
"github.com/osbuild/images/pkg/pathpolicy"
|
||||
)
|
||||
|
||||
// MountpointPolicies is a set of default mountpoint policies used for filesystem customizations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue