Skip to content

Commit 348ba63

Browse files
committed
add more cleanup for rootfs contents
1 parent a544bf6 commit 348ba63

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

tools/osbuilder/image-builder/image_builder.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,10 @@ create_rootfs_image() {
498498

499499
info "Setup systemd"
500500
setup_systemd "${mount_dir}"
501-
501+
echo "FOOBY: mount_dir: ${mount_dir}"
502+
find "${mount_dir}" -type f | xargs touch -d "Sun, 29 Feb 2004 16:21:42 -0800"
503+
find "${mount_dir}" -type d | xargs touch -d "Sun, 29 Feb 2004 16:21:42 -0800"
504+
sudo chroot /
502505
info "Unmounting root partition"
503506
umount "${mount_dir}"
504507
OK "Root partition unmounted"
@@ -531,7 +534,7 @@ create_rootfs_image() {
531534
echo "FOOBY!!!"
532535
set -x
533536
echo "setup_cmd: $setup_cmd"
534-
eval "${setup_cmd} -s \"deadbeef\"" > "${image_dir}"/root_hash.txt 2>&1
537+
eval "${setup_cmd} -v --uuid "bddba635-5269-45dc-8a64-e5abc5b7b1df" -s \"deadbeef\"" > "${image_dir}"/root_hash.txt 2>&1
535538
set +x
536539
fi
537540

tools/osbuilder/rootfs-builder/cbl-mariner/rootfs_lib.sh

+16-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5+
temp_upgrade_cacerts()
6+
{
7+
rpm -Uhv ca-certificates-tools-2.0.0-17.cm2.noarch.rpm --replacepkgs
8+
rm ca-certificates-tools-2.0.0-17.cm2.noarch.rpm
9+
rm /etc/pki/ca-trust/extracted/java/cacerts
10+
update-ca-trust
11+
}
12+
513
build_rootfs()
614
{
715
# Mandatory
@@ -18,10 +26,15 @@ build_rootfs()
1826
PKG_MANAGER="tdnf"
1927

2028
DNF="${PKG_MANAGER} -y --installroot=${ROOTFS_DIR} --noplugins --releasever=${OS_VERSION}"
21-
29+
set -x
2230
info "install packages for rootfs"
23-
$DNF install ${EXTRA_PKGS} ${PACKAGES}
24-
31+
$DNF install ${EXTRA_PKGS} ${PACKAGES} rpm wget
32+
wget https://cameronbairdstorage.blob.core.windows.net/public/ca-certificates-tools-2.0.0-17.cm2.noarch.rpm
33+
cp ca-certificates-tools-2.0.0-17.cm2.noarch.rpm "${ROOTFS_DIR}"
34+
export -f temp_upgrade_cacerts
35+
chroot "${ROOTFS_DIR}" /bin/bash -c "temp_upgrade_cacerts"
36+
echo "chroot done"
37+
set +x
2538
rm -rf ${ROOTFS_DIR}/usr/share/{bash-completion,cracklib,doc,info,locale,man,misc,pixmaps,terminfo,zoneinfo,zsh}
2639
}
2740

0 commit comments

Comments
 (0)