Blame SPECS/virt-p2v.spec

385d9f
# Verify tarball signature with GPGv2.
385d9f
%global verify_tarball_signature 1
385d9f
385d9f
# So far there are no ELF binaries in this package, so the list
385d9f
# of files in the debuginfo package will be empty, triggering
385d9f
# an RPM failure.
385d9f
%global debug_package %{nil}
385d9f
385d9f
Summary:       Convert a physical machine to run on KVM
385d9f
Name:          virt-p2v
385d9f
Epoch:         1
385d9f
Version:       1.42.0
385d9f
Release:       5%{?dist}
385d9f
License:       GPLv2+
385d9f
385d9f
# virt-p2v works only on x86_64 at the moment.  It requires porting
385d9f
# to properly detect the hardware on other architectures, and furthermore
385d9f
# virt-v2v requires porting too.
385d9f
ExclusiveArch: x86_64
385d9f
385d9f
# Source and patches.
385d9f
URL:           http://libguestfs.org/
385d9f
Source0:       http://download.libguestfs.org/%{name}/%{name}-%{version}.tar.gz
385d9f
%if 0%{verify_tarball_signature}
385d9f
Source1:       http://download.libguestfs.org/%{name}/%{name}-%{version}.tar.gz.sig
385d9f
%endif
385d9f
385d9f
# Keyring used to verify tarball signature.
385d9f
%if 0%{verify_tarball_signature}
385d9f
Source2:       libguestfs.keyring
385d9f
%endif
385d9f
385d9f
# Basic build requirements.
385d9f
BuildRequires: gcc
385d9f
BuildRequires: perl(Pod::Simple)
385d9f
BuildRequires: perl(Pod::Man)
385d9f
BuildRequires: perl(List::MoreUtils)
385d9f
BuildRequires: /usr/bin/pod2text
385d9f
BuildRequires: libxml2-devel
385d9f
BuildRequires: pcre-devel
385d9f
BuildRequires: bash-completion
385d9f
BuildRequires: xz
385d9f
BuildRequires: gtk3-devel
385d9f
BuildRequires: dbus-devel
385d9f
BuildRequires: m4
385d9f
%if 0%{verify_tarball_signature}
385d9f
BuildRequires: gnupg2
385d9f
%endif
385d9f
385d9f
# Test suite requirements.
385d9f
BuildRequires: /usr/bin/qemu-nbd
385d9f
385d9f
%description
385d9f
Virt-p2v converts (virtualizes) physical machines so they can be run
385d9f
as virtual machines under KVM.
385d9f
385d9f
This package contains the tools needed to make a virt-p2v boot CD or
385d9f
USB key which is booted on the physical machine to perform the
385d9f
conversion.  You also need virt-v2v installed somewhere else to
385d9f
complete the conversion.
385d9f
385d9f
To convert virtual machines from other hypervisors, see virt-v2v.
385d9f
385d9f
385d9f
%package maker
385d9f
Summary:       Convert a physical machine to run on KVM
385d9f
385d9f
# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions
385d9f
Provides:      bundled(gnulib)
385d9f
385d9f
385d9f
Requires:      gawk
385d9f
Requires:      gzip
385d9f
Requires:      xz
385d9f
385d9f
# virt-p2v-make-disk runs virt-builder:
385d9f
Requires:      libguestfs-tools-c
385d9f
385d9f
# virt-p2v-make-kickstart runs strip:
385d9f
Requires:      binutils
385d9f
385d9f
385d9f
# The bash completion for p2v were shipped with the others of libguestfs:
385d9f
Obsoletes: libguestfs-bash-completion < 1:1.38.4-15
385d9f
385d9f
385d9f
%description maker
385d9f
Virt-p2v converts (virtualizes) physical machines so they can be run
385d9f
as virtual machines under KVM.
385d9f
385d9f
This package contains the tools needed to make a virt-p2v boot CD or
385d9f
USB key which is booted on the physical machine to perform the
385d9f
conversion.  You also need virt-v2v installed somewhere else to
385d9f
complete the conversion.
385d9f
385d9f
To convert virtual machines from other hypervisors, see virt-v2v.
385d9f
385d9f
385d9f
%prep
385d9f
%if 0%{verify_tarball_signature}
385d9f
tmphome="$(mktemp -d)"
385d9f
gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
385d9f
%endif
385d9f
%setup -q
385d9f
%autopatch -p1
385d9f
385d9f
385d9f
%build
385d9f
%configure \
385d9f
  --with-extra="rhel=%{rhel},release=%{release}" \
385d9f
  --disable-gnulib-tests
385d9f
385d9f
make V=1 %{?_smp_mflags}
385d9f
385d9f
385d9f
%check
385d9f
385d9f
if ! make check; then
385d9f
    cat test-suite.log
385d9f
    exit 1
385d9f
fi
385d9f
385d9f
385d9f
%install
385d9f
make DESTDIR=$RPM_BUILD_ROOT install
385d9f
385d9f
# Delete the development man pages.
385d9f
rm $RPM_BUILD_ROOT%{_mandir}/man1/p2v-building.1*
385d9f
rm $RPM_BUILD_ROOT%{_mandir}/man1/p2v-hacking.1*
385d9f
rm $RPM_BUILD_ROOT%{_mandir}/man1/p2v-release-notes.1*
385d9f
385d9f
# Delete kiwi tools.
385d9f
rm $RPM_BUILD_ROOT%{_bindir}/virt-p2v-make-kiwi
385d9f
rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-p2v-make-kiwi.1*
385d9f
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-p2v-make-kiwi
385d9f
385d9f
%files maker
385d9f
%doc README
385d9f
%license COPYING
385d9f
%{_bindir}/virt-p2v-make-disk
385d9f
%{_bindir}/virt-p2v-make-kickstart
385d9f
%{_datadir}/bash-completion/completions/virt-*
385d9f
%{_datadir}/virt-p2v
385d9f
%{_libdir}/virt-p2v
385d9f
%{_mandir}/man1/virt-p2v-make-disk.1*
385d9f
%{_mandir}/man1/virt-p2v-make-kickstart.1*
385d9f
%{_mandir}/man1/virt-p2v.1*
385d9f
385d9f
385d9f
%changelog
385d9f
* Fri Mar 06 2020 Pino Toscano <ptoscano@redhat.com> - 1:1.42.0-5
385d9f
- Remove virt-p2v-make-kiwi, as it is not supported, and was not
385d9f
  shipped already.
385d9f
385d9f
* Fri Feb 21 2020 Pino Toscano <ptoscano@redhat.com> - 1:1.42.0-4
385d9f
- Copy %description also for the source, so tools are less confused
385d9f
  about it.
385d9f
- Fix the "extra" addition to the version to refer to rhel.
385d9f
385d9f
* Wed Dec 11 2019 Pino Toscano <ptoscano@redhat.com> - 1:1.42.0-3
385d9f
- Explicitly require xz, as it is used by all the tools to unpack the
385d9f
  virt-p2v binary.
385d9f
385d9f
* Thu Dec 05 2019 Pino Toscano <ptoscano@redhat.com> - 1:1.42.0-2
385d9f
- Adjust the version of libguestfs-bash-completion that drops the bash
385d9f
  completion scripts
385d9f
385d9f
* Thu Nov 28 2019 Pino Toscano <ptoscano@redhat.com> - 1:1.42.0-1
385d9f
- Initial build, split off src:libguestfs.