From 88dd5022a79f6bf910e2e599c89a79d385eb7127 Mon Sep 17 00:00:00 2001 From: Bala Raman Date: Wed, 8 Sep 2021 23:45:45 -0400 Subject: [PATCH] Fix script align to docker-images build.sh Signed-off-by: Bala Raman --- Dockerfile | 10 ++++++---- scripts/ks2rootfs | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ec24d1..98bce88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # ---------------------------------------------------------------------------- FROM almalinux:8 as builder -RUN mkdir -p /mnt/system-root /mnt/system-root/build; \ +RUN mkdir -p /mnt/system-root /mnt/system-root/build /mnt/system-root/run/lock; \ dnf install --installroot /mnt/system-root --releasever 8 --setopt=install_weak_deps=False --setopt=tsflags=nodocs -y coreutils-single \ bash \ glibc-minimal-langpack \ @@ -14,6 +14,7 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build; \ jq \ tar \ policycoreutils \ + pykickstart \ # Optional include to avoid runtime warning -- starts libblockdev-mdraid \ libblockdev-crypto \ @@ -24,7 +25,8 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build; \ libblockdev-nvdimm \ libblockdev-mpath \ # Optional include to avoid runtime warning -- ends - rootfiles; \ + rootfiles \ + util-linux-ng; \ rm -rf /mnt/system-root/var/cache/* ; \ dnf clean all; \ cp /etc/yum.repos.d/* /mnt/system-root/etc/yum.repos.d/ ; \ @@ -36,8 +38,8 @@ RUN mkdir -p /mnt/system-root /mnt/system-root/build; \ echo 'container' > /mnt/system-root/etc/dnf/vars/infra; \ # install only en_US.UTF-8 locale files, see # https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging for details - echo '%_install_langs en_US.UTF-8' > /mnt/system-root/etc/rpm/macros.image-language-conf ;\ - touch /mnt/system-root/etc/machine-id + echo '%_install_langs en_US.UTF-8' > /mnt/system-root/etc/rpm/macros.image-language-conf; \ + touch /mnt/system-root/etc/machine-id; COPY scripts/ /mnt/system-root/usr/bin diff --git a/scripts/ks2rootfs b/scripts/ks2rootfs index f5b30bd..670f10e 100755 --- a/scripts/ks2rootfs +++ b/scripts/ks2rootfs @@ -136,9 +136,9 @@ if [ ${BUILD_FLAG_WRITE_META} == 'true' ]; then echo "$distro_release" > ${BUILD_OUTDIR}/distro-release fi # save list of packages installed - jq .[] -r /tmp/dnf.cache/tempfiles.json | awk -F '/' '{print $5}' | sort > ${BUILD_OUTDIR}/pkgs-list-rpm - cat ${BUILD_OUTDIR}/pkgs-list-rpm | sed 's/-[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list-only - cat ${BUILD_OUTDIR}/pkgs-list-rpm | sed 's/.el[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list + jq .[] -r /tmp/dnf.cache/tempfiles.json | awk -F '/' '{print $5}' | sort > ${BUILD_OUTDIR}/rpm-packags + # cat ${BUILD_OUTDIR}/rpm-packags | sed 's/-[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list-only + # cat ${BUILD_OUTDIR}/rpm-packags | sed 's/.el[0-9].*//g' > ${BUILD_OUTDIR}/pkgs-list echo 'Writting meta data completed.' else echo 'Skip writing meta data based on configuration.'