2019-01-03 14:52:05 +00:00
|
|
|
# See fedora-container-common.ks for details on how to hack on container image kickstarts
|
2024-04-29 15:48:00 +00:00
|
|
|
# This base is a stripped back Fedora image without python3.
|
2017-03-23 17:40:57 +00:00
|
|
|
# If you need that use the standard base image.
|
2017-01-19 19:11:49 +00:00
|
|
|
|
2019-01-03 14:52:05 +00:00
|
|
|
%include fedora-container-common.ks
|
2017-01-19 19:11:49 +00:00
|
|
|
|
2017-01-20 03:06:33 +00:00
|
|
|
%packages --excludedocs --instLangs=en --nocore --excludeWeakdeps
|
2024-04-29 13:03:17 +00:00
|
|
|
dnf5
|
2023-10-24 11:33:29 +00:00
|
|
|
-tzdata
|
2017-01-19 19:11:49 +00:00
|
|
|
%end
|
|
|
|
|
|
|
|
%post --erroronfail --log=/root/anaconda-post.log
|
2017-01-20 03:32:12 +00:00
|
|
|
# remove some random help txt files
|
2017-01-20 23:27:39 +00:00
|
|
|
rm -fv usr/share/gnupg/help*.txt
|
2017-01-20 02:32:36 +00:00
|
|
|
|
|
|
|
# Pruning random things
|
2017-01-20 03:32:12 +00:00
|
|
|
rm usr/lib/rpm/rpm.daily
|
2017-01-20 23:27:39 +00:00
|
|
|
rm -rfv usr/lib64/nss/unsupported-tools/ # unsupported
|
2017-01-20 02:32:36 +00:00
|
|
|
|
|
|
|
# Statically linked crap
|
2017-01-20 23:27:39 +00:00
|
|
|
rm -fv usr/sbin/{glibc_post_upgrade.x86_64,sln}
|
2017-01-20 02:32:36 +00:00
|
|
|
ln usr/bin/ln usr/sbin/sln
|
|
|
|
|
2017-01-20 23:28:39 +00:00
|
|
|
# Remove some dnf info
|
|
|
|
rm -rfv /var/lib/dnf
|
|
|
|
|
|
|
|
# don't need icons
|
|
|
|
rm -rfv /usr/share/icons/*
|
|
|
|
|
|
|
|
#some random not-that-useful binaries
|
|
|
|
rm -fv /usr/bin/pinky
|
|
|
|
|
|
|
|
# we lose presets by removing /usr/lib/systemd but we do not care
|
|
|
|
rm -rfv /usr/lib/systemd
|
|
|
|
|
2017-01-20 02:32:36 +00:00
|
|
|
# Final pruning
|
2017-03-23 17:40:57 +00:00
|
|
|
rm -rfv /var/cache/* /var/log/* /tmp/*
|
2017-01-20 02:32:36 +00:00
|
|
|
|
2017-01-19 19:11:49 +00:00
|
|
|
%end
|
2017-01-20 03:36:54 +00:00
|
|
|
|
|
|
|
%post --nochroot --erroronfail --log=/mnt/sysimage/root/anaconda-post-nochroot.log
|
|
|
|
set -eux
|
|
|
|
|
2017-01-20 03:50:29 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1343138
|
|
|
|
# Fix /run/lock breakage since it's not tmpfs in docker
|
|
|
|
# This unmounts /run (tmpfs) and then recreates the files
|
|
|
|
# in the /run directory on the root filesystem of the container
|
|
|
|
# NOTE: run this in nochroot because "umount" does not exist in chroot
|
|
|
|
umount /mnt/sysimage/run
|
|
|
|
# The file that specifies the /run/lock tmpfile is
|
|
|
|
# /usr/lib/tmpfiles.d/legacy.conf, which is part of the systemd
|
|
|
|
# rpm that isn't included in this image. We'll create the /run/lock
|
|
|
|
# file here manually with the settings from legacy.conf
|
|
|
|
# NOTE: chroot to run "install" because it is not in anaconda env
|
|
|
|
chroot /mnt/sysimage install -d /run/lock -m 0755 -o root -g root
|
|
|
|
|
|
|
|
|
2017-01-20 03:36:54 +00:00
|
|
|
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816
|
|
|
|
# NOTE: run this in nochroot because "find" does not exist in chroot
|
|
|
|
KEEPLANG=en_US
|
|
|
|
for dir in locale i18n; do
|
2017-01-20 23:27:39 +00:00
|
|
|
find /mnt/sysimage/usr/share/${dir} -mindepth 1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rfv {} +
|
2017-01-20 03:36:54 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
%end
|