Compare commits
No commits in common. "rawhide" and "f38" have entirely different histories.
4 changed files with 18 additions and 105 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
11
plans/ci.fmf
11
plans/ci.fmf
|
|
@ -1,11 +0,0 @@
|
|||
summary: Run tests
|
||||
discover:
|
||||
how: shell
|
||||
tests:
|
||||
- name: /smoke
|
||||
summary: Basic smoke test
|
||||
duration: 10m
|
||||
require: [virtme-ng, qemu-kvm]
|
||||
test: virtme-run --kimg --mods auto --script-sh lscpu
|
||||
execute:
|
||||
how: tmt
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (virtme-ng-1.41.tar.gz) = aceca43686d8d62adae1d407eb79e735b6423014fa00b3e1d536a6b20588357a6ebe7274a5ed3e924ccdcb8a2547a84b8b0819d8974670eb72ab37c7adfbd6f7
|
||||
SHA512 (virtme-ng-1.22.tar.gz) = 00f3fb03bdc333ea823fac6d8aaaeba2efe8404b0d6924aa8e24cf254207265c60730cbc4c4bb51fb86c231ceedf404037612183db6d08883dd990b2e40c2dae
|
||||
|
|
|
|||
105
virtme-ng.spec
105
virtme-ng.spec
|
|
@ -1,41 +1,15 @@
|
|||
%if 0%{?epel}
|
||||
# EPEL status as of 2026-04-05:
|
||||
# EPEL 9: fails on a weird error in %%pyproject_install
|
||||
%bcond optimized_init %[%epel >= 10]
|
||||
# No python-mcp yet in EPEL
|
||||
%bcond mcp 0
|
||||
%else
|
||||
%bcond optimized_init 1
|
||||
%bcond mcp %[0%{?fedora} >= 43]
|
||||
%endif
|
||||
|
||||
%global forgeurl https://github.com/arighi/virtme-ng
|
||||
|
||||
Version: 1.41
|
||||
%forgemeta
|
||||
Name: virtme-ng
|
||||
Version: 1.22
|
||||
Release: %autorelease
|
||||
Summary: Quickly build and run kernels inside a virtualized snapshot of your live system
|
||||
# Code license:
|
||||
# - GPL-2.0-only
|
||||
# - GPL-3.0-only (virtme_ng_init)
|
||||
# Rust dependency licenses:
|
||||
# - MIT
|
||||
# - MIT OR Apache-2.0
|
||||
License: GPL-2.0-only AND GPL-3.0-only AND MIT AND (MIT OR Apache-2.0)
|
||||
URL: %forgeurl
|
||||
Source: %forgesource
|
||||
|
||||
%if !%{with optimized_init}
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/arighi/%{name}
|
||||
Source: %{pypi_source %{name}}
|
||||
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: argparse-manpage
|
||||
%if %{with optimized_init}
|
||||
BuildRequires: cargo-rpm-macros >= 24
|
||||
BuildRequires: glibc-static
|
||||
%endif
|
||||
|
||||
Recommends: qemu-kvm
|
||||
Recommends: busybox
|
||||
|
|
@ -70,89 +44,40 @@ running your tests and experiments.
|
|||
virtme-ng is based on virtme, written by Andy Lutomirski <luto@kernel.org>.
|
||||
|
||||
%prep
|
||||
%forgeautosetup -p1
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
|
||||
%if 0%{?epel} && 0%{?epel} < 10
|
||||
# EPEL 9: work around no PEP 604
|
||||
for file in \
|
||||
virtme/util.py \
|
||||
virtme/architectures.py \
|
||||
virtme/mkinitramfs.py \
|
||||
virtme/qemu_helpers.py \
|
||||
virtme/commands/run.py
|
||||
do
|
||||
sed -i \
|
||||
-e '1i from typing import Optional' \
|
||||
-e 's/\(:\|->\) \([a-zA-Z][^:->]*\) | None/\1 Optional[\2]/g' \
|
||||
$file
|
||||
done
|
||||
%endif
|
||||
|
||||
%if %{with optimized_init}
|
||||
# Don't strip the debuginfo - let the rpm macros do it.
|
||||
sed -i 's/\["strip", /["true", /' setup.py
|
||||
|
||||
cd virtme_ng_init
|
||||
%cargo_prep
|
||||
%endif
|
||||
# Remove bundled binary (optional optimized init program for the VM)
|
||||
rm -f virtme/guest/bin/virtme-ng-init
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires %{?with_mcp:-x mcp}
|
||||
%if %{with optimized_init}
|
||||
cd virtme_ng_init
|
||||
%cargo_generate_buildrequires
|
||||
%endif
|
||||
%pyproject_buildrequires
|
||||
|
||||
%build
|
||||
%if %{with optimized_init}
|
||||
export BUILD_VIRTME_NG_INIT=1
|
||||
%endif
|
||||
%pyproject_wheel
|
||||
|
||||
%if %{with optimized_init}
|
||||
cd virtme_ng_init
|
||||
%cargo_license_summary
|
||||
%{cargo_license} > LICENSE.dependencies
|
||||
%endif
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
|
||||
# Man page already installs in the right place, remove the sitelib copy
|
||||
rm -rf %{buildroot}%{python3_sitelib}%{_mandir}
|
||||
# These need to be moved into the right place
|
||||
mv %{buildroot}%{python3_sitelib}/usr/share/* %{buildroot}%{_datadir}
|
||||
rm -rf %{buildroot}%{python3_sitelib}/usr
|
||||
# Work around Python's inability to install global files
|
||||
mv %{buildroot}%{python3_sitelib}/etc %{buildroot}%{_sysconfdir}
|
||||
mv %{buildroot}%{python3_sitelib}/usr/share %{buildroot}%{_datadir}
|
||||
|
||||
%pyproject_save_files virtme virtme_ng
|
||||
|
||||
%check
|
||||
%pyproject_check_import %{!?with_mcp:-e virtme_ng.mcp}
|
||||
%pyproject_check_import
|
||||
|
||||
%files -f %{pyproject_files}
|
||||
%license LICENSE
|
||||
%if %{with optimized_init}
|
||||
%license virtme_ng_init/LICENSE.dependencies
|
||||
%endif
|
||||
%doc README.md
|
||||
%ghost %{_sysconfdir}/virtme-ng.conf
|
||||
%config(noreplace) %{_sysconfdir}/virtme-ng.conf
|
||||
%{_bindir}/vng
|
||||
%{_bindir}/virtme-ng
|
||||
%{_bindir}/virtme-run
|
||||
%{_bindir}/virtme-configkernel
|
||||
%{_bindir}/virtme-mkinitramfs
|
||||
%{_bindir}/virtme-prep-kdir-mods
|
||||
%{_bindir}/virtme-ssh-proxy
|
||||
%{bash_completions_dir}/{virtme-ng,vng}-prompt
|
||||
%{_mandir}/man1/vng.1*
|
||||
%if !%{with mcp}
|
||||
%exclude %{_bindir}/vng-mcp
|
||||
%endif
|
||||
|
||||
%if %{with mcp}
|
||||
%pyproject_extras_subpkg -n %{name} mcp
|
||||
%{_bindir}/vng-mcp
|
||||
%endif
|
||||
%{_datadir}/bash-completion/completions/{virtme-ng,vng}-prompt
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue