SHA256
1
0
forked from pool/mkosi
mkosi/mkosi.spec

89 lines
2.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package mkosi
#
Accepting request 1140555 from home:dirkmueller:Factory - update to 20.1: * `BuildSources=` are now mounted when we install packages so local packages can be made available in the sandbox. * Fixed check to see if we're running as root which makes sure we don't do shared mounts when running as root. * The extension release file is now actually written when building system or configuration extensions. * The nspawn settings are copied to the output directory again. * Incremental caching is now skipped when `Overlay=` is enabled as this combination isn't supported. * The SELinux relabel check is more granular and now checks for all required files instead of just whether there's a policy configured. * `qemu-system-xxx` binaries are now preferred over the generic `qemu` and `qemu-kvm` binaries. * Grub tools from the tools tree are now used to install grub instead of grub tools from the image itself. The grub tools were added to the default tools trees as well. * The pacman keyring in tools trees is now only populated from the Arch Linux keyring (and not the Debian/Ubuntu ones anymore). * `gpg` is allowed to access `/run/pscsd/pscsd.comm` on the host if it exists to allow interaction with smartcards. * The current working directory is not mounted unconditionally to `/work/src` anymore. Instead, the default value for `BuildSources=` now mounts the current working directory to `/work/src`. This means that the current working directory is no longer implicitly included when `BuildSources=` is explicitly configured. * Assigning the empty string to a setting that takes a list of values now overrides any configured default value as well. OBS-URL: https://build.opensuse.org/request/show/1140555 OBS-URL: https://build.opensuse.org/package/show/Virtualization/mkosi?expand=0&rev=21
2024-01-22 10:21:14 +00:00
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pythons python3
Name: mkosi
Accepting request 1158165 from home:flonnegren:branches:Virtualization - Update to 22: * We'll now try to delete btrfs subvolumes with btrfs subvolume delete first before falling back to recursively deleting the directory. * The invoking user is now always mapped to root when running sync scripts. This fixes an issue where we would fail when a package manager tree or skeleton tree contained a /usr directory as we would not have permissions to run mount in the sandbox. * We now use qemu's official firmware descriptions to find EDK2/OVMF UEFI firmware. Addititionally, QemuFirmware=uefi now boots without SecureBoot support, and QemuFirmware=uefi-secure-boot was introduced to boot with SecureBoot support. By default we will still boot with SecureBoot support if QemuFirmware=auto. * Added support for QemuFirmwareVariables=custom and QemuFirmwareVariables=microsoft to use OVMF/EDK2 variables with either the user's custom keys enrolled or with the Microsoft keys enrolled. * Added UnifiedKernelImages= to control whether we generate unified kernel images or not. * Bootloader=grub will now generate a grub EFI image and install it. If SecureBoot= is enabled and ShimBootloader= is not set to signed, the grub EFI image will be signed for SecureBoot. * ShimBootloader=signed will now also instruct mkosi to look for and install already signed grub, systemd-boot, kernel and UKI binaries. * We now build grub images with a fixed set of modules and don't copy any grub modules to the ESP anymore. * The configuration is now made available as a JSON file to all mkosi scripts via the $MKOSI_CONFIG environment variable. * $PROFILE is now set for all mkosi scripts containing the value of Profile= if it is set. OBS-URL: https://build.opensuse.org/request/show/1158165 OBS-URL: https://build.opensuse.org/package/show/Virtualization/mkosi?expand=0&rev=26
2024-03-15 08:58:32 +00:00
Version: 22
Release: 0
Summary: Build Legacy-Free OS Images
License: LGPL-2.1-or-later
Group: System/Management
URL: https://github.com/systemd/mkosi
Source: https://github.com/systemd/mkosi/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/systemd/mkosi/pull/2606
Patch0: opensuse-dont-install-distribution-release-by-default.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: pandoc
BuildRequires: python-rpm-macros
Requires: bubblewrap
Requires: python3 >= 3.9
Requires: zypper
Recommends: btrfsprogs
Recommends: dnf >= 4.8.0
Recommends: dosfstools
Recommends: dpkg
Recommends: edk2-ovmf
Recommends: gnupg
Recommends: squashfs
Recommends: tar
Recommends: xz
Recommends: zstd
BuildArch: noarch
ExclusiveArch: x86_64 aarch64
%description
A fancy wrapper around dnf --installroot, debootstrap, pacstrap and zypper that
may generate disk images with a number of bells and whistles.
Generated images are "legacy-free". This means only GPT disk labels
(and no MBR disk labels) are supported, and only systemd based images
may be generated. Moreover, for bootable images only EFI systems are
supported (not plain MBR/BIOS).
%prep
%autosetup -p1
%build
tools/make-man-page.sh
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}/%{$python_sitelib}/mkosi
mkdir -p %{buildroot}%{_mandir}/man1
cp %{buildroot}%{python3_sitelib}/mkosi/resources/mkosi.1* %{buildroot}%{_mandir}/man1/
%check
%pytest
%files
%doc mkosi.md README.md
%license LICENSE
%{_bindir}/mkosi
%{_mandir}/man1/mkosi.1*
%{python3_sitelib}/mkosi
%{python3_sitelib}/mkosi-%{version}.dist-info
%changelog