Skip to content

Commit a455a7e

Browse files
authored
kata-cc: Fix make clean call in UVM build (#9837)
During UVM build, the default OS' clean target is executed - which is Ubuntu. Change make clean call to clean up the artifacts for the cbl-mariner distro: rm -rf /opt/kata-containers/uvm/tools/osbuilder/.ubuntu_rootfs.done /opt/kata-containers/uvm/tools/osbuilder/ubuntu_rootfs
1 parent a900416 commit a455a7e

6 files changed

Lines changed: 11 additions & 7 deletions

File tree

SPECS/kata-containers-cc/kata-containers-cc.signatures.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
3-
"mariner-coco-build-uvm.sh": "4f2be6965d8c4d7919fd201a68160fc8ab02a1be50a336abbfea13f16a6ffb89",
3+
"mariner-coco-build-uvm.sh": "de191105ab8f6a0ad564c507306f2b543817199846cc17c4cb1ebdcfe28ebeb2",
44
"kata-containers-cc-3.2.0.azl2.tar.gz": "49265e0ecd21af4ed8f23398d1e46ef9961786cb44f40fe582abff06c1c1a873",
55
"kata-containers-cc-3.2.0.azl2-cargo.tar.gz": "ddf919a672200f0fb53d1cb6c66d6b1c401cf26368541c750d9a12e62da605a1"
66
}

SPECS/kata-containers-cc/kata-containers-cc.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ install -D -m 0755 %{_builddir}/%{name}-%{version}/tools/osbuilder/image-builder
288288
%exclude %{osbuilder}/tools/osbuilder/rootfs-builder/ubuntu
289289

290290
%changelog
291+
* Mon Jul 15 2024 Manuel Huber <mahuber@microsoft.com> - 3.2.0.azl2-4
292+
- Call make clean with OS distro variable
293+
291294
* Fri Jul 12 2024 Manuel Huber <mahuber@microsoft.com> - 3.2.0.azl2-3
292295
- Adapt make install target parameters to cope with upstream
293296
fork Makefile changes

SPECS/kata-containers-cc/mariner-coco-build-uvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export AGENT_SOURCE_BIN=${SCRIPT_DIR}/kata-agent
1313

1414
# build rootfs
1515
pushd ${OSBUILDER_DIR}
16-
sudo make clean
16+
sudo make DISTRO=cbl-mariner clean
1717
rm -rf ${ROOTFS_DIR}
1818
sudo -E PATH=$PATH AGENT_POLICY=yes CONF_GUEST=yes AGENT_POLICY_FILE=allow-set-policy.rego make -B DISTRO=cbl-mariner rootfs
1919
popd

SPECS/kata-containers/kata-containers.signatures.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Signatures": {
33
"50-kata": "fb108c6337b3d3bf80b43ab04f2bf9a3bdecd29075ebd16320aefe8f81c502a7",
4-
"mariner-build-uvm.sh": "a0fbee4def82ee492eab64a8b5a948c2fef125fa1ca5686aafa0a80c64144068",
4+
"mariner-build-uvm.sh": "da67e7bfa7a150d0dd54236bde9494fb37feec1c9b8d5a1f20dbbe3f605c0862",
55
"kata-containers-3.2.0.azl2-cargo.tar.gz": "830c90cc6e44f492e6366012f8834ae6fc84bd790edf678c23003368c288b98c",
66
"kata-containers-3.2.0.azl2.tar.gz": "ab65f23787347fae11cf07e0a380e925e9f7b6f0f862ef6440a683b816206011"
77
}

SPECS/kata-containers/kata-containers.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
Summary: Kata Containers
4040
Name: kata-containers
4141
Version: 3.2.0.azl2
42-
Release: 2%{?dist}
42+
Release: 3%{?dist}
4343
License: ASL 2.0
4444
Vendor: Microsoft Corporation
4545
URL: https://github.com/microsoft/kata-containers
@@ -215,6 +215,9 @@ ln -sf %{_bindir}/kata-runtime %{buildroot}%{_prefix}/local/bin/kata-runtime
215215
%exclude %{kataosbuilderdir}/rootfs-builder/ubuntu
216216

217217
%changelog
218+
* Mon Jul 15 2024 Manuel Huber <mahuber@microsoft.com> - 3.2.0.azl2-3
219+
- Call make clean with OS distro variable
220+
218221
* Thu Jun 06 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 3.2.0.azl2-2
219222
- Bump release to rebuild with go 1.21.11
220223

SPECS/kata-containers/mariner-build-uvm.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ readonly INITRD_DIR="/var/cache/kata-containers/osbuilder-images/kernel-uvm"
77

88
export AGENT_SOURCE_BIN=${SCRIPT_DIR}/agent/usr/bin/kata-agent
99

10-
rm -rf ${ROOTFS_DIR}
11-
1210
# build rootfs
1311
pushd ${OSBUILDER_DIR}
14-
sudo make clean
12+
sudo make DISTRO=cbl-mariner clean
1513
rm -rf ${ROOTFS_DIR}
1614
sudo -E PATH=$PATH make -B DISTRO=cbl-mariner rootfs
1715
popd

0 commit comments

Comments
 (0)