Skip to content

Commit

Permalink
templates: Synchronize generic templates with lorax-templates-rhel
Browse files Browse the repository at this point in the history
Related: RHEL-35396
  • Loading branch information
bcl committed Jul 19, 2024
1 parent 0d6e4f9 commit b987e55
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 78 deletions.
54 changes: 14 additions & 40 deletions share/templates.d/99-generic/runtime-cleanup.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ remove usr/share/i18n
## perl needed for powerpc-utils
## perl is needed by /usr/bin/rxe_cfg from libibverbs

## no sound support, thanks
removepkg flac-libs libsndfile pipewire pulseaudio* rtkit sound-theme-freedesktop wireplumber*
## 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
Expand Down Expand Up @@ -52,13 +50,11 @@ removepkg mtools glibc-gconv-extra

## various other things we remove to save space
removepkg diffutils file
removepkg libasyncns
removepkg lvm2-libs
removepkg mobile-broadband-provider-info
removepkg rmt rpcbind squashfs-tools
removepkg tigervnc-license xml-common
removepkg xml-common
removepkg mkfontscale fonttosfnt
removepkg xorg-x11-server-common
# do not remove this, required for ppc64le and s390x !!!
removepkg ncurses

Expand Down Expand Up @@ -93,8 +89,8 @@ removekmod sound drivers/media drivers/hwmon drivers/iio \
## LUKS setup. As of 2020-09 this is not built as a module, but keep it in here
## in case that changes again
removekmod drivers/char --allbut virtio_console hw_random \
virtio-rng ipmi hmcdrv
removekmod drivers/hid --allbut hid-logitech-dj hid-logitech-hidpp
virtio-rng ipmi hmcdrv nvram
removekmod drivers/hid --allbut hid-logitech-dj hid-logitech-hidpp hid-multitouch

