deps: update osbuild/images to v0.3.0
Bump the required osbuild version to v93 (due to the systemd units change). Pin the new osbuild version in Schutzfile. Update repo snapshots in Schutzfile due to osbuild v93 depending on new selinux-policy build.
This commit is contained in:
parent
715bdba1bf
commit
d4332f85d3
62 changed files with 1270 additions and 540 deletions
13
vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go
generated
vendored
|
|
@ -82,7 +82,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// TODO: replace isoLabelTmpl with more high-level properties
|
||||
isoLabel := fmt.Sprintf(img.ISOLabelTempl, img.Platform.GetArch())
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, livePipeline)
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, livePipeline)
|
||||
rootfsImagePipeline.Size = 8 * common.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion)
|
||||
|
|
@ -104,12 +104,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// enable ISOLinux on x86_64 only
|
||||
isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64
|
||||
|
||||
isoTreePipeline := manifest.NewAnacondaInstallerISOTree(m,
|
||||
buildPipeline,
|
||||
livePipeline,
|
||||
rootfsImagePipeline,
|
||||
bootTreePipeline,
|
||||
isoLabel)
|
||||
isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, livePipeline, rootfsImagePipeline, bootTreePipeline)
|
||||
isoTreePipeline.PartitionTable = rootfsPartitionTable
|
||||
isoTreePipeline.Release = img.Release
|
||||
isoTreePipeline.OSName = img.OSName
|
||||
|
|
@ -117,8 +112,8 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
isoTreePipeline.KernelOpts = kernelOpts
|
||||
isoTreePipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
isoPipeline := manifest.NewISO(m, buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.Filename = img.Filename
|
||||
isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.SetFilename(img.Filename)
|
||||
isoPipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
artifact := isoPipeline.Export()
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go
generated
vendored
|
|
@ -91,7 +91,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// TODO: replace isoLabelTmpl with more high-level properties
|
||||
isoLabel := fmt.Sprintf(img.ISOLabelTempl, img.Platform.GetArch())
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline.Size = 4 * common.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion)
|
||||
|
|
@ -103,12 +103,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// enable ISOLinux on x86_64 only
|
||||
isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64
|
||||
|
||||
isoTreePipeline := manifest.NewAnacondaInstallerISOTree(m,
|
||||
buildPipeline,
|
||||
anacondaPipeline,
|
||||
rootfsImagePipeline,
|
||||
bootTreePipeline,
|
||||
isoLabel)
|
||||
isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline)
|
||||
isoTreePipeline.PartitionTable = rootfsPartitionTable
|
||||
isoTreePipeline.Release = img.Release
|
||||
isoTreePipeline.OSName = img.OSName
|
||||
|
|
@ -124,8 +119,8 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
isoTreePipeline.OSTreeCommitSource = &img.Commit
|
||||
isoTreePipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
isoPipeline := manifest.NewISO(m, buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.Filename = img.Filename
|
||||
isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.SetFilename(img.Filename)
|
||||
isoPipeline.ISOLinux = isoLinuxEnabled
|
||||
artifact := isoPipeline.Export()
|
||||
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go
generated
vendored
|
|
@ -111,7 +111,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// TODO: replace isoLabelTmpl with more high-level properties
|
||||
isoLabel := fmt.Sprintf(img.ISOLabelTempl, img.Platform.GetArch())
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline.Size = 4 * common.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion)
|
||||
|
|
@ -134,12 +134,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// enable ISOLinux on x86_64 only
|
||||
isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64
|
||||
|
||||
isoTreePipeline := manifest.NewAnacondaInstallerISOTree(m,
|
||||
buildPipeline,
|
||||
anacondaPipeline,
|
||||
rootfsImagePipeline,
|
||||
bootTreePipeline,
|
||||
isoLabel)
|
||||
isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline)
|
||||
isoTreePipeline.PartitionTable = rootfsPartitionTable
|
||||
isoTreePipeline.Release = img.Release
|
||||
isoTreePipeline.OSName = img.OSName
|
||||
|
|
@ -156,8 +151,8 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
isoTreePipeline.KernelOpts = img.AdditionalKernelOpts
|
||||
isoTreePipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
isoPipeline := manifest.NewISO(m, buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.Filename = img.Filename
|
||||
isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.SetFilename(img.Filename)
|
||||
isoPipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
artifact := isoPipeline.Export()
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/image/archive.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/image/archive.go
generated
vendored
|
|
@ -39,8 +39,8 @@ func (img *Archive) InstantiateManifest(m *manifest.Manifest,
|
|||
osPipeline.Environment = img.Environment
|
||||
osPipeline.Workload = img.Workload
|
||||
|
||||
tarPipeline := manifest.NewTar(m, buildPipeline, &osPipeline.Base, "archive")
|
||||
tarPipeline.Filename = img.Filename
|
||||
tarPipeline := manifest.NewTar(buildPipeline, osPipeline, "archive")
|
||||
tarPipeline.SetFilename(img.Filename)
|
||||
artifact := tarPipeline.Export()
|
||||
|
||||
return artifact, nil
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/image/container.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/image/container.go
generated
vendored
|
|
@ -39,8 +39,8 @@ func (img *BaseContainer) InstantiateManifest(m *manifest.Manifest,
|
|||
osPipeline.Environment = img.Environment
|
||||
osPipeline.Workload = img.Workload
|
||||
|
||||
ociPipeline := manifest.NewOCIContainer(m, buildPipeline, osPipeline)
|
||||
ociPipeline.Filename = img.Filename
|
||||
ociPipeline := manifest.NewOCIContainer(buildPipeline, osPipeline)
|
||||
ociPipeline.SetFilename(img.Filename)
|
||||
artifact := ociPipeline.Export()
|
||||
|
||||
return artifact, nil
|
||||
|
|
|
|||
79
vendor/github.com/osbuild/images/pkg/image/disk.go
generated
vendored
79
vendor/github.com/osbuild/images/pkg/image/disk.go
generated
vendored
|
|
@ -58,76 +58,59 @@ func (img *DiskImage) InstantiateManifest(m *manifest.Manifest,
|
|||
osPipeline.OSVersion = img.OSVersion
|
||||
osPipeline.OSNick = img.OSNick
|
||||
|
||||
imagePipeline := manifest.NewRawImage(m, buildPipeline, osPipeline)
|
||||
imagePipeline.PartTool = img.PartTool
|
||||
rawImagePipeline := manifest.NewRawImage(buildPipeline, osPipeline)
|
||||
rawImagePipeline.PartTool = img.PartTool
|
||||
|
||||
var artifact *artifact.Artifact
|
||||
var artifactPipeline manifest.Pipeline
|
||||
var imagePipeline manifest.FilePipeline
|
||||
switch img.Platform.GetImageFormat() {
|
||||
case platform.FORMAT_RAW:
|
||||
if img.Compression == "" {
|
||||
imagePipeline.Filename = img.Filename
|
||||
}
|
||||
artifactPipeline = imagePipeline
|
||||
artifact = imagePipeline.Export()
|
||||
imagePipeline = rawImagePipeline
|
||||
case platform.FORMAT_QCOW2:
|
||||
qcow2Pipeline := manifest.NewQCOW2(m, buildPipeline, imagePipeline)
|
||||
if img.Compression == "" {
|
||||
qcow2Pipeline.Filename = img.Filename
|
||||
}
|
||||
qcow2Pipeline := manifest.NewQCOW2(buildPipeline, rawImagePipeline)
|
||||
qcow2Pipeline.Compat = img.Platform.GetQCOW2Compat()
|
||||
artifactPipeline = qcow2Pipeline
|
||||
artifact = qcow2Pipeline.Export()
|
||||
imagePipeline = qcow2Pipeline
|
||||
case platform.FORMAT_VHD:
|
||||
vpcPipeline := manifest.NewVPC(m, buildPipeline, imagePipeline)
|
||||
if img.Compression == "" {
|
||||
vpcPipeline.Filename = img.Filename
|
||||
}
|
||||
vpcPipeline := manifest.NewVPC(buildPipeline, rawImagePipeline)
|
||||
vpcPipeline.ForceSize = img.ForceSize
|
||||
artifactPipeline = vpcPipeline
|
||||
artifact = vpcPipeline.Export()
|
||||
imagePipeline = vpcPipeline
|
||||
case platform.FORMAT_VMDK:
|
||||
vmdkPipeline := manifest.NewVMDK(m, buildPipeline, imagePipeline, nil)
|
||||
if img.Compression == "" {
|
||||
vmdkPipeline.Filename = img.Filename
|
||||
}
|
||||
artifactPipeline = vmdkPipeline
|
||||
artifact = vmdkPipeline.Export()
|
||||
imagePipeline = manifest.NewVMDK(buildPipeline, rawImagePipeline)
|
||||
case platform.FORMAT_OVA:
|
||||
vmdkPipeline := manifest.NewVMDK(m, buildPipeline, imagePipeline, nil)
|
||||
ovfPipeline := manifest.NewOVF(m, buildPipeline, vmdkPipeline)
|
||||
artifactPipeline := manifest.NewTar(m, buildPipeline, ovfPipeline, "archive")
|
||||
artifactPipeline.Format = osbuild.TarArchiveFormatUstar
|
||||
artifactPipeline.RootNode = osbuild.TarRootNodeOmit
|
||||
artifactPipeline.Filename = img.Filename
|
||||
artifact = artifactPipeline.Export()
|
||||
vmdkPipeline := manifest.NewVMDK(buildPipeline, rawImagePipeline)
|
||||
ovfPipeline := manifest.NewOVF(buildPipeline, vmdkPipeline)
|
||||
tarPipeline := manifest.NewTar(buildPipeline, ovfPipeline, "archive")
|
||||
tarPipeline.Format = osbuild.TarArchiveFormatUstar
|
||||
tarPipeline.RootNode = osbuild.TarRootNodeOmit
|
||||
tarPipeline.SetFilename(img.Filename)
|
||||
imagePipeline = tarPipeline
|
||||
case platform.FORMAT_GCE:
|
||||
// NOTE(akoutsou): temporary workaround; filename required for GCP
|
||||
// TODO: define internal raw filename on image type
|
||||
imagePipeline.Filename = "disk.raw"
|
||||
archivePipeline := manifest.NewTar(m, buildPipeline, imagePipeline, "archive")
|
||||
archivePipeline.Format = osbuild.TarArchiveFormatOldgnu
|
||||
archivePipeline.RootNode = osbuild.TarRootNodeOmit
|
||||
rawImagePipeline.SetFilename("disk.raw")
|
||||
tarPipeline := manifest.NewTar(buildPipeline, rawImagePipeline, "archive")
|
||||
tarPipeline.Format = osbuild.TarArchiveFormatOldgnu
|
||||
tarPipeline.RootNode = osbuild.TarRootNodeOmit
|
||||
// these are required to successfully import the image to GCP
|
||||
archivePipeline.ACLs = common.ToPtr(false)
|
||||
archivePipeline.SELinux = common.ToPtr(false)
|
||||
archivePipeline.Xattrs = common.ToPtr(false)
|
||||
archivePipeline.Filename = img.Filename // filename extension will determine compression
|
||||
tarPipeline.ACLs = common.ToPtr(false)
|
||||
tarPipeline.SELinux = common.ToPtr(false)
|
||||
tarPipeline.Xattrs = common.ToPtr(false)
|
||||
tarPipeline.SetFilename(img.Filename) // filename extension will determine compression
|
||||
imagePipeline = tarPipeline
|
||||
default:
|
||||
panic("invalid image format for image kind")
|
||||
}
|
||||
|
||||
switch img.Compression {
|
||||
case "xz":
|
||||
xzPipeline := manifest.NewXZ(m, buildPipeline, artifactPipeline)
|
||||
xzPipeline.Filename = img.Filename
|
||||
artifact = xzPipeline.Export()
|
||||
xzPipeline := manifest.NewXZ(buildPipeline, imagePipeline)
|
||||
xzPipeline.SetFilename(img.Filename)
|
||||
return xzPipeline.Export(), nil
|
||||
case "":
|
||||
// do nothing
|
||||
// don't compress, but make sure the pipeline's filename is set
|
||||
imagePipeline.SetFilename(img.Filename)
|
||||
return imagePipeline.Export(), nil
|
||||
default:
|
||||
// panic on unknown strings
|
||||
panic(fmt.Sprintf("unsupported compression type %q", img.Compression))
|
||||
}
|
||||
|
||||
return artifact, nil
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/image/ostree_archive.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/image/ostree_archive.go
generated
vendored
|
|
@ -56,11 +56,11 @@ func (img *OSTreeArchive) InstantiateManifest(m *manifest.Manifest,
|
|||
osPipeline.OSTreeRef = img.OSTreeRef
|
||||
osPipeline.InstallWeakDeps = img.InstallWeakDeps
|
||||
|
||||
ostreeCommitPipeline := manifest.NewOSTreeCommit(m, buildPipeline, osPipeline, img.OSTreeRef)
|
||||
ostreeCommitPipeline := manifest.NewOSTreeCommit(buildPipeline, osPipeline, img.OSTreeRef)
|
||||
ostreeCommitPipeline.OSVersion = img.OSVersion
|
||||
|
||||
tarPipeline := manifest.NewTar(m, buildPipeline, &ostreeCommitPipeline.Base, "commit-archive")
|
||||
tarPipeline.Filename = img.Filename
|
||||
tarPipeline := manifest.NewTar(buildPipeline, ostreeCommitPipeline, "commit-archive")
|
||||
tarPipeline.SetFilename(img.Filename)
|
||||
artifact := tarPipeline.Export()
|
||||
|
||||
return artifact, nil
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/image/ostree_container.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/image/ostree_container.go
generated
vendored
|
|
@ -54,7 +54,7 @@ func (img *OSTreeContainer) InstantiateManifest(m *manifest.Manifest,
|
|||
osPipeline.OSTreeRef = img.OSTreeRef
|
||||
osPipeline.OSTreeParent = img.OSTreeParent
|
||||
|
||||
commitPipeline := manifest.NewOSTreeCommit(m, buildPipeline, osPipeline, img.OSTreeRef)
|
||||
commitPipeline := manifest.NewOSTreeCommit(buildPipeline, osPipeline, img.OSTreeRef)
|
||||
commitPipeline.OSVersion = img.OSVersion
|
||||
|
||||
nginxConfigPath := "/etc/nginx.conf"
|
||||
|
|
@ -69,10 +69,10 @@ func (img *OSTreeContainer) InstantiateManifest(m *manifest.Manifest,
|
|||
listenPort)
|
||||
serverPipeline.Language = img.ContainerLanguage
|
||||
|
||||
containerPipeline := manifest.NewOCIContainer(m, buildPipeline, serverPipeline)
|
||||
containerPipeline := manifest.NewOCIContainer(buildPipeline, serverPipeline)
|
||||
containerPipeline.Cmd = []string{"nginx", "-c", nginxConfigPath}
|
||||
containerPipeline.ExposedPorts = []string{listenPort}
|
||||
containerPipeline.Filename = img.Filename
|
||||
containerPipeline.SetFilename(img.Filename)
|
||||
artifact := containerPipeline.Export()
|
||||
|
||||
return artifact, nil
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/osbuild/images/pkg/runner"
|
||||
)
|
||||
|
||||
type OSTreeRawImage struct {
|
||||
type OSTreeDiskImage struct {
|
||||
Base
|
||||
|
||||
Platform platform.Platform
|
||||
|
|
@ -39,32 +39,23 @@ type OSTreeRawImage struct {
|
|||
|
||||
Filename string
|
||||
|
||||
Compression string
|
||||
|
||||
Ignition bool
|
||||
Ignition bool
|
||||
IgnitionPlatform string
|
||||
Compression string
|
||||
|
||||
Directories []*fsnode.Directory
|
||||
Files []*fsnode.File
|
||||
}
|
||||
|
||||
func NewOSTreeRawImage(commit ostree.SourceSpec) *OSTreeRawImage {
|
||||
return &OSTreeRawImage{
|
||||
func NewOSTreeDiskImage(commit ostree.SourceSpec) *OSTreeDiskImage {
|
||||
return &OSTreeDiskImage{
|
||||
Base: NewBase("ostree-raw-image"),
|
||||
CommitSource: commit,
|
||||
}
|
||||
}
|
||||
|
||||
func ostreeCompressedImagePipelines(img *OSTreeRawImage, m *manifest.Manifest, buildPipeline *manifest.Build) *manifest.XZ {
|
||||
imagePipeline := baseRawOstreeImage(img, m, buildPipeline)
|
||||
|
||||
xzPipeline := manifest.NewXZ(m, buildPipeline, imagePipeline)
|
||||
xzPipeline.Filename = img.Filename
|
||||
|
||||
return xzPipeline
|
||||
}
|
||||
|
||||
func baseRawOstreeImage(img *OSTreeRawImage, m *manifest.Manifest, buildPipeline *manifest.Build) *manifest.RawOSTreeImage {
|
||||
osPipeline := manifest.NewOSTreeDeployment(m, buildPipeline, img.CommitSource, img.OSName, img.Ignition, img.Platform)
|
||||
func baseRawOstreeImage(img *OSTreeDiskImage, m *manifest.Manifest, buildPipeline *manifest.Build) *manifest.RawOSTreeImage {
|
||||
osPipeline := manifest.NewOSTreeDeployment(buildPipeline, m, img.CommitSource, img.OSName, img.Ignition, img.IgnitionPlatform, img.Platform)
|
||||
osPipeline.PartitionTable = img.PartitionTable
|
||||
osPipeline.Remote = img.Remote
|
||||
osPipeline.KernelOptionsAppend = img.KernelOptionsAppend
|
||||
|
|
@ -80,39 +71,48 @@ func baseRawOstreeImage(img *OSTreeRawImage, m *manifest.Manifest, buildPipeline
|
|||
osPipeline.EnabledServices = img.Workload.GetServices()
|
||||
osPipeline.DisabledServices = img.Workload.GetDisabledServices()
|
||||
|
||||
return manifest.NewRawOStreeImage(m, buildPipeline, img.Platform, osPipeline)
|
||||
return manifest.NewRawOStreeImage(buildPipeline, osPipeline, img.Platform)
|
||||
}
|
||||
|
||||
func (img *OSTreeRawImage) InstantiateManifest(m *manifest.Manifest,
|
||||
func (img *OSTreeDiskImage) InstantiateManifest(m *manifest.Manifest,
|
||||
repos []rpmmd.RepoConfig,
|
||||
runner runner.Runner,
|
||||
rng *rand.Rand) (*artifact.Artifact, error) {
|
||||
buildPipeline := manifest.NewBuild(m, runner, repos)
|
||||
buildPipeline.Checkpoint()
|
||||
|
||||
var art *artifact.Artifact
|
||||
// don't support compressing non-raw images
|
||||
imgFormat := img.Platform.GetImageFormat()
|
||||
if imgFormat == platform.FORMAT_UNSET {
|
||||
// treat unset as raw for this check
|
||||
imgFormat = platform.FORMAT_RAW
|
||||
}
|
||||
if imgFormat != platform.FORMAT_RAW && img.Compression != "" {
|
||||
panic(fmt.Sprintf("no compression is allowed with %q format for %q", imgFormat, img.name))
|
||||
}
|
||||
|
||||
baseImage := baseRawOstreeImage(img, m, buildPipeline)
|
||||
switch img.Platform.GetImageFormat() {
|
||||
case platform.FORMAT_VMDK:
|
||||
if img.Compression != "" {
|
||||
panic(fmt.Sprintf("no compression is allowed with VMDK format for %q", img.name))
|
||||
}
|
||||
ostreeBase := baseRawOstreeImage(img, m, buildPipeline)
|
||||
vmdkPipeline := manifest.NewVMDK(m, buildPipeline, nil, ostreeBase)
|
||||
vmdkPipeline.Filename = img.Filename
|
||||
art = vmdkPipeline.Export()
|
||||
vmdkPipeline := manifest.NewVMDK(buildPipeline, baseImage)
|
||||
vmdkPipeline.SetFilename(img.Filename)
|
||||
return vmdkPipeline.Export(), nil
|
||||
case platform.FORMAT_QCOW2:
|
||||
qcow2Pipeline := manifest.NewQCOW2(buildPipeline, baseImage)
|
||||
qcow2Pipeline.Compat = img.Platform.GetQCOW2Compat()
|
||||
qcow2Pipeline.SetFilename(img.Filename)
|
||||
return qcow2Pipeline.Export(), nil
|
||||
default:
|
||||
switch img.Compression {
|
||||
case "xz":
|
||||
ostreeCompressed := ostreeCompressedImagePipelines(img, m, buildPipeline)
|
||||
art = ostreeCompressed.Export()
|
||||
compressedImage := manifest.NewXZ(buildPipeline, baseImage)
|
||||
compressedImage.SetFilename(img.Filename)
|
||||
return compressedImage.Export(), nil
|
||||
case "":
|
||||
ostreeBase := baseRawOstreeImage(img, m, buildPipeline)
|
||||
ostreeBase.Filename = img.Filename
|
||||
art = ostreeBase.Export()
|
||||
baseImage.SetFilename(img.Filename)
|
||||
return baseImage.Export(), nil
|
||||
default:
|
||||
panic(fmt.Sprintf("unsupported compression type %q on %q", img.Compression, img.name))
|
||||
}
|
||||
}
|
||||
|
||||
return art, nil
|
||||
}
|
||||
27
vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go
generated
vendored
27
vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go
generated
vendored
|
|
@ -21,7 +21,7 @@ type OSTreeSimplifiedInstaller struct {
|
|||
Base
|
||||
|
||||
// Raw image that will be created and embedded
|
||||
rawImage *OSTreeRawImage
|
||||
rawImage *OSTreeDiskImage
|
||||
|
||||
Platform platform.Platform
|
||||
OSCustomizations manifest.OSCustomizations
|
||||
|
|
@ -60,7 +60,7 @@ type OSTreeSimplifiedInstaller struct {
|
|||
AdditionalDracutModules []string
|
||||
}
|
||||
|
||||
func NewOSTreeSimplifiedInstaller(rawImage *OSTreeRawImage, installDevice string) *OSTreeSimplifiedInstaller {
|
||||
func NewOSTreeSimplifiedInstaller(rawImage *OSTreeDiskImage, installDevice string) *OSTreeSimplifiedInstaller {
|
||||
return &OSTreeSimplifiedInstaller{
|
||||
Base: NewBase("ostree-simplified-installer"),
|
||||
rawImage: rawImage,
|
||||
|
|
@ -75,11 +75,11 @@ func (img *OSTreeSimplifiedInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
buildPipeline := manifest.NewBuild(m, runner, repos)
|
||||
buildPipeline.Checkpoint()
|
||||
|
||||
rawImageFilename := "image.raw.xz"
|
||||
imageFilename := "image.raw.xz"
|
||||
|
||||
// create the raw image
|
||||
img.rawImage.Filename = rawImageFilename
|
||||
rawImage := ostreeCompressedImagePipelines(img.rawImage, m, buildPipeline)
|
||||
// image in simplified installer is always compressed
|
||||
compressedImage := manifest.NewXZ(buildPipeline, baseRawOstreeImage(img.rawImage, m, buildPipeline))
|
||||
compressedImage.SetFilename(imageFilename)
|
||||
|
||||
coiPipeline := manifest.NewCoreOSInstaller(m,
|
||||
buildPipeline,
|
||||
|
|
@ -109,7 +109,7 @@ func (img *OSTreeSimplifiedInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
"coreos.inst.crypt_root=1",
|
||||
"coreos.inst.isoroot=" + isoLabel,
|
||||
"coreos.inst.install_dev=" + img.installDevice,
|
||||
fmt.Sprintf("coreos.inst.image_file=/run/media/iso/%s", rawImageFilename),
|
||||
fmt.Sprintf("coreos.inst.image_file=/run/media/iso/%s", imageFilename),
|
||||
"coreos.inst.insecure",
|
||||
}
|
||||
|
||||
|
|
@ -147,20 +147,15 @@ func (img *OSTreeSimplifiedInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
// enable ISOLinux on x86_64 only
|
||||
isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64
|
||||
|
||||
isoTreePipeline := manifest.NewCoreOSISOTree(m,
|
||||
buildPipeline,
|
||||
rawImage,
|
||||
coiPipeline,
|
||||
bootTreePipeline,
|
||||
isoLabel)
|
||||
isoTreePipeline := manifest.NewCoreOSISOTree(buildPipeline, compressedImage, coiPipeline, bootTreePipeline)
|
||||
isoTreePipeline.KernelOpts = kernelOpts
|
||||
isoTreePipeline.PartitionTable = rootfsPartitionTable
|
||||
isoTreePipeline.OSName = img.OSName
|
||||
isoTreePipeline.PayloadPath = fmt.Sprintf("/%s", rawImageFilename)
|
||||
isoTreePipeline.PayloadPath = fmt.Sprintf("/%s", imageFilename)
|
||||
isoTreePipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
isoPipeline := manifest.NewISO(m, buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.Filename = img.Filename
|
||||
isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, isoLabel)
|
||||
isoPipeline.SetFilename(img.Filename)
|
||||
isoPipeline.ISOLinux = isoLinuxEnabled
|
||||
|
||||
artifact := isoPipeline.Export()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue