|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
Name: mkosi
|
|
Zbigniew Jędrzejewski-Szmek |
08f215 |
Version: 18
|
|
Zbigniew Jędrzejewski-Szmek |
7285cc |
Release: %autorelease
|
|
Zbigniew Jędrzejewski-Szmek |
e83052 |
Summary: Create bespoke OS images
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
License: LGPL-2.1-or-later
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
URL: https://github.com/systemd/mkosi
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
Source: https://github.com/systemd/mkosi/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
BuildArch: noarch
|
|
Zbigniew Jędrzejewski-Szmek |
9faa87 |
BuildRequires: python3-devel
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
BuildRequires: pyproject-rpm-macros
|
|
Zbigniew Jędrzejewski-Szmek |
e83052 |
BuildRequires: python3-pytest
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
BuildRequires: pandoc
|
|
Zbigniew Jędrzejewski-Szmek |
1285a6 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%bcond tests 1
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
# mkosi wants the uncompressed man page to show via 'mkosi documentation'
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%global __brp_compress true
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
|
|
|
31c3fa |
Requires: python3
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
Requires: bubblewrap
|
|
|
31c3fa |
Requires: coreutils
|
|
|
31c3fa |
|
|
|
31c3fa |
# for completion
|
|
|
31c3fa |
Recommends: python3dist(argcomplete)
|
|
|
31c3fa |
|
|
|
31c3fa |
# for various image building tools (systemd-hwdb, systemd-sysusers, ...)
|
|
|
31c3fa |
Recommends: systemd
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
# for systemd-nspawn
|
|
|
31c3fa |
Recommends: systemd-container >= 254
|
|
|
31c3fa |
|
|
|
31c3fa |
# for bootable images (systemd-udev ships bootctl)
|
|
|
31c3fa |
Recommends: systemd-udev >= 254
|
|
|
31c3fa |
Recommends: systemd-ukify >= 254
|
|
|
31c3fa |
|
|
|
31c3fa |
# for disk images
|
|
|
31c3fa |
Recommends: systemd-repart >= 254
|
|
|
31c3fa |
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
# for the --acl option to allow removing directories generated by mkosi
|
|
|
31c3fa |
Recommends: acl
|
|
|
31c3fa |
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
# for when kernels are installed and we need to run depmod
|
|
|
31c3fa |
Recommends: kmod
|
|
|
31c3fa |
|
|
|
31c3fa |
# for signing
|
|
|
31c3fa |
Recommends: openssl
|
|
|
31c3fa |
Recommends: sbsigntools
|
|
|
31c3fa |
Recommends: gnupg
|
|
|
31c3fa |
|
|
|
31c3fa |
# for building specific distributions
|
|
|
31c3fa |
Recommends: (dnf5 or dnf)
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
Recommends: apt
|
|
|
31c3fa |
Recommends: debian-keyring
|
|
|
31c3fa |
Recommends: pacman
|
|
|
31c3fa |
Recommends: archlinux-keyring
|
|
|
31c3fa |
Recommends: zypper
|
|
|
31c3fa |
|
|
|
31c3fa |
# for various filesystems
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
Recommends: btrfs-progs
|
|
|
31c3fa |
Recommends: e2fsprogs
|
|
|
31c3fa |
Recommends: dosfstools
|
|
|
31c3fa |
Recommends: mtools
|
|
|
31c3fa |
Recommends: erofs-utils
|
|
|
31c3fa |
Recommends: xfsprogs
|
|
|
31c3fa |
Recommends: squashfs-tools
|
|
|
31c3fa |
|
|
|
31c3fa |
# for various output formats
|
|
Zbigniew Jędrzejewski-Szmek |
1ea278 |
Recommends: cpio
|
|
|
31c3fa |
Recommends: tar
|
|
|
31c3fa |
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
# for mkosi qemu
|
|
|
31c3fa |
Recommends: qemu-kvm-core
|
|
Leif Liddy |
a98095 |
Recommends: edk2-ovmf
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
Recommends: swtpm
|
|
|
31c3fa |
|
|
|
31c3fa |
# for mkosi ssh
|
|
|
31c3fa |
Recommends: openssh-clients
|
|
|
31c3fa |
Recommends: socat
|
|
|
31c3fa |
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
# for output compression
|
|
Leif Liddy |
a98095 |
Recommends: zstd
|
|
|
31c3fa |
Recommends: xz
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%description
|
|
Zbigniew Jędrzejewski-Szmek |
a50f94 |
A fancy wrapper around "dnf --installroot", "apt-get", "pacman", "zypper", and
|
|
Zbigniew Jędrzejewski-Szmek |
08f215 |
"emerge" to generate disk images with a number of bells and whistles.
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
Generated images are tailored to the purpose. This means GPT disk labels are
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
used and only systemd-based images may be generated.
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%prep
|
|
Zbigniew Jędrzejewski-Szmek |
10a7ce |
%autosetup -p1
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%generate_buildrequires
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%pyproject_buildrequires
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%build
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
tools/make-man-page.sh
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%pyproject_wheel
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%install
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%pyproject_install
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%pyproject_save_files mkosi
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
mkdir -p %{buildroot}%{_mandir}/man1
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
ln -s -t %{buildroot}%{_mandir}/man1/ \
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
../../../..%{python3_sitelib}/mkosi/resources/mkosi.1
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%files -f %pyproject_files
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%license LICENSE
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%doc README.md
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%_bindir/mkosi
|
|
Zbigniew Jędrzejewski-Szmek |
9faa87 |
%_mandir/man1/mkosi.1*
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
|
|
Zbigniew Jędrzejewski-Szmek |
6ded5c |
%check
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%if %{with tests}
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%pytest tests/ -v
|
|
Zbigniew Jędrzejewski-Szmek |
e83052 |
|
|
Zbigniew Jędrzejewski-Szmek |
6ded5c |
# just a smoke test for syntax or import errors
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%py3_test_envvars %{buildroot}%{_bindir}/mkosi --help >/dev/null
|
|
Zbigniew Jędrzejewski-Szmek |
47c1d4 |
%endif
|
|
Zbigniew Jędrzejewski-Szmek |
6ded5c |
|
|
Zbigniew Jędrzejewski-Szmek |
4cdaf1 |
%changelog
|
|
Zbigniew Jędrzejewski-Szmek |
7285cc |
%autochangelog
|