Blame SPECS/virt-v2v.spec

c232e6
# If we should verify tarball signature with GPGv2.
c232e6
%global verify_tarball_signature 1
c232e6
c232e6
# If there are patches which touch autotools files, set this to 1.
c232e6
%if !0%{?rhel}
c232e6
%global patches_touch_autotools %{nil}
c232e6
%else
c232e6
# On RHEL the downstream patches always touch autotools files.
c232e6
%global patches_touch_autotools 1
c232e6
%endif
c232e6
c232e6
# The source directory.
c232e6
%global source_directory 1.45-development
c232e6
c232e6
Name:          virt-v2v
c232e6
Epoch:         1
c232e6
Version:       1.45.3
c232e6
Release:       3%{?dist}
c232e6
Summary:       Convert a virtual machine to run on KVM
c232e6
c232e6
License:       GPLv2+
c232e6
URL:           https://github.com/libguestfs/virt-v2v
c232e6
c232e6
Source0:       http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz
c232e6
%if 0%{verify_tarball_signature}
c232e6
Source1:       http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz.sig
c232e6
# Keyring used to verify tarball signature.
c232e6
Source2:       libguestfs.keyring
c232e6
%endif
c232e6
c232e6
# Maintainer script which helps with handling patches.
c232e6
Source3:       copy-patches.sh
c232e6
c232e6
%if !0%{?rhel}
c232e6
# libguestfs hasn't been built on i686 for a while since there is no
c232e6
# kernel built for this architecture any longer and libguestfs rather
c232e6
# fundamentally depends on the kernel.  Therefore we must exclude this
c232e6
# arch.  Note there is no bug filed for this because we do not ever
c232e6
# expect that libguestfs or virt-v2v will be available on i686 so
c232e6
# there is nothing that needs fixing.
c232e6
ExcludeArch:   %{ix86}
c232e6
%else
c232e6
# Architectures where virt-v2v is shipped on RHEL:
c232e6
#
c232e6
# not on aarch64 because it is not useful there
c232e6
# not on %%{power64} because of RHBZ#1287826
c232e6
# not on s390x because it is not useful there
c232e6
ExclusiveArch: x86_64
c232e6
%endif
c232e6
c232e6
# Downstream (RHEL-only) patches.
c232e6
%if 0%{?rhel}
c232e6
Patch9001:     0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch
c232e6
Patch9002:     0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch
c232e6
Patch9003:     0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
c232e6
Patch9004:     0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch
c232e6
Patch9005:     0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
c232e6
Patch9006:     0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch
c232e6
Patch9007:     0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch
c232e6
Patch9008:     0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
c232e6
Patch9009:     0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
c232e6
Patch9010:     0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
c232e6
Patch9011:     0011-RHEL-9-Disable-o-glance.patch
c232e6
Patch9012:     0012-v2v-windows-Do-not-fix-NTFS-heads-in-Windows-Vista-a.patch
c232e6
%endif
c232e6
c232e6
%if 0%{patches_touch_autotools}
c232e6
BuildRequires: autoconf, automake, libtool
c232e6
%endif
c232e6
c232e6
BuildRequires: make
c232e6
BuildRequires: /usr/bin/pod2man
c232e6
BuildRequires: gcc
c232e6
BuildRequires: ocaml >= 4.01
c232e6
BuildRequires: libguestfs-devel >= 1:1.42
c232e6
c232e6
BuildRequires: augeas-devel
c232e6
BuildRequires: bash-completion
c232e6
BuildRequires: file-devel
c232e6
BuildRequires: gettext-devel
c232e6
BuildRequires: jansson-devel
c232e6
BuildRequires: libosinfo-devel
c232e6
BuildRequires: libvirt-devel
c232e6
BuildRequires: libvirt-daemon-kvm
c232e6
BuildRequires: libxml2-devel
c232e6
BuildRequires: pcre-devel
c232e6
BuildRequires: perl(Sys::Guestfs)
c232e6
BuildRequires: po4a
c232e6
BuildRequires: /usr/bin/virsh
c232e6
BuildRequires: xorriso
c232e6
c232e6
BuildRequires: ocaml-findlib-devel
c232e6
BuildRequires: ocaml-libguestfs-devel
c232e6
BuildRequires: ocaml-fileutils-devel
c232e6
BuildRequires: ocaml-gettext-devel
c232e6
%if !0%{?rhel}
c232e6
BuildRequires: ocaml-ounit-devel
c232e6
%endif
c232e6
c232e6
BuildRequires: nbdkit-python-plugin
c232e6
c232e6
%if 0%{verify_tarball_signature}
c232e6
BuildRequires: gnupg2
c232e6
%endif
c232e6
c232e6
Requires:      libguestfs%{?_isa} >= 1:1.42
c232e6
Requires:      guestfs-tools >= 1.42
c232e6
c232e6
# XFS is the default filesystem in Fedora and RHEL.
c232e6
Requires:      libguestfs-xfs
c232e6
c232e6
%if 0%{?rhel}
c232e6
# For Windows conversions on RHEL.
c232e6
Requires:      libguestfs-winsupport >= 7.2
c232e6
%endif
c232e6
c232e6
Requires:      gawk
c232e6
Requires:      gzip
c232e6
Requires:      unzip
c232e6
Requires:      curl
c232e6
Requires:      /usr/bin/virsh
c232e6
c232e6
# Ensure the UEFI firmware is available, to properly convert
c232e6
# EFI guests (RHBZ#1429643).
c232e6
%ifarch x86_64
c232e6
Requires:      edk2-ovmf
c232e6
%endif
c232e6
%ifarch aarch64
c232e6
Requires:      edk2-aarch64
c232e6
%endif
c232e6
c232e6
# Needed for -it vddk, and -o rhv-upload.
c232e6
Requires:      nbdkit
c232e6
Requires:      nbdkit-curl-plugin
c232e6
Requires:      nbdkit-python-plugin
c232e6
Requires:      nbdkit-ssh-plugin
c232e6
%ifarch x86_64
c232e6
Requires:      nbdkit-vddk-plugin
c232e6
%endif
c232e6
c232e6
# For rhsrvany.exe, used to install firstboot scripts in Windows guests.
c232e6
Requires:      mingw32-srvany >= 1.0-13
c232e6
c232e6
# On RHEL, virtio-win should be used to install virtio drivers
c232e6
# and qemu-ga in converted guests.  (RHBZ#1972644)
c232e6
%if 0%{?rhel}
c232e6
Recommends:    virtio-win
c232e6
%endif
c232e6
c232e6
c232e6
%description
c232e6
Virt-v2v converts a single guest from a foreign hypervisor to run on
c232e6
KVM.  It can read Linux and Windows guests running on VMware, Xen,
c232e6
Hyper-V and some other hypervisors, and convert them to KVM managed by
c232e6
libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several
c232e6
other targets.  It can modify the guest to make it bootable on KVM and
c232e6
install virtio drivers so it will run quickly.
c232e6
c232e6
c232e6
%package bash-completion
c232e6
Summary:       Bash tab-completion for %{name}
c232e6
BuildArch:     noarch
c232e6
Requires:      bash-completion >= 2.0
c232e6
Requires:      %{name} = %{epoch}:%{version}-%{release}
c232e6
c232e6
c232e6
%description bash-completion
c232e6
Install this package if you want intelligent bash tab-completion
c232e6
for %{name}.
c232e6
c232e6
c232e6
%package man-pages-ja
c232e6
Summary:       Japanese (ja) man pages for %{name}
c232e6
BuildArch:     noarch
c232e6
Requires:      %{name} = %{epoch}:%{version}-%{release}
c232e6
c232e6
%description man-pages-ja
c232e6
%{name}-man-pages-ja contains Japanese (ja) man pages
c232e6
for %{name}.
c232e6
c232e6
c232e6
%package man-pages-uk
c232e6
Summary:       Ukrainian (uk) man pages for %{name}
c232e6
BuildArch:     noarch
c232e6
Requires:      %{name} = %{epoch}:%{version}-%{release}
c232e6
c232e6
%description man-pages-uk
c232e6
%{name}-man-pages-uk contains Ukrainian (uk) man pages
c232e6
for %{name}.
c232e6
c232e6
c232e6
%prep
c232e6
%if 0%{verify_tarball_signature}
c232e6
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
c232e6
%endif
c232e6
%autosetup -p1
c232e6
c232e6
%if 0%{patches_touch_autotools}
c232e6
autoreconf -i
c232e6
%endif
c232e6
c232e6
c232e6
%build
c232e6
%configure \
c232e6
%if !0%{?rhel}
c232e6
  --with-extra="fedora=%{fedora},release=%{release}" \
