blueprint: move partitioned-disk towards lorax parity

The main difference (according to image-info) is an additional package
containing a gpg key which was used to verify packages. The one
generated by lorax-composer doesn't have this, because it doesn't verify
signatures.

Also, lorax generates an image with a separate /boot partition. This is
not yet addressed here, because osbuild doesn't support it yet.
This commit is contained in:
Lars Karlitski 2019-10-29 03:12:37 +01:00 committed by Tom Gundersen
parent fe46fd3a89
commit d4e1ecea7e
3 changed files with 30 additions and 32 deletions

View file

@ -142,7 +142,7 @@ func TestFilenameFromType(t *testing.T) {
{ {
name: "partitioned-disk", name: "partitioned-disk",
args: args{"partitioned-disk"}, args: args{"partitioned-disk"},
want: "image.img", want: "disk.img",
want1: "application/octet-stream", want1: "application/octet-stream",
}, },
{ {

View file

@ -5,16 +5,30 @@ import "github.com/osbuild/osbuild-composer/internal/pipeline"
type diskOutput struct{} type diskOutput struct{}
func (t *diskOutput) translate(b *Blueprint) *pipeline.Pipeline { func (t *diskOutput) translate(b *Blueprint) *pipeline.Pipeline {
p := getF30Pipeline() packages := [...]string{
"@core",
"chrony",
"firewalld",
"grub2-pc",
"kernel",
"langpacks-en",
"selinux-policy-targeted",
}
excludedPackages := [...]string{
"dracut-config-rescue",
}
p := getCustomF30PackageSet(packages[:], excludedPackages[:])
addF30LocaleStage(p)
addF30FSTabStage(p) addF30FSTabStage(p)
addF30GRUB2Stage(p, b.getKernelCustomization()) addF30GRUB2Stage(p, b.getKernelCustomization())
addF30FixBlsStage(p)
addF30SELinuxStage(p) addF30SELinuxStage(p)
addF30QemuAssembler(p, "raw", t.getName()) addF30QemuAssembler(p, "raw", t.getName())
return p return p
} }
func (t *diskOutput) getName() string { func (t *diskOutput) getName() string {
return "image.img" return "disk.img"
} }
func (t *diskOutput) getMime() string { func (t *diskOutput) getMime() string {

View file

@ -43,24 +43,21 @@
} }
], ],
"packages": [ "packages": [
"@Core", "@core",
"chrony", "chrony",
"kernel", "firewalld",
"selinux-policy-targeted",
"grub2-pc", "grub2-pc",
"spice-vdagent", "kernel",
"qemu-guest-agent", "langpacks-en",
"xen-libs", "selinux-policy-targeted"
"langpacks-en" ],
"exclude_packages": [
"dracut-config-rescue"
], ],
"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 @@
"kernel_opts": "ro biosdevname=0 net.ifnames=0" "kernel_opts": "ro biosdevname=0 net.ifnames=0"
} }
}, },
{
"name": "org.osbuild.fix-bls",
"options": {}
},
{ {
"name": "org.osbuild.selinux", "name": "org.osbuild.selinux",
"options": { "options": {
@ -101,7 +102,7 @@
"name": "org.osbuild.qemu", "name": "org.osbuild.qemu",
"options": { "options": {
"format": "raw", "format": "raw",
"filename": "image.img", "filename": "disk.img",
"ptuuid": "0x14fc63d2", "ptuuid": "0x14fc63d2",
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac", "root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"size": 3221225472 "size": 3221225472
@ -211,7 +212,6 @@
"NetworkManager-1.16.0-1.fc30.x86_64", "NetworkManager-1.16.0-1.fc30.x86_64",
"NetworkManager-libnm-1.16.0-1.fc30.x86_64", "NetworkManager-libnm-1.16.0-1.fc30.x86_64",
"acl-2.2.53-3.fc30.x86_64", "acl-2.2.53-3.fc30.x86_64",
"alsa-lib-1.1.8-2.fc30.x86_64",
"alternatives-1.11-4.fc30.x86_64", "alternatives-1.11-4.fc30.x86_64",
"audit-3.0-0.7.20190326git03e7489.fc30.x86_64", "audit-3.0-0.7.20190326git03e7489.fc30.x86_64",
"audit-libs-3.0-0.7.20190326git03e7489.fc30.x86_64", "audit-libs-3.0-0.7.20190326git03e7489.fc30.x86_64",
@ -299,7 +299,6 @@
"gzip-1.9-9.fc30.x86_64", "gzip-1.9-9.fc30.x86_64",
"hardlink-1.3-8.fc30.x86_64", "hardlink-1.3-8.fc30.x86_64",
"hostname-3.20-8.fc30.x86_64", "hostname-3.20-8.fc30.x86_64",
"hwdata-0.322-1.fc30.noarch",
"ima-evm-utils-1.1-5.fc30.x86_64", "ima-evm-utils-1.1-5.fc30.x86_64",
"ipcalc-0.2.5-2.fc30.x86_64", "ipcalc-0.2.5-2.fc30.x86_64",
"iproute-5.0.0-2.fc30.x86_64", "iproute-5.0.0-2.fc30.x86_64",
@ -324,14 +323,6 @@
"krb5-libs-1.17-4.fc30.x86_64", "krb5-libs-1.17-4.fc30.x86_64",
"langpacks-en-1.0-17.fc30.noarch", "langpacks-en-1.0-17.fc30.noarch",
"less-530-4.fc30.x86_64", "less-530-4.fc30.x86_64",
"libX11-1.6.7-1.fc30.x86_64",
"libX11-common-1.6.7-1.fc30.noarch",
"libXau-1.0.9-1.fc30.x86_64",
"libXext-1.3.3-11.fc30.x86_64",
"libXfixes-5.0.3-9.fc30.x86_64",
"libXinerama-1.1.4-3.fc30.x86_64",
"libXrandr-1.5.1-9.fc30.x86_64",
"libXrender-0.9.10-9.fc30.x86_64",
"libacl-2.2.53-3.fc30.x86_64", "libacl-2.2.53-3.fc30.x86_64",
"libarchive-3.3.3-6.fc30.x86_64", "libarchive-3.3.3-6.fc30.x86_64",
"libargon2-20161029-8.fc30.x86_64", "libargon2-20161029-8.fc30.x86_64",
@ -379,7 +370,6 @@
"libnsl2-1.2.0-4.20180605git4a062cf.fc30.x86_64", "libnsl2-1.2.0-4.20180605git4a062cf.fc30.x86_64",
"libpath_utils-0.2.1-42.fc30.x86_64", "libpath_utils-0.2.1-42.fc30.x86_64",
"libpcap-1.9.0-3.fc30.x86_64", "libpcap-1.9.0-3.fc30.x86_64",
"libpciaccess-0.14-3.fc30.x86_64",
"libpipeline-1.5.1-2.fc30.x86_64", "libpipeline-1.5.1-2.fc30.x86_64",
"libpng-1.6.36-1.fc30.x86_64", "libpng-1.6.36-1.fc30.x86_64",
"libpsl-0.20.2-6.fc30.x86_64", "libpsl-0.20.2-6.fc30.x86_64",
@ -415,7 +405,6 @@
"libutempter-1.1.6-16.fc30.x86_64", "libutempter-1.1.6-16.fc30.x86_64",
"libuuid-2.33.2-1.fc30.x86_64", "libuuid-2.33.2-1.fc30.x86_64",
"libverto-0.3.0-7.fc30.x86_64", "libverto-0.3.0-7.fc30.x86_64",
"libxcb-1.13.1-2.fc30.x86_64",
"libxcrypt-4.4.4-2.fc30.x86_64", "libxcrypt-4.4.4-2.fc30.x86_64",
"libxkbcommon-0.8.3-1.fc30.x86_64", "libxkbcommon-0.8.3-1.fc30.x86_64",
"libxml2-2.9.9-2.fc30.x86_64", "libxml2-2.9.9-2.fc30.x86_64",
@ -488,7 +477,6 @@
"python3-slip-0.6.4-15.fc30.noarch", "python3-slip-0.6.4-15.fc30.noarch",
"python3-slip-dbus-0.6.4-15.fc30.noarch", "python3-slip-dbus-0.6.4-15.fc30.noarch",
"python3-unbound-1.8.3-4.fc30.x86_64", "python3-unbound-1.8.3-4.fc30.x86_64",
"qemu-guest-agent-3.1.0-6.fc30.x86_64",
"qrencode-libs-3.4.4-8.fc30.x86_64", "qrencode-libs-3.4.4-8.fc30.x86_64",
"readline-8.0-2.fc30.x86_64", "readline-8.0-2.fc30.x86_64",
"rootfiles-8.1-24.fc30.noarch", "rootfiles-8.1-24.fc30.noarch",
@ -504,7 +492,6 @@
"setup-2.13.3-1.fc30.noarch", "setup-2.13.3-1.fc30.noarch",
"shadow-utils-4.6-8.fc30.x86_64", "shadow-utils-4.6-8.fc30.x86_64",
"shared-mime-info-1.12-2.fc30.x86_64", "shared-mime-info-1.12-2.fc30.x86_64",
"spice-vdagent-0.18.0-3.fc30.x86_64",
"sqlite-libs-3.26.0-3.fc30.x86_64", "sqlite-libs-3.26.0-3.fc30.x86_64",
"sssd-client-2.1.0-2.fc30.x86_64", "sssd-client-2.1.0-2.fc30.x86_64",
"sssd-common-2.1.0-2.fc30.x86_64", "sssd-common-2.1.0-2.fc30.x86_64",
@ -526,12 +513,9 @@
"vim-minimal-8.1.1137-1.fc30.x86_64", "vim-minimal-8.1.1137-1.fc30.x86_64",
"which-2.21-14.fc30.x86_64", "which-2.21-14.fc30.x86_64",
"whois-nls-5.4.2-1.fc30.noarch", "whois-nls-5.4.2-1.fc30.noarch",
"xen-libs-4.11.1-4.fc30.x86_64",
"xen-licenses-4.11.1-4.fc30.x86_64",
"xkeyboard-config-2.24-5.fc30.noarch", "xkeyboard-config-2.24-5.fc30.noarch",
"xz-5.2.4-5.fc30.x86_64", "xz-5.2.4-5.fc30.x86_64",
"xz-libs-5.2.4-5.fc30.x86_64", "xz-libs-5.2.4-5.fc30.x86_64",
"yajl-2.1.0-12.fc30.x86_64",
"zchunk-libs-1.1.1-3.fc30.x86_64", "zchunk-libs-1.1.1-3.fc30.x86_64",
"zlib-1.2.11-15.fc30.x86_64" "zlib-1.2.11-15.fc30.x86_64"
], ],