2019-01-03 14:52:05 +00:00
|
|
|
# See fedora-container-common.ks for details on how to hack on container image kickstarts
|
2017-03-23 17:40:57 +00:00
|
|
|
# This base is a standard Fedora image with python3 and dnf
|
2014-07-29 12:30:03 +00:00
|
|
|
|
2019-01-03 14:52:05 +00:00
|
|
|
%include fedora-container-common.ks
|
2014-07-29 12:30:03 +00:00
|
|
|
|
2019-07-22 16:56:49 +00:00
|
|
|
%packages --excludedocs --instLangs=en --nocore --excludeWeakdeps
|
2015-01-12 11:42:18 +00:00
|
|
|
rootfiles
|
2018-04-04 15:25:10 +00:00
|
|
|
# https://communityblog.fedoraproject.org/modularity-dead-long-live-modularity/
|
|
|
|
fedora-repos-modular
|
2017-03-23 17:40:57 +00:00
|
|
|
tar # https://bugzilla.redhat.com/show_bug.cgi?id=1409920
|
2014-07-29 12:30:03 +00:00
|
|
|
vim-minimal
|
2015-03-07 17:12:24 +00:00
|
|
|
dnf
|
2015-03-25 19:33:35 +00:00
|
|
|
dnf-yum # https://fedorahosted.org/fesco/ticket/1312#comment:29
|
2015-10-30 14:06:48 +00:00
|
|
|
sssd-client
|
2019-05-05 12:16:11 +00:00
|
|
|
sudo
|
2019-06-06 12:53:58 +00:00
|
|
|
-glibc-langpack-en
|
2019-07-05 06:56:35 +00:00
|
|
|
-cracklib-dicts
|
2019-07-30 09:16:59 +00:00
|
|
|
-langpacks-en
|
2014-07-29 12:30:03 +00:00
|
|
|
%end
|
|
|
|
|
2017-01-19 19:19:24 +00:00
|
|
|
%post --erroronfail --log=/root/anaconda-post.log
|
2017-01-19 19:32:47 +00:00
|
|
|
# remove some extraneous files
|
|
|
|
rm -rf /var/cache/dnf/*
|
|
|
|
rm -rf /tmp/*
|
2014-07-29 12:30:03 +00:00
|
|
|
|
2017-08-01 11:04:42 +00:00
|
|
|
# https://pagure.io/atomic-wg/issue/308
|
|
|
|
printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf
|
|
|
|
|
2020-07-14 16:01:17 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1576993
|
|
|
|
systemctl disable dnf-makecache.timer
|
|
|
|
|
|
|
|
#Mask mount units and getty service so that we don't get login prompt
|
|
|
|
systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service
|
2015-01-21 09:17:49 +00:00
|
|
|
|
2017-01-19 20:31:38 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1343138
|
2016-07-22 20:26:49 +00:00
|
|
|
# Fix /run/lock breakage since it's not tmpfs in docker
|
2017-01-19 20:31:38 +00:00
|
|
|
# This unmounts /run (tmpfs) and then recreates the files
|
|
|
|
# in the /run directory on the root filesystem of the container
|
2017-05-19 13:40:49 +00:00
|
|
|
#
|
|
|
|
# We ignore the return code of the systemd-tmpfiles command because
|
|
|
|
# at this point we have already removed the /etc/machine-id and all
|
|
|
|
# tmpfiles lines with %m in them will fail and cause a bad return
|
|
|
|
# code. Example failure:
|
|
|
|
# [/usr/lib/tmpfiles.d/systemd.conf:26] Failed to replace specifiers: /run/log/journal/%m
|
|
|
|
#
|
2016-07-22 20:26:49 +00:00
|
|
|
umount /run
|
2020-07-14 16:01:17 +00:00
|
|
|
systemd-tmpfiles --prefix=/run/ --prefix=/var/run/ --create --boot || true
|
2017-08-11 13:11:36 +00:00
|
|
|
rm /run/nologin # https://pagure.io/atomic-wg/issue/316
|
2016-07-22 20:26:49 +00:00
|
|
|
|
2019-07-25 06:52:29 +00:00
|
|
|
# Final pruning
|
|
|
|
rm -rfv /var/cache/* /var/log/* /tmp/*
|
|
|
|
|
2014-07-29 12:30:03 +00:00
|
|
|
%end
|
2019-07-07 08:55:42 +00:00
|
|
|
|
|
|
|
%post --nochroot --erroronfail --log=/mnt/sysimage/root/anaconda-post-nochroot.log
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# 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
|
|
|
|
find /mnt/sysimage/usr/share/${dir} -mindepth 1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rfv {} +
|
|
|
|
done
|
|
|
|
|
|
|
|
%end
|