From 96a86c132c115d865383eaaf909a46036b5ef6c3 Mon Sep 17 00:00:00 2001 From: James Pace Date: Thu, 22 Dec 2022 16:08:31 -0500 Subject: [PATCH] More slimming, largely of variables. --- Makefile | 15 --------- images/minimal.mpp.yml | 6 ---- include/build.ipp.yml | 22 ------------- include/defaults.ipp.yml | 67 +--------------------------------------- include/image.ipp.yml | 3 +- 5 files changed, 3 insertions(+), 110 deletions(-) diff --git a/Makefile b/Makefile index 3672059..3f6309f 100644 --- a/Makefile +++ b/Makefile @@ -66,9 +66,7 @@ help: @echo @echo Other extensions are also supported: @echo \ \* .repo: Generate a repo with an ostree commit \(only works for ostree targets\) - @echo \ \* .rootfs: Generate a directory with the rootfs content @echo \ \* .tar: Generate a tar file with the rootfs content - @echo \ \* .ext4: Generate an ext4 filesystem with the rootfs content \(size from \"image_size\"\) @echo \ \* oci.tar: Generate an oci container image with the rootfs content @echo @echo You can pass variable declarations to osbuild-mpp with the DEFINES make variable. @@ -76,9 +74,6 @@ help: @echo For example, to add extra rpms to a minimal regular image, use: @echo " make cs9-qemu-minimal-regular.$(HOST_ARCH).qcow2 DEFINES='extra_rpms=[\"gdb\",\"strace\"]'" @echo - @echo To easily run the image with qemu, you can use the included runvm tool, like: - @echo \ \ ./runvm cs9-qemu-minimal-regular.$(HOST_ARCH).qcow2 - @echo @echo There are some additional targets: @echo \ \ manifests: generates resolved json manifests for all images without building them. @echo \ \ clean_caches: Removes intermediate image build artifacts \(that improve rebuild speed\) @@ -86,8 +81,6 @@ help: @echo \ \ clean: Run clean_caches and clean_downloads @echo @echo There are also some common conversion rules: - @echo \ \ foo.ext4.simg will build foo.ext4 and then convert it with img2simg - @echo \ \ foo.simg will build foo.img and then convert it with img2simg @echo \ \ foo.tar.gz will build $foo.tar and then gzip it @echo @echo "When building a custom variant of an image (say with an extra package) you can use a" @@ -180,13 +173,5 @@ clean: clean_downloads clean_caches VM_SUDO=sudo VM_OSBUILD=sudo osbuild -%.ext4.simg : %.ext4 - img2simg $< $@ - rm $< - -%.simg : %.img - img2simg $< $@ - rm $< - %.tar.gz : %.tar gzip -f $< diff --git a/images/minimal.mpp.yml b/images/minimal.mpp.yml index 6a5f5b2..84f5f8e 100644 --- a/images/minimal.mpp.yml +++ b/images/minimal.mpp.yml @@ -47,12 +47,6 @@ pipelines: - type: org.osbuild.locale options: language: en_US.UTF-8 - - type: org.osbuild.users - options: - users: - guest: - password: - mpp-eval: guest_password - type: org.osbuild.systemd options: enabled_services: diff --git a/include/build.ipp.yml b/include/build.ipp.yml index 80c519b..f858218 100644 --- a/include/build.ipp.yml +++ b/include/build.ipp.yml @@ -3,28 +3,6 @@ version: '2' mpp-vars: distro_name: cs9 # The default -mpp-define-image: - size: $image_size - table: - uuid: $parttab_uuid - label: $partition_label - partitions: - - id: efi - start: - mpp-eval: "0 if partition_label == 'gpt' else 2048" - size: $efipart_size - type: - mpp-eval: "'C12A7328-F81F-11D2-BA4B-00A0C93EC93B' if partition_label == 'gpt' else 'ef'" - uuid: $efipart_uuid - - id: boot - size: $bootpart_size - type: - mpp-eval: "'0FC63DAF-8483-4772-8E79-3D69D8477DE4' if partition_label == 'gpt' else '83'" - uuid: $bootpart_uuid - - id: root - type: - mpp-eval: "'0FC63DAF-8483-4772-8E79-3D69D8477DE4' if partition_label == 'gpt' else '83'" - uuid: $rootpart_uuid pipelines: - mpp-import-pipelines: path: distro/$distro_name.ipp.yml diff --git a/include/defaults.ipp.yml b/include/defaults.ipp.yml index cadfa99..12efd08 100644 --- a/include/defaults.ipp.yml +++ b/include/defaults.ipp.yml @@ -5,36 +5,17 @@ mpp-vars: default_ostree_ref: $distro_name/$arch/$target-$name default_ostree_os_version: $distro_version default_osname: centos - default_uefi_vendor: centos default_kernel_rpm: kernel default_linux_firmware_rpm: linux-firmware - default_partition_label: gpt default_extra_rpms: [] default_extra_build_rpms: [] default_extra_repos: [] default_target_repos: [] - default_root_password: $6$xoLqEUz0cGGJRx01$H3H/bFm0myJPULNMtbSsOFd/2BnHqHkMD92Sfxd.EKM9hXTWSmELG8cf205l6dktomuTcgKGGtGDgtvHVXSWU. - default_guest_password: $6$xoLqEUz0cGGJRx01$H3H/bFm0myJPULNMtbSsOFd/2BnHqHkMD92Sfxd.EKM9hXTWSmELG8cf205l6dktomuTcgKGGtGDgtvHVXSWU. - default_root_ssh_key: "" - default_ssh_permit_root_login: false - default_image_size: '8589934592' - default_efipart_size: 204800 - default_bootpart_size: 614400 - default_kernel_loglevel: 4 static_uuids: mpp-eval: locals().get('static_uuids', True) default_rootfs_uuid: mpp-eval: ('76a22bf4-f153-4541-b6c7-0332c0dfaeac' if static_uuids else str(__import__('uuid').uuid4())) - default_bootfs_uuid: - mpp-eval: ('156f0420-627b-4151-ae6f-fda298097515' if static_uuids else str(__import__('uuid').uuid4())) - default_parttab_uuid: - mpp-eval: ('d209c89e-ea5e-4fbd-b161-b461cce297e0' if static_uuids else str(__import__('uuid').uuid4())) - default_efipart_uuid: - mpp-eval: ('68b2905b-df3e-4fb3-80fa-49d1e773aa33' if static_uuids else str(__import__('uuid').uuid4())) - default_bootpart_uuid: - mpp-eval: ('61b2905b-df3e-4fb3-80fa-49d1e773aa32' if static_uuids else str(__import__('uuid').uuid4())) - default_rootpart_uuid: - mpp-eval: ('6264d520-3fb9-423f-8ab8-7a0a8e3d3562' if static_uuids else str(__import__('uuid').uuid4())) + default_kernel_loglevel: 4 default_use_efi_runtime: true default_kernel_opts: - console=tty0 @@ -86,10 +67,6 @@ mpp-vars: mpp-eval: locals().get('ostree_os_version', default_ostree_os_version) osname: mpp-eval: locals().get('osname', default_osname) - uefi_vendor: - mpp-eval: locals().get('uefi_vendor', default_uefi_vendor) - partition_label: - mpp-eval: locals().get('partition_label', default_partition_label) extra_rpms: mpp-eval: locals().get('extra_rpms', default_extra_rpms) extra_build_rpms: @@ -98,26 +75,10 @@ mpp-vars: mpp-eval: locals().get('extra_repos', default_extra_repos) target_repos: mpp-eval: locals().get('target_repos', default_target_repos) - image_size: - mpp-eval: locals().get('image_size', default_image_size) rootfs_uuid: mpp-eval: locals().get('rootfs_uuid', default_rootfs_uuid) - bootfs_uuid: - mpp-eval: locals().get('bootfs_uuid', default_bootfs_uuid) - parttab_uuid: - mpp-eval: locals().get('parttab_uuid', default_parttab_uuid) - rootpart_uuid: - mpp-eval: locals().get('rootpart_uuid', default_rootpart_uuid) - bootpart_uuid: - mpp-eval: locals().get('bootpart_uuid', default_bootpart_uuid) - efipart_uuid: - mpp-eval: locals().get('efipart_uuid', default_efipart_uuid) kernel_opts: mpp-eval: locals().get('kernel_opts', default_kernel_opts) - efipart_size: - mpp-eval: locals().get('efipart_size', default_efipart_size) - bootpart_size: - mpp-eval: locals().get('bootpart_size', default_bootpart_size) dracut_add_modules: mpp-eval: locals().get('dracut_add_modules', default_dracut_add_modules) dracut_omit_modules: @@ -128,14 +89,6 @@ mpp-vars: mpp-eval: locals().get('dracut_add_drivers', default_dracut_add_drivers) dracut_install: mpp-eval: locals().get('dracut_install', default_dracut_install) - root_password: - mpp-eval: locals().get('root_password', default_root_password) - root_ssh_key: - mpp-eval: locals().get('root_ssh_key', default_root_ssh_key) - ssh_permit_root_login: - mpp-eval: locals().get('ssh_permit_root_login', default_ssh_permit_root_login) - guest_password: - mpp-eval: locals().get('guest_password', default_guest_password) ostree_repo_url: mpp-eval: locals().get('ostree_repo_url', default_ostree_repo_url) ostree_remote_name: @@ -237,24 +190,6 @@ mpp-vars: iA== =+Gxh -----END PGP PUBLIC KEY BLOCK----- - fstab: - - uuid: - mpp-eval: rootfs_uuid - vfs_type: ext4 - path: / - freq: 1 - passno: 1 - - label: ESP - vfs_type: vfat - path: /boot/efi - freq: 1 - passno: 1 - - uuid: - mpp-eval: bootfs_uuid - vfs_type: ext4 - path: /boot - freq: 1 - passno: 1 build_rpms: - dnf - dosfstools diff --git a/include/image.ipp.yml b/include/image.ipp.yml index dab0acc..044269a 100644 --- a/include/image.ipp.yml +++ b/include/image.ipp.yml @@ -11,7 +11,8 @@ mpp-vars: then: efi=runtime - mpp-eval: kernel_opts pipelines: -# Import pipeline with ostree specifics. + +# ostree pipeline is in other file. - mpp-import-pipelines: path: image-ostree.ipp.yml