...
======================= Description of problem: ======================= RHEL 8.7 kickstart installation fails when --optional option is used with @core package group ------ DNF error: Error in POSTIN scriptlet in rpm package tboot ------ Kickstart: %packages @core --optional %end ============================================================= Version-Release number of selected component (if applicable): ============================================================= RHEL 8.7 ISO tboot-1.10.5-1.el8.x86_64.rpm =================== Steps to Reproduce: =================== 1. Write a kickstart file and add "--optional" option to "@core" package group. The following package section is enough to reproduce the issue: %packages @core --optional %end 2. Start kickstart installation. 3. The installation(text as well as graphical mode) will fail with the following error: ------ DNF error: Error in POSTIN scriptlet in rpm package tboot ------ =============== Actual results: =============== Installation fails with the following error: ------ DNF error: Error in POSTIN scriptlet in rpm package tboot ------ ================ Expected results: ================ The installation should not fail when "--optional" option is used with @core package group. ================ Additional info: ================ The issue is not reproducible with RHEL 8.6 or older version of RHEL ISO. Difference between RHEL 8.6 and RHEL 8.7 tboot package: -------- [root@rhel8 ~]# rpm -qp --scripts tboot-1.10.2-1.el8.x86_64.rpm [root@rhel8 ~]# [root@rhel8 ~]# rpm -qp --scripts tboot-1.10.5-1.el8.x86_64.rpm postinstall scriptlet (using /bin/sh): efidir=$(find /boot -type d -name EFI) if [ -n "$efidir" ]; then echo "EFI detected .." mkdir -pv /boot/efi/EFI/redhat/x86_64-efi cp -vf /usr/lib/grub/x86_64-efi/relocator.mod /boot/efi/EFI/redhat/x86_64-efi/ cp -vf /usr/lib/grub/x86_64-efi/multiboot2.mod /boot/efi/EFI/redhat/x86_64-efi/ gcfg=$(find /boot -name grub.cfg -print -quit) [ -n "$gcfg" ] && grub2-mkconfig -o "$gcfg" fi -------- =========== WORKAROUND: =========== Exclude the tboot package from the package group. -------- %packages @core --optional -tboot %end -------- One can install the tboot package post OS installation or in the %post section. I was able to install the package in the %post section as below: -------- %packages @core --optional -tboot %end – %post --nochroot --log=/mnt/sysimage/var/log/kickstart_post_nochroot.log echo "Installing optional packages from core package group" cd /run/install/sources/mount-0000-cdrom/BaseOS/Packages rpm -ivh --root=/mnt/sysimage/ tboot-1.10.5-1.el8.x86_64.rpm grub2-efi-x64-modules-2.02-142.el8.noarch.rpm %end Logs: 09:33:26,010 DBG program: Return code: 0 09:36:35,756 INF program: Running in chroot '/mnt/sysroot'... depmod -a 4.18.0-425.3.1.el8.x86_64 09:36:47,403 DBG program: Return code: 0 09:36:47,404 INF program: Running in chroot '/mnt/sysroot'... dracut -f /boot/initramfs-4.18.0-425.3.1.el8.x86_64.img 4.18.0-425.3.1.el8.x86_64 09:37:07,564 DBG program: Return code: 0 09:37:07,648 INF program: Running... /bin/sh /tmp/ks-script-fgli1bo4 09:37:10,734 INF program: Installing optional packages from core package group 09:37:10,735 INF program: warning: tboot-1.10.5-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY 09:37:10,735 INF program: Verifying... ######################################## 09:37:10,735 INF program: Preparing... ######################################## 09:37:10,735 INF program: Updating / installing... 09:37:10,735 INF program: grub2-efi-x64-modules-1:2.02-142.el8 ######################################## 09:37:10,735 INF program: tboot-1:1.10.5-1.el8 ######################################## 09:37:10,735 INF program: EFI detected .. 09:37:10,736 INF program: mkdir: created directory '/boot/efi/EFI/redhat/x86_64-efi' 09:37:10,736 INF program: '/usr/lib/grub/x86_64-efi/relocator.mod' -> '/boot/efi/EFI/redhat/x86_64-efi/relocator.mod' 09:37:10,736 INF program: '/usr/lib/grub/x86_64-efi/multiboot2.mod' -> '/boot/efi/EFI/redhat/x86_64-efi/multiboot2.mod' 09:37:10,736 INF program: Generating grub configuration file ... 09:37:10,736 INF program: Found linux image: /boot/vmlinuz-4.18.0-425.3.1.el8.x86_64 09:37:10,736 INF program: Found initrd image: /boot/initramfs-4.18.0-425.3.1.el8.x86_64.img 09:37:10,736 INF program: done 09:37:10,736 DBG program: Return code: 0 --------
Won't Do