From 07367ece762194e3649c63ea3ac02ed01f52017a Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 24 Nov 2020 16:59:12 +0100 Subject: [PATCH] Clean up package installation Remove duplicate items from pkg-map and uninstall build-time dependencies after building the image. Uninstall cloud-init, tuned and teamd in post-install since they may get pulled by other elements. Uninstall GObject components and mozjs which seem to be included. Remove non-existing cronie. Change-Id: I656c7524d8f543056194207fab371c6e313f9548 --- .../package-installs.yaml | 33 ++++++++++++++----- dib/ironic-python-agent-ramdisk/pkg-map | 22 +++---------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/dib/ironic-python-agent-ramdisk/package-installs.yaml b/dib/ironic-python-agent-ramdisk/package-installs.yaml index 1da0ef5..3b4206c 100644 --- a/dib/ironic-python-agent-ramdisk/package-installs.yaml +++ b/dib/ironic-python-agent-ramdisk/package-installs.yaml @@ -7,8 +7,9 @@ iptables: lshw: ipmitool: qemu-utils: +# NOTE(dtantsur): gcc is not build-only because dkms requires it gcc: -python-dev: +python: parted: hdparm: util-linux: @@ -22,22 +23,34 @@ efibootmgr: efivar: chrony: e2fsprogs: + libffi-dev: build-only: true libssl-dev: build-only: true +python-dev: + build-only: true # The base minimum element uninstalls firmware, but it's needed for bare metal. linux-firmware: phase: post-install.d when: IPA_DISTRO_FAMILY = rh +# Packages that should not normally be present on IPA images +cloud-init: + phase: post-install.d + uninstall: true +teamd: + phase: post-install.d + uninstall: true + when: IPA_DISTRO_FAMILY = rh +tuned: + phase: post-install.d + uninstall: true + when: IPA_DISTRO_FAMILY = rh + # Unnecessary packages to remove. We run all removals in pre-install phase, to # avoid breaking installs that happen in install phase. - -cloud-init: - phase: pre-install.d - uninstall: true git: phase: pre-install.d uninstall: true @@ -49,11 +62,11 @@ rsync: uninstall: true # Distro-specific uninstalls -cronie: +kernel-debug-devel: phase: pre-install.d uninstall: true when: IPA_DISTRO_FAMILY = rh -kernel-debug-devel: +mozjs60: phase: pre-install.d uninstall: true when: IPA_DISTRO_FAMILY = rh @@ -61,7 +74,11 @@ plymouth: phase: pre-install.d uninstall: true when: IPA_DISTRO_FAMILY = rh -teamd: +python3-cairo: + phase: pre-install.d + uninstall: true + when: IPA_DISTRO_FAMILY = rh +python3-gobject-base: phase: pre-install.d uninstall: true when: IPA_DISTRO_FAMILY = rh diff --git a/dib/ironic-python-agent-ramdisk/pkg-map b/dib/ironic-python-agent-ramdisk/pkg-map index c591e92..c95dfd8 100644 --- a/dib/ironic-python-agent-ramdisk/pkg-map +++ b/dib/ironic-python-agent-ramdisk/pkg-map @@ -3,25 +3,20 @@ "rhel": { "8": { "tgt": "target-restore", - "curl": "curl", - "ironic-python-agent": "openstack-ironic-python-agent", - "libffi-dev": "libffi-devel", - "qemu-utils": "qemu-img", + "python": "python3", "python-dev": "python3-devel" } }, "centos": { "8": { "tgt": "target-restore", - "curl": "curl", - "ironic-python-agent": "openstack-ironic-python-agent", - "libffi-dev": "libffi-devel", - "qemu-utils": "qemu-img", + "python": "python3", "python-dev": "python3-devel" } }, "ubuntu": { "bionic": { + "python": "python3", "python-dev": "python3-dev" } } @@ -29,24 +24,17 @@ "family": { "redhat": { "tgt": "scsi-target-utils", - "curl": "curl", - "ironic-python-agent": "openstack-ironic-python-agent", "libffi-dev": "libffi-devel", "libssl-dev": "openssl-devel", "qemu-utils": "qemu-img", "python-dev": "python-devel" }, "debian": { - "tgt": "tgt", - "curl": "curl", + "python": "python3", "python-dev": "python3-dev" } }, "default": { - "tgt": "tgt", - "curl": "curl", - "ironic-python-agent": "openstack-ironic-python-agent", - "qemu-utils": "qemu-utils", - "python-dev": "python-dev" + "ironic-python-agent": "openstack-ironic-python-agent" } }