|
| 1 | +%global debug_package %{nil} |
| 2 | +# The upstream GitHub tag uses dot (e.g. 3.27.0.preview1) while RPM uses |
| 3 | +# tilde notation for pre-release sorting. |
| 4 | +%global upstream_ver 3.27.0.preview1 |
| 5 | + |
| 6 | +Name: kata-containers-preview |
| 7 | +Version: 3.27.0~preview1 |
| 8 | +Release: 1%{?dist} |
| 9 | + |
| 10 | +Summary: Kata Containers preview package developed for Pod Sandboxing on AKS |
| 11 | +License: ASL 2.0 |
| 12 | +URL: https://github.com/microsoft/kata-containers |
| 13 | +Vendor: Microsoft Corporation |
| 14 | +Distribution: Azure Linux |
| 15 | +Source0: https://github.com/microsoft/kata-containers/archive/refs/tags/%{upstream_ver}.tar.gz#/kata-containers-%{upstream_ver}.tar.gz |
| 16 | +Source1: kata-containers-%{upstream_ver}-cargo.tar.gz |
| 17 | +BuildRequires: azurelinux-release |
| 18 | +BuildRequires: golang |
| 19 | +BuildRequires: protobuf-compiler |
| 20 | +BuildRequires: rust >= 1.85.0 |
| 21 | +BuildRequires: libseccomp-devel |
| 22 | +BuildRequires: openssl-devel |
| 23 | +BuildRequires: clang |
| 24 | +BuildRequires: device-mapper-devel |
| 25 | +BuildRequires: cmake |
| 26 | + |
| 27 | +Requires: kernel-uvm |
| 28 | +# Must match the version specified by the `assets.virtiofsd.version` field in the source's versions.yaml. |
| 29 | +Requires: virtiofsd = 1.8.0 |
| 30 | +Requires: containerd2 |
| 31 | + |
| 32 | +Conflicts: kata-containers |
| 33 | + |
| 34 | +%description |
| 35 | +The Kata Containers preview package ships pre-release Kata components for Pod Sandboxing on AKS. |
| 36 | +The package sources are based on the msft-preview branch of the Microsoft fork of the kata-containers |
| 37 | +project and tailored to the use for Azure Linux-based AKS node images. |
| 38 | + |
| 39 | +%package tools |
| 40 | +Summary: Kata Containers preview tools package for building the UVM |
| 41 | + |
| 42 | +%description tools |
| 43 | +This package contains the scripts and files required to build the UVM |
| 44 | + |
| 45 | +%prep |
| 46 | +%autosetup -p1 -n kata-containers-%{upstream_ver} -a 1 |
| 47 | + |
| 48 | +%build |
| 49 | +pushd %{_builddir}/kata-containers-%{upstream_ver}/tools/osbuilder/node-builder/azure-linux |
| 50 | +%make_build package |
| 51 | +popd |
| 52 | + |
| 53 | +%define kata_path /opt/kata-containers |
| 54 | +%define kata_bin %{_prefix}/local/bin |
| 55 | +%define kata_shim_bin %{_prefix}/local/bin |
| 56 | +%define defaults_kata %{_prefix}/share/defaults/kata-containers |
| 57 | +%define tools_pkg %{kata_path}/uvm |
| 58 | + |
| 59 | +%install |
| 60 | +pushd %{_builddir}/kata-containers-%{upstream_ver}/tools/osbuilder/node-builder/azure-linux |
| 61 | +START_SERVICES=no PREFIX=%{buildroot} %make_build deploy-package |
| 62 | +PREFIX=%{buildroot} %make_build deploy-package-tools |
| 63 | +popd |
| 64 | + |
| 65 | +%files |
| 66 | +%{kata_bin}/kata-collect-data.sh |
| 67 | +%{kata_bin}/kata-monitor |
| 68 | +%{kata_bin}/kata-runtime |
| 69 | + |
| 70 | +%{defaults_kata}/configuration.toml |
| 71 | +%{defaults_kata}/configuration-clh-debug.toml |
| 72 | + |
| 73 | +%{kata_shim_bin}/containerd-shim-kata-v2 |
| 74 | + |
| 75 | +%license LICENSE |
| 76 | +%doc CONTRIBUTING.md |
| 77 | +%doc README.md |
| 78 | + |
| 79 | +%files tools |
| 80 | +%dir %{kata_path} |
| 81 | +%dir %{tools_pkg} |
| 82 | +%dir %{tools_pkg}/tools |
| 83 | +%dir %{tools_pkg}/tools/osbuilder |
| 84 | +%{tools_pkg}/tools/osbuilder/Makefile |
| 85 | + |
| 86 | +%dir %{tools_pkg}/tools/osbuilder/scripts |
| 87 | +%{tools_pkg}/tools/osbuilder/scripts/lib.sh |
| 88 | + |
| 89 | +%dir %{tools_pkg}/tools/osbuilder/rootfs-builder |
| 90 | +%{tools_pkg}/tools/osbuilder/rootfs-builder/rootfs.sh |
| 91 | +%dir %{tools_pkg}/tools/osbuilder/rootfs-builder/cbl-mariner |
| 92 | +%{tools_pkg}/tools/osbuilder/rootfs-builder/cbl-mariner/config.sh |
| 93 | +%{tools_pkg}/tools/osbuilder/rootfs-builder/cbl-mariner/rootfs_lib.sh |
| 94 | + |
| 95 | +%dir %{tools_pkg}/tools/osbuilder/image-builder |
| 96 | +%{tools_pkg}/tools/osbuilder/image-builder/image_builder.sh |
| 97 | +%{tools_pkg}/tools/osbuilder/image-builder/nsdax.gpl.c |
| 98 | + |
| 99 | +%dir %{tools_pkg}/tools/osbuilder/node-builder |
| 100 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux |
| 101 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/Makefile |
| 102 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/clean.sh |
| 103 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/common.sh |
| 104 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/uvm_build.sh |
| 105 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/uvm_install.sh |
| 106 | + |
| 107 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install |
| 108 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr |
| 109 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/bin |
| 110 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/bin/kata-agent |
| 111 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/lib |
| 112 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/lib/systemd |
| 113 | +%dir %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/lib/systemd/system |
| 114 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/lib/systemd/system/kata-containers.target |
| 115 | +%{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/lib/systemd/system/kata-agent.service |
| 116 | + |
| 117 | +%changelog |
| 118 | +* Mon Mar 30 2026 Saul Paredes <saulparedes@microsoft.com> - 3.27.0.preview1-1 |
| 119 | +- Initial Azure Linux import from Fedora 45 (license: MIT). |
| 120 | +- License verified |
0 commit comments