From d4e1ecea7e11acf9344af2ed177efa53cd536d6c Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Tue, 29 Oct 2019 03:12:37 +0100 Subject: [PATCH] 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. --- internal/blueprint/blueprint_test.go | 2 +- internal/blueprint/disk_output.go | 18 +++++++- .../pipelines/disk_empty_blueprint.json | 42 ++++++------------- 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/internal/blueprint/blueprint_test.go b/internal/blueprint/blueprint_test.go index 16723449f..cc5db3f43 100644 --- a/internal/blueprint/blueprint_test.go +++ b/internal/blueprint/blueprint_test.go @@ -142,7 +142,7 @@ func TestFilenameFromType(t *testing.T) { { name: "partitioned-disk", args: args{"partitioned-disk"}, - want: "image.img", + want: "disk.img", want1: "application/octet-stream", }, { diff --git a/internal/blueprint/disk_output.go b/internal/blueprint/disk_output.go index 4908c8405..65509f523 100644 --- a/internal/blueprint/disk_output.go +++ b/internal/blueprint/disk_output.go @@ -5,16 +5,30 @@ import "github.com/osbuild/osbuild-composer/internal/pipeline" type diskOutput struct{} 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) addF30GRUB2Stage(p, b.getKernelCustomization()) + addF30FixBlsStage(p) addF30SELinuxStage(p) addF30QemuAssembler(p, "raw", t.getName()) return p } func (t *diskOutput) getName() string { - return "image.img" + return "disk.img" } func (t *diskOutput) getMime() string { diff --git a/tools/test_image_info/pipelines/disk_empty_blueprint.json b/tools/test_image_info/pipelines/disk_empty_blueprint.json index d98c7dfc2..dd2ce4587 100644 --- a/tools/test_image_info/pipelines/disk_empty_blueprint.json +++ b/tools/test_image_info/pipelines/disk_empty_blueprint.json @@ -43,24 +43,21 @@ } ], "packages": [ - "@Core", + "@core", "chrony", - "kernel", - "selinux-policy-targeted", + "firewalld", "grub2-pc", - "spice-vdagent", - "qemu-guest-agent", - "xen-libs", - "langpacks-en" + "kernel", + "langpacks-en", + "selinux-policy-targeted" + ], + "exclude_packages": [ + "dracut-config-rescue" ], "releasever": "30", "basearch": "x86_64" } }, - { - "name": "org.osbuild.fix-bls", - "options": {} - }, { "name": "org.osbuild.locale", "options": { @@ -90,6 +87,10 @@ "kernel_opts": "ro biosdevname=0 net.ifnames=0" } }, + { + "name": "org.osbuild.fix-bls", + "options": {} + }, { "name": "org.osbuild.selinux", "options": { @@ -101,7 +102,7 @@ "name": "org.osbuild.qemu", "options": { "format": "raw", - "filename": "image.img", + "filename": "disk.img", "ptuuid": "0x14fc63d2", "root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac", "size": 3221225472 @@ -211,7 +212,6 @@ "NetworkManager-1.16.0-1.fc30.x86_64", "NetworkManager-libnm-1.16.0-1.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", "audit-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", "hardlink-1.3-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", "ipcalc-0.2.5-2.fc30.x86_64", "iproute-5.0.0-2.fc30.x86_64", @@ -324,14 +323,6 @@ "krb5-libs-1.17-4.fc30.x86_64", "langpacks-en-1.0-17.fc30.noarch", "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", "libarchive-3.3.3-6.fc30.x86_64", "libargon2-20161029-8.fc30.x86_64", @@ -379,7 +370,6 @@ "libnsl2-1.2.0-4.20180605git4a062cf.fc30.x86_64", "libpath_utils-0.2.1-42.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", "libpng-1.6.36-1.fc30.x86_64", "libpsl-0.20.2-6.fc30.x86_64", @@ -415,7 +405,6 @@ "libutempter-1.1.6-16.fc30.x86_64", "libuuid-2.33.2-1.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", "libxkbcommon-0.8.3-1.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-dbus-0.6.4-15.fc30.noarch", "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", "readline-8.0-2.fc30.x86_64", "rootfiles-8.1-24.fc30.noarch", @@ -504,7 +492,6 @@ "setup-2.13.3-1.fc30.noarch", "shadow-utils-4.6-8.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", "sssd-client-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", "which-2.21-14.fc30.x86_64", "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", "xz-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", "zlib-1.2.11-15.fc30.x86_64" ],