diff --git a/.gitignore b/.gitignore index ea9df61..233c77d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ /mkosi-17.1.tar.gz /mkosi-18.tar.gz /mkosi-19.tar.gz +/mkosi-20.tar.gz +/mkosi-20.1.tar.gz +/mkosi-21.tar.gz diff --git a/mkosi.spec b/mkosi.spec index 6aae18d..c44b8af 100644 --- a/mkosi.spec +++ b/mkosi.spec @@ -1,5 +1,5 @@ Name: mkosi -Version: 19 +Version: 21 Release: 1.1%{?dist} Summary: Create bespoke OS images @@ -88,11 +88,29 @@ Recommends: zstd Recommends: xz %description -A fancy wrapper around "dnf --installroot", "apt-get", "pacman", "zypper", and -"emerge" to generate disk images with a number of bells and whistles. +A fancy wrapper around "dnf --installroot", "apt", "pacman", and "zypper" that +generates disk images with a number of bells and whistles. -Generated images are tailored to the purpose. This means GPT disk labels are -used and only systemd-based images may be generated. +Generated images are tailored to the purpose: GPT partitions, +systemd-boot or grub2, images for containers, VMs, initrd, and extensions. + +Mkosi can boot an image via QEMU or systemd-nspawn, or simply start a shell in +chroot, burn the image to a device, connect to a running VM via ssh, extract +logs and coredumps, and also serve an image over HTTP. + +See https://mkosi.systemd.io/ for documentation. + +%package initrd +Summary: Build initrds locally using mkosi +Requires: %{name} = %{version}-%{release} +Requires: (dnf5 or dnf) + +%description initrd +This package provides the plugin for kernel-install to build initrds with +mkosi locally. + +After the package is installed, the plugin can be enabled by writing +'initrd_generator=mkosi-initrd' to '/etc/kernel/install.conf'. %prep %autosetup -p1 @@ -113,12 +131,23 @@ mkdir -p %{buildroot}%{_mandir}/man1 ln -s -t %{buildroot}%{_mandir}/man1/ \ ../../../..%{python3_sitelib}/mkosi/resources/mkosi.1 +# Install the kernel-install plugin +install -Dt %{buildroot}%{_prefix}/lib/kernel/install.d/ \ + kernel-install/50-mkosi.install +mkdir -p %{buildroot}%{_prefix}/lib/mkosi-initrd +mkdir -p %{buildroot}%{_sysconfdir}/mkosi-initrd + %files -f %pyproject_files %license LICENSE %doc README.md %_bindir/mkosi %_mandir/man1/mkosi.1* +%files initrd +%_prefix/lib/kernel/install.d/50-mkosi.install +%ghost %dir %{_prefix}/lib/mkosi-initrd +%ghost %dir %{_sysconfdir}/mkosi-initrd + %check %if %{with tests} %pytest tests/ -v diff --git a/sources b/sources index 4923144..f7968d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mkosi-19.tar.gz) = 8eb4e4af823299fdd6e9a077ec27be029656974ba0414b08ef226b5ccf7cd0a92d8bef4e475cdf05b86c3a0027c43be0f895af56a87df22502d2904cb0246ef4 +SHA512 (mkosi-21.tar.gz) = b08a15961aefa792cc54c67943761cb49c291aed80fcc7ecaa09e434f5df22793f9eae0850d373d899d052c800e4eb3461a74169f40662bbee0ae20e2d89bc0c