make minimal KS actually minimal
This commit is contained in:
parent
97abb0700a
commit
f22d3ec0b3
@ -24,57 +24,59 @@ autopart --noboot --nohome --noswap --nolvm --fstype=ext4
|
|||||||
# Package setup
|
# Package setup
|
||||||
%packages --ignoremissing --excludedocs --instLangs=en --nocore --excludeWeakdeps
|
%packages --ignoremissing --excludedocs --instLangs=en --nocore --excludeWeakdeps
|
||||||
bash
|
bash
|
||||||
binutils
|
|
||||||
coreutils-single
|
coreutils-single
|
||||||
glibc-minimal-langpack
|
glibc-minimal-langpack
|
||||||
hostname
|
microdnf
|
||||||
iputils
|
|
||||||
less
|
|
||||||
rocky-release
|
rocky-release
|
||||||
rootfiles
|
|
||||||
tar
|
|
||||||
vim-minimal
|
|
||||||
yum
|
|
||||||
|
|
||||||
-brotli
|
-brotli
|
||||||
-dosfstools
|
-dosfstools
|
||||||
-kexec-tools
|
|
||||||
-e2fsprogs
|
-e2fsprogs
|
||||||
-firewalld
|
-firewalld
|
||||||
-fuse-libs
|
-fuse-libs
|
||||||
-gettext*
|
-gettext*
|
||||||
-gnupg2-smime
|
-gnupg2-smime
|
||||||
-grub\*
|
-grub\*
|
||||||
|
-hostname
|
||||||
-iptables
|
-iptables
|
||||||
|
-iputils
|
||||||
-kernel
|
-kernel
|
||||||
|
-kexec-tools
|
||||||
|
-less
|
||||||
-libss
|
-libss
|
||||||
-os-prober*
|
-os-prober*
|
||||||
-pinentry
|
-pinentry
|
||||||
-qemu-guest-agent
|
-qemu-guest-agent
|
||||||
|
-rootfiles
|
||||||
-shared-mime-info
|
-shared-mime-info
|
||||||
|
-tar
|
||||||
-trousers
|
-trousers
|
||||||
|
-vim-minimal
|
||||||
-xfsprogs
|
-xfsprogs
|
||||||
-xkeyboard-config
|
-xkeyboard-config
|
||||||
|
-yum
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%post --erroronfail --log=/root/anaconda-post.log
|
%post --erroronfail --log=/root/anaconda-post.log
|
||||||
# container customizations inside the chroot
|
# container customizations inside the chroot
|
||||||
|
|
||||||
# Stay compatible
|
|
||||||
|
rpm --rebuilddb
|
||||||
|
|
||||||
|
/bin/date +%Y-%m-%d_%H:%M:%S > /etc/BUILDTIME
|
||||||
|
|
||||||
echo 'container' > /etc/dnf/vars/infra
|
echo 'container' > /etc/dnf/vars/infra
|
||||||
|
|
||||||
#Generate installtime file record
|
|
||||||
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
|
|
||||||
|
|
||||||
# Limit languages to help reduce size.
|
|
||||||
LANG="en_US"
|
LANG="en_US"
|
||||||
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
|
echo '%_install_langs en_US.UTF-8' > /etc/rpm/macros.image-language-conf
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1727489
|
|
||||||
echo 'LANG="C.UTF-8"' > /etc/locale.conf
|
echo 'LANG="C.UTF-8"' > /etc/locale.conf
|
||||||
|
|
||||||
|
rm -f /var/lib/dnf/history.*
|
||||||
|
rm -fr "/var/log/*" "/tmp/*" "/tmp/.*"
|
||||||
|
|
||||||
|
for dir in $(ls -d "/usr/share/{locale,i18n}/*" | grep -v 'en_US\|all_languages\|locale\.alias'); do rm -fr $dir; done
|
||||||
|
|
||||||
# systemd fixes
|
# systemd fixes
|
||||||
:> /etc/machine-id
|
|
||||||
umount /run
|
umount /run
|
||||||
systemd-tmpfiles --create --boot
|
systemd-tmpfiles --create --boot
|
||||||
|
|
||||||
@ -91,6 +93,6 @@ systemctl mask \
|
|||||||
rm -f /etc/udev/hwdb.bin
|
rm -f /etc/udev/hwdb.bin
|
||||||
rm -rf /usr/lib/udev/hwdb.d/ \
|
rm -rf /usr/lib/udev/hwdb.d/ \
|
||||||
/boot /var/lib/dnf/history.* \
|
/boot /var/lib/dnf/history.* \
|
||||||
/tmp/* /tmp/.* || true
|
"/tmp/*" "/tmp/.*" || true
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
Loading…
Reference in New Issue
Block a user