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