## As of 2020-09 most of this are built-in too, but again, keep them listed
removekmod drivers/video --allbut hyperv_fb syscopyarea sysfillrect sysimgblt fb_sys_fops
Expand Down Expand Up @@ -132,7 +128,7 @@ removefrom coreutils /usr/bin/pinky /usr/bin/pr /usr/bin/printenv
removefrom coreutils /usr/bin/printf /usr/bin/ptx /usr/bin/runcon
removefrom coreutils /usr/bin/sha224sum /usr/bin/sha384sum
removefrom coreutils /usr/bin/sha512sum /usr/bin/shuf /usr/bin/stat
removefrom coreutils /usr/bin/sum /usr/bin/test
removefrom coreutils /usr/bin/stdbuf /usr/bin/sum /usr/bin/test
removefrom coreutils /usr/bin/timeout /usr/bin/truncate /usr/bin/tsort
removefrom coreutils /usr/bin/unexpand /usr/bin/users /usr/bin/vdir
removefrom coreutils /usr/bin/who /usr/bin/whoami /usr/bin/yes
Expand All @@ -158,7 +154,6 @@ removefrom fontconfig /usr/bin/*
removefrom gawk /usr/libexec/* /usr/share/*
removefrom gdb /usr/share/* /usr/include/*
removefrom gdb-headless /usr/share/* /etc/gdbinit*
removefrom gdisk /usr/share/*
removefrom gdk-pixbuf2 /usr/share/locale*
removefrom glib2 /usr/bin/* /usr/share/locale/*
removefrom glibc /etc/gai.conf /etc/rpc
Expand All @@ -175,7 +170,7 @@ removefrom glibc-common /usr/bin/tzselect
removefrom glibc-common /usr/sbin/*
removefrom gnutls /usr/share/locale/*
removefrom google-noto-sans-cjk-fonts /usr/share/fonts/google-noto-sans-cjk-fonts/NotoSansCJK-{Black,Bold,*Light,Medium,Thin}.ttc
removefrom google-noto-sans-vf-fonts /usr/share/fonts/google-noto-vf/NotoSans-Italic*
removefrom google-noto-sans-vf-fonts /usr/share/fonts/google-noto-vf/NotoSans-Italic-VF.ttf
removefrom google-noto-serif-vf-fonts /usr/share/fonts/google-noto-vf/NotoSerif*
removefrom grep /etc/* /usr/share/locale/*
removefrom gtk3 /usr/${libdir}/gtk-3.0/*
Expand All @@ -200,12 +195,8 @@ removefrom libidn2 /usr/share/locale/*
removefrom libnotify /usr/bin/*
removefrom libsemanage /etc/selinux/*
removefrom libstdc++ /usr/share/*
removefrom libvorbis /usr/${libdir}/libvorbisenc.*
removefrom libxml2 /usr/bin/*
removefrom linux-firmware /usr/lib/firmware/dvb*
removefrom linux-firmware /usr/lib/firmware/*_12mhz*
removefrom linux-firmware /usr/lib/firmware/v4l*
removefrom linux-firmware /usr/lib/firmware/brcm/BCM-*
removefrom brcmfmac-firmware /usr/lib/firmware/brcm/BCM-*
removefrom linux-firmware /usr/lib/firmware/ttusb-budget/dspbootcode.bin*
removefrom linux-firmware /usr/lib/firmware/emi26/*
removefrom linux-firmware /usr/lib/firmware/emi62/*
Expand All @@ -214,23 +205,18 @@ removefrom linux-firmware /usr/lib/firmware/dabusb/*
removefrom linux-firmware /usr/lib/firmware/vicam/*
removefrom linux-firmware /usr/lib/firmware/dsp56k/*
removefrom linux-firmware /usr/lib/firmware/sun/*
removefrom linux-firmware /usr/lib/firmware/av7110/*
removefrom linux-firmware /usr/lib/firmware/usbdux*
removefrom linux-firmware /usr/lib/firmware/f2255usb.bin*
removefrom linux-firmware /usr/lib/firmware/lgs8g75.fw*
removefrom linux-firmware /usr/lib/firmware/TDA7706*
removefrom linux-firmware /usr/lib/firmware/tlg2300_firmware.bin*
removefrom linux-firmware /usr/lib/firmware/s5p-mfc*
removefrom linux-firmware /usr/lib/firmware/go7007/*
removefrom linux-firmware /usr/lib/firmware/intel/IntcSST2.bin*
removefrom linux-firmware /usr/lib/firmware/intel/fw_sst*
removefrom linux-firmware /usr/lib/firmware/intel/dsp*
removefrom linux-firmware /usr/lib/firmware/as102*
removefrom linux-firmware /usr/lib/firmware/qcom/apq8096/*
removefrom linux-firmware /usr/lib/firmware/qcom/sdm845/*
removefrom linux-firmware /usr/lib/firmware/qcom/sm8250/*
removefrom linux-firmware /usr/lib/firmware/qcom/venus*/*
removefrom linux-firmware /usr/lib/firmware/qcom/vpu*/*
removefrom qcom-firmware /usr/lib/firmware/qcom/apq8096/*
removefrom qcom-firmware /usr/lib/firmware/qcom/sdm845/*
removefrom qcom-firmware /usr/lib/firmware/qcom/sm8250/*
removefrom qcom-firmware /usr/lib/firmware/qcom/venus*/*
removefrom qcom-firmware /usr/lib/firmware/qcom/vpu*/*
removefrom linux-firmware /usr/lib/firmware/meson/vdec/*
removefrom linux-firmware /usr/lib/firmware/phanfw.bin*
## these are for SoCs used in Chromebooks, our kernel does not build the drivers
Expand Down Expand Up @@ -293,7 +279,7 @@ removefrom openssh /usr/libexec/*
removefrom openssh-clients /etc/ssh/* /usr/bin/ssh-*
removefrom openssh-clients /usr/libexec/*
removefrom openssh-server /etc/ssh/* /usr/libexec/openssh/sftp-server
removefrom pam /usr/sbin/* /usr/share/locale/*
removefrom pam /usr/share/locale/*
removefrom policycoreutils /etc/* /usr/bin/* /usr/share/locale/*
removefrom polkit /usr/bin/*
removefrom popt /usr/share/locale/*
Expand All @@ -304,7 +290,6 @@ removefrom procps-ng /usr/bin/vmstat /usr/bin/w /usr/bin/watch
removefrom psmisc /usr/share/locale/*
removefrom python3-kickstart /usr/lib/python*/site-packages/pykickstart/locale/*
removefrom readline /usr/${libdir}/libhistory*
removefrom libreport /usr/share/locale/*
removefrom rdma-core /etc/rdma/mlx4.conf
removefrom rpm /usr/bin/* /usr/share/locale/*
removefrom rsync /etc/*
Expand All @@ -326,20 +311,13 @@ removefrom util-linux-core --allbut \
removefrom volume_key-libs /usr/share/locale/*
removefrom wget2 /usr/share/locale/*
removefrom wpa_supplicant /usr/sbin/eapol_test
removefrom xorg-x11-drv-intel /usr/${libdir}/libI*
removefrom xorg-x11-drv-wacom /usr/bin/*
removefrom yelp /usr/share/yelp/mathjax*

%if branding.release:
removefrom ${branding.logos} /usr/share/plymouth/*
removefrom ${branding.logos} /etc/*
removefrom ${branding.logos} /usr/share/icons/{Bluecurve,oxygen}/*

# Keep /usr/share/pixmaps/fedora-logo-sprite.svg if it exists
# See https://github.com/weldr/lorax/issues/1340
removefrom ${branding.logos} /usr/share/kde4/*
removefrom ${branding.logos} /usr/share/pixmaps/bootloader/*
removefrom ${branding.logos} /usr/share/pixmaps/*.png
removefrom ${branding.logos} /usr/share/{kde4,pixmaps}/*
%endif

## cleanup /boot/ leaving vmlinuz, and .*hmac files
Expand Down Expand Up @@ -370,11 +348,7 @@ removefrom gstreamer1-plugins-base --allbut \
removepkg geoclue2

## And remove the packages that those extra libraries pulled in
removepkg cdparanoia-libs opus libtheora libvisual flac-libs gsm avahi-glib avahi-libs \
ModemManager-glib

## metacity requires libvorbis and libvorbisfile, but enc/dec are no longer needed
removefrom libvorbis --allbut /usr/${libdir}/libvorbisfile.* /usr/${libdir}/libvorbis.*
removepkg cdparanoia-libs avahi-glib avahi-libs ModemManager-glib

## Remove build-id links, they are used with debuginfo
remove /usr/lib/.build-id
Expand Down
70 changes: 34 additions & 36 deletions share/templates.d/99-generic/runtime-install.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ GRUB2VER="1:2.06-67"
%>

## anaconda package
installpkg anaconda anaconda-widgets anaconda-install-img-deps
installpkg anaconda anaconda-widgets kdump-anaconda-addon anaconda-install-img-deps

## FIXME Pull in device-mapper-multipath
## This *should* be pulled in by libblockdev-plugins-all and libblockdev-mpath but it is not
installpkg device-mapper-multipath

## Other available payloads
installpkg dnf
installpkg rpm-ostree ostree
Expand All @@ -28,13 +33,8 @@ installpkg grubby
## https://bugzilla.redhat.com/show_bug.cgi?id=2011615
## bfa-firmware contains only obsolete files - see
## https://bugzilla.redhat.com/show_bug.cgi?id=2152202
## qcom-firmware we pull in again lower down but *only* on aarch64, it is
## no use on other arches - https://bugzilla.redhat.com/show_bug.cgi?id=2178852
## various iwl package names were changed in linux-firmware-20230625-151
## so need to be excluded or else dnf gets sad - see
## https://pagure.io/releng/issue/11511 . These exclusions can
## be dropped after F38 goes EOL . Ditto libertas separate packages
## obsoleted in linux-firmware-20230804-152
## Only install qcom-firmware on aarch64
## Exclude the audio firmware which is unused on the boot.iso
installpkg --optional *-firmware --except alsa* --except midisport-firmware \
--except crystalhd-firmware --except ivtv-firmware \
--except cx18-firmware --except iscan-firmware \
Expand All @@ -43,21 +43,10 @@ installpkg grubby
--except liquidio-firmware --except netronome-firmware \
--except mrvlprestera-firmware --except mlxsw_spectrum-firmware \
--except hackrf-firmware --except python-virt-firmware \
--except python3-virt-firmware \
--except iwl3945-firmware --except iwl4965-firmware \
--except iwl100-firmware --except iwl105-firmware \
--except iwl135-firmware --except iwl1000-firmware \
--except iwl2000-firmware --except iwl2030-firmware \
--except iwl5000-firmware --except iwl5150-firmware \
--except iwl6000-firmware --except iwl6000g2a-firmware \
--except iwl6000g2b-firmware --except iwl6050-firmware \
--except iwl3160-firmware --except iwl7260-firmware \
--except iwlax2xx-firmware \
--except libertas-sd8686-firmware --except libertas-sd8787-firmware \
--except libertas-usb8388-firmware \
--except libertas-usb8388-olpc-firmware \
--except qcom-firmware
installpkg b43-openfwwf
--except python3-virt-firmware --except qcom-firmware \
--except dvb-firmware --except intel-vsc-firmware \
--except cirrus-audio-firmware --except intel-audio-firmware

%endif

## install all of the glibc langpacks since otherwise we get no locales
Expand All @@ -69,16 +58,13 @@ installpkg glibc-all-langpacks
installpkg grub2-efi-aa64-cdboot>=${GRUB2VER}
installpkg grub2-tools>=${GRUB2VER}
installpkg shim-aa64
installpkg uboot-tools
installpkg qcom-firmware
%endif
%if basearch == "x86_64":
installpkg grub2-tools-efi>=${GRUB2VER}
installpkg efibootmgr
installpkg shim-x64
installpkg grub2-efi-x64-cdboot>=${GRUB2VER}
installpkg shim-ia32
installpkg grub2-efi-ia32-cdboot>=${GRUB2VER}
installpkg biosdevname
installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
installpkg grub2-tools-extra>=${GRUB2VER}
Expand Down Expand Up @@ -113,13 +99,26 @@ installpkg kbd kbd-misc
## required for anaconda-dracut (img-lib etc.)
installpkg tar xz curl bzip2

## this is only recommended by librsvg2 since 2023-07, but in the
## installer environment many icons used are only present as SVGs,
## so we really need it
installpkg rsvg-pixbuf-loader

## basic system stuff
installpkg rsyslog

## extra storage tools for rescue mode
## filesystem tools
installpkg xfsprogs dosfstools
installpkg device-mapper-persistent-data
installpkg xfsdump

## extra storage packages
# hostname is needed for iscsi to work, see RHBZ#1593917
installpkg udisks2 udisks2-iscsi hostname

## extra libblockdev plugins
installpkg libblockdev-lvm-dbus

## needed for LUKS escrow
installpkg volume_key
installpkg nss-tools
Expand All @@ -129,10 +128,8 @@ installpkg selinux-policy-targeted audit

## network tools/servers
installpkg ethtool openssh-server nfs-utils openssh-clients
installpkg tigervnc-server-minimal
installpkg tigervnc-server-module
installpkg net-tools
installpkg bridge-utils
installpkg ipcalc
installpkg nmap-ncat
installpkg prefixdevname

Expand All @@ -147,6 +144,7 @@ installpkg dmidecode
%endif
installpkg nvme-cli


## fonts & themes
installpkg default-fonts-core-sans
installpkg default-fonts-other-sans
Expand All @@ -156,16 +154,16 @@ installpkg google-noto-sans-cjk-fonts

## debugging/bug reporting tools
installpkg gdb-gdbserver
installpkg libreport-plugin-bugzilla libreport-plugin-reportuploader
installpkg fpaste
installpkg python3-pyatspi

## extra tools not required by anaconda
installpkg nano nano-default-editor
installpkg vim-minimal strace lsof dump xz less
installpkg wget2-wget rsync bind-utils ftp mtr vconfig
installpkg nano
installpkg vim-minimal strace lsof xz less
installpkg wget2-wget rsync bind-utils ftp mtr
installpkg spice-vdagent
installpkg gdisk hexedit sg3_utils
installpkg hexedit sg3_utils
installpkg perl-interpreter
installpkg restore

## actually install all the requested packages
run_pkg_transaction
3 changes: 1 addition & 2 deletions share/templates.d/99-generic/runtime-postinstall.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ append etc/depmod.d/dd.conf "search updates built-in"

## create multipath.conf so multipath gets auto-started
append etc/multipath.conf "defaults {\n\tfind_multipaths smart\n\tuser_friendly_names yes\n}\n"
append etc/multipath.conf "blacklist_exceptions {\n\tproperty \"(SCSI_IDENT_|ID_WWN)\"\n}\n"

## make lvm auto-activate
remove etc/lvm/archive/*
Expand All @@ -113,8 +114,6 @@ remove etc/lvm/cache/*
remove etc/lvm/cache
remove etc/lvm/lvm.conf
append etc/lvm/lvm.conf "global {\n\tuse_lvmetad = 1\n}\n"
# dmeventd and event libraries are not installed
append etc/lvm/lvm.conf "activation {\n\tmonitoring = 0\n}\n"

## Remove machine specific nvme-cli files
remove etc/nvme/hostid
Expand Down

0 comments on commit b987e55

Please sign in to comment.