Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
Fix cleanup of /var/lib/rpm/ dir in micro images (AlmaLinux#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlukoshko authored Jul 23, 2024
1 parent cd7e5a9 commit db6d9be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Containerfiles/8/Containerfile.micro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN mkdir -p /mnt/sys-root; \
--releasever 8 --setopt install_weak_deps=false --nodocs -y; \
dnf --installroot /mnt/sys-root clean all;
# Additional hacks for kickstart file and backward compatable support
RUN rm -rf /mnt/sys-root/var/cache/dnf /mnt/sys-root/var/log/dnf* /mnt/sys-root/var/lib/dnf /mnt/sys-root/var/log/yum.*; \
RUN rm -rf /mnt/sys-root/var/cache/dnf /mnt/sys-root/var/log/dnf* /mnt/sys-root/var/lib/dnf /mnt/sys-root/var/log/yum.* /mnt/sys-root/var/lib/rpm/* ; \
/bin/date +%Y%m%d_%H%M > /mnt/sys-root/etc/BUILDTIME ; \
echo '%_install_langs C.utf8' > /mnt/sys-root/etc/rpm/macros.image-language-conf; \
echo 'LANG="C.utf8"' > /mnt/sys-root/etc/locale.conf; \
Expand All @@ -17,7 +17,7 @@ RUN rm -rf /mnt/sys-root/var/cache/dnf /mnt/sys-root/var/log/dnf* /mnt/sys-root/
touch /mnt/sys-root/etc/resolv.conf; \
touch /mnt/sys-root/etc/hostname; \
chmod 600 /mnt/sys-root/etc/.pwd.lock; \
rm -rf /mnt/sys-root/usr/share/locale/en* /mnt/sys-root/boot /mnt/sys-root/dev/null /mnt/sys-root/var/log/hawkey.log /var/lib/rpm/* ; \
rm -rf /mnt/sys-root/usr/share/locale/en* /mnt/sys-root/boot /mnt/sys-root/dev/null /mnt/sys-root/var/log/hawkey.log; \
echo '0.0 0 0.0' > /mnt/sys-root/etc/adjtime; \
echo '0' >> /mnt/sys-root/etc/adjtime; \
echo 'UTC' >> /mnt/sys-root/etc/adjtime; \
Expand Down
4 changes: 2 additions & 2 deletions Containerfiles/9/Containerfile.micro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN mkdir -p /mnt/sys-root; \
--releasever 9 --setopt install_weak_deps=false --nodocs -y; \
dnf --installroot /mnt/sys-root clean all;
# Additional hacks for kickstart file and backward compatable support
RUN rm -rf /mnt/sys-root/var/cache/dnf /mnt/sys-root/var/log/dnf* /mnt/sys-root/var/lib/dnf /mnt/sys-root/var/log/yum.*; \
RUN rm -rf /mnt/sys-root/var/cache/dnf /mnt/sys-root/var/log/dnf* /mnt/sys-root/var/lib/dnf /mnt/sys-root/var/log/yum.* /mnt/sys-root/var/lib/rpm/* ; \
/bin/date +%Y%m%d_%H%M > /mnt/sys-root/etc/BUILDTIME ; \
echo '%_install_langs C.utf8' > /mnt/sys-root/etc/rpm/macros.image-language-conf; \
echo 'LANG="C.utf8"' > /mnt/sys-root/etc/locale.conf; \
Expand All @@ -17,7 +17,7 @@ RUN rm -rf /mnt/sys-root/var/cache/dnf /mnt/sys-root/var/log/dnf* /mnt/sys-root/
touch /mnt/sys-root/etc/hostname; \
touch /mnt/sys-root/etc/.pwd.lock; \
chmod 600 /mnt/sys-root/etc/.pwd.lock; \
rm -rf /mnt/sys-root/usr/share/locale/en* /mnt/sys-root/boot /mnt/sys-root/dev/null /mnt/sys-root/var/log/hawkey.log /var/lib/rpm/* ; \
rm -rf /mnt/sys-root/usr/share/locale/en* /mnt/sys-root/boot /mnt/sys-root/dev/null /mnt/sys-root/var/log/hawkey.log ; \
echo '0.0 0 0.0' > /mnt/sys-root/etc/adjtime; \
echo '0' >> /mnt/sys-root/etc/adjtime; \
echo 'UTC' >> /mnt/sys-root/etc/adjtime; \
Expand Down

0 comments on commit db6d9be

Please sign in to comment.