From fe66c01c760fc2f801b42bd5ac30faff51c60e96 Mon Sep 17 00:00:00 2001 From: lumarel Date: Sun, 2 Apr 2023 12:04:32 +0200 Subject: [PATCH 1/3] Use Etc/UTC as upstream does --- container/rocky-container.ks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/rocky-container.ks b/container/rocky-container.ks index e9e9a42..ebafddc 100644 --- a/container/rocky-container.ks +++ b/container/rocky-container.ks @@ -10,7 +10,7 @@ shutdown keyboard us lang en_US.UTF-8 -timezone --utc --nontp UTC +timezone --utc --nontp Etc/UTC # Disk setup zerombr From 1e7a211eb7acf529dd57a5514000d5aa102a143f Mon Sep 17 00:00:00 2001 From: lumarel Date: Sun, 2 Apr 2023 12:05:33 +0200 Subject: [PATCH 2/3] Get closer to upstream with the ubi image --- container/rocky-container-ubi.ks | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/container/rocky-container-ubi.ks b/container/rocky-container-ubi.ks index 511c902..2858704 100644 --- a/container/rocky-container-ubi.ks +++ b/container/rocky-container-ubi.ks @@ -2,14 +2,14 @@ %packages --excludedocs --inst-langs=en --nocore --exclude-weakdeps bash -binutils -brotli coreutils-single crypto-policies-scripts -dmidecode +curl-minimal findutils +gdb-gdbserver glibc-minimal-langpack -libcurl +gzip +libcurl-minimal systemd rocky-release rootfiles @@ -40,6 +40,7 @@ yum %end %post --erroronfail --log=/root/anaconda-post.log +set -eux # container customizations inside the chroot # Stay compatible @@ -69,10 +70,15 @@ systemctl mask \ systemd-logind.service \ systemd-remount-fs.service +# Remove network configuration files leftover from anaconda installation +# https://bugzilla.redhat.com/show_bug.cgi?id=1713089 +rm -f /etc/sysconfig/network-scripts/ifcfg-* + # Cleanup the image rm -f /etc/udev/hwdb.bin rm -rf /usr/lib/udev/hwdb.d/ \ /boot /var/lib/dnf/history.* \ + /var/cache/* /var/log/* \ "/tmp/*" "/tmp/.*" || true From e41d68f01b6dfb3e3b4a6d1c3b71c2b8c6012107 Mon Sep 17 00:00:00 2001 From: lumarel Date: Sun, 2 Apr 2023 15:47:42 +0200 Subject: [PATCH 3/3] Merge into the combined ks file --- Rocky-9-Container-UBI.ks | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Rocky-9-Container-UBI.ks b/Rocky-9-Container-UBI.ks index 7a79c7e..acf54ed 100644 --- a/Rocky-9-Container-UBI.ks +++ b/Rocky-9-Container-UBI.ks @@ -15,7 +15,7 @@ shutdown keyboard us lang en_US.UTF-8 -timezone --utc --nontp UTC +timezone --utc --nontp Etc/UTC # Disk setup zerombr @@ -27,23 +27,22 @@ autopart --noboot --nohome --noswap --nolvm --fstype=ext4 %end # Package setup -# NOTE(nhanlon) - 2022-11-23 adding --ignoremissing as dmidecode does not exist on all arches %packages --ignoremissing --excludedocs --inst-langs=en --nocore --exclude-weakdeps bash -binutils -brotli coreutils-single crypto-policies-scripts -dmidecode +curl-minimal findutils +gdb-gdbserver glibc-minimal-langpack -libcurl +gzip +libcurl-minimal systemd rocky-release rootfiles tar -vim-minimal util-linux +vim-minimal which yum @@ -68,6 +67,7 @@ yum %end %post --erroronfail --log=/root/anaconda-post.log +set -eux # container customizations inside the chroot # Stay compatible @@ -97,10 +97,15 @@ systemctl mask \ systemd-logind.service \ systemd-remount-fs.service +# Remove network configuration files leftover from anaconda installation +# https://bugzilla.redhat.com/show_bug.cgi?id=1713089 +rm -f /etc/sysconfig/network-scripts/ifcfg-* + # Cleanup the image rm -f /etc/udev/hwdb.bin rm -rf /usr/lib/udev/hwdb.d/ \ /boot /var/lib/dnf/history.* \ + /var/cache/* /var/log/* \ "/tmp/*" "/tmp/.*" || true