distro/rhel8: update tar image to new definitions
This commit is contained in:
parent
7bf6f0ca66
commit
8fa3f6cc5c
3 changed files with 23 additions and 18 deletions
|
|
@ -36,7 +36,6 @@ func tarImgType() imageType {
|
||||||
filename: "root.tar.xz",
|
filename: "root.tar.xz",
|
||||||
mimeType: "application/x-tar",
|
mimeType: "application/x-tar",
|
||||||
packageSets: map[string]packageSetFunc{
|
packageSets: map[string]packageSetFunc{
|
||||||
buildPkgsKey: distroBuildPackageSet,
|
|
||||||
osPkgsKey: func(t *imageType) rpmmd.PackageSet {
|
osPkgsKey: func(t *imageType) rpmmd.PackageSet {
|
||||||
return rpmmd.PackageSet{
|
return rpmmd.PackageSet{
|
||||||
Include: []string{"policycoreutils", "selinux-policy-targeted"},
|
Include: []string{"policycoreutils", "selinux-policy-targeted"},
|
||||||
|
|
@ -47,10 +46,10 @@ func tarImgType() imageType {
|
||||||
packageSetChains: map[string][]string{
|
packageSetChains: map[string][]string{
|
||||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||||
},
|
},
|
||||||
pipelines: tarPipelines,
|
image: tarImage,
|
||||||
buildPipelines: []string{"build"},
|
buildPipelines: []string{"build"},
|
||||||
payloadPipelines: []string{"os", "root-tar"},
|
payloadPipelines: []string{"os", "archive"},
|
||||||
exports: []string{"root-tar"},
|
exports: []string{"archive"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,3 +197,23 @@ func liveImage(workload workload.Workload,
|
||||||
|
|
||||||
return img, nil
|
return img, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func tarImage(workload workload.Workload,
|
||||||
|
t *imageType,
|
||||||
|
customizations *blueprint.Customizations,
|
||||||
|
options distro.ImageOptions,
|
||||||
|
packageSets map[string]rpmmd.PackageSet,
|
||||||
|
containers []container.Spec,
|
||||||
|
rng *rand.Rand) (image.ImageKind, error) {
|
||||||
|
|
||||||
|
img := image.NewArchive()
|
||||||
|
img.Platform = t.platform
|
||||||
|
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], options, containers, customizations)
|
||||||
|
img.Environment = t.environment
|
||||||
|
img.Workload = workload
|
||||||
|
|
||||||
|
img.Filename = t.Filename()
|
||||||
|
|
||||||
|
return img, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,20 +28,6 @@ func prependKernelCmdlineStage(pipeline *osbuild.Pipeline, t *imageType, pt *dis
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func tarPipelines(t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSetSpecs map[string][]rpmmd.PackageSpec, containers []container.Spec, rng *rand.Rand) ([]osbuild.Pipeline, error) {
|
|
||||||
pipelines := make([]osbuild.Pipeline, 0)
|
|
||||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey], t.arch.distro.runner.String()))
|
|
||||||
|
|
||||||
treePipeline, err := osPipeline(t, repos, packageSetSpecs[osPkgsKey], containers, customizations, options, nil)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
pipelines = append(pipelines, *treePipeline)
|
|
||||||
tarPipeline := tarArchivePipeline("root-tar", treePipeline.Name, &osbuild.TarStageOptions{Filename: "root.tar.xz"})
|
|
||||||
pipelines = append(pipelines, *tarPipeline)
|
|
||||||
return pipelines, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// makeISORootPath return a path that can be used to address files and folders in
|
// makeISORootPath return a path that can be used to address files and folders in
|
||||||
// the root of the iso
|
// the root of the iso
|
||||||
func makeISORootPath(p string) string {
|
func makeISORootPath(p string) string {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue