From 91133f1b20e14e0681a1400612090e54e5de1d96 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 5 May 2021 12:05:23 -0700 Subject: [PATCH] runtime-cleanup: Use branding package name instead of product.name This requires a new version of lorax, 34.9.1 or later. Resolves: rhbz#1956205 --- 80-rhel/runtime-cleanup.tmpl | 13 ++++++++----- lorax-templates-rhel.spec | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/80-rhel/runtime-cleanup.tmpl b/80-rhel/runtime-cleanup.tmpl index 9e90db1..fd7bc9f 100644 --- a/80-rhel/runtime-cleanup.tmpl +++ b/80-rhel/runtime-cleanup.tmpl @@ -1,5 +1,5 @@ ## lorax template file: cleanup for the ramdisk (runtime image) -<%page args="libdir, product, root"/> +<%page args="libdir, branding, root"/> ## remove the sources remove usr/share/i18n @@ -14,7 +14,6 @@ removepkg flac gstreamer-tools libsndfile pulseaudio* sound-theme-freedesktop ## we don't create new initramfs/bootloader conf inside anaconda ## (that happens inside the target system after we install dracut/grubby) removepkg dracut-network grubby anaconda-dracut -removefrom ${product.name}-logos /usr/share/plymouth/* ## In order to execute the /usr move on upgrades we need convertfs from dracut ## We also need dracut-shutdown.service and dracut-initramfs-restore to reboot removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \ @@ -325,9 +324,13 @@ removefrom xorg-x11-drv-wacom /usr/bin/* removefrom xorg-x11-fonts-misc --allbut /usr/share/X11/fonts/misc/{6x13,encodings,fonts,*cursor}* removefrom xorg-x11-server-utils --allbut /usr/bin/xrandr /usr/share/X11/rgb.txt /usr/bin/xrdb removefrom yum /etc/* /usr/share/locale/* /usr/share/yum-cli/* -removefrom ${product.name}-logos /etc/* -removefrom ${product.name}-logos /usr/share/icons/{Bluecurve,oxygen}/* -removefrom ${product.name}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/* + +%if branding.release: + removefrom ${branding.logos}-logos /usr/share/plymouth/* + removefrom ${branding.logos}-logos /etc/* + removefrom ${branding.logos}-logos /usr/share/icons/{Bluecurve,oxygen}/* + removefrom ${branding.logos}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/* +%endif ## cleanup_python_files() runcmd find ${root} -name "*.pyo" -type f -delete diff --git a/lorax-templates-rhel.spec b/lorax-templates-rhel.spec index e49d9f9..ad2f86d 100644 --- a/lorax-templates-rhel.spec +++ b/lorax-templates-rhel.spec @@ -8,6 +8,9 @@ URL: https://github.com/weldr/lorax BuildArch: noarch Source0: lorax-templates-rhel-9.0-14.tar.gz +# Required for the template branding support +Requires: lorax > 34.9.1 + # Where are these supposed to end up? %define templatedir %{_datadir}/lorax/templates.d/80-rhel