From 754118aaea976659aed9f8625870d0bb5f981a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Wed, 15 Jan 2025 16:23:50 +0100 Subject: [PATCH] rhel10: convert package sets to yaml definitions This commit moves all os pipeline packages to the new definition format. There should be no functional changes in images. --- definitions/centos/10/generic/ami.yaml | 51 ++++++++++++ definitions/centos/10/generic/gce.yaml | 78 ++++++++++++++++++ .../centos/10/generic/image-installer.yaml | 58 +++++++++++++ definitions/centos/10/generic/oci.yaml | 2 + definitions/centos/10/generic/ova.yaml | 2 + definitions/centos/10/generic/qcow2.yaml | 59 +++++++++++++ definitions/centos/10/generic/tar.yaml | 8 ++ definitions/centos/10/generic/ubi.yaml | 54 ++++++++++++ definitions/centos/10/generic/vhd.yaml | 72 ++++++++++++++++ definitions/centos/10/generic/vmdk.yaml | 14 ++++ definitions/centos/10/generic/wsl.yaml | 54 ++++++++++++ .../centos/10/x86_64/image-installer.yaml | 7 ++ definitions/definitions.go | 7 ++ definitions/rhel/10.0/common.yaml | 5 ++ definitions/rhel/10.0/generic/ami.yaml | 3 + definitions/rhel/10.0/generic/azure-rhui.yaml | 2 + .../rhel/10.0/generic/azure-sap-rhui.yaml | 3 + definitions/rhel/10.0/generic/ec2-ha.yaml | 9 ++ definitions/rhel/10.0/generic/ec2-sap.yaml | 6 ++ definitions/rhel/10.0/generic/ec2.yaml | 2 + definitions/rhel/10.0/generic/gce.yaml | 3 + .../rhel/10.0/generic/image-installer.yaml | 7 ++ definitions/rhel/10.0/generic/oci.yaml | 2 + definitions/rhel/10.0/generic/ova.yaml | 2 + definitions/rhel/10.0/generic/qcow2.yaml | 8 ++ definitions/rhel/10.0/generic/tar.yaml | 2 + definitions/rhel/10.0/generic/vhd.yaml | 3 + definitions/rhel/10.0/generic/vmdk.yaml | 2 + definitions/rhel/10.0/generic/wsl.yaml | 2 + definitions/rhel/10.0/sap.yaml | 50 +++++++++++ .../rhel/10.0/x86_64/image-installer.yaml | 2 + pkg/distro/rhel/distribution.go | 3 + pkg/distro/rhel/imagetype.go | 19 +++++ pkg/distro/rhel/rhel10/ami.go | 71 +--------------- pkg/distro/rhel/rhel10/azure.go | 78 +----------------- pkg/distro/rhel/rhel10/bare_metal.go | 61 +------------- pkg/distro/rhel/rhel10/gce.go | 82 +------------------ pkg/distro/rhel/rhel10/qcow2.go | 72 +--------------- pkg/distro/rhel/rhel10/sap.go | 52 +----------- pkg/distro/rhel/rhel10/ubi.go | 58 +------------ pkg/distro/rhel/rhel10/vmdk.go | 18 +--- 41 files changed, 613 insertions(+), 480 deletions(-) create mode 100644 definitions/centos/10/generic/ami.yaml create mode 100644 definitions/centos/10/generic/gce.yaml create mode 100644 definitions/centos/10/generic/image-installer.yaml create mode 100644 definitions/centos/10/generic/oci.yaml create mode 100644 definitions/centos/10/generic/ova.yaml create mode 100644 definitions/centos/10/generic/qcow2.yaml create mode 100644 definitions/centos/10/generic/tar.yaml create mode 100644 definitions/centos/10/generic/ubi.yaml create mode 100644 definitions/centos/10/generic/vhd.yaml create mode 100644 definitions/centos/10/generic/vmdk.yaml create mode 100644 definitions/centos/10/generic/wsl.yaml create mode 100644 definitions/centos/10/x86_64/image-installer.yaml create mode 100644 definitions/definitions.go create mode 100644 definitions/rhel/10.0/common.yaml create mode 100644 definitions/rhel/10.0/generic/ami.yaml create mode 100644 definitions/rhel/10.0/generic/azure-rhui.yaml create mode 100644 definitions/rhel/10.0/generic/azure-sap-rhui.yaml create mode 100644 definitions/rhel/10.0/generic/ec2-ha.yaml create mode 100644 definitions/rhel/10.0/generic/ec2-sap.yaml create mode 100644 definitions/rhel/10.0/generic/ec2.yaml create mode 100644 definitions/rhel/10.0/generic/gce.yaml create mode 100644 definitions/rhel/10.0/generic/image-installer.yaml create mode 100644 definitions/rhel/10.0/generic/oci.yaml create mode 100644 definitions/rhel/10.0/generic/ova.yaml create mode 100644 definitions/rhel/10.0/generic/qcow2.yaml create mode 100644 definitions/rhel/10.0/generic/tar.yaml create mode 100644 definitions/rhel/10.0/generic/vhd.yaml create mode 100644 definitions/rhel/10.0/generic/vmdk.yaml create mode 100644 definitions/rhel/10.0/generic/wsl.yaml create mode 100644 definitions/rhel/10.0/sap.yaml create mode 100644 definitions/rhel/10.0/x86_64/image-installer.yaml diff --git a/definitions/centos/10/generic/ami.yaml b/definitions/centos/10/generic/ami.yaml new file mode 100644 index 0000000000..ee853c732e --- /dev/null +++ b/definitions/centos/10/generic/ami.yaml @@ -0,0 +1,51 @@ +def: + packages: + os: + include: + - "@core" + - chrony + - cloud-init + - cloud-utils-growpart + - dhcpcd + - yum-utils + - dracut-config-generic + - grub2 + - langpacks-en + - NetworkManager-cloud-setup + - redhat-release + - redhat-release-eula + - rsync + - tuned + - tar + exclude: + - aic94xx-firmware + - alsa-firmware + - alsa-tools-firmware + - biosdevname + - firewalld + - iprutils + - ivtv-firmware + - iwl1000-firmware + - iwl100-firmware + - iwl105-firmware + - iwl135-firmware + - iwl2000-firmware + - iwl2030-firmware + - iwl3160-firmware + - iwl3945-firmware + - iwl4965-firmware + - iwl5000-firmware + - iwl5150-firmware + - iwl6000-firmware + - iwl6000g2a-firmware + - iwl6000g2b-firmware + - iwl6050-firmware + - iwl7260-firmware + - libertas-sd8686-firmware + - libertas-sd8787-firmware + - libertas-usb8388-firmware + - plymouth + # RHBZ#2064087 + - dracut-config-rescue + # RHBZ#2075815 + - qemu-guest-agent diff --git a/definitions/centos/10/generic/gce.yaml b/definitions/centos/10/generic/gce.yaml new file mode 100644 index 0000000000..e03aa18ebc --- /dev/null +++ b/definitions/centos/10/generic/gce.yaml @@ -0,0 +1,78 @@ +def: + packages: + os: + include: + - "@core" + - langpacks-en # not in Google's KS + - acpid + - dnf-automatic + - net-tools + - python3 + - rng-tools + - tar + - vim + + # GCE guest tools + # TODO: uncomment once the package is available + # the el9 version depends on libboost_regex.so.1.75.0()(64bit), which is not available on el10 + # - google-compute-engine + - google-osconfig-agent + # Requires gdisk which was removed late in the RHEL 10 development cycle + # - gce-disk-expand + # cloud-init is a replacement for "google-compute-engine", remove once the package is available + - cloud-init + + # Not explicitly included in GCP kickstart, but present on the image + # for time synchronization + - chrony + - timedatex + # EFI + - grub2-tools + - grub2-tools-minimal + # Performance tuning + - tuned + exclude: + - alsa-utils + - b43-fwcutter + - dmraid + - dracut-config-rescue + - eject + - gpm + - irqbalance + - microcode_ctl + - smartmontools + - aic94xx-firmware + - atmel-firmware + - b43-openfwwf + - bfa-firmware + - ipw2100-firmware + - ipw2200-firmware + - ivtv-firmware + - iwl100-firmware + - iwl105-firmware + - iwl135-firmware + - iwl1000-firmware + - iwl2000-firmware + - iwl2030-firmware + - iwl3160-firmware + - iwl3945-firmware + - iwl4965-firmware + - iwl5000-firmware + - iwl5150-firmware + - iwl6000-firmware + - iwl6000g2a-firmware + - iwl6050-firmware + - iwl7260-firmware + - kernel-firmware + - libertas-usb8388-firmware + - ql2100-firmware + - ql2200-firmware + - ql23xx-firmware + - ql2400-firmware + - ql2500-firmware + - rt61pci-firmware + - rt73usb-firmware + - xorg-x11-drv-ati-firmware + - zd1211-firmware + # RHBZ#2075815 + - qemu-guest-agent diff --git a/definitions/centos/10/generic/image-installer.yaml b/definitions/centos/10/generic/image-installer.yaml new file mode 100644 index 0000000000..52b080df49 --- /dev/null +++ b/definitions/centos/10/generic/image-installer.yaml @@ -0,0 +1,58 @@ +def: + packages: + os: + include: + - "@core" + - chrony + - cockpit-system + - cockpit-ws + - dnf-utils + - dosfstools + - firewalld + - iwl1000-firmware + - iwl100-firmware + - iwl105-firmware + - iwl135-firmware + - iwl2000-firmware + - iwl2030-firmware + - iwl3160-firmware + - iwl5000-firmware + - iwl5150-firmware + - iwl6000g2a-firmware + - iwl6000g2b-firmware + - iwl6050-firmware + - iwl7260-firmware + - lvm2 + - net-tools + - nfs-utils + - oddjob + - oddjob-mkhomedir + - policycoreutils + - psmisc + - python3-jsonschema + - qemu-guest-agent + - redhat-release + - redhat-release-eula + - rsync + - tar + - tcpdump + - tuned + + # This was pulled from distroBuildPackageSet for some reason + - dnf + - dosfstools + - e2fsprogs + - glibc + - lorax-templates-generic + - lorax-templates-rhel + - lvm2 + - policycoreutils + - python3-iniparse + - qemu-img + - selinux-policy-targeted + - systemd + - tar + - xfsprogs + - xz + exclude: + - dracut-config-rescue diff --git a/definitions/centos/10/generic/oci.yaml b/definitions/centos/10/generic/oci.yaml new file mode 100644 index 0000000000..b579524f50 --- /dev/null +++ b/definitions/centos/10/generic/oci.yaml @@ -0,0 +1,2 @@ +from: + - qcow2.yaml diff --git a/definitions/centos/10/generic/ova.yaml b/definitions/centos/10/generic/ova.yaml new file mode 100644 index 0000000000..3d54267d11 --- /dev/null +++ b/definitions/centos/10/generic/ova.yaml @@ -0,0 +1,2 @@ +from: + - vmdk.yaml diff --git a/definitions/centos/10/generic/qcow2.yaml b/definitions/centos/10/generic/qcow2.yaml new file mode 100644 index 0000000000..be15fcda03 --- /dev/null +++ b/definitions/centos/10/generic/qcow2.yaml @@ -0,0 +1,59 @@ +def: + packages: + os: + include: + - "@core" + - chrony + - cloud-init + - cloud-utils-growpart + - cockpit-system + - cockpit-ws + - dnf-utils + - dosfstools + - nfs-utils + - oddjob + - oddjob-mkhomedir + - psmisc + - python3-jsonschema + - qemu-guest-agent + - redhat-release + - redhat-release-eula + - rsync + - tar + - tuned + - tcpdump + exclude: + - aic94xx-firmware + - alsa-firmware + - alsa-lib + - alsa-tools-firmware + - biosdevname + - dnf-plugin-spacewalk + - dracut-config-rescue + - fedora-release + - fedora-repos + - firewalld + - iprutils + - ivtv-firmware + - iwl1000-firmware + - iwl100-firmware + - iwl105-firmware + - iwl135-firmware + - iwl2000-firmware + - iwl2030-firmware + - iwl3160-firmware + - iwl3945-firmware + - iwl4965-firmware + - iwl5000-firmware + - iwl5150-firmware + - iwl6000-firmware + - iwl6000g2a-firmware + - iwl6000g2b-firmware + - iwl6050-firmware + - iwl7260-firmware + - langpacks-* + - langpacks-en + - libertas-sd8787-firmware + - plymouth + - rng-tools + - udisks2 diff --git a/definitions/centos/10/generic/tar.yaml b/definitions/centos/10/generic/tar.yaml new file mode 100644 index 0000000000..855d644674 --- /dev/null +++ b/definitions/centos/10/generic/tar.yaml @@ -0,0 +1,8 @@ +def: + packages: + os: + include: + - policycoreutils + - selinux-policy-targeted + exclude: + - rng-tools diff --git a/definitions/centos/10/generic/ubi.yaml b/definitions/centos/10/generic/ubi.yaml new file mode 100644 index 0000000000..dca501c8cb --- /dev/null +++ b/definitions/centos/10/generic/ubi.yaml @@ -0,0 +1,54 @@ +def: + packages: + os: + include: + - alternatives + - audit-libs + - basesystem + - bash + - ca-certificates + - coreutils-single + - crypto-policies-scripts + - curl-minimal + - dejavu-sans-fonts + - dnf + - filesystem + - findutils + - gdb-gdbserver + # Differs from official UBI, as we don't include CRB repos + # - gdbm + - glibc-minimal-langpack + - gmp + - gnupg2 + - gobject-introspection + - hostname + - langpacks-en + - libcurl-minimal + - openssl + - pam + - passwd + - procps-ng + - python3 + - python3-inotify + - redhat-release + - rootfiles + - rpm + - sed + - setup + - shadow-utils + - subscription-manager + - systemd + - tar + - tpm2-tss + - tzdata + - util-linux + - vim-minimal + - yum + exclude: + - gawk-all-langpacks + - glibc-gconv-extra + - glibc-langpack-en + - openssl-pkcs11 + - python-unversioned-command + - redhat-release-eula + - rpm-plugin-systemd-inhibit diff --git a/definitions/centos/10/generic/vhd.yaml b/definitions/centos/10/generic/vhd.yaml new file mode 100644 index 0000000000..06925e6dd9 --- /dev/null +++ b/definitions/centos/10/generic/vhd.yaml @@ -0,0 +1,72 @@ +def: + packages: + os: + include: + - "@Server" + - bzip2 + - cloud-init + - cloud-utils-growpart + - dracut-config-generic + - efibootmgr + - hyperv-daemons + - kernel-core + - kernel-modules + - kernel + - langpacks-en + - lvm2 + - NetworkManager + - NetworkManager-cloud-setup + - nvme-cli + - patch + - rng-tools + - selinux-policy-targeted + - uuid + - WALinuxAgent + - yum-utils + exclude: + - aic94xx-firmware + - alsa-firmware + - alsa-lib + - alsa-sof-firmware + - alsa-tools-firmware + - biosdevname + - bolt + - buildah + - cockpit-podman + - containernetworking-plugins + - dnf-plugin-spacewalk + - dracut-config-rescue + - glibc-all-langpacks + - iprutils + - ivtv-firmware + - iwl100-firmware + - iwl1000-firmware + - iwl105-firmware + - iwl135-firmware + - iwl2000-firmware + - iwl2030-firmware + - iwl3160-firmware + - iwl3945-firmware + - iwl4965-firmware + - iwl5000-firmware + - iwl5150-firmware + - iwl6000-firmware + - iwl6000g2a-firmware + - iwl6000g2b-firmware + - iwl6050-firmware + - iwl7260-firmware + - libertas-sd8686-firmware + - libertas-sd8787-firmware + - libertas-usb8388-firmware + - NetworkManager-config-server + - plymouth + - podman + - python3-dnf-plugin-spacewalk + - python3-hwdata + - python3-rhnlib + - rhn-check + - rhn-client-tools + - rhn-setup + - rhnlib + - rhnsd + - usb_modeswitch diff --git a/definitions/centos/10/generic/vmdk.yaml b/definitions/centos/10/generic/vmdk.yaml new file mode 100644 index 0000000000..6941eb9403 --- /dev/null +++ b/definitions/centos/10/generic/vmdk.yaml @@ -0,0 +1,14 @@ +def: + packages: + os: + include: + - "@core" + - chrony + - cloud-init + - firewalld + - langpacks-en + - open-vm-tools + - tuned + exclude: + - dracut-config-rescue + - rng-tools diff --git a/definitions/centos/10/generic/wsl.yaml b/definitions/centos/10/generic/wsl.yaml new file mode 100644 index 0000000000..dca501c8cb --- /dev/null +++ b/definitions/centos/10/generic/wsl.yaml @@ -0,0 +1,54 @@ +def: + packages: + os: + include: + - alternatives + - audit-libs + - basesystem + - bash + - ca-certificates + - coreutils-single + - crypto-policies-scripts + - curl-minimal + - dejavu-sans-fonts + - dnf + - filesystem + - findutils + - gdb-gdbserver + # Differs from official UBI, as we don't include CRB repos + # - gdbm + - glibc-minimal-langpack + - gmp + - gnupg2 + - gobject-introspection + - hostname + - langpacks-en + - libcurl-minimal + - openssl + - pam + - passwd + - procps-ng + - python3 + - python3-inotify + - redhat-release + - rootfiles + - rpm + - sed + - setup + - shadow-utils + - subscription-manager + - systemd + - tar + - tpm2-tss + - tzdata + - util-linux + - vim-minimal + - yum + exclude: + - gawk-all-langpacks + - glibc-gconv-extra + - glibc-langpack-en + - openssl-pkcs11 + - python-unversioned-command + - redhat-release-eula + - rpm-plugin-systemd-inhibit diff --git a/definitions/centos/10/x86_64/image-installer.yaml b/definitions/centos/10/x86_64/image-installer.yaml new file mode 100644 index 0000000000..753e8d4b47 --- /dev/null +++ b/definitions/centos/10/x86_64/image-installer.yaml @@ -0,0 +1,7 @@ +from: + - ../generic/image-installer.yaml +def: + packages: + os: + include: + - grub2-pc diff --git a/definitions/definitions.go b/definitions/definitions.go new file mode 100644 index 0000000000..b390b2a1fc --- /dev/null +++ b/definitions/definitions.go @@ -0,0 +1,7 @@ +package definitions + +import "embed" + +//go:embed centos +//go:embed rhel +var Data embed.FS diff --git a/definitions/rhel/10.0/common.yaml b/definitions/rhel/10.0/common.yaml new file mode 100644 index 0000000000..2e5ed6a118 --- /dev/null +++ b/definitions/rhel/10.0/common.yaml @@ -0,0 +1,5 @@ +def: + packages: + os: + include: + - insights-client diff --git a/definitions/rhel/10.0/generic/ami.yaml b/definitions/rhel/10.0/generic/ami.yaml new file mode 100644 index 0000000000..48682f996b --- /dev/null +++ b/definitions/rhel/10.0/generic/ami.yaml @@ -0,0 +1,3 @@ +from: + - ../common.yaml + - ../../../centos/10/generic/ami.yaml diff --git a/definitions/rhel/10.0/generic/azure-rhui.yaml b/definitions/rhel/10.0/generic/azure-rhui.yaml new file mode 100644 index 0000000000..aaa058d654 --- /dev/null +++ b/definitions/rhel/10.0/generic/azure-rhui.yaml @@ -0,0 +1,2 @@ +from: + - ./vhd.yaml diff --git a/definitions/rhel/10.0/generic/azure-sap-rhui.yaml b/definitions/rhel/10.0/generic/azure-sap-rhui.yaml new file mode 100644 index 0000000000..7739dec680 --- /dev/null +++ b/definitions/rhel/10.0/generic/azure-sap-rhui.yaml @@ -0,0 +1,3 @@ +from: + - ../sap.yaml + - ./vhd.yaml diff --git a/definitions/rhel/10.0/generic/ec2-ha.yaml b/definitions/rhel/10.0/generic/ec2-ha.yaml new file mode 100644 index 0000000000..ed11acc5d5 --- /dev/null +++ b/definitions/rhel/10.0/generic/ec2-ha.yaml @@ -0,0 +1,9 @@ +from: + - ami.yaml +def: + packages: + os: + include: + - fence-agents-all + - pacemaker + - pcs diff --git a/definitions/rhel/10.0/generic/ec2-sap.yaml b/definitions/rhel/10.0/generic/ec2-sap.yaml new file mode 100644 index 0000000000..4fb6b0e11e --- /dev/null +++ b/definitions/rhel/10.0/generic/ec2-sap.yaml @@ -0,0 +1,6 @@ +from: + - ami.yaml + - ../sap.yaml +def: + # package.os.include: + # - libcanberra-gtk2 ; libcanberra-gtk2 is not available in RHEL-10 diff --git a/definitions/rhel/10.0/generic/ec2.yaml b/definitions/rhel/10.0/generic/ec2.yaml new file mode 100644 index 0000000000..73c4a200e8 --- /dev/null +++ b/definitions/rhel/10.0/generic/ec2.yaml @@ -0,0 +1,2 @@ +from: + - ami.yaml diff --git a/definitions/rhel/10.0/generic/gce.yaml b/definitions/rhel/10.0/generic/gce.yaml new file mode 100644 index 0000000000..00ad641fd0 --- /dev/null +++ b/definitions/rhel/10.0/generic/gce.yaml @@ -0,0 +1,3 @@ +from: + - ../common.yaml + - ../../../centos/10/generic/gce.yaml diff --git a/definitions/rhel/10.0/generic/image-installer.yaml b/definitions/rhel/10.0/generic/image-installer.yaml new file mode 100644 index 0000000000..8550716bf9 --- /dev/null +++ b/definitions/rhel/10.0/generic/image-installer.yaml @@ -0,0 +1,7 @@ +from: + - ../../../centos/10/generic/image-installer.yaml +def: + packages: + os: + include: + - subscription-manager-cockpit diff --git a/definitions/rhel/10.0/generic/oci.yaml b/definitions/rhel/10.0/generic/oci.yaml new file mode 100644 index 0000000000..b579524f50 --- /dev/null +++ b/definitions/rhel/10.0/generic/oci.yaml @@ -0,0 +1,2 @@ +from: + - qcow2.yaml diff --git a/definitions/rhel/10.0/generic/ova.yaml b/definitions/rhel/10.0/generic/ova.yaml new file mode 100644 index 0000000000..39455ae4e6 --- /dev/null +++ b/definitions/rhel/10.0/generic/ova.yaml @@ -0,0 +1,2 @@ +from: + - ../../../centos/10/generic/vmdk.yaml diff --git a/definitions/rhel/10.0/generic/qcow2.yaml b/definitions/rhel/10.0/generic/qcow2.yaml new file mode 100644 index 0000000000..d6b759af44 --- /dev/null +++ b/definitions/rhel/10.0/generic/qcow2.yaml @@ -0,0 +1,8 @@ +from: + - ../common.yaml + - ../../../centos/10/generic/qcow2.yaml +def: + packages: + os: + include: + - subscription-manager-cockpit diff --git a/definitions/rhel/10.0/generic/tar.yaml b/definitions/rhel/10.0/generic/tar.yaml new file mode 100644 index 0000000000..9bc5a46789 --- /dev/null +++ b/definitions/rhel/10.0/generic/tar.yaml @@ -0,0 +1,2 @@ +from: + - ../../../centos/10/generic/tar.yaml diff --git a/definitions/rhel/10.0/generic/vhd.yaml b/definitions/rhel/10.0/generic/vhd.yaml new file mode 100644 index 0000000000..e08591caeb --- /dev/null +++ b/definitions/rhel/10.0/generic/vhd.yaml @@ -0,0 +1,3 @@ +from: + - ../common.yaml + - ../../../centos/10/generic/vhd.yaml diff --git a/definitions/rhel/10.0/generic/vmdk.yaml b/definitions/rhel/10.0/generic/vmdk.yaml new file mode 100644 index 0000000000..39455ae4e6 --- /dev/null +++ b/definitions/rhel/10.0/generic/vmdk.yaml @@ -0,0 +1,2 @@ +from: + - ../../../centos/10/generic/vmdk.yaml diff --git a/definitions/rhel/10.0/generic/wsl.yaml b/definitions/rhel/10.0/generic/wsl.yaml new file mode 100644 index 0000000000..10602373ca --- /dev/null +++ b/definitions/rhel/10.0/generic/wsl.yaml @@ -0,0 +1,2 @@ +from: + - ../../../centos/10/generic/wsl.yaml diff --git a/definitions/rhel/10.0/sap.yaml b/definitions/rhel/10.0/sap.yaml new file mode 100644 index 0000000000..c4cc7aab5d --- /dev/null +++ b/definitions/rhel/10.0/sap.yaml @@ -0,0 +1,50 @@ +def: + packages: + os: + include: + # RHBZ#2076763 + - "@Server" + # SAP System Roles + # https://access.redhat.com/sites/default/files/attachments/rhel_system_roles_for_sap_1.pdf + - ansible-core + - rhel-system-roles-sap + # RHBZ#1959813 + - bind-utils + - nfs-utils + - tcsh + # RHBZ#1959955 + - uuidd + # RHBZ#1959923 + - cairo + - expect + - graphviz, + # - gtk2 ; gtk2 is not available in RHEL-10 + - iptraf-ng + - krb5-workstation + - libaio + - libatomic + - libicu + - libtool-ltdl + - lm_sensors + - net-tools + - numactl + - PackageKit-gtk3-module + - xorg-x11-xauth + # RHBZ#1960617 + - tuned-profiles-sap-hana + # RHBZ#1961168 + - libnsl + exclude: + - iwl1000-firmware + - iwl100-firmware + - iwl105-firmware + - iwl135-firmware + - iwl2000-firmware + - iwl2030-firmware + - iwl3160-firmware + - iwl5000-firmware + - iwl5150-firmware + - iwl6000g2a-firmware + - iwl6000g2b-firmware + - iwl6050-firmware + - iwl7260-firmware diff --git a/definitions/rhel/10.0/x86_64/image-installer.yaml b/definitions/rhel/10.0/x86_64/image-installer.yaml new file mode 100644 index 0000000000..3565b8973b --- /dev/null +++ b/definitions/rhel/10.0/x86_64/image-installer.yaml @@ -0,0 +1,2 @@ +from: + - ../../../centos/10/x86_64/image-installer.yaml diff --git a/pkg/distro/rhel/distribution.go b/pkg/distro/rhel/distribution.go index 963aed0c60..eb5937dd7e 100644 --- a/pkg/distro/rhel/distribution.go +++ b/pkg/distro/rhel/distribution.go @@ -15,6 +15,7 @@ import ( type DefaultDistroImageConfigFunc func(d *Distribution) *distro.ImageConfig type Distribution struct { + id string name string DistCodename string product string @@ -118,6 +119,7 @@ func NewDistribution(name string, major, minor int) (*Distribution, error) { } rd = &Distribution{ + id: "rhel", name: fmt.Sprintf("rhel-%d.%d", major, minor), product: "Red Hat Enterprise Linux", osVersion: fmt.Sprintf("%d.%d", major, minor), @@ -133,6 +135,7 @@ func NewDistribution(name string, major, minor int) (*Distribution, error) { } rd = &Distribution{ + id: "centos", name: fmt.Sprintf("centos-%d", major), product: "CentOS Stream", osVersion: fmt.Sprintf("%d-stream", major), diff --git a/pkg/distro/rhel/imagetype.go b/pkg/distro/rhel/imagetype.go index b92c7b8b71..113ddf4fb8 100644 --- a/pkg/distro/rhel/imagetype.go +++ b/pkg/distro/rhel/imagetype.go @@ -6,11 +6,13 @@ import ( "slices" + "github.com/osbuild/images/definitions" "github.com/osbuild/images/internal/environment" "github.com/osbuild/images/internal/workload" "github.com/osbuild/images/pkg/blueprint" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/datasizes" + "github.com/osbuild/images/pkg/definition" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/image" @@ -284,6 +286,23 @@ func (t *ImageType) Manifest(bp *blueprint.Blueprint, for name, getter := range t.packageSets { staticPackageSets[name] = getter(t) } + defPath, err := definition.FindBestDefinitionFile(definitions.Data, t.arch.distro.id, t.arch.Distro().OsVersion(), t.Arch().Name(), t.Name()) + if err != nil { + return nil, nil, fmt.Errorf("failed to find image type spec: %w", err) + } + + defFile, err := definition.MergeConfig(definitions.Data, defPath) + if err != nil { + return nil, nil, fmt.Errorf("failed to merge image type spec: %w", err) + } + + def := defFile.Def + for setName, set := range def.Packages { + staticPackageSets[setName] = rpmmd.PackageSet{ + Include: set.Include, + Exclude: set.Exclude, + } + } // amend with repository information and collect payload repos payloadRepos := make([]rpmmd.RepoConfig, 0) diff --git a/pkg/distro/rhel/rhel10/ami.go b/pkg/distro/rhel/rhel10/ami.go index 2358791e9c..193e512626 100644 --- a/pkg/distro/rhel/rhel10/ami.go +++ b/pkg/distro/rhel/rhel10/ami.go @@ -293,80 +293,15 @@ func defaultEc2ImageConfigX86_64() *distro.ImageConfig { // PACKAGE SETS func ec2PackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "@core", - "chrony", - "cloud-init", - "cloud-utils-growpart", - "dhcpcd", - "yum-utils", - "dracut-config-generic", - "grub2", - "langpacks-en", - "NetworkManager-cloud-setup", - "redhat-release", - "redhat-release-eula", - "rsync", - "tuned", - "tar", - }, - Exclude: []string{ - "aic94xx-firmware", - "alsa-firmware", - "alsa-tools-firmware", - "biosdevname", - "firewalld", - "iprutils", - "ivtv-firmware", - "iwl1000-firmware", - "iwl100-firmware", - "iwl105-firmware", - "iwl135-firmware", - "iwl2000-firmware", - "iwl2030-firmware", - "iwl3160-firmware", - "iwl3945-firmware", - "iwl4965-firmware", - "iwl5000-firmware", - "iwl5150-firmware", - "iwl6000-firmware", - "iwl6000g2a-firmware", - "iwl6000g2b-firmware", - "iwl6050-firmware", - "iwl7260-firmware", - "libertas-sd8686-firmware", - "libertas-sd8787-firmware", - "libertas-usb8388-firmware", - "plymouth", - // RHBZ#2064087 - "dracut-config-rescue", - // RHBZ#2075815 - "qemu-guest-agent", - }, - }.Append(distroSpecificPackageSet(t)) - - return ps + return rpmmd.PackageSet{} } // rhel-ha-ec2 image package set func rhelEc2HaPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ec2HaPackageSet := ec2PackageSet(t) - ec2HaPackageSet = ec2HaPackageSet.Append(rpmmd.PackageSet{ - Include: []string{ - "fence-agents-all", - "pacemaker", - "pcs", - }, - }) - return ec2HaPackageSet + return rpmmd.PackageSet{} } // rhel-sap-ec2 image package set func rhelEc2SapPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - return rpmmd.PackageSet{ - Include: []string{ - //"libcanberra-gtk2", // libcanberra-gtk2 is not available in RHEL-10 - }, - }.Append(ec2PackageSet(t)).Append(SapPackageSet(t)) + return rpmmd.PackageSet{} } diff --git a/pkg/distro/rhel/rhel10/azure.go b/pkg/distro/rhel/rhel10/azure.go index 7f10832881..e7c194deb2 100644 --- a/pkg/distro/rhel/rhel10/azure.go +++ b/pkg/distro/rhel/rhel10/azure.go @@ -88,86 +88,12 @@ func mkAzureSapInternalImgType(rd *rhel.Distribution) *rhel.ImageType { // Common Azure image package set func azureCommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "@Server", - "bzip2", - "cloud-init", - "cloud-utils-growpart", - "dracut-config-generic", - "efibootmgr", - "hyperv-daemons", - "kernel-core", - "kernel-modules", - "kernel", - "langpacks-en", - "lvm2", - "NetworkManager", - "NetworkManager-cloud-setup", - "nvme-cli", - "patch", - "rng-tools", - "selinux-policy-targeted", - "uuid", - "WALinuxAgent", - "yum-utils", - }, - Exclude: []string{ - "aic94xx-firmware", - "alsa-firmware", - "alsa-lib", - "alsa-sof-firmware", - "alsa-tools-firmware", - "biosdevname", - "bolt", - "buildah", - "cockpit-podman", - "containernetworking-plugins", - "dnf-plugin-spacewalk", - "dracut-config-rescue", - "glibc-all-langpacks", - "iprutils", - "ivtv-firmware", - "iwl100-firmware", - "iwl1000-firmware", - "iwl105-firmware", - "iwl135-firmware", - "iwl2000-firmware", - "iwl2030-firmware", - "iwl3160-firmware", - "iwl3945-firmware", - "iwl4965-firmware", - "iwl5000-firmware", - "iwl5150-firmware", - "iwl6000-firmware", - "iwl6000g2a-firmware", - "iwl6000g2b-firmware", - "iwl6050-firmware", - "iwl7260-firmware", - "libertas-sd8686-firmware", - "libertas-sd8787-firmware", - "libertas-usb8388-firmware", - "NetworkManager-config-server", - "plymouth", - "podman", - "python3-dnf-plugin-spacewalk", - "python3-hwdata", - "python3-rhnlib", - "rhn-check", - "rhn-client-tools", - "rhn-setup", - "rhnlib", - "rhnsd", - "usb_modeswitch", - }, - }.Append(distroSpecificPackageSet(t)) - - return ps + return rpmmd.PackageSet{} } // Azure BYOS image package set func azurePackageSet(t *rhel.ImageType) rpmmd.PackageSet { - return azureCommonPackageSet(t) + return rpmmd.PackageSet{} } // Azure SAP image package set diff --git a/pkg/distro/rhel/rhel10/bare_metal.go b/pkg/distro/rhel/rhel10/bare_metal.go index dac600d31c..7e07860a89 100644 --- a/pkg/distro/rhel/rhel10/bare_metal.go +++ b/pkg/distro/rhel/rhel10/bare_metal.go @@ -15,12 +15,7 @@ func mkTarImgType() *rhel.ImageType { "root.tar.xz", "application/x-tar", map[string]rhel.PackageSetFunc{ - rhel.OSPkgsKey: func(t *rhel.ImageType) rpmmd.PackageSet { - return rpmmd.PackageSet{ - Include: []string{"policycoreutils", "selinux-policy-targeted"}, - Exclude: []string{"rng-tools"}, - } - }, + rhel.OSPkgsKey: func(t *rhel.ImageType) rpmmd.PackageSet { return rpmmd.PackageSet{} }, }, rhel.TarImage, []string{"build"}, @@ -66,59 +61,7 @@ func mkImageInstallerImgType() *rhel.ImageType { // PACKAGE SETS func bareMetalPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "@core", - "chrony", - "cockpit-system", - "cockpit-ws", - "dnf-utils", - "dosfstools", - "firewalld", - "iwl1000-firmware", - "iwl100-firmware", - "iwl105-firmware", - "iwl135-firmware", - "iwl2000-firmware", - "iwl2030-firmware", - "iwl3160-firmware", - "iwl5000-firmware", - "iwl5150-firmware", - "iwl6000g2a-firmware", - "iwl6000g2b-firmware", - "iwl6050-firmware", - "iwl7260-firmware", - "lvm2", - "net-tools", - "nfs-utils", - "oddjob", - "oddjob-mkhomedir", - "policycoreutils", - "psmisc", - "python3-jsonschema", - "qemu-guest-agent", - "redhat-release", - "redhat-release-eula", - "rsync", - "tar", - "tcpdump", - "tuned", - }, - Exclude: []string{ - "dracut-config-rescue", - }, - }.Append(distroBuildPackageSet(t)) - - // Ensure to not pull in subscription-manager on non-RHEL distro - if t.IsRHEL() { - ps = ps.Append(rpmmd.PackageSet{ - Include: []string{ - "subscription-manager-cockpit", - }, - }) - } - - return ps + return rpmmd.PackageSet{} } func installerPackageSet(t *rhel.ImageType) rpmmd.PackageSet { diff --git a/pkg/distro/rhel/rhel10/gce.go b/pkg/distro/rhel/rhel10/gce.go index 0b8a1efc7e..629ec59943 100644 --- a/pkg/distro/rhel/rhel10/gce.go +++ b/pkg/distro/rhel/rhel10/gce.go @@ -139,87 +139,7 @@ func baseGCEImageConfig() *distro.ImageConfig { } func gceCommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "@core", - "langpacks-en", // not in Google's KS - "acpid", - "dnf-automatic", - "net-tools", - "python3", - "rng-tools", - "tar", - "vim", - - // GCE guest tools - // TODO: uncomment once the package is available - // the el9 version depends on libboost_regex.so.1.75.0()(64bit), which is not available on el10 - //"google-compute-engine", - "google-osconfig-agent", - // Requires gdisk which was removed late in the RHEL 10 development cycle - // "gce-disk-expand", - // cloud-init is a replacement for "google-compute-engine", remove once the package is available - "cloud-init", - - // Not explicitly included in GCP kickstart, but present on the image - // for time synchronization - "chrony", - "timedatex", - // EFI - "grub2-tools", - "grub2-tools-minimal", - // Performance tuning - "tuned", - }, - Exclude: []string{ - "alsa-utils", - "b43-fwcutter", - "dmraid", - "dracut-config-rescue", - "eject", - "gpm", - "irqbalance", - "microcode_ctl", - "smartmontools", - "aic94xx-firmware", - "atmel-firmware", - "b43-openfwwf", - "bfa-firmware", - "ipw2100-firmware", - "ipw2200-firmware", - "ivtv-firmware", - "iwl100-firmware", - "iwl105-firmware", - "iwl135-firmware", - "iwl1000-firmware", - "iwl2000-firmware", - "iwl2030-firmware", - "iwl3160-firmware", - "iwl3945-firmware", - "iwl4965-firmware", - "iwl5000-firmware", - "iwl5150-firmware", - "iwl6000-firmware", - "iwl6000g2a-firmware", - "iwl6050-firmware", - "iwl7260-firmware", - "kernel-firmware", - "libertas-usb8388-firmware", - "ql2100-firmware", - "ql2200-firmware", - "ql23xx-firmware", - "ql2400-firmware", - "ql2500-firmware", - "rt61pci-firmware", - "rt73usb-firmware", - "xorg-x11-drv-ati-firmware", - "zd1211-firmware", - // RHBZ#2075815 - "qemu-guest-agent", - }, - }.Append(distroSpecificPackageSet(t)) - - return ps + return rpmmd.PackageSet{} } // GCE image diff --git a/pkg/distro/rhel/rhel10/qcow2.go b/pkg/distro/rhel/rhel10/qcow2.go index fbb58be450..83b89bd26e 100644 --- a/pkg/distro/rhel/rhel10/qcow2.go +++ b/pkg/distro/rhel/rhel10/qcow2.go @@ -56,77 +56,7 @@ func mkOCIImgType(d *rhel.Distribution) *rhel.ImageType { } func qcow2CommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "@core", - "chrony", - "cloud-init", - "cloud-utils-growpart", - "cockpit-system", - "cockpit-ws", - "dnf-utils", - "dosfstools", - "nfs-utils", - "oddjob", - "oddjob-mkhomedir", - "psmisc", - "python3-jsonschema", - "qemu-guest-agent", - "redhat-release", - "redhat-release-eula", - "rsync", - "tar", - "tuned", - "tcpdump", - }, - Exclude: []string{ - "aic94xx-firmware", - "alsa-firmware", - "alsa-lib", - "alsa-tools-firmware", - "biosdevname", - "dnf-plugin-spacewalk", - "dracut-config-rescue", - "fedora-release", - "fedora-repos", - "firewalld", - "iprutils", - "ivtv-firmware", - "iwl1000-firmware", - "iwl100-firmware", - "iwl105-firmware", - "iwl135-firmware", - "iwl2000-firmware", - "iwl2030-firmware", - "iwl3160-firmware", - "iwl3945-firmware", - "iwl4965-firmware", - "iwl5000-firmware", - "iwl5150-firmware", - "iwl6000-firmware", - "iwl6000g2a-firmware", - "iwl6000g2b-firmware", - "iwl6050-firmware", - "iwl7260-firmware", - "langpacks-*", - "langpacks-en", - "libertas-sd8787-firmware", - "plymouth", - "rng-tools", - "udisks2", - }, - }.Append(distroSpecificPackageSet(t)) - - // Ensure to not pull in subscription-manager on non-RHEL distro - if t.IsRHEL() { - ps = ps.Append(rpmmd.PackageSet{ - Include: []string{ - "subscription-manager-cockpit", - }, - }) - } - - return ps + return rpmmd.PackageSet{} } func qcowImageConfig(d *rhel.Distribution) *distro.ImageConfig { diff --git a/pkg/distro/rhel/rhel10/sap.go b/pkg/distro/rhel/rhel10/sap.go index 1290bb2d63..0d65a54a76 100644 --- a/pkg/distro/rhel/rhel10/sap.go +++ b/pkg/distro/rhel/rhel10/sap.go @@ -120,55 +120,5 @@ func sapImageConfig(osVersion string) *distro.ImageConfig { } func SapPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - return rpmmd.PackageSet{ - Include: []string{ - // RHBZ#2076763 - "@Server", - // SAP System Roles - // https://access.redhat.com/sites/default/files/attachments/rhel_system_roles_for_sap_1.pdf - "ansible-core", - "rhel-system-roles-sap", - // RHBZ#1959813 - "bind-utils", - "nfs-utils", - "tcsh", - // RHBZ#1959955 - "uuidd", - // RHBZ#1959923 - "cairo", - "expect", - "graphviz", - //"gtk2", // gtk2 is not available in RHEL-10 - "iptraf-ng", - "krb5-workstation", - "libaio", - "libatomic", - "libicu", - "libtool-ltdl", - "lm_sensors", - "net-tools", - "numactl", - "PackageKit-gtk3-module", - "xorg-x11-xauth", - // RHBZ#1960617 - "tuned-profiles-sap-hana", - // RHBZ#1961168 - "libnsl", - }, - Exclude: []string{ - "iwl1000-firmware", - "iwl100-firmware", - "iwl105-firmware", - "iwl135-firmware", - "iwl2000-firmware", - "iwl2030-firmware", - "iwl3160-firmware", - "iwl5000-firmware", - "iwl5150-firmware", - "iwl6000g2a-firmware", - "iwl6000g2b-firmware", - "iwl6050-firmware", - "iwl7260-firmware", - }, - } + return rpmmd.PackageSet{} } diff --git a/pkg/distro/rhel/rhel10/ubi.go b/pkg/distro/rhel/rhel10/ubi.go index 603fd75f26..580d17e0fd 100644 --- a/pkg/distro/rhel/rhel10/ubi.go +++ b/pkg/distro/rhel/rhel10/ubi.go @@ -36,61 +36,5 @@ func mkWSLImgType() *rhel.ImageType { } func ubiCommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "alternatives", - "audit-libs", - "basesystem", - "bash", - "ca-certificates", - "coreutils-single", - "crypto-policies-scripts", - "curl-minimal", - "dejavu-sans-fonts", - "dnf", - "filesystem", - "findutils", - "gdb-gdbserver", - // Differs from official UBI, as we don't include CRB repos - // "gdbm", - "glibc-minimal-langpack", - "gmp", - "gnupg2", - "gobject-introspection", - "hostname", - "langpacks-en", - "libcurl-minimal", - "openssl", - "pam", - "passwd", - "procps-ng", - "python3", - "python3-inotify", - "redhat-release", - "rootfiles", - "rpm", - "sed", - "setup", - "shadow-utils", - "subscription-manager", - "systemd", - "tar", - "tpm2-tss", - "tzdata", - "util-linux", - "vim-minimal", - "yum", - }, - Exclude: []string{ - "gawk-all-langpacks", - "glibc-gconv-extra", - "glibc-langpack-en", - "openssl-pkcs11", - "python-unversioned-command", - "redhat-release-eula", - "rpm-plugin-systemd-inhibit", - }, - } - - return ps + return rpmmd.PackageSet{} } diff --git a/pkg/distro/rhel/rhel10/vmdk.go b/pkg/distro/rhel/rhel10/vmdk.go index a3eb446765..3e2a415bfc 100644 --- a/pkg/distro/rhel/rhel10/vmdk.go +++ b/pkg/distro/rhel/rhel10/vmdk.go @@ -61,21 +61,5 @@ func mkOVAImgType() *rhel.ImageType { } func vmdkCommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet { - ps := rpmmd.PackageSet{ - Include: []string{ - "@core", - "chrony", - "cloud-init", - "firewalld", - "langpacks-en", - "open-vm-tools", - "tuned", - }, - Exclude: []string{ - "dracut-config-rescue", - "rng-tools", - }, - } - - return ps + return rpmmd.PackageSet{} }