fedora-kickstarts/fedora-docker-common.ks
Adam Williamson 27d1b07813 Don't exclude libusbx from container images, libdnf needs it
This exclusion has never actually worked. Look at a successful
F27 container-minimal build:

https://koji.fedoraproject.org/koji/taskinfo?taskID=25064051

If you check one of the tasks and look at the oz log, it shows
that libusbx is actually installed.

This is because both dnf and microdnf require libdnf, which
requires librepo, which requires gpgme, which requires gnupg2,
which requires libusb.

In Fedora 27, anaconda/dnf handle this by ignoring the attempt
to exclude libusbx and just installing it anyway.

In Rawhide, however, anaconda/dnf behaviour is different. I
don't know when it changed, but now anaconda/dnf honor the
kickstart and exclude libusbx from the install transaction...
which means the image build just fails, because the deps for
dnf/microdnf cannot be satisfied. So we should just ditch the
exclusion, it's bogus. See a failed Rawhide build attempt:

https://koji.fedoraproject.org/koji/taskinfo?taskID=25077542

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-02-15 17:56:44 -08:00

75 lines
2.1 KiB
Plaintext

# This is the common bits between Fedora Docker base image.
#
# To keep this image minimal it only installs English language. You need to change
# dnf configuration in order to enable other languages.
#
# ## Hacking on this image ###
# This kickstart is processed using Anaconda-in-ImageFactory (via Koji typically),
# but you can run imagefactory locally too.
#
# To do so, testing local changes, first you'll need a TDL file. I store one here:
# https://pagure.io/fedora-atomic/raw/master/f/fedora-atomic-rawhide.tdl
#
# Then, once you have imagefactory and imagefactory-plugins installed, run:
#
# ksflatten -c fedora-docker-base[-minimal].ks -o fedora-docker-base-test.ks
# imagefactory --debug target_image --template /path/to/fedora-atomic-rawhide.tdl --parameter offline_icicle true --file-parameter install_script $(pwd)/fedora-docker-base-test.ks docker
#
text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931
bootloader --disabled
timezone --isUtc --nontp Etc/UTC
rootpw --lock --iscrypted locked
keyboard us
network --bootproto=dhcp --device=link --activate --onboot=on
reboot
# boot partitions are irrelevant as the final docker image is a tarball
zerombr
clearpart --all
autopart --noboot --nohome --noswap --nolvm
%packages --excludedocs --instLangs=en --nocore
fedora-release
bash
coreutils-single
glibc-minimal-langpack
libcrypt
rpm
shadow-utils
sssd-client
util-linux
-kernel
-dosfstools
-e2fsprogs
-fuse-libs
-gnupg2-smime
-libss # used by e2fsprogs
-pinentry
-shared-mime-info
-trousers
-xkeyboard-config
%end
%post --erroronfail --log=/root/anaconda-post.log
set -eux
# Set install langs macro so that new rpms that get installed will
# only install langs that we limit it to.
LANG="en_US"
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
# https://bugzilla.redhat.com/show_bug.cgi?id=1400682
echo "Import RPM GPG key"
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
echo "# fstab intentionally empty for containers" > /etc/fstab
# Remove machine-id on pre generated images
rm -f /etc/machine-id
touch /etc/machine-id
%end