From 60de88bf78188f2b6dc1cd00be9b9fa666c1baad Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Wed, 10 May 2023 10:28:34 +0200 Subject: [PATCH] import sources --- .gitignore | 2 + EMPTY | 1 - sources | 2 + virt-p2v-1.42.0.tar.gz.sig | 17 ++++ virt-p2v.spec | 169 +++++++++++++++++++++++++++++++++++++ 5 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 EMPTY create mode 100644 sources create mode 100644 virt-p2v-1.42.0.tar.gz.sig create mode 100644 virt-p2v.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f478af --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/libguestfs.keyring +/virt-p2v-1.42.0.tar.gz diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sources b/sources new file mode 100644 index 0000000..d3c14f5 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (libguestfs.keyring) = 297a15edc7c220222b9f650e0a9361ae132d3f0fed04aeb2237a1d9c3f6dac6f336846434f66480faed72635a33f659e849b052e74b88d1508aeff03f8c9a2ac +SHA512 (virt-p2v-1.42.0.tar.gz) = 215906997bd63fe9c76c599036ca204078ce4f059f87a4f1f1422d9f844156790eafa7654692776d4e5ba9936edb1042b485b300baa1bbc2a8ecb645bae04b80 diff --git a/virt-p2v-1.42.0.tar.gz.sig b/virt-p2v-1.42.0.tar.gz.sig new file mode 100644 index 0000000..3b379ae --- /dev/null +++ b/virt-p2v-1.42.0.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- + +iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAl3fxr0RHHJpY2hAYW5u +ZXhpYS5vcmcACgkQkXOPc+G3aKDAfA/+PI6/c9bsoFa8VZ9tFW3cYP+9yy9ZK37e +xq2lwhvEvNPBsSeiZUMK5POOebTOzCrzTZ0LwpGDCy4q83nOE7BM2pDa0zPh461l +QKYqnfn04h3zx9LNPne1Qj0g5jA0oXtImTDPMwy0VgX9Eqh0Fc/Hc55UHP5UufeN +LllyNhrxQUXvJ4b0Z/9kPAaJTayk0CQqAI0A008Bmc/EzH2dS/nHQofgiKBCxKah +pNPI2bTBe/41XjFU1t36Zi/DNixTexXp4KclQX2PlGP3RR6+bJZY/OYH8G8zOS6d +FnFZ5GdS+Rko+cvcJAGNkewAlkDUzsEAZ016ERDTwM4Fyx9VdcDQc0s07XpkR+jQ +zM8wsaZjKIp99Snk2SwTDReXnUp/rNm0Wq3HeY3bowWVVdn3ivaDbMzipEoka9mz +jvxNBUXISf/aenQ//PiqXmV3Q8q9oIZhFiq4/14N5bc8wauDnD+xnzo1u5ciOV69 +32rk3OXAXHMdn/ARpSTtbnv2QCAAjqDRlm4+xQmulZu6DCvnlUHvzsHErz40hrj8 +LMNA1Pw5MW8v72YLJKRDzQ1R6ELcR2SbYGuHYCN0wqDJXh7RAvTFQusYSBdEYC4F +p9mWi9IWTkoV0RKC2b6nRGkVMpPmwZ4le+sYTawy1P/LM7UCCJHaFCp+pIZ09gVc +SRk4FEKh1RI= +=pvKa +-----END PGP SIGNATURE----- diff --git a/virt-p2v.spec b/virt-p2v.spec new file mode 100644 index 0000000..31049ee --- /dev/null +++ b/virt-p2v.spec @@ -0,0 +1,169 @@ +# Verify tarball signature with GPGv2. +%global verify_tarball_signature 1 + +# So far there are no ELF binaries in this package, so the list +# of files in the debuginfo package will be empty, triggering +# an RPM failure. +%global debug_package %{nil} + +Summary: Convert a physical machine to run on KVM +Name: virt-p2v +Epoch: 1 +Version: 1.42.0 +Release: 5%{?dist} +License: GPLv2+ + +# virt-p2v works only on x86_64 at the moment. It requires porting +# to properly detect the hardware on other architectures, and furthermore +# virt-v2v requires porting too. +ExclusiveArch: x86_64 + +# Source and patches. +URL: http://libguestfs.org/ +Source0: http://download.libguestfs.org/%{name}/%{name}-%{version}.tar.gz +%if 0%{verify_tarball_signature} +Source1: http://download.libguestfs.org/%{name}/%{name}-%{version}.tar.gz.sig +%endif + +# Keyring used to verify tarball signature. +%if 0%{verify_tarball_signature} +Source2: libguestfs.keyring +%endif + +# Basic build requirements. +BuildRequires: gcc +BuildRequires: perl(Pod::Simple) +BuildRequires: perl(Pod::Man) +BuildRequires: perl(List::MoreUtils) +BuildRequires: /usr/bin/pod2text +BuildRequires: libxml2-devel +BuildRequires: pcre-devel +BuildRequires: bash-completion +BuildRequires: xz +BuildRequires: gtk3-devel +BuildRequires: dbus-devel +BuildRequires: m4 +%if 0%{verify_tarball_signature} +BuildRequires: gnupg2 +%endif + +# Test suite requirements. +BuildRequires: /usr/bin/qemu-nbd + +%description +Virt-p2v converts (virtualizes) physical machines so they can be run +as virtual machines under KVM. + +This package contains the tools needed to make a virt-p2v boot CD or +USB key which is booted on the physical machine to perform the +conversion. You also need virt-v2v installed somewhere else to +complete the conversion. + +To convert virtual machines from other hypervisors, see virt-v2v. + + +%package maker +Summary: Convert a physical machine to run on KVM + +# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions +Provides: bundled(gnulib) + + +Requires: gawk +Requires: gzip +Requires: xz + +# virt-p2v-make-disk runs virt-builder: +Requires: libguestfs-tools-c + +# virt-p2v-make-kickstart runs strip: +Requires: binutils + + +# The bash completion for p2v were shipped with the others of libguestfs: +Obsoletes: libguestfs-bash-completion < 1:1.38.4-15 + + +%description maker +Virt-p2v converts (virtualizes) physical machines so they can be run +as virtual machines under KVM. + +This package contains the tools needed to make a virt-p2v boot CD or +USB key which is booted on the physical machine to perform the +conversion. You also need virt-v2v installed somewhere else to +complete the conversion. + +To convert virtual machines from other hypervisors, see virt-v2v. + + +%prep +%if 0%{verify_tarball_signature} +tmphome="$(mktemp -d)" +gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%endif +%setup -q +%autopatch -p1 + + +%build +%configure \ + --with-extra="rhel=%{rhel},release=%{release}" \ + --disable-gnulib-tests + +make V=1 %{?_smp_mflags} + + +%check + +if ! make check; then + cat test-suite.log + exit 1 +fi + + +%install +make DESTDIR=$RPM_BUILD_ROOT install + +# Delete the development man pages. +rm $RPM_BUILD_ROOT%{_mandir}/man1/p2v-building.1* +rm $RPM_BUILD_ROOT%{_mandir}/man1/p2v-hacking.1* +rm $RPM_BUILD_ROOT%{_mandir}/man1/p2v-release-notes.1* + +# Delete kiwi tools. +rm $RPM_BUILD_ROOT%{_bindir}/virt-p2v-make-kiwi +rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-p2v-make-kiwi.1* +rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-p2v-make-kiwi + +%files maker +%doc README +%license COPYING +%{_bindir}/virt-p2v-make-disk +%{_bindir}/virt-p2v-make-kickstart +%{_datadir}/bash-completion/completions/virt-* +%{_datadir}/virt-p2v +%{_libdir}/virt-p2v +%{_mandir}/man1/virt-p2v-make-disk.1* +%{_mandir}/man1/virt-p2v-make-kickstart.1* +%{_mandir}/man1/virt-p2v.1* + + +%changelog +* Fri Mar 06 2020 Pino Toscano - 1:1.42.0-5 +- Remove virt-p2v-make-kiwi, as it is not supported, and was not + shipped already. + +* Fri Feb 21 2020 Pino Toscano - 1:1.42.0-4 +- Copy %description also for the source, so tools are less confused + about it. +- Fix the "extra" addition to the version to refer to rhel. + +* Wed Dec 11 2019 Pino Toscano - 1:1.42.0-3 +- Explicitly require xz, as it is used by all the tools to unpack the + virt-p2v binary. + +* Thu Dec 05 2019 Pino Toscano - 1:1.42.0-2 +- Adjust the version of libguestfs-bash-completion that drops the bash + completion scripts + +* Thu Nov 28 2019 Pino Toscano - 1:1.42.0-1 +- Initial build, split off src:libguestfs.