distro/rhel85: move payloads to iso root
Move the ostree repository and the tar image to the root of the boot iso. This has several advantages: we do no longer have to correctly guess the size of the anaconda image. Also we do not need to compress the payload within the squashfs. Update the image installer's test data. NB: the changes to the package list were introduced earlier and should mostly affect the build pipeline. Should have caught is in the corresponding change, but was apparently not picked up by CI.
This commit is contained in:
parent
63fe1c4c83
commit
3dfc997992
3 changed files with 3045 additions and 107 deletions
6
docs/news/unreleased/bootiso-payload-in-iso-root.md
Normal file
6
docs/news/unreleased/bootiso-payload-in-iso-root.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Bootiso: move payload to iso root
|
||||
|
||||
Instead of including the payload, i.e. ostree commits or live images,
|
||||
in the anaconda squashfs, they are now located at the root of the iso.
|
||||
This has several advantages, including shorter build times, more
|
||||
flexibility in payload size and easier access to the actual payload.
|
||||
|
|
@ -3,6 +3,7 @@ package rhel85
|
|||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
|
|
@ -482,14 +483,23 @@ func tarPipelines(t *imageType, customizations *blueprint.Customizations, option
|
|||
return pipelines, nil
|
||||
}
|
||||
|
||||
//makeISORootPath return a path that can be used to address files and folders in
|
||||
//the root of the iso
|
||||
func makeISORootPath(p string) string {
|
||||
fullpath := path.Join("/run/install/repo", p)
|
||||
return fmt.Sprintf("file://%s", fullpath)
|
||||
}
|
||||
|
||||
func edgeInstallerPipelines(t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSetSpecs map[string][]rpmmd.PackageSpec, rng *rand.Rand) ([]osbuild.Pipeline, error) {
|
||||
pipelines := make([]osbuild.Pipeline, 0)
|
||||
pipelines = append(pipelines, *buildPipeline(repos, packageSetSpecs[buildPkgsKey]))
|
||||
installerPackages := packageSetSpecs[installerPkgsKey]
|
||||
kernelVer := kernelVerStr(installerPackages, "kernel", t.Arch().Name())
|
||||
ostreeRepoPath := "/ostree/repo"
|
||||
pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), ostreePayloadStages(options, ostreeRepoPath)))
|
||||
pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), ostreeKickstartStageOptions(fmt.Sprintf("file://%s", ostreeRepoPath), options.OSTree.Ref)))
|
||||
payloadStages := ostreePayloadStages(options, ostreeRepoPath)
|
||||
kickstartOptions := ostreeKickstartStageOptions(makeISORootPath(ostreeRepoPath), options.OSTree.Ref)
|
||||
pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name()))
|
||||
pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), kickstartOptions, payloadStages))
|
||||
pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name(), false))
|
||||
return pipelines, nil
|
||||
}
|
||||
|
|
@ -520,8 +530,9 @@ func tarInstallerPipelines(t *imageType, customizations *blueprint.Customization
|
|||
|
||||
tarPath := "/liveimg.tar"
|
||||
tarPayloadStages := []*osbuild.Stage{tarStage("os", tarPath)}
|
||||
pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name(), tarPayloadStages))
|
||||
pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), tarKickstartStageOptions(fmt.Sprintf("file://%s", tarPath))))
|
||||
kickstartOptions := tarKickstartStageOptions(makeISORootPath(tarPath))
|
||||
pipelines = append(pipelines, *anacondaTreePipeline(repos, installerPackages, kernelVer, t.Arch().Name()))
|
||||
pipelines = append(pipelines, *bootISOTreePipeline(kernelVer, t.Arch().Name(), kickstartOptions, tarPayloadStages))
|
||||
pipelines = append(pipelines, *bootISOPipeline(t.Filename(), t.Arch().Name(), true))
|
||||
return pipelines, nil
|
||||
}
|
||||
|
|
@ -1139,14 +1150,11 @@ func ostreeDeployPipeline(
|
|||
return p
|
||||
}
|
||||
|
||||
func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, kernelVer string, arch string, payloadStages []*osbuild.Stage) *osbuild.Pipeline {
|
||||
func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec, kernelVer string, arch string) *osbuild.Pipeline {
|
||||
p := new(osbuild.Pipeline)
|
||||
p.Name = "anaconda-tree"
|
||||
p.Build = "name:build"
|
||||
p.AddStage(osbuild.NewRPMStage(rpmStageOptions(repos), rpmStageInputs(packages)))
|
||||
for _, stage := range payloadStages {
|
||||
p.AddStage(stage)
|
||||
}
|
||||
p.AddStage(osbuild.NewBuildstampStage(buildStampStageOptions(arch)))
|
||||
p.AddStage(osbuild.NewLocaleStage(&osbuild.LocaleStageOptions{Language: "en_US.UTF-8"}))
|
||||
|
||||
|
|
@ -1184,7 +1192,7 @@ func anacondaTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec
|
|||
return p
|
||||
}
|
||||
|
||||
func bootISOTreePipeline(kernelVer string, arch string, ksOptions *osbuild.KickstartStageOptions) *osbuild.Pipeline {
|
||||
func bootISOTreePipeline(kernelVer string, arch string, ksOptions *osbuild.KickstartStageOptions, payloadStages []*osbuild.Stage) *osbuild.Pipeline {
|
||||
p := new(osbuild.Pipeline)
|
||||
p.Name = "bootiso-tree"
|
||||
p.Build = "name:build"
|
||||
|
|
@ -1193,6 +1201,10 @@ func bootISOTreePipeline(kernelVer string, arch string, ksOptions *osbuild.Kicks
|
|||
p.AddStage(osbuild.NewKickstartStage(ksOptions))
|
||||
p.AddStage(osbuild.NewDiscinfoStage(discinfoStageOptions(arch)))
|
||||
|
||||
for _, stage := range payloadStages {
|
||||
p.AddStage(stage)
|
||||
}
|
||||
|
||||
return p
|
||||
}
|
||||
func bootISOPipeline(filename string, arch string, isolinux bool) *osbuild.Pipeline {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue