|
|
|
@ -6,11 +6,13 @@ remove usr/share/i18n
|
|
|
|
|
|
|
|
|
|
## not required packages installed as dependencies
|
|
|
|
|
## no perl besides s390x
|
|
|
|
|
%if basearch != "s390x":
|
|
|
|
|
## perl needed for powerpc-utils and fbset on PPC
|
|
|
|
|
%if basearch not in ("ppc", "ppc64", "ppc64le", "s390x"):
|
|
|
|
|
removepkg perl*
|
|
|
|
|
%endif
|
|
|
|
|
## no sound support, thanks
|
|
|
|
|
removepkg alsa* flac gstreamer-tools libsndfile pulseaudio* sound-theme-freedesktop
|
|
|
|
|
## ...except alsa-libs, which are needed by spice-vdagent
|
|
|
|
|
removepkg alsa-*firmware* flac gstreamer-tools libsndfile pulseaudio* sound-theme-freedesktop
|
|
|
|
|
removepkg midisport-firmware
|
|
|
|
|
## no fancy video, either
|
|
|
|
|
removepkg libcrystalhd crystalhd-firmware ivtv-firmware cx18-firmware
|
|
|
|
@ -26,12 +28,22 @@ removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \
|
|
|
|
|
/usr/lib/dracut/dracut-initramfs-restore
|
|
|
|
|
## we don't run SELinux (not in enforcing, anyway)
|
|
|
|
|
removepkg checkpolicy selinux-policy libselinux-utils
|
|
|
|
|
|
|
|
|
|
## selinux checks for the /etc/selinux/config file's existance
|
|
|
|
|
## The removepkg above removes it, create an empty one. See rhbz#1243168
|
|
|
|
|
append etc/selinux/config ""
|
|
|
|
|
|
|
|
|
|
## anaconda has its own repo files
|
|
|
|
|
removefrom fedora-release --allbut /etc/os-release /usr/lib/os-release \
|
|
|
|
|
/usr/lib/os.release.d/*
|
|
|
|
|
removepkg fedora-release-rawhide
|
|
|
|
|
## no user accounts = no account management
|
|
|
|
|
removepkg usermode usermode-gtk passwd shadow-utils
|
|
|
|
|
|
|
|
|
|
## keep enough of shadow-utils to create accounts
|
|
|
|
|
removefrom shadow-utils --allbut /usr/bin/chage /usr/sbin/chpasswd \
|
|
|
|
|
/usr/sbin/groupadd /usr/sbin/useradd
|
|
|
|
|
|
|
|
|
|
## remove other account management tools
|
|
|
|
|
removepkg usermode usermode-gtk passwd
|
|
|
|
|
## no services to turn on/off (keep the /etc/init.d link though)
|
|
|
|
|
removefrom chkconfig --allbut /etc/init.d
|
|
|
|
|
## Miscellanous unnecessary gpg program
|
|
|
|
@ -48,6 +60,10 @@ remove /etc/logrotate.d
|
|
|
|
|
## anaconda needs this to do media check
|
|
|
|
|
removefrom isomd5sum --allbut /usr/bin/checkisomd5
|
|
|
|
|
|
|
|
|
|
## systemd-nspawn isn't very useful and doesn't link anyway without iptables,
|
|
|
|
|
## and there's no need for a bunch of zsh files without zsh
|
|
|
|
|
removefrom systemd /usr/bin/systemd-nspawn /usr/share/zsh
|
|
|
|
|
|
|
|
|
|
## various other things we remove to save space
|
|
|
|
|
removepkg avahi-autoipd coreutils-libs dash db4-utils diffutils file
|
|
|
|
|
removepkg genisoimage info iptables
|
|
|
|
@ -76,21 +92,21 @@ remove /var/lib/rpm/* /var/lib/yum
|
|
|
|
|
remove /usr/share/icons/*/icon-theme.cache
|
|
|
|
|
|
|
|
|
|
## clean up kernel modules
|
|
|
|
|
<%
|
|
|
|
|
removekmods = """
|
|
|
|
|
sound drivers/media drivers/hwmon drivers/video
|
|
|
|
|
net/atm net/bluetooth net/sched net/sctp net/bridge
|
|
|
|
|
net/rds net/l2tp net/decnet net/netfilter net/ipv4 net/ipv6
|
|
|
|
|
drivers/watchdog drivers/target drivers/rtc drivers/input/joystick
|
|
|
|
|
drivers/bluetooth drivers/edac drivers/staging
|
|
|
|
|
drivers/usb/serial drivers/usb/host drivers/usb/misc
|
|
|
|
|
fs/ocfs2 fs/ceph fs/nfsd fs/ubifs fs/nilfs2
|
|
|
|
|
arch/x86/kvm
|
|
|
|
|
"""
|
|
|
|
|
%>
|
|
|
|
|
%for kmodpath in removekmods.split():
|
|
|
|
|
remove lib/modules/*/kernel/${kmodpath}
|
|
|
|
|
%endfor
|
|
|
|
|
removekmod sound drivers/media drivers/hwmon \
|
|
|
|
|
net/atm net/bluetooth net/sched net/sctp \
|
|
|
|
|
net/rds net/l2tp net/decnet net/netfilter net/ipv4 net/ipv6 \
|
|
|
|
|
drivers/watchdog drivers/target drivers/rtc drivers/input/joystick \
|
|
|
|
|
drivers/bluetooth drivers/edac drivers/staging \
|
|
|
|
|
drivers/usb/serial drivers/usb/host drivers/usb/misc \
|
|
|
|
|
fs/ocfs2 fs/ceph fs/nfsd fs/ubifs fs/nilfs2 \
|
|
|
|
|
arch/x86/kvm
|
|
|
|
|
## Need to keep virtio_console.ko and ipmi stuff in drivers/char
|
|
|
|
|
## Also keep virtio-rng so that the installer can get sufficient randomness for
|
|
|
|
|
## LUKS setup.
|
|
|
|
|
removekmod drivers/char --allbut virtio_console hw_random \
|
|
|
|
|
virtio-rng ipmi
|
|
|
|
|
removekmod drivers/hid --allbut hid-logitech-dj hid-logitech-hidpp
|
|
|
|
|
removekmod drivers/video --allbut hyperv_fb
|
|
|
|
|
remove lib/modules/*/{build,source,*.map}
|
|
|
|
|
## Need to keep virtio_console.ko and ipmi stuff in drivers/char
|
|
|
|
|
## Also keep virtio-rng so that the installer can get sufficient randomness for
|
|
|
|
@ -110,10 +126,6 @@ runcmd chroot ${root} find /lib/modules \
|
|
|
|
|
-delete
|
|
|
|
|
## NOTE: depmod gets re-run after cleanup finishes
|
|
|
|
|
|
|
|
|
|
## do not include plymouth 'label' plugin (no text used in installer theme)
|
|
|
|
|
remove etc/dracut.conf.d/plymouth-missing-fonts.conf
|
|
|
|
|
remove etc/fonts/conf.d/57-dejavu-sans.conf
|
|
|
|
|
|
|
|
|
|
## remove unused themes, theme engines, icons, etc.
|
|
|
|
|
removefrom gtk2 /usr/${libdir}/gtk-2.0/*/{engines,printbackends}/*
|
|
|
|
|
removefrom gtk2 /usr/share/themes/*
|
|
|
|
@ -123,9 +135,6 @@ removefrom gtk2-engines --allbut /usr/${libdir}/*/libclearlooks.so \
|
|
|
|
|
removefrom gtk3 /usr/${libdir}/gtk-3.0/*/printbackends/*
|
|
|
|
|
removefrom gtk3 /usr/share/themes/*
|
|
|
|
|
removefrom metacity --allbut /usr/bin/* /usr/${libdir}/* /etc/*
|
|
|
|
|
## the Fedora icon theme inherits from Mist, so we need that
|
|
|
|
|
removefrom gnome-themes --allbut /usr/share/icons/Mist/* \
|
|
|
|
|
/usr/share/themes/Clearlooks/*
|
|
|
|
|
|
|
|
|
|
## filesystem tools
|
|
|
|
|
removefrom e2fsprogs /usr/share/locale/*
|
|
|
|
@ -153,7 +162,7 @@ removefrom bind-utils /usr/bin/dig /usr/bin/host /usr/bin/nsupdate
|
|
|
|
|
removefrom bitmap-fangsongti-fonts /usr/share/fonts/*
|
|
|
|
|
removefrom ca-certificates /etc/pki/java/*
|
|
|
|
|
removefrom ca-certificates /etc/pki/tls/certs/ca-bundle.trust.crt /etc/ssl/*
|
|
|
|
|
removefrom cairo /usr/${libdir}/libcairo-script*
|
|
|
|
|
removefrom cairo /usr/${libdir}/libcairo-script* /usr/bin/cairo-sphinx
|
|
|
|
|
removefrom coreutils /etc/* /usr/bin/link /usr/bin/nice /usr/bin/stty /usr/bin/su /usr/bin/unlink
|
|
|
|
|
removefrom coreutils /usr/sbin/runuser /usr/bin/[ /usr/bin/base64 /usr/bin/chcon
|
|
|
|
|
removefrom coreutils /usr/bin/cksum /usr/bin/comm /usr/bin/csplit
|
|
|
|
@ -214,10 +223,6 @@ removefrom glibc-common /usr/libexec/* /usr/sbin/*
|
|
|
|
|
removefrom gmp /usr/${libdir}/libgmpxx.* /usr/${libdir}/libmp.*
|
|
|
|
|
removefrom gnome-bluetooth-libs /usr/${libdir}/libgnome-bluetooth*
|
|
|
|
|
removefrom gnome-bluetooth-libs /usr/share/*
|
|
|
|
|
removefrom gnome-keyring /etc/xdg/* /usr/bin/* /usr/${libdir}/* /usr/libexec/*
|
|
|
|
|
removefrom gnome-keyring /usr/share/GConf/* /usr/share/gcr-3/*
|
|
|
|
|
removefrom gnome-keyring /usr/share/glib-2.0/* /usr/share/gnome-keyring*
|
|
|
|
|
removefrom gnome-keyring /usr/share/locale/*
|
|
|
|
|
removefrom gnutls /usr/share/locale/*
|
|
|
|
|
removefrom gpgme /usr/${libdir}/libgpgme-*
|
|
|
|
|
removefrom grep /etc/* /usr/share/locale/*
|
|
|
|
@ -308,8 +313,6 @@ removefrom procps /usr/bin/vmstat /usr/bin/w /usr/bin/watch
|
|
|
|
|
removefrom psmisc /usr/share/locale/*
|
|
|
|
|
removefrom pygtk2 /usr/bin/* /usr/${libdir}/pygtk/*
|
|
|
|
|
removefrom pykickstart /usr/bin/* /usr/share/locale/*
|
|
|
|
|
removefrom python-ethtool /usr/sbin/*
|
|
|
|
|
removefrom python-meh /usr/share/locale/*
|
|
|
|
|
removefrom readline /usr/${libdir}/*
|
|
|
|
|
removefrom libreport /usr/bin/* /usr/share/locale/*
|
|
|
|
|
removefrom rpm /usr/bin/* /usr/share/locale/*
|
|
|
|
|