2023-06-08 06:06:08 +00:00
|
|
|
# Kickstart file for Fedora Toolbox
|
|
|
|
|
|
|
|
# See fedora-container-common.ks for details on how to hack on container image kickstarts
|
2023-08-07 17:32:41 +00:00
|
|
|
# This base is a standard Fedora image with python3 and dnf
|
2023-06-08 06:06:08 +00:00
|
|
|
|
|
|
|
%include fedora-container-common.ks
|
|
|
|
|
|
|
|
# Install packages
|
2023-07-11 07:34:10 +00:00
|
|
|
%packages --inst-langs=en --nocore --exclude-weakdeps
|
2023-06-08 06:06:08 +00:00
|
|
|
acl
|
|
|
|
bash
|
|
|
|
bash-completion
|
|
|
|
bc
|
|
|
|
bzip2
|
2023-07-12 09:51:28 +00:00
|
|
|
coreutils-common
|
|
|
|
curl
|
2023-06-08 06:06:08 +00:00
|
|
|
diffutils
|
2023-08-07 17:32:41 +00:00
|
|
|
dnf
|
|
|
|
dnf-yum # https://fedorahosted.org/fesco/ticket/1312#comment:29
|
|
|
|
dnf-plugins-core
|
2023-07-12 09:51:28 +00:00
|
|
|
findutils
|
2023-06-08 06:06:08 +00:00
|
|
|
flatpak-spawn
|
|
|
|
fpaste
|
2023-07-12 09:51:28 +00:00
|
|
|
gawk
|
2023-06-08 06:06:08 +00:00
|
|
|
git
|
2023-07-12 09:51:28 +00:00
|
|
|
-glibc-minimal-langpack
|
|
|
|
glibc-all-langpacks
|
|
|
|
gnupg2
|
2023-06-08 06:06:08 +00:00
|
|
|
gnupg2-smime
|
2023-07-12 09:51:28 +00:00
|
|
|
grep
|
2023-06-08 06:06:08 +00:00
|
|
|
gvfs-client
|
2023-07-12 09:51:28 +00:00
|
|
|
gzip
|
2023-06-08 06:06:08 +00:00
|
|
|
hostname
|
|
|
|
iproute
|
|
|
|
iputils
|
|
|
|
keyutils
|
|
|
|
krb5-libs
|
|
|
|
less
|
2023-07-12 09:51:28 +00:00
|
|
|
libcap
|
2023-06-08 06:06:08 +00:00
|
|
|
lsof
|
|
|
|
man-db
|
|
|
|
man-pages
|
|
|
|
mesa-dri-drivers
|
|
|
|
mesa-vulkan-drivers
|
|
|
|
mtr
|
|
|
|
nano-default-editor
|
|
|
|
nss-mdns
|
|
|
|
openssh-clients
|
2023-07-12 09:51:28 +00:00
|
|
|
openssl
|
|
|
|
p11-kit
|
|
|
|
pam
|
2023-06-08 06:06:08 +00:00
|
|
|
passwd
|
|
|
|
pigz
|
|
|
|
procps-ng
|
2023-07-12 09:51:28 +00:00
|
|
|
python3
|
|
|
|
rootfiles
|
|
|
|
rpm
|
2023-06-08 06:06:08 +00:00
|
|
|
rsync
|
2023-07-12 09:51:28 +00:00
|
|
|
sed
|
2023-06-08 06:06:08 +00:00
|
|
|
shadow-utils
|
2023-07-12 09:51:28 +00:00
|
|
|
sudo
|
|
|
|
systemd
|
|
|
|
tar # https://bugzilla.redhat.com/show_bug.cgi?id=1409920
|
2023-06-08 06:06:08 +00:00
|
|
|
tcpdump
|
|
|
|
time
|
|
|
|
traceroute
|
|
|
|
tree
|
|
|
|
unzip
|
|
|
|
util-linux
|
2023-07-12 09:51:28 +00:00
|
|
|
util-linux-core
|
|
|
|
vim-enhanced
|
2023-06-08 06:06:08 +00:00
|
|
|
vte-profile
|
|
|
|
vulkan-loader
|
|
|
|
wget
|
|
|
|
which
|
2023-07-12 09:51:28 +00:00
|
|
|
whois
|
2023-06-08 06:06:08 +00:00
|
|
|
words
|
|
|
|
xorg-x11-xauth
|
|
|
|
xz
|
|
|
|
zip
|
|
|
|
%end
|
|
|
|
|
|
|
|
# Pre-installation commands
|
|
|
|
%pre
|
|
|
|
# Copy README.md
|
|
|
|
cp /README.md /mnt/sysimage/README.md
|
|
|
|
|
|
|
|
# Remove macros.image-language-conf file
|
|
|
|
rm -f /mnt/sysimage/etc/rpm/macros.image-language-conf
|
|
|
|
|
|
|
|
# Remove 'tsflags=nodocs' line from dnf.conf
|
|
|
|
sed -i '/tsflags=nodocs/d' /mnt/sysimage/etc/dnf/dnf.conf
|
|
|
|
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
umount /run
|
|
|
|
rm -f /run/nologin # https://pagure.io/atomic-wg/issue/316
|
|
|
|
|
|
|
|
# Final pruning
|
|
|
|
rm -rfv /var/cache/* /var/log/* /tmp/*
|
|
|
|
|
|
|
|
%end
|
|
|
|
|
|
|
|
# Perform any necessary post-installation configurations specific to Fedora Toolbox (nochroot environment)
|
|
|
|
# Post-installation commands
|
|
|
|
|
|
|
|
%post --nochroot --erroronfail --log=/mnt/sysimage/root/anaconda-post-nochroot.log
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# Check if specified files exist
|
2023-07-12 09:51:28 +00:00
|
|
|
#declare -a files=(
|
|
|
|
# "/usr/share/man/man1/bash.1*"
|
|
|
|
# "/usr/share/man/man1/cd.1*"
|
|
|
|
# "/usr/share/man/man1/export.1*"
|
|
|
|
# "/usr/share/man/man1/cat.1*"
|
|
|
|
# "/usr/share/man/man1/cp.1*"
|
|
|
|
# "/usr/share/man/man1/ls.1*"
|
|
|
|
# "/usr/share/man/man1/gpg2.1*"
|
|
|
|
# "/usr/share/man/man7/gnupg2.7*"
|
|
|
|
# "/usr/share/man/fr/man8/rpm.8*"
|
|
|
|
# "/usr/share/man/ja/man8/rpm.8*"
|
|
|
|
# "/usr/share/man/man8/rpm.8*"
|
|
|
|
# "/usr/share/man/man1/kill.1*"
|
|
|
|
# "/usr/share/man/man8/mount.8*"
|
|
|
|
#)
|
|
|
|
|
|
|
|
#ret_val=0
|
|
|
|
#for file in "${files[@]}"; do
|
|
|
|
# if ! compgen -G "$file" >/dev/null; then
|
|
|
|
# echo "$file: No such file or directory" >&2
|
|
|
|
# ret_val=1
|
|
|
|
# break
|
|
|
|
# fi
|
|
|
|
#done
|
2023-06-08 06:06:08 +00:00
|
|
|
|
2023-07-12 12:51:12 +00:00
|
|
|
#if [ "$ret_val" -ne 0 ]; then
|
|
|
|
# false
|
|
|
|
#fi
|
2023-06-08 06:06:08 +00:00
|
|
|
|
|
|
|
# Clean up dnf cache
|
|
|
|
dnf clean all
|
|
|
|
|
|
|
|
%end
|