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
This commit is contained in:
Brian C. Lane 2021-05-05 12:05:23 -07:00
parent bd59be9cf7
commit 91133f1b20
2 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,5 @@
## lorax template file: cleanup for the ramdisk (runtime image) ## lorax template file: cleanup for the ramdisk (runtime image)
<%page args="libdir, product, root"/> <%page args="libdir, branding, root"/>
## remove the sources ## remove the sources
remove usr/share/i18n 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 ## we don't create new initramfs/bootloader conf inside anaconda
## (that happens inside the target system after we install dracut/grubby) ## (that happens inside the target system after we install dracut/grubby)
removepkg dracut-network grubby anaconda-dracut 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 ## 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 ## We also need dracut-shutdown.service and dracut-initramfs-restore to reboot
removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \ 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-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 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 yum /etc/* /usr/share/locale/* /usr/share/yum-cli/*
removefrom ${product.name}-logos /etc/*
removefrom ${product.name}-logos /usr/share/icons/{Bluecurve,oxygen}/* %if branding.release:
removefrom ${product.name}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pixmaps}/* 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() ## cleanup_python_files()
runcmd find ${root} -name "*.pyo" -type f -delete runcmd find ${root} -name "*.pyo" -type f -delete

View File

@ -8,6 +8,9 @@ URL: https://github.com/weldr/lorax
BuildArch: noarch BuildArch: noarch
Source0: lorax-templates-rhel-9.0-14.tar.gz 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? # Where are these supposed to end up?
%define templatedir %{_datadir}/lorax/templates.d/80-rhel %define templatedir %{_datadir}/lorax/templates.d/80-rhel