Skip to content

Commit

Permalink
kata-cc: Fix make clean call in UVM build (#9837)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ms-mahuber authored Jul 16, 2024
1 parent a900416 commit a455a7e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Signatures": {
"mariner-coco-build-uvm.sh": "4f2be6965d8c4d7919fd201a68160fc8ab02a1be50a336abbfea13f16a6ffb89",
"mariner-coco-build-uvm.sh": "de191105ab8f6a0ad564c507306f2b543817199846cc17c4cb1ebdcfe28ebeb2",
"kata-containers-cc-3.2.0.azl2.tar.gz": "49265e0ecd21af4ed8f23398d1e46ef9961786cb44f40fe582abff06c1c1a873",
"kata-containers-cc-3.2.0.azl2-cargo.tar.gz": "ddf919a672200f0fb53d1cb6c66d6b1c401cf26368541c750d9a12e62da605a1"
}
Expand Down
3 changes: 3 additions & 0 deletions SPECS/kata-containers-cc/kata-containers-cc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ install -D -m 0755 %{_builddir}/%{name}-%{version}/tools/osbuilder/image-builder
%exclude %{osbuilder}/tools/osbuilder/rootfs-builder/ubuntu

%changelog
* Mon Jul 15 2024 Manuel Huber <[email protected]> - 3.2.0.azl2-4
- Call make clean with OS distro variable

* Fri Jul 12 2024 Manuel Huber <[email protected]> - 3.2.0.azl2-3
- Adapt make install target parameters to cope with upstream
fork Makefile changes
Expand Down
2 changes: 1 addition & 1 deletion SPECS/kata-containers-cc/mariner-coco-build-uvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export AGENT_SOURCE_BIN=${SCRIPT_DIR}/kata-agent

# build rootfs
pushd ${OSBUILDER_DIR}
sudo make clean
sudo make DISTRO=cbl-mariner clean
rm -rf ${ROOTFS_DIR}
sudo -E PATH=$PATH AGENT_POLICY=yes CONF_GUEST=yes AGENT_POLICY_FILE=allow-set-policy.rego make -B DISTRO=cbl-mariner rootfs
popd
Expand Down
2 changes: 1 addition & 1 deletion SPECS/kata-containers/kata-containers.signatures.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Signatures": {
"50-kata": "fb108c6337b3d3bf80b43ab04f2bf9a3bdecd29075ebd16320aefe8f81c502a7",
"mariner-build-uvm.sh": "a0fbee4def82ee492eab64a8b5a948c2fef125fa1ca5686aafa0a80c64144068",
"mariner-build-uvm.sh": "da67e7bfa7a150d0dd54236bde9494fb37feec1c9b8d5a1f20dbbe3f605c0862",
"kata-containers-3.2.0.azl2-cargo.tar.gz": "830c90cc6e44f492e6366012f8834ae6fc84bd790edf678c23003368c288b98c",
"kata-containers-3.2.0.azl2.tar.gz": "ab65f23787347fae11cf07e0a380e925e9f7b6f0f862ef6440a683b816206011"
}
Expand Down
5 changes: 4 additions & 1 deletion SPECS/kata-containers/kata-containers.spec
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
Summary: Kata Containers
Name: kata-containers
Version: 3.2.0.azl2
Release: 2%{?dist}
Release: 3%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
URL: https://github.com/microsoft/kata-containers
Expand Down Expand Up @@ -215,6 +215,9 @@ ln -sf %{_bindir}/kata-runtime %{buildroot}%{_prefix}/local/bin/kata-runtime
%exclude %{kataosbuilderdir}/rootfs-builder/ubuntu

%changelog
* Mon Jul 15 2024 Manuel Huber <[email protected]> - 3.2.0.azl2-3
- Call make clean with OS distro variable

* Thu Jun 06 2024 CBL-Mariner Servicing Account <[email protected]> - 3.2.0.azl2-2
- Bump release to rebuild with go 1.21.11

Expand Down
4 changes: 1 addition & 3 deletions SPECS/kata-containers/mariner-build-uvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ readonly INITRD_DIR="/var/cache/kata-containers/osbuilder-images/kernel-uvm"

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

rm -rf ${ROOTFS_DIR}

# build rootfs
pushd ${OSBUILDER_DIR}
sudo make clean
sudo make DISTRO=cbl-mariner clean
rm -rf ${ROOTFS_DIR}
sudo -E PATH=$PATH make -B DISTRO=cbl-mariner rootfs
popd
Expand Down

0 comments on commit a455a7e

Please sign in to comment.