Adjust VHD output to the Lorax one
This commit is contained in:
parent
81d9fef76a
commit
bf73ee019e
5 changed files with 51 additions and 40 deletions
|
|
@ -5,15 +5,6 @@ import "github.com/osbuild/osbuild-composer/internal/pipeline"
|
|||
type amiOutput struct{}
|
||||
|
||||
func (t *amiOutput) translate(b *Blueprint) *pipeline.Pipeline {
|
||||
p := &pipeline.Pipeline{
|
||||
BuildPipeline: getF30BuildPipeline(),
|
||||
}
|
||||
|
||||
options := &pipeline.DNFStageOptions{
|
||||
ReleaseVersion: "30",
|
||||
BaseArchitecture: "x86_64",
|
||||
}
|
||||
options.AddRepository(getF30Repository())
|
||||
packages := [...]string{
|
||||
"@Core",
|
||||
"chrony",
|
||||
|
|
@ -27,10 +18,7 @@ func (t *amiOutput) translate(b *Blueprint) *pipeline.Pipeline {
|
|||
"checkpolicy",
|
||||
"net-tools",
|
||||
}
|
||||
for _, pkg := range packages {
|
||||
options.AddPackage(pkg)
|
||||
}
|
||||
p.AddStage(pipeline.NewDNFStage(options))
|
||||
p := getCustomF30PackageSet(packages[:], []string{})
|
||||
addF30FixBlsStage(p)
|
||||
addF30LocaleStage(p)
|
||||
addF30FSTabStage(p)
|
||||
|
|
|
|||
|
|
@ -59,6 +59,25 @@ func getF30Pipeline() *pipeline.Pipeline {
|
|||
return p
|
||||
}
|
||||
|
||||
func getCustomF30PackageSet(packages []string, excludedPackages []string) *pipeline.Pipeline {
|
||||
p := &pipeline.Pipeline{
|
||||
BuildPipeline: getF30BuildPipeline(),
|
||||
}
|
||||
options := &pipeline.DNFStageOptions{
|
||||
ReleaseVersion: "30",
|
||||
BaseArchitecture: "x86_64",
|
||||
}
|
||||
options.AddRepository(getF30Repository())
|
||||
for _, pkg := range packages {
|
||||
options.AddPackage(pkg)
|
||||
}
|
||||
for _, pkg := range excludedPackages {
|
||||
options.ExcludePackage(pkg)
|
||||
}
|
||||
p.AddStage(pipeline.NewDNFStage(options))
|
||||
return p
|
||||
}
|
||||
|
||||
func addF30GRUB2Stage(p *pipeline.Pipeline) {
|
||||
id, err := uuid.Parse("76a22bf4-f153-4541-b6c7-0332c0dfaeac")
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -43,19 +43,16 @@
|
|||
"kernel",
|
||||
"selinux-policy-targeted",
|
||||
"grub2-pc",
|
||||
"spice-vdagent",
|
||||
"qemu-guest-agent",
|
||||
"xen-libs",
|
||||
"langpacks-en"
|
||||
"langpacks-en",
|
||||
"net-tools",
|
||||
"ntfsprogs",
|
||||
"WALinuxAgent",
|
||||
"libxcrypt-compat"
|
||||
],
|
||||
"releasever": "30",
|
||||
"basearch": "x86_64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "org.osbuild.fix-bls",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"name": "org.osbuild.locale",
|
||||
"options": {
|
||||
|
|
@ -90,6 +87,10 @@
|
|||
"options": {
|
||||
"file_contexts": "etc/selinux/targeted/contexts/files/file_contexts"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "org.osbuild.fix-bls",
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"assembler": {
|
||||
|
|
|
|||
|
|
@ -5,35 +5,24 @@ import "github.com/osbuild/osbuild-composer/internal/pipeline"
|
|||
type qcow2Output struct{}
|
||||
|
||||
func (t *qcow2Output) translate(b *Blueprint) *pipeline.Pipeline {
|
||||
p := &pipeline.Pipeline{
|
||||
BuildPipeline: getF30BuildPipeline(),
|
||||
}
|
||||
|
||||
options := &pipeline.DNFStageOptions{
|
||||
ReleaseVersion: "30",
|
||||
BaseArchitecture: "x86_64",
|
||||
}
|
||||
options.AddRepository(getF30Repository())
|
||||
packages := [...]string{"kernel-core",
|
||||
packages := [...]string{
|
||||
"kernel-core",
|
||||
"@Fedora Cloud Server",
|
||||
"chrony",
|
||||
"polkit",
|
||||
"systemd-udev",
|
||||
"selinux-policy-targeted",
|
||||
"grub2-pc",
|
||||
"langpacks-en"}
|
||||
for _, pkg := range packages {
|
||||
options.AddPackage(pkg)
|
||||
"langpacks-en",
|
||||
}
|
||||
excludedPackages := [...]string{"dracut-config-rescue",
|
||||
excludedPackages := [...]string{
|
||||
"dracut-config-rescue",
|
||||
"etables",
|
||||
"firewalld",
|
||||
"gobject-introspection",
|
||||
"plymouth"}
|
||||
for _, pkg := range excludedPackages {
|
||||
options.ExcludePackage(pkg)
|
||||
"plymouth",
|
||||
}
|
||||
p.AddStage(pipeline.NewDNFStage(options))
|
||||
p := getCustomF30PackageSet(packages[:], excludedPackages[:])
|
||||
addF30LocaleStage(p)
|
||||
addF30FSTabStage(p)
|
||||
addF30GRUB2Stage(p)
|
||||
|
|
|
|||
|
|
@ -5,10 +5,24 @@ import "github.com/osbuild/osbuild-composer/internal/pipeline"
|
|||
type vhdOutput struct{}
|
||||
|
||||
func (t *vhdOutput) translate(b *Blueprint) *pipeline.Pipeline {
|
||||
p := getF30Pipeline()
|
||||
packages := [...]string{
|
||||
"@Core",
|
||||
"chrony",
|
||||
"kernel",
|
||||
"selinux-policy-targeted",
|
||||
"grub2-pc",
|
||||
"langpacks-en",
|
||||
"net-tools",
|
||||
"ntfsprogs",
|
||||
"WALinuxAgent",
|
||||
"libxcrypt-compat",
|
||||
}
|
||||
p := getCustomF30PackageSet(packages[:], []string{})
|
||||
addF30LocaleStage(p)
|
||||
addF30FSTabStage(p)
|
||||
addF30GRUB2Stage(p)
|
||||
addF30SELinuxStage(p)
|
||||
addF30FixBlsStage(p)
|
||||
addF30QemuAssembler(p, "qcow2", t.getName())
|
||||
return p
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue