From 22bc79ed6ff0781b113c9ca699474c6b7d32d508 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Jan 24 2017 23:07:07 +0000 Subject: docker-min: move /run/lock to %post nochroot umount doesn't exist in the minimal image --- diff --git a/fedora-docker-base-minimal.ks b/fedora-docker-base-minimal.ks index e6c349b..6d30e38 100644 --- a/fedora-docker-base-minimal.ks +++ b/fedora-docker-base-minimal.ks @@ -52,17 +52,6 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch echo "# fstab intentionally empty for containers" > /etc/fstab -# 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 -umount /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 -install -d /run/lock -m 0755 -o root -g root - # Remove machine-id on pre generated images rm -f /etc/machine-id touch /etc/machine-id @@ -87,6 +76,20 @@ rm -rf var/cache/* var/log/* tmp/* %post --nochroot --erroronfail --log=/mnt/sysimage/root/anaconda-post-nochroot.log set -eux +# 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 + + # 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