c232e6
%else
c232e6
  --with-extra="rhel=%{rhel},release=%{release}" \
c232e6
%endif
c232e6
c232e6
make V=1 %{?_smp_mflags}
c232e6
c232e6
c232e6
%install
c232e6
%make_install
c232e6
c232e6
# Delete libtool crap.
c232e6
find $RPM_BUILD_ROOT -name '*.la' -delete
c232e6
c232e6
# Virt-tools data directory.  This contains a symlink to rhsrvany.exe
c232e6
# which is satisfied by the dependency on mingw32-srvany.
c232e6
mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools
c232e6
pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools
c232e6
ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe
c232e6
popd
c232e6
c232e6
# Find locale files.
c232e6
%find_lang %{name}
c232e6
c232e6
c232e6
%check
c232e6
# All tests fail at the moment because of bugs in libvirt blockdev.
c232e6
# # Tests fail on both armv7 and ppc64le in Fedora 31 because the kernel
c232e6
# # cannot boot on qemu.
c232e6
# %ifnarch %{arm} ppc64le
c232e6
c232e6
# # On x86_64 this single test fails with: "virt-v2v: warning: the
c232e6
# # target hypervisor does not support a x86_64 KVM guest".  Missing
c232e6
# # BuildRequires?
c232e6
# %ifarch x86_64
c232e6
# truncate -s 0 tests/test-v2v-o-libvirt.sh
c232e6
# %endif
c232e6
c232e6
# # This test fails in mock.
c232e6
# truncate -s 0 tests/test-v2v-oa-option.sh
c232e6
c232e6
# # Make sure we can see the debug messages (RHBZ#1230160).
c232e6
# export LIBGUESTFS_DEBUG=1
c232e6
# export LIBGUESTFS_TRACE=1
c232e6
c232e6
# make %{?_smp_mflags} check || {
c232e6
#     cat tests/test-suite.log
c232e6
#     exit 1
c232e6
#   }
c232e6
c232e6
# %endif
c232e6
c232e6
c232e6
%files -f %{name}.lang
c232e6
%license COPYING
c232e6
%doc README
c232e6
%{_bindir}/virt-v2v
c232e6
%{_mandir}/man1/virt-v2v.1*
c232e6
%{_mandir}/man1/virt-v2v-hacking.1*
c232e6
%{_mandir}/man1/virt-v2v-input-vmware.1*
c232e6
%{_mandir}/man1/virt-v2v-input-xen.1*
c232e6
%{_mandir}/man1/virt-v2v-output-local.1*
c232e6
%{_mandir}/man1/virt-v2v-output-openstack.1*
c232e6
%{_mandir}/man1/virt-v2v-output-rhv.1*
c232e6
%{_mandir}/man1/virt-v2v-release-notes-1.42.1*
c232e6
%{_mandir}/man1/virt-v2v-support.1*
c232e6
%{_datadir}/virt-tools
c232e6
c232e6
c232e6
%files bash-completion
c232e6
%license COPYING
c232e6
%{_datadir}/bash-completion/completions/virt-v2v
c232e6
c232e6
c232e6
%files man-pages-ja
c232e6
%license COPYING
c232e6
%lang(ja) %{_mandir}/ja/man1/*.1*
c232e6
c232e6
c232e6
%files man-pages-uk
c232e6
%license COPYING
c232e6
%lang(uk) %{_mandir}/uk/man1/*.1*
c232e6
c232e6
c232e6
%changelog
c232e6
* Wed Aug 18 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.3-3
c232e6
- Fix conversion of Windows BitLocker guests
c232e6
  resolves: rhbz#1994984
c232e6
c232e6
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.45.3-2
c232e6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
c232e6
  Related: rhbz#1991688
c232e6
c232e6
* Fri Aug 06 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.3-1
c232e6
- New upstream development version 1.45.3.
c232e6
- Rebase RHEL patches.
c232e6
  resolves: rhbz#1950634
c232e6
c232e6
* Wed Jun 30 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.2-1
c232e6
- New upstream development version 1.45.2.
c232e6
- Remove --debug-overlays and --print-estimate options.
c232e6
- Remove -o glance option on RHEL 9 (RHBZ#1977539).
c232e6
- Remove support for RHEV-APT (RHBZ#1945549).
c232e6
c232e6
* Wed Jun 16 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.1-1.el9.1
c232e6
- New upstream development version 1.45.1.
c232e6
- Require virtio-win on RHEL (RHBZ#1972644).
c232e6
- v2v-test-harness, virt-v2v-copy-to-local have been removed upstream.
c232e6
c232e6
* Thu Jun 10 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.44.0-2
c232e6
- nbdkit-vddk-plugin dep only exists on x86-64.
c232e6
c232e6
* Mon May 10 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.44.0-1.el9.1
c232e6
- Rebuild in RHEL 9 against libguestfs 1.45.5
c232e6
  resolves: rhbz#1959042
c232e6
c232e6
* Fri Apr 30 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.44.0-1
c232e6
- New upstream stable branch version 1.44.0.
c232e6
c232e6
* Wed Apr 14 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.5-1
c232e6
- New upstream version 1.43.5.
c232e6
c232e6
* Thu Apr 01 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.4-5
c232e6
- Add upstream patch to depend on xorriso.
c232e6
- Change libguestfs-tools-c -> guestfs-tools.
c232e6
c232e6
* Tue Mar 30 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.4-3
c232e6
- Add downstream (RHEL-only) patches (RHBZ#1931724).
c232e6
c232e6
* Mon Mar  8 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.4-2
c232e6
- Bump and rebuild for ocaml-gettext update.
c232e6
c232e6
* Wed Mar  3 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.4-1
c232e6
- New upstream version 1.43.4.
c232e6
c232e6
* Tue Mar  2 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.3-4
c232e6
- OCaml 4.12.0 build
c232e6
c232e6
* Tue Mar  2 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.3-3
c232e6
- Add fix for OCaml 4.12.
c232e6
c232e6
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.43.3-2
c232e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c232e6
c232e6
* Tue Jan 05 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.3-1
c232e6
- New upstream version 1.43.3.
c232e6
c232e6
* Thu Dec 03 2020 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.2-3
c232e6
- Drop obsolete virt-v2v-copy-to-local tool for Fedora 34 and RHEL 9.
c232e6
c232e6
* Wed Dec 02 2020 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.2-2
c232e6
- Unify Fedora and RHEL spec files.
c232e6
c232e6
* Tue Dec 01 2020 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.2-1
c232e6
- New upstream version 1.43.2.
c232e6
c232e6
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.1-5
c232e6
- OCaml 4.11.1 rebuild
c232e6
c232e6
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1:1.43.1-4
c232e6
- OCaml 4.11.0 rebuild
c232e6
c232e6
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.43.1-3
c232e6
- Second attempt - Rebuilt for
c232e6
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c232e6
c232e6
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.43.1-2
c232e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c232e6
c232e6
* Mon Jul 06 2020 Richard W.M. Jones <rjones@redhat.com> - 1.43.1-1
c232e6
- New development branch 1.43.
c232e6
c232e6
* Wed May 06 2020 Richard W.M. Jones <rjones@redhat.com> - 1.42.0-4
c232e6
- Re-add Epoch.  Forgotten when we split this package from libguestfs.
c232e6
c232e6
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 1.42.0-2
c232e6
- OCaml 4.11.0+dev2-2020-04-22 rebuild
c232e6
c232e6
* Thu Apr 16 2020 Richard W.M. Jones <rjones@redhat.com> - 1.42.0-1
c232e6
- New upstream stable version 1.42.0.
c232e6
c232e6
* Sat Apr 04 2020 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-11
c232e6
- Update all OCaml dependencies for RPM 4.16.
c232e6
c232e6
* Thu Feb 27 2020 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-10
c232e6
- OCaml 4.10.0 final.
c232e6
c232e6
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.41.8-9
c232e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c232e6
c232e6
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-8
c232e6
- Bump release and rebuild.
c232e6
c232e6
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-7
c232e6
- Bump release and rebuild.
c232e6
c232e6
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-6
c232e6
- Bump release and rebuild.
c232e6
c232e6
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-5
c232e6
- OCaml 4.10.0+beta1 rebuild.
c232e6
- Use nbdkit-python-plugin (now all Python 3 in Rawhide).
c232e6
c232e6
* Wed Nov 27 2019 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-4
c232e6
- Use license instead of doc for COPYING file.
c232e6
- Include license in all subpackages.
c232e6
- Use gpgverify macro.
c232e6
- Don't own bash-completion directory because we Require the
c232e6
  bash-completion package which owns it already.
c232e6
c232e6
* Tue Nov 26 2019 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-2
c232e6
- Fix permissions on .sig file.
c232e6
- Disable -oa preallocated test since it fails in reviewers mock environment.
c232e6
c232e6
* Fri Nov 15 2019 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-1
c232e6
- Initial release of separate virt-v2v program, was part of libguestfs.