From c2522473e29af05d9d58a85be6ba83f9b96edcda Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 22 Aug 2011 14:38:16 +0100 Subject: [PATCH 001/235] - New upstream release 0.8.3. - Include upstream patch to fix whitespace problems in PO files. - Remove virt-p2v from build by synchronizing the spec file so it almost matches the one in RHEL 6.2. Note that virt-p2v is built in a separate SRPM called rubygem-virt-p2v. --- .gitignore | 1 + sources | 2 +- virt-v2v-0.8.1-00-44eb9021-modified.patch | 9296 --------------------- virt-v2v-0.8.1-01-e34a8c09.patch | 57 - virt-v2v-0.8.1-02-fadb1929.patch | 111 - virt-v2v-0.8.1-03-a965f7e0.patch | 57 - virt-v2v-0.8.1-04-77bd7908.patch | 29 - virt-v2v-0.8.3-01-bd513aaf.patch | 67 + virt-v2v.spec | 149 +- 9 files changed, 99 insertions(+), 9670 deletions(-) delete mode 100644 virt-v2v-0.8.1-00-44eb9021-modified.patch delete mode 100644 virt-v2v-0.8.1-01-e34a8c09.patch delete mode 100644 virt-v2v-0.8.1-02-fadb1929.patch delete mode 100644 virt-v2v-0.8.1-03-a965f7e0.patch delete mode 100644 virt-v2v-0.8.1-04-77bd7908.patch create mode 100644 virt-v2v-0.8.3-01-bd513aaf.patch diff --git a/.gitignore b/.gitignore index f89e54d..ecd4dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ # Source /virt-v2v-v0.8.1.tar.gz +/virt-v2v-v0.8.3.tar.gz diff --git a/sources b/sources index d91078f..0c31efb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e850297f55ae839b28c8417d0acd080b virt-v2v-v0.8.1.tar.gz +125315e4901b2dfae16590a746e35bfc virt-v2v-v0.8.3.tar.gz diff --git a/virt-v2v-0.8.1-00-44eb9021-modified.patch b/virt-v2v-0.8.1-00-44eb9021-modified.patch deleted file mode 100644 index 5f0b250..0000000 --- a/virt-v2v-0.8.1-00-44eb9021-modified.patch +++ /dev/null @@ -1,9296 +0,0 @@ -diff -ruN virt-v2v-v0.8.1/Build.PL virt-v2v-v0.8.1.new/Build.PL ---- virt-v2v-v0.8.1/Build.PL 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/Build.PL 2011-05-11 17:20:21.000000000 +0100 -@@ -26,7 +26,7 @@ - { - my $self = shift; - -- system($self->config('make'), '-C', 'p2v-image-builder') == 0 -+ system($self->config('make'), '-C', 'p2v/image-builder') == 0 - or return 1; - } - -@@ -243,7 +243,7 @@ - dist_version_from => 'lib/Sys/VirtConvert.pm', - confdoc_files => [ 'v2v/virt-v2v.conf.pod' ], - install_path => { 'locale' => '/usr/local/share/locale' }, -- script_files => [ 'v2v/virt-v2v.pl', 'p2v-server/virt-p2v-server.pl' ], -+ script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ], - meta_add => { - resources => { - license => "http://www.gnu.org/licenses/gpl.html", -diff -ruN virt-v2v-v0.8.1/ChangeLog virt-v2v-v0.8.1.new/ChangeLog ---- virt-v2v-v0.8.1/ChangeLog 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/ChangeLog 2011-05-11 17:20:21.000000000 +0100 -@@ -1,3 +1,33 @@ -+2011-05-10 Matthew Booth -+ -+ * Build.PL, MANIFEST, p2v-image-builder/Makefile, {p2v-client => -+ p2v/client}/.gitignore, {p2v-client => p2v/client}/Manifest, -+ {p2v-client => p2v/client}/Rakefile, {p2v-client => -+ p2v/client}/bin/virt-p2v, {p2v-client => -+ p2v/client}/lib/virt-p2v/blockdevice.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/connection.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/converter.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/gtk-queue.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/netdevice.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/connect.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/convert.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/main.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/network.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/p2v.ui, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/success.rb, {p2v-image-builder => -+ p2v/image-builder}/.gitignore, p2v/image-builder/Makefile, -+ {p2v-image-builder => p2v/image-builder}/common-install.ks, -+ {p2v-image-builder => p2v/image-builder}/common-manifest-post.ks, -+ {p2v-image-builder => p2v/image-builder}/common-minimizer.ks, -+ {p2v-image-builder => p2v/image-builder}/common-pkgs.ks, -+ {p2v-image-builder => p2v/image-builder}/common-post-nochroot.ks, -+ {p2v-image-builder => p2v/image-builder}/common-post.ks, -+ {p2v-image-builder => p2v/image-builder}/virt-p2v-image-builder, -+ {p2v-image-builder => p2v/image-builder}/virt-p2v-image.ks, -+ {p2v-server => p2v/server}/run-p2v-locally, {p2v-server => -+ p2v/server}/virt-p2v-server.pl, virt-v2v.spec.PL: Give p2v its own -+ subdirectory -+ - 2011-04-26 Matthew Booth - - * lib/Sys/VirtConvert.pm: Bump version to 0.8.1 -diff -ruN virt-v2v-v0.8.1/MANIFEST virt-v2v-v0.8.1.new/MANIFEST ---- virt-v2v-v0.8.1/MANIFEST 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/MANIFEST 2011-05-11 17:20:21.000000000 +0100 -@@ -27,33 +27,33 @@ - MANIFEST.SKIP - META.yml - metadata-format.txt --p2v-client/bin/virt-p2v --p2v-client/lib/virt-p2v/blockdevice.rb --p2v-client/lib/virt-p2v/connection.rb --p2v-client/lib/virt-p2v/converter.rb --p2v-client/lib/virt-p2v/gtk-queue.rb --p2v-client/lib/virt-p2v/netdevice.rb --p2v-client/lib/virt-p2v/ui/connect.rb --p2v-client/lib/virt-p2v/ui/convert.rb --p2v-client/lib/virt-p2v/ui/main.rb --p2v-client/lib/virt-p2v/ui/network.rb --p2v-client/lib/virt-p2v/ui/p2v.ui --p2v-client/lib/virt-p2v/ui/success.rb --p2v-client/Manifest --p2v-client/Rakefile --p2v-client/virt-p2v.gemspec --p2v-image-builder/common-install.ks --p2v-image-builder/common-manifest-post.ks --p2v-image-builder/common-minimizer.ks --p2v-image-builder/common-pkgs.ks --p2v-image-builder/common-post-nochroot.ks --p2v-image-builder/common-post.ks --p2v-image-builder/Makefile --p2v-image-builder/version.ks --p2v-image-builder/virt-p2v-image-builder --p2v-image-builder/virt-p2v-image.ks --p2v-server/run-p2v-locally --p2v-server/virt-p2v-server.pl -+p2v/client/bin/virt-p2v -+p2v/client/lib/virt-p2v/blockdevice.rb -+p2v/client/lib/virt-p2v/connection.rb -+p2v/client/lib/virt-p2v/converter.rb -+p2v/client/lib/virt-p2v/gtk-queue.rb -+p2v/client/lib/virt-p2v/netdevice.rb -+p2v/client/lib/virt-p2v/ui/connect.rb -+p2v/client/lib/virt-p2v/ui/convert.rb -+p2v/client/lib/virt-p2v/ui/main.rb -+p2v/client/lib/virt-p2v/ui/network.rb -+p2v/client/lib/virt-p2v/ui/p2v.ui -+p2v/client/lib/virt-p2v/ui/success.rb -+p2v/client/Manifest -+p2v/client/Rakefile -+p2v/client/virt-p2v.gemspec -+p2v/image-builder/common-install.ks -+p2v/image-builder/common-manifest-post.ks -+p2v/image-builder/common-minimizer.ks -+p2v/image-builder/common-pkgs.ks -+p2v/image-builder/common-post-nochroot.ks -+p2v/image-builder/common-post.ks -+p2v/image-builder/Makefile -+p2v/image-builder/version.ks -+p2v/image-builder/virt-p2v-image-builder -+p2v/image-builder/virt-p2v-image.ks -+p2v/server/run-p2v-locally -+p2v/server/virt-p2v-server.pl - po/es.po - po/it.po - po/Makefile -diff -ruN virt-v2v-v0.8.1/p2v/client/bin/virt-p2v virt-v2v-v0.8.1.new/p2v/client/bin/virt-p2v ---- virt-v2v-v0.8.1/p2v/client/bin/virt-p2v 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/bin/virt-p2v 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,62 @@ -+#!/usr/bin/env ruby -+ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'virt-p2v/ui/main' -+require 'virt-p2v/ui/network' -+require 'virt-p2v/ui/connect' -+require 'virt-p2v/ui/convert' -+require 'virt-p2v/ui/success' -+ -+require 'virt-p2v/converter' -+require 'virt-p2v/netdevice' -+ -+require 'gettext' -+ -+include GetText -+ -+bindtextdomain('virt-p2v') -+ -+if Process.uid != 0 -+ puts _("virt-p2v must be executed with root privileges.\n" + -+ "It is intended to be included in a custom Live image, not " + -+ "run from the command\nline.") -+ abort -+end -+ -+converter = VirtP2V::Converter.new -+ -+# Initialise the wizard UI -+ui = VirtP2V::UI::Main.new -+ -+# Initialize wizard pages -+VirtP2V::UI::Network.init(ui) -+VirtP2V::UI::Connect.init(ui, converter) -+VirtP2V::UI::Convert.init(ui, converter) -+VirtP2V::UI::Success.init(ui) -+ -+# Skip the network configuration screen if there is already an active network -+# connection -+VirtP2V::NetworkDevice.all_devices.each { |device| -+ if device.activated then -+ ui.active_page = 'server_win' -+ break -+ end -+} -+ -+ui.show -+ui.main_loop -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/blockdevice.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/blockdevice.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/blockdevice.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/blockdevice.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,112 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+module VirtP2V -+ -+class NoSuchDeviceError < StandardError; end -+ -+class FixedBlockDevice -+ @@devices = {} -+ -+ def self.all_devices -+ @@devices.values -+ end -+ -+ def self.[](device) -+ raise NoSuchDeviceError unless @@devices.has_key?(device) -+ -+ @@devices[device] -+ end -+ -+ attr_reader :device -+ -+ def initialize(device) -+ @device = device -+ @@devices[device] = self -+ end -+end -+ -+class RemovableBlockDevice -+ @@devices = {} -+ -+ def self.all_devices -+ @@devices.values -+ end -+ -+ def self.[](device) -+ raise NoSuchDeviceError unless @@devices.has_key?(device) -+ -+ @@devices[device] -+ end -+ -+ attr_reader :device, :type -+ -+ def initialize(device, type) -+ @device = device -+ @type = type -+ -+ @@devices[device] = self -+ end -+end -+ -+# Detect and instantiate all fixed and removable block devices in the system -+begin -+ # Look for block devices -+ # Specifically, we look for entries in /sys/block which have a device -+ # symlink and no entries in their slaves subdirectory -+ Dir.foreach('/sys/block') { |dev| -+ next if dev == '.' || dev == '..' -+ -+ # Skip if there's no device link -+ next unless File.exists?("/sys/block/#{dev}/device") -+ -+ # Skip if the slaves subdirectory contains anything other than . and -+ # .. -+ begin -+ next if Dir.entries("/sys/block/#{dev}/slaves").length > 2 -+ rescue Errno::ENOENT => ex -+ # This shouldn't happen, but if it did I guess it would mean -+ # there are no slave devices -+ end -+ -+ # We've got a real block device. Check if it's removable or not -+ File.open("/sys/block/#{dev}/removable") { |fd| -+ removable = fd.gets.chomp -+ if removable == "0" then -+ FixedBlockDevice.new(dev) -+ else -+ # Look in device/modalias to work out what kind of removable -+ # device this is -+ type = File.open( -+ "/sys/block/#{dev}/device/modalias") \ -+ { |modalias_f| -+ modalias = modalias_f.gets.chomp -+ if modalias =~ /floppy/ then -+ 'floppy' -+ elsif modalias =~ /cdrom/ then -+ 'cdrom' -+ else -+ # We don't know what this is, ignore it -+ end -+ } -+ -+ RemovableBlockDevice.new(dev, type) unless type.nil? -+ end -+ } -+ } -+end -+ -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/connection.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/connection.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/connection.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/connection.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,320 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'rubygems' -+require 'net/ssh' -+require 'thread' -+require 'yaml' -+ -+require 'virt-p2v/gtk-queue' -+ -+module VirtP2V -+ -+class Connection -+ include GetText -+ -+ attr_reader :connected -+ -+ class InvalidHostnameError < StandardError; end -+ class InvalidCredentialsError < StandardError; end -+ class TransportError < StandardError; end -+ class NoP2VError < StandardError; end -+ class RemoteError < StandardError; end -+ class ProtocolError < StandardError; end -+ class NotConnectedError < StandardError; end -+ -+ def on_connect(&cb) -+ @connection_listeners << cb -+ end -+ -+ def initialize(hostname, username, password, &cb) -+ @mutex = Mutex.new -+ @connection_listeners = [] -+ -+ # Always send our version number on connection -+ @connection_listeners << Proc.new { |cb| -+ self.version { |result| cb.call(result) } -+ } -+ -+ run(cb) { -+ error = nil -+ begin -+ @ssh = Net::SSH.start(hostname, username, :password => password) -+ rescue SocketError, Errno::EHOSTUNREACH => ex -+ raise InvalidHostnameError -+ raise ex -+ rescue Net::SSH::AuthenticationFailed => ex -+ raise InvalidCredentialsError -+ raise ex -+ end -+ -+ @buffer = "" -+ @connected = false -+ -+ Gtk.queue { cb.call(true) } -+ } -+ end -+ -+ def connect(&cb) -+ run(cb) { -+ @ch = @ssh.open_channel do |ch| -+ ch.exec("virt-p2v-server") do |ch, success| -+ raise RemoteError, -+ "could not execute a remote command" unless success -+ -+ ch.on_data do |ch, data| -+ @buffer << data -+ end -+ -+ # If we get anything on stderr, raise it as a RemoteError -+ ch.on_extended_data do |ch, type, data| -+ close -+ raise RemoteError, data -+ end -+ -+ # Clean up local resources if we get eof from the other end -+ ch.on_eof do |ch| -+ close -+ end -+ -+ @connected = true -+ end -+ -+ end -+ -+ # Wait until we're connected -+ @ssh.loop do -+ !@connected -+ end -+ -+ i = 0; -+ listener_result = lambda { |result| -+ if result.kind_of?(Exception) -+ cb.call(result) -+ else -+ i += 1 -+ if i == @connection_listeners.length -+ cb.call(true) -+ else -+ Gtk.queue { -+ @connection_listeners[i].call(listener_result) -+ } -+ end -+ end -+ } -+ Gtk.queue { @connection_listeners[0].call(listener_result) } -+ } -+ end -+ -+ def close -+ @connected = false -+ @buffer = "" -+ @ch.close -+ end -+ -+ def version(&cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("VERSION 0\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def lang(lang, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("LANG #{lang}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def metadata(meta, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ payload = YAML::dump(meta) -+ @ch.send_data("METADATA #{payload.length}\n"); -+ @ch.send_data(payload) -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def path(length, path, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("PATH #{length} #{path}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def convert(&cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("CONVERT\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def list_profiles(&cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("LIST_PROFILES\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def set_profile(profile, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("SET_PROFILE #{profile}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def container(type, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("CONTAINER #{type}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def send_data(io, length, progress, &completion) -+ raise NotConnectedError unless @connected -+ -+ run(completion) { -+ @ch.send_data("DATA #{length}\n") -+ total = 0 -+ buffer = '' -+ begin -+ # This loop is in the habit of hanging in Net::SSH when sending -+ # a chunk larger than about 2M. Putting the 1 second wait -+ # timeout here kickstarts it if it stops. -+ @ssh.loop(1) { -+ if io.eof? || total == length then -+ false -+ else -+ if @ch.remote_window_size > 0 then -+ out = length - total -+ out = @ch.remote_window_size \ -+ if out > @ch.remote_window_size -+ -+ io.read(out, buffer) -+ @ch.send_data(buffer) -+ -+ total += buffer.length -+ -+ # Send a progress callback -+ Gtk.queue { progress.call(total) } -+ end -+ -+ true -+ end -+ } -+ rescue => ex -+ Gtk.queue { completion.call(ex) } -+ end -+ -+ result = parse_return -+ -+ Gtk.queue { completion.call(result) } -+ } -+ end -+ -+ private -+ -+ def run(cb) -+ # Run the given block in a new thread -+ t = Thread.new { -+ begin -+ # We can't run more than 1 command simultaneously -+ @mutex.synchronize { yield } -+ rescue => ex -+ # Deliver exceptions to the caller, then re-raise them -+ Gtk.queue { cb.call(ex) } -+ raise ex -+ end -+ } -+ t.priority = 1 -+ end -+ -+ # Return a single line of output from the remote server -+ def readline -+ # Run the event loop until the buffer contains a newline -+ index = nil -+ @ssh.loop do -+ if !@ch.eof? then -+ index = @buffer.index("\n") -+ index.nil? -+ else -+ close -+ raise RemoteError, _('Server closed connection unexpectedly') -+ end -+ end -+ -+ # Remove the line from the buffer and return it with the trailing -+ # newline removed -+ @buffer.slice!(0..index).chomp -+ end -+ -+ def parse_return -+ line = readline -+ line =~ /^(OK|ERROR|LIST)(?:\s(.*))?$/ or -+ raise ProtocolError, "Invalid server response: #{line}" -+ -+ return true if $~[1] == 'OK' -+ if $~[1] == 'ERROR' then -+ close -+ raise RemoteError, $~[2] -+ end -+ -+ # LIST response. Get the number of items, and read that many lines -+ n = Integer($~[2]) -+ ret = [] -+ while n > 0 do -+ n -= 1 -+ ret.push(readline) -+ end -+ -+ ret -+ end -+end -+ -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/converter.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/converter.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/converter.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/converter.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,218 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'rexml/document' -+include REXML -+ -+require 'virt-p2v/netdevice' -+require 'virt-p2v/blockdevice' -+ -+module VirtP2V -+ -+# NIC -+# hostname -+# username -+# password -+ -+# name User entry -+# memory Editable -+# cpus Editable -+# arch Detected: cpuflags contains lm (long mode) -+# features Detected: apic, acpi, pae -+# disks Editable, default to all -+# device Detected -+# path Detected -+# is_block 1 -+# format raw -+# removables Editable, default to all -+# device Detected -+# type Detected -+# nics Editable, default to all connected -+# mac Detected, option to generate new -+# vnet Set to nic name -+# vnet_type bridge -+ -+class Converter -+ include GetText -+ -+ attr_accessor :profile, :name, :cpus, :memory, :arch -+ attr_reader :features, :disks, :removables, :nics -+ -+ attr_reader :connection -+ -+ def on_connection(&cb) -+ @connection_listeners << cb -+ end -+ -+ def connection=(connection) -+ @connection = connection -+ @connection_listeners.each { |cb| -+ cb.call(connection) -+ } -+ end -+ -+ def convert(status, progress, &completion) -+ iterate([ -+ lambda { |cb| @connection.set_profile(@profile, &cb) }, -+ lambda { |cb| @connection.metadata(meta, &cb) }, -+ lambda { |cb| -+ iterate(@disks.map { |dev| -+ lambda { |cb2| -+ disk(dev, status, progress, cb2) -+ } -+ }, cb) -+ }, -+ lambda { |cb| -+ status.call(_('Converting')) -+ @connection.convert(&cb) -+ } -+ ], completion) -+ end -+ -+ private -+ -+ def initialize() -+ @profile = nil -+ @connection = nil -+ @connection_listeners = [] -+ -+ # Initialize basic system information -+ @name = '' # There's no reasonable default for this -+ -+ # Get total memory from /proc/meminfo -+ File.open('/proc/meminfo', 'r') do |fd| -+ fd.each { |line| -+ next unless line =~ /^MemTotal:\s+(\d+)\b/ -+ -+ @memory = Integer($~[1]) * 1024 -+ break -+ } -+ end -+ -+ # Get the total number of cpu threads from hwloc-info -+ hwloc = Document.new `hwloc-info --of xml` -+ @cpus = XPath.match(hwloc, "//object[@type='PU']").length -+ -+ # Get cpu architecture and features from the first flags entry in -+ # /proc/cpuinfo -+ File.open('/proc/cpuinfo', 'r') do |fd| -+ fd.each { |line| -+ next unless line =~ /^flags\s*:\s(.*)$/ -+ -+ flags = $~[1] -+ -+ # x86_64 if flags contains lm (long mode), i686 otherwise. We -+ # don't support anything else. -+ @arch = flags =~ /\blm\b/ ? 'x86_64' : 'i686' -+ -+ # Pull some select features from cpu flags -+ @features = [] -+ [ 'apic', 'acpi', 'pae' ].each { |f| -+ @features << f if flags =~ /\b#{f}\b/ -+ } -+ break -+ } -+ end -+ -+ # Initialise empty lists for optional devices. These will be added -+ # according to the user's selection -+ @disks = [] -+ @removables = [] -+ @nics = [] -+ end -+ -+ def disk(dev, status, progress, completion) -+ path = "/dev/#{dev}" -+ # XXX: No error checking of blockdev execution -+ size = Integer(`blockdev --getsize64 #{path}`.chomp) -+ status.call(_("Transferring #{dev}")) -+ iterate([ -+ lambda { |cb| @connection.path(size, path, &cb) }, -+ lambda { |cb| @connection.container('RAW', &cb) }, -+ lambda { |cb| -+ io = nil -+ begin -+ io = File.new(path, 'r') -+ rescue => ex -+ cb.call(ex) -+ end -+ pc = 0 -+ @connection.send_data(io, size, lambda { |total| -+ npc = Float(total) * 100 / size -+ # Only update the progress if it has increased by -+ # at least 1% -+ if Integer(npc) > pc then -+ pc += 1 -+ progress.call(dev, pc) -+ end -+ }, &cb) -+ } -+ ], completion) -+ end -+ -+ def iterate(stages, completion) -+ i = 0 -+ cb = lambda { |result| -+ if result.kind_of?(Exception) then -+ completion.call(result) -+ else -+ i += 1 -+ if i == stages.length then -+ completion.call(true) -+ else -+ stages[i].call(cb) -+ end -+ end -+ } -+ stages[0].call(cb) -+ end -+ -+ def meta -+ { -+ 'name' => @name, -+ 'cpus' => @cpus, -+ 'memory' => @memory, -+ 'arch' => @arch, -+ 'features' => @features, -+ 'disks' => @disks.map { |device| -+ { -+ 'device' => device, -+ 'path' => "/dev/#{device}", -+ 'is_block' => '1', -+ 'format' => 'raw' -+ } -+ }, -+ 'removables' => @removables.map { |device| -+ removable = RemovableBlockDevice[device] -+ { -+ 'device' => removable.device, -+ 'type' => removable.type -+ } -+ }, -+ 'nics' => @nics.map { |device| -+ nic = NetworkDevice[device] -+ { -+ 'mac' => nic.mac, -+ 'vnet' => nic.name, -+ 'vnet_type' => 'bridge' -+ } -+ } -+ } -+ end -+end -+ -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/gtk-queue.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/gtk-queue.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/gtk-queue.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/gtk-queue.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,52 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+# This code is taken from: -+# http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_threads -+# The author of the above page is given as Tal Liron -+# The above page is distributed under the terms of the GNU FDL, although I -+# consider this code to be too trivial to be copyrightable -+ -+require 'gtk2' -+require 'thread' -+ -+module Gtk -+ GTK_PENDING_BLOCKS = [] -+ GTK_PENDING_BLOCKS_LOCK = Mutex.new -+ -+ def Gtk.queue &block -+ if Thread.current == Thread.main -+ block.call -+ else -+ GTK_PENDING_BLOCKS_LOCK.synchronize do -+ GTK_PENDING_BLOCKS << block -+ end -+ end -+ end -+ -+ def Gtk.main_with_queue timeout -+ Gtk.timeout_add timeout do -+ GTK_PENDING_BLOCKS_LOCK.synchronize do -+ for block in GTK_PENDING_BLOCKS -+ block.call -+ end -+ GTK_PENDING_BLOCKS.clear -+ end -+ true -+ end -+ Gtk.main -+ end -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/netdevice.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/netdevice.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/netdevice.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/netdevice.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,259 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'dbus' -+require 'gettext' -+ -+module VirtP2V -+ -+class NetworkDevice -+ include GetText -+ -+ attr_reader :name, :mac, :connected, :activated, :state -+ -+ # Some NetworkManager names, for convenience -+ CONNECTION = 'org.freedesktop.NetworkManagerSettings.Connection'.freeze -+ DEVICE = 'org.freedesktop.NetworkManager.Device'.freeze -+ NETWORKMANAGER = 'org.freedesktop.NetworkManager'.freeze -+ PROPERTIES = 'org.freedesktop.DBus.Properties'.freeze -+ SETTINGS = 'org.freedesktop.NetworkManagerSettings'.freeze -+ WIRED = 'org.freedesktop.NetworkManager.Device.Wired'.freeze -+ -+ # NetworkManager device types -+ # http://projects.gnome.org/NetworkManager/developers/spec-08.html -+ TYPE_UNKNOWN = 0 -+ TYPE_ETHERNET = 1 -+ TYPE_WIFI = 2 -+ TYPE_GSM = 3 -+ TYPE_CDMA = 4 -+ -+ # NetworkManager device states -+ STATE_UNKNOWN = 0 -+ STATE_UNMANAGED = 1 -+ STATE_UNAVAILABLE = 2 -+ STATE_DISCONNECTED = 3 -+ STATE_PREPARE = 4 -+ STATE_CONFIG = 5 -+ STATE_NEED_AUTH = 6 -+ STATE_IP_CONFIG = 7 -+ STATE_ACTIVATED = 8 -+ STATE_FAILED = 9 -+ -+ # Human readable descriptions of NetworkManager Device States -+ STATES = { -+ 0 => _('Unknown').freeze, # For completeness -+ 1 => _('Unmanaged').freeze, # For completeness -+ 2 => _('No cable connected').freeze, -+ 3 => _('Not connected').freeze, -+ 4 => _('Preparing to connect').freeze, -+ 5 => _('Configuring').freeze, -+ 6 => _('Waiting for authentication').freeze, -+ 7 => _('Obtaining an IP address').freeze, -+ 8 => _('Connected').freeze, -+ 9 => _('Connection failed').freeze -+ }.freeze -+ -+ def initialize(obj, device, props) -+ device.default_iface = WIRED -+ -+ @nm_obj = obj -+ @name = props.Get(DEVICE, 'Interface')[0] -+ @mac = props.Get(WIRED, 'HwAddress')[0] -+ state = props.Get(WIRED, 'State')[0] -+ -+ # Lookup by name -+ @@devices[@name] = self -+ -+ state_updated(state) -+ -+ # Register a listener for state changes -+ device.on_signal('PropertiesChanged') { |props| -+ if props.has_key?('State') then -+ state_updated(props['State']) -+ -+ # Notify registered state change handlers -+ @@listeners.each { |cb| cb.call(self) } -+ end -+ } -+ end -+ -+ def self.all_devices() -+ @@devices.values -+ end -+ -+ def self.add_listener(cb) -+ @@listeners.push(cb) -+ end -+ -+ def self.[](name) -+ @@devices[name] -+ end -+ -+ def activate(auto, ip, prefix, gateway, dns) -+ # Get an IP config dependent on whether @ip_address is IPv4 or IPv6 -+ ip_config = auto ? get_config_auto : -+ ip.ipv4? ? get_config_ipv4() : get_config_ipv6() -+ -+ # Create a new NetworkManager connection object -+ settings = @@nm_service.object( -+ '/org/freedesktop/NetworkManagerSettings') -+ settings.introspect() -+ settings.default_iface = SETTINGS -+ -+ uuid = `uuidgen`.chomp -+ settings.AddConnection( -+ 'connection' => { -+ 'uuid' => uuid, -+ 'id' => 'P2V', -+ 'type' => '802-3-ethernet', -+ 'autoconnect' => false -+ }, -+ '802-3-ethernet' => {}, -+ 'ipv4' => ip_config['ipv4'], -+ 'ipv6' => ip_config['ipv6'] -+ ) -+ -+ # Find the connection we just created -+ # XXX: There must be a better way to get this! -+ conn = settings.ListConnections()[0].each { |i| -+ conn = @@nm_service.object(i) -+ conn.introspect -+ conn.default_iface = CONNECTION -+ -+ break i if conn.GetSettings()[0]['connection']['uuid'] == uuid -+ } -+ -+ nm = @@nm_service.object('/org/freedesktop/NetworkManager') -+ nm.introspect -+ nm.default_iface = NETWORKMANAGER -+ nm.ActivateConnection('org.freedesktop.NetworkManagerSystemSettings', -+ conn, @nm_obj, '/') -+ end -+ -+ private -+ -+ def state_updated(state) -+ @connected = state > 2 -+ @state = STATES[state] -+ -+ if state == STATE_ACTIVATED then -+ @activated = true -+ elsif state == STATE_FAILED then -+ @activated = false -+ else -+ @activated = nil -+ end -+ end -+ -+ def get_config_auto -+ { -+ 'ipv4' => { -+ 'method' => 'auto' -+ }, -+ 'ipv6' => { -+ 'method' => 'ignore' -+ } -+ } -+ end -+ -+ def ipv4_to_nm(ipaddr) -+ ipaddr.hton().unpack("I")[0] -+ end -+ -+ def get_config_ipv4 -+ addresses = [[ ipv4_to_nm(@ip_address), @ip_prefix, -+ ipv4_to_nm(@ip_gateway) ]] -+ -+ dns = [] -+ @ip_dns.each{ |ipaddr| -+ # Only use IPv4 DNS servers -+ next unless ipaddr.ipv4? -+ dns.push(ipv4_to_nm(ipaddr)) -+ } -+ -+ { -+ 'ipv4' => { -+ 'method' => 'manual', -+ 'addresses' => [ 'aau', addresses ], -+ 'dns' => [ 'au', dns ] -+ }, -+ 'ipv6' => { -+ 'method' => 'ignore' -+ } -+ } -+ end -+ -+ def ipv6_to_nm(ipaddr) -+ ipaddr.hton().unpack("c*") -+ end -+ -+ def get_config_ipv6 -+ dns = [] -+ @ip_dns.each { |ipaddr| -+ # Only use IPv6 DNS servers -+ next unless ipaddr.ipv6? -+ dns.push(ipv6_to_nm(ipaddr)) -+ } -+ -+ { -+ 'ipv4' => { -+ 'method' => 'disabled' -+ }, -+ 'ipv6' => { -+ 'method' => 'manual', -+ 'addresses' => [ 'a(ayu)', [[ -+ ipv6_to_nm(@ip_address), -+ @ip_prefix -+ ]] ], -+ 'routes' => [ 'a(ayuayu)', [[ -+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], 0, -+ ipv6_to_nm(@ip_gateway), 1024 -+ ]] ], -+ 'dns' => [ 'aay', dns ] -+ } -+ } -+ end -+ -+ # Class initialization -+ begin -+ dbus = DBus::SystemBus.instance() -+ dbus.glibize() -+ @@nm_service = dbus.service(NETWORKMANAGER) -+ -+ nm = @@nm_service.object('/org/freedesktop/NetworkManager') -+ nm.introspect -+ nm.default_iface = NETWORKMANAGER -+ -+ @@devices = {} -+ nm.GetDevices()[0].each { |obj| -+ device = @@nm_service.object(obj) -+ device.introspect -+ -+ props = device[PROPERTIES] -+ type = props.Get(DEVICE, 'DeviceType')[0] -+ -+ # We only support ethernet devices -+ next unless type == TYPE_ETHERNET -+ -+ # Constructor will add it to @@devices -+ self.new(obj, device, props) -+ } -+ -+ @@listeners = [] -+ end -+end -+ -+end #module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/connect.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/connect.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/connect.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/connect.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,179 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'gtk2' -+ -+require 'virt-p2v/connection' -+ -+module VirtP2V::UI::Connect -+ include GetText -+ -+ UI_STATE_INVALID = 0 -+ UI_STATE_VALID = 1 -+ UI_STATE_ACTIVATING = 2 -+ UI_STATE_COMPLETE = 3 -+ -+ EV_HOSTNAME = 0 -+ EV_USERNAME = 1 -+ EV_PASSWORD = 2 -+ EV_BUTTON = 3 -+ EV_ACTIVATION = 4 -+ -+ def self.event(event, status) -+ case event -+ when EV_HOSTNAME -+ @hostname = status -+ when EV_USERNAME -+ @username = status -+ when EV_PASSWORD -+ @password = status -+ when EV_BUTTON, EV_ACTIVATION -+ # Persistent state not required -+ else -+ raise "Unexpected event: #{event}" -+ end -+ -+ valid = @hostname && @username && @password -+ -+ case @state -+ when UI_STATE_INVALID -+ set_state(UI_STATE_VALID) if valid -+ when UI_STATE_VALID -+ if !valid then -+ set_state(UI_STATE_INVALID) -+ elsif event == EV_BUTTON -+ set_state(UI_STATE_ACTIVATING) -+ end -+ when UI_STATE_ACTIVATING -+ # UI is disabled, so we shouldn't be getting any events other than -+ # EV_ACTIVATION -+ raise "Unexpected event: #{event}" unless event == EV_ACTIVATION -+ -+ set_state(status ? UI_STATE_COMPLETE : UI_STATE_VALID) -+ else -+ raise "Unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.init(ui, converter) -+ @hostname_ui = ui.get_object('server_hostname') -+ @username_ui = ui.get_object('server_username') -+ @password_ui = ui.get_object('server_password') -+ @connect_frame = ui.get_object('connect_frame') -+ @connect_button = ui.get_object('connect_button') -+ @connect_error = ui.get_object('connect_error') -+ -+ ui.register_handler('server_hostname_changed', -+ method(:server_hostname_changed)) -+ ui.register_handler('server_username_changed', -+ method(:server_username_changed)) -+ ui.register_handler('server_password_changed', -+ method(:server_password_changed)) -+ ui.register_handler('connect_button_clicked', -+ method(:connect_button_clicked)) -+ -+ @hostname = @hostname_ui.text.strip.length > 0 -+ @username = @username_ui.text.strip.length > 0 -+ @password = @password_ui.text.length > 0 # Allow spaces in passwords -+ @state = UI_STATE_INVALID -+ -+ @ui = ui -+ @converter = converter -+ end -+ -+ def self.set_state(state) -+ # Don't do anything if state hasn't changed -+ return if state == @state -+ -+ case state -+ when UI_STATE_INVALID -+ @connect_frame.sensitive = true -+ @connect_button.sensitive = false -+ -+ @state = UI_STATE_INVALID -+ when UI_STATE_VALID -+ @connect_frame.sensitive = true -+ @connect_button.sensitive = true -+ -+ @state = UI_STATE_VALID -+ when UI_STATE_ACTIVATING -+ @connect_frame.sensitive = false -+ @connect_button.sensitive = false -+ @connect_error.text = '' -+ -+ @state = UI_STATE_ACTIVATING -+ when UI_STATE_COMPLETE -+ # Activate the next page -+ @ui.active_page = 'conversion_win' -+ -+ # ... then leave this one as we hope to find it if we come back here -+ set_state(UI_STATE_VALID) -+ else -+ raise "Attempt to set unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.server_hostname_changed -+ event(EV_HOSTNAME, @hostname_ui.text.strip.length > 0) -+ end -+ -+ def self.server_username_changed -+ event(EV_USERNAME, @username_ui.text.strip.length > 0) -+ end -+ -+ def self.server_password_changed -+ event(EV_PASSWORD, @password_ui.text.length > 0) -+ end -+ -+ def self.connect_button_clicked -+ event(EV_BUTTON, true) -+ -+ hostname = @hostname_ui.text.strip -+ username = @username_ui.text.strip -+ password = @password_ui.text -+ connection = VirtP2V::Connection.new(hostname, username, password) \ -+ { |result| -+ case result -+ when true -+ @converter.connection = connection -+ connection.connect { |result| -+ case result -+ when true -+ event(EV_ACTIVATION, true) -+ when VirtP2V::Connection::RemoteError -+ @connect_error.text = _('Failed to start ' + -+ 'virt-p2v-server on remote ' + -+ 'server') -+ event(EV_ACTIVATION, false) -+ else -+ @connect_error.text = result.message -+ event(EV_ACTIVATION, false) -+ end -+ } -+ when VirtP2V::Connection::InvalidHostnameError -+ @connect_error.text = _"Unable to connect to #{hostname}" -+ event(EV_ACTIVATION, false) -+ when VirtP2V::Connection::InvalidCredentialsError -+ @connect_error.text = _"Invalid username/password" -+ event(EV_ACTIVATION, false) -+ else -+ raise result -+ end -+ } -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/convert.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/convert.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/convert.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/convert.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,422 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'gtk2' -+ -+require 'virt-p2v/blockdevice' -+require 'virt-p2v/netdevice' -+ -+module VirtP2V::UI::Convert -+ include GetText -+ -+ CONVERT_PROFILE_NAME = 0 -+ -+ CONVERT_NETWORK_CONVERT = 0 -+ CONVERT_NETWORK_DEVICE = 1 -+ -+ CONVERT_FIXED_CONVERT = 0 -+ CONVERT_FIXED_DEVICE = 1 -+ CONVERT_FIXED_PROGRESS = 2 -+ -+ CONVERT_REMOVABLE_CONVERT = 0 -+ CONVERT_REMOVABLE_DEVICE = 1 -+ CONVERT_REMOVABLE_TYPE = 2 -+ -+ UI_STATE_INVALID = 0 -+ UI_STATE_VALID = 1 -+ UI_STATE_CONNECTING = 2 -+ UI_STATE_CONVERTING = 3 -+ UI_STATE_COMPLETE = 4 -+ -+ EV_VALID = 0 -+ EV_BUTTON = 1 -+ EV_CONNECTION = 2 -+ EV_CONVERTED = 3 -+ -+ def self.init(ui, converter) -+ # ListStores -+ @profiles = ui.get_object('convert_profile_list') -+ @nics = ui.get_object('convert_network_list') -+ @fixeds = ui.get_object('convert_fixed_list') -+ @removables = ui.get_object('convert_removable_list') -+ -+ # Widgets -+ @profile = ui.get_object('convert_profile') -+ @name = ui.get_object('convert_name') -+ @cpus = ui.get_object('convert_cpus') -+ @memory = ui.get_object('convert_memory') -+ @editable = ui.get_object('convert_editable') -+ @button = ui.get_object('convert_button') -+ @status = ui.get_object('convert_status') -+ -+ # Get initial values from converter -+ @name.text = converter.name -+ @cpus.text = converter.cpus.to_s -+ @memory.text = (converter.memory / 1024 / 1024).to_s -+ -+ # Populate profiles on connection -+ converter.on_connection { |conn| -+ conn.on_connect { |cb| -+ conn.list_profiles { |profiles| -+ cb.call(RuntimeError.new(_('Remote server does not ' + -+ 'define any profiles in ' + -+ '/etc/virt-v2v.conf'))) \ -+ if profiles.kind_of?(Exception) or profiles.empty? -+ -+ selected = @profile.active_iter -+ selected = selected[CONVERT_PROFILE_NAME] \ -+ unless selected.nil? -+ -+ @profiles.clear -+ profiles.each { |i| -+ profile = @profiles.append -+ profile[CONVERT_PROFILE_NAME] = i -+ @profile.active_iter = profile if i == selected -+ } -+ -+ cb.call(true) -+ } -+ } -+ } -+ -+ VirtP2V::FixedBlockDevice.all_devices.each { |dev| -+ fixed = @fixeds.append -+ fixed[CONVERT_FIXED_CONVERT] = true -+ fixed[CONVERT_FIXED_DEVICE] = dev.device -+ fixed[CONVERT_FIXED_PROGRESS] = 0 -+ } -+ -+ VirtP2V::RemovableBlockDevice.all_devices.each { |dev| -+ rem = @removables.append -+ rem[CONVERT_REMOVABLE_CONVERT] = true -+ rem[CONVERT_REMOVABLE_DEVICE] = dev.device -+ rem[CONVERT_REMOVABLE_TYPE] = dev.type -+ } -+ -+ VirtP2V::NetworkDevice.all_devices.each { |dev| -+ nic = @nics.append -+ nic[CONVERT_NETWORK_CONVERT] = dev.connected -+ nic[CONVERT_NETWORK_DEVICE] = dev.name -+ } -+ -+ # Event handlers -+ ui.register_handler('convert_profile_changed', -+ method(:update_values)) -+ ui.register_handler('convert_name_changed', -+ method(:update_values)) -+ ui.register_handler('convert_cpus_changed', -+ method(:convert_cpus_changed)) -+ ui.register_handler('convert_memory_changed', -+ method(:convert_memory_changed)) -+ ui.register_handler('convert_fixed_list_row_changed', -+ method(:convert_fixed_list_row_changed)) -+ ui.register_handler('convert_removable_list_row_changed', -+ method(:update_values)) -+ ui.register_handler('convert_network_list_row_changed', -+ method(:update_values)) -+ ui.register_handler('convert_fixed_select_toggled', -+ method(:convert_fixed_select_toggled)) -+ ui.register_handler('convert_removable_select_toggled', -+ method(:convert_removable_select_toggled)) -+ ui.register_handler('convert_network_select_toggled', -+ method(:convert_network_select_toggled)) -+ ui.register_handler('convert_button_clicked', -+ method(:convert_button_clicked)) -+ -+ @state = nil -+ set_state(UI_STATE_INVALID) -+ update_values -+ -+ @ui = ui -+ @converter = converter -+ end -+ -+ def self.event(event, status) -+ case @state -+ when UI_STATE_INVALID -+ case event -+ when EV_VALID -+ set_state(UI_STATE_VALID) if status -+ else -+ raise "Unexpected event: #{@state} #{event}" -+ end -+ when UI_STATE_VALID -+ case event -+ when EV_VALID -+ set_state(UI_STATE_INVALID) if !status -+ when EV_BUTTON -+ if @converter.connection.connected then -+ set_state(UI_STATE_CONVERTING) -+ convert -+ else -+ set_state(UI_STATE_CONNECTING) -+ reconnect -+ end -+ else -+ raise "Unexpected event: #{@state} #{event}" -+ end -+ when UI_STATE_CONNECTING -+ case event -+ when EV_CONNECTION -+ if status then -+ set_state(UI_STATE_CONVERTING) -+ convert -+ else -+ set_state(UI_STATE_VALID) -+ end -+ when EV_VALID -+ # update_values will be called when the profile list is cleared -+ # and repopulated during connection. Untidy, but ignore it. -+ else -+ raise "Unexpected event: #{@state} #{event}" \ -+ unless event == EV_CONNECTION -+ end -+ when UI_STATE_CONVERTING -+ case event -+ when EV_CONVERTED -+ if status then -+ set_state(UI_STATE_COMPLETE) -+ else -+ set_state(UI_STATE_VALID) -+ end -+ when EV_VALID -+ # update_values will be called when the list stores are updated. -+ # Untidy, but ignore it -+ else -+ raise "Unexpected event: #{@state} #{event}" -+ end -+ else -+ raise "Unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.set_state(state) -+ # Don't do anything if state hasn't changed -+ return if state == @state -+ @state = state -+ -+ case @state -+ when UI_STATE_INVALID -+ @editable.sensitive = true -+ @button.sensitive = false -+ when UI_STATE_VALID -+ @editable.sensitive = true -+ @button.sensitive = true -+ when UI_STATE_CONNECTING -+ @status.text = _'Failed to start virt-p2v-server on remote server' -+ @editable.sensitive = false -+ @button.sensitive = false -+ when UI_STATE_CONVERTING -+ @editable.sensitive = false -+ @button.sensitive = false -+ when UI_STATE_COMPLETE -+ @ui.active_page = 'success_win' -+ -+ # ... then leave this one as we hope to find it if we come back here -+ set_state(UI_STATE_VALID) -+ else -+ raise "Attempt to set unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.convert -+ @converter.convert( -+ # status -+ lambda { |msg| -+ @status.text = msg -+ }, -+ # progress -+ lambda { |dev, progress| -+ @fixeds.each { |model, path, iter| -+ next unless iter[CONVERT_FIXED_DEVICE] == dev -+ -+ iter[CONVERT_FIXED_PROGRESS] = progress -+ break -+ } -+ } -+ ) { |result| -+ # N.B. Explicit test against true is required here, as result may be -+ # an Exception, which would also return true if evaluated alone -+ if result == true then -+ @status.text = '' -+ event(EV_CONVERTED, true) -+ else -+ @status.text = result.message -+ event(EV_CONVERTED, false) -+ end -+ } -+ end -+ -+ def self.reconnect -+ @status.text = _('Reconnecting') -+ @converter.connection.connect { |result| -+ if result == true then -+ event(EV_CONNECTION, true) -+ else -+ @status.text = -+ _'Failed to start virt-p2v-server on remote server' -+ event(EV_CONNECTION, false) -+ end -+ } -+ end -+ -+ def self.convert_fixed_list_row_changed(model, path, iter) -+ update_values -+ end -+ -+ class InvalidUIState < StandardError; end -+ -+ def self.update_values -+ valid = nil -+ begin -+ # Check there's a profile selected -+ profile = @profile.active_iter -+ raise InvalidUIState if profile.nil? -+ @converter.profile = profile[CONVERT_PROFILE_NAME] -+ -+ # Check there's a name set -+ name = @name.text -+ raise InvalidUIState if name.nil? || name.strip.length == 0 -+ @converter.name = name -+ -+ # Check cpus and memory are set and numeric -+ cpus = @cpus.text -+ raise InvalidUIState if cpus.nil? -+ cpus = Integer(cpus) rescue nil -+ raise InvalidUIState if cpus.nil? -+ @converter.cpus = cpus -+ -+ memory = @memory.text -+ raise InvalidUIState if memory.nil? -+ memory = Integer(memory) rescue nil -+ raise InvalidUIState if memory.nil? -+ @converter.memory = memory * 1024 * 1024 -+ -+ # Check that at least 1 fixed storage device is selected -+ fixed = false -+ @converter.disks.clear -+ @fixeds.each { |model, path, iter| -+ if iter[CONVERT_FIXED_CONVERT] then -+ fixed = true -+ @converter.disks << iter[CONVERT_FIXED_DEVICE] -+ end -+ } -+ raise InvalidUIState unless fixed -+ -+ # Populate removables and nics, although these aren't required to be -+ # selected for the ui state to be valid -+ @converter.removables.clear -+ @removables.each { |model, path, iter| -+ if iter[CONVERT_REMOVABLE_CONVERT] then -+ @converter.removables << iter[CONVERT_REMOVABLE_DEVICE] -+ end -+ } -+ @converter.nics.clear -+ @nics.each { |model, path, iter| -+ if iter[CONVERT_NETWORK_CONVERT] then -+ @converter.nics << iter[CONVERT_NETWORK_DEVICE] -+ end -+ } -+ rescue InvalidUIState -+ valid = false -+ end -+ valid = true if valid.nil? -+ -+ event(EV_VALID, valid) -+ end -+ -+ def self.valid? -+ # Check there's a profile selected -+ profile = @profile.active_iter -+ return false if profile.nil? -+ -+ # Check there's a name set -+ name = @name.text -+ return false if name.nil? -+ return false unless name.strip.length > 0 -+ -+ # Check cpus and memory are set and numeric -+ cpus = @cpus.text -+ return false if cpus.nil? -+ cpus = Integer(cpus) rescue nil -+ return false if cpus.nil? -+ -+ memory = @memory.text -+ return false if memory.nil? -+ memory = Integer(memory) rescue nil -+ return false if memory.nil? -+ -+ # Check that at least 1 fixed storage device is selected -+ fixed = false -+ @fixeds.each { |model, path, iter| -+ if iter[CONVERT_FIXED_CONVERT] then -+ fixed = true -+ break -+ end -+ } -+ return false unless fixed -+ -+ return true -+ end -+ -+ def self.convert_cpus_changed -+ check_numeric(@cpus) -+ end -+ -+ def self.convert_memory_changed -+ check_numeric(@memory) -+ end -+ -+ def self.check_numeric(widget) -+ value = widget.text -+ if value.nil? ? false : begin -+ value = Integer(value) -+ value > 0 -+ rescue -+ false -+ end -+ then -+ widget.secondary_icon_name = nil -+ else -+ widget.secondary_icon_name = 'gtk-dialog-warning' -+ widget.secondary_icon_tooltip_text = -+ _('Value must be an integer greater than 0') -+ end -+ -+ update_values -+ end -+ -+ def self.convert_fixed_select_toggled(widget, path) -+ iter = @fixeds.get_iter(path) -+ iter[CONVERT_FIXED_CONVERT] = !iter[CONVERT_FIXED_CONVERT] -+ end -+ -+ def self.convert_removable_select_toggled(widget, path) -+ iter = @removables.get_iter(path) -+ iter[CONVERT_REMOVABLE_CONVERT] = !iter[CONVERT_REMOVABLE_CONVERT] -+ end -+ -+ def self.convert_network_select_toggled(widget, path) -+ iter = @nics.get_iter(path) -+ iter[CONVERT_NETWORK_CONVERT] = !iter[CONVERT_NETWORK_CONVERT] -+ end -+ -+ def self.convert_button_clicked -+ event(EV_BUTTON, true) -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/main.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/main.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/main.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/main.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,110 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gtk2' -+require 'virt-p2v/gtk-queue' -+ -+module VirtP2V -+module UI -+ -+class Main -+ def get_object(name) -+ o = @builder.get_object(name) -+ raise "Object #{name} not found in ui" unless o != nil -+ -+ return o -+ end -+ -+ def show -+ @builder.connect_signals { |signal| -+ raise "No hander for signal #{signal}" \ -+ unless @signal_handlers.has_key?(signal) -+ -+ @signal_handlers[signal] -+ } -+ -+ # Display the main window -+ main = self.get_object('main_window') -+ main.show_all() -+ end -+ -+ def register_handler(signal, handler) -+ @signal_handlers[signal] = handler -+ end -+ -+ def main_loop -+ Gtk.main_with_queue 100 -+ end -+ -+ def active_page=(name) -+ raise "Attempt to activate non-existent page #{name}" \ -+ unless @pages.has_key?(name) -+ -+ page = @pages[name] -+ -+ @page_vbox = self.get_object('page_vbox') unless defined? @page_vbox -+ @page_vbox.remove(@selected) if defined? @selected -+ @page_vbox.add(page) -+ @selected = page -+ end -+ -+ def active_page -+ return @selected -+ end -+ -+ def quit -+ Gtk.main_quit() -+ end -+ -+ private -+ -+ def initialize -+ @builder = Gtk::Builder.new() -+ -+ # Find the UI definition in $LOAD_PATH -+ i = $LOAD_PATH.index { |path| -+ File.exists?(path + '/virt-p2v/ui/p2v.ui') -+ } -+ @builder.add_from_file($LOAD_PATH[i] + '/virt-p2v/ui/p2v.ui') -+ -+ @signal_handlers = {} -+ self.register_handler('gtk_main_quit', method(:quit)) -+ -+ # Configure the Wizard page frame -+ # Can't change these colours from glade for some reason -+ self.get_object('title_background'). -+ modify_bg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -+ self.get_object('page_frame'). -+ modify_fg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -+ -+ # Load all pages from glade -+ @pages = {} -+ [ 'network_win', 'server_win', -+ 'conversion_win', 'success_win' ].each { |name| -+ page = self.get_object(name) -+ -+ child = page.children[0] -+ page.remove(child) -+ @pages[name] = child -+ } -+ -+ # Set a default first page -+ self.active_page = 'network_win' -+ end -+end -+ -+end # UI -+end # VirtP2V -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/network.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/network.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/network.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/network.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,317 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'gtk2' -+require 'ipaddr' -+require 'virt-p2v/netdevice' -+ -+module VirtP2V::UI::Network -+ include GetText -+ -+ # The indices of Device List colums, taken from glade -+ DEVCOL_NAME = 0 -+ DEVCOL_MAC = 1 -+ DEVCOL_STATUS = 2 -+ DEVCOL_AVAILABLE = 3 -+ -+ UI_STATE_INVALID = 0 -+ UI_STATE_VALID = 1 -+ UI_STATE_ACTIVATING = 2 -+ UI_STATE_COMPLETE = 3 -+ -+ EV_IP_CONFIG = 0 -+ EV_SELECTION = 1 -+ EV_BUTTON = 2 -+ EV_ACTIVATION = 3 -+ -+ def self.event(event, status) -+ case event -+ when EV_IP_CONFIG -+ @ip_config = status -+ when EV_SELECTION -+ @selected = status -+ when EV_BUTTON, EV_ACTIVATION -+ # Persistent state not required -+ else -+ raise "Unexpected NetworkConfig event: #{event}" -+ end -+ -+ case @state -+ when UI_STATE_INVALID -+ if @ip_config && @selected then -+ set_state(UI_STATE_VALID) -+ end -+ when UI_STATE_VALID -+ if !@ip_config || !@selected then -+ set_state(UI_STATE_INVALID) -+ elsif event == EV_BUTTON -+ set_state(UI_STATE_ACTIVATING) -+ end -+ when UI_STATE_ACTIVATING -+ # UI is disabled and we're waiting for EV_ACTIVATION, but we could -+ # also get events triggered by NetworkManager signals. -+ -+ if event == EV_ACTIVATION then -+ if status then -+ set_state(UI_STATE_COMPLETE) -+ else -+ set_state(UI_STATE_VALID) -+ end -+ elsif !@ip_config || !@selected then -+ set_state(UI_STATE_INVALID) -+ end -+ else -+ raise "Unexpected NetworkConfig UI state: #{@state}" -+ end -+ end -+ -+ def self.init(ui) -+ # Configure initial defaults -+ @manual_mode = false -+ @ip_address = nil -+ @ip_prefix = nil -+ @ip_gateway = nil -+ @ip_dns = nil -+ @state = UI_STATE_INVALID -+ @ip_config = false -+ @selected = false -+ -+ @network_button = ui.get_object('network_button') -+ @device_list_frame = ui.get_object('device_list_frame') -+ @ipv4_config_frame = ui.get_object('ipv4_config_frame') -+ @dl_selection = ui.get_object('network_device_list_view'). -+ selection -+ @device_list = ui.get_object('network_device_list') -+ @manual_ui = ui.get_object('ip_manual') -+ @ip_address_ui = ui.get_object('ip_address') -+ @ip_prefix_ui = ui.get_object('ip_prefix') -+ @ip_gateway_ui = ui.get_object('ip_gateway') -+ @ip_dns_ui = ui.get_object('ip_dns') -+ -+ ui.register_handler('network_button_clicked', -+ method(:network_button_clicked)) -+ ui.register_handler('ip_auto_toggled', -+ method(:ip_auto_toggled)) -+ ui.register_handler('ip_address_changed', -+ method(:ip_address_changed)) -+ ui.register_handler('ip_prefix_changed', -+ method(:ip_prefix_changed)) -+ ui.register_handler('ip_gateway_changed', -+ method(:ip_gateway_changed)) -+ ui.register_handler('ip_dns_changed', -+ method(:ip_dns_changed)) -+ -+ check_config_valid() -+ -+ # The user may only select a single device -+ @dl_selection.mode = Gtk::SELECTION_SINGLE -+ -+ @dl_selection.set_select_function { |selection, model, path, current| -+ iter = model.get_iter(path) -+ -+ # This is a toggle event. The new state is the opposite of the -+ # current state -+ new_state = !current -+ -+ # Don't allow the user to select an unavailable device -+ if new_state then -+ # Notify the config UI if we're selecting a device -+ if iter[DEVCOL_AVAILABLE] then -+ event(EV_SELECTION, true) -+ end -+ -+ iter[DEVCOL_AVAILABLE] -+ -+ # Always allow the user to unselect a device -+ else -+ # Notify the UI that we're unselecting the device -+ event(EV_SELECTION, false) -+ true -+ end -+ } -+ -+ # Store a map of device names to row references -+ refs = {} -+ -+ # Populate the device list with all detected network devices -+ VirtP2V::NetworkDevice.all_devices.each { |device| -+ iter = @device_list.append() -+ -+ iter[DEVCOL_NAME] = device.name -+ iter[DEVCOL_MAC] = device.mac -+ iter[DEVCOL_STATUS] = device.state -+ iter[DEVCOL_AVAILABLE] = device.connected -+ -+ # Store a stable reference to this row in the TreeModel -+ refs[device.name] = -+ Gtk::TreeRowReference.new(@device_list, iter.path) -+ } -+ -+ # Listen for updates to device states -+ VirtP2V::NetworkDevice.add_listener( lambda { |device| -+ path = refs[device.name].path -+ -+ iter = @device_list.get_iter(path) -+ iter[DEVCOL_STATUS] = device.state -+ iter[DEVCOL_AVAILABLE] = device.connected -+ -+ # Notify the UI that a device was activated -+ event(EV_ACTIVATION, device.activated) \ -+ unless device.activated.nil? -+ -+ # Unselect the path if it was previously selected and is no -+ # longer available -+ if !device.connected && @dl_selection.iter_is_selected?(iter) -+ then -+ @dl_selection.unselect_all() -+ event(EV_SELECTION, false) -+ end -+ } ) -+ -+ @ui = ui -+ end -+ -+ def self.set_state(state) -+ # Don't do anything if state hasn't changed -+ return if state == @state -+ -+ case state -+ when UI_STATE_INVALID -+ @network_button.sensitive = false -+ @device_list_frame.sensitive = true -+ @ipv4_config_frame.sensitive = true -+ -+ @state = UI_STATE_INVALID -+ when UI_STATE_VALID -+ @network_button.sensitive = true -+ @device_list_frame.sensitive = true -+ @ipv4_config_frame.sensitive = true -+ -+ @state = UI_STATE_VALID -+ when UI_STATE_ACTIVATING -+ @network_button.sensitive = false -+ @device_list_frame.sensitive = false -+ @ipv4_config_frame.sensitive = false -+ -+ @state = UI_STATE_ACTIVATING -+ when UI_STATE_COMPLETE -+ # Activate the next page -+ @ui.active_page = 'server_win' -+ -+ # ... then leave this one as we hope to find it if we come back here -+ set_state(UI_STATE_VALID) -+ else -+ raise "Attempt to set unexected NetworkConfig UI state: #{@state}" -+ end -+ end -+ -+ def self.network_button_clicked -+ event(EV_BUTTON, true) -+ -+ iter = @dl_selection.selected -+ return if iter.nil? # Shouldn't be possible -+ name = iter[DEVCOL_NAME] -+ -+ VirtP2V::NetworkDevice[name].activate(!@manual_mode, @ip_address, -+ @ip_prefix, @ip_gateway, @ip_dns) -+ end -+ -+ def self.ip_auto_toggled -+ @manual_mode = !@manual_mode -+ @manual_ui.sensitive = @manual_mode -+ -+ check_config_valid() -+ end -+ -+ def self.ip_address_changed -+ @ip_address = parse_ip(@ip_address_ui) -+ -+ check_config_valid() -+ end -+ -+ # Check IP prefix is a positive integer -+ # We check that it's appropriate to the address class in use elsewhere -+ def self.ip_prefix_changed -+ begin -+ @ip_prefix = Integer(@ip_prefix_ui.text) -+ rescue ArgumentError => e -+ # Ignore the result if it didn't parse -+ @ip_prefix = nil -+ return -+ end -+ -+ if @ip_prefix < 0 then -+ @ip_prefix = nil -+ end -+ -+ check_config_valid() -+ end -+ -+ def self.ip_gateway_changed -+ @ip_gateway = parse_ip(@ip_gateway_ui) -+ -+ check_config_valid() -+ end -+ -+ # Parse an IP address understood by IPAddr -+ def self.parse_ip(entry) -+ a = entry.text.strip -+ -+ begin -+ ip = IPAddr.new(a) -+ rescue ArgumentError => e -+ # Ignore the result if it didn't parse -+ ip = nil -+ end -+ -+ return ip -+ end -+ -+ def self.ip_dns_changed -+ dns = @ip_dns_ui.text -+ -+ @ip_dns = [] -+ dns.split(/\s*,+\s*/).each { |entry| -+ begin -+ @ip_dns << IPAddr.new(entry) -+ rescue ArgumentError => e -+ @ip_dns = () -+ break -+ end -+ } -+ end -+ -+ def self.check_config_valid -+ if !@manual_mode || (!@ip_address.nil? && -+ !@ip_prefix.nil? && -+ !@ip_gateway.nil?) then -+ if @manual_mode then -+ # Check that IPv4/IPv6 is used consistently -+ if @ip_address.ipv4? then -+ event(EV_IP_CONFIG, @ip_gateway.ipv4? && @ip_prefix < 32) -+ else -+ event(EV_IP_CONFIG, @ip_gateway.ipv6? && @ip_prefix < 128) -+ end -+ else -+ event(EV_IP_CONFIG, true) -+ end -+ else -+ event(EV_IP_CONFIG, false) -+ end -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/p2v.ui virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/p2v.ui ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/p2v.ui 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/p2v.ui 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,1031 @@ -+ -+ -+ -+ -+ -+ False -+ center-always -+ False -+ -+ -+ -+ True -+ 0 -+ 0 -+ -+ -+ 800 -+ 600 -+ True -+ 0 -+ 0 -+ in -+ -+ -+ True -+ vertical -+ 2 -+ -+ -+ True -+ -+ -+ True -+ 0 -+ 0 -+ 5 -+ 5 -+ <span weight='bold' foreground='white' size='xx-large'>virt-p2v</span> -+ True -+ -+ -+ -+ -+ False -+ 0 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 800 -+ 550 -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 0 -+ 1 -+ 11 -+ Welcome to virt-p2v. -+ -+ -+ False -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ network_device_list -+ False -+ 0 -+ -+ -+ Device -+ -+ -+ -+ 3 -+ 0 -+ -+ -+ -+ -+ -+ -+ 18 -+ MAC Address -+ -+ -+ -+ 3 -+ 1 -+ -+ -+ -+ -+ -+ -+ Status -+ -+ -+ -+ 3 -+ 2 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Select a network device</b> -+ True -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ True -+ 0 -+ in -+ -+ -+ True -+ 12 -+ -+ -+ True -+ vertical -+ -+ -+ Automatic configuration -+ True -+ True -+ False -+ True -+ True -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ False -+ 3 -+ 2 -+ 2 -+ -+ -+ True -+ 0 -+ IP Address: -+ -+ -+ GTK_FILL -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 0 -+ Gateway: -+ -+ -+ 1 -+ 2 -+ GTK_FILL -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 0 -+ DNS Servers: -+ -+ -+ 2 -+ 3 -+ GTK_FILL -+ GTK_FILL -+ -+ -+ -+ -+ True -+ True -+ 39 -+ 39 -+ True -+ -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ GTK_FILL -+ -+ -+ -+ -+ True -+ True -+ 35 -+ -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 2 -+ -+ -+ True -+ True -+ 39 -+ 39 -+ True -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ Prefix: -+ -+ -+ False -+ 1 -+ -+ -+ -+ -+ True -+ True -+ 2 -+ 2 -+ True -+ -+ -+ -+ False -+ 2 -+ -+ -+ -+ -+ 1 -+ 2 -+ GTK_FILL -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>IP Configuration</b> -+ True -+ -+ -+ -+ -+ False -+ 2 -+ -+ -+ -+ -+ True -+ 1 -+ 0 -+ -+ -+ Use these network settings -+ True -+ False -+ True -+ True -+ -+ -+ -+ -+ -+ False -+ 3 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 0 -+ 0 -+ -+ -+ True -+ 0 -+ in -+ -+ -+ True -+ 12 -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 3 -+ 2 -+ 2 -+ -+ -+ True -+ 0 -+ Hostname: -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ 0 -+ Username: -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ -+ -+ True -+ 0 -+ Password: -+ -+ -+ 2 -+ 3 -+ -+ -+ -+ -+ -+ -+ True -+ True -+ -+ 40 -+ -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ -+ True -+ True -+ False -+ -+ 40 -+ -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ -+ -+ -+ -+ -+ True -+ True -+ -+ 40 -+ root -+ -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ -+ -+ -+ -+ -+ False -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ 0 -+ 8 -+ 8 -+ -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Connect to conversion server</b> -+ True -+ -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 1 -+ 0 -+ 0 -+ 0 -+ -+ -+ Connect -+ True -+ False -+ True -+ True -+ -+ -+ -+ -+ -+ False -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ 0 -+ 0 -+ 0 -+ 0 -+ 12 -+ -+ -+ True -+ 4 -+ 2 -+ 2 -+ -+ -+ True -+ 0 -+ Destination Profile: -+ -+ -+ -+ -+ True -+ convert_profile_list -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ 0 -+ Memory (MB): -+ -+ -+ 3 -+ 4 -+ -+ -+ -+ -+ True -+ True -+ -+ True -+ -+ -+ -+ 1 -+ 2 -+ 3 -+ 4 -+ -+ -+ -+ -+ True -+ 0 -+ Number of CPUs: -+ -+ -+ 2 -+ 3 -+ -+ -+ -+ -+ True -+ 0 -+ Name -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ True -+ -+ True -+ -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ True -+ -+ True -+ -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Target properties</b> -+ True -+ -+ -+ -+ -+ False -+ False -+ 0 -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ convert_fixed_list -+ False -+ 0 -+ -+ -+ Convert -+ True -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ -+ -+ Device -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ Transfer Progress -+ True -+ -+ -+ -+ 2 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Fixed Storage</b> -+ True -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ convert_removable_list -+ -+ -+ Convert -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ -+ -+ Device -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ Type -+ -+ -+ -+ 2 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Removable Media</b> -+ True -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ 1 -+ 1 -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ convert_network_list -+ False -+ 0 -+ -+ -+ Convert -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ -+ -+ Device -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Network Interfaces</b> -+ True -+ -+ -+ -+ -+ 2 -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ -+ -+ True -+ 0 -+ 12 -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ Convert -+ True -+ True -+ True -+ -+ -+ -+ False -+ False -+ 1 -+ -+ -+ -+ -+ False -+ False -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ A guest has been successfully created on the target server. -+ -+Remove the temporary boot device from this machine and press 'Reboot' to continue. -+ center -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 0.25 -+ 0.25 -+ -+ -+ Reboot -+ True -+ True -+ True -+ -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/success.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/success.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/success.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/success.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,33 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+ -+module VirtP2V::UI::Success -+ include GetText -+ -+ def self.init(ui) -+ ui.register_handler('reboot_button_clicked', -+ method(:reboot_button_clicked)) -+ -+ @ui = ui -+ end -+ -+ def self.reboot_button_clicked -+ @ui.quit -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/Manifest virt-v2v-v0.8.1.new/p2v/client/Manifest ---- virt-v2v-v0.8.1/p2v/client/Manifest 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/Manifest 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,15 @@ -+Rakefile -+bin/virt-p2v -+lib/virt-p2v/blockdevice.rb -+lib/virt-p2v/connection.rb -+lib/virt-p2v/converter.rb -+lib/virt-p2v/gtk-queue.rb -+lib/virt-p2v/netdevice.rb -+lib/virt-p2v/ui/connect.rb -+lib/virt-p2v/ui/convert.rb -+lib/virt-p2v/ui/main.rb -+lib/virt-p2v/ui/network.rb -+lib/virt-p2v/ui/p2v.ui -+lib/virt-p2v/ui/success.rb -+virt-p2v.gemspec -+Manifest -diff -ruN virt-v2v-v0.8.1/p2v/client/Rakefile virt-v2v-v0.8.1.new/p2v/client/Rakefile ---- virt-v2v-v0.8.1/p2v/client/Rakefile 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/Rakefile 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,37 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'rubygems' -+require 'echoe' -+ -+Echoe.new("virt-p2v") do |p| -+ p.project = "Virt P2V" -+ p.version = `../../Build version` -+ p.author = "Matthew Booth" -+ p.summary = "Send a machine's storage and metadata to virt-p2v-server" -+ p.description = < /manifest-rpm.txt -+rpm -qa --qf '%{sourcerpm}\n' | sort -u > /manifest-srpm.txt -+# collect all included licenses rhbz#601927 -+rpm -qa --qf '%{license}\n' | sort -u > /manifest-license.txt -+# dependencies -+rpm -qa | xargs -n1 rpm -e --test 2> /manifest-deps.txt -+echo -n "." -+find / -xdev -print -exec rpm -qf {} \; > /manifest-owns.txt -+rpm -qa --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | \ -+ sort > /rpm-qa.txt -+echo -n "." -+ -+du -akx --exclude=/var/cache/yum / > /manifest-file.txt -+du -x --exclude=/var/cache/yum / > /manifest-dir.txt -+echo -n "." -+bzip2 /manifest-deps.txt /manifest-owns.txt /manifest-file.txt /manifest-dir.txt -+echo -n "." -+ -+%end -+ -+%post --nochroot -+# Move manifests to ISO -+mv $INSTALL_ROOT/manifest-* $LIVE_ROOT/isolinux -+echo "done" -+ -+# only works on x86, x86_64 -+if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then -+ if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi -+ cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS -+ cp /usr/bin/livecd-iso-to-pxeboot $LIVE_ROOT/LiveOS -+fi -+%end -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-minimizer.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-minimizer.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-minimizer.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-minimizer.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,239 @@ -+# This file is only relatively lightly modified from the version copied from -+# oVirt, and certainly contains much which is irrelevant to this image. I have, -+# however, removed some obviously extraneous entries and added a few additional -+# entries. -+# -+# Matthew Booth - 18/4/2011 -+ -+%post --nochroot --interpreter image-minimizer -+# lokkit is just an install-time dependency; we can remove -+# it afterwards, which we do here -+droprpm system-config-* -+droprpm libsemanage-python -+droprpm python-libs -+droprpm python -+ -+droprpm mkinitrd -+droprpm isomd5sum -+droprpm dmraid -+droprpm checkpolicy -+droprpm make -+droprpm policycoreutils-python -+droprpm setools-libs-python -+droprpm setools-libs -+ -+droprpm gamin -+droprpm pm-utils -+droprpm kbd -+droprpm usermode -+droprpm vbetool -+droprpm ConsoleKit -+droprpm hdparm -+droprpm efibootmgr -+droprpm linux-atm-libs -+droprpm mtools -+droprpm syslinux -+droprpm wireless-tools -+droprpm radeontool -+droprpm libicu -+droprpm gnupg2 -+droprpm fedora-release-notes -+droprpm fedora-logos -+ -+# cronie pulls in exim (sendmail) which pulls in all kinds of perl deps -+droprpm exim -+droprpm perl* -+droprpm postfix -+droprpm mysql* -+ -+droprpm sysklogd -+ -+# unneeded rhn deps -+droprpm yum* -+ -+# pam complains when this is missing -+keeprpm ConsoleKit-libs -+ -+# kernel modules minimization -+ -+# filesystems -+drop /lib/modules/*/kernel/fs -+keep /lib/modules/*/kernel/fs/ext* -+keep /lib/modules/*/kernel/fs/jbd* -+keep /lib/modules/*/kernel/fs/btrfs -+keep /lib/modules/*/kernel/fs/fat -+keep /lib/modules/*/kernel/fs/nfs -+keep /lib/modules/*/kernel/fs/nfs_common -+keep /lib/modules/*/kernel/fs/fscache -+keep /lib/modules/*/kernel/fs/lockd -+keep /lib/modules/*/kernel/fs/nls/nls_utf8.ko -+# autofs4 configfs exportfs *fat *jbd mbcache.ko nls xfs -+#*btrfs cramfs *ext2 *fscache *jbd2 *nfs squashfs -+# cachefiles dlm *ext3 fuse jffs2 *nfs_common ubifs -+# cifs ecryptfs *ext4 gfs2 *lockd nfsd udf -+ -+# network -+drop /lib/modules/*/kernel/net -+keep /lib/modules/*/kernel/net/802* -+keep /lib/modules/*/kernel/net/bridge -+keep /lib/modules/*/kernel/net/core -+keep /lib/modules/*/kernel/net/ipv* -+keep /lib/modules/*/kernel/net/key -+keep /lib/modules/*/kernel/net/llc -+keep /lib/modules/*/kernel/net/netfilter -+keep /lib/modules/*/kernel/net/rds -+keep /lib/modules/*/kernel/net/sctp -+keep /lib/modules/*/kernel/net/sunrpc -+#*802 atm can ieee802154 *key *netfilter rfkill *sunrpc xfrm -+#*8021q bluetooth *core *ipv4 *llc phonet sched wimax -+# 9p *bridge dccp *ipv6 mac80211 *rds *sctp wireless -+ -+drop /lib/modules/*/kernel/sound -+ -+# drivers -+drop /lib/modules/*/kernel/drivers -+keep /lib/modules/*/kernel/drivers/ata -+keep /lib/modules/*/kernel/drivers/block -+keep /lib/modules/*/kernel/drivers/cdrom -+keep /lib/modules/*/kernel/drivers/char -+keep /lib/modules/*/kernel/drivers/cpufreq -+keep /lib/modules/*/kernel/drivers/dca -+keep /lib/modules/*/kernel/drivers/dma -+keep /lib/modules/*/kernel/drivers/edac -+keep /lib/modules/*/kernel/drivers/firmware -+keep /lib/modules/*/kernel/drivers/idle -+keep /lib/modules/*/kernel/drivers/infiniband -+keep /lib/modules/*/kernel/drivers/md -+keep /lib/modules/*/kernel/drivers/message -+keep /lib/modules/*/kernel/drivers/net -+drop /lib/modules/*/kernel/drivers/net/pcmcia -+drop /lib/modules/*/kernel/drivers/net/wireless -+drop /lib/modules/*/kernel/drivers/net/ppp* -+keep /lib/modules/*/kernel/drivers/pci -+keep /lib/modules/*/kernel/drivers/scsi -+keep /lib/modules/*/kernel/drivers/staging/ramzswap -+keep /lib/modules/*/kernel/drivers/uio -+keep /lib/modules/*/kernel/drivers/usb -+drop /lib/modules/*/kernel/drivers/usb/atm -+drop /lib/modules/*/kernel/drivers/usb/class -+drop /lib/modules/*/kernel/drivers/usb/image -+drop /lib/modules/*/kernel/drivers/usb/misc -+drop /lib/modules/*/kernel/drivers/usb/serial -+keep /lib/modules/*/kernel/drivers/vhost -+keep /lib/modules/*/kernel/drivers/virtio -+ -+# acpi *cpufreq hid leds mtd ?regulator uwb -+#*ata crypto ?hwmon *md *net* rtc *vhost -+# atm *dca ?i2c media ?parport *scsi* video -+# auxdisplay *dma *idle memstick *pci ?serial *virtio -+#*block *edac ieee802154 *message pcmcia ?ssb watchdog -+# bluetooth firewire *infiniband ?mfd platform *staging xen -+#*cdrom *firmware input misc ?power ?uio -+#*char* ?gpu isdn mmc ?pps *usb -+ -+drop /usr/share/zoneinfo -+keep /usr/share/zoneinfo/UTC -+ -+drop /etc/alsa -+drop /usr/share/alsa -+drop /usr/share/awk -+drop /usr/share/vim -+drop /usr/share/anaconda -+drop /usr/share/backgrounds -+drop /usr/share/wallpapers -+drop /usr/share/kde-settings -+drop /usr/share/gnome-background-properties -+drop /usr/share/dracut -+drop /usr/share/plymouth -+drop /usr/share/setuptool -+drop /usr/share/hwdata/MonitorsDB -+drop /usr/share/hwdata/oui.txt -+drop /usr/share/hwdata/videoaliases -+drop /usr/share/hwdata/videodrivers -+drop /usr/share/firstboot -+drop /usr/share/lua -+drop /usr/share/kde4 -+drop /usr/share/pixmaps -+drop /usr/share/icons -+drop /usr/share/fedora-release -+drop /usr/share/tabset -+ -+drop /usr/share/tc -+drop /usr/share/emacs -+drop /usr/share/info -+drop /usr/src -+drop /usr/etc -+drop /usr/games -+drop /usr/include -+drop /usr/local -+drop /usr/sbin/dell* -+keep /usr/sbin/build-locale-archive -+drop /usr/sbin/glibc_post_upgrade.* -+drop /usr/lib*/tc -+drop /usr/lib*/tls -+drop /usr/lib*/sse2 -+drop /usr/lib*/pkgconfig -+drop /usr/lib*/nss -+drop /usr/lib*/games -+drop /usr/lib*/alsa-lib -+drop /usr/lib*/krb5 -+drop /usr/lib*/hal -+drop /usr/lib*/gio -+ -+# syslinux -+drop /usr/share/syslinux -+# glibc-common locales -+drop /usr/lib/locale -+keep /usr/lib/locale/usr/share/locale/en_US -+# openssh -+drop /usr/bin/sftp -+drop /usr/bin/slogin -+drop /usr/bin/ssh-add -+drop /usr/bin/ssh-agent -+drop /usr/bin/ssh-keyscan -+# docs -+drop /usr/share/omf -+drop /usr/share/gnome -+drop /usr/share/doc -+keep /usr/share/doc/*-firmware-* -+drop /usr/share/locale/ -+keep /usr/share/locale/en_US -+drop /usr/share/man -+drop /usr/share/i18n -+drop /boot/* -+drop /var/lib/builder -+ -+drop /usr/lib*/libboost* -+keep /usr/lib*/libboost_program_options.so* -+keep /usr/lib*/libboost_filesystem.so* -+keep /usr/lib*/libboost_thread-mt.so* -+keep /usr/lib*/libboost_system.so* -+drop /usr/kerberos -+keep /usr/kerberos/bin/kinit -+keep /usr/kerberos/bin/klist -+drop /lib/firmware -+keep /lib/firmware/3com -+keep /lib/firmware/acenic -+keep /lib/firmware/adaptec -+keep /lib/firmware/advansys -+keep /lib/firmware/bnx2 -+keep /lib/firmware/cxgb3 -+keep /lib/firmware/e100 -+keep /lib/firmware/myricom -+keep /lib/firmware/ql* -+keep /lib/firmware/sun -+keep /lib/firmware/tehuti -+keep /lib/firmware/tigon -+drop /lib/kbd/consolefonts -+drop /etc/pki/tls -+drop /etc/pki/java -+drop /etc/pki/nssdb -+drop /etc/pki/rpm-gpg -+%end -+ -+%post -+echo "Removing python source files" -+find / -name '*.py' -exec rm -f {} \; -+find / -name '*.pyo' -exec rm -f {} \; -+ -+%end -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-pkgs.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-pkgs.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-pkgs.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-pkgs.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,48 @@ -+# Direct requirements -+rubygem-virt-p2v -+bitstream-vera-sans-fonts -+xorg-x11-xinit -+xorg-x11-drivers -+xorg-x11-server-Xorg -+ -+# Boot requirements -+device-mapper -+ -+# Required for livecd creation -+passwd -+rpm -+/usr/sbin/lokkit -+ -+# Remove unnecessary packages -+-audit-libs-python -+-ustr -+-authconfig -+-wireless-tools -+-setserial -+-prelink -+-newt-python -+-newt -+-libselinux-python -+-kbd -+-usermode -+-fedora-release -+-fedora-release-notes -+-dmraid -+-gzip -+-less -+-which -+-parted -+-tar -+-libuser -+-mtools -+-cpio -+-yum -+-numactl # Pulls in perl dependency -+-perl -+ -+# qlogic firmware -+ql2100-firmware -+ql2200-firmware -+ql23xx-firmware -+ql2400-firmware -+ql2500-firmware -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-post.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-post.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-post.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-post.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,43 @@ -+# -*-Shell-script-*- -+echo "Starting Kickstart Post" -+PATH=/sbin:/usr/sbin:/bin:/usr/bin -+export PATH -+ -+# cleanup rpmdb to allow non-matching host and chroot RPM versions -+rm -f /var/lib/rpm/__db* -+ -+echo "Creating shadow files" -+# because we aren't installing authconfig, we aren't setting up shadow -+# and gshadow properly. Do it by hand here -+pwconv -+grpconv -+ -+echo "Forcing C locale" -+# force logins (via ssh, etc) to use C locale, since we remove locales -+cat >> /etc/profile << \EOF -+# force our locale to C since we don't have locale stuff' -+export LC_ALL=C LANG=C -+EOF -+ -+# remove errors from /sbin/dhclient-script -+DHSCRIPT=/sbin/dhclient-script -+sed -i 's/mv /cp -p /g' $DHSCRIPT -+sed -i '/rm -f.*${interface}/d' $DHSCRIPT -+sed -i '/rm -f \/etc\/localtime/d' $DHSCRIPT -+sed -i '/rm -f \/etc\/ntp.conf/d' $DHSCRIPT -+sed -i '/rm -f \/etc\/yp.conf/d' $DHSCRIPT -+ -+# Lock root account -+#passwd -l root -+ -+#strip out all unncesssary locales -+localedef --list-archive | grep -v -i -E 'en_US.utf8' |xargs localedef --delete-from-archive -+mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl -+/usr/sbin/build-locale-archive -+ -+# Run virt-p2v -+cat >> /etc/rc.local < /root/virt-p2v.log 2>&1 -+poweroff -+EOF -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-post-nochroot.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-post-nochroot.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-post-nochroot.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-post-nochroot.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,60 @@ -+%include version.ks -+ -+PRODUCT='Virt P2V' -+PRODUCT_SHORT='virt-p2v' -+PACKAGE='virt-p2v' -+RELEASE=${RELEASE:-devel.`date +%Y%m%d%H%M%S`} -+ -+echo "Customizing boot menu" -+sed -i -e ' -+# Put product information at the top of the file -+1 { -+ i '"say $PRODUCT $VERSION ($RELEASE)"' -+ i '"menu title $PRODUCT_SHORT $VERSION ($RELEASE)"' -+} -+ -+# Remove any existing menu title -+/^menu title .*/d -+ -+# Remove quiet bootparam -+#s/ quiet// -+ -+# Disable selinux entirely. Required, as we dont install an SELinux policy. -+/^\s*append\s/ s/\s*$/ selinux=0/ -+ -+# Remove Verify and Boot option -+/label check0/{N;N;N;d;} -+ -+# Set the default timeout to 15 seconds -+s/^timeout .*/timeout 15/ -+' $LIVE_ROOT/isolinux/isolinux.cfg -+ -+# TODO: Replace the splash screen with something P2V appropriate -+#cp $INSTALL_ROOT//syslinux-vesa-splash.jpg $LIVE_ROOT/isolinux/splash.jpg -+ -+# store image version info in the ISO -+cat > $LIVE_ROOT/isolinux/version < $INSTALL_ROOT/etc/$PACKAGE-release <> $INSTALL_ROOT/etc/issue -+cp $INSTALL_ROOT/etc/issue $INSTALL_ROOT/etc/issue.net -+ -+# replace initramfs if regenerated -+if [ -f "$INSTALL_ROOT/initrd0.img" ]; then -+ mv -v "$INSTALL_ROOT/initrd0.img" "$LIVE_ROOT/isolinux/initrd0.img" -+fi -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/Makefile virt-v2v-v0.8.1.new/p2v/image-builder/Makefile ---- virt-v2v-v0.8.1/p2v/image-builder/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/Makefile 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,2 @@ -+version.ks: ../../Build -+ echo VERSION=`../../Build version` > version.ks -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/version.ks virt-v2v-v0.8.1.new/p2v/image-builder/version.ks ---- virt-v2v-v0.8.1/p2v/image-builder/version.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/version.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1 @@ -+VERSION=0.8.1 -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image-builder virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image-builder ---- virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image-builder 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image-builder 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,188 @@ -+#!/bin/bash -+ -+# Copyright (C) 2010-2011, Red Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; version 2 of the License. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -+# MA 02110-1301, USA. A copy of the GNU General Public License is -+# also available at http://www.gnu.org/copyleft/gpl.html. -+ -+# Requires: sudo livecd-creator, sudo setenforce, ksflatten -+ -+# Based on oVirt's node-creator -+ -+# Current fedora data -+cur_rawhide=16 -+cur_devel=15 -+ -+me=$(basename "$0") -+warn() { printf '%s: %s\n' "$me" "$*" >&2; } -+die() { warn "$*"; exit 1; } -+usage() { -+cat < -+ -+Build a virt-p2v bootable image. -+ -+OPTIONS: -+ -a Additional yum repository. Can be specified multiple times. -+ -c Yum cache directory. -+ -d Directory containing virt-p2v-image.ks. -+ -f Specific Fedora mirror to use if building a Fedora image. -+ -l Boot image label. -+ -r Primary yum repository. -+ -u Updates yum repository. -+ -h Show this message. -+EOF -+} -+ -+onlyonce() { -+ warn "-$1 may only be specified once" -+ usage -+ exit 1 -+} -+ -+while getopts "a:d:f:hl:r:u:w:" OPTION -+do -+ case $OPTION in -+ a) -+ n_elems=${#extra_repos[*]} -+ extra_repos[$n_elems]="$OPTARG" -+ ;; -+ c) -+ [ -n "$cachedir" ] && onlyonce $OPTION -+ cachedir="$OPTARG" -+ ;; -+ d) -+ [ -n "$datadir" ] && onlyonce $OPTION -+ datadir="$OPTARG" -+ ;; -+ f) -+ [ -n "$fedora_url" ] && onlyonce $OPTION -+ fedora_url="$OPTARG" -+ ;; -+ l) -+ [ -n "$label" ] && onlyonce $OPTION -+ label="$OPTARG" -+ ;; -+ r) -+ [ -n "$repo" ] && onlyonce $OPTION -+ repo="$OPTARG" -+ ;; -+ u) -+ [ -n "$updates" ] && onlyonce $OPTION -+ updates="$OPTARG" -+ ;; -+ h) -+ usage -+ exit 0 -+ ;; -+ ?) -+ usage -+ exit 1 -+ ;; -+ esac -+done -+ -+# Split out here for simple editing with sed during installation -+DEFAULT_DATADIR=. -+ -+# Option defaults -+datadir="${datadir:-$DEFAULT_DATADIR}" -+cachedir="${cachedir:-/var/tmp/p2v-image-builder.$USER}" -+label="${label:-Virt-P2V}" -+ -+arch=$(rpm --eval '%{_arch}') -+kstmp=$(mktemp --tmpdir p2v-image-builder.XXXXXXXX) -+ -+if pgrep -xl nscd; then -+ die "Please stop nscd first" -+fi -+ -+rm -f "$kstmp" -+# combine recipe includes -+ksflatten --config "$datadir/virt-p2v-image.ks" --output "$kstmp" -+# XXX broken ksflatten leaves %include -+sed -i 's/^%include /#&/' "$kstmp" -+ -+if [ -z "$repo" ]; then -+ # Set defaults for Fedora if this is a fedora system -+ fedora=$(rpm --eval '%{fedora}' |grep [0-9]) -+ -+ mirrorlist="http://mirrors.fedoraproject.org/mirrorlist" -+ -+ case "$fedora" in -+ $curr_rawhide) -+ if [ -z "$fedora_url" ]; then -+ repo="--mirrorlist=$mirrorlist?repo=rawhide&arch=$arch" -+ else -+ repo="--baseurl=$fedora_url/development/rawhide/$arch/os" -+ fi -+ ;; -+ $cur_devel) -+ if [ -z "$fedora_url" ]; then -+ repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -+ else -+ repo="--baseurl=$fedora_url/development/$fedora/$arch/os" -+ fi -+ ;; -+ ?*) -+ if [ -z "$fedora_url" ]; then -+ repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -+ updates="--mirrorlist=$mirrorlist?repo=updates-released-f${fedora}&arch=$arch" -+ else -+ repo="--baseurl=$fedora_url/releases/$fedora/Everything/$arch/os" -+ updates="--baseurl=$fedora_url/updates/$fedora/$arch" -+ fi -+ esac -+else -+ repo="--baseurl=$repo" -+ [ -n "$updates" ] && updates="--baseurl=$updates" -+fi -+ -+if [ -n "$repo" ]; then -+ echo "repo --name=base $repo" >> "$kstmp" -+else -+ die "No repository specified, and no default available." -+fi -+if [ -n "$updates" ]; then -+ echo "repo --name=updates $updates" >> "$kstmp" -+fi -+i=0 -+for extra in "${extra_repos[@]}"; do -+ ((i++)) -+ [ -d "$extra" ] && extra="file://$extra" -+ echo "repo --name=extra$i --baseurl=$extra" >> "$kstmp" -+done -+ -+selinux_enforcing=$(/usr/sbin/getenforce) -+case "$selinux_enforcing" in -+ Enforcing) sudo /usr/sbin/setenforce Permissive ;; -+ Permissive) ;; -+ *) if grep -q '^selinux --disabled' "$kstmp"; -+ then -+ warn "WARNING: SELinux disabled in kickstart" -+ else -+ die "ERROR: SELinux enabled in kickstart, \ -+ but disabled on the build machine" -+ fi ;; -+esac -+ -+mkdir -p $cachedir -+sudo livecd-creator -c "$kstmp" -f "$label" --cache="$cachedir" -+ -+# Clean up -+rm -f $kstmp -+if [ "$selinux_enforcing" = Enforcing ]; then -+ sudo /usr/sbin/setenforce Enforcing -+fi -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image.ks virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image.ks ---- virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,19 @@ -+# virt-p2v Node image recipe -+ -+%include common-install.ks -+ -+%packages --excludedocs --nobase -+%include common-pkgs.ks -+%end -+ -+%post -+%include common-post.ks -+%end -+ -+%include common-minimizer.ks -+ -+%post --nochroot -+%include common-post-nochroot.ks -+%end -+ -+%include common-manifest-post.ks -diff -ruN virt-v2v-v0.8.1/p2v/server/run-p2v-locally virt-v2v-v0.8.1.new/p2v/server/run-p2v-locally ---- virt-v2v-v0.8.1/p2v/server/run-p2v-locally 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/server/run-p2v-locally 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,52 @@ -+#!/bin/sh -+# virt-p2v -+# Copyright (C) 2010 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+# This script sets up the environment so you can run virt-v2v in place -+# without needing to do 'make install' first. -+# -+# Use it like this: -+# ./run-p2v-locally -+# -+# It requires the environment variable VIRTV2V_ROOT to be set. If using -+# libguestfs from source, LIBGUESTFS_ROOT must also be set. -+ -+if [ -z "$VIRTV2V_ROOT" ]; then -+ echo "VIRTV2V_ROOT must be set" -+ exit 1 -+fi -+ -+if [ -z "$PERL5LIB" ]; then -+ PERL5LIB="$VIRTV2V_ROOT/blib/lib" -+else -+ PERL5LIB="$VIRTV2V_ROOT/blib/lib:$PERL5LIB" -+fi -+ -+if [ ! -z "$LIBGUESTFS_ROOT" ]; then -+ if [ -z "$LD_LIBRARY_PATH" ]; then -+ LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs" -+ else -+ LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs:$LD_LIBRARY_PATH" -+ fi -+ -+ LIBGUESTFS_PATH="$LIBGUESTFS_ROOT/appliance" -+ PERL5LIB="$LIBGUESTFS_ROOT/perl/blib/lib:$LIBGUESTFS_ROOT/perl/blib/arch:$PERL5LIB" -+fi -+ -+export PERL5LIB LD_LIBRARY_PATH LIBGUESTFS_PATH -+ -+exec perl "$VIRTV2V_ROOT/p2v-server/virt-p2v-server.pl" "$@" -diff -ruN virt-v2v-v0.8.1/p2v/server/virt-p2v-server.pl virt-v2v-v0.8.1.new/p2v/server/virt-p2v-server.pl ---- virt-v2v-v0.8.1/p2v/server/virt-p2v-server.pl 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/server/virt-p2v-server.pl 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,505 @@ -+#!/usr/bin/perl -+# virt-p2v-server -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+use warnings; -+use strict; -+ -+use IO::Handle; -+use YAML::Any; -+ -+use Locale::TextDomain 'virt-v2v'; -+ -+use Sys::Guestfs; -+ -+use Sys::VirtConvert; -+use Sys::VirtConvert::Config; -+use Sys::VirtConvert::Converter; -+use Sys::VirtConvert::Connection::LibVirtTarget; -+use Sys::VirtConvert::Connection::RHEVTarget; -+use Sys::VirtConvert::GuestfsHandle; -+use Sys::VirtConvert::Util qw(:DEFAULT logmsg_init logmsg_level); -+ -+=encoding utf8 -+ -+=head1 NAME -+ -+virt-p2v-server - Receive data from virt-p2v -+ -+=head1 DESCRIPTION -+ -+virt-p2v-server is invoked over SSH by virt-p2v. It is not intended to be run -+manually. -+ -+=cut -+ -+# SIGPIPE will cause an untidy exit of the perl process, without calling -+# destructors. We don't rely on it anywhere, as we check for errors when reading -+# from or writing to a pipe. -+$SIG{'PIPE'} = 'IGNORE'; -+ -+# The protocol version we support -+use constant VERSION => 0; -+ -+# Message types -+use constant MSG_VERSION => 'VERSION'; -+use constant MSG_LANG => 'LANG'; -+use constant MSG_METADATA => 'METADATA'; -+use constant MSG_PATH => 'PATH'; -+use constant MSG_CONVERT => 'CONVERT'; -+use constant MSG_LIST_PROFILES => 'LIST_PROFILES'; -+use constant MSG_SET_PROFILE => 'SET_PROFILE'; -+use constant MSG_CONTAINER => 'CONTAINER'; -+use constant MSG_DATA => 'DATA'; -+ -+# Container types -+use constant CONT_RAW => 'RAW'; -+ -+# Global state -+my $config; -+my $meta; -+my $target; -+ -+# Initialize logging -+logmsg_init('syslog'); -+#logmsg_level(DEBUG); -+ -+logmsg NOTICE, __x("{program} started.", program => 'p2v-server'); -+ -+# Wrap everything in a big eval to catch any die(). N.B. $SIG{__DIE__} is no -+# good for this, as it catches every die(), even those inside an eval -+eval { -+ # Set the umask to a reasonable default -+ umask(0022); -+ -+ # Don't buffer output -+ # While perl will use line buffering when STDOUT is connected to a tty, when -+ # not connected to a tty, for example when invoked directly over ssh, it -+ # will use a regular, large output buffer. This results in messages being -+ # held in the buffer indefinitely. -+ STDOUT->autoflush(1); -+ -+ # Read the config file -+ eval { -+ $config = Sys::VirtConvert::Config->new('/etc/virt-v2v.conf'); -+ }; -+ v2vdie $@ if $@; -+ -+ my $msg; -+ while ($msg = p2v_receive()) { -+ my $type = $msg->{type}; -+ -+ # VERSION n -+ if ($type eq MSG_VERSION) { -+ my $version = $msg->{args}[0]; -+ if ($version <= VERSION) { -+ p2v_return_ok(); -+ } -+ -+ else { -+ err_and_die(__x('This version of virt-p2v-server does not '. -+ 'support protocol version {version}.', -+ version => $version)); -+ } -+ } -+ -+ # LANG lang -+ elsif ($type eq MSG_LANG) { -+ $ENV{LANG} = $msg->{args}[0]; -+ p2v_return_ok(); -+ } -+ -+ # METADATA length -+ # length bytes of YAML -+ elsif ($type eq MSG_METADATA) { -+ my $yaml = p2v_read($msg->{args}[0]); -+ eval { $meta = Load($yaml); }; -+ err_and_die('Error parsing metadata: '.$@) if $@; -+ -+ p2v_return_ok(); -+ } -+ -+ # PATH length path -+ # N.B. path could theoretically include spaces -+ elsif ($type eq MSG_PATH) { -+ my $length = $msg->{args}[0]; -+ -+ my $path = join(' ', @{$msg->{args}}[1..$#{$msg->{args}}]); -+ receive_path($path, $length); -+ } -+ -+ # CONVERT -+ elsif ($type eq MSG_CONVERT) { -+ convert(); -+ } -+ -+ # LIST_PROFILES -+ elsif ($type eq MSG_LIST_PROFILES) { -+ p2v_return_list($config->list_profiles()); -+ } -+ -+ # SET_PROFILE profile -+ elsif ($type eq MSG_SET_PROFILE) { -+ set_profile($msg->{args}[0]); -+ } -+ -+ else { -+ unexpected_msg($type); -+ } -+ } -+}; -+logmsg FATAL, $@ if $@; -+ -+exit(0); -+ -+# Receive an image file -+sub receive_path -+{ -+ my ($path, $length) = @_; -+ -+ err_and_die('PATH without prior SET_PROFILE command') -+ unless defined($target); -+ err_and_die('PATH without prior METADATA command') -+ unless defined($meta); -+ -+ my ($disk) = grep { $_->{path} eq $path } @{$meta->{disks}}; -+ err_and_die("$path not found in metadata") unless defined($disk); -+ -+ # Construct a volume name based on the path and hostname -+ my $name = $meta->{name}.'-'.$disk->{device}; -+ $name =~ s,/,_,g; # e.g. cciss devices have a directory structure -+ -+ my $sopts = $config->get_storage_opts(); -+ -+ my $convert = 0; -+ my $format; -+ my $sparse; -+ -+ # Default to raw. Conversion required for anything else. -+ if (!exists($sopts->{format}) || $sopts->{format} eq 'raw') { -+ $format = 'raw'; -+ } else { -+ $format = $sopts->{format}; -+ $convert = 1; -+ } -+ -+ # Default to non-sparse -+ my $allocation = $sopts->{allocation}; -+ if (!defined($allocation) || $allocation eq 'preallocated') { -+ $sparse = 0; -+ } elsif ($allocation eq 'sparse') { -+ $sparse = 1; -+ } else { -+ err_and_die(__x('Invalid allocation policy {policy} in profile.', -+ policy => $allocation)); -+ } -+ -+ # Create the target volume -+ my $vol; -+ eval { -+ $vol = $target->create_volume( -+ $name, -+ $format, -+ $length, -+ $sparse -+ ); -+ }; -+ err_and_die($@) if $@; -+ p2v_return_ok(); -+ -+ # Receive an initial container -+ my $msg = p2v_receive(); -+ unexpected_msg($msg->{type}) unless $msg->{type} eq MSG_CONTAINER; -+ -+ # We only support RAW container -+ my $ctype = $msg->{args}[0]; -+ err_and_die("Received unknown container type: $ctype") -+ unless $ctype eq CONT_RAW; -+ p2v_return_ok(); -+ -+ # Update the disk entry with the new volume details -+ $disk->{local_path} = $vol->get_local_path(); -+ $disk->{path} = $vol->get_path(); -+ $disk->{is_block} = $vol->is_block(); -+ -+ my $writer = $vol->get_write_stream($convert); -+ -+ # Receive volume data in chunks -+ my $received = 0; -+ while ($received < $length) { -+ my $data = p2v_receive(); -+ -+ unexpected_msg($data->command) unless $data->{type} eq MSG_DATA; -+ -+ # Read the data message in chunks of up to 4M -+ my $remaining = $data->{args}[0]; -+ while ($remaining > 0) { -+ my $chunk = $remaining > 4*1024*1024 ? 4*1024*1024 : $remaining; -+ my $buf = p2v_read($chunk); -+ -+ $received += $chunk; -+ $remaining -= $chunk; -+ -+ eval { $writer->write($buf); }; -+ err_and_die($@) if $@; -+ } -+ -+ p2v_return_ok(); -+ } -+} -+ -+# Use the specified profile -+sub set_profile -+{ -+ my ($profile) = @_; -+ -+ # Check the profile is in our list -+ my $found = 0; -+ for my $i ($config->list_profiles()) { -+ if ($i eq $profile) { -+ $found = 1; -+ last; -+ } -+ } -+ err_and_die(__x('Invalid profile: {profile}', profile => $profile)) -+ unless ($found); -+ -+ $config->use_profile($profile); -+ -+ my $storage = $config->get_storage(); -+ my $method = $config->get_method(); -+ if ($method eq 'libvirt') { -+ $target = new Sys::VirtConvert::Connection::LibVirtTarget -+ ('qemu:///system', $storage); -+ } elsif ($method eq 'rhev') { -+ $target = new Sys::VirtConvert::Connection::RHEVTarget($storage); -+ } else { -+ err_and_die(__x('Profile {profile} specifies invalid method {method}.', -+ profile => $profile, method => $method)); -+ } -+ -+ p2v_return_ok(); -+} -+ -+sub convert -+{ -+ err_and_die('CONVERT without prior SET_PROFILE command') -+ unless (defined($target)); -+ -+ err_and_die('CONVERT without prior METADATA command') -+ unless defined($meta); -+ -+ my @localpaths = map { $_->{local_path} } @{$meta->{disks}}; -+ -+ my $g; -+ eval { -+ my $transferiso = $config->get_transfer_iso(); -+ -+ $g = new Sys::VirtConvert::GuestfsHandle( -+ \@localpaths, -+ $transferiso, -+ $target->isa('Sys::VirtConvert::Connection::RHEVTarget') -+ ); -+ -+ my $transferdev; -+ if (defined($transferiso)) { -+ my @devices = $g->list_devices(); -+ $transferdev = pop(@devices); -+ } -+ -+ my $root = inspect_guest($g, $transferdev); -+ my $guestcaps = -+ Sys::VirtConvert::Converter->convert($g, $config, $root, $meta); -+ $target->create_guest($g, $root, $meta, $config, $guestcaps, -+ $meta->{name}); -+ -+ if($guestcaps->{block} eq 'virtio' && $guestcaps->{net} eq 'virtio') { -+ logmsg NOTICE, __x('{name} configured with virtio drivers.', -+ name => $meta->{name}); -+ } elsif ($guestcaps->{block} eq 'virtio') { -+ logmsg NOTICE, __x('{name} configured with virtio storage only.', -+ name => $meta->{name}); -+ } elsif ($guestcaps->{net} eq 'virtio') { -+ logmsg NOTICE, __x('{name} configured with virtio networking only.', -+ name => $meta->{name}); -+ } else { -+ logmsg NOTICE, __x('{name} configured without virtio drivers.', -+ name => $meta->{name}); -+ } -+ }; -+ -+ # If any of the above commands result in failure, we need to ensure that -+ # the guestfs qemu process is cleaned up before further cleanup. Failure to -+ # do this can result in failure to umount RHEV export's temporary mount -+ # point. -+ if ($@) { -+ my $err = $@; -+ $g->close(); -+ -+ # We trust the error was already logged -+ p2v_return_err($err); -+ die($@); -+ } -+ -+ p2v_return_ok(); -+} -+ -+sub unexpected_msg -+{ -+ err_and_die('Received unexpected command: '.shift); -+} -+ -+sub err_and_die -+{ -+ my $err = shift; -+ p2v_return_err($err); -+ v2vdie $err; -+} -+ -+END { -+ my $err = $?; -+ -+ logmsg NOTICE, __x("{program} exited.", program => 'p2v-server'); -+ -+ # die() sets $? to 255, which is untidy. -+ $? = $err == 255 ? 1 : $err; -+} -+ -+# Perform guest inspection using the libguestfs core inspection API. -+# Returns the root device of the os to be converted. -+sub inspect_guest -+{ -+ my $g = shift; -+ my $transferdev = shift; -+ -+ # Get list of roots, sorted -+ my @roots = $g->inspect_os(); -+ -+ # Filter out the transfer device from the results of inspect_os -+ # There's a libguestfs bug (fixed upstream) which meant the transfer ISO -+ # could be erroneously detected as an unknown Windows OS. As we know what it -+ # is, we can filter out the transfer device here. Even when the fix is -+ # released this is reasonable belt & braces. -+ @roots = grep(!/^\Q$transferdev\E$/, @roots); -+ -+ @roots = sort @roots; -+ -+ # Only work on single-root operating systems. -+ v2vdie __('No root device found in this operating system image.') -+ if @roots == 0; -+ -+ v2vdie __('Multiboot operating systems are not supported.') -+ if @roots > 1; -+ -+ return $roots[0]; -+} -+ -+sub p2v_receive -+{ -+ my $in = <>; -+ v2vdie __('Client closed connection unexpectedly') unless defined($in); -+ -+ # Messages consist of the message type followed by 0 or more arguments, -+ # terminated by a newline -+ chomp($in); -+ $in =~ /^([A-Z_]+)( .+)?$/ or err_and_die("Received invalid message: $in"); -+ -+ my %msg; -+ $msg{type} = $1; -+ if (defined($2)) { -+ my @args = split(' ', $2); -+ $msg{args} = \@args; -+ } else { -+ $msg{args} = []; -+ } -+ -+ logmsg DEBUG, __x('Received: {command} {args}', -+ command => $msg{type}, -+ args => join(' ', @{$msg{args}})); -+ -+ return \%msg; -+} -+ -+sub p2v_read -+{ -+ my ($length) = @_; -+ -+ my $buf; -+ my $total = 0; -+ -+ while($total < $length) { -+ my $in = read(STDIN, $buf, $length, $total) -+ or err_and_die(__x('Error receiving data: {error}', error => $@)); -+ logmsg DEBUG, "Read $in bytes"; -+ $total += $in; -+ } -+ -+ return $buf; -+} -+ -+sub p2v_return_ok -+{ -+ my $msg = "OK"; -+ logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -+ print $msg,"\n"; -+} -+ -+sub p2v_return_list -+{ -+ my @values = @_; -+ -+ my $msg = 'LIST '.scalar(@values); -+ foreach my $value (@values) { -+ $msg .= "\n$value"; -+ } -+ logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -+ print $msg,"\n"; -+} -+ -+sub p2v_return_err -+{ -+ my $msg = 'ERROR '.shift; -+ logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -+ print $msg,"\n"; -+} -+ -+=head1 SEE ALSO -+ -+L, -+L. -+ -+=head1 AUTHOR -+ -+Matthew Booth -+ -+=head1 COPYRIGHT -+ -+Copyright (C) 2011 Red Hat Inc. -+ -+This program is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2 of the License, or -+(at your option) any later version. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; if not, write to the Free Software -+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -diff -ruN virt-v2v-v0.8.1/p2v-client/bin/virt-p2v virt-v2v-v0.8.1.new/p2v-client/bin/virt-p2v ---- virt-v2v-v0.8.1/p2v-client/bin/virt-p2v 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/bin/virt-p2v 1970-01-01 01:00:00.000000000 +0100 -@@ -1,62 +0,0 @@ --#!/usr/bin/env ruby -- --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'virt-p2v/ui/main' --require 'virt-p2v/ui/network' --require 'virt-p2v/ui/connect' --require 'virt-p2v/ui/convert' --require 'virt-p2v/ui/success' -- --require 'virt-p2v/converter' --require 'virt-p2v/netdevice' -- --require 'gettext' -- --include GetText -- --bindtextdomain('virt-p2v') -- --if Process.uid != 0 -- puts _("virt-p2v must be executed with root privileges.\n" + -- "It is intended to be included in a custom Live image, not " + -- "run from the command\nline.") -- abort --end -- --converter = VirtP2V::Converter.new -- --# Initialise the wizard UI --ui = VirtP2V::UI::Main.new -- --# Initialize wizard pages --VirtP2V::UI::Network.init(ui) --VirtP2V::UI::Connect.init(ui, converter) --VirtP2V::UI::Convert.init(ui, converter) --VirtP2V::UI::Success.init(ui) -- --# Skip the network configuration screen if there is already an active network --# connection --VirtP2V::NetworkDevice.all_devices.each { |device| -- if device.activated then -- ui.active_page = 'server_win' -- break -- end --} -- --ui.show --ui.main_loop -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/blockdevice.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/blockdevice.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/blockdevice.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/blockdevice.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,112 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --module VirtP2V -- --class NoSuchDeviceError < StandardError; end -- --class FixedBlockDevice -- @@devices = {} -- -- def self.all_devices -- @@devices.values -- end -- -- def self.[](device) -- raise NoSuchDeviceError unless @@devices.has_key?(device) -- -- @@devices[device] -- end -- -- attr_reader :device -- -- def initialize(device) -- @device = device -- @@devices[device] = self -- end --end -- --class RemovableBlockDevice -- @@devices = {} -- -- def self.all_devices -- @@devices.values -- end -- -- def self.[](device) -- raise NoSuchDeviceError unless @@devices.has_key?(device) -- -- @@devices[device] -- end -- -- attr_reader :device, :type -- -- def initialize(device, type) -- @device = device -- @type = type -- -- @@devices[device] = self -- end --end -- --# Detect and instantiate all fixed and removable block devices in the system --begin -- # Look for block devices -- # Specifically, we look for entries in /sys/block which have a device -- # symlink and no entries in their slaves subdirectory -- Dir.foreach('/sys/block') { |dev| -- next if dev == '.' || dev == '..' -- -- # Skip if there's no device link -- next unless File.exists?("/sys/block/#{dev}/device") -- -- # Skip if the slaves subdirectory contains anything other than . and -- # .. -- begin -- next if Dir.entries("/sys/block/#{dev}/slaves").length > 2 -- rescue Errno::ENOENT => ex -- # This shouldn't happen, but if it did I guess it would mean -- # there are no slave devices -- end -- -- # We've got a real block device. Check if it's removable or not -- File.open("/sys/block/#{dev}/removable") { |fd| -- removable = fd.gets.chomp -- if removable == "0" then -- FixedBlockDevice.new(dev) -- else -- # Look in device/modalias to work out what kind of removable -- # device this is -- type = File.open( -- "/sys/block/#{dev}/device/modalias") \ -- { |modalias_f| -- modalias = modalias_f.gets.chomp -- if modalias =~ /floppy/ then -- 'floppy' -- elsif modalias =~ /cdrom/ then -- 'cdrom' -- else -- # We don't know what this is, ignore it -- end -- } -- -- RemovableBlockDevice.new(dev, type) unless type.nil? -- end -- } -- } --end -- --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/connection.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/connection.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/connection.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/connection.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,320 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'rubygems' --require 'net/ssh' --require 'thread' --require 'yaml' -- --require 'virt-p2v/gtk-queue' -- --module VirtP2V -- --class Connection -- include GetText -- -- attr_reader :connected -- -- class InvalidHostnameError < StandardError; end -- class InvalidCredentialsError < StandardError; end -- class TransportError < StandardError; end -- class NoP2VError < StandardError; end -- class RemoteError < StandardError; end -- class ProtocolError < StandardError; end -- class NotConnectedError < StandardError; end -- -- def on_connect(&cb) -- @connection_listeners << cb -- end -- -- def initialize(hostname, username, password, &cb) -- @mutex = Mutex.new -- @connection_listeners = [] -- -- # Always send our version number on connection -- @connection_listeners << Proc.new { |cb| -- self.version { |result| cb.call(result) } -- } -- -- run(cb) { -- error = nil -- begin -- @ssh = Net::SSH.start(hostname, username, :password => password) -- rescue SocketError, Errno::EHOSTUNREACH => ex -- raise InvalidHostnameError -- raise ex -- rescue Net::SSH::AuthenticationFailed => ex -- raise InvalidCredentialsError -- raise ex -- end -- -- @buffer = "" -- @connected = false -- -- Gtk.queue { cb.call(true) } -- } -- end -- -- def connect(&cb) -- run(cb) { -- @ch = @ssh.open_channel do |ch| -- ch.exec("virt-p2v-server") do |ch, success| -- raise RemoteError, -- "could not execute a remote command" unless success -- -- ch.on_data do |ch, data| -- @buffer << data -- end -- -- # If we get anything on stderr, raise it as a RemoteError -- ch.on_extended_data do |ch, type, data| -- close -- raise RemoteError, data -- end -- -- # Clean up local resources if we get eof from the other end -- ch.on_eof do |ch| -- close -- end -- -- @connected = true -- end -- -- end -- -- # Wait until we're connected -- @ssh.loop do -- !@connected -- end -- -- i = 0; -- listener_result = lambda { |result| -- if result.kind_of?(Exception) -- cb.call(result) -- else -- i += 1 -- if i == @connection_listeners.length -- cb.call(true) -- else -- Gtk.queue { -- @connection_listeners[i].call(listener_result) -- } -- end -- end -- } -- Gtk.queue { @connection_listeners[0].call(listener_result) } -- } -- end -- -- def close -- @connected = false -- @buffer = "" -- @ch.close -- end -- -- def version(&cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("VERSION 0\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def lang(lang, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("LANG #{lang}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def metadata(meta, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- payload = YAML::dump(meta) -- @ch.send_data("METADATA #{payload.length}\n"); -- @ch.send_data(payload) -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def path(length, path, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("PATH #{length} #{path}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def convert(&cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("CONVERT\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def list_profiles(&cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("LIST_PROFILES\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def set_profile(profile, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("SET_PROFILE #{profile}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def container(type, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("CONTAINER #{type}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def send_data(io, length, progress, &completion) -- raise NotConnectedError unless @connected -- -- run(completion) { -- @ch.send_data("DATA #{length}\n") -- total = 0 -- buffer = '' -- begin -- # This loop is in the habit of hanging in Net::SSH when sending -- # a chunk larger than about 2M. Putting the 1 second wait -- # timeout here kickstarts it if it stops. -- @ssh.loop(1) { -- if io.eof? || total == length then -- false -- else -- if @ch.remote_window_size > 0 then -- out = length - total -- out = @ch.remote_window_size \ -- if out > @ch.remote_window_size -- -- io.read(out, buffer) -- @ch.send_data(buffer) -- -- total += buffer.length -- -- # Send a progress callback -- Gtk.queue { progress.call(total) } -- end -- -- true -- end -- } -- rescue => ex -- Gtk.queue { completion.call(ex) } -- end -- -- result = parse_return -- -- Gtk.queue { completion.call(result) } -- } -- end -- -- private -- -- def run(cb) -- # Run the given block in a new thread -- t = Thread.new { -- begin -- # We can't run more than 1 command simultaneously -- @mutex.synchronize { yield } -- rescue => ex -- # Deliver exceptions to the caller, then re-raise them -- Gtk.queue { cb.call(ex) } -- raise ex -- end -- } -- t.priority = 1 -- end -- -- # Return a single line of output from the remote server -- def readline -- # Run the event loop until the buffer contains a newline -- index = nil -- @ssh.loop do -- if !@ch.eof? then -- index = @buffer.index("\n") -- index.nil? -- else -- close -- raise RemoteError, _('Server closed connection unexpectedly') -- end -- end -- -- # Remove the line from the buffer and return it with the trailing -- # newline removed -- @buffer.slice!(0..index).chomp -- end -- -- def parse_return -- line = readline -- line =~ /^(OK|ERROR|LIST)(?:\s(.*))?$/ or -- raise ProtocolError, "Invalid server response: #{line}" -- -- return true if $~[1] == 'OK' -- if $~[1] == 'ERROR' then -- close -- raise RemoteError, $~[2] -- end -- -- # LIST response. Get the number of items, and read that many lines -- n = Integer($~[2]) -- ret = [] -- while n > 0 do -- n -= 1 -- ret.push(readline) -- end -- -- ret -- end --end -- --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/converter.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/converter.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/converter.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/converter.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,218 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'rexml/document' --include REXML -- --require 'virt-p2v/netdevice' --require 'virt-p2v/blockdevice' -- --module VirtP2V -- --# NIC --# hostname --# username --# password -- --# name User entry --# memory Editable --# cpus Editable --# arch Detected: cpuflags contains lm (long mode) --# features Detected: apic, acpi, pae --# disks Editable, default to all --# device Detected --# path Detected --# is_block 1 --# format raw --# removables Editable, default to all --# device Detected --# type Detected --# nics Editable, default to all connected --# mac Detected, option to generate new --# vnet Set to nic name --# vnet_type bridge -- --class Converter -- include GetText -- -- attr_accessor :profile, :name, :cpus, :memory, :arch -- attr_reader :features, :disks, :removables, :nics -- -- attr_reader :connection -- -- def on_connection(&cb) -- @connection_listeners << cb -- end -- -- def connection=(connection) -- @connection = connection -- @connection_listeners.each { |cb| -- cb.call(connection) -- } -- end -- -- def convert(status, progress, &completion) -- iterate([ -- lambda { |cb| @connection.set_profile(@profile, &cb) }, -- lambda { |cb| @connection.metadata(meta, &cb) }, -- lambda { |cb| -- iterate(@disks.map { |dev| -- lambda { |cb2| -- disk(dev, status, progress, cb2) -- } -- }, cb) -- }, -- lambda { |cb| -- status.call(_('Converting')) -- @connection.convert(&cb) -- } -- ], completion) -- end -- -- private -- -- def initialize() -- @profile = nil -- @connection = nil -- @connection_listeners = [] -- -- # Initialize basic system information -- @name = '' # There's no reasonable default for this -- -- # Get total memory from /proc/meminfo -- File.open('/proc/meminfo', 'r') do |fd| -- fd.each { |line| -- next unless line =~ /^MemTotal:\s+(\d+)\b/ -- -- @memory = Integer($~[1]) * 1024 -- break -- } -- end -- -- # Get the total number of cpu threads from hwloc-info -- hwloc = Document.new `hwloc-info --of xml` -- @cpus = XPath.match(hwloc, "//object[@type='PU']").length -- -- # Get cpu architecture and features from the first flags entry in -- # /proc/cpuinfo -- File.open('/proc/cpuinfo', 'r') do |fd| -- fd.each { |line| -- next unless line =~ /^flags\s*:\s(.*)$/ -- -- flags = $~[1] -- -- # x86_64 if flags contains lm (long mode), i686 otherwise. We -- # don't support anything else. -- @arch = flags =~ /\blm\b/ ? 'x86_64' : 'i686' -- -- # Pull some select features from cpu flags -- @features = [] -- [ 'apic', 'acpi', 'pae' ].each { |f| -- @features << f if flags =~ /\b#{f}\b/ -- } -- break -- } -- end -- -- # Initialise empty lists for optional devices. These will be added -- # according to the user's selection -- @disks = [] -- @removables = [] -- @nics = [] -- end -- -- def disk(dev, status, progress, completion) -- path = "/dev/#{dev}" -- # XXX: No error checking of blockdev execution -- size = Integer(`blockdev --getsize64 #{path}`.chomp) -- status.call(_("Transferring #{dev}")) -- iterate([ -- lambda { |cb| @connection.path(size, path, &cb) }, -- lambda { |cb| @connection.container('RAW', &cb) }, -- lambda { |cb| -- io = nil -- begin -- io = File.new(path, 'r') -- rescue => ex -- cb.call(ex) -- end -- pc = 0 -- @connection.send_data(io, size, lambda { |total| -- npc = Float(total) * 100 / size -- # Only update the progress if it has increased by -- # at least 1% -- if Integer(npc) > pc then -- pc += 1 -- progress.call(dev, pc) -- end -- }, &cb) -- } -- ], completion) -- end -- -- def iterate(stages, completion) -- i = 0 -- cb = lambda { |result| -- if result.kind_of?(Exception) then -- completion.call(result) -- else -- i += 1 -- if i == stages.length then -- completion.call(true) -- else -- stages[i].call(cb) -- end -- end -- } -- stages[0].call(cb) -- end -- -- def meta -- { -- 'name' => @name, -- 'cpus' => @cpus, -- 'memory' => @memory, -- 'arch' => @arch, -- 'features' => @features, -- 'disks' => @disks.map { |device| -- { -- 'device' => device, -- 'path' => "/dev/#{device}", -- 'is_block' => '1', -- 'format' => 'raw' -- } -- }, -- 'removables' => @removables.map { |device| -- removable = RemovableBlockDevice[device] -- { -- 'device' => removable.device, -- 'type' => removable.type -- } -- }, -- 'nics' => @nics.map { |device| -- nic = NetworkDevice[device] -- { -- 'mac' => nic.mac, -- 'vnet' => nic.name, -- 'vnet_type' => 'bridge' -- } -- } -- } -- end --end -- --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/gtk-queue.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/gtk-queue.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/gtk-queue.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/gtk-queue.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,52 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --# This code is taken from: --# http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_threads --# The author of the above page is given as Tal Liron --# The above page is distributed under the terms of the GNU FDL, although I --# consider this code to be too trivial to be copyrightable -- --require 'gtk2' --require 'thread' -- --module Gtk -- GTK_PENDING_BLOCKS = [] -- GTK_PENDING_BLOCKS_LOCK = Mutex.new -- -- def Gtk.queue &block -- if Thread.current == Thread.main -- block.call -- else -- GTK_PENDING_BLOCKS_LOCK.synchronize do -- GTK_PENDING_BLOCKS << block -- end -- end -- end -- -- def Gtk.main_with_queue timeout -- Gtk.timeout_add timeout do -- GTK_PENDING_BLOCKS_LOCK.synchronize do -- for block in GTK_PENDING_BLOCKS -- block.call -- end -- GTK_PENDING_BLOCKS.clear -- end -- true -- end -- Gtk.main -- end --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/netdevice.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/netdevice.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/netdevice.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/netdevice.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,259 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'dbus' --require 'gettext' -- --module VirtP2V -- --class NetworkDevice -- include GetText -- -- attr_reader :name, :mac, :connected, :activated, :state -- -- # Some NetworkManager names, for convenience -- CONNECTION = 'org.freedesktop.NetworkManagerSettings.Connection'.freeze -- DEVICE = 'org.freedesktop.NetworkManager.Device'.freeze -- NETWORKMANAGER = 'org.freedesktop.NetworkManager'.freeze -- PROPERTIES = 'org.freedesktop.DBus.Properties'.freeze -- SETTINGS = 'org.freedesktop.NetworkManagerSettings'.freeze -- WIRED = 'org.freedesktop.NetworkManager.Device.Wired'.freeze -- -- # NetworkManager device types -- # http://projects.gnome.org/NetworkManager/developers/spec-08.html -- TYPE_UNKNOWN = 0 -- TYPE_ETHERNET = 1 -- TYPE_WIFI = 2 -- TYPE_GSM = 3 -- TYPE_CDMA = 4 -- -- # NetworkManager device states -- STATE_UNKNOWN = 0 -- STATE_UNMANAGED = 1 -- STATE_UNAVAILABLE = 2 -- STATE_DISCONNECTED = 3 -- STATE_PREPARE = 4 -- STATE_CONFIG = 5 -- STATE_NEED_AUTH = 6 -- STATE_IP_CONFIG = 7 -- STATE_ACTIVATED = 8 -- STATE_FAILED = 9 -- -- # Human readable descriptions of NetworkManager Device States -- STATES = { -- 0 => _('Unknown').freeze, # For completeness -- 1 => _('Unmanaged').freeze, # For completeness -- 2 => _('No cable connected').freeze, -- 3 => _('Not connected').freeze, -- 4 => _('Preparing to connect').freeze, -- 5 => _('Configuring').freeze, -- 6 => _('Waiting for authentication').freeze, -- 7 => _('Obtaining an IP address').freeze, -- 8 => _('Connected').freeze, -- 9 => _('Connection failed').freeze -- }.freeze -- -- def initialize(obj, device, props) -- device.default_iface = WIRED -- -- @nm_obj = obj -- @name = props.Get(DEVICE, 'Interface')[0] -- @mac = props.Get(WIRED, 'HwAddress')[0] -- state = props.Get(WIRED, 'State')[0] -- -- # Lookup by name -- @@devices[@name] = self -- -- state_updated(state) -- -- # Register a listener for state changes -- device.on_signal('PropertiesChanged') { |props| -- if props.has_key?('State') then -- state_updated(props['State']) -- -- # Notify registered state change handlers -- @@listeners.each { |cb| cb.call(self) } -- end -- } -- end -- -- def self.all_devices() -- @@devices.values -- end -- -- def self.add_listener(cb) -- @@listeners.push(cb) -- end -- -- def self.[](name) -- @@devices[name] -- end -- -- def activate(auto, ip, prefix, gateway, dns) -- # Get an IP config dependent on whether @ip_address is IPv4 or IPv6 -- ip_config = auto ? get_config_auto : -- ip.ipv4? ? get_config_ipv4() : get_config_ipv6() -- -- # Create a new NetworkManager connection object -- settings = @@nm_service.object( -- '/org/freedesktop/NetworkManagerSettings') -- settings.introspect() -- settings.default_iface = SETTINGS -- -- uuid = `uuidgen`.chomp -- settings.AddConnection( -- 'connection' => { -- 'uuid' => uuid, -- 'id' => 'P2V', -- 'type' => '802-3-ethernet', -- 'autoconnect' => false -- }, -- '802-3-ethernet' => {}, -- 'ipv4' => ip_config['ipv4'], -- 'ipv6' => ip_config['ipv6'] -- ) -- -- # Find the connection we just created -- # XXX: There must be a better way to get this! -- conn = settings.ListConnections()[0].each { |i| -- conn = @@nm_service.object(i) -- conn.introspect -- conn.default_iface = CONNECTION -- -- break i if conn.GetSettings()[0]['connection']['uuid'] == uuid -- } -- -- nm = @@nm_service.object('/org/freedesktop/NetworkManager') -- nm.introspect -- nm.default_iface = NETWORKMANAGER -- nm.ActivateConnection('org.freedesktop.NetworkManagerSystemSettings', -- conn, @nm_obj, '/') -- end -- -- private -- -- def state_updated(state) -- @connected = state > 2 -- @state = STATES[state] -- -- if state == STATE_ACTIVATED then -- @activated = true -- elsif state == STATE_FAILED then -- @activated = false -- else -- @activated = nil -- end -- end -- -- def get_config_auto -- { -- 'ipv4' => { -- 'method' => 'auto' -- }, -- 'ipv6' => { -- 'method' => 'ignore' -- } -- } -- end -- -- def ipv4_to_nm(ipaddr) -- ipaddr.hton().unpack("I")[0] -- end -- -- def get_config_ipv4 -- addresses = [[ ipv4_to_nm(@ip_address), @ip_prefix, -- ipv4_to_nm(@ip_gateway) ]] -- -- dns = [] -- @ip_dns.each{ |ipaddr| -- # Only use IPv4 DNS servers -- next unless ipaddr.ipv4? -- dns.push(ipv4_to_nm(ipaddr)) -- } -- -- { -- 'ipv4' => { -- 'method' => 'manual', -- 'addresses' => [ 'aau', addresses ], -- 'dns' => [ 'au', dns ] -- }, -- 'ipv6' => { -- 'method' => 'ignore' -- } -- } -- end -- -- def ipv6_to_nm(ipaddr) -- ipaddr.hton().unpack("c*") -- end -- -- def get_config_ipv6 -- dns = [] -- @ip_dns.each { |ipaddr| -- # Only use IPv6 DNS servers -- next unless ipaddr.ipv6? -- dns.push(ipv6_to_nm(ipaddr)) -- } -- -- { -- 'ipv4' => { -- 'method' => 'disabled' -- }, -- 'ipv6' => { -- 'method' => 'manual', -- 'addresses' => [ 'a(ayu)', [[ -- ipv6_to_nm(@ip_address), -- @ip_prefix -- ]] ], -- 'routes' => [ 'a(ayuayu)', [[ -- [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], 0, -- ipv6_to_nm(@ip_gateway), 1024 -- ]] ], -- 'dns' => [ 'aay', dns ] -- } -- } -- end -- -- # Class initialization -- begin -- dbus = DBus::SystemBus.instance() -- dbus.glibize() -- @@nm_service = dbus.service(NETWORKMANAGER) -- -- nm = @@nm_service.object('/org/freedesktop/NetworkManager') -- nm.introspect -- nm.default_iface = NETWORKMANAGER -- -- @@devices = {} -- nm.GetDevices()[0].each { |obj| -- device = @@nm_service.object(obj) -- device.introspect -- -- props = device[PROPERTIES] -- type = props.Get(DEVICE, 'DeviceType')[0] -- -- # We only support ethernet devices -- next unless type == TYPE_ETHERNET -- -- # Constructor will add it to @@devices -- self.new(obj, device, props) -- } -- -- @@listeners = [] -- end --end -- --end #module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/connect.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/connect.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/connect.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/connect.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,179 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'gtk2' -- --require 'virt-p2v/connection' -- --module VirtP2V::UI::Connect -- include GetText -- -- UI_STATE_INVALID = 0 -- UI_STATE_VALID = 1 -- UI_STATE_ACTIVATING = 2 -- UI_STATE_COMPLETE = 3 -- -- EV_HOSTNAME = 0 -- EV_USERNAME = 1 -- EV_PASSWORD = 2 -- EV_BUTTON = 3 -- EV_ACTIVATION = 4 -- -- def self.event(event, status) -- case event -- when EV_HOSTNAME -- @hostname = status -- when EV_USERNAME -- @username = status -- when EV_PASSWORD -- @password = status -- when EV_BUTTON, EV_ACTIVATION -- # Persistent state not required -- else -- raise "Unexpected event: #{event}" -- end -- -- valid = @hostname && @username && @password -- -- case @state -- when UI_STATE_INVALID -- set_state(UI_STATE_VALID) if valid -- when UI_STATE_VALID -- if !valid then -- set_state(UI_STATE_INVALID) -- elsif event == EV_BUTTON -- set_state(UI_STATE_ACTIVATING) -- end -- when UI_STATE_ACTIVATING -- # UI is disabled, so we shouldn't be getting any events other than -- # EV_ACTIVATION -- raise "Unexpected event: #{event}" unless event == EV_ACTIVATION -- -- set_state(status ? UI_STATE_COMPLETE : UI_STATE_VALID) -- else -- raise "Unexpected UI state: #{@state}" -- end -- end -- -- def self.init(ui, converter) -- @hostname_ui = ui.get_object('server_hostname') -- @username_ui = ui.get_object('server_username') -- @password_ui = ui.get_object('server_password') -- @connect_frame = ui.get_object('connect_frame') -- @connect_button = ui.get_object('connect_button') -- @connect_error = ui.get_object('connect_error') -- -- ui.register_handler('server_hostname_changed', -- method(:server_hostname_changed)) -- ui.register_handler('server_username_changed', -- method(:server_username_changed)) -- ui.register_handler('server_password_changed', -- method(:server_password_changed)) -- ui.register_handler('connect_button_clicked', -- method(:connect_button_clicked)) -- -- @hostname = @hostname_ui.text.strip.length > 0 -- @username = @username_ui.text.strip.length > 0 -- @password = @password_ui.text.length > 0 # Allow spaces in passwords -- @state = UI_STATE_INVALID -- -- @ui = ui -- @converter = converter -- end -- -- def self.set_state(state) -- # Don't do anything if state hasn't changed -- return if state == @state -- -- case state -- when UI_STATE_INVALID -- @connect_frame.sensitive = true -- @connect_button.sensitive = false -- -- @state = UI_STATE_INVALID -- when UI_STATE_VALID -- @connect_frame.sensitive = true -- @connect_button.sensitive = true -- -- @state = UI_STATE_VALID -- when UI_STATE_ACTIVATING -- @connect_frame.sensitive = false -- @connect_button.sensitive = false -- @connect_error.text = '' -- -- @state = UI_STATE_ACTIVATING -- when UI_STATE_COMPLETE -- # Activate the next page -- @ui.active_page = 'conversion_win' -- -- # ... then leave this one as we hope to find it if we come back here -- set_state(UI_STATE_VALID) -- else -- raise "Attempt to set unexpected UI state: #{@state}" -- end -- end -- -- def self.server_hostname_changed -- event(EV_HOSTNAME, @hostname_ui.text.strip.length > 0) -- end -- -- def self.server_username_changed -- event(EV_USERNAME, @username_ui.text.strip.length > 0) -- end -- -- def self.server_password_changed -- event(EV_PASSWORD, @password_ui.text.length > 0) -- end -- -- def self.connect_button_clicked -- event(EV_BUTTON, true) -- -- hostname = @hostname_ui.text.strip -- username = @username_ui.text.strip -- password = @password_ui.text -- connection = VirtP2V::Connection.new(hostname, username, password) \ -- { |result| -- case result -- when true -- @converter.connection = connection -- connection.connect { |result| -- case result -- when true -- event(EV_ACTIVATION, true) -- when VirtP2V::Connection::RemoteError -- @connect_error.text = _('Failed to start ' + -- 'virt-p2v-server on remote ' + -- 'server') -- event(EV_ACTIVATION, false) -- else -- @connect_error.text = result.message -- event(EV_ACTIVATION, false) -- end -- } -- when VirtP2V::Connection::InvalidHostnameError -- @connect_error.text = _"Unable to connect to #{hostname}" -- event(EV_ACTIVATION, false) -- when VirtP2V::Connection::InvalidCredentialsError -- @connect_error.text = _"Invalid username/password" -- event(EV_ACTIVATION, false) -- else -- raise result -- end -- } -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/convert.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/convert.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/convert.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/convert.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,422 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'gtk2' -- --require 'virt-p2v/blockdevice' --require 'virt-p2v/netdevice' -- --module VirtP2V::UI::Convert -- include GetText -- -- CONVERT_PROFILE_NAME = 0 -- -- CONVERT_NETWORK_CONVERT = 0 -- CONVERT_NETWORK_DEVICE = 1 -- -- CONVERT_FIXED_CONVERT = 0 -- CONVERT_FIXED_DEVICE = 1 -- CONVERT_FIXED_PROGRESS = 2 -- -- CONVERT_REMOVABLE_CONVERT = 0 -- CONVERT_REMOVABLE_DEVICE = 1 -- CONVERT_REMOVABLE_TYPE = 2 -- -- UI_STATE_INVALID = 0 -- UI_STATE_VALID = 1 -- UI_STATE_CONNECTING = 2 -- UI_STATE_CONVERTING = 3 -- UI_STATE_COMPLETE = 4 -- -- EV_VALID = 0 -- EV_BUTTON = 1 -- EV_CONNECTION = 2 -- EV_CONVERTED = 3 -- -- def self.init(ui, converter) -- # ListStores -- @profiles = ui.get_object('convert_profile_list') -- @nics = ui.get_object('convert_network_list') -- @fixeds = ui.get_object('convert_fixed_list') -- @removables = ui.get_object('convert_removable_list') -- -- # Widgets -- @profile = ui.get_object('convert_profile') -- @name = ui.get_object('convert_name') -- @cpus = ui.get_object('convert_cpus') -- @memory = ui.get_object('convert_memory') -- @editable = ui.get_object('convert_editable') -- @button = ui.get_object('convert_button') -- @status = ui.get_object('convert_status') -- -- # Get initial values from converter -- @name.text = converter.name -- @cpus.text = converter.cpus.to_s -- @memory.text = (converter.memory / 1024 / 1024).to_s -- -- # Populate profiles on connection -- converter.on_connection { |conn| -- conn.on_connect { |cb| -- conn.list_profiles { |profiles| -- cb.call(RuntimeError.new(_('Remote server does not ' + -- 'define any profiles in ' + -- '/etc/virt-v2v.conf'))) \ -- if profiles.kind_of?(Exception) or profiles.empty? -- -- selected = @profile.active_iter -- selected = selected[CONVERT_PROFILE_NAME] \ -- unless selected.nil? -- -- @profiles.clear -- profiles.each { |i| -- profile = @profiles.append -- profile[CONVERT_PROFILE_NAME] = i -- @profile.active_iter = profile if i == selected -- } -- -- cb.call(true) -- } -- } -- } -- -- VirtP2V::FixedBlockDevice.all_devices.each { |dev| -- fixed = @fixeds.append -- fixed[CONVERT_FIXED_CONVERT] = true -- fixed[CONVERT_FIXED_DEVICE] = dev.device -- fixed[CONVERT_FIXED_PROGRESS] = 0 -- } -- -- VirtP2V::RemovableBlockDevice.all_devices.each { |dev| -- rem = @removables.append -- rem[CONVERT_REMOVABLE_CONVERT] = true -- rem[CONVERT_REMOVABLE_DEVICE] = dev.device -- rem[CONVERT_REMOVABLE_TYPE] = dev.type -- } -- -- VirtP2V::NetworkDevice.all_devices.each { |dev| -- nic = @nics.append -- nic[CONVERT_NETWORK_CONVERT] = dev.connected -- nic[CONVERT_NETWORK_DEVICE] = dev.name -- } -- -- # Event handlers -- ui.register_handler('convert_profile_changed', -- method(:update_values)) -- ui.register_handler('convert_name_changed', -- method(:update_values)) -- ui.register_handler('convert_cpus_changed', -- method(:convert_cpus_changed)) -- ui.register_handler('convert_memory_changed', -- method(:convert_memory_changed)) -- ui.register_handler('convert_fixed_list_row_changed', -- method(:convert_fixed_list_row_changed)) -- ui.register_handler('convert_removable_list_row_changed', -- method(:update_values)) -- ui.register_handler('convert_network_list_row_changed', -- method(:update_values)) -- ui.register_handler('convert_fixed_select_toggled', -- method(:convert_fixed_select_toggled)) -- ui.register_handler('convert_removable_select_toggled', -- method(:convert_removable_select_toggled)) -- ui.register_handler('convert_network_select_toggled', -- method(:convert_network_select_toggled)) -- ui.register_handler('convert_button_clicked', -- method(:convert_button_clicked)) -- -- @state = nil -- set_state(UI_STATE_INVALID) -- update_values -- -- @ui = ui -- @converter = converter -- end -- -- def self.event(event, status) -- case @state -- when UI_STATE_INVALID -- case event -- when EV_VALID -- set_state(UI_STATE_VALID) if status -- else -- raise "Unexpected event: #{@state} #{event}" -- end -- when UI_STATE_VALID -- case event -- when EV_VALID -- set_state(UI_STATE_INVALID) if !status -- when EV_BUTTON -- if @converter.connection.connected then -- set_state(UI_STATE_CONVERTING) -- convert -- else -- set_state(UI_STATE_CONNECTING) -- reconnect -- end -- else -- raise "Unexpected event: #{@state} #{event}" -- end -- when UI_STATE_CONNECTING -- case event -- when EV_CONNECTION -- if status then -- set_state(UI_STATE_CONVERTING) -- convert -- else -- set_state(UI_STATE_VALID) -- end -- when EV_VALID -- # update_values will be called when the profile list is cleared -- # and repopulated during connection. Untidy, but ignore it. -- else -- raise "Unexpected event: #{@state} #{event}" \ -- unless event == EV_CONNECTION -- end -- when UI_STATE_CONVERTING -- case event -- when EV_CONVERTED -- if status then -- set_state(UI_STATE_COMPLETE) -- else -- set_state(UI_STATE_VALID) -- end -- when EV_VALID -- # update_values will be called when the list stores are updated. -- # Untidy, but ignore it -- else -- raise "Unexpected event: #{@state} #{event}" -- end -- else -- raise "Unexpected UI state: #{@state}" -- end -- end -- -- def self.set_state(state) -- # Don't do anything if state hasn't changed -- return if state == @state -- @state = state -- -- case @state -- when UI_STATE_INVALID -- @editable.sensitive = true -- @button.sensitive = false -- when UI_STATE_VALID -- @editable.sensitive = true -- @button.sensitive = true -- when UI_STATE_CONNECTING -- @status.text = _'Failed to start virt-p2v-server on remote server' -- @editable.sensitive = false -- @button.sensitive = false -- when UI_STATE_CONVERTING -- @editable.sensitive = false -- @button.sensitive = false -- when UI_STATE_COMPLETE -- @ui.active_page = 'success_win' -- -- # ... then leave this one as we hope to find it if we come back here -- set_state(UI_STATE_VALID) -- else -- raise "Attempt to set unexpected UI state: #{@state}" -- end -- end -- -- def self.convert -- @converter.convert( -- # status -- lambda { |msg| -- @status.text = msg -- }, -- # progress -- lambda { |dev, progress| -- @fixeds.each { |model, path, iter| -- next unless iter[CONVERT_FIXED_DEVICE] == dev -- -- iter[CONVERT_FIXED_PROGRESS] = progress -- break -- } -- } -- ) { |result| -- # N.B. Explicit test against true is required here, as result may be -- # an Exception, which would also return true if evaluated alone -- if result == true then -- @status.text = '' -- event(EV_CONVERTED, true) -- else -- @status.text = result.message -- event(EV_CONVERTED, false) -- end -- } -- end -- -- def self.reconnect -- @status.text = _('Reconnecting') -- @converter.connection.connect { |result| -- if result == true then -- event(EV_CONNECTION, true) -- else -- @status.text = -- _'Failed to start virt-p2v-server on remote server' -- event(EV_CONNECTION, false) -- end -- } -- end -- -- def self.convert_fixed_list_row_changed(model, path, iter) -- update_values -- end -- -- class InvalidUIState < StandardError; end -- -- def self.update_values -- valid = nil -- begin -- # Check there's a profile selected -- profile = @profile.active_iter -- raise InvalidUIState if profile.nil? -- @converter.profile = profile[CONVERT_PROFILE_NAME] -- -- # Check there's a name set -- name = @name.text -- raise InvalidUIState if name.nil? || name.strip.length == 0 -- @converter.name = name -- -- # Check cpus and memory are set and numeric -- cpus = @cpus.text -- raise InvalidUIState if cpus.nil? -- cpus = Integer(cpus) rescue nil -- raise InvalidUIState if cpus.nil? -- @converter.cpus = cpus -- -- memory = @memory.text -- raise InvalidUIState if memory.nil? -- memory = Integer(memory) rescue nil -- raise InvalidUIState if memory.nil? -- @converter.memory = memory * 1024 * 1024 -- -- # Check that at least 1 fixed storage device is selected -- fixed = false -- @converter.disks.clear -- @fixeds.each { |model, path, iter| -- if iter[CONVERT_FIXED_CONVERT] then -- fixed = true -- @converter.disks << iter[CONVERT_FIXED_DEVICE] -- end -- } -- raise InvalidUIState unless fixed -- -- # Populate removables and nics, although these aren't required to be -- # selected for the ui state to be valid -- @converter.removables.clear -- @removables.each { |model, path, iter| -- if iter[CONVERT_REMOVABLE_CONVERT] then -- @converter.removables << iter[CONVERT_REMOVABLE_DEVICE] -- end -- } -- @converter.nics.clear -- @nics.each { |model, path, iter| -- if iter[CONVERT_NETWORK_CONVERT] then -- @converter.nics << iter[CONVERT_NETWORK_DEVICE] -- end -- } -- rescue InvalidUIState -- valid = false -- end -- valid = true if valid.nil? -- -- event(EV_VALID, valid) -- end -- -- def self.valid? -- # Check there's a profile selected -- profile = @profile.active_iter -- return false if profile.nil? -- -- # Check there's a name set -- name = @name.text -- return false if name.nil? -- return false unless name.strip.length > 0 -- -- # Check cpus and memory are set and numeric -- cpus = @cpus.text -- return false if cpus.nil? -- cpus = Integer(cpus) rescue nil -- return false if cpus.nil? -- -- memory = @memory.text -- return false if memory.nil? -- memory = Integer(memory) rescue nil -- return false if memory.nil? -- -- # Check that at least 1 fixed storage device is selected -- fixed = false -- @fixeds.each { |model, path, iter| -- if iter[CONVERT_FIXED_CONVERT] then -- fixed = true -- break -- end -- } -- return false unless fixed -- -- return true -- end -- -- def self.convert_cpus_changed -- check_numeric(@cpus) -- end -- -- def self.convert_memory_changed -- check_numeric(@memory) -- end -- -- def self.check_numeric(widget) -- value = widget.text -- if value.nil? ? false : begin -- value = Integer(value) -- value > 0 -- rescue -- false -- end -- then -- widget.secondary_icon_name = nil -- else -- widget.secondary_icon_name = 'gtk-dialog-warning' -- widget.secondary_icon_tooltip_text = -- _('Value must be an integer greater than 0') -- end -- -- update_values -- end -- -- def self.convert_fixed_select_toggled(widget, path) -- iter = @fixeds.get_iter(path) -- iter[CONVERT_FIXED_CONVERT] = !iter[CONVERT_FIXED_CONVERT] -- end -- -- def self.convert_removable_select_toggled(widget, path) -- iter = @removables.get_iter(path) -- iter[CONVERT_REMOVABLE_CONVERT] = !iter[CONVERT_REMOVABLE_CONVERT] -- end -- -- def self.convert_network_select_toggled(widget, path) -- iter = @nics.get_iter(path) -- iter[CONVERT_NETWORK_CONVERT] = !iter[CONVERT_NETWORK_CONVERT] -- end -- -- def self.convert_button_clicked -- event(EV_BUTTON, true) -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/main.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/main.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/main.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/main.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,110 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gtk2' --require 'virt-p2v/gtk-queue' -- --module VirtP2V --module UI -- --class Main -- def get_object(name) -- o = @builder.get_object(name) -- raise "Object #{name} not found in ui" unless o != nil -- -- return o -- end -- -- def show -- @builder.connect_signals { |signal| -- raise "No hander for signal #{signal}" \ -- unless @signal_handlers.has_key?(signal) -- -- @signal_handlers[signal] -- } -- -- # Display the main window -- main = self.get_object('main_window') -- main.show_all() -- end -- -- def register_handler(signal, handler) -- @signal_handlers[signal] = handler -- end -- -- def main_loop -- Gtk.main_with_queue 100 -- end -- -- def active_page=(name) -- raise "Attempt to activate non-existent page #{name}" \ -- unless @pages.has_key?(name) -- -- page = @pages[name] -- -- @page_vbox = self.get_object('page_vbox') unless defined? @page_vbox -- @page_vbox.remove(@selected) if defined? @selected -- @page_vbox.add(page) -- @selected = page -- end -- -- def active_page -- return @selected -- end -- -- def quit -- Gtk.main_quit() -- end -- -- private -- -- def initialize -- @builder = Gtk::Builder.new() -- -- # Find the UI definition in $LOAD_PATH -- i = $LOAD_PATH.index { |path| -- File.exists?(path + '/virt-p2v/ui/p2v.ui') -- } -- @builder.add_from_file($LOAD_PATH[i] + '/virt-p2v/ui/p2v.ui') -- -- @signal_handlers = {} -- self.register_handler('gtk_main_quit', method(:quit)) -- -- # Configure the Wizard page frame -- # Can't change these colours from glade for some reason -- self.get_object('title_background'). -- modify_bg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -- self.get_object('page_frame'). -- modify_fg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -- -- # Load all pages from glade -- @pages = {} -- [ 'network_win', 'server_win', -- 'conversion_win', 'success_win' ].each { |name| -- page = self.get_object(name) -- -- child = page.children[0] -- page.remove(child) -- @pages[name] = child -- } -- -- # Set a default first page -- self.active_page = 'network_win' -- end --end -- --end # UI --end # VirtP2V -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/network.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/network.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/network.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/network.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,317 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'gtk2' --require 'ipaddr' --require 'virt-p2v/netdevice' -- --module VirtP2V::UI::Network -- include GetText -- -- # The indices of Device List colums, taken from glade -- DEVCOL_NAME = 0 -- DEVCOL_MAC = 1 -- DEVCOL_STATUS = 2 -- DEVCOL_AVAILABLE = 3 -- -- UI_STATE_INVALID = 0 -- UI_STATE_VALID = 1 -- UI_STATE_ACTIVATING = 2 -- UI_STATE_COMPLETE = 3 -- -- EV_IP_CONFIG = 0 -- EV_SELECTION = 1 -- EV_BUTTON = 2 -- EV_ACTIVATION = 3 -- -- def self.event(event, status) -- case event -- when EV_IP_CONFIG -- @ip_config = status -- when EV_SELECTION -- @selected = status -- when EV_BUTTON, EV_ACTIVATION -- # Persistent state not required -- else -- raise "Unexpected NetworkConfig event: #{event}" -- end -- -- case @state -- when UI_STATE_INVALID -- if @ip_config && @selected then -- set_state(UI_STATE_VALID) -- end -- when UI_STATE_VALID -- if !@ip_config || !@selected then -- set_state(UI_STATE_INVALID) -- elsif event == EV_BUTTON -- set_state(UI_STATE_ACTIVATING) -- end -- when UI_STATE_ACTIVATING -- # UI is disabled and we're waiting for EV_ACTIVATION, but we could -- # also get events triggered by NetworkManager signals. -- -- if event == EV_ACTIVATION then -- if status then -- set_state(UI_STATE_COMPLETE) -- else -- set_state(UI_STATE_VALID) -- end -- elsif !@ip_config || !@selected then -- set_state(UI_STATE_INVALID) -- end -- else -- raise "Unexpected NetworkConfig UI state: #{@state}" -- end -- end -- -- def self.init(ui) -- # Configure initial defaults -- @manual_mode = false -- @ip_address = nil -- @ip_prefix = nil -- @ip_gateway = nil -- @ip_dns = nil -- @state = UI_STATE_INVALID -- @ip_config = false -- @selected = false -- -- @network_button = ui.get_object('network_button') -- @device_list_frame = ui.get_object('device_list_frame') -- @ipv4_config_frame = ui.get_object('ipv4_config_frame') -- @dl_selection = ui.get_object('network_device_list_view'). -- selection -- @device_list = ui.get_object('network_device_list') -- @manual_ui = ui.get_object('ip_manual') -- @ip_address_ui = ui.get_object('ip_address') -- @ip_prefix_ui = ui.get_object('ip_prefix') -- @ip_gateway_ui = ui.get_object('ip_gateway') -- @ip_dns_ui = ui.get_object('ip_dns') -- -- ui.register_handler('network_button_clicked', -- method(:network_button_clicked)) -- ui.register_handler('ip_auto_toggled', -- method(:ip_auto_toggled)) -- ui.register_handler('ip_address_changed', -- method(:ip_address_changed)) -- ui.register_handler('ip_prefix_changed', -- method(:ip_prefix_changed)) -- ui.register_handler('ip_gateway_changed', -- method(:ip_gateway_changed)) -- ui.register_handler('ip_dns_changed', -- method(:ip_dns_changed)) -- -- check_config_valid() -- -- # The user may only select a single device -- @dl_selection.mode = Gtk::SELECTION_SINGLE -- -- @dl_selection.set_select_function { |selection, model, path, current| -- iter = model.get_iter(path) -- -- # This is a toggle event. The new state is the opposite of the -- # current state -- new_state = !current -- -- # Don't allow the user to select an unavailable device -- if new_state then -- # Notify the config UI if we're selecting a device -- if iter[DEVCOL_AVAILABLE] then -- event(EV_SELECTION, true) -- end -- -- iter[DEVCOL_AVAILABLE] -- -- # Always allow the user to unselect a device -- else -- # Notify the UI that we're unselecting the device -- event(EV_SELECTION, false) -- true -- end -- } -- -- # Store a map of device names to row references -- refs = {} -- -- # Populate the device list with all detected network devices -- VirtP2V::NetworkDevice.all_devices.each { |device| -- iter = @device_list.append() -- -- iter[DEVCOL_NAME] = device.name -- iter[DEVCOL_MAC] = device.mac -- iter[DEVCOL_STATUS] = device.state -- iter[DEVCOL_AVAILABLE] = device.connected -- -- # Store a stable reference to this row in the TreeModel -- refs[device.name] = -- Gtk::TreeRowReference.new(@device_list, iter.path) -- } -- -- # Listen for updates to device states -- VirtP2V::NetworkDevice.add_listener( lambda { |device| -- path = refs[device.name].path -- -- iter = @device_list.get_iter(path) -- iter[DEVCOL_STATUS] = device.state -- iter[DEVCOL_AVAILABLE] = device.connected -- -- # Notify the UI that a device was activated -- event(EV_ACTIVATION, device.activated) \ -- unless device.activated.nil? -- -- # Unselect the path if it was previously selected and is no -- # longer available -- if !device.connected && @dl_selection.iter_is_selected?(iter) -- then -- @dl_selection.unselect_all() -- event(EV_SELECTION, false) -- end -- } ) -- -- @ui = ui -- end -- -- def self.set_state(state) -- # Don't do anything if state hasn't changed -- return if state == @state -- -- case state -- when UI_STATE_INVALID -- @network_button.sensitive = false -- @device_list_frame.sensitive = true -- @ipv4_config_frame.sensitive = true -- -- @state = UI_STATE_INVALID -- when UI_STATE_VALID -- @network_button.sensitive = true -- @device_list_frame.sensitive = true -- @ipv4_config_frame.sensitive = true -- -- @state = UI_STATE_VALID -- when UI_STATE_ACTIVATING -- @network_button.sensitive = false -- @device_list_frame.sensitive = false -- @ipv4_config_frame.sensitive = false -- -- @state = UI_STATE_ACTIVATING -- when UI_STATE_COMPLETE -- # Activate the next page -- @ui.active_page = 'server_win' -- -- # ... then leave this one as we hope to find it if we come back here -- set_state(UI_STATE_VALID) -- else -- raise "Attempt to set unexected NetworkConfig UI state: #{@state}" -- end -- end -- -- def self.network_button_clicked -- event(EV_BUTTON, true) -- -- iter = @dl_selection.selected -- return if iter.nil? # Shouldn't be possible -- name = iter[DEVCOL_NAME] -- -- VirtP2V::NetworkDevice[name].activate(!@manual_mode, @ip_address, -- @ip_prefix, @ip_gateway, @ip_dns) -- end -- -- def self.ip_auto_toggled -- @manual_mode = !@manual_mode -- @manual_ui.sensitive = @manual_mode -- -- check_config_valid() -- end -- -- def self.ip_address_changed -- @ip_address = parse_ip(@ip_address_ui) -- -- check_config_valid() -- end -- -- # Check IP prefix is a positive integer -- # We check that it's appropriate to the address class in use elsewhere -- def self.ip_prefix_changed -- begin -- @ip_prefix = Integer(@ip_prefix_ui.text) -- rescue ArgumentError => e -- # Ignore the result if it didn't parse -- @ip_prefix = nil -- return -- end -- -- if @ip_prefix < 0 then -- @ip_prefix = nil -- end -- -- check_config_valid() -- end -- -- def self.ip_gateway_changed -- @ip_gateway = parse_ip(@ip_gateway_ui) -- -- check_config_valid() -- end -- -- # Parse an IP address understood by IPAddr -- def self.parse_ip(entry) -- a = entry.text.strip -- -- begin -- ip = IPAddr.new(a) -- rescue ArgumentError => e -- # Ignore the result if it didn't parse -- ip = nil -- end -- -- return ip -- end -- -- def self.ip_dns_changed -- dns = @ip_dns_ui.text -- -- @ip_dns = [] -- dns.split(/\s*,+\s*/).each { |entry| -- begin -- @ip_dns << IPAddr.new(entry) -- rescue ArgumentError => e -- @ip_dns = () -- break -- end -- } -- end -- -- def self.check_config_valid -- if !@manual_mode || (!@ip_address.nil? && -- !@ip_prefix.nil? && -- !@ip_gateway.nil?) then -- if @manual_mode then -- # Check that IPv4/IPv6 is used consistently -- if @ip_address.ipv4? then -- event(EV_IP_CONFIG, @ip_gateway.ipv4? && @ip_prefix < 32) -- else -- event(EV_IP_CONFIG, @ip_gateway.ipv6? && @ip_prefix < 128) -- end -- else -- event(EV_IP_CONFIG, true) -- end -- else -- event(EV_IP_CONFIG, false) -- end -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/p2v.ui virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/p2v.ui ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/p2v.ui 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/p2v.ui 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1031 +0,0 @@ -- -- -- -- -- -- False -- center-always -- False -- -- -- -- True -- 0 -- 0 -- -- -- 800 -- 600 -- True -- 0 -- 0 -- in -- -- -- True -- vertical -- 2 -- -- -- True -- -- -- True -- 0 -- 0 -- 5 -- 5 -- <span weight='bold' foreground='white' size='xx-large'>virt-p2v</span> -- True -- -- -- -- -- False -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 800 -- 550 -- -- -- True -- vertical -- -- -- True -- 0 -- 1 -- 11 -- Welcome to virt-p2v. -- -- -- False -- 0 -- -- -- -- -- True -- 0 -- out -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- network_device_list -- False -- 0 -- -- -- Device -- -- -- -- 3 -- 0 -- -- -- -- -- -- -- 18 -- MAC Address -- -- -- -- 3 -- 1 -- -- -- -- -- -- -- Status -- -- -- -- 3 -- 2 -- -- -- -- -- -- -- -- -- -- -- True -- <b>Select a network device</b> -- True -- -- -- -- -- 1 -- -- -- -- -- True -- 0 -- in -- -- -- True -- 12 -- -- -- True -- vertical -- -- -- Automatic configuration -- True -- True -- False -- True -- True -- -- -- -- 0 -- -- -- -- -- True -- False -- 3 -- 2 -- 2 -- -- -- True -- 0 -- IP Address: -- -- -- GTK_FILL -- GTK_FILL -- -- -- -- -- True -- 0 -- Gateway: -- -- -- 1 -- 2 -- GTK_FILL -- GTK_FILL -- -- -- -- -- True -- 0 -- DNS Servers: -- -- -- 2 -- 3 -- GTK_FILL -- GTK_FILL -- -- -- -- -- True -- True -- 39 -- 39 -- True -- -- -- -- 1 -- 2 -- 1 -- 2 -- GTK_FILL -- -- -- -- -- True -- True -- 35 -- -- -- -- 1 -- 2 -- 2 -- 3 -- GTK_FILL -- -- -- -- -- True -- 2 -- -- -- True -- True -- 39 -- 39 -- True -- -- -- -- 0 -- -- -- -- -- True -- 0 -- Prefix: -- -- -- False -- 1 -- -- -- -- -- True -- True -- 2 -- 2 -- True -- -- -- -- False -- 2 -- -- -- -- -- 1 -- 2 -- GTK_FILL -- -- -- -- -- 1 -- -- -- -- -- -- -- -- -- True -- <b>IP Configuration</b> -- True -- -- -- -- -- False -- 2 -- -- -- -- -- True -- 1 -- 0 -- -- -- Use these network settings -- True -- False -- True -- True -- -- -- -- -- -- False -- 3 -- -- -- -- -- -- -- -- -- True -- vertical -- -- -- True -- 0 -- 0 -- -- -- True -- 0 -- in -- -- -- True -- 12 -- -- -- True -- vertical -- -- -- True -- 3 -- 2 -- 2 -- -- -- True -- 0 -- Hostname: -- -- -- -- -- -- -- -- -- True -- 0 -- Username: -- -- -- 1 -- 2 -- -- -- -- -- -- -- True -- 0 -- Password: -- -- -- 2 -- 3 -- -- -- -- -- -- -- True -- True -- -- 40 -- -- -- -- 1 -- 2 -- -- -- -- -- -- True -- True -- False -- -- 40 -- -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- -- True -- True -- -- 40 -- root -- -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- -- False -- 0 -- -- -- -- -- True -- 0 -- 0 -- 8 -- 8 -- -- -- -- -- -- 1 -- -- -- -- -- -- -- -- -- True -- <b>Connect to conversion server</b> -- True -- -- -- -- -- -- -- 0 -- -- -- -- -- True -- 1 -- 0 -- 0 -- 0 -- -- -- Connect -- True -- False -- True -- True -- -- -- -- -- -- False -- 1 -- -- -- -- -- -- -- -- -- True -- vertical -- -- -- True -- -- -- True -- 0 -- out -- -- -- True -- 0 -- 0 -- 0 -- 0 -- 12 -- -- -- True -- 4 -- 2 -- 2 -- -- -- True -- 0 -- Destination Profile: -- -- -- -- -- True -- convert_profile_list -- -- -- -- -- 0 -- -- -- -- -- 1 -- 2 -- -- -- -- -- True -- 0 -- Memory (MB): -- -- -- 3 -- 4 -- -- -- -- -- True -- True -- -- True -- -- -- -- 1 -- 2 -- 3 -- 4 -- -- -- -- -- True -- 0 -- Number of CPUs: -- -- -- 2 -- 3 -- -- -- -- -- True -- 0 -- Name -- -- -- 1 -- 2 -- -- -- -- -- True -- True -- -- True -- -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- True -- True -- -- True -- -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- -- -- -- -- True -- <b>Target properties</b> -- True -- -- -- -- -- False -- False -- 0 -- -- -- -- -- True -- vertical -- -- -- True -- 0 -- out -- -- -- True -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- convert_fixed_list -- False -- 0 -- -- -- Convert -- True -- -- -- -- -- -- 0 -- -- -- -- -- -- -- Device -- -- -- -- 1 -- -- -- -- -- -- -- Transfer Progress -- True -- -- -- -- 2 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- <b>Fixed Storage</b> -- True -- -- -- -- -- 0 -- -- -- -- -- True -- 0 -- out -- -- -- True -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- convert_removable_list -- -- -- Convert -- -- -- -- -- -- 0 -- -- -- -- -- -- -- Device -- -- -- -- 1 -- -- -- -- -- -- -- Type -- -- -- -- 2 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- <b>Removable Media</b> -- True -- -- -- -- -- 1 -- -- -- -- -- True -- 0 -- out -- -- -- True -- 1 -- 1 -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- convert_network_list -- False -- 0 -- -- -- Convert -- -- -- -- -- -- 0 -- -- -- -- -- -- -- Device -- -- -- -- 1 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- <b>Network Interfaces</b> -- True -- -- -- -- -- 2 -- -- -- -- -- 1 -- -- -- -- -- 0 -- -- -- -- -- True -- -- -- True -- 0 -- 12 -- -- -- -- -- -- 0 -- -- -- -- -- Convert -- True -- True -- True -- -- -- -- False -- False -- 1 -- -- -- -- -- False -- False -- 1 -- -- -- -- -- -- -- -- -- True -- vertical -- -- -- True -- A guest has been successfully created on the target server. -- --Remove the temporary boot device from this machine and press 'Reboot' to continue. -- center -- -- -- 0 -- -- -- -- -- True -- 0.25 -- 0.25 -- -- -- Reboot -- True -- True -- True -- -- -- -- -- -- 1 -- -- -- -- -- -- -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/success.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/success.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/success.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/success.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,33 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' -- --module VirtP2V::UI::Success -- include GetText -- -- def self.init(ui) -- ui.register_handler('reboot_button_clicked', -- method(:reboot_button_clicked)) -- -- @ui = ui -- end -- -- def self.reboot_button_clicked -- @ui.quit -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/Manifest virt-v2v-v0.8.1.new/p2v-client/Manifest ---- virt-v2v-v0.8.1/p2v-client/Manifest 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/Manifest 1970-01-01 01:00:00.000000000 +0100 -@@ -1,15 +0,0 @@ --Rakefile --bin/virt-p2v --lib/virt-p2v/blockdevice.rb --lib/virt-p2v/connection.rb --lib/virt-p2v/converter.rb --lib/virt-p2v/gtk-queue.rb --lib/virt-p2v/netdevice.rb --lib/virt-p2v/ui/connect.rb --lib/virt-p2v/ui/convert.rb --lib/virt-p2v/ui/main.rb --lib/virt-p2v/ui/network.rb --lib/virt-p2v/ui/p2v.ui --lib/virt-p2v/ui/success.rb --virt-p2v.gemspec --Manifest -diff -ruN virt-v2v-v0.8.1/p2v-client/Rakefile virt-v2v-v0.8.1.new/p2v-client/Rakefile ---- virt-v2v-v0.8.1/p2v-client/Rakefile 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/Rakefile 1970-01-01 01:00:00.000000000 +0100 -@@ -1,37 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'rubygems' --require 'echoe' -- --Echoe.new("virt-p2v") do |p| -- p.project = "Virt P2V" -- p.version = `../Build version` -- p.author = "Matthew Booth" -- p.summary = "Send a machine's storage and metadata to virt-p2v-server" -- p.description = <= 1.2") if s.respond_to? :required_rubygems_version= -- s.authors = ["Matthew Booth"] -- s.date = %q{2011-04-15} -- s.default_executable = %q{virt-p2v} -- s.description = %q{virt-p2v is a client which connects to a virt-p2v-server and transfer's the host --machine's storage and metadata. virt-p2v is intended to be run from a live --image, so it is unlikely you want to install it. --} -- s.email = %q{libguestfs@redhat.com} -- s.executables = ["virt-p2v"] -- s.extra_rdoc_files = ["COPYING", "bin/virt-p2v", "lib/virt-p2v/blockdevice.rb", "lib/virt-p2v/connection.rb", "lib/virt-p2v/converter.rb", "lib/virt-p2v/gtk-queue.rb", "lib/virt-p2v/netdevice.rb", "lib/virt-p2v/ui/connect.rb", "lib/virt-p2v/ui/convert.rb", "lib/virt-p2v/ui/main.rb", "lib/virt-p2v/ui/network.rb", "lib/virt-p2v/ui/p2v.ui", "lib/virt-p2v/ui/success.rb"] -- s.files = ["COPYING", "Rakefile", "bin/virt-p2v", "lib/virt-p2v/blockdevice.rb", "lib/virt-p2v/connection.rb", "lib/virt-p2v/converter.rb", "lib/virt-p2v/gtk-queue.rb", "lib/virt-p2v/netdevice.rb", "lib/virt-p2v/ui/connect.rb", "lib/virt-p2v/ui/convert.rb", "lib/virt-p2v/ui/main.rb", "lib/virt-p2v/ui/network.rb", "lib/virt-p2v/ui/p2v.ui", "lib/virt-p2v/ui/success.rb", "virt-p2v.gemspec", "Manifest"] -- s.homepage = %q{http://libguestfs.org} -- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Virt-p2v"] -- s.require_paths = ["lib"] -- s.rubyforge_project = %q{Virt P2V} -- s.rubygems_version = %q{1.3.7} -- s.summary = %q{Send a machine's storage and metadata to virt-p2v-server} -- -- if s.respond_to? :specification_version then -- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION -- s.specification_version = 3 -- -- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then -- s.add_runtime_dependency(%q, [">= 0"]) -- s.add_runtime_dependency(%q, [">= 0"]) -- s.add_runtime_dependency(%q, [">= 0"]) -- else -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- end -- else -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- end --end -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-install.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-install.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-install.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-install.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,54 +0,0 @@ --lang C --keyboard us --timezone --utc UTC --auth --useshadow --enablemd5 --selinux --disabled --firewall --disabled --# TODO: the sizing of the image needs to be more dynamic --part / --size 1024 --fstype ext2 --services --enabled=NetworkManager --disabled=auditd --bootloader --timeout=30 --rootpw --iscrypted $1$tQiZwocX$ghhurQEm56p/HqgN.XEtk1 -- --# add missing scsi modules to initramfs --device 3w-9xxx --device 3w-sas --device 3w-xxxx --device a100u2w --device aacraid --device aic79xx --device aic94xx --device arcmsr --device atp870u --device be2iscsi --device bfa --device BusLogic --device cxgb3i --device dc395x --device fnic --device gdth --device hpsa --device hptiop --device imm --device initio --device ips --device libosd --device libsas --device libsrp --device lpfc --device megaraid --device megaraid_mbox --device megaraid_mm --device megaraid_sas --device mpt2sas --device mvsas --device osd --device osst --device pm8001 --device pmcraid --device qla1280 --device qla2xxx --device qla4xxx --device qlogicfas408 --device stex --device tmscsim -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-manifest-post.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-manifest-post.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-manifest-post.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-manifest-post.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,36 +0,0 @@ --%post --echo -n "Creating manifest" --# Create post-image processing manifests --rpm -qa --qf '%{name}-%{version}-%{release}.%{arch} (%{SIGGPG:pgpsig})\n' | \ -- sort > /manifest-rpm.txt --rpm -qa --qf '%{sourcerpm}\n' | sort -u > /manifest-srpm.txt --# collect all included licenses rhbz#601927 --rpm -qa --qf '%{license}\n' | sort -u > /manifest-license.txt --# dependencies --rpm -qa | xargs -n1 rpm -e --test 2> /manifest-deps.txt --echo -n "." --find / -xdev -print -exec rpm -qf {} \; > /manifest-owns.txt --rpm -qa --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | \ -- sort > /rpm-qa.txt --echo -n "." -- --du -akx --exclude=/var/cache/yum / > /manifest-file.txt --du -x --exclude=/var/cache/yum / > /manifest-dir.txt --echo -n "." --bzip2 /manifest-deps.txt /manifest-owns.txt /manifest-file.txt /manifest-dir.txt --echo -n "." -- --%end -- --%post --nochroot --# Move manifests to ISO --mv $INSTALL_ROOT/manifest-* $LIVE_ROOT/isolinux --echo "done" -- --# only works on x86, x86_64 --if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then -- if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi -- cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS -- cp /usr/bin/livecd-iso-to-pxeboot $LIVE_ROOT/LiveOS --fi --%end -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-minimizer.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-minimizer.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-minimizer.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-minimizer.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,239 +0,0 @@ --# This file is only relatively lightly modified from the version copied from --# oVirt, and certainly contains much which is irrelevant to this image. I have, --# however, removed some obviously extraneous entries and added a few additional --# entries. --# --# Matthew Booth - 18/4/2011 -- --%post --nochroot --interpreter image-minimizer --# lokkit is just an install-time dependency; we can remove --# it afterwards, which we do here --droprpm system-config-* --droprpm libsemanage-python --droprpm python-libs --droprpm python -- --droprpm mkinitrd --droprpm isomd5sum --droprpm dmraid --droprpm checkpolicy --droprpm make --droprpm policycoreutils-python --droprpm setools-libs-python --droprpm setools-libs -- --droprpm gamin --droprpm pm-utils --droprpm kbd --droprpm usermode --droprpm vbetool --droprpm ConsoleKit --droprpm hdparm --droprpm efibootmgr --droprpm linux-atm-libs --droprpm mtools --droprpm syslinux --droprpm wireless-tools --droprpm radeontool --droprpm libicu --droprpm gnupg2 --droprpm fedora-release-notes --droprpm fedora-logos -- --# cronie pulls in exim (sendmail) which pulls in all kinds of perl deps --droprpm exim --droprpm perl* --droprpm postfix --droprpm mysql* -- --droprpm sysklogd -- --# unneeded rhn deps --droprpm yum* -- --# pam complains when this is missing --keeprpm ConsoleKit-libs -- --# kernel modules minimization -- --# filesystems --drop /lib/modules/*/kernel/fs --keep /lib/modules/*/kernel/fs/ext* --keep /lib/modules/*/kernel/fs/jbd* --keep /lib/modules/*/kernel/fs/btrfs --keep /lib/modules/*/kernel/fs/fat --keep /lib/modules/*/kernel/fs/nfs --keep /lib/modules/*/kernel/fs/nfs_common --keep /lib/modules/*/kernel/fs/fscache --keep /lib/modules/*/kernel/fs/lockd --keep /lib/modules/*/kernel/fs/nls/nls_utf8.ko --# autofs4 configfs exportfs *fat *jbd mbcache.ko nls xfs --#*btrfs cramfs *ext2 *fscache *jbd2 *nfs squashfs --# cachefiles dlm *ext3 fuse jffs2 *nfs_common ubifs --# cifs ecryptfs *ext4 gfs2 *lockd nfsd udf -- --# network --drop /lib/modules/*/kernel/net --keep /lib/modules/*/kernel/net/802* --keep /lib/modules/*/kernel/net/bridge --keep /lib/modules/*/kernel/net/core --keep /lib/modules/*/kernel/net/ipv* --keep /lib/modules/*/kernel/net/key --keep /lib/modules/*/kernel/net/llc --keep /lib/modules/*/kernel/net/netfilter --keep /lib/modules/*/kernel/net/rds --keep /lib/modules/*/kernel/net/sctp --keep /lib/modules/*/kernel/net/sunrpc --#*802 atm can ieee802154 *key *netfilter rfkill *sunrpc xfrm --#*8021q bluetooth *core *ipv4 *llc phonet sched wimax --# 9p *bridge dccp *ipv6 mac80211 *rds *sctp wireless -- --drop /lib/modules/*/kernel/sound -- --# drivers --drop /lib/modules/*/kernel/drivers --keep /lib/modules/*/kernel/drivers/ata --keep /lib/modules/*/kernel/drivers/block --keep /lib/modules/*/kernel/drivers/cdrom --keep /lib/modules/*/kernel/drivers/char --keep /lib/modules/*/kernel/drivers/cpufreq --keep /lib/modules/*/kernel/drivers/dca --keep /lib/modules/*/kernel/drivers/dma --keep /lib/modules/*/kernel/drivers/edac --keep /lib/modules/*/kernel/drivers/firmware --keep /lib/modules/*/kernel/drivers/idle --keep /lib/modules/*/kernel/drivers/infiniband --keep /lib/modules/*/kernel/drivers/md --keep /lib/modules/*/kernel/drivers/message --keep /lib/modules/*/kernel/drivers/net --drop /lib/modules/*/kernel/drivers/net/pcmcia --drop /lib/modules/*/kernel/drivers/net/wireless --drop /lib/modules/*/kernel/drivers/net/ppp* --keep /lib/modules/*/kernel/drivers/pci --keep /lib/modules/*/kernel/drivers/scsi --keep /lib/modules/*/kernel/drivers/staging/ramzswap --keep /lib/modules/*/kernel/drivers/uio --keep /lib/modules/*/kernel/drivers/usb --drop /lib/modules/*/kernel/drivers/usb/atm --drop /lib/modules/*/kernel/drivers/usb/class --drop /lib/modules/*/kernel/drivers/usb/image --drop /lib/modules/*/kernel/drivers/usb/misc --drop /lib/modules/*/kernel/drivers/usb/serial --keep /lib/modules/*/kernel/drivers/vhost --keep /lib/modules/*/kernel/drivers/virtio -- --# acpi *cpufreq hid leds mtd ?regulator uwb --#*ata crypto ?hwmon *md *net* rtc *vhost --# atm *dca ?i2c media ?parport *scsi* video --# auxdisplay *dma *idle memstick *pci ?serial *virtio --#*block *edac ieee802154 *message pcmcia ?ssb watchdog --# bluetooth firewire *infiniband ?mfd platform *staging xen --#*cdrom *firmware input misc ?power ?uio --#*char* ?gpu isdn mmc ?pps *usb -- --drop /usr/share/zoneinfo --keep /usr/share/zoneinfo/UTC -- --drop /etc/alsa --drop /usr/share/alsa --drop /usr/share/awk --drop /usr/share/vim --drop /usr/share/anaconda --drop /usr/share/backgrounds --drop /usr/share/wallpapers --drop /usr/share/kde-settings --drop /usr/share/gnome-background-properties --drop /usr/share/dracut --drop /usr/share/plymouth --drop /usr/share/setuptool --drop /usr/share/hwdata/MonitorsDB --drop /usr/share/hwdata/oui.txt --drop /usr/share/hwdata/videoaliases --drop /usr/share/hwdata/videodrivers --drop /usr/share/firstboot --drop /usr/share/lua --drop /usr/share/kde4 --drop /usr/share/pixmaps --drop /usr/share/icons --drop /usr/share/fedora-release --drop /usr/share/tabset -- --drop /usr/share/tc --drop /usr/share/emacs --drop /usr/share/info --drop /usr/src --drop /usr/etc --drop /usr/games --drop /usr/include --drop /usr/local --drop /usr/sbin/dell* --keep /usr/sbin/build-locale-archive --drop /usr/sbin/glibc_post_upgrade.* --drop /usr/lib*/tc --drop /usr/lib*/tls --drop /usr/lib*/sse2 --drop /usr/lib*/pkgconfig --drop /usr/lib*/nss --drop /usr/lib*/games --drop /usr/lib*/alsa-lib --drop /usr/lib*/krb5 --drop /usr/lib*/hal --drop /usr/lib*/gio -- --# syslinux --drop /usr/share/syslinux --# glibc-common locales --drop /usr/lib/locale --keep /usr/lib/locale/usr/share/locale/en_US --# openssh --drop /usr/bin/sftp --drop /usr/bin/slogin --drop /usr/bin/ssh-add --drop /usr/bin/ssh-agent --drop /usr/bin/ssh-keyscan --# docs --drop /usr/share/omf --drop /usr/share/gnome --drop /usr/share/doc --keep /usr/share/doc/*-firmware-* --drop /usr/share/locale/ --keep /usr/share/locale/en_US --drop /usr/share/man --drop /usr/share/i18n --drop /boot/* --drop /var/lib/builder -- --drop /usr/lib*/libboost* --keep /usr/lib*/libboost_program_options.so* --keep /usr/lib*/libboost_filesystem.so* --keep /usr/lib*/libboost_thread-mt.so* --keep /usr/lib*/libboost_system.so* --drop /usr/kerberos --keep /usr/kerberos/bin/kinit --keep /usr/kerberos/bin/klist --drop /lib/firmware --keep /lib/firmware/3com --keep /lib/firmware/acenic --keep /lib/firmware/adaptec --keep /lib/firmware/advansys --keep /lib/firmware/bnx2 --keep /lib/firmware/cxgb3 --keep /lib/firmware/e100 --keep /lib/firmware/myricom --keep /lib/firmware/ql* --keep /lib/firmware/sun --keep /lib/firmware/tehuti --keep /lib/firmware/tigon --drop /lib/kbd/consolefonts --drop /etc/pki/tls --drop /etc/pki/java --drop /etc/pki/nssdb --drop /etc/pki/rpm-gpg --%end -- --%post --echo "Removing python source files" --find / -name '*.py' -exec rm -f {} \; --find / -name '*.pyo' -exec rm -f {} \; -- --%end -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-pkgs.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-pkgs.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-pkgs.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-pkgs.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,48 +0,0 @@ --# Direct requirements --rubygem-virt-p2v --bitstream-vera-sans-fonts --xorg-x11-xinit --xorg-x11-drivers --xorg-x11-server-Xorg -- --# Boot requirements --device-mapper -- --# Required for livecd creation --passwd --rpm --/usr/sbin/lokkit -- --# Remove unnecessary packages ---audit-libs-python ---ustr ---authconfig ---wireless-tools ---setserial ---prelink ---newt-python ---newt ---libselinux-python ---kbd ---usermode ---fedora-release ---fedora-release-notes ---dmraid ---gzip ---less ---which ---parted ---tar ---libuser ---mtools ---cpio ---yum ---numactl # Pulls in perl dependency ---perl -- --# qlogic firmware --ql2100-firmware --ql2200-firmware --ql23xx-firmware --ql2400-firmware --ql2500-firmware -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-post.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-post.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-post.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-post.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,43 +0,0 @@ --# -*-Shell-script-*- --echo "Starting Kickstart Post" --PATH=/sbin:/usr/sbin:/bin:/usr/bin --export PATH -- --# cleanup rpmdb to allow non-matching host and chroot RPM versions --rm -f /var/lib/rpm/__db* -- --echo "Creating shadow files" --# because we aren't installing authconfig, we aren't setting up shadow --# and gshadow properly. Do it by hand here --pwconv --grpconv -- --echo "Forcing C locale" --# force logins (via ssh, etc) to use C locale, since we remove locales --cat >> /etc/profile << \EOF --# force our locale to C since we don't have locale stuff' --export LC_ALL=C LANG=C --EOF -- --# remove errors from /sbin/dhclient-script --DHSCRIPT=/sbin/dhclient-script --sed -i 's/mv /cp -p /g' $DHSCRIPT --sed -i '/rm -f.*${interface}/d' $DHSCRIPT --sed -i '/rm -f \/etc\/localtime/d' $DHSCRIPT --sed -i '/rm -f \/etc\/ntp.conf/d' $DHSCRIPT --sed -i '/rm -f \/etc\/yp.conf/d' $DHSCRIPT -- --# Lock root account --#passwd -l root -- --#strip out all unncesssary locales --localedef --list-archive | grep -v -i -E 'en_US.utf8' |xargs localedef --delete-from-archive --mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl --/usr/sbin/build-locale-archive -- --# Run virt-p2v --cat >> /etc/rc.local < /root/virt-p2v.log 2>&1 --poweroff --EOF -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-post-nochroot.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-post-nochroot.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-post-nochroot.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-post-nochroot.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,60 +0,0 @@ --%include version.ks -- --PRODUCT='Virt P2V' --PRODUCT_SHORT='virt-p2v' --PACKAGE='virt-p2v' --RELEASE=${RELEASE:-devel.`date +%Y%m%d%H%M%S`} -- --echo "Customizing boot menu" --sed -i -e ' --# Put product information at the top of the file --1 { -- i '"say $PRODUCT $VERSION ($RELEASE)"' -- i '"menu title $PRODUCT_SHORT $VERSION ($RELEASE)"' --} -- --# Remove any existing menu title --/^menu title .*/d -- --# Remove quiet bootparam --#s/ quiet// -- --# Disable selinux entirely. Required, as we dont install an SELinux policy. --/^\s*append\s/ s/\s*$/ selinux=0/ -- --# Remove Verify and Boot option --/label check0/{N;N;N;d;} -- --# Set the default timeout to 15 seconds --s/^timeout .*/timeout 15/ --' $LIVE_ROOT/isolinux/isolinux.cfg -- --# TODO: Replace the splash screen with something P2V appropriate --#cp $INSTALL_ROOT//syslinux-vesa-splash.jpg $LIVE_ROOT/isolinux/splash.jpg -- --# store image version info in the ISO --cat > $LIVE_ROOT/isolinux/version < $INSTALL_ROOT/etc/$PACKAGE-release <> $INSTALL_ROOT/etc/issue --cp $INSTALL_ROOT/etc/issue $INSTALL_ROOT/etc/issue.net -- --# replace initramfs if regenerated --if [ -f "$INSTALL_ROOT/initrd0.img" ]; then -- mv -v "$INSTALL_ROOT/initrd0.img" "$LIVE_ROOT/isolinux/initrd0.img" --fi -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/Makefile virt-v2v-v0.8.1.new/p2v-image-builder/Makefile ---- virt-v2v-v0.8.1/p2v-image-builder/Makefile 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/Makefile 1970-01-01 01:00:00.000000000 +0100 -@@ -1,2 +0,0 @@ --version.ks: ../Build -- echo VERSION=`../Build version` > version.ks -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/version.ks virt-v2v-v0.8.1.new/p2v-image-builder/version.ks ---- virt-v2v-v0.8.1/p2v-image-builder/version.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/version.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1 +0,0 @@ --VERSION=0.8.1 -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image-builder virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image-builder ---- virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image-builder 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image-builder 1970-01-01 01:00:00.000000000 +0100 -@@ -1,188 +0,0 @@ --#!/bin/bash -- --# Copyright (C) 2010-2011, Red Hat, Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; version 2 of the License. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, --# MA 02110-1301, USA. A copy of the GNU General Public License is --# also available at http://www.gnu.org/copyleft/gpl.html. -- --# Requires: sudo livecd-creator, sudo setenforce, ksflatten -- --# Based on oVirt's node-creator -- --# Current fedora data --cur_rawhide=16 --cur_devel=15 -- --me=$(basename "$0") --warn() { printf '%s: %s\n' "$me" "$*" >&2; } --die() { warn "$*"; exit 1; } --usage() { --cat < -- --Build a virt-p2v bootable image. -- --OPTIONS: -- -a Additional yum repository. Can be specified multiple times. -- -c Yum cache directory. -- -d Directory containing virt-p2v-image.ks. -- -f Specific Fedora mirror to use if building a Fedora image. -- -l Boot image label. -- -r Primary yum repository. -- -u Updates yum repository. -- -h Show this message. --EOF --} -- --onlyonce() { -- warn "-$1 may only be specified once" -- usage -- exit 1 --} -- --while getopts "a:d:f:hl:r:u:w:" OPTION --do -- case $OPTION in -- a) -- n_elems=${#extra_repos[*]} -- extra_repos[$n_elems]="$OPTARG" -- ;; -- c) -- [ -n "$cachedir" ] && onlyonce $OPTION -- cachedir="$OPTARG" -- ;; -- d) -- [ -n "$datadir" ] && onlyonce $OPTION -- datadir="$OPTARG" -- ;; -- f) -- [ -n "$fedora_url" ] && onlyonce $OPTION -- fedora_url="$OPTARG" -- ;; -- l) -- [ -n "$label" ] && onlyonce $OPTION -- label="$OPTARG" -- ;; -- r) -- [ -n "$repo" ] && onlyonce $OPTION -- repo="$OPTARG" -- ;; -- u) -- [ -n "$updates" ] && onlyonce $OPTION -- updates="$OPTARG" -- ;; -- h) -- usage -- exit 0 -- ;; -- ?) -- usage -- exit 1 -- ;; -- esac --done -- --# Split out here for simple editing with sed during installation --DEFAULT_DATADIR=. -- --# Option defaults --datadir="${datadir:-$DEFAULT_DATADIR}" --cachedir="${cachedir:-/var/tmp/p2v-image-builder.$USER}" --label="${label:-Virt-P2V}" -- --arch=$(rpm --eval '%{_arch}') --kstmp=$(mktemp --tmpdir p2v-image-builder.XXXXXXXX) -- --if pgrep -xl nscd; then -- die "Please stop nscd first" --fi -- --rm -f "$kstmp" --# combine recipe includes --ksflatten --config "$datadir/virt-p2v-image.ks" --output "$kstmp" --# XXX broken ksflatten leaves %include --sed -i 's/^%include /#&/' "$kstmp" -- --if [ -z "$repo" ]; then -- # Set defaults for Fedora if this is a fedora system -- fedora=$(rpm --eval '%{fedora}' |grep [0-9]) -- -- mirrorlist="http://mirrors.fedoraproject.org/mirrorlist" -- -- case "$fedora" in -- $curr_rawhide) -- if [ -z "$fedora_url" ]; then -- repo="--mirrorlist=$mirrorlist?repo=rawhide&arch=$arch" -- else -- repo="--baseurl=$fedora_url/development/rawhide/$arch/os" -- fi -- ;; -- $cur_devel) -- if [ -z "$fedora_url" ]; then -- repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -- else -- repo="--baseurl=$fedora_url/development/$fedora/$arch/os" -- fi -- ;; -- ?*) -- if [ -z "$fedora_url" ]; then -- repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -- updates="--mirrorlist=$mirrorlist?repo=updates-released-f${fedora}&arch=$arch" -- else -- repo="--baseurl=$fedora_url/releases/$fedora/Everything/$arch/os" -- updates="--baseurl=$fedora_url/updates/$fedora/$arch" -- fi -- esac --else -- repo="--baseurl=$repo" -- [ -n "$updates" ] && updates="--baseurl=$updates" --fi -- --if [ -n "$repo" ]; then -- echo "repo --name=base $repo" >> "$kstmp" --else -- die "No repository specified, and no default available." --fi --if [ -n "$updates" ]; then -- echo "repo --name=updates $updates" >> "$kstmp" --fi --i=0 --for extra in "${extra_repos[@]}"; do -- ((i++)) -- [ -d "$extra" ] && extra="file://$extra" -- echo "repo --name=extra$i --baseurl=$extra" >> "$kstmp" --done -- --selinux_enforcing=$(/usr/sbin/getenforce) --case "$selinux_enforcing" in -- Enforcing) sudo /usr/sbin/setenforce Permissive ;; -- Permissive) ;; -- *) if grep -q '^selinux --disabled' "$kstmp"; -- then -- warn "WARNING: SELinux disabled in kickstart" -- else -- die "ERROR: SELinux enabled in kickstart, \ -- but disabled on the build machine" -- fi ;; --esac -- --mkdir -p $cachedir --sudo livecd-creator -c "$kstmp" -f "$label" --cache="$cachedir" -- --# Clean up --rm -f $kstmp --if [ "$selinux_enforcing" = Enforcing ]; then -- sudo /usr/sbin/setenforce Enforcing --fi -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image.ks virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image.ks ---- virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,19 +0,0 @@ --# virt-p2v Node image recipe -- --%include common-install.ks -- --%packages --excludedocs --nobase --%include common-pkgs.ks --%end -- --%post --%include common-post.ks --%end -- --%include common-minimizer.ks -- --%post --nochroot --%include common-post-nochroot.ks --%end -- --%include common-manifest-post.ks -diff -ruN virt-v2v-v0.8.1/p2v-server/run-p2v-locally virt-v2v-v0.8.1.new/p2v-server/run-p2v-locally ---- virt-v2v-v0.8.1/p2v-server/run-p2v-locally 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-server/run-p2v-locally 1970-01-01 01:00:00.000000000 +0100 -@@ -1,52 +0,0 @@ --#!/bin/sh --# virt-p2v --# Copyright (C) 2010 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --# This script sets up the environment so you can run virt-v2v in place --# without needing to do 'make install' first. --# --# Use it like this: --# ./run-p2v-locally --# --# It requires the environment variable VIRTV2V_ROOT to be set. If using --# libguestfs from source, LIBGUESTFS_ROOT must also be set. -- --if [ -z "$VIRTV2V_ROOT" ]; then -- echo "VIRTV2V_ROOT must be set" -- exit 1 --fi -- --if [ -z "$PERL5LIB" ]; then -- PERL5LIB="$VIRTV2V_ROOT/blib/lib" --else -- PERL5LIB="$VIRTV2V_ROOT/blib/lib:$PERL5LIB" --fi -- --if [ ! -z "$LIBGUESTFS_ROOT" ]; then -- if [ -z "$LD_LIBRARY_PATH" ]; then -- LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs" -- else -- LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs:$LD_LIBRARY_PATH" -- fi -- -- LIBGUESTFS_PATH="$LIBGUESTFS_ROOT/appliance" -- PERL5LIB="$LIBGUESTFS_ROOT/perl/blib/lib:$LIBGUESTFS_ROOT/perl/blib/arch:$PERL5LIB" --fi -- --export PERL5LIB LD_LIBRARY_PATH LIBGUESTFS_PATH -- --exec perl "$VIRTV2V_ROOT/p2v-server/virt-p2v-server.pl" "$@" -diff -ruN virt-v2v-v0.8.1/p2v-server/virt-p2v-server.pl virt-v2v-v0.8.1.new/p2v-server/virt-p2v-server.pl ---- virt-v2v-v0.8.1/p2v-server/virt-p2v-server.pl 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-server/virt-p2v-server.pl 1970-01-01 01:00:00.000000000 +0100 -@@ -1,505 +0,0 @@ --#!/usr/bin/perl --# virt-p2v-server --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --use warnings; --use strict; -- --use IO::Handle; --use YAML::Any; -- --use Locale::TextDomain 'virt-v2v'; -- --use Sys::Guestfs; -- --use Sys::VirtConvert; --use Sys::VirtConvert::Config; --use Sys::VirtConvert::Converter; --use Sys::VirtConvert::Connection::LibVirtTarget; --use Sys::VirtConvert::Connection::RHEVTarget; --use Sys::VirtConvert::GuestfsHandle; --use Sys::VirtConvert::Util qw(:DEFAULT logmsg_init logmsg_level); -- --=encoding utf8 -- --=head1 NAME -- --virt-p2v-server - Receive data from virt-p2v -- --=head1 DESCRIPTION -- --virt-p2v-server is invoked over SSH by virt-p2v. It is not intended to be run --manually. -- --=cut -- --# SIGPIPE will cause an untidy exit of the perl process, without calling --# destructors. We don't rely on it anywhere, as we check for errors when reading --# from or writing to a pipe. --$SIG{'PIPE'} = 'IGNORE'; -- --# The protocol version we support --use constant VERSION => 0; -- --# Message types --use constant MSG_VERSION => 'VERSION'; --use constant MSG_LANG => 'LANG'; --use constant MSG_METADATA => 'METADATA'; --use constant MSG_PATH => 'PATH'; --use constant MSG_CONVERT => 'CONVERT'; --use constant MSG_LIST_PROFILES => 'LIST_PROFILES'; --use constant MSG_SET_PROFILE => 'SET_PROFILE'; --use constant MSG_CONTAINER => 'CONTAINER'; --use constant MSG_DATA => 'DATA'; -- --# Container types --use constant CONT_RAW => 'RAW'; -- --# Global state --my $config; --my $meta; --my $target; -- --# Initialize logging --logmsg_init('syslog'); --#logmsg_level(DEBUG); -- --logmsg NOTICE, __x("{program} started.", program => 'p2v-server'); -- --# Wrap everything in a big eval to catch any die(). N.B. $SIG{__DIE__} is no --# good for this, as it catches every die(), even those inside an eval --eval { -- # Set the umask to a reasonable default -- umask(0022); -- -- # Don't buffer output -- # While perl will use line buffering when STDOUT is connected to a tty, when -- # not connected to a tty, for example when invoked directly over ssh, it -- # will use a regular, large output buffer. This results in messages being -- # held in the buffer indefinitely. -- STDOUT->autoflush(1); -- -- # Read the config file -- eval { -- $config = Sys::VirtConvert::Config->new('/etc/virt-v2v.conf'); -- }; -- v2vdie $@ if $@; -- -- my $msg; -- while ($msg = p2v_receive()) { -- my $type = $msg->{type}; -- -- # VERSION n -- if ($type eq MSG_VERSION) { -- my $version = $msg->{args}[0]; -- if ($version <= VERSION) { -- p2v_return_ok(); -- } -- -- else { -- err_and_die(__x('This version of virt-p2v-server does not '. -- 'support protocol version {version}.', -- version => $version)); -- } -- } -- -- # LANG lang -- elsif ($type eq MSG_LANG) { -- $ENV{LANG} = $msg->{args}[0]; -- p2v_return_ok(); -- } -- -- # METADATA length -- # length bytes of YAML -- elsif ($type eq MSG_METADATA) { -- my $yaml = p2v_read($msg->{args}[0]); -- eval { $meta = Load($yaml); }; -- err_and_die('Error parsing metadata: '.$@) if $@; -- -- p2v_return_ok(); -- } -- -- # PATH length path -- # N.B. path could theoretically include spaces -- elsif ($type eq MSG_PATH) { -- my $length = $msg->{args}[0]; -- -- my $path = join(' ', @{$msg->{args}}[1..$#{$msg->{args}}]); -- receive_path($path, $length); -- } -- -- # CONVERT -- elsif ($type eq MSG_CONVERT) { -- convert(); -- } -- -- # LIST_PROFILES -- elsif ($type eq MSG_LIST_PROFILES) { -- p2v_return_list($config->list_profiles()); -- } -- -- # SET_PROFILE profile -- elsif ($type eq MSG_SET_PROFILE) { -- set_profile($msg->{args}[0]); -- } -- -- else { -- unexpected_msg($type); -- } -- } --}; --logmsg FATAL, $@ if $@; -- --exit(0); -- --# Receive an image file --sub receive_path --{ -- my ($path, $length) = @_; -- -- err_and_die('PATH without prior SET_PROFILE command') -- unless defined($target); -- err_and_die('PATH without prior METADATA command') -- unless defined($meta); -- -- my ($disk) = grep { $_->{path} eq $path } @{$meta->{disks}}; -- err_and_die("$path not found in metadata") unless defined($disk); -- -- # Construct a volume name based on the path and hostname -- my $name = $meta->{name}.'-'.$disk->{device}; -- $name =~ s,/,_,g; # e.g. cciss devices have a directory structure -- -- my $sopts = $config->get_storage_opts(); -- -- my $convert = 0; -- my $format; -- my $sparse; -- -- # Default to raw. Conversion required for anything else. -- if (!exists($sopts->{format}) || $sopts->{format} eq 'raw') { -- $format = 'raw'; -- } else { -- $format = $sopts->{format}; -- $convert = 1; -- } -- -- # Default to non-sparse -- my $allocation = $sopts->{allocation}; -- if (!defined($allocation) || $allocation eq 'preallocated') { -- $sparse = 0; -- } elsif ($allocation eq 'sparse') { -- $sparse = 1; -- } else { -- err_and_die(__x('Invalid allocation policy {policy} in profile.', -- policy => $allocation)); -- } -- -- # Create the target volume -- my $vol; -- eval { -- $vol = $target->create_volume( -- $name, -- $format, -- $length, -- $sparse -- ); -- }; -- err_and_die($@) if $@; -- p2v_return_ok(); -- -- # Receive an initial container -- my $msg = p2v_receive(); -- unexpected_msg($msg->{type}) unless $msg->{type} eq MSG_CONTAINER; -- -- # We only support RAW container -- my $ctype = $msg->{args}[0]; -- err_and_die("Received unknown container type: $ctype") -- unless $ctype eq CONT_RAW; -- p2v_return_ok(); -- -- # Update the disk entry with the new volume details -- $disk->{local_path} = $vol->get_local_path(); -- $disk->{path} = $vol->get_path(); -- $disk->{is_block} = $vol->is_block(); -- -- my $writer = $vol->get_write_stream($convert); -- -- # Receive volume data in chunks -- my $received = 0; -- while ($received < $length) { -- my $data = p2v_receive(); -- -- unexpected_msg($data->command) unless $data->{type} eq MSG_DATA; -- -- # Read the data message in chunks of up to 4M -- my $remaining = $data->{args}[0]; -- while ($remaining > 0) { -- my $chunk = $remaining > 4*1024*1024 ? 4*1024*1024 : $remaining; -- my $buf = p2v_read($chunk); -- -- $received += $chunk; -- $remaining -= $chunk; -- -- eval { $writer->write($buf); }; -- err_and_die($@) if $@; -- } -- -- p2v_return_ok(); -- } --} -- --# Use the specified profile --sub set_profile --{ -- my ($profile) = @_; -- -- # Check the profile is in our list -- my $found = 0; -- for my $i ($config->list_profiles()) { -- if ($i eq $profile) { -- $found = 1; -- last; -- } -- } -- err_and_die(__x('Invalid profile: {profile}', profile => $profile)) -- unless ($found); -- -- $config->use_profile($profile); -- -- my $storage = $config->get_storage(); -- my $method = $config->get_method(); -- if ($method eq 'libvirt') { -- $target = new Sys::VirtConvert::Connection::LibVirtTarget -- ('qemu:///system', $storage); -- } elsif ($method eq 'rhev') { -- $target = new Sys::VirtConvert::Connection::RHEVTarget($storage); -- } else { -- err_and_die(__x('Profile {profile} specifies invalid method {method}.', -- profile => $profile, method => $method)); -- } -- -- p2v_return_ok(); --} -- --sub convert --{ -- err_and_die('CONVERT without prior SET_PROFILE command') -- unless (defined($target)); -- -- err_and_die('CONVERT without prior METADATA command') -- unless defined($meta); -- -- my @localpaths = map { $_->{local_path} } @{$meta->{disks}}; -- -- my $g; -- eval { -- my $transferiso = $config->get_transfer_iso(); -- -- $g = new Sys::VirtConvert::GuestfsHandle( -- \@localpaths, -- $transferiso, -- $target->isa('Sys::VirtConvert::Connection::RHEVTarget') -- ); -- -- my $transferdev; -- if (defined($transferiso)) { -- my @devices = $g->list_devices(); -- $transferdev = pop(@devices); -- } -- -- my $root = inspect_guest($g, $transferdev); -- my $guestcaps = -- Sys::VirtConvert::Converter->convert($g, $config, $root, $meta); -- $target->create_guest($g, $root, $meta, $config, $guestcaps, -- $meta->{name}); -- -- if($guestcaps->{block} eq 'virtio' && $guestcaps->{net} eq 'virtio') { -- logmsg NOTICE, __x('{name} configured with virtio drivers.', -- name => $meta->{name}); -- } elsif ($guestcaps->{block} eq 'virtio') { -- logmsg NOTICE, __x('{name} configured with virtio storage only.', -- name => $meta->{name}); -- } elsif ($guestcaps->{net} eq 'virtio') { -- logmsg NOTICE, __x('{name} configured with virtio networking only.', -- name => $meta->{name}); -- } else { -- logmsg NOTICE, __x('{name} configured without virtio drivers.', -- name => $meta->{name}); -- } -- }; -- -- # If any of the above commands result in failure, we need to ensure that -- # the guestfs qemu process is cleaned up before further cleanup. Failure to -- # do this can result in failure to umount RHEV export's temporary mount -- # point. -- if ($@) { -- my $err = $@; -- $g->close(); -- -- # We trust the error was already logged -- p2v_return_err($err); -- die($@); -- } -- -- p2v_return_ok(); --} -- --sub unexpected_msg --{ -- err_and_die('Received unexpected command: '.shift); --} -- --sub err_and_die --{ -- my $err = shift; -- p2v_return_err($err); -- v2vdie $err; --} -- --END { -- my $err = $?; -- -- logmsg NOTICE, __x("{program} exited.", program => 'p2v-server'); -- -- # die() sets $? to 255, which is untidy. -- $? = $err == 255 ? 1 : $err; --} -- --# Perform guest inspection using the libguestfs core inspection API. --# Returns the root device of the os to be converted. --sub inspect_guest --{ -- my $g = shift; -- my $transferdev = shift; -- -- # Get list of roots, sorted -- my @roots = $g->inspect_os(); -- -- # Filter out the transfer device from the results of inspect_os -- # There's a libguestfs bug (fixed upstream) which meant the transfer ISO -- # could be erroneously detected as an unknown Windows OS. As we know what it -- # is, we can filter out the transfer device here. Even when the fix is -- # released this is reasonable belt & braces. -- @roots = grep(!/^\Q$transferdev\E$/, @roots); -- -- @roots = sort @roots; -- -- # Only work on single-root operating systems. -- v2vdie __('No root device found in this operating system image.') -- if @roots == 0; -- -- v2vdie __('Multiboot operating systems are not supported.') -- if @roots > 1; -- -- return $roots[0]; --} -- --sub p2v_receive --{ -- my $in = <>; -- v2vdie __('Client closed connection unexpectedly') unless defined($in); -- -- # Messages consist of the message type followed by 0 or more arguments, -- # terminated by a newline -- chomp($in); -- $in =~ /^([A-Z_]+)( .+)?$/ or err_and_die("Received invalid message: $in"); -- -- my %msg; -- $msg{type} = $1; -- if (defined($2)) { -- my @args = split(' ', $2); -- $msg{args} = \@args; -- } else { -- $msg{args} = []; -- } -- -- logmsg DEBUG, __x('Received: {command} {args}', -- command => $msg{type}, -- args => join(' ', @{$msg{args}})); -- -- return \%msg; --} -- --sub p2v_read --{ -- my ($length) = @_; -- -- my $buf; -- my $total = 0; -- -- while($total < $length) { -- my $in = read(STDIN, $buf, $length, $total) -- or err_and_die(__x('Error receiving data: {error}', error => $@)); -- logmsg DEBUG, "Read $in bytes"; -- $total += $in; -- } -- -- return $buf; --} -- --sub p2v_return_ok --{ -- my $msg = "OK"; -- logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -- print $msg,"\n"; --} -- --sub p2v_return_list --{ -- my @values = @_; -- -- my $msg = 'LIST '.scalar(@values); -- foreach my $value (@values) { -- $msg .= "\n$value"; -- } -- logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -- print $msg,"\n"; --} -- --sub p2v_return_err --{ -- my $msg = 'ERROR '.shift; -- logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -- print $msg,"\n"; --} -- --=head1 SEE ALSO -- --L, --L. -- --=head1 AUTHOR -- --Matthew Booth -- --=head1 COPYRIGHT -- --Copyright (C) 2011 Red Hat Inc. -- --This program is free software; you can redistribute it and/or modify --it under the terms of the GNU General Public License as published by --the Free Software Foundation; either version 2 of the License, or --(at your option) any later version. -- --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --GNU General Public License for more details. -- --You should have received a copy of the GNU General Public License --along with this program; if not, write to the Free Software --Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -diff -ruN virt-v2v-v0.8.1/virt-v2v.spec virt-v2v-v0.8.1.new/virt-v2v.spec ---- virt-v2v-v0.8.1/virt-v2v.spec 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/virt-v2v.spec 2011-05-11 17:20:21.000000000 +0100 -@@ -55,7 +55,6 @@ - - # virt-p2v build requirements - BuildRequires: rubygem(rake) --BuildRequires: rubygem(echoe) - - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - -@@ -141,7 +140,7 @@ - %{__perl} Build.PL - ./Build - --pushd p2v-client -+pushd p2v/client - rake gem - popd - -@@ -174,7 +173,7 @@ - mkdir -p %{buildroot}/%{gemdir} - - gem install --local --install-dir %{buildroot}%{gemdir} \ -- --force --rdoc p2v-client/pkg/%{gemname}-%{version}.gem -+ --force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem - mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} - find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x - cp COPYING %{buildroot}/%{geminstdir} -@@ -183,8 +182,8 @@ - %global builderdir %{_datadir}/virt-p2v-image-builder - builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder - mkdir -p %{buildroot}%{builderdir} --cp p2v-image-builder/*.ks %{buildroot}%{builderdir} --cp p2v-image-builder/virt-p2v-image-builder $builder -+cp p2v/image-builder/*.ks %{buildroot}%{builderdir} -+cp p2v/image-builder/virt-p2v-image-builder $builder - - # Set the default data directory - sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder -@@ -193,7 +192,7 @@ - %check - ./Build test - --pushd p2v-client -+pushd p2v/client - # No tests yet - #rake test - popd -diff -ruN virt-v2v-v0.8.1/virt-v2v.spec.PL virt-v2v-v0.8.1.new/virt-v2v.spec.PL ---- virt-v2v-v0.8.1/virt-v2v.spec.PL 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/virt-v2v.spec.PL 2011-05-11 17:20:21.000000000 +0100 -@@ -165,7 +165,7 @@ - %{__perl} Build.PL - ./Build - --pushd p2v-client -+pushd p2v/client - rake gem - popd - -@@ -198,7 +198,7 @@ - mkdir -p %{buildroot}/%{gemdir} - - gem install --local --install-dir %{buildroot}%{gemdir} \ -- --force --rdoc p2v-client/pkg/%{gemname}-%{version}.gem -+ --force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem - mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} - find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x - cp COPYING %{buildroot}/%{geminstdir} -@@ -207,8 +207,8 @@ - %global builderdir %{_datadir}/virt-p2v-image-builder - builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder - mkdir -p %{buildroot}%{builderdir} --cp p2v-image-builder/*.ks %{buildroot}%{builderdir} --cp p2v-image-builder/virt-p2v-image-builder $builder -+cp p2v/image-builder/*.ks %{buildroot}%{builderdir} -+cp p2v/image-builder/virt-p2v-image-builder $builder - - # Set the default data directory - sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder -@@ -217,7 +217,7 @@ - %check - ./Build test - --pushd p2v-client -+pushd p2v/client - # No tests yet - #rake test - popd diff --git a/virt-v2v-0.8.1-01-e34a8c09.patch b/virt-v2v-0.8.1-01-e34a8c09.patch deleted file mode 100644 index 58b03a3..0000000 --- a/virt-v2v-0.8.1-01-e34a8c09.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit e34a8c0911f53cff64f9a33d3802ac7361f3fe19 -Author: Matthew Booth -Date: Wed May 11 16:05:18 2011 +0100 - - p2v-client: Drop echoe for build - - echoe changes incompatibly from F14->F15. We're not using the vast majority of - its features, and it remains completely undocumented as far as I can tell. This - patch drops it in favour of a simple, explicit gem build task. - -diff --git a/p2v/client/Rakefile b/p2v/client/Rakefile -index d190f08..23c26f5 100644 ---- a/p2v/client/Rakefile -+++ b/p2v/client/Rakefile -@@ -14,24 +14,10 @@ - # along with this program; if not, write to the Free Software - # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - --require 'rubygems' --require 'echoe' -+require 'rake' -+require 'rake/gempackagetask' - --Echoe.new("virt-p2v") do |p| -- p.project = "Virt P2V" -- p.version = `../../Build version` -- p.author = "Matthew Booth" -- p.summary = "Send a machine's storage and metadata to virt-p2v-server" -- p.description = < :gem -+ -+load 'virt-p2v.gemspec' -+Rake::GemPackageTask.new(GEMSPEC) {} -diff --git a/virt-v2v.spec.PL b/virt-v2v.spec.PL -index 2249b01..6a155e2 100644 ---- a/virt-v2v.spec.PL -+++ b/virt-v2v.spec.PL -@@ -79,7 +79,6 @@ BuildRequires: perl-hivex >= 1.2.2 - - # virt-p2v build requirements - BuildRequires: rubygem(rake) --BuildRequires: rubygem(echoe) - - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - diff --git a/virt-v2v-0.8.1-02-fadb1929.patch b/virt-v2v-0.8.1-02-fadb1929.patch deleted file mode 100644 index 8fc6c4a..0000000 --- a/virt-v2v-0.8.1-02-fadb1929.patch +++ /dev/null @@ -1,111 +0,0 @@ -commit fadb1929b4a8447a719a34f07e5934badf694f45 -Author: Matthew Booth -Date: Wed May 11 16:46:37 2011 +0100 - - p2v-client: Add missing gemspec - - gemspec used to be auto-generated, so was explicitly ignored. It's no longer - auto-generated, so we need it. - -diff --git a/p2v/client/virt-p2v.gemspec b/p2v/client/virt-p2v.gemspec -new file mode 100644 -index 0000000..d8edde8 ---- /dev/null -+++ b/p2v/client/virt-p2v.gemspec -@@ -0,0 +1,96 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+V2V_VERSION = `../../Build version` -+abort "Failed to get version" unless $? == 0 -+ -+GEMSPEC = Gem::Specification.new do |s| -+ s.name = %q{virt-p2v} -+ s.version = V2V_VERSION -+ -+ s.authors = ["Matthew Booth"] -+ s.date = %q{2011-05-10} -+ s.summary = %q{Send a machine's storage and metadata to virt-p2v-server} -+ s.description = %q{ -+ virt-p2v is a client which connects to a virt-p2v-server and transfer's -+ the host machine's storage and metadata. virt-p2v is intended to be run -+ from a live image, so it is unlikely you want to install it. -+ } -+ s.email = %q{libguestfs@redhat.com} -+ s.homepage = %q{http://libguestfs.org} -+ -+ s.default_executable = %q{virt-p2v} -+ s.executables = ["virt-p2v"] -+ s.files = [ -+ "Rakefile", -+ "bin/virt-p2v", -+ "lib/virt-p2v/blockdevice.rb", -+ "lib/virt-p2v/connection.rb", -+ "lib/virt-p2v/converter.rb", -+ "lib/virt-p2v/gtk-queue.rb", -+ "lib/virt-p2v/netdevice.rb", -+ "lib/virt-p2v/ui/connect.rb", -+ "lib/virt-p2v/ui/convert.rb", -+ "lib/virt-p2v/ui/main.rb", -+ "lib/virt-p2v/ui/network.rb", -+ "lib/virt-p2v/ui/p2v.ui", -+ "lib/virt-p2v/ui/success.rb", -+ "virt-p2v.gemspec", -+ "Manifest" -+ ] -+ s.require_paths = ["lib"] -+ -+ if s.respond_to? :specification_version then -+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION -+ s.specification_version = 3 -+ -+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then -+ s.add_runtime_dependency(%q, [">= 0"]) -+ s.add_runtime_dependency(%q, [">= 0"]) -+ s.add_runtime_dependency(%q, [">= 0"]) -+ else -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ end -+ else -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ end -+ -+# Source doesn't contain any rdoc -+# s.extra_rdoc_files = [ -+# "bin/virt-p2v", -+# "lib/virt-p2v/blockdevice.rb", -+# "lib/virt-p2v/connection.rb", -+# "lib/virt-p2v/converter.rb", -+# "lib/virt-p2v/gtk-queue.rb", -+# "lib/virt-p2v/netdevice.rb", -+# "lib/virt-p2v/ui/connect.rb", -+# "lib/virt-p2v/ui/convert.rb", -+# "lib/virt-p2v/ui/main.rb", -+# "lib/virt-p2v/ui/network.rb", -+# "lib/virt-p2v/ui/p2v.ui", -+# "lib/virt-p2v/ui/success.rb" -+# ] -+# s.rdoc_options = [ -+# "--line-numbers", -+# "--inline-source", -+# "--title", -+# "Virt-p2v" -+# ] -+end diff --git a/virt-v2v-0.8.1-03-a965f7e0.patch b/virt-v2v-0.8.1-03-a965f7e0.patch deleted file mode 100644 index 2dc1eed..0000000 --- a/virt-v2v-0.8.1-03-a965f7e0.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit a965f7e0609acc6107ffbbf70054776ee3c81918 -Author: Matthew Booth -Date: Thu May 12 10:07:06 2011 +0100 - - p2v-client: Build rdoc with options - - Use rdoc options taken from gemspec generated by echoe. - -diff --git a/p2v/client/virt-p2v.gemspec b/p2v/client/virt-p2v.gemspec -index d8edde8..610c2a3 100644 ---- a/p2v/client/virt-p2v.gemspec -+++ b/p2v/client/virt-p2v.gemspec -@@ -72,25 +72,23 @@ GEMSPEC = Gem::Specification.new do |s| - s.add_dependency(%q, [">= 0"]) - end - --# Source doesn't contain any rdoc --# s.extra_rdoc_files = [ --# "bin/virt-p2v", --# "lib/virt-p2v/blockdevice.rb", --# "lib/virt-p2v/connection.rb", --# "lib/virt-p2v/converter.rb", --# "lib/virt-p2v/gtk-queue.rb", --# "lib/virt-p2v/netdevice.rb", --# "lib/virt-p2v/ui/connect.rb", --# "lib/virt-p2v/ui/convert.rb", --# "lib/virt-p2v/ui/main.rb", --# "lib/virt-p2v/ui/network.rb", --# "lib/virt-p2v/ui/p2v.ui", --# "lib/virt-p2v/ui/success.rb" --# ] --# s.rdoc_options = [ --# "--line-numbers", --# "--inline-source", --# "--title", --# "Virt-p2v" --# ] -+ s.extra_rdoc_files = [ -+ "bin/virt-p2v", -+ "lib/virt-p2v/blockdevice.rb", -+ "lib/virt-p2v/connection.rb", -+ "lib/virt-p2v/converter.rb", -+ "lib/virt-p2v/gtk-queue.rb", -+ "lib/virt-p2v/netdevice.rb", -+ "lib/virt-p2v/ui/connect.rb", -+ "lib/virt-p2v/ui/convert.rb", -+ "lib/virt-p2v/ui/main.rb", -+ "lib/virt-p2v/ui/network.rb", -+ "lib/virt-p2v/ui/p2v.ui", -+ "lib/virt-p2v/ui/success.rb" -+ ] -+ s.rdoc_options = [ -+ "--line-numbers", -+ "--inline-source", -+ "--title", "virt-p2v" -+ ] - end diff --git a/virt-v2v-0.8.1-04-77bd7908.patch b/virt-v2v-0.8.1-04-77bd7908.patch deleted file mode 100644 index 6ce160a..0000000 --- a/virt-v2v-0.8.1-04-77bd7908.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 77bd79083879c7bca15c00d96c570da6faa16839 -Author: Matthew Booth -Date: Tue May 17 10:00:34 2011 +0100 - - p2v-server: Fix YAML error parsing metadata - - The YAML perl module will produce a parse error when receiving metadata YAML - produced by virt-p2v. YAML::Tiny and YAML::Syck both parse it fine. - Unfortunately, YAML::Any is only provided by the YAML module, so it will always - be installed on Fedora, and will always break. We therefore need to pick one of - the others explicitly. I picked YAML::Tiny as it has fewer dependencies. - -diff --git a/p2v/server/virt-p2v-server.pl b/p2v/server/virt-p2v-server.pl -index d062d9d..2dfae24 100755 ---- a/p2v/server/virt-p2v-server.pl -+++ b/p2v/server/virt-p2v-server.pl -@@ -20,7 +20,11 @@ use warnings; - use strict; - - use IO::Handle; --use YAML::Any; -+ -+# The YAML module doesn't support YAML generated by Ruby. YAML::Tiny and -+# YAML::Syck are both fine. We can't use YAML::Any here because that breaks by -+# default. -+use YAML::Tiny; - - use Locale::TextDomain 'virt-v2v'; - diff --git a/virt-v2v-0.8.3-01-bd513aaf.patch b/virt-v2v-0.8.3-01-bd513aaf.patch new file mode 100644 index 0000000..d8d4081 --- /dev/null +++ b/virt-v2v-0.8.3-01-bd513aaf.patch @@ -0,0 +1,67 @@ +From bd513aaf12a9cd27432eb36d341fd88f4d64dac4 Mon Sep 17 00:00:00 2001 +From: Matthew Booth +Date: Fri, 19 Aug 2011 17:43:55 +0100 +Subject: [PATCH] Fix whitespace issues in translations + +--- + po/es.po | 2 +- + po/nl.po | 2 +- + po/pl.po | 2 +- + po/uk.po | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/po/es.po b/po/es.po +index c24bf59..09fb7fe 100644 +--- a/po/es.po ++++ b/po/es.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Héctor Daniel Cabrera , 2011. + msgid "" +diff --git a/po/nl.po b/po/nl.po +index 3f88fa0..fe74413 100644 +--- a/po/nl.po ++++ b/po/nl.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Geert Warrink , 2011. + msgid "" +diff --git a/po/pl.po b/po/pl.po +index 6465997..9508124 100644 +--- a/po/pl.po ++++ b/po/pl.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Piotr Drąg , 2011. + msgid "" +diff --git a/po/uk.po b/po/uk.po +index 13172bd..21676bc 100644 +--- a/po/uk.po ++++ b/po/uk.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Yuri Chornoivan , 2011. + msgid "" +-- +1.7.6 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 3bf9131..eeaeffe 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v -Version: 0.8.1 -Release: 4%{?dist} +Version: 0.8.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -16,12 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # local seq no: the order the patches should be applied in # git commit: the first 8 characters of the git commit hash -# Upstream patches to fix p2v client build in rawhide/f15 -Patch0: virt-v2v-0.8.1-00-44eb9021-modified.patch -Patch1: virt-v2v-0.8.1-01-e34a8c09.patch -Patch2: virt-v2v-0.8.1-02-fadb1929.patch -Patch3: virt-v2v-0.8.1-03-a965f7e0.patch -Patch4: virt-v2v-0.8.1-04-77bd7908.patch +Patch1: virt-v2v-0.8.3-01-bd513aaf.patch # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't @@ -48,19 +43,19 @@ BuildRequires: perl(Net::SSL) BuildRequires: perl(Sys::Guestfs) BuildRequires: perl(Sys::Guestfs::Lib) BuildRequires: perl(Sys::Virt) -BuildRequires: perl(Term::ProgressBar) BuildRequires: perl(URI) BuildRequires: perl(XML::DOM) BuildRequires: perl(XML::DOM::XPath) BuildRequires: perl(XML::Writer) +# This is a bug introduced by f2c5c8fa337f361057353ffa3fe6539cb1a5823c +# perl(Term::ProgressBar) should not be a build requirement +BuildRequires: perl(Term::ProgressBar) + # Need an explicit package dependency for version requires BuildRequires: perl-libguestfs >= 1:1.6.0 BuildRequires: perl-hivex >= 1.2.2 -# virt-p2v build requirements -BuildRequires: rubygem(rake) - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # Need an explicit package dependency for version requires @@ -72,6 +67,10 @@ Requires: perl-hivex >= 1.2.2 # discovered. Requires: perl(Net::SSL) +# Term::ProgressBar is loaded conditionally. The dependency isn't automatically +# discovered +Requires: perl(Term::ProgressBar) + # Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt Requires: libvirt >= 0.8.1 @@ -81,83 +80,32 @@ Requires: /usr/bin/mkisofs # For guest image inspection Requires: /usr/bin/qemu-img +# For ssh transfers +Requires: /usr/bin/ssh + +# For device_map lens +Requires: augeas-libs => augeas-libs-0.7.2-4 + %description virt-v2v is a tool for converting and importing virtual machines to libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a variety of guest operating systems from libvirt-managed hosts and VMware ESX. -%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) -%global gemname virt-p2v -%global geminstdir %{gemdir}/gems/%{gemname}-%{version} -%global rubyabi 1.8 - -%package -n rubygem-%{gemname} -Summary: Send a machine's storage and metadata to virt-p2v-server -BuildArch: noarch -Requires: ruby(abi) = %{rubyabi} -Requires: rubygem(gtk2) -Requires: rubygem(gettext) -Requires: rubygem(net-ssh) -Requires: ruby(dbus) - -Requires: /sbin/blockdev -Requires: /usr/bin/hwloc-info -Requires: NetworkManager - -Provides: rubygem(%{gemname}) = %{version} - -%description -n rubygem-%{gemname} -virt-p2v is a client which connects to a virt-p2v-server and transfer's the host -machine's storage and metadata. virt-p2v is intended to be run from a live -image, so it is unlikely you want to install it directly. - -%package -n rubygem-%{gemname}-doc -Summary: Documentation for rubygem-%{gemname} -Group: Documentation -BuildArch: noarch -Requires: rubygem-%{gemname} = %{version}-%{release} - -%description -n rubygem-%{gemname}-doc -Documentation for rubygem-%{gemname} - -%package -n virt-p2v-image-builder -Summary: Create a virt-p2v bootable image -BuildArch: noarch - -# image builder script requires -Requires: /usr/bin/ksflatten -Requires: /usr/sbin/setenforce -Requires: /usr/bin/livecd-creator - -# Kickstart nochroot scripts requires -Requires: /usr/bin/livecd-iso-to-disk -Requires: /usr/bin/livecd-iso-to-pxeboot -Requires: /usr/bin/image-minimizer - -%description -n virt-p2v-image-builder -virt-p2v-image-builder is a tool to create a bootable virt-p2v live image. %prep %setup -q -n %{name}-v%{version} -%patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build %{__perl} Build.PL ./Build -pushd p2v/client -rake gem -popd - -# Neither perl nor ruby need debuginfo +# perl doesn't need debuginfo %define debug_package %{nil} + %install rm -rf %{buildroot} ./Build install \ @@ -172,42 +120,19 @@ mkdir -p $statedir/software mkdir -p %{buildroot}%{_sysconfdir} cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ +cp v2v/virt-v2v.db $statedir/ %find_lang %{name} # Not clear why this is being created as there is nothing arch-specific in # virt-v2v. It isn't packaged, though, so we need to delete it. -find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm - -# Install p2v-client -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{gemdir} - -gem install --local --install-dir %{buildroot}%{gemdir} \ - --force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem -mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} -find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x -cp COPYING %{buildroot}/%{geminstdir} - -# Install p2v-image-builder -%global builderdir %{_datadir}/virt-p2v-image-builder -builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder -mkdir -p %{buildroot}%{builderdir} -cp p2v/image-builder/*.ks %{buildroot}%{builderdir} -cp p2v/image-builder/virt-p2v-image-builder $builder - -# Set the default data directory -sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder +[ -d "%{buildroot}/%{perl_archlib}" ] && + find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm %check ./Build test -pushd p2v/client -# No tests yet -#rake test -popd - %clean rm -rf %{buildroot} @@ -236,32 +161,18 @@ rm -rf %{buildroot} %dir %{_localstatedir}/lib/virt-v2v %config(noreplace) %{_sysconfdir}/virt-v2v.conf +%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db %config(noreplace) %{_localstatedir}/lib/virt-v2v/software -%files -n rubygem-%{gemname} -%defattr(-, root, root, -) -%{_bindir}/virt-p2v -%dir %{geminstdir} -%{geminstdir}/bin -%{geminstdir}/lib -%doc %{geminstdir}/COPYING -%doc %{geminstdir}/Manifest -%doc %{geminstdir}/Rakefile -%doc %{geminstdir}/%{gemname}.gemspec -%{gemdir}/cache/%{gemname}-%{version}.gem -%{gemdir}/specifications/%{gemname}-%{version}.gemspec - -%files -n rubygem-%{gemname}-doc -%defattr(-, root, root, -) -%{gemdir}/doc/%{gemname}-%{version} - -%files -n virt-p2v-image-builder -%defattr(-, root, root, -) -%{_bindir}/virt-p2v-image-builder -%{builderdir} - %changelog +* Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 +- New upstream release 0.8.3. +- Include upstream patch to fix whitespace problems in PO files. +- Remove virt-p2v from build by synchronizing the spec file so it + almost matches the one in RHEL 6.2. Note that virt-p2v is built in + a separate SRPM called rubygem-virt-p2v. + * Thu Jul 21 2011 Petr Sabata - 0.8.1-4 - Perl mass rebuild From 6dc0ccc894a119c45c622e7f27e7d836f7049c36 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 22 Aug 2011 14:38:16 +0100 Subject: [PATCH 002/235] - New upstream release 0.8.3. - Include upstream patch to fix whitespace problems in PO files. - Remove virt-p2v from build by synchronizing the spec file so it almost matches the one in RHEL 6.2. Note that virt-p2v is built in a separate SRPM called rubygem-virt-p2v. (cherry picked from commit c2522473e29af05d9d58a85be6ba83f9b96edcda) --- .gitignore | 1 + sources | 2 +- virt-v2v-0.8.1-00-44eb9021-modified.patch | 9296 --------------------- virt-v2v-0.8.1-01-e34a8c09.patch | 57 - virt-v2v-0.8.1-02-fadb1929.patch | 111 - virt-v2v-0.8.1-03-a965f7e0.patch | 57 - virt-v2v-0.8.1-04-77bd7908.patch | 29 - virt-v2v-0.8.3-01-bd513aaf.patch | 67 + virt-v2v.spec | 149 +- 9 files changed, 99 insertions(+), 9670 deletions(-) delete mode 100644 virt-v2v-0.8.1-00-44eb9021-modified.patch delete mode 100644 virt-v2v-0.8.1-01-e34a8c09.patch delete mode 100644 virt-v2v-0.8.1-02-fadb1929.patch delete mode 100644 virt-v2v-0.8.1-03-a965f7e0.patch delete mode 100644 virt-v2v-0.8.1-04-77bd7908.patch create mode 100644 virt-v2v-0.8.3-01-bd513aaf.patch diff --git a/.gitignore b/.gitignore index f89e54d..ecd4dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ # Source /virt-v2v-v0.8.1.tar.gz +/virt-v2v-v0.8.3.tar.gz diff --git a/sources b/sources index d91078f..0c31efb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e850297f55ae839b28c8417d0acd080b virt-v2v-v0.8.1.tar.gz +125315e4901b2dfae16590a746e35bfc virt-v2v-v0.8.3.tar.gz diff --git a/virt-v2v-0.8.1-00-44eb9021-modified.patch b/virt-v2v-0.8.1-00-44eb9021-modified.patch deleted file mode 100644 index 5f0b250..0000000 --- a/virt-v2v-0.8.1-00-44eb9021-modified.patch +++ /dev/null @@ -1,9296 +0,0 @@ -diff -ruN virt-v2v-v0.8.1/Build.PL virt-v2v-v0.8.1.new/Build.PL ---- virt-v2v-v0.8.1/Build.PL 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/Build.PL 2011-05-11 17:20:21.000000000 +0100 -@@ -26,7 +26,7 @@ - { - my $self = shift; - -- system($self->config('make'), '-C', 'p2v-image-builder') == 0 -+ system($self->config('make'), '-C', 'p2v/image-builder') == 0 - or return 1; - } - -@@ -243,7 +243,7 @@ - dist_version_from => 'lib/Sys/VirtConvert.pm', - confdoc_files => [ 'v2v/virt-v2v.conf.pod' ], - install_path => { 'locale' => '/usr/local/share/locale' }, -- script_files => [ 'v2v/virt-v2v.pl', 'p2v-server/virt-p2v-server.pl' ], -+ script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ], - meta_add => { - resources => { - license => "http://www.gnu.org/licenses/gpl.html", -diff -ruN virt-v2v-v0.8.1/ChangeLog virt-v2v-v0.8.1.new/ChangeLog ---- virt-v2v-v0.8.1/ChangeLog 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/ChangeLog 2011-05-11 17:20:21.000000000 +0100 -@@ -1,3 +1,33 @@ -+2011-05-10 Matthew Booth -+ -+ * Build.PL, MANIFEST, p2v-image-builder/Makefile, {p2v-client => -+ p2v/client}/.gitignore, {p2v-client => p2v/client}/Manifest, -+ {p2v-client => p2v/client}/Rakefile, {p2v-client => -+ p2v/client}/bin/virt-p2v, {p2v-client => -+ p2v/client}/lib/virt-p2v/blockdevice.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/connection.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/converter.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/gtk-queue.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/netdevice.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/connect.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/convert.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/main.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/network.rb, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/p2v.ui, {p2v-client => -+ p2v/client}/lib/virt-p2v/ui/success.rb, {p2v-image-builder => -+ p2v/image-builder}/.gitignore, p2v/image-builder/Makefile, -+ {p2v-image-builder => p2v/image-builder}/common-install.ks, -+ {p2v-image-builder => p2v/image-builder}/common-manifest-post.ks, -+ {p2v-image-builder => p2v/image-builder}/common-minimizer.ks, -+ {p2v-image-builder => p2v/image-builder}/common-pkgs.ks, -+ {p2v-image-builder => p2v/image-builder}/common-post-nochroot.ks, -+ {p2v-image-builder => p2v/image-builder}/common-post.ks, -+ {p2v-image-builder => p2v/image-builder}/virt-p2v-image-builder, -+ {p2v-image-builder => p2v/image-builder}/virt-p2v-image.ks, -+ {p2v-server => p2v/server}/run-p2v-locally, {p2v-server => -+ p2v/server}/virt-p2v-server.pl, virt-v2v.spec.PL: Give p2v its own -+ subdirectory -+ - 2011-04-26 Matthew Booth - - * lib/Sys/VirtConvert.pm: Bump version to 0.8.1 -diff -ruN virt-v2v-v0.8.1/MANIFEST virt-v2v-v0.8.1.new/MANIFEST ---- virt-v2v-v0.8.1/MANIFEST 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/MANIFEST 2011-05-11 17:20:21.000000000 +0100 -@@ -27,33 +27,33 @@ - MANIFEST.SKIP - META.yml - metadata-format.txt --p2v-client/bin/virt-p2v --p2v-client/lib/virt-p2v/blockdevice.rb --p2v-client/lib/virt-p2v/connection.rb --p2v-client/lib/virt-p2v/converter.rb --p2v-client/lib/virt-p2v/gtk-queue.rb --p2v-client/lib/virt-p2v/netdevice.rb --p2v-client/lib/virt-p2v/ui/connect.rb --p2v-client/lib/virt-p2v/ui/convert.rb --p2v-client/lib/virt-p2v/ui/main.rb --p2v-client/lib/virt-p2v/ui/network.rb --p2v-client/lib/virt-p2v/ui/p2v.ui --p2v-client/lib/virt-p2v/ui/success.rb --p2v-client/Manifest --p2v-client/Rakefile --p2v-client/virt-p2v.gemspec --p2v-image-builder/common-install.ks --p2v-image-builder/common-manifest-post.ks --p2v-image-builder/common-minimizer.ks --p2v-image-builder/common-pkgs.ks --p2v-image-builder/common-post-nochroot.ks --p2v-image-builder/common-post.ks --p2v-image-builder/Makefile --p2v-image-builder/version.ks --p2v-image-builder/virt-p2v-image-builder --p2v-image-builder/virt-p2v-image.ks --p2v-server/run-p2v-locally --p2v-server/virt-p2v-server.pl -+p2v/client/bin/virt-p2v -+p2v/client/lib/virt-p2v/blockdevice.rb -+p2v/client/lib/virt-p2v/connection.rb -+p2v/client/lib/virt-p2v/converter.rb -+p2v/client/lib/virt-p2v/gtk-queue.rb -+p2v/client/lib/virt-p2v/netdevice.rb -+p2v/client/lib/virt-p2v/ui/connect.rb -+p2v/client/lib/virt-p2v/ui/convert.rb -+p2v/client/lib/virt-p2v/ui/main.rb -+p2v/client/lib/virt-p2v/ui/network.rb -+p2v/client/lib/virt-p2v/ui/p2v.ui -+p2v/client/lib/virt-p2v/ui/success.rb -+p2v/client/Manifest -+p2v/client/Rakefile -+p2v/client/virt-p2v.gemspec -+p2v/image-builder/common-install.ks -+p2v/image-builder/common-manifest-post.ks -+p2v/image-builder/common-minimizer.ks -+p2v/image-builder/common-pkgs.ks -+p2v/image-builder/common-post-nochroot.ks -+p2v/image-builder/common-post.ks -+p2v/image-builder/Makefile -+p2v/image-builder/version.ks -+p2v/image-builder/virt-p2v-image-builder -+p2v/image-builder/virt-p2v-image.ks -+p2v/server/run-p2v-locally -+p2v/server/virt-p2v-server.pl - po/es.po - po/it.po - po/Makefile -diff -ruN virt-v2v-v0.8.1/p2v/client/bin/virt-p2v virt-v2v-v0.8.1.new/p2v/client/bin/virt-p2v ---- virt-v2v-v0.8.1/p2v/client/bin/virt-p2v 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/bin/virt-p2v 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,62 @@ -+#!/usr/bin/env ruby -+ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'virt-p2v/ui/main' -+require 'virt-p2v/ui/network' -+require 'virt-p2v/ui/connect' -+require 'virt-p2v/ui/convert' -+require 'virt-p2v/ui/success' -+ -+require 'virt-p2v/converter' -+require 'virt-p2v/netdevice' -+ -+require 'gettext' -+ -+include GetText -+ -+bindtextdomain('virt-p2v') -+ -+if Process.uid != 0 -+ puts _("virt-p2v must be executed with root privileges.\n" + -+ "It is intended to be included in a custom Live image, not " + -+ "run from the command\nline.") -+ abort -+end -+ -+converter = VirtP2V::Converter.new -+ -+# Initialise the wizard UI -+ui = VirtP2V::UI::Main.new -+ -+# Initialize wizard pages -+VirtP2V::UI::Network.init(ui) -+VirtP2V::UI::Connect.init(ui, converter) -+VirtP2V::UI::Convert.init(ui, converter) -+VirtP2V::UI::Success.init(ui) -+ -+# Skip the network configuration screen if there is already an active network -+# connection -+VirtP2V::NetworkDevice.all_devices.each { |device| -+ if device.activated then -+ ui.active_page = 'server_win' -+ break -+ end -+} -+ -+ui.show -+ui.main_loop -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/blockdevice.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/blockdevice.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/blockdevice.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/blockdevice.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,112 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+module VirtP2V -+ -+class NoSuchDeviceError < StandardError; end -+ -+class FixedBlockDevice -+ @@devices = {} -+ -+ def self.all_devices -+ @@devices.values -+ end -+ -+ def self.[](device) -+ raise NoSuchDeviceError unless @@devices.has_key?(device) -+ -+ @@devices[device] -+ end -+ -+ attr_reader :device -+ -+ def initialize(device) -+ @device = device -+ @@devices[device] = self -+ end -+end -+ -+class RemovableBlockDevice -+ @@devices = {} -+ -+ def self.all_devices -+ @@devices.values -+ end -+ -+ def self.[](device) -+ raise NoSuchDeviceError unless @@devices.has_key?(device) -+ -+ @@devices[device] -+ end -+ -+ attr_reader :device, :type -+ -+ def initialize(device, type) -+ @device = device -+ @type = type -+ -+ @@devices[device] = self -+ end -+end -+ -+# Detect and instantiate all fixed and removable block devices in the system -+begin -+ # Look for block devices -+ # Specifically, we look for entries in /sys/block which have a device -+ # symlink and no entries in their slaves subdirectory -+ Dir.foreach('/sys/block') { |dev| -+ next if dev == '.' || dev == '..' -+ -+ # Skip if there's no device link -+ next unless File.exists?("/sys/block/#{dev}/device") -+ -+ # Skip if the slaves subdirectory contains anything other than . and -+ # .. -+ begin -+ next if Dir.entries("/sys/block/#{dev}/slaves").length > 2 -+ rescue Errno::ENOENT => ex -+ # This shouldn't happen, but if it did I guess it would mean -+ # there are no slave devices -+ end -+ -+ # We've got a real block device. Check if it's removable or not -+ File.open("/sys/block/#{dev}/removable") { |fd| -+ removable = fd.gets.chomp -+ if removable == "0" then -+ FixedBlockDevice.new(dev) -+ else -+ # Look in device/modalias to work out what kind of removable -+ # device this is -+ type = File.open( -+ "/sys/block/#{dev}/device/modalias") \ -+ { |modalias_f| -+ modalias = modalias_f.gets.chomp -+ if modalias =~ /floppy/ then -+ 'floppy' -+ elsif modalias =~ /cdrom/ then -+ 'cdrom' -+ else -+ # We don't know what this is, ignore it -+ end -+ } -+ -+ RemovableBlockDevice.new(dev, type) unless type.nil? -+ end -+ } -+ } -+end -+ -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/connection.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/connection.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/connection.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/connection.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,320 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'rubygems' -+require 'net/ssh' -+require 'thread' -+require 'yaml' -+ -+require 'virt-p2v/gtk-queue' -+ -+module VirtP2V -+ -+class Connection -+ include GetText -+ -+ attr_reader :connected -+ -+ class InvalidHostnameError < StandardError; end -+ class InvalidCredentialsError < StandardError; end -+ class TransportError < StandardError; end -+ class NoP2VError < StandardError; end -+ class RemoteError < StandardError; end -+ class ProtocolError < StandardError; end -+ class NotConnectedError < StandardError; end -+ -+ def on_connect(&cb) -+ @connection_listeners << cb -+ end -+ -+ def initialize(hostname, username, password, &cb) -+ @mutex = Mutex.new -+ @connection_listeners = [] -+ -+ # Always send our version number on connection -+ @connection_listeners << Proc.new { |cb| -+ self.version { |result| cb.call(result) } -+ } -+ -+ run(cb) { -+ error = nil -+ begin -+ @ssh = Net::SSH.start(hostname, username, :password => password) -+ rescue SocketError, Errno::EHOSTUNREACH => ex -+ raise InvalidHostnameError -+ raise ex -+ rescue Net::SSH::AuthenticationFailed => ex -+ raise InvalidCredentialsError -+ raise ex -+ end -+ -+ @buffer = "" -+ @connected = false -+ -+ Gtk.queue { cb.call(true) } -+ } -+ end -+ -+ def connect(&cb) -+ run(cb) { -+ @ch = @ssh.open_channel do |ch| -+ ch.exec("virt-p2v-server") do |ch, success| -+ raise RemoteError, -+ "could not execute a remote command" unless success -+ -+ ch.on_data do |ch, data| -+ @buffer << data -+ end -+ -+ # If we get anything on stderr, raise it as a RemoteError -+ ch.on_extended_data do |ch, type, data| -+ close -+ raise RemoteError, data -+ end -+ -+ # Clean up local resources if we get eof from the other end -+ ch.on_eof do |ch| -+ close -+ end -+ -+ @connected = true -+ end -+ -+ end -+ -+ # Wait until we're connected -+ @ssh.loop do -+ !@connected -+ end -+ -+ i = 0; -+ listener_result = lambda { |result| -+ if result.kind_of?(Exception) -+ cb.call(result) -+ else -+ i += 1 -+ if i == @connection_listeners.length -+ cb.call(true) -+ else -+ Gtk.queue { -+ @connection_listeners[i].call(listener_result) -+ } -+ end -+ end -+ } -+ Gtk.queue { @connection_listeners[0].call(listener_result) } -+ } -+ end -+ -+ def close -+ @connected = false -+ @buffer = "" -+ @ch.close -+ end -+ -+ def version(&cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("VERSION 0\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def lang(lang, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("LANG #{lang}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def metadata(meta, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ payload = YAML::dump(meta) -+ @ch.send_data("METADATA #{payload.length}\n"); -+ @ch.send_data(payload) -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def path(length, path, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("PATH #{length} #{path}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def convert(&cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("CONVERT\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def list_profiles(&cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("LIST_PROFILES\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def set_profile(profile, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("SET_PROFILE #{profile}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def container(type, &cb) -+ raise NotConnectedError unless @connected -+ -+ run(cb) { -+ @ch.send_data("CONTAINER #{type}\n") -+ result = parse_return -+ -+ Gtk.queue { cb.call(result) } -+ } -+ end -+ -+ def send_data(io, length, progress, &completion) -+ raise NotConnectedError unless @connected -+ -+ run(completion) { -+ @ch.send_data("DATA #{length}\n") -+ total = 0 -+ buffer = '' -+ begin -+ # This loop is in the habit of hanging in Net::SSH when sending -+ # a chunk larger than about 2M. Putting the 1 second wait -+ # timeout here kickstarts it if it stops. -+ @ssh.loop(1) { -+ if io.eof? || total == length then -+ false -+ else -+ if @ch.remote_window_size > 0 then -+ out = length - total -+ out = @ch.remote_window_size \ -+ if out > @ch.remote_window_size -+ -+ io.read(out, buffer) -+ @ch.send_data(buffer) -+ -+ total += buffer.length -+ -+ # Send a progress callback -+ Gtk.queue { progress.call(total) } -+ end -+ -+ true -+ end -+ } -+ rescue => ex -+ Gtk.queue { completion.call(ex) } -+ end -+ -+ result = parse_return -+ -+ Gtk.queue { completion.call(result) } -+ } -+ end -+ -+ private -+ -+ def run(cb) -+ # Run the given block in a new thread -+ t = Thread.new { -+ begin -+ # We can't run more than 1 command simultaneously -+ @mutex.synchronize { yield } -+ rescue => ex -+ # Deliver exceptions to the caller, then re-raise them -+ Gtk.queue { cb.call(ex) } -+ raise ex -+ end -+ } -+ t.priority = 1 -+ end -+ -+ # Return a single line of output from the remote server -+ def readline -+ # Run the event loop until the buffer contains a newline -+ index = nil -+ @ssh.loop do -+ if !@ch.eof? then -+ index = @buffer.index("\n") -+ index.nil? -+ else -+ close -+ raise RemoteError, _('Server closed connection unexpectedly') -+ end -+ end -+ -+ # Remove the line from the buffer and return it with the trailing -+ # newline removed -+ @buffer.slice!(0..index).chomp -+ end -+ -+ def parse_return -+ line = readline -+ line =~ /^(OK|ERROR|LIST)(?:\s(.*))?$/ or -+ raise ProtocolError, "Invalid server response: #{line}" -+ -+ return true if $~[1] == 'OK' -+ if $~[1] == 'ERROR' then -+ close -+ raise RemoteError, $~[2] -+ end -+ -+ # LIST response. Get the number of items, and read that many lines -+ n = Integer($~[2]) -+ ret = [] -+ while n > 0 do -+ n -= 1 -+ ret.push(readline) -+ end -+ -+ ret -+ end -+end -+ -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/converter.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/converter.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/converter.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/converter.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,218 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'rexml/document' -+include REXML -+ -+require 'virt-p2v/netdevice' -+require 'virt-p2v/blockdevice' -+ -+module VirtP2V -+ -+# NIC -+# hostname -+# username -+# password -+ -+# name User entry -+# memory Editable -+# cpus Editable -+# arch Detected: cpuflags contains lm (long mode) -+# features Detected: apic, acpi, pae -+# disks Editable, default to all -+# device Detected -+# path Detected -+# is_block 1 -+# format raw -+# removables Editable, default to all -+# device Detected -+# type Detected -+# nics Editable, default to all connected -+# mac Detected, option to generate new -+# vnet Set to nic name -+# vnet_type bridge -+ -+class Converter -+ include GetText -+ -+ attr_accessor :profile, :name, :cpus, :memory, :arch -+ attr_reader :features, :disks, :removables, :nics -+ -+ attr_reader :connection -+ -+ def on_connection(&cb) -+ @connection_listeners << cb -+ end -+ -+ def connection=(connection) -+ @connection = connection -+ @connection_listeners.each { |cb| -+ cb.call(connection) -+ } -+ end -+ -+ def convert(status, progress, &completion) -+ iterate([ -+ lambda { |cb| @connection.set_profile(@profile, &cb) }, -+ lambda { |cb| @connection.metadata(meta, &cb) }, -+ lambda { |cb| -+ iterate(@disks.map { |dev| -+ lambda { |cb2| -+ disk(dev, status, progress, cb2) -+ } -+ }, cb) -+ }, -+ lambda { |cb| -+ status.call(_('Converting')) -+ @connection.convert(&cb) -+ } -+ ], completion) -+ end -+ -+ private -+ -+ def initialize() -+ @profile = nil -+ @connection = nil -+ @connection_listeners = [] -+ -+ # Initialize basic system information -+ @name = '' # There's no reasonable default for this -+ -+ # Get total memory from /proc/meminfo -+ File.open('/proc/meminfo', 'r') do |fd| -+ fd.each { |line| -+ next unless line =~ /^MemTotal:\s+(\d+)\b/ -+ -+ @memory = Integer($~[1]) * 1024 -+ break -+ } -+ end -+ -+ # Get the total number of cpu threads from hwloc-info -+ hwloc = Document.new `hwloc-info --of xml` -+ @cpus = XPath.match(hwloc, "//object[@type='PU']").length -+ -+ # Get cpu architecture and features from the first flags entry in -+ # /proc/cpuinfo -+ File.open('/proc/cpuinfo', 'r') do |fd| -+ fd.each { |line| -+ next unless line =~ /^flags\s*:\s(.*)$/ -+ -+ flags = $~[1] -+ -+ # x86_64 if flags contains lm (long mode), i686 otherwise. We -+ # don't support anything else. -+ @arch = flags =~ /\blm\b/ ? 'x86_64' : 'i686' -+ -+ # Pull some select features from cpu flags -+ @features = [] -+ [ 'apic', 'acpi', 'pae' ].each { |f| -+ @features << f if flags =~ /\b#{f}\b/ -+ } -+ break -+ } -+ end -+ -+ # Initialise empty lists for optional devices. These will be added -+ # according to the user's selection -+ @disks = [] -+ @removables = [] -+ @nics = [] -+ end -+ -+ def disk(dev, status, progress, completion) -+ path = "/dev/#{dev}" -+ # XXX: No error checking of blockdev execution -+ size = Integer(`blockdev --getsize64 #{path}`.chomp) -+ status.call(_("Transferring #{dev}")) -+ iterate([ -+ lambda { |cb| @connection.path(size, path, &cb) }, -+ lambda { |cb| @connection.container('RAW', &cb) }, -+ lambda { |cb| -+ io = nil -+ begin -+ io = File.new(path, 'r') -+ rescue => ex -+ cb.call(ex) -+ end -+ pc = 0 -+ @connection.send_data(io, size, lambda { |total| -+ npc = Float(total) * 100 / size -+ # Only update the progress if it has increased by -+ # at least 1% -+ if Integer(npc) > pc then -+ pc += 1 -+ progress.call(dev, pc) -+ end -+ }, &cb) -+ } -+ ], completion) -+ end -+ -+ def iterate(stages, completion) -+ i = 0 -+ cb = lambda { |result| -+ if result.kind_of?(Exception) then -+ completion.call(result) -+ else -+ i += 1 -+ if i == stages.length then -+ completion.call(true) -+ else -+ stages[i].call(cb) -+ end -+ end -+ } -+ stages[0].call(cb) -+ end -+ -+ def meta -+ { -+ 'name' => @name, -+ 'cpus' => @cpus, -+ 'memory' => @memory, -+ 'arch' => @arch, -+ 'features' => @features, -+ 'disks' => @disks.map { |device| -+ { -+ 'device' => device, -+ 'path' => "/dev/#{device}", -+ 'is_block' => '1', -+ 'format' => 'raw' -+ } -+ }, -+ 'removables' => @removables.map { |device| -+ removable = RemovableBlockDevice[device] -+ { -+ 'device' => removable.device, -+ 'type' => removable.type -+ } -+ }, -+ 'nics' => @nics.map { |device| -+ nic = NetworkDevice[device] -+ { -+ 'mac' => nic.mac, -+ 'vnet' => nic.name, -+ 'vnet_type' => 'bridge' -+ } -+ } -+ } -+ end -+end -+ -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/gtk-queue.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/gtk-queue.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/gtk-queue.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/gtk-queue.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,52 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+# This code is taken from: -+# http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_threads -+# The author of the above page is given as Tal Liron -+# The above page is distributed under the terms of the GNU FDL, although I -+# consider this code to be too trivial to be copyrightable -+ -+require 'gtk2' -+require 'thread' -+ -+module Gtk -+ GTK_PENDING_BLOCKS = [] -+ GTK_PENDING_BLOCKS_LOCK = Mutex.new -+ -+ def Gtk.queue &block -+ if Thread.current == Thread.main -+ block.call -+ else -+ GTK_PENDING_BLOCKS_LOCK.synchronize do -+ GTK_PENDING_BLOCKS << block -+ end -+ end -+ end -+ -+ def Gtk.main_with_queue timeout -+ Gtk.timeout_add timeout do -+ GTK_PENDING_BLOCKS_LOCK.synchronize do -+ for block in GTK_PENDING_BLOCKS -+ block.call -+ end -+ GTK_PENDING_BLOCKS.clear -+ end -+ true -+ end -+ Gtk.main -+ end -+end -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/netdevice.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/netdevice.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/netdevice.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/netdevice.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,259 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'dbus' -+require 'gettext' -+ -+module VirtP2V -+ -+class NetworkDevice -+ include GetText -+ -+ attr_reader :name, :mac, :connected, :activated, :state -+ -+ # Some NetworkManager names, for convenience -+ CONNECTION = 'org.freedesktop.NetworkManagerSettings.Connection'.freeze -+ DEVICE = 'org.freedesktop.NetworkManager.Device'.freeze -+ NETWORKMANAGER = 'org.freedesktop.NetworkManager'.freeze -+ PROPERTIES = 'org.freedesktop.DBus.Properties'.freeze -+ SETTINGS = 'org.freedesktop.NetworkManagerSettings'.freeze -+ WIRED = 'org.freedesktop.NetworkManager.Device.Wired'.freeze -+ -+ # NetworkManager device types -+ # http://projects.gnome.org/NetworkManager/developers/spec-08.html -+ TYPE_UNKNOWN = 0 -+ TYPE_ETHERNET = 1 -+ TYPE_WIFI = 2 -+ TYPE_GSM = 3 -+ TYPE_CDMA = 4 -+ -+ # NetworkManager device states -+ STATE_UNKNOWN = 0 -+ STATE_UNMANAGED = 1 -+ STATE_UNAVAILABLE = 2 -+ STATE_DISCONNECTED = 3 -+ STATE_PREPARE = 4 -+ STATE_CONFIG = 5 -+ STATE_NEED_AUTH = 6 -+ STATE_IP_CONFIG = 7 -+ STATE_ACTIVATED = 8 -+ STATE_FAILED = 9 -+ -+ # Human readable descriptions of NetworkManager Device States -+ STATES = { -+ 0 => _('Unknown').freeze, # For completeness -+ 1 => _('Unmanaged').freeze, # For completeness -+ 2 => _('No cable connected').freeze, -+ 3 => _('Not connected').freeze, -+ 4 => _('Preparing to connect').freeze, -+ 5 => _('Configuring').freeze, -+ 6 => _('Waiting for authentication').freeze, -+ 7 => _('Obtaining an IP address').freeze, -+ 8 => _('Connected').freeze, -+ 9 => _('Connection failed').freeze -+ }.freeze -+ -+ def initialize(obj, device, props) -+ device.default_iface = WIRED -+ -+ @nm_obj = obj -+ @name = props.Get(DEVICE, 'Interface')[0] -+ @mac = props.Get(WIRED, 'HwAddress')[0] -+ state = props.Get(WIRED, 'State')[0] -+ -+ # Lookup by name -+ @@devices[@name] = self -+ -+ state_updated(state) -+ -+ # Register a listener for state changes -+ device.on_signal('PropertiesChanged') { |props| -+ if props.has_key?('State') then -+ state_updated(props['State']) -+ -+ # Notify registered state change handlers -+ @@listeners.each { |cb| cb.call(self) } -+ end -+ } -+ end -+ -+ def self.all_devices() -+ @@devices.values -+ end -+ -+ def self.add_listener(cb) -+ @@listeners.push(cb) -+ end -+ -+ def self.[](name) -+ @@devices[name] -+ end -+ -+ def activate(auto, ip, prefix, gateway, dns) -+ # Get an IP config dependent on whether @ip_address is IPv4 or IPv6 -+ ip_config = auto ? get_config_auto : -+ ip.ipv4? ? get_config_ipv4() : get_config_ipv6() -+ -+ # Create a new NetworkManager connection object -+ settings = @@nm_service.object( -+ '/org/freedesktop/NetworkManagerSettings') -+ settings.introspect() -+ settings.default_iface = SETTINGS -+ -+ uuid = `uuidgen`.chomp -+ settings.AddConnection( -+ 'connection' => { -+ 'uuid' => uuid, -+ 'id' => 'P2V', -+ 'type' => '802-3-ethernet', -+ 'autoconnect' => false -+ }, -+ '802-3-ethernet' => {}, -+ 'ipv4' => ip_config['ipv4'], -+ 'ipv6' => ip_config['ipv6'] -+ ) -+ -+ # Find the connection we just created -+ # XXX: There must be a better way to get this! -+ conn = settings.ListConnections()[0].each { |i| -+ conn = @@nm_service.object(i) -+ conn.introspect -+ conn.default_iface = CONNECTION -+ -+ break i if conn.GetSettings()[0]['connection']['uuid'] == uuid -+ } -+ -+ nm = @@nm_service.object('/org/freedesktop/NetworkManager') -+ nm.introspect -+ nm.default_iface = NETWORKMANAGER -+ nm.ActivateConnection('org.freedesktop.NetworkManagerSystemSettings', -+ conn, @nm_obj, '/') -+ end -+ -+ private -+ -+ def state_updated(state) -+ @connected = state > 2 -+ @state = STATES[state] -+ -+ if state == STATE_ACTIVATED then -+ @activated = true -+ elsif state == STATE_FAILED then -+ @activated = false -+ else -+ @activated = nil -+ end -+ end -+ -+ def get_config_auto -+ { -+ 'ipv4' => { -+ 'method' => 'auto' -+ }, -+ 'ipv6' => { -+ 'method' => 'ignore' -+ } -+ } -+ end -+ -+ def ipv4_to_nm(ipaddr) -+ ipaddr.hton().unpack("I")[0] -+ end -+ -+ def get_config_ipv4 -+ addresses = [[ ipv4_to_nm(@ip_address), @ip_prefix, -+ ipv4_to_nm(@ip_gateway) ]] -+ -+ dns = [] -+ @ip_dns.each{ |ipaddr| -+ # Only use IPv4 DNS servers -+ next unless ipaddr.ipv4? -+ dns.push(ipv4_to_nm(ipaddr)) -+ } -+ -+ { -+ 'ipv4' => { -+ 'method' => 'manual', -+ 'addresses' => [ 'aau', addresses ], -+ 'dns' => [ 'au', dns ] -+ }, -+ 'ipv6' => { -+ 'method' => 'ignore' -+ } -+ } -+ end -+ -+ def ipv6_to_nm(ipaddr) -+ ipaddr.hton().unpack("c*") -+ end -+ -+ def get_config_ipv6 -+ dns = [] -+ @ip_dns.each { |ipaddr| -+ # Only use IPv6 DNS servers -+ next unless ipaddr.ipv6? -+ dns.push(ipv6_to_nm(ipaddr)) -+ } -+ -+ { -+ 'ipv4' => { -+ 'method' => 'disabled' -+ }, -+ 'ipv6' => { -+ 'method' => 'manual', -+ 'addresses' => [ 'a(ayu)', [[ -+ ipv6_to_nm(@ip_address), -+ @ip_prefix -+ ]] ], -+ 'routes' => [ 'a(ayuayu)', [[ -+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], 0, -+ ipv6_to_nm(@ip_gateway), 1024 -+ ]] ], -+ 'dns' => [ 'aay', dns ] -+ } -+ } -+ end -+ -+ # Class initialization -+ begin -+ dbus = DBus::SystemBus.instance() -+ dbus.glibize() -+ @@nm_service = dbus.service(NETWORKMANAGER) -+ -+ nm = @@nm_service.object('/org/freedesktop/NetworkManager') -+ nm.introspect -+ nm.default_iface = NETWORKMANAGER -+ -+ @@devices = {} -+ nm.GetDevices()[0].each { |obj| -+ device = @@nm_service.object(obj) -+ device.introspect -+ -+ props = device[PROPERTIES] -+ type = props.Get(DEVICE, 'DeviceType')[0] -+ -+ # We only support ethernet devices -+ next unless type == TYPE_ETHERNET -+ -+ # Constructor will add it to @@devices -+ self.new(obj, device, props) -+ } -+ -+ @@listeners = [] -+ end -+end -+ -+end #module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/connect.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/connect.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/connect.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/connect.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,179 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'gtk2' -+ -+require 'virt-p2v/connection' -+ -+module VirtP2V::UI::Connect -+ include GetText -+ -+ UI_STATE_INVALID = 0 -+ UI_STATE_VALID = 1 -+ UI_STATE_ACTIVATING = 2 -+ UI_STATE_COMPLETE = 3 -+ -+ EV_HOSTNAME = 0 -+ EV_USERNAME = 1 -+ EV_PASSWORD = 2 -+ EV_BUTTON = 3 -+ EV_ACTIVATION = 4 -+ -+ def self.event(event, status) -+ case event -+ when EV_HOSTNAME -+ @hostname = status -+ when EV_USERNAME -+ @username = status -+ when EV_PASSWORD -+ @password = status -+ when EV_BUTTON, EV_ACTIVATION -+ # Persistent state not required -+ else -+ raise "Unexpected event: #{event}" -+ end -+ -+ valid = @hostname && @username && @password -+ -+ case @state -+ when UI_STATE_INVALID -+ set_state(UI_STATE_VALID) if valid -+ when UI_STATE_VALID -+ if !valid then -+ set_state(UI_STATE_INVALID) -+ elsif event == EV_BUTTON -+ set_state(UI_STATE_ACTIVATING) -+ end -+ when UI_STATE_ACTIVATING -+ # UI is disabled, so we shouldn't be getting any events other than -+ # EV_ACTIVATION -+ raise "Unexpected event: #{event}" unless event == EV_ACTIVATION -+ -+ set_state(status ? UI_STATE_COMPLETE : UI_STATE_VALID) -+ else -+ raise "Unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.init(ui, converter) -+ @hostname_ui = ui.get_object('server_hostname') -+ @username_ui = ui.get_object('server_username') -+ @password_ui = ui.get_object('server_password') -+ @connect_frame = ui.get_object('connect_frame') -+ @connect_button = ui.get_object('connect_button') -+ @connect_error = ui.get_object('connect_error') -+ -+ ui.register_handler('server_hostname_changed', -+ method(:server_hostname_changed)) -+ ui.register_handler('server_username_changed', -+ method(:server_username_changed)) -+ ui.register_handler('server_password_changed', -+ method(:server_password_changed)) -+ ui.register_handler('connect_button_clicked', -+ method(:connect_button_clicked)) -+ -+ @hostname = @hostname_ui.text.strip.length > 0 -+ @username = @username_ui.text.strip.length > 0 -+ @password = @password_ui.text.length > 0 # Allow spaces in passwords -+ @state = UI_STATE_INVALID -+ -+ @ui = ui -+ @converter = converter -+ end -+ -+ def self.set_state(state) -+ # Don't do anything if state hasn't changed -+ return if state == @state -+ -+ case state -+ when UI_STATE_INVALID -+ @connect_frame.sensitive = true -+ @connect_button.sensitive = false -+ -+ @state = UI_STATE_INVALID -+ when UI_STATE_VALID -+ @connect_frame.sensitive = true -+ @connect_button.sensitive = true -+ -+ @state = UI_STATE_VALID -+ when UI_STATE_ACTIVATING -+ @connect_frame.sensitive = false -+ @connect_button.sensitive = false -+ @connect_error.text = '' -+ -+ @state = UI_STATE_ACTIVATING -+ when UI_STATE_COMPLETE -+ # Activate the next page -+ @ui.active_page = 'conversion_win' -+ -+ # ... then leave this one as we hope to find it if we come back here -+ set_state(UI_STATE_VALID) -+ else -+ raise "Attempt to set unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.server_hostname_changed -+ event(EV_HOSTNAME, @hostname_ui.text.strip.length > 0) -+ end -+ -+ def self.server_username_changed -+ event(EV_USERNAME, @username_ui.text.strip.length > 0) -+ end -+ -+ def self.server_password_changed -+ event(EV_PASSWORD, @password_ui.text.length > 0) -+ end -+ -+ def self.connect_button_clicked -+ event(EV_BUTTON, true) -+ -+ hostname = @hostname_ui.text.strip -+ username = @username_ui.text.strip -+ password = @password_ui.text -+ connection = VirtP2V::Connection.new(hostname, username, password) \ -+ { |result| -+ case result -+ when true -+ @converter.connection = connection -+ connection.connect { |result| -+ case result -+ when true -+ event(EV_ACTIVATION, true) -+ when VirtP2V::Connection::RemoteError -+ @connect_error.text = _('Failed to start ' + -+ 'virt-p2v-server on remote ' + -+ 'server') -+ event(EV_ACTIVATION, false) -+ else -+ @connect_error.text = result.message -+ event(EV_ACTIVATION, false) -+ end -+ } -+ when VirtP2V::Connection::InvalidHostnameError -+ @connect_error.text = _"Unable to connect to #{hostname}" -+ event(EV_ACTIVATION, false) -+ when VirtP2V::Connection::InvalidCredentialsError -+ @connect_error.text = _"Invalid username/password" -+ event(EV_ACTIVATION, false) -+ else -+ raise result -+ end -+ } -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/convert.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/convert.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/convert.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/convert.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,422 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'gtk2' -+ -+require 'virt-p2v/blockdevice' -+require 'virt-p2v/netdevice' -+ -+module VirtP2V::UI::Convert -+ include GetText -+ -+ CONVERT_PROFILE_NAME = 0 -+ -+ CONVERT_NETWORK_CONVERT = 0 -+ CONVERT_NETWORK_DEVICE = 1 -+ -+ CONVERT_FIXED_CONVERT = 0 -+ CONVERT_FIXED_DEVICE = 1 -+ CONVERT_FIXED_PROGRESS = 2 -+ -+ CONVERT_REMOVABLE_CONVERT = 0 -+ CONVERT_REMOVABLE_DEVICE = 1 -+ CONVERT_REMOVABLE_TYPE = 2 -+ -+ UI_STATE_INVALID = 0 -+ UI_STATE_VALID = 1 -+ UI_STATE_CONNECTING = 2 -+ UI_STATE_CONVERTING = 3 -+ UI_STATE_COMPLETE = 4 -+ -+ EV_VALID = 0 -+ EV_BUTTON = 1 -+ EV_CONNECTION = 2 -+ EV_CONVERTED = 3 -+ -+ def self.init(ui, converter) -+ # ListStores -+ @profiles = ui.get_object('convert_profile_list') -+ @nics = ui.get_object('convert_network_list') -+ @fixeds = ui.get_object('convert_fixed_list') -+ @removables = ui.get_object('convert_removable_list') -+ -+ # Widgets -+ @profile = ui.get_object('convert_profile') -+ @name = ui.get_object('convert_name') -+ @cpus = ui.get_object('convert_cpus') -+ @memory = ui.get_object('convert_memory') -+ @editable = ui.get_object('convert_editable') -+ @button = ui.get_object('convert_button') -+ @status = ui.get_object('convert_status') -+ -+ # Get initial values from converter -+ @name.text = converter.name -+ @cpus.text = converter.cpus.to_s -+ @memory.text = (converter.memory / 1024 / 1024).to_s -+ -+ # Populate profiles on connection -+ converter.on_connection { |conn| -+ conn.on_connect { |cb| -+ conn.list_profiles { |profiles| -+ cb.call(RuntimeError.new(_('Remote server does not ' + -+ 'define any profiles in ' + -+ '/etc/virt-v2v.conf'))) \ -+ if profiles.kind_of?(Exception) or profiles.empty? -+ -+ selected = @profile.active_iter -+ selected = selected[CONVERT_PROFILE_NAME] \ -+ unless selected.nil? -+ -+ @profiles.clear -+ profiles.each { |i| -+ profile = @profiles.append -+ profile[CONVERT_PROFILE_NAME] = i -+ @profile.active_iter = profile if i == selected -+ } -+ -+ cb.call(true) -+ } -+ } -+ } -+ -+ VirtP2V::FixedBlockDevice.all_devices.each { |dev| -+ fixed = @fixeds.append -+ fixed[CONVERT_FIXED_CONVERT] = true -+ fixed[CONVERT_FIXED_DEVICE] = dev.device -+ fixed[CONVERT_FIXED_PROGRESS] = 0 -+ } -+ -+ VirtP2V::RemovableBlockDevice.all_devices.each { |dev| -+ rem = @removables.append -+ rem[CONVERT_REMOVABLE_CONVERT] = true -+ rem[CONVERT_REMOVABLE_DEVICE] = dev.device -+ rem[CONVERT_REMOVABLE_TYPE] = dev.type -+ } -+ -+ VirtP2V::NetworkDevice.all_devices.each { |dev| -+ nic = @nics.append -+ nic[CONVERT_NETWORK_CONVERT] = dev.connected -+ nic[CONVERT_NETWORK_DEVICE] = dev.name -+ } -+ -+ # Event handlers -+ ui.register_handler('convert_profile_changed', -+ method(:update_values)) -+ ui.register_handler('convert_name_changed', -+ method(:update_values)) -+ ui.register_handler('convert_cpus_changed', -+ method(:convert_cpus_changed)) -+ ui.register_handler('convert_memory_changed', -+ method(:convert_memory_changed)) -+ ui.register_handler('convert_fixed_list_row_changed', -+ method(:convert_fixed_list_row_changed)) -+ ui.register_handler('convert_removable_list_row_changed', -+ method(:update_values)) -+ ui.register_handler('convert_network_list_row_changed', -+ method(:update_values)) -+ ui.register_handler('convert_fixed_select_toggled', -+ method(:convert_fixed_select_toggled)) -+ ui.register_handler('convert_removable_select_toggled', -+ method(:convert_removable_select_toggled)) -+ ui.register_handler('convert_network_select_toggled', -+ method(:convert_network_select_toggled)) -+ ui.register_handler('convert_button_clicked', -+ method(:convert_button_clicked)) -+ -+ @state = nil -+ set_state(UI_STATE_INVALID) -+ update_values -+ -+ @ui = ui -+ @converter = converter -+ end -+ -+ def self.event(event, status) -+ case @state -+ when UI_STATE_INVALID -+ case event -+ when EV_VALID -+ set_state(UI_STATE_VALID) if status -+ else -+ raise "Unexpected event: #{@state} #{event}" -+ end -+ when UI_STATE_VALID -+ case event -+ when EV_VALID -+ set_state(UI_STATE_INVALID) if !status -+ when EV_BUTTON -+ if @converter.connection.connected then -+ set_state(UI_STATE_CONVERTING) -+ convert -+ else -+ set_state(UI_STATE_CONNECTING) -+ reconnect -+ end -+ else -+ raise "Unexpected event: #{@state} #{event}" -+ end -+ when UI_STATE_CONNECTING -+ case event -+ when EV_CONNECTION -+ if status then -+ set_state(UI_STATE_CONVERTING) -+ convert -+ else -+ set_state(UI_STATE_VALID) -+ end -+ when EV_VALID -+ # update_values will be called when the profile list is cleared -+ # and repopulated during connection. Untidy, but ignore it. -+ else -+ raise "Unexpected event: #{@state} #{event}" \ -+ unless event == EV_CONNECTION -+ end -+ when UI_STATE_CONVERTING -+ case event -+ when EV_CONVERTED -+ if status then -+ set_state(UI_STATE_COMPLETE) -+ else -+ set_state(UI_STATE_VALID) -+ end -+ when EV_VALID -+ # update_values will be called when the list stores are updated. -+ # Untidy, but ignore it -+ else -+ raise "Unexpected event: #{@state} #{event}" -+ end -+ else -+ raise "Unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.set_state(state) -+ # Don't do anything if state hasn't changed -+ return if state == @state -+ @state = state -+ -+ case @state -+ when UI_STATE_INVALID -+ @editable.sensitive = true -+ @button.sensitive = false -+ when UI_STATE_VALID -+ @editable.sensitive = true -+ @button.sensitive = true -+ when UI_STATE_CONNECTING -+ @status.text = _'Failed to start virt-p2v-server on remote server' -+ @editable.sensitive = false -+ @button.sensitive = false -+ when UI_STATE_CONVERTING -+ @editable.sensitive = false -+ @button.sensitive = false -+ when UI_STATE_COMPLETE -+ @ui.active_page = 'success_win' -+ -+ # ... then leave this one as we hope to find it if we come back here -+ set_state(UI_STATE_VALID) -+ else -+ raise "Attempt to set unexpected UI state: #{@state}" -+ end -+ end -+ -+ def self.convert -+ @converter.convert( -+ # status -+ lambda { |msg| -+ @status.text = msg -+ }, -+ # progress -+ lambda { |dev, progress| -+ @fixeds.each { |model, path, iter| -+ next unless iter[CONVERT_FIXED_DEVICE] == dev -+ -+ iter[CONVERT_FIXED_PROGRESS] = progress -+ break -+ } -+ } -+ ) { |result| -+ # N.B. Explicit test against true is required here, as result may be -+ # an Exception, which would also return true if evaluated alone -+ if result == true then -+ @status.text = '' -+ event(EV_CONVERTED, true) -+ else -+ @status.text = result.message -+ event(EV_CONVERTED, false) -+ end -+ } -+ end -+ -+ def self.reconnect -+ @status.text = _('Reconnecting') -+ @converter.connection.connect { |result| -+ if result == true then -+ event(EV_CONNECTION, true) -+ else -+ @status.text = -+ _'Failed to start virt-p2v-server on remote server' -+ event(EV_CONNECTION, false) -+ end -+ } -+ end -+ -+ def self.convert_fixed_list_row_changed(model, path, iter) -+ update_values -+ end -+ -+ class InvalidUIState < StandardError; end -+ -+ def self.update_values -+ valid = nil -+ begin -+ # Check there's a profile selected -+ profile = @profile.active_iter -+ raise InvalidUIState if profile.nil? -+ @converter.profile = profile[CONVERT_PROFILE_NAME] -+ -+ # Check there's a name set -+ name = @name.text -+ raise InvalidUIState if name.nil? || name.strip.length == 0 -+ @converter.name = name -+ -+ # Check cpus and memory are set and numeric -+ cpus = @cpus.text -+ raise InvalidUIState if cpus.nil? -+ cpus = Integer(cpus) rescue nil -+ raise InvalidUIState if cpus.nil? -+ @converter.cpus = cpus -+ -+ memory = @memory.text -+ raise InvalidUIState if memory.nil? -+ memory = Integer(memory) rescue nil -+ raise InvalidUIState if memory.nil? -+ @converter.memory = memory * 1024 * 1024 -+ -+ # Check that at least 1 fixed storage device is selected -+ fixed = false -+ @converter.disks.clear -+ @fixeds.each { |model, path, iter| -+ if iter[CONVERT_FIXED_CONVERT] then -+ fixed = true -+ @converter.disks << iter[CONVERT_FIXED_DEVICE] -+ end -+ } -+ raise InvalidUIState unless fixed -+ -+ # Populate removables and nics, although these aren't required to be -+ # selected for the ui state to be valid -+ @converter.removables.clear -+ @removables.each { |model, path, iter| -+ if iter[CONVERT_REMOVABLE_CONVERT] then -+ @converter.removables << iter[CONVERT_REMOVABLE_DEVICE] -+ end -+ } -+ @converter.nics.clear -+ @nics.each { |model, path, iter| -+ if iter[CONVERT_NETWORK_CONVERT] then -+ @converter.nics << iter[CONVERT_NETWORK_DEVICE] -+ end -+ } -+ rescue InvalidUIState -+ valid = false -+ end -+ valid = true if valid.nil? -+ -+ event(EV_VALID, valid) -+ end -+ -+ def self.valid? -+ # Check there's a profile selected -+ profile = @profile.active_iter -+ return false if profile.nil? -+ -+ # Check there's a name set -+ name = @name.text -+ return false if name.nil? -+ return false unless name.strip.length > 0 -+ -+ # Check cpus and memory are set and numeric -+ cpus = @cpus.text -+ return false if cpus.nil? -+ cpus = Integer(cpus) rescue nil -+ return false if cpus.nil? -+ -+ memory = @memory.text -+ return false if memory.nil? -+ memory = Integer(memory) rescue nil -+ return false if memory.nil? -+ -+ # Check that at least 1 fixed storage device is selected -+ fixed = false -+ @fixeds.each { |model, path, iter| -+ if iter[CONVERT_FIXED_CONVERT] then -+ fixed = true -+ break -+ end -+ } -+ return false unless fixed -+ -+ return true -+ end -+ -+ def self.convert_cpus_changed -+ check_numeric(@cpus) -+ end -+ -+ def self.convert_memory_changed -+ check_numeric(@memory) -+ end -+ -+ def self.check_numeric(widget) -+ value = widget.text -+ if value.nil? ? false : begin -+ value = Integer(value) -+ value > 0 -+ rescue -+ false -+ end -+ then -+ widget.secondary_icon_name = nil -+ else -+ widget.secondary_icon_name = 'gtk-dialog-warning' -+ widget.secondary_icon_tooltip_text = -+ _('Value must be an integer greater than 0') -+ end -+ -+ update_values -+ end -+ -+ def self.convert_fixed_select_toggled(widget, path) -+ iter = @fixeds.get_iter(path) -+ iter[CONVERT_FIXED_CONVERT] = !iter[CONVERT_FIXED_CONVERT] -+ end -+ -+ def self.convert_removable_select_toggled(widget, path) -+ iter = @removables.get_iter(path) -+ iter[CONVERT_REMOVABLE_CONVERT] = !iter[CONVERT_REMOVABLE_CONVERT] -+ end -+ -+ def self.convert_network_select_toggled(widget, path) -+ iter = @nics.get_iter(path) -+ iter[CONVERT_NETWORK_CONVERT] = !iter[CONVERT_NETWORK_CONVERT] -+ end -+ -+ def self.convert_button_clicked -+ event(EV_BUTTON, true) -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/main.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/main.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/main.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/main.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,110 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gtk2' -+require 'virt-p2v/gtk-queue' -+ -+module VirtP2V -+module UI -+ -+class Main -+ def get_object(name) -+ o = @builder.get_object(name) -+ raise "Object #{name} not found in ui" unless o != nil -+ -+ return o -+ end -+ -+ def show -+ @builder.connect_signals { |signal| -+ raise "No hander for signal #{signal}" \ -+ unless @signal_handlers.has_key?(signal) -+ -+ @signal_handlers[signal] -+ } -+ -+ # Display the main window -+ main = self.get_object('main_window') -+ main.show_all() -+ end -+ -+ def register_handler(signal, handler) -+ @signal_handlers[signal] = handler -+ end -+ -+ def main_loop -+ Gtk.main_with_queue 100 -+ end -+ -+ def active_page=(name) -+ raise "Attempt to activate non-existent page #{name}" \ -+ unless @pages.has_key?(name) -+ -+ page = @pages[name] -+ -+ @page_vbox = self.get_object('page_vbox') unless defined? @page_vbox -+ @page_vbox.remove(@selected) if defined? @selected -+ @page_vbox.add(page) -+ @selected = page -+ end -+ -+ def active_page -+ return @selected -+ end -+ -+ def quit -+ Gtk.main_quit() -+ end -+ -+ private -+ -+ def initialize -+ @builder = Gtk::Builder.new() -+ -+ # Find the UI definition in $LOAD_PATH -+ i = $LOAD_PATH.index { |path| -+ File.exists?(path + '/virt-p2v/ui/p2v.ui') -+ } -+ @builder.add_from_file($LOAD_PATH[i] + '/virt-p2v/ui/p2v.ui') -+ -+ @signal_handlers = {} -+ self.register_handler('gtk_main_quit', method(:quit)) -+ -+ # Configure the Wizard page frame -+ # Can't change these colours from glade for some reason -+ self.get_object('title_background'). -+ modify_bg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -+ self.get_object('page_frame'). -+ modify_fg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -+ -+ # Load all pages from glade -+ @pages = {} -+ [ 'network_win', 'server_win', -+ 'conversion_win', 'success_win' ].each { |name| -+ page = self.get_object(name) -+ -+ child = page.children[0] -+ page.remove(child) -+ @pages[name] = child -+ } -+ -+ # Set a default first page -+ self.active_page = 'network_win' -+ end -+end -+ -+end # UI -+end # VirtP2V -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/network.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/network.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/network.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/network.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,317 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+require 'gtk2' -+require 'ipaddr' -+require 'virt-p2v/netdevice' -+ -+module VirtP2V::UI::Network -+ include GetText -+ -+ # The indices of Device List colums, taken from glade -+ DEVCOL_NAME = 0 -+ DEVCOL_MAC = 1 -+ DEVCOL_STATUS = 2 -+ DEVCOL_AVAILABLE = 3 -+ -+ UI_STATE_INVALID = 0 -+ UI_STATE_VALID = 1 -+ UI_STATE_ACTIVATING = 2 -+ UI_STATE_COMPLETE = 3 -+ -+ EV_IP_CONFIG = 0 -+ EV_SELECTION = 1 -+ EV_BUTTON = 2 -+ EV_ACTIVATION = 3 -+ -+ def self.event(event, status) -+ case event -+ when EV_IP_CONFIG -+ @ip_config = status -+ when EV_SELECTION -+ @selected = status -+ when EV_BUTTON, EV_ACTIVATION -+ # Persistent state not required -+ else -+ raise "Unexpected NetworkConfig event: #{event}" -+ end -+ -+ case @state -+ when UI_STATE_INVALID -+ if @ip_config && @selected then -+ set_state(UI_STATE_VALID) -+ end -+ when UI_STATE_VALID -+ if !@ip_config || !@selected then -+ set_state(UI_STATE_INVALID) -+ elsif event == EV_BUTTON -+ set_state(UI_STATE_ACTIVATING) -+ end -+ when UI_STATE_ACTIVATING -+ # UI is disabled and we're waiting for EV_ACTIVATION, but we could -+ # also get events triggered by NetworkManager signals. -+ -+ if event == EV_ACTIVATION then -+ if status then -+ set_state(UI_STATE_COMPLETE) -+ else -+ set_state(UI_STATE_VALID) -+ end -+ elsif !@ip_config || !@selected then -+ set_state(UI_STATE_INVALID) -+ end -+ else -+ raise "Unexpected NetworkConfig UI state: #{@state}" -+ end -+ end -+ -+ def self.init(ui) -+ # Configure initial defaults -+ @manual_mode = false -+ @ip_address = nil -+ @ip_prefix = nil -+ @ip_gateway = nil -+ @ip_dns = nil -+ @state = UI_STATE_INVALID -+ @ip_config = false -+ @selected = false -+ -+ @network_button = ui.get_object('network_button') -+ @device_list_frame = ui.get_object('device_list_frame') -+ @ipv4_config_frame = ui.get_object('ipv4_config_frame') -+ @dl_selection = ui.get_object('network_device_list_view'). -+ selection -+ @device_list = ui.get_object('network_device_list') -+ @manual_ui = ui.get_object('ip_manual') -+ @ip_address_ui = ui.get_object('ip_address') -+ @ip_prefix_ui = ui.get_object('ip_prefix') -+ @ip_gateway_ui = ui.get_object('ip_gateway') -+ @ip_dns_ui = ui.get_object('ip_dns') -+ -+ ui.register_handler('network_button_clicked', -+ method(:network_button_clicked)) -+ ui.register_handler('ip_auto_toggled', -+ method(:ip_auto_toggled)) -+ ui.register_handler('ip_address_changed', -+ method(:ip_address_changed)) -+ ui.register_handler('ip_prefix_changed', -+ method(:ip_prefix_changed)) -+ ui.register_handler('ip_gateway_changed', -+ method(:ip_gateway_changed)) -+ ui.register_handler('ip_dns_changed', -+ method(:ip_dns_changed)) -+ -+ check_config_valid() -+ -+ # The user may only select a single device -+ @dl_selection.mode = Gtk::SELECTION_SINGLE -+ -+ @dl_selection.set_select_function { |selection, model, path, current| -+ iter = model.get_iter(path) -+ -+ # This is a toggle event. The new state is the opposite of the -+ # current state -+ new_state = !current -+ -+ # Don't allow the user to select an unavailable device -+ if new_state then -+ # Notify the config UI if we're selecting a device -+ if iter[DEVCOL_AVAILABLE] then -+ event(EV_SELECTION, true) -+ end -+ -+ iter[DEVCOL_AVAILABLE] -+ -+ # Always allow the user to unselect a device -+ else -+ # Notify the UI that we're unselecting the device -+ event(EV_SELECTION, false) -+ true -+ end -+ } -+ -+ # Store a map of device names to row references -+ refs = {} -+ -+ # Populate the device list with all detected network devices -+ VirtP2V::NetworkDevice.all_devices.each { |device| -+ iter = @device_list.append() -+ -+ iter[DEVCOL_NAME] = device.name -+ iter[DEVCOL_MAC] = device.mac -+ iter[DEVCOL_STATUS] = device.state -+ iter[DEVCOL_AVAILABLE] = device.connected -+ -+ # Store a stable reference to this row in the TreeModel -+ refs[device.name] = -+ Gtk::TreeRowReference.new(@device_list, iter.path) -+ } -+ -+ # Listen for updates to device states -+ VirtP2V::NetworkDevice.add_listener( lambda { |device| -+ path = refs[device.name].path -+ -+ iter = @device_list.get_iter(path) -+ iter[DEVCOL_STATUS] = device.state -+ iter[DEVCOL_AVAILABLE] = device.connected -+ -+ # Notify the UI that a device was activated -+ event(EV_ACTIVATION, device.activated) \ -+ unless device.activated.nil? -+ -+ # Unselect the path if it was previously selected and is no -+ # longer available -+ if !device.connected && @dl_selection.iter_is_selected?(iter) -+ then -+ @dl_selection.unselect_all() -+ event(EV_SELECTION, false) -+ end -+ } ) -+ -+ @ui = ui -+ end -+ -+ def self.set_state(state) -+ # Don't do anything if state hasn't changed -+ return if state == @state -+ -+ case state -+ when UI_STATE_INVALID -+ @network_button.sensitive = false -+ @device_list_frame.sensitive = true -+ @ipv4_config_frame.sensitive = true -+ -+ @state = UI_STATE_INVALID -+ when UI_STATE_VALID -+ @network_button.sensitive = true -+ @device_list_frame.sensitive = true -+ @ipv4_config_frame.sensitive = true -+ -+ @state = UI_STATE_VALID -+ when UI_STATE_ACTIVATING -+ @network_button.sensitive = false -+ @device_list_frame.sensitive = false -+ @ipv4_config_frame.sensitive = false -+ -+ @state = UI_STATE_ACTIVATING -+ when UI_STATE_COMPLETE -+ # Activate the next page -+ @ui.active_page = 'server_win' -+ -+ # ... then leave this one as we hope to find it if we come back here -+ set_state(UI_STATE_VALID) -+ else -+ raise "Attempt to set unexected NetworkConfig UI state: #{@state}" -+ end -+ end -+ -+ def self.network_button_clicked -+ event(EV_BUTTON, true) -+ -+ iter = @dl_selection.selected -+ return if iter.nil? # Shouldn't be possible -+ name = iter[DEVCOL_NAME] -+ -+ VirtP2V::NetworkDevice[name].activate(!@manual_mode, @ip_address, -+ @ip_prefix, @ip_gateway, @ip_dns) -+ end -+ -+ def self.ip_auto_toggled -+ @manual_mode = !@manual_mode -+ @manual_ui.sensitive = @manual_mode -+ -+ check_config_valid() -+ end -+ -+ def self.ip_address_changed -+ @ip_address = parse_ip(@ip_address_ui) -+ -+ check_config_valid() -+ end -+ -+ # Check IP prefix is a positive integer -+ # We check that it's appropriate to the address class in use elsewhere -+ def self.ip_prefix_changed -+ begin -+ @ip_prefix = Integer(@ip_prefix_ui.text) -+ rescue ArgumentError => e -+ # Ignore the result if it didn't parse -+ @ip_prefix = nil -+ return -+ end -+ -+ if @ip_prefix < 0 then -+ @ip_prefix = nil -+ end -+ -+ check_config_valid() -+ end -+ -+ def self.ip_gateway_changed -+ @ip_gateway = parse_ip(@ip_gateway_ui) -+ -+ check_config_valid() -+ end -+ -+ # Parse an IP address understood by IPAddr -+ def self.parse_ip(entry) -+ a = entry.text.strip -+ -+ begin -+ ip = IPAddr.new(a) -+ rescue ArgumentError => e -+ # Ignore the result if it didn't parse -+ ip = nil -+ end -+ -+ return ip -+ end -+ -+ def self.ip_dns_changed -+ dns = @ip_dns_ui.text -+ -+ @ip_dns = [] -+ dns.split(/\s*,+\s*/).each { |entry| -+ begin -+ @ip_dns << IPAddr.new(entry) -+ rescue ArgumentError => e -+ @ip_dns = () -+ break -+ end -+ } -+ end -+ -+ def self.check_config_valid -+ if !@manual_mode || (!@ip_address.nil? && -+ !@ip_prefix.nil? && -+ !@ip_gateway.nil?) then -+ if @manual_mode then -+ # Check that IPv4/IPv6 is used consistently -+ if @ip_address.ipv4? then -+ event(EV_IP_CONFIG, @ip_gateway.ipv4? && @ip_prefix < 32) -+ else -+ event(EV_IP_CONFIG, @ip_gateway.ipv6? && @ip_prefix < 128) -+ end -+ else -+ event(EV_IP_CONFIG, true) -+ end -+ else -+ event(EV_IP_CONFIG, false) -+ end -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/p2v.ui virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/p2v.ui ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/p2v.ui 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/p2v.ui 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,1031 @@ -+ -+ -+ -+ -+ -+ False -+ center-always -+ False -+ -+ -+ -+ True -+ 0 -+ 0 -+ -+ -+ 800 -+ 600 -+ True -+ 0 -+ 0 -+ in -+ -+ -+ True -+ vertical -+ 2 -+ -+ -+ True -+ -+ -+ True -+ 0 -+ 0 -+ 5 -+ 5 -+ <span weight='bold' foreground='white' size='xx-large'>virt-p2v</span> -+ True -+ -+ -+ -+ -+ False -+ 0 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ 800 -+ 550 -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 0 -+ 1 -+ 11 -+ Welcome to virt-p2v. -+ -+ -+ False -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ network_device_list -+ False -+ 0 -+ -+ -+ Device -+ -+ -+ -+ 3 -+ 0 -+ -+ -+ -+ -+ -+ -+ 18 -+ MAC Address -+ -+ -+ -+ 3 -+ 1 -+ -+ -+ -+ -+ -+ -+ Status -+ -+ -+ -+ 3 -+ 2 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Select a network device</b> -+ True -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ True -+ 0 -+ in -+ -+ -+ True -+ 12 -+ -+ -+ True -+ vertical -+ -+ -+ Automatic configuration -+ True -+ True -+ False -+ True -+ True -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ False -+ 3 -+ 2 -+ 2 -+ -+ -+ True -+ 0 -+ IP Address: -+ -+ -+ GTK_FILL -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 0 -+ Gateway: -+ -+ -+ 1 -+ 2 -+ GTK_FILL -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 0 -+ DNS Servers: -+ -+ -+ 2 -+ 3 -+ GTK_FILL -+ GTK_FILL -+ -+ -+ -+ -+ True -+ True -+ 39 -+ 39 -+ True -+ -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ GTK_FILL -+ -+ -+ -+ -+ True -+ True -+ 35 -+ -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ GTK_FILL -+ -+ -+ -+ -+ True -+ 2 -+ -+ -+ True -+ True -+ 39 -+ 39 -+ True -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ Prefix: -+ -+ -+ False -+ 1 -+ -+ -+ -+ -+ True -+ True -+ 2 -+ 2 -+ True -+ -+ -+ -+ False -+ 2 -+ -+ -+ -+ -+ 1 -+ 2 -+ GTK_FILL -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>IP Configuration</b> -+ True -+ -+ -+ -+ -+ False -+ 2 -+ -+ -+ -+ -+ True -+ 1 -+ 0 -+ -+ -+ Use these network settings -+ True -+ False -+ True -+ True -+ -+ -+ -+ -+ -+ False -+ 3 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 0 -+ 0 -+ -+ -+ True -+ 0 -+ in -+ -+ -+ True -+ 12 -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 3 -+ 2 -+ 2 -+ -+ -+ True -+ 0 -+ Hostname: -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ 0 -+ Username: -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ -+ -+ True -+ 0 -+ Password: -+ -+ -+ 2 -+ 3 -+ -+ -+ -+ -+ -+ -+ True -+ True -+ -+ 40 -+ -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ -+ True -+ True -+ False -+ -+ 40 -+ -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ -+ -+ -+ -+ -+ True -+ True -+ -+ 40 -+ root -+ -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ -+ -+ -+ -+ -+ False -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ 0 -+ 8 -+ 8 -+ -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Connect to conversion server</b> -+ True -+ -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 1 -+ 0 -+ 0 -+ 0 -+ -+ -+ Connect -+ True -+ False -+ True -+ True -+ -+ -+ -+ -+ -+ False -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ 0 -+ 0 -+ 0 -+ 0 -+ 12 -+ -+ -+ True -+ 4 -+ 2 -+ 2 -+ -+ -+ True -+ 0 -+ Destination Profile: -+ -+ -+ -+ -+ True -+ convert_profile_list -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ 0 -+ Memory (MB): -+ -+ -+ 3 -+ 4 -+ -+ -+ -+ -+ True -+ True -+ -+ True -+ -+ -+ -+ 1 -+ 2 -+ 3 -+ 4 -+ -+ -+ -+ -+ True -+ 0 -+ Number of CPUs: -+ -+ -+ 2 -+ 3 -+ -+ -+ -+ -+ True -+ 0 -+ Name -+ -+ -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ True -+ -+ True -+ -+ -+ -+ 1 -+ 2 -+ 1 -+ 2 -+ -+ -+ -+ -+ True -+ True -+ -+ True -+ -+ -+ -+ 1 -+ 2 -+ 2 -+ 3 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Target properties</b> -+ True -+ -+ -+ -+ -+ False -+ False -+ 0 -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ convert_fixed_list -+ False -+ 0 -+ -+ -+ Convert -+ True -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ -+ -+ Device -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ Transfer Progress -+ True -+ -+ -+ -+ 2 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Fixed Storage</b> -+ True -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ convert_removable_list -+ -+ -+ Convert -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ -+ -+ Device -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ Type -+ -+ -+ -+ 2 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Removable Media</b> -+ True -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ True -+ 0 -+ out -+ -+ -+ True -+ 1 -+ 1 -+ -+ -+ True -+ True -+ automatic -+ automatic -+ -+ -+ True -+ True -+ convert_network_list -+ False -+ 0 -+ -+ -+ Convert -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ -+ -+ Device -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ <b>Network Interfaces</b> -+ True -+ -+ -+ -+ -+ 2 -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ -+ -+ True -+ 0 -+ 12 -+ -+ -+ -+ -+ -+ 0 -+ -+ -+ -+ -+ Convert -+ True -+ True -+ True -+ -+ -+ -+ False -+ False -+ 1 -+ -+ -+ -+ -+ False -+ False -+ 1 -+ -+ -+ -+ -+ -+ -+ -+ -+ True -+ vertical -+ -+ -+ True -+ A guest has been successfully created on the target server. -+ -+Remove the temporary boot device from this machine and press 'Reboot' to continue. -+ center -+ -+ -+ 0 -+ -+ -+ -+ -+ True -+ 0.25 -+ 0.25 -+ -+ -+ Reboot -+ True -+ True -+ True -+ -+ -+ -+ -+ -+ 1 -+ -+ -+ -+ -+ -+ -diff -ruN virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/success.rb virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/success.rb ---- virt-v2v-v0.8.1/p2v/client/lib/virt-p2v/ui/success.rb 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/lib/virt-p2v/ui/success.rb 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,33 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'gettext' -+ -+module VirtP2V::UI::Success -+ include GetText -+ -+ def self.init(ui) -+ ui.register_handler('reboot_button_clicked', -+ method(:reboot_button_clicked)) -+ -+ @ui = ui -+ end -+ -+ def self.reboot_button_clicked -+ @ui.quit -+ end -+ -+end # module -diff -ruN virt-v2v-v0.8.1/p2v/client/Manifest virt-v2v-v0.8.1.new/p2v/client/Manifest ---- virt-v2v-v0.8.1/p2v/client/Manifest 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/Manifest 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,15 @@ -+Rakefile -+bin/virt-p2v -+lib/virt-p2v/blockdevice.rb -+lib/virt-p2v/connection.rb -+lib/virt-p2v/converter.rb -+lib/virt-p2v/gtk-queue.rb -+lib/virt-p2v/netdevice.rb -+lib/virt-p2v/ui/connect.rb -+lib/virt-p2v/ui/convert.rb -+lib/virt-p2v/ui/main.rb -+lib/virt-p2v/ui/network.rb -+lib/virt-p2v/ui/p2v.ui -+lib/virt-p2v/ui/success.rb -+virt-p2v.gemspec -+Manifest -diff -ruN virt-v2v-v0.8.1/p2v/client/Rakefile virt-v2v-v0.8.1.new/p2v/client/Rakefile ---- virt-v2v-v0.8.1/p2v/client/Rakefile 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/client/Rakefile 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,37 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+require 'rubygems' -+require 'echoe' -+ -+Echoe.new("virt-p2v") do |p| -+ p.project = "Virt P2V" -+ p.version = `../../Build version` -+ p.author = "Matthew Booth" -+ p.summary = "Send a machine's storage and metadata to virt-p2v-server" -+ p.description = < /manifest-rpm.txt -+rpm -qa --qf '%{sourcerpm}\n' | sort -u > /manifest-srpm.txt -+# collect all included licenses rhbz#601927 -+rpm -qa --qf '%{license}\n' | sort -u > /manifest-license.txt -+# dependencies -+rpm -qa | xargs -n1 rpm -e --test 2> /manifest-deps.txt -+echo -n "." -+find / -xdev -print -exec rpm -qf {} \; > /manifest-owns.txt -+rpm -qa --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | \ -+ sort > /rpm-qa.txt -+echo -n "." -+ -+du -akx --exclude=/var/cache/yum / > /manifest-file.txt -+du -x --exclude=/var/cache/yum / > /manifest-dir.txt -+echo -n "." -+bzip2 /manifest-deps.txt /manifest-owns.txt /manifest-file.txt /manifest-dir.txt -+echo -n "." -+ -+%end -+ -+%post --nochroot -+# Move manifests to ISO -+mv $INSTALL_ROOT/manifest-* $LIVE_ROOT/isolinux -+echo "done" -+ -+# only works on x86, x86_64 -+if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then -+ if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi -+ cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS -+ cp /usr/bin/livecd-iso-to-pxeboot $LIVE_ROOT/LiveOS -+fi -+%end -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-minimizer.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-minimizer.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-minimizer.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-minimizer.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,239 @@ -+# This file is only relatively lightly modified from the version copied from -+# oVirt, and certainly contains much which is irrelevant to this image. I have, -+# however, removed some obviously extraneous entries and added a few additional -+# entries. -+# -+# Matthew Booth - 18/4/2011 -+ -+%post --nochroot --interpreter image-minimizer -+# lokkit is just an install-time dependency; we can remove -+# it afterwards, which we do here -+droprpm system-config-* -+droprpm libsemanage-python -+droprpm python-libs -+droprpm python -+ -+droprpm mkinitrd -+droprpm isomd5sum -+droprpm dmraid -+droprpm checkpolicy -+droprpm make -+droprpm policycoreutils-python -+droprpm setools-libs-python -+droprpm setools-libs -+ -+droprpm gamin -+droprpm pm-utils -+droprpm kbd -+droprpm usermode -+droprpm vbetool -+droprpm ConsoleKit -+droprpm hdparm -+droprpm efibootmgr -+droprpm linux-atm-libs -+droprpm mtools -+droprpm syslinux -+droprpm wireless-tools -+droprpm radeontool -+droprpm libicu -+droprpm gnupg2 -+droprpm fedora-release-notes -+droprpm fedora-logos -+ -+# cronie pulls in exim (sendmail) which pulls in all kinds of perl deps -+droprpm exim -+droprpm perl* -+droprpm postfix -+droprpm mysql* -+ -+droprpm sysklogd -+ -+# unneeded rhn deps -+droprpm yum* -+ -+# pam complains when this is missing -+keeprpm ConsoleKit-libs -+ -+# kernel modules minimization -+ -+# filesystems -+drop /lib/modules/*/kernel/fs -+keep /lib/modules/*/kernel/fs/ext* -+keep /lib/modules/*/kernel/fs/jbd* -+keep /lib/modules/*/kernel/fs/btrfs -+keep /lib/modules/*/kernel/fs/fat -+keep /lib/modules/*/kernel/fs/nfs -+keep /lib/modules/*/kernel/fs/nfs_common -+keep /lib/modules/*/kernel/fs/fscache -+keep /lib/modules/*/kernel/fs/lockd -+keep /lib/modules/*/kernel/fs/nls/nls_utf8.ko -+# autofs4 configfs exportfs *fat *jbd mbcache.ko nls xfs -+#*btrfs cramfs *ext2 *fscache *jbd2 *nfs squashfs -+# cachefiles dlm *ext3 fuse jffs2 *nfs_common ubifs -+# cifs ecryptfs *ext4 gfs2 *lockd nfsd udf -+ -+# network -+drop /lib/modules/*/kernel/net -+keep /lib/modules/*/kernel/net/802* -+keep /lib/modules/*/kernel/net/bridge -+keep /lib/modules/*/kernel/net/core -+keep /lib/modules/*/kernel/net/ipv* -+keep /lib/modules/*/kernel/net/key -+keep /lib/modules/*/kernel/net/llc -+keep /lib/modules/*/kernel/net/netfilter -+keep /lib/modules/*/kernel/net/rds -+keep /lib/modules/*/kernel/net/sctp -+keep /lib/modules/*/kernel/net/sunrpc -+#*802 atm can ieee802154 *key *netfilter rfkill *sunrpc xfrm -+#*8021q bluetooth *core *ipv4 *llc phonet sched wimax -+# 9p *bridge dccp *ipv6 mac80211 *rds *sctp wireless -+ -+drop /lib/modules/*/kernel/sound -+ -+# drivers -+drop /lib/modules/*/kernel/drivers -+keep /lib/modules/*/kernel/drivers/ata -+keep /lib/modules/*/kernel/drivers/block -+keep /lib/modules/*/kernel/drivers/cdrom -+keep /lib/modules/*/kernel/drivers/char -+keep /lib/modules/*/kernel/drivers/cpufreq -+keep /lib/modules/*/kernel/drivers/dca -+keep /lib/modules/*/kernel/drivers/dma -+keep /lib/modules/*/kernel/drivers/edac -+keep /lib/modules/*/kernel/drivers/firmware -+keep /lib/modules/*/kernel/drivers/idle -+keep /lib/modules/*/kernel/drivers/infiniband -+keep /lib/modules/*/kernel/drivers/md -+keep /lib/modules/*/kernel/drivers/message -+keep /lib/modules/*/kernel/drivers/net -+drop /lib/modules/*/kernel/drivers/net/pcmcia -+drop /lib/modules/*/kernel/drivers/net/wireless -+drop /lib/modules/*/kernel/drivers/net/ppp* -+keep /lib/modules/*/kernel/drivers/pci -+keep /lib/modules/*/kernel/drivers/scsi -+keep /lib/modules/*/kernel/drivers/staging/ramzswap -+keep /lib/modules/*/kernel/drivers/uio -+keep /lib/modules/*/kernel/drivers/usb -+drop /lib/modules/*/kernel/drivers/usb/atm -+drop /lib/modules/*/kernel/drivers/usb/class -+drop /lib/modules/*/kernel/drivers/usb/image -+drop /lib/modules/*/kernel/drivers/usb/misc -+drop /lib/modules/*/kernel/drivers/usb/serial -+keep /lib/modules/*/kernel/drivers/vhost -+keep /lib/modules/*/kernel/drivers/virtio -+ -+# acpi *cpufreq hid leds mtd ?regulator uwb -+#*ata crypto ?hwmon *md *net* rtc *vhost -+# atm *dca ?i2c media ?parport *scsi* video -+# auxdisplay *dma *idle memstick *pci ?serial *virtio -+#*block *edac ieee802154 *message pcmcia ?ssb watchdog -+# bluetooth firewire *infiniband ?mfd platform *staging xen -+#*cdrom *firmware input misc ?power ?uio -+#*char* ?gpu isdn mmc ?pps *usb -+ -+drop /usr/share/zoneinfo -+keep /usr/share/zoneinfo/UTC -+ -+drop /etc/alsa -+drop /usr/share/alsa -+drop /usr/share/awk -+drop /usr/share/vim -+drop /usr/share/anaconda -+drop /usr/share/backgrounds -+drop /usr/share/wallpapers -+drop /usr/share/kde-settings -+drop /usr/share/gnome-background-properties -+drop /usr/share/dracut -+drop /usr/share/plymouth -+drop /usr/share/setuptool -+drop /usr/share/hwdata/MonitorsDB -+drop /usr/share/hwdata/oui.txt -+drop /usr/share/hwdata/videoaliases -+drop /usr/share/hwdata/videodrivers -+drop /usr/share/firstboot -+drop /usr/share/lua -+drop /usr/share/kde4 -+drop /usr/share/pixmaps -+drop /usr/share/icons -+drop /usr/share/fedora-release -+drop /usr/share/tabset -+ -+drop /usr/share/tc -+drop /usr/share/emacs -+drop /usr/share/info -+drop /usr/src -+drop /usr/etc -+drop /usr/games -+drop /usr/include -+drop /usr/local -+drop /usr/sbin/dell* -+keep /usr/sbin/build-locale-archive -+drop /usr/sbin/glibc_post_upgrade.* -+drop /usr/lib*/tc -+drop /usr/lib*/tls -+drop /usr/lib*/sse2 -+drop /usr/lib*/pkgconfig -+drop /usr/lib*/nss -+drop /usr/lib*/games -+drop /usr/lib*/alsa-lib -+drop /usr/lib*/krb5 -+drop /usr/lib*/hal -+drop /usr/lib*/gio -+ -+# syslinux -+drop /usr/share/syslinux -+# glibc-common locales -+drop /usr/lib/locale -+keep /usr/lib/locale/usr/share/locale/en_US -+# openssh -+drop /usr/bin/sftp -+drop /usr/bin/slogin -+drop /usr/bin/ssh-add -+drop /usr/bin/ssh-agent -+drop /usr/bin/ssh-keyscan -+# docs -+drop /usr/share/omf -+drop /usr/share/gnome -+drop /usr/share/doc -+keep /usr/share/doc/*-firmware-* -+drop /usr/share/locale/ -+keep /usr/share/locale/en_US -+drop /usr/share/man -+drop /usr/share/i18n -+drop /boot/* -+drop /var/lib/builder -+ -+drop /usr/lib*/libboost* -+keep /usr/lib*/libboost_program_options.so* -+keep /usr/lib*/libboost_filesystem.so* -+keep /usr/lib*/libboost_thread-mt.so* -+keep /usr/lib*/libboost_system.so* -+drop /usr/kerberos -+keep /usr/kerberos/bin/kinit -+keep /usr/kerberos/bin/klist -+drop /lib/firmware -+keep /lib/firmware/3com -+keep /lib/firmware/acenic -+keep /lib/firmware/adaptec -+keep /lib/firmware/advansys -+keep /lib/firmware/bnx2 -+keep /lib/firmware/cxgb3 -+keep /lib/firmware/e100 -+keep /lib/firmware/myricom -+keep /lib/firmware/ql* -+keep /lib/firmware/sun -+keep /lib/firmware/tehuti -+keep /lib/firmware/tigon -+drop /lib/kbd/consolefonts -+drop /etc/pki/tls -+drop /etc/pki/java -+drop /etc/pki/nssdb -+drop /etc/pki/rpm-gpg -+%end -+ -+%post -+echo "Removing python source files" -+find / -name '*.py' -exec rm -f {} \; -+find / -name '*.pyo' -exec rm -f {} \; -+ -+%end -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-pkgs.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-pkgs.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-pkgs.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-pkgs.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,48 @@ -+# Direct requirements -+rubygem-virt-p2v -+bitstream-vera-sans-fonts -+xorg-x11-xinit -+xorg-x11-drivers -+xorg-x11-server-Xorg -+ -+# Boot requirements -+device-mapper -+ -+# Required for livecd creation -+passwd -+rpm -+/usr/sbin/lokkit -+ -+# Remove unnecessary packages -+-audit-libs-python -+-ustr -+-authconfig -+-wireless-tools -+-setserial -+-prelink -+-newt-python -+-newt -+-libselinux-python -+-kbd -+-usermode -+-fedora-release -+-fedora-release-notes -+-dmraid -+-gzip -+-less -+-which -+-parted -+-tar -+-libuser -+-mtools -+-cpio -+-yum -+-numactl # Pulls in perl dependency -+-perl -+ -+# qlogic firmware -+ql2100-firmware -+ql2200-firmware -+ql23xx-firmware -+ql2400-firmware -+ql2500-firmware -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-post.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-post.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-post.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-post.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,43 @@ -+# -*-Shell-script-*- -+echo "Starting Kickstart Post" -+PATH=/sbin:/usr/sbin:/bin:/usr/bin -+export PATH -+ -+# cleanup rpmdb to allow non-matching host and chroot RPM versions -+rm -f /var/lib/rpm/__db* -+ -+echo "Creating shadow files" -+# because we aren't installing authconfig, we aren't setting up shadow -+# and gshadow properly. Do it by hand here -+pwconv -+grpconv -+ -+echo "Forcing C locale" -+# force logins (via ssh, etc) to use C locale, since we remove locales -+cat >> /etc/profile << \EOF -+# force our locale to C since we don't have locale stuff' -+export LC_ALL=C LANG=C -+EOF -+ -+# remove errors from /sbin/dhclient-script -+DHSCRIPT=/sbin/dhclient-script -+sed -i 's/mv /cp -p /g' $DHSCRIPT -+sed -i '/rm -f.*${interface}/d' $DHSCRIPT -+sed -i '/rm -f \/etc\/localtime/d' $DHSCRIPT -+sed -i '/rm -f \/etc\/ntp.conf/d' $DHSCRIPT -+sed -i '/rm -f \/etc\/yp.conf/d' $DHSCRIPT -+ -+# Lock root account -+#passwd -l root -+ -+#strip out all unncesssary locales -+localedef --list-archive | grep -v -i -E 'en_US.utf8' |xargs localedef --delete-from-archive -+mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl -+/usr/sbin/build-locale-archive -+ -+# Run virt-p2v -+cat >> /etc/rc.local < /root/virt-p2v.log 2>&1 -+poweroff -+EOF -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/common-post-nochroot.ks virt-v2v-v0.8.1.new/p2v/image-builder/common-post-nochroot.ks ---- virt-v2v-v0.8.1/p2v/image-builder/common-post-nochroot.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/common-post-nochroot.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,60 @@ -+%include version.ks -+ -+PRODUCT='Virt P2V' -+PRODUCT_SHORT='virt-p2v' -+PACKAGE='virt-p2v' -+RELEASE=${RELEASE:-devel.`date +%Y%m%d%H%M%S`} -+ -+echo "Customizing boot menu" -+sed -i -e ' -+# Put product information at the top of the file -+1 { -+ i '"say $PRODUCT $VERSION ($RELEASE)"' -+ i '"menu title $PRODUCT_SHORT $VERSION ($RELEASE)"' -+} -+ -+# Remove any existing menu title -+/^menu title .*/d -+ -+# Remove quiet bootparam -+#s/ quiet// -+ -+# Disable selinux entirely. Required, as we dont install an SELinux policy. -+/^\s*append\s/ s/\s*$/ selinux=0/ -+ -+# Remove Verify and Boot option -+/label check0/{N;N;N;d;} -+ -+# Set the default timeout to 15 seconds -+s/^timeout .*/timeout 15/ -+' $LIVE_ROOT/isolinux/isolinux.cfg -+ -+# TODO: Replace the splash screen with something P2V appropriate -+#cp $INSTALL_ROOT//syslinux-vesa-splash.jpg $LIVE_ROOT/isolinux/splash.jpg -+ -+# store image version info in the ISO -+cat > $LIVE_ROOT/isolinux/version < $INSTALL_ROOT/etc/$PACKAGE-release <> $INSTALL_ROOT/etc/issue -+cp $INSTALL_ROOT/etc/issue $INSTALL_ROOT/etc/issue.net -+ -+# replace initramfs if regenerated -+if [ -f "$INSTALL_ROOT/initrd0.img" ]; then -+ mv -v "$INSTALL_ROOT/initrd0.img" "$LIVE_ROOT/isolinux/initrd0.img" -+fi -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/Makefile virt-v2v-v0.8.1.new/p2v/image-builder/Makefile ---- virt-v2v-v0.8.1/p2v/image-builder/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/Makefile 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,2 @@ -+version.ks: ../../Build -+ echo VERSION=`../../Build version` > version.ks -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/version.ks virt-v2v-v0.8.1.new/p2v/image-builder/version.ks ---- virt-v2v-v0.8.1/p2v/image-builder/version.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/version.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1 @@ -+VERSION=0.8.1 -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image-builder virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image-builder ---- virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image-builder 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image-builder 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,188 @@ -+#!/bin/bash -+ -+# Copyright (C) 2010-2011, Red Hat, Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; version 2 of the License. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -+# MA 02110-1301, USA. A copy of the GNU General Public License is -+# also available at http://www.gnu.org/copyleft/gpl.html. -+ -+# Requires: sudo livecd-creator, sudo setenforce, ksflatten -+ -+# Based on oVirt's node-creator -+ -+# Current fedora data -+cur_rawhide=16 -+cur_devel=15 -+ -+me=$(basename "$0") -+warn() { printf '%s: %s\n' "$me" "$*" >&2; } -+die() { warn "$*"; exit 1; } -+usage() { -+cat < -+ -+Build a virt-p2v bootable image. -+ -+OPTIONS: -+ -a Additional yum repository. Can be specified multiple times. -+ -c Yum cache directory. -+ -d Directory containing virt-p2v-image.ks. -+ -f Specific Fedora mirror to use if building a Fedora image. -+ -l Boot image label. -+ -r Primary yum repository. -+ -u Updates yum repository. -+ -h Show this message. -+EOF -+} -+ -+onlyonce() { -+ warn "-$1 may only be specified once" -+ usage -+ exit 1 -+} -+ -+while getopts "a:d:f:hl:r:u:w:" OPTION -+do -+ case $OPTION in -+ a) -+ n_elems=${#extra_repos[*]} -+ extra_repos[$n_elems]="$OPTARG" -+ ;; -+ c) -+ [ -n "$cachedir" ] && onlyonce $OPTION -+ cachedir="$OPTARG" -+ ;; -+ d) -+ [ -n "$datadir" ] && onlyonce $OPTION -+ datadir="$OPTARG" -+ ;; -+ f) -+ [ -n "$fedora_url" ] && onlyonce $OPTION -+ fedora_url="$OPTARG" -+ ;; -+ l) -+ [ -n "$label" ] && onlyonce $OPTION -+ label="$OPTARG" -+ ;; -+ r) -+ [ -n "$repo" ] && onlyonce $OPTION -+ repo="$OPTARG" -+ ;; -+ u) -+ [ -n "$updates" ] && onlyonce $OPTION -+ updates="$OPTARG" -+ ;; -+ h) -+ usage -+ exit 0 -+ ;; -+ ?) -+ usage -+ exit 1 -+ ;; -+ esac -+done -+ -+# Split out here for simple editing with sed during installation -+DEFAULT_DATADIR=. -+ -+# Option defaults -+datadir="${datadir:-$DEFAULT_DATADIR}" -+cachedir="${cachedir:-/var/tmp/p2v-image-builder.$USER}" -+label="${label:-Virt-P2V}" -+ -+arch=$(rpm --eval '%{_arch}') -+kstmp=$(mktemp --tmpdir p2v-image-builder.XXXXXXXX) -+ -+if pgrep -xl nscd; then -+ die "Please stop nscd first" -+fi -+ -+rm -f "$kstmp" -+# combine recipe includes -+ksflatten --config "$datadir/virt-p2v-image.ks" --output "$kstmp" -+# XXX broken ksflatten leaves %include -+sed -i 's/^%include /#&/' "$kstmp" -+ -+if [ -z "$repo" ]; then -+ # Set defaults for Fedora if this is a fedora system -+ fedora=$(rpm --eval '%{fedora}' |grep [0-9]) -+ -+ mirrorlist="http://mirrors.fedoraproject.org/mirrorlist" -+ -+ case "$fedora" in -+ $curr_rawhide) -+ if [ -z "$fedora_url" ]; then -+ repo="--mirrorlist=$mirrorlist?repo=rawhide&arch=$arch" -+ else -+ repo="--baseurl=$fedora_url/development/rawhide/$arch/os" -+ fi -+ ;; -+ $cur_devel) -+ if [ -z "$fedora_url" ]; then -+ repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -+ else -+ repo="--baseurl=$fedora_url/development/$fedora/$arch/os" -+ fi -+ ;; -+ ?*) -+ if [ -z "$fedora_url" ]; then -+ repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -+ updates="--mirrorlist=$mirrorlist?repo=updates-released-f${fedora}&arch=$arch" -+ else -+ repo="--baseurl=$fedora_url/releases/$fedora/Everything/$arch/os" -+ updates="--baseurl=$fedora_url/updates/$fedora/$arch" -+ fi -+ esac -+else -+ repo="--baseurl=$repo" -+ [ -n "$updates" ] && updates="--baseurl=$updates" -+fi -+ -+if [ -n "$repo" ]; then -+ echo "repo --name=base $repo" >> "$kstmp" -+else -+ die "No repository specified, and no default available." -+fi -+if [ -n "$updates" ]; then -+ echo "repo --name=updates $updates" >> "$kstmp" -+fi -+i=0 -+for extra in "${extra_repos[@]}"; do -+ ((i++)) -+ [ -d "$extra" ] && extra="file://$extra" -+ echo "repo --name=extra$i --baseurl=$extra" >> "$kstmp" -+done -+ -+selinux_enforcing=$(/usr/sbin/getenforce) -+case "$selinux_enforcing" in -+ Enforcing) sudo /usr/sbin/setenforce Permissive ;; -+ Permissive) ;; -+ *) if grep -q '^selinux --disabled' "$kstmp"; -+ then -+ warn "WARNING: SELinux disabled in kickstart" -+ else -+ die "ERROR: SELinux enabled in kickstart, \ -+ but disabled on the build machine" -+ fi ;; -+esac -+ -+mkdir -p $cachedir -+sudo livecd-creator -c "$kstmp" -f "$label" --cache="$cachedir" -+ -+# Clean up -+rm -f $kstmp -+if [ "$selinux_enforcing" = Enforcing ]; then -+ sudo /usr/sbin/setenforce Enforcing -+fi -diff -ruN virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image.ks virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image.ks ---- virt-v2v-v0.8.1/p2v/image-builder/virt-p2v-image.ks 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/image-builder/virt-p2v-image.ks 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,19 @@ -+# virt-p2v Node image recipe -+ -+%include common-install.ks -+ -+%packages --excludedocs --nobase -+%include common-pkgs.ks -+%end -+ -+%post -+%include common-post.ks -+%end -+ -+%include common-minimizer.ks -+ -+%post --nochroot -+%include common-post-nochroot.ks -+%end -+ -+%include common-manifest-post.ks -diff -ruN virt-v2v-v0.8.1/p2v/server/run-p2v-locally virt-v2v-v0.8.1.new/p2v/server/run-p2v-locally ---- virt-v2v-v0.8.1/p2v/server/run-p2v-locally 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/server/run-p2v-locally 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,52 @@ -+#!/bin/sh -+# virt-p2v -+# Copyright (C) 2010 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+# This script sets up the environment so you can run virt-v2v in place -+# without needing to do 'make install' first. -+# -+# Use it like this: -+# ./run-p2v-locally -+# -+# It requires the environment variable VIRTV2V_ROOT to be set. If using -+# libguestfs from source, LIBGUESTFS_ROOT must also be set. -+ -+if [ -z "$VIRTV2V_ROOT" ]; then -+ echo "VIRTV2V_ROOT must be set" -+ exit 1 -+fi -+ -+if [ -z "$PERL5LIB" ]; then -+ PERL5LIB="$VIRTV2V_ROOT/blib/lib" -+else -+ PERL5LIB="$VIRTV2V_ROOT/blib/lib:$PERL5LIB" -+fi -+ -+if [ ! -z "$LIBGUESTFS_ROOT" ]; then -+ if [ -z "$LD_LIBRARY_PATH" ]; then -+ LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs" -+ else -+ LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs:$LD_LIBRARY_PATH" -+ fi -+ -+ LIBGUESTFS_PATH="$LIBGUESTFS_ROOT/appliance" -+ PERL5LIB="$LIBGUESTFS_ROOT/perl/blib/lib:$LIBGUESTFS_ROOT/perl/blib/arch:$PERL5LIB" -+fi -+ -+export PERL5LIB LD_LIBRARY_PATH LIBGUESTFS_PATH -+ -+exec perl "$VIRTV2V_ROOT/p2v-server/virt-p2v-server.pl" "$@" -diff -ruN virt-v2v-v0.8.1/p2v/server/virt-p2v-server.pl virt-v2v-v0.8.1.new/p2v/server/virt-p2v-server.pl ---- virt-v2v-v0.8.1/p2v/server/virt-p2v-server.pl 1970-01-01 01:00:00.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v/server/virt-p2v-server.pl 2011-05-11 17:20:21.000000000 +0100 -@@ -0,0 +1,505 @@ -+#!/usr/bin/perl -+# virt-p2v-server -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+use warnings; -+use strict; -+ -+use IO::Handle; -+use YAML::Any; -+ -+use Locale::TextDomain 'virt-v2v'; -+ -+use Sys::Guestfs; -+ -+use Sys::VirtConvert; -+use Sys::VirtConvert::Config; -+use Sys::VirtConvert::Converter; -+use Sys::VirtConvert::Connection::LibVirtTarget; -+use Sys::VirtConvert::Connection::RHEVTarget; -+use Sys::VirtConvert::GuestfsHandle; -+use Sys::VirtConvert::Util qw(:DEFAULT logmsg_init logmsg_level); -+ -+=encoding utf8 -+ -+=head1 NAME -+ -+virt-p2v-server - Receive data from virt-p2v -+ -+=head1 DESCRIPTION -+ -+virt-p2v-server is invoked over SSH by virt-p2v. It is not intended to be run -+manually. -+ -+=cut -+ -+# SIGPIPE will cause an untidy exit of the perl process, without calling -+# destructors. We don't rely on it anywhere, as we check for errors when reading -+# from or writing to a pipe. -+$SIG{'PIPE'} = 'IGNORE'; -+ -+# The protocol version we support -+use constant VERSION => 0; -+ -+# Message types -+use constant MSG_VERSION => 'VERSION'; -+use constant MSG_LANG => 'LANG'; -+use constant MSG_METADATA => 'METADATA'; -+use constant MSG_PATH => 'PATH'; -+use constant MSG_CONVERT => 'CONVERT'; -+use constant MSG_LIST_PROFILES => 'LIST_PROFILES'; -+use constant MSG_SET_PROFILE => 'SET_PROFILE'; -+use constant MSG_CONTAINER => 'CONTAINER'; -+use constant MSG_DATA => 'DATA'; -+ -+# Container types -+use constant CONT_RAW => 'RAW'; -+ -+# Global state -+my $config; -+my $meta; -+my $target; -+ -+# Initialize logging -+logmsg_init('syslog'); -+#logmsg_level(DEBUG); -+ -+logmsg NOTICE, __x("{program} started.", program => 'p2v-server'); -+ -+# Wrap everything in a big eval to catch any die(). N.B. $SIG{__DIE__} is no -+# good for this, as it catches every die(), even those inside an eval -+eval { -+ # Set the umask to a reasonable default -+ umask(0022); -+ -+ # Don't buffer output -+ # While perl will use line buffering when STDOUT is connected to a tty, when -+ # not connected to a tty, for example when invoked directly over ssh, it -+ # will use a regular, large output buffer. This results in messages being -+ # held in the buffer indefinitely. -+ STDOUT->autoflush(1); -+ -+ # Read the config file -+ eval { -+ $config = Sys::VirtConvert::Config->new('/etc/virt-v2v.conf'); -+ }; -+ v2vdie $@ if $@; -+ -+ my $msg; -+ while ($msg = p2v_receive()) { -+ my $type = $msg->{type}; -+ -+ # VERSION n -+ if ($type eq MSG_VERSION) { -+ my $version = $msg->{args}[0]; -+ if ($version <= VERSION) { -+ p2v_return_ok(); -+ } -+ -+ else { -+ err_and_die(__x('This version of virt-p2v-server does not '. -+ 'support protocol version {version}.', -+ version => $version)); -+ } -+ } -+ -+ # LANG lang -+ elsif ($type eq MSG_LANG) { -+ $ENV{LANG} = $msg->{args}[0]; -+ p2v_return_ok(); -+ } -+ -+ # METADATA length -+ # length bytes of YAML -+ elsif ($type eq MSG_METADATA) { -+ my $yaml = p2v_read($msg->{args}[0]); -+ eval { $meta = Load($yaml); }; -+ err_and_die('Error parsing metadata: '.$@) if $@; -+ -+ p2v_return_ok(); -+ } -+ -+ # PATH length path -+ # N.B. path could theoretically include spaces -+ elsif ($type eq MSG_PATH) { -+ my $length = $msg->{args}[0]; -+ -+ my $path = join(' ', @{$msg->{args}}[1..$#{$msg->{args}}]); -+ receive_path($path, $length); -+ } -+ -+ # CONVERT -+ elsif ($type eq MSG_CONVERT) { -+ convert(); -+ } -+ -+ # LIST_PROFILES -+ elsif ($type eq MSG_LIST_PROFILES) { -+ p2v_return_list($config->list_profiles()); -+ } -+ -+ # SET_PROFILE profile -+ elsif ($type eq MSG_SET_PROFILE) { -+ set_profile($msg->{args}[0]); -+ } -+ -+ else { -+ unexpected_msg($type); -+ } -+ } -+}; -+logmsg FATAL, $@ if $@; -+ -+exit(0); -+ -+# Receive an image file -+sub receive_path -+{ -+ my ($path, $length) = @_; -+ -+ err_and_die('PATH without prior SET_PROFILE command') -+ unless defined($target); -+ err_and_die('PATH without prior METADATA command') -+ unless defined($meta); -+ -+ my ($disk) = grep { $_->{path} eq $path } @{$meta->{disks}}; -+ err_and_die("$path not found in metadata") unless defined($disk); -+ -+ # Construct a volume name based on the path and hostname -+ my $name = $meta->{name}.'-'.$disk->{device}; -+ $name =~ s,/,_,g; # e.g. cciss devices have a directory structure -+ -+ my $sopts = $config->get_storage_opts(); -+ -+ my $convert = 0; -+ my $format; -+ my $sparse; -+ -+ # Default to raw. Conversion required for anything else. -+ if (!exists($sopts->{format}) || $sopts->{format} eq 'raw') { -+ $format = 'raw'; -+ } else { -+ $format = $sopts->{format}; -+ $convert = 1; -+ } -+ -+ # Default to non-sparse -+ my $allocation = $sopts->{allocation}; -+ if (!defined($allocation) || $allocation eq 'preallocated') { -+ $sparse = 0; -+ } elsif ($allocation eq 'sparse') { -+ $sparse = 1; -+ } else { -+ err_and_die(__x('Invalid allocation policy {policy} in profile.', -+ policy => $allocation)); -+ } -+ -+ # Create the target volume -+ my $vol; -+ eval { -+ $vol = $target->create_volume( -+ $name, -+ $format, -+ $length, -+ $sparse -+ ); -+ }; -+ err_and_die($@) if $@; -+ p2v_return_ok(); -+ -+ # Receive an initial container -+ my $msg = p2v_receive(); -+ unexpected_msg($msg->{type}) unless $msg->{type} eq MSG_CONTAINER; -+ -+ # We only support RAW container -+ my $ctype = $msg->{args}[0]; -+ err_and_die("Received unknown container type: $ctype") -+ unless $ctype eq CONT_RAW; -+ p2v_return_ok(); -+ -+ # Update the disk entry with the new volume details -+ $disk->{local_path} = $vol->get_local_path(); -+ $disk->{path} = $vol->get_path(); -+ $disk->{is_block} = $vol->is_block(); -+ -+ my $writer = $vol->get_write_stream($convert); -+ -+ # Receive volume data in chunks -+ my $received = 0; -+ while ($received < $length) { -+ my $data = p2v_receive(); -+ -+ unexpected_msg($data->command) unless $data->{type} eq MSG_DATA; -+ -+ # Read the data message in chunks of up to 4M -+ my $remaining = $data->{args}[0]; -+ while ($remaining > 0) { -+ my $chunk = $remaining > 4*1024*1024 ? 4*1024*1024 : $remaining; -+ my $buf = p2v_read($chunk); -+ -+ $received += $chunk; -+ $remaining -= $chunk; -+ -+ eval { $writer->write($buf); }; -+ err_and_die($@) if $@; -+ } -+ -+ p2v_return_ok(); -+ } -+} -+ -+# Use the specified profile -+sub set_profile -+{ -+ my ($profile) = @_; -+ -+ # Check the profile is in our list -+ my $found = 0; -+ for my $i ($config->list_profiles()) { -+ if ($i eq $profile) { -+ $found = 1; -+ last; -+ } -+ } -+ err_and_die(__x('Invalid profile: {profile}', profile => $profile)) -+ unless ($found); -+ -+ $config->use_profile($profile); -+ -+ my $storage = $config->get_storage(); -+ my $method = $config->get_method(); -+ if ($method eq 'libvirt') { -+ $target = new Sys::VirtConvert::Connection::LibVirtTarget -+ ('qemu:///system', $storage); -+ } elsif ($method eq 'rhev') { -+ $target = new Sys::VirtConvert::Connection::RHEVTarget($storage); -+ } else { -+ err_and_die(__x('Profile {profile} specifies invalid method {method}.', -+ profile => $profile, method => $method)); -+ } -+ -+ p2v_return_ok(); -+} -+ -+sub convert -+{ -+ err_and_die('CONVERT without prior SET_PROFILE command') -+ unless (defined($target)); -+ -+ err_and_die('CONVERT without prior METADATA command') -+ unless defined($meta); -+ -+ my @localpaths = map { $_->{local_path} } @{$meta->{disks}}; -+ -+ my $g; -+ eval { -+ my $transferiso = $config->get_transfer_iso(); -+ -+ $g = new Sys::VirtConvert::GuestfsHandle( -+ \@localpaths, -+ $transferiso, -+ $target->isa('Sys::VirtConvert::Connection::RHEVTarget') -+ ); -+ -+ my $transferdev; -+ if (defined($transferiso)) { -+ my @devices = $g->list_devices(); -+ $transferdev = pop(@devices); -+ } -+ -+ my $root = inspect_guest($g, $transferdev); -+ my $guestcaps = -+ Sys::VirtConvert::Converter->convert($g, $config, $root, $meta); -+ $target->create_guest($g, $root, $meta, $config, $guestcaps, -+ $meta->{name}); -+ -+ if($guestcaps->{block} eq 'virtio' && $guestcaps->{net} eq 'virtio') { -+ logmsg NOTICE, __x('{name} configured with virtio drivers.', -+ name => $meta->{name}); -+ } elsif ($guestcaps->{block} eq 'virtio') { -+ logmsg NOTICE, __x('{name} configured with virtio storage only.', -+ name => $meta->{name}); -+ } elsif ($guestcaps->{net} eq 'virtio') { -+ logmsg NOTICE, __x('{name} configured with virtio networking only.', -+ name => $meta->{name}); -+ } else { -+ logmsg NOTICE, __x('{name} configured without virtio drivers.', -+ name => $meta->{name}); -+ } -+ }; -+ -+ # If any of the above commands result in failure, we need to ensure that -+ # the guestfs qemu process is cleaned up before further cleanup. Failure to -+ # do this can result in failure to umount RHEV export's temporary mount -+ # point. -+ if ($@) { -+ my $err = $@; -+ $g->close(); -+ -+ # We trust the error was already logged -+ p2v_return_err($err); -+ die($@); -+ } -+ -+ p2v_return_ok(); -+} -+ -+sub unexpected_msg -+{ -+ err_and_die('Received unexpected command: '.shift); -+} -+ -+sub err_and_die -+{ -+ my $err = shift; -+ p2v_return_err($err); -+ v2vdie $err; -+} -+ -+END { -+ my $err = $?; -+ -+ logmsg NOTICE, __x("{program} exited.", program => 'p2v-server'); -+ -+ # die() sets $? to 255, which is untidy. -+ $? = $err == 255 ? 1 : $err; -+} -+ -+# Perform guest inspection using the libguestfs core inspection API. -+# Returns the root device of the os to be converted. -+sub inspect_guest -+{ -+ my $g = shift; -+ my $transferdev = shift; -+ -+ # Get list of roots, sorted -+ my @roots = $g->inspect_os(); -+ -+ # Filter out the transfer device from the results of inspect_os -+ # There's a libguestfs bug (fixed upstream) which meant the transfer ISO -+ # could be erroneously detected as an unknown Windows OS. As we know what it -+ # is, we can filter out the transfer device here. Even when the fix is -+ # released this is reasonable belt & braces. -+ @roots = grep(!/^\Q$transferdev\E$/, @roots); -+ -+ @roots = sort @roots; -+ -+ # Only work on single-root operating systems. -+ v2vdie __('No root device found in this operating system image.') -+ if @roots == 0; -+ -+ v2vdie __('Multiboot operating systems are not supported.') -+ if @roots > 1; -+ -+ return $roots[0]; -+} -+ -+sub p2v_receive -+{ -+ my $in = <>; -+ v2vdie __('Client closed connection unexpectedly') unless defined($in); -+ -+ # Messages consist of the message type followed by 0 or more arguments, -+ # terminated by a newline -+ chomp($in); -+ $in =~ /^([A-Z_]+)( .+)?$/ or err_and_die("Received invalid message: $in"); -+ -+ my %msg; -+ $msg{type} = $1; -+ if (defined($2)) { -+ my @args = split(' ', $2); -+ $msg{args} = \@args; -+ } else { -+ $msg{args} = []; -+ } -+ -+ logmsg DEBUG, __x('Received: {command} {args}', -+ command => $msg{type}, -+ args => join(' ', @{$msg{args}})); -+ -+ return \%msg; -+} -+ -+sub p2v_read -+{ -+ my ($length) = @_; -+ -+ my $buf; -+ my $total = 0; -+ -+ while($total < $length) { -+ my $in = read(STDIN, $buf, $length, $total) -+ or err_and_die(__x('Error receiving data: {error}', error => $@)); -+ logmsg DEBUG, "Read $in bytes"; -+ $total += $in; -+ } -+ -+ return $buf; -+} -+ -+sub p2v_return_ok -+{ -+ my $msg = "OK"; -+ logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -+ print $msg,"\n"; -+} -+ -+sub p2v_return_list -+{ -+ my @values = @_; -+ -+ my $msg = 'LIST '.scalar(@values); -+ foreach my $value (@values) { -+ $msg .= "\n$value"; -+ } -+ logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -+ print $msg,"\n"; -+} -+ -+sub p2v_return_err -+{ -+ my $msg = 'ERROR '.shift; -+ logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -+ print $msg,"\n"; -+} -+ -+=head1 SEE ALSO -+ -+L, -+L. -+ -+=head1 AUTHOR -+ -+Matthew Booth -+ -+=head1 COPYRIGHT -+ -+Copyright (C) 2011 Red Hat Inc. -+ -+This program is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2 of the License, or -+(at your option) any later version. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; if not, write to the Free Software -+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -diff -ruN virt-v2v-v0.8.1/p2v-client/bin/virt-p2v virt-v2v-v0.8.1.new/p2v-client/bin/virt-p2v ---- virt-v2v-v0.8.1/p2v-client/bin/virt-p2v 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/bin/virt-p2v 1970-01-01 01:00:00.000000000 +0100 -@@ -1,62 +0,0 @@ --#!/usr/bin/env ruby -- --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'virt-p2v/ui/main' --require 'virt-p2v/ui/network' --require 'virt-p2v/ui/connect' --require 'virt-p2v/ui/convert' --require 'virt-p2v/ui/success' -- --require 'virt-p2v/converter' --require 'virt-p2v/netdevice' -- --require 'gettext' -- --include GetText -- --bindtextdomain('virt-p2v') -- --if Process.uid != 0 -- puts _("virt-p2v must be executed with root privileges.\n" + -- "It is intended to be included in a custom Live image, not " + -- "run from the command\nline.") -- abort --end -- --converter = VirtP2V::Converter.new -- --# Initialise the wizard UI --ui = VirtP2V::UI::Main.new -- --# Initialize wizard pages --VirtP2V::UI::Network.init(ui) --VirtP2V::UI::Connect.init(ui, converter) --VirtP2V::UI::Convert.init(ui, converter) --VirtP2V::UI::Success.init(ui) -- --# Skip the network configuration screen if there is already an active network --# connection --VirtP2V::NetworkDevice.all_devices.each { |device| -- if device.activated then -- ui.active_page = 'server_win' -- break -- end --} -- --ui.show --ui.main_loop -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/blockdevice.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/blockdevice.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/blockdevice.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/blockdevice.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,112 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --module VirtP2V -- --class NoSuchDeviceError < StandardError; end -- --class FixedBlockDevice -- @@devices = {} -- -- def self.all_devices -- @@devices.values -- end -- -- def self.[](device) -- raise NoSuchDeviceError unless @@devices.has_key?(device) -- -- @@devices[device] -- end -- -- attr_reader :device -- -- def initialize(device) -- @device = device -- @@devices[device] = self -- end --end -- --class RemovableBlockDevice -- @@devices = {} -- -- def self.all_devices -- @@devices.values -- end -- -- def self.[](device) -- raise NoSuchDeviceError unless @@devices.has_key?(device) -- -- @@devices[device] -- end -- -- attr_reader :device, :type -- -- def initialize(device, type) -- @device = device -- @type = type -- -- @@devices[device] = self -- end --end -- --# Detect and instantiate all fixed and removable block devices in the system --begin -- # Look for block devices -- # Specifically, we look for entries in /sys/block which have a device -- # symlink and no entries in their slaves subdirectory -- Dir.foreach('/sys/block') { |dev| -- next if dev == '.' || dev == '..' -- -- # Skip if there's no device link -- next unless File.exists?("/sys/block/#{dev}/device") -- -- # Skip if the slaves subdirectory contains anything other than . and -- # .. -- begin -- next if Dir.entries("/sys/block/#{dev}/slaves").length > 2 -- rescue Errno::ENOENT => ex -- # This shouldn't happen, but if it did I guess it would mean -- # there are no slave devices -- end -- -- # We've got a real block device. Check if it's removable or not -- File.open("/sys/block/#{dev}/removable") { |fd| -- removable = fd.gets.chomp -- if removable == "0" then -- FixedBlockDevice.new(dev) -- else -- # Look in device/modalias to work out what kind of removable -- # device this is -- type = File.open( -- "/sys/block/#{dev}/device/modalias") \ -- { |modalias_f| -- modalias = modalias_f.gets.chomp -- if modalias =~ /floppy/ then -- 'floppy' -- elsif modalias =~ /cdrom/ then -- 'cdrom' -- else -- # We don't know what this is, ignore it -- end -- } -- -- RemovableBlockDevice.new(dev, type) unless type.nil? -- end -- } -- } --end -- --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/connection.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/connection.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/connection.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/connection.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,320 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'rubygems' --require 'net/ssh' --require 'thread' --require 'yaml' -- --require 'virt-p2v/gtk-queue' -- --module VirtP2V -- --class Connection -- include GetText -- -- attr_reader :connected -- -- class InvalidHostnameError < StandardError; end -- class InvalidCredentialsError < StandardError; end -- class TransportError < StandardError; end -- class NoP2VError < StandardError; end -- class RemoteError < StandardError; end -- class ProtocolError < StandardError; end -- class NotConnectedError < StandardError; end -- -- def on_connect(&cb) -- @connection_listeners << cb -- end -- -- def initialize(hostname, username, password, &cb) -- @mutex = Mutex.new -- @connection_listeners = [] -- -- # Always send our version number on connection -- @connection_listeners << Proc.new { |cb| -- self.version { |result| cb.call(result) } -- } -- -- run(cb) { -- error = nil -- begin -- @ssh = Net::SSH.start(hostname, username, :password => password) -- rescue SocketError, Errno::EHOSTUNREACH => ex -- raise InvalidHostnameError -- raise ex -- rescue Net::SSH::AuthenticationFailed => ex -- raise InvalidCredentialsError -- raise ex -- end -- -- @buffer = "" -- @connected = false -- -- Gtk.queue { cb.call(true) } -- } -- end -- -- def connect(&cb) -- run(cb) { -- @ch = @ssh.open_channel do |ch| -- ch.exec("virt-p2v-server") do |ch, success| -- raise RemoteError, -- "could not execute a remote command" unless success -- -- ch.on_data do |ch, data| -- @buffer << data -- end -- -- # If we get anything on stderr, raise it as a RemoteError -- ch.on_extended_data do |ch, type, data| -- close -- raise RemoteError, data -- end -- -- # Clean up local resources if we get eof from the other end -- ch.on_eof do |ch| -- close -- end -- -- @connected = true -- end -- -- end -- -- # Wait until we're connected -- @ssh.loop do -- !@connected -- end -- -- i = 0; -- listener_result = lambda { |result| -- if result.kind_of?(Exception) -- cb.call(result) -- else -- i += 1 -- if i == @connection_listeners.length -- cb.call(true) -- else -- Gtk.queue { -- @connection_listeners[i].call(listener_result) -- } -- end -- end -- } -- Gtk.queue { @connection_listeners[0].call(listener_result) } -- } -- end -- -- def close -- @connected = false -- @buffer = "" -- @ch.close -- end -- -- def version(&cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("VERSION 0\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def lang(lang, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("LANG #{lang}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def metadata(meta, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- payload = YAML::dump(meta) -- @ch.send_data("METADATA #{payload.length}\n"); -- @ch.send_data(payload) -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def path(length, path, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("PATH #{length} #{path}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def convert(&cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("CONVERT\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def list_profiles(&cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("LIST_PROFILES\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def set_profile(profile, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("SET_PROFILE #{profile}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def container(type, &cb) -- raise NotConnectedError unless @connected -- -- run(cb) { -- @ch.send_data("CONTAINER #{type}\n") -- result = parse_return -- -- Gtk.queue { cb.call(result) } -- } -- end -- -- def send_data(io, length, progress, &completion) -- raise NotConnectedError unless @connected -- -- run(completion) { -- @ch.send_data("DATA #{length}\n") -- total = 0 -- buffer = '' -- begin -- # This loop is in the habit of hanging in Net::SSH when sending -- # a chunk larger than about 2M. Putting the 1 second wait -- # timeout here kickstarts it if it stops. -- @ssh.loop(1) { -- if io.eof? || total == length then -- false -- else -- if @ch.remote_window_size > 0 then -- out = length - total -- out = @ch.remote_window_size \ -- if out > @ch.remote_window_size -- -- io.read(out, buffer) -- @ch.send_data(buffer) -- -- total += buffer.length -- -- # Send a progress callback -- Gtk.queue { progress.call(total) } -- end -- -- true -- end -- } -- rescue => ex -- Gtk.queue { completion.call(ex) } -- end -- -- result = parse_return -- -- Gtk.queue { completion.call(result) } -- } -- end -- -- private -- -- def run(cb) -- # Run the given block in a new thread -- t = Thread.new { -- begin -- # We can't run more than 1 command simultaneously -- @mutex.synchronize { yield } -- rescue => ex -- # Deliver exceptions to the caller, then re-raise them -- Gtk.queue { cb.call(ex) } -- raise ex -- end -- } -- t.priority = 1 -- end -- -- # Return a single line of output from the remote server -- def readline -- # Run the event loop until the buffer contains a newline -- index = nil -- @ssh.loop do -- if !@ch.eof? then -- index = @buffer.index("\n") -- index.nil? -- else -- close -- raise RemoteError, _('Server closed connection unexpectedly') -- end -- end -- -- # Remove the line from the buffer and return it with the trailing -- # newline removed -- @buffer.slice!(0..index).chomp -- end -- -- def parse_return -- line = readline -- line =~ /^(OK|ERROR|LIST)(?:\s(.*))?$/ or -- raise ProtocolError, "Invalid server response: #{line}" -- -- return true if $~[1] == 'OK' -- if $~[1] == 'ERROR' then -- close -- raise RemoteError, $~[2] -- end -- -- # LIST response. Get the number of items, and read that many lines -- n = Integer($~[2]) -- ret = [] -- while n > 0 do -- n -= 1 -- ret.push(readline) -- end -- -- ret -- end --end -- --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/converter.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/converter.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/converter.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/converter.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,218 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'rexml/document' --include REXML -- --require 'virt-p2v/netdevice' --require 'virt-p2v/blockdevice' -- --module VirtP2V -- --# NIC --# hostname --# username --# password -- --# name User entry --# memory Editable --# cpus Editable --# arch Detected: cpuflags contains lm (long mode) --# features Detected: apic, acpi, pae --# disks Editable, default to all --# device Detected --# path Detected --# is_block 1 --# format raw --# removables Editable, default to all --# device Detected --# type Detected --# nics Editable, default to all connected --# mac Detected, option to generate new --# vnet Set to nic name --# vnet_type bridge -- --class Converter -- include GetText -- -- attr_accessor :profile, :name, :cpus, :memory, :arch -- attr_reader :features, :disks, :removables, :nics -- -- attr_reader :connection -- -- def on_connection(&cb) -- @connection_listeners << cb -- end -- -- def connection=(connection) -- @connection = connection -- @connection_listeners.each { |cb| -- cb.call(connection) -- } -- end -- -- def convert(status, progress, &completion) -- iterate([ -- lambda { |cb| @connection.set_profile(@profile, &cb) }, -- lambda { |cb| @connection.metadata(meta, &cb) }, -- lambda { |cb| -- iterate(@disks.map { |dev| -- lambda { |cb2| -- disk(dev, status, progress, cb2) -- } -- }, cb) -- }, -- lambda { |cb| -- status.call(_('Converting')) -- @connection.convert(&cb) -- } -- ], completion) -- end -- -- private -- -- def initialize() -- @profile = nil -- @connection = nil -- @connection_listeners = [] -- -- # Initialize basic system information -- @name = '' # There's no reasonable default for this -- -- # Get total memory from /proc/meminfo -- File.open('/proc/meminfo', 'r') do |fd| -- fd.each { |line| -- next unless line =~ /^MemTotal:\s+(\d+)\b/ -- -- @memory = Integer($~[1]) * 1024 -- break -- } -- end -- -- # Get the total number of cpu threads from hwloc-info -- hwloc = Document.new `hwloc-info --of xml` -- @cpus = XPath.match(hwloc, "//object[@type='PU']").length -- -- # Get cpu architecture and features from the first flags entry in -- # /proc/cpuinfo -- File.open('/proc/cpuinfo', 'r') do |fd| -- fd.each { |line| -- next unless line =~ /^flags\s*:\s(.*)$/ -- -- flags = $~[1] -- -- # x86_64 if flags contains lm (long mode), i686 otherwise. We -- # don't support anything else. -- @arch = flags =~ /\blm\b/ ? 'x86_64' : 'i686' -- -- # Pull some select features from cpu flags -- @features = [] -- [ 'apic', 'acpi', 'pae' ].each { |f| -- @features << f if flags =~ /\b#{f}\b/ -- } -- break -- } -- end -- -- # Initialise empty lists for optional devices. These will be added -- # according to the user's selection -- @disks = [] -- @removables = [] -- @nics = [] -- end -- -- def disk(dev, status, progress, completion) -- path = "/dev/#{dev}" -- # XXX: No error checking of blockdev execution -- size = Integer(`blockdev --getsize64 #{path}`.chomp) -- status.call(_("Transferring #{dev}")) -- iterate([ -- lambda { |cb| @connection.path(size, path, &cb) }, -- lambda { |cb| @connection.container('RAW', &cb) }, -- lambda { |cb| -- io = nil -- begin -- io = File.new(path, 'r') -- rescue => ex -- cb.call(ex) -- end -- pc = 0 -- @connection.send_data(io, size, lambda { |total| -- npc = Float(total) * 100 / size -- # Only update the progress if it has increased by -- # at least 1% -- if Integer(npc) > pc then -- pc += 1 -- progress.call(dev, pc) -- end -- }, &cb) -- } -- ], completion) -- end -- -- def iterate(stages, completion) -- i = 0 -- cb = lambda { |result| -- if result.kind_of?(Exception) then -- completion.call(result) -- else -- i += 1 -- if i == stages.length then -- completion.call(true) -- else -- stages[i].call(cb) -- end -- end -- } -- stages[0].call(cb) -- end -- -- def meta -- { -- 'name' => @name, -- 'cpus' => @cpus, -- 'memory' => @memory, -- 'arch' => @arch, -- 'features' => @features, -- 'disks' => @disks.map { |device| -- { -- 'device' => device, -- 'path' => "/dev/#{device}", -- 'is_block' => '1', -- 'format' => 'raw' -- } -- }, -- 'removables' => @removables.map { |device| -- removable = RemovableBlockDevice[device] -- { -- 'device' => removable.device, -- 'type' => removable.type -- } -- }, -- 'nics' => @nics.map { |device| -- nic = NetworkDevice[device] -- { -- 'mac' => nic.mac, -- 'vnet' => nic.name, -- 'vnet_type' => 'bridge' -- } -- } -- } -- end --end -- --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/gtk-queue.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/gtk-queue.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/gtk-queue.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/gtk-queue.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,52 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --# This code is taken from: --# http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_threads --# The author of the above page is given as Tal Liron --# The above page is distributed under the terms of the GNU FDL, although I --# consider this code to be too trivial to be copyrightable -- --require 'gtk2' --require 'thread' -- --module Gtk -- GTK_PENDING_BLOCKS = [] -- GTK_PENDING_BLOCKS_LOCK = Mutex.new -- -- def Gtk.queue &block -- if Thread.current == Thread.main -- block.call -- else -- GTK_PENDING_BLOCKS_LOCK.synchronize do -- GTK_PENDING_BLOCKS << block -- end -- end -- end -- -- def Gtk.main_with_queue timeout -- Gtk.timeout_add timeout do -- GTK_PENDING_BLOCKS_LOCK.synchronize do -- for block in GTK_PENDING_BLOCKS -- block.call -- end -- GTK_PENDING_BLOCKS.clear -- end -- true -- end -- Gtk.main -- end --end -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/netdevice.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/netdevice.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/netdevice.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/netdevice.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,259 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'dbus' --require 'gettext' -- --module VirtP2V -- --class NetworkDevice -- include GetText -- -- attr_reader :name, :mac, :connected, :activated, :state -- -- # Some NetworkManager names, for convenience -- CONNECTION = 'org.freedesktop.NetworkManagerSettings.Connection'.freeze -- DEVICE = 'org.freedesktop.NetworkManager.Device'.freeze -- NETWORKMANAGER = 'org.freedesktop.NetworkManager'.freeze -- PROPERTIES = 'org.freedesktop.DBus.Properties'.freeze -- SETTINGS = 'org.freedesktop.NetworkManagerSettings'.freeze -- WIRED = 'org.freedesktop.NetworkManager.Device.Wired'.freeze -- -- # NetworkManager device types -- # http://projects.gnome.org/NetworkManager/developers/spec-08.html -- TYPE_UNKNOWN = 0 -- TYPE_ETHERNET = 1 -- TYPE_WIFI = 2 -- TYPE_GSM = 3 -- TYPE_CDMA = 4 -- -- # NetworkManager device states -- STATE_UNKNOWN = 0 -- STATE_UNMANAGED = 1 -- STATE_UNAVAILABLE = 2 -- STATE_DISCONNECTED = 3 -- STATE_PREPARE = 4 -- STATE_CONFIG = 5 -- STATE_NEED_AUTH = 6 -- STATE_IP_CONFIG = 7 -- STATE_ACTIVATED = 8 -- STATE_FAILED = 9 -- -- # Human readable descriptions of NetworkManager Device States -- STATES = { -- 0 => _('Unknown').freeze, # For completeness -- 1 => _('Unmanaged').freeze, # For completeness -- 2 => _('No cable connected').freeze, -- 3 => _('Not connected').freeze, -- 4 => _('Preparing to connect').freeze, -- 5 => _('Configuring').freeze, -- 6 => _('Waiting for authentication').freeze, -- 7 => _('Obtaining an IP address').freeze, -- 8 => _('Connected').freeze, -- 9 => _('Connection failed').freeze -- }.freeze -- -- def initialize(obj, device, props) -- device.default_iface = WIRED -- -- @nm_obj = obj -- @name = props.Get(DEVICE, 'Interface')[0] -- @mac = props.Get(WIRED, 'HwAddress')[0] -- state = props.Get(WIRED, 'State')[0] -- -- # Lookup by name -- @@devices[@name] = self -- -- state_updated(state) -- -- # Register a listener for state changes -- device.on_signal('PropertiesChanged') { |props| -- if props.has_key?('State') then -- state_updated(props['State']) -- -- # Notify registered state change handlers -- @@listeners.each { |cb| cb.call(self) } -- end -- } -- end -- -- def self.all_devices() -- @@devices.values -- end -- -- def self.add_listener(cb) -- @@listeners.push(cb) -- end -- -- def self.[](name) -- @@devices[name] -- end -- -- def activate(auto, ip, prefix, gateway, dns) -- # Get an IP config dependent on whether @ip_address is IPv4 or IPv6 -- ip_config = auto ? get_config_auto : -- ip.ipv4? ? get_config_ipv4() : get_config_ipv6() -- -- # Create a new NetworkManager connection object -- settings = @@nm_service.object( -- '/org/freedesktop/NetworkManagerSettings') -- settings.introspect() -- settings.default_iface = SETTINGS -- -- uuid = `uuidgen`.chomp -- settings.AddConnection( -- 'connection' => { -- 'uuid' => uuid, -- 'id' => 'P2V', -- 'type' => '802-3-ethernet', -- 'autoconnect' => false -- }, -- '802-3-ethernet' => {}, -- 'ipv4' => ip_config['ipv4'], -- 'ipv6' => ip_config['ipv6'] -- ) -- -- # Find the connection we just created -- # XXX: There must be a better way to get this! -- conn = settings.ListConnections()[0].each { |i| -- conn = @@nm_service.object(i) -- conn.introspect -- conn.default_iface = CONNECTION -- -- break i if conn.GetSettings()[0]['connection']['uuid'] == uuid -- } -- -- nm = @@nm_service.object('/org/freedesktop/NetworkManager') -- nm.introspect -- nm.default_iface = NETWORKMANAGER -- nm.ActivateConnection('org.freedesktop.NetworkManagerSystemSettings', -- conn, @nm_obj, '/') -- end -- -- private -- -- def state_updated(state) -- @connected = state > 2 -- @state = STATES[state] -- -- if state == STATE_ACTIVATED then -- @activated = true -- elsif state == STATE_FAILED then -- @activated = false -- else -- @activated = nil -- end -- end -- -- def get_config_auto -- { -- 'ipv4' => { -- 'method' => 'auto' -- }, -- 'ipv6' => { -- 'method' => 'ignore' -- } -- } -- end -- -- def ipv4_to_nm(ipaddr) -- ipaddr.hton().unpack("I")[0] -- end -- -- def get_config_ipv4 -- addresses = [[ ipv4_to_nm(@ip_address), @ip_prefix, -- ipv4_to_nm(@ip_gateway) ]] -- -- dns = [] -- @ip_dns.each{ |ipaddr| -- # Only use IPv4 DNS servers -- next unless ipaddr.ipv4? -- dns.push(ipv4_to_nm(ipaddr)) -- } -- -- { -- 'ipv4' => { -- 'method' => 'manual', -- 'addresses' => [ 'aau', addresses ], -- 'dns' => [ 'au', dns ] -- }, -- 'ipv6' => { -- 'method' => 'ignore' -- } -- } -- end -- -- def ipv6_to_nm(ipaddr) -- ipaddr.hton().unpack("c*") -- end -- -- def get_config_ipv6 -- dns = [] -- @ip_dns.each { |ipaddr| -- # Only use IPv6 DNS servers -- next unless ipaddr.ipv6? -- dns.push(ipv6_to_nm(ipaddr)) -- } -- -- { -- 'ipv4' => { -- 'method' => 'disabled' -- }, -- 'ipv6' => { -- 'method' => 'manual', -- 'addresses' => [ 'a(ayu)', [[ -- ipv6_to_nm(@ip_address), -- @ip_prefix -- ]] ], -- 'routes' => [ 'a(ayuayu)', [[ -- [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], 0, -- ipv6_to_nm(@ip_gateway), 1024 -- ]] ], -- 'dns' => [ 'aay', dns ] -- } -- } -- end -- -- # Class initialization -- begin -- dbus = DBus::SystemBus.instance() -- dbus.glibize() -- @@nm_service = dbus.service(NETWORKMANAGER) -- -- nm = @@nm_service.object('/org/freedesktop/NetworkManager') -- nm.introspect -- nm.default_iface = NETWORKMANAGER -- -- @@devices = {} -- nm.GetDevices()[0].each { |obj| -- device = @@nm_service.object(obj) -- device.introspect -- -- props = device[PROPERTIES] -- type = props.Get(DEVICE, 'DeviceType')[0] -- -- # We only support ethernet devices -- next unless type == TYPE_ETHERNET -- -- # Constructor will add it to @@devices -- self.new(obj, device, props) -- } -- -- @@listeners = [] -- end --end -- --end #module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/connect.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/connect.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/connect.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/connect.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,179 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'gtk2' -- --require 'virt-p2v/connection' -- --module VirtP2V::UI::Connect -- include GetText -- -- UI_STATE_INVALID = 0 -- UI_STATE_VALID = 1 -- UI_STATE_ACTIVATING = 2 -- UI_STATE_COMPLETE = 3 -- -- EV_HOSTNAME = 0 -- EV_USERNAME = 1 -- EV_PASSWORD = 2 -- EV_BUTTON = 3 -- EV_ACTIVATION = 4 -- -- def self.event(event, status) -- case event -- when EV_HOSTNAME -- @hostname = status -- when EV_USERNAME -- @username = status -- when EV_PASSWORD -- @password = status -- when EV_BUTTON, EV_ACTIVATION -- # Persistent state not required -- else -- raise "Unexpected event: #{event}" -- end -- -- valid = @hostname && @username && @password -- -- case @state -- when UI_STATE_INVALID -- set_state(UI_STATE_VALID) if valid -- when UI_STATE_VALID -- if !valid then -- set_state(UI_STATE_INVALID) -- elsif event == EV_BUTTON -- set_state(UI_STATE_ACTIVATING) -- end -- when UI_STATE_ACTIVATING -- # UI is disabled, so we shouldn't be getting any events other than -- # EV_ACTIVATION -- raise "Unexpected event: #{event}" unless event == EV_ACTIVATION -- -- set_state(status ? UI_STATE_COMPLETE : UI_STATE_VALID) -- else -- raise "Unexpected UI state: #{@state}" -- end -- end -- -- def self.init(ui, converter) -- @hostname_ui = ui.get_object('server_hostname') -- @username_ui = ui.get_object('server_username') -- @password_ui = ui.get_object('server_password') -- @connect_frame = ui.get_object('connect_frame') -- @connect_button = ui.get_object('connect_button') -- @connect_error = ui.get_object('connect_error') -- -- ui.register_handler('server_hostname_changed', -- method(:server_hostname_changed)) -- ui.register_handler('server_username_changed', -- method(:server_username_changed)) -- ui.register_handler('server_password_changed', -- method(:server_password_changed)) -- ui.register_handler('connect_button_clicked', -- method(:connect_button_clicked)) -- -- @hostname = @hostname_ui.text.strip.length > 0 -- @username = @username_ui.text.strip.length > 0 -- @password = @password_ui.text.length > 0 # Allow spaces in passwords -- @state = UI_STATE_INVALID -- -- @ui = ui -- @converter = converter -- end -- -- def self.set_state(state) -- # Don't do anything if state hasn't changed -- return if state == @state -- -- case state -- when UI_STATE_INVALID -- @connect_frame.sensitive = true -- @connect_button.sensitive = false -- -- @state = UI_STATE_INVALID -- when UI_STATE_VALID -- @connect_frame.sensitive = true -- @connect_button.sensitive = true -- -- @state = UI_STATE_VALID -- when UI_STATE_ACTIVATING -- @connect_frame.sensitive = false -- @connect_button.sensitive = false -- @connect_error.text = '' -- -- @state = UI_STATE_ACTIVATING -- when UI_STATE_COMPLETE -- # Activate the next page -- @ui.active_page = 'conversion_win' -- -- # ... then leave this one as we hope to find it if we come back here -- set_state(UI_STATE_VALID) -- else -- raise "Attempt to set unexpected UI state: #{@state}" -- end -- end -- -- def self.server_hostname_changed -- event(EV_HOSTNAME, @hostname_ui.text.strip.length > 0) -- end -- -- def self.server_username_changed -- event(EV_USERNAME, @username_ui.text.strip.length > 0) -- end -- -- def self.server_password_changed -- event(EV_PASSWORD, @password_ui.text.length > 0) -- end -- -- def self.connect_button_clicked -- event(EV_BUTTON, true) -- -- hostname = @hostname_ui.text.strip -- username = @username_ui.text.strip -- password = @password_ui.text -- connection = VirtP2V::Connection.new(hostname, username, password) \ -- { |result| -- case result -- when true -- @converter.connection = connection -- connection.connect { |result| -- case result -- when true -- event(EV_ACTIVATION, true) -- when VirtP2V::Connection::RemoteError -- @connect_error.text = _('Failed to start ' + -- 'virt-p2v-server on remote ' + -- 'server') -- event(EV_ACTIVATION, false) -- else -- @connect_error.text = result.message -- event(EV_ACTIVATION, false) -- end -- } -- when VirtP2V::Connection::InvalidHostnameError -- @connect_error.text = _"Unable to connect to #{hostname}" -- event(EV_ACTIVATION, false) -- when VirtP2V::Connection::InvalidCredentialsError -- @connect_error.text = _"Invalid username/password" -- event(EV_ACTIVATION, false) -- else -- raise result -- end -- } -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/convert.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/convert.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/convert.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/convert.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,422 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'gtk2' -- --require 'virt-p2v/blockdevice' --require 'virt-p2v/netdevice' -- --module VirtP2V::UI::Convert -- include GetText -- -- CONVERT_PROFILE_NAME = 0 -- -- CONVERT_NETWORK_CONVERT = 0 -- CONVERT_NETWORK_DEVICE = 1 -- -- CONVERT_FIXED_CONVERT = 0 -- CONVERT_FIXED_DEVICE = 1 -- CONVERT_FIXED_PROGRESS = 2 -- -- CONVERT_REMOVABLE_CONVERT = 0 -- CONVERT_REMOVABLE_DEVICE = 1 -- CONVERT_REMOVABLE_TYPE = 2 -- -- UI_STATE_INVALID = 0 -- UI_STATE_VALID = 1 -- UI_STATE_CONNECTING = 2 -- UI_STATE_CONVERTING = 3 -- UI_STATE_COMPLETE = 4 -- -- EV_VALID = 0 -- EV_BUTTON = 1 -- EV_CONNECTION = 2 -- EV_CONVERTED = 3 -- -- def self.init(ui, converter) -- # ListStores -- @profiles = ui.get_object('convert_profile_list') -- @nics = ui.get_object('convert_network_list') -- @fixeds = ui.get_object('convert_fixed_list') -- @removables = ui.get_object('convert_removable_list') -- -- # Widgets -- @profile = ui.get_object('convert_profile') -- @name = ui.get_object('convert_name') -- @cpus = ui.get_object('convert_cpus') -- @memory = ui.get_object('convert_memory') -- @editable = ui.get_object('convert_editable') -- @button = ui.get_object('convert_button') -- @status = ui.get_object('convert_status') -- -- # Get initial values from converter -- @name.text = converter.name -- @cpus.text = converter.cpus.to_s -- @memory.text = (converter.memory / 1024 / 1024).to_s -- -- # Populate profiles on connection -- converter.on_connection { |conn| -- conn.on_connect { |cb| -- conn.list_profiles { |profiles| -- cb.call(RuntimeError.new(_('Remote server does not ' + -- 'define any profiles in ' + -- '/etc/virt-v2v.conf'))) \ -- if profiles.kind_of?(Exception) or profiles.empty? -- -- selected = @profile.active_iter -- selected = selected[CONVERT_PROFILE_NAME] \ -- unless selected.nil? -- -- @profiles.clear -- profiles.each { |i| -- profile = @profiles.append -- profile[CONVERT_PROFILE_NAME] = i -- @profile.active_iter = profile if i == selected -- } -- -- cb.call(true) -- } -- } -- } -- -- VirtP2V::FixedBlockDevice.all_devices.each { |dev| -- fixed = @fixeds.append -- fixed[CONVERT_FIXED_CONVERT] = true -- fixed[CONVERT_FIXED_DEVICE] = dev.device -- fixed[CONVERT_FIXED_PROGRESS] = 0 -- } -- -- VirtP2V::RemovableBlockDevice.all_devices.each { |dev| -- rem = @removables.append -- rem[CONVERT_REMOVABLE_CONVERT] = true -- rem[CONVERT_REMOVABLE_DEVICE] = dev.device -- rem[CONVERT_REMOVABLE_TYPE] = dev.type -- } -- -- VirtP2V::NetworkDevice.all_devices.each { |dev| -- nic = @nics.append -- nic[CONVERT_NETWORK_CONVERT] = dev.connected -- nic[CONVERT_NETWORK_DEVICE] = dev.name -- } -- -- # Event handlers -- ui.register_handler('convert_profile_changed', -- method(:update_values)) -- ui.register_handler('convert_name_changed', -- method(:update_values)) -- ui.register_handler('convert_cpus_changed', -- method(:convert_cpus_changed)) -- ui.register_handler('convert_memory_changed', -- method(:convert_memory_changed)) -- ui.register_handler('convert_fixed_list_row_changed', -- method(:convert_fixed_list_row_changed)) -- ui.register_handler('convert_removable_list_row_changed', -- method(:update_values)) -- ui.register_handler('convert_network_list_row_changed', -- method(:update_values)) -- ui.register_handler('convert_fixed_select_toggled', -- method(:convert_fixed_select_toggled)) -- ui.register_handler('convert_removable_select_toggled', -- method(:convert_removable_select_toggled)) -- ui.register_handler('convert_network_select_toggled', -- method(:convert_network_select_toggled)) -- ui.register_handler('convert_button_clicked', -- method(:convert_button_clicked)) -- -- @state = nil -- set_state(UI_STATE_INVALID) -- update_values -- -- @ui = ui -- @converter = converter -- end -- -- def self.event(event, status) -- case @state -- when UI_STATE_INVALID -- case event -- when EV_VALID -- set_state(UI_STATE_VALID) if status -- else -- raise "Unexpected event: #{@state} #{event}" -- end -- when UI_STATE_VALID -- case event -- when EV_VALID -- set_state(UI_STATE_INVALID) if !status -- when EV_BUTTON -- if @converter.connection.connected then -- set_state(UI_STATE_CONVERTING) -- convert -- else -- set_state(UI_STATE_CONNECTING) -- reconnect -- end -- else -- raise "Unexpected event: #{@state} #{event}" -- end -- when UI_STATE_CONNECTING -- case event -- when EV_CONNECTION -- if status then -- set_state(UI_STATE_CONVERTING) -- convert -- else -- set_state(UI_STATE_VALID) -- end -- when EV_VALID -- # update_values will be called when the profile list is cleared -- # and repopulated during connection. Untidy, but ignore it. -- else -- raise "Unexpected event: #{@state} #{event}" \ -- unless event == EV_CONNECTION -- end -- when UI_STATE_CONVERTING -- case event -- when EV_CONVERTED -- if status then -- set_state(UI_STATE_COMPLETE) -- else -- set_state(UI_STATE_VALID) -- end -- when EV_VALID -- # update_values will be called when the list stores are updated. -- # Untidy, but ignore it -- else -- raise "Unexpected event: #{@state} #{event}" -- end -- else -- raise "Unexpected UI state: #{@state}" -- end -- end -- -- def self.set_state(state) -- # Don't do anything if state hasn't changed -- return if state == @state -- @state = state -- -- case @state -- when UI_STATE_INVALID -- @editable.sensitive = true -- @button.sensitive = false -- when UI_STATE_VALID -- @editable.sensitive = true -- @button.sensitive = true -- when UI_STATE_CONNECTING -- @status.text = _'Failed to start virt-p2v-server on remote server' -- @editable.sensitive = false -- @button.sensitive = false -- when UI_STATE_CONVERTING -- @editable.sensitive = false -- @button.sensitive = false -- when UI_STATE_COMPLETE -- @ui.active_page = 'success_win' -- -- # ... then leave this one as we hope to find it if we come back here -- set_state(UI_STATE_VALID) -- else -- raise "Attempt to set unexpected UI state: #{@state}" -- end -- end -- -- def self.convert -- @converter.convert( -- # status -- lambda { |msg| -- @status.text = msg -- }, -- # progress -- lambda { |dev, progress| -- @fixeds.each { |model, path, iter| -- next unless iter[CONVERT_FIXED_DEVICE] == dev -- -- iter[CONVERT_FIXED_PROGRESS] = progress -- break -- } -- } -- ) { |result| -- # N.B. Explicit test against true is required here, as result may be -- # an Exception, which would also return true if evaluated alone -- if result == true then -- @status.text = '' -- event(EV_CONVERTED, true) -- else -- @status.text = result.message -- event(EV_CONVERTED, false) -- end -- } -- end -- -- def self.reconnect -- @status.text = _('Reconnecting') -- @converter.connection.connect { |result| -- if result == true then -- event(EV_CONNECTION, true) -- else -- @status.text = -- _'Failed to start virt-p2v-server on remote server' -- event(EV_CONNECTION, false) -- end -- } -- end -- -- def self.convert_fixed_list_row_changed(model, path, iter) -- update_values -- end -- -- class InvalidUIState < StandardError; end -- -- def self.update_values -- valid = nil -- begin -- # Check there's a profile selected -- profile = @profile.active_iter -- raise InvalidUIState if profile.nil? -- @converter.profile = profile[CONVERT_PROFILE_NAME] -- -- # Check there's a name set -- name = @name.text -- raise InvalidUIState if name.nil? || name.strip.length == 0 -- @converter.name = name -- -- # Check cpus and memory are set and numeric -- cpus = @cpus.text -- raise InvalidUIState if cpus.nil? -- cpus = Integer(cpus) rescue nil -- raise InvalidUIState if cpus.nil? -- @converter.cpus = cpus -- -- memory = @memory.text -- raise InvalidUIState if memory.nil? -- memory = Integer(memory) rescue nil -- raise InvalidUIState if memory.nil? -- @converter.memory = memory * 1024 * 1024 -- -- # Check that at least 1 fixed storage device is selected -- fixed = false -- @converter.disks.clear -- @fixeds.each { |model, path, iter| -- if iter[CONVERT_FIXED_CONVERT] then -- fixed = true -- @converter.disks << iter[CONVERT_FIXED_DEVICE] -- end -- } -- raise InvalidUIState unless fixed -- -- # Populate removables and nics, although these aren't required to be -- # selected for the ui state to be valid -- @converter.removables.clear -- @removables.each { |model, path, iter| -- if iter[CONVERT_REMOVABLE_CONVERT] then -- @converter.removables << iter[CONVERT_REMOVABLE_DEVICE] -- end -- } -- @converter.nics.clear -- @nics.each { |model, path, iter| -- if iter[CONVERT_NETWORK_CONVERT] then -- @converter.nics << iter[CONVERT_NETWORK_DEVICE] -- end -- } -- rescue InvalidUIState -- valid = false -- end -- valid = true if valid.nil? -- -- event(EV_VALID, valid) -- end -- -- def self.valid? -- # Check there's a profile selected -- profile = @profile.active_iter -- return false if profile.nil? -- -- # Check there's a name set -- name = @name.text -- return false if name.nil? -- return false unless name.strip.length > 0 -- -- # Check cpus and memory are set and numeric -- cpus = @cpus.text -- return false if cpus.nil? -- cpus = Integer(cpus) rescue nil -- return false if cpus.nil? -- -- memory = @memory.text -- return false if memory.nil? -- memory = Integer(memory) rescue nil -- return false if memory.nil? -- -- # Check that at least 1 fixed storage device is selected -- fixed = false -- @fixeds.each { |model, path, iter| -- if iter[CONVERT_FIXED_CONVERT] then -- fixed = true -- break -- end -- } -- return false unless fixed -- -- return true -- end -- -- def self.convert_cpus_changed -- check_numeric(@cpus) -- end -- -- def self.convert_memory_changed -- check_numeric(@memory) -- end -- -- def self.check_numeric(widget) -- value = widget.text -- if value.nil? ? false : begin -- value = Integer(value) -- value > 0 -- rescue -- false -- end -- then -- widget.secondary_icon_name = nil -- else -- widget.secondary_icon_name = 'gtk-dialog-warning' -- widget.secondary_icon_tooltip_text = -- _('Value must be an integer greater than 0') -- end -- -- update_values -- end -- -- def self.convert_fixed_select_toggled(widget, path) -- iter = @fixeds.get_iter(path) -- iter[CONVERT_FIXED_CONVERT] = !iter[CONVERT_FIXED_CONVERT] -- end -- -- def self.convert_removable_select_toggled(widget, path) -- iter = @removables.get_iter(path) -- iter[CONVERT_REMOVABLE_CONVERT] = !iter[CONVERT_REMOVABLE_CONVERT] -- end -- -- def self.convert_network_select_toggled(widget, path) -- iter = @nics.get_iter(path) -- iter[CONVERT_NETWORK_CONVERT] = !iter[CONVERT_NETWORK_CONVERT] -- end -- -- def self.convert_button_clicked -- event(EV_BUTTON, true) -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/main.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/main.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/main.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/main.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,110 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gtk2' --require 'virt-p2v/gtk-queue' -- --module VirtP2V --module UI -- --class Main -- def get_object(name) -- o = @builder.get_object(name) -- raise "Object #{name} not found in ui" unless o != nil -- -- return o -- end -- -- def show -- @builder.connect_signals { |signal| -- raise "No hander for signal #{signal}" \ -- unless @signal_handlers.has_key?(signal) -- -- @signal_handlers[signal] -- } -- -- # Display the main window -- main = self.get_object('main_window') -- main.show_all() -- end -- -- def register_handler(signal, handler) -- @signal_handlers[signal] = handler -- end -- -- def main_loop -- Gtk.main_with_queue 100 -- end -- -- def active_page=(name) -- raise "Attempt to activate non-existent page #{name}" \ -- unless @pages.has_key?(name) -- -- page = @pages[name] -- -- @page_vbox = self.get_object('page_vbox') unless defined? @page_vbox -- @page_vbox.remove(@selected) if defined? @selected -- @page_vbox.add(page) -- @selected = page -- end -- -- def active_page -- return @selected -- end -- -- def quit -- Gtk.main_quit() -- end -- -- private -- -- def initialize -- @builder = Gtk::Builder.new() -- -- # Find the UI definition in $LOAD_PATH -- i = $LOAD_PATH.index { |path| -- File.exists?(path + '/virt-p2v/ui/p2v.ui') -- } -- @builder.add_from_file($LOAD_PATH[i] + '/virt-p2v/ui/p2v.ui') -- -- @signal_handlers = {} -- self.register_handler('gtk_main_quit', method(:quit)) -- -- # Configure the Wizard page frame -- # Can't change these colours from glade for some reason -- self.get_object('title_background'). -- modify_bg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -- self.get_object('page_frame'). -- modify_fg(Gtk::STATE_NORMAL, Gdk::Color.parse('#86ABD9')) -- -- # Load all pages from glade -- @pages = {} -- [ 'network_win', 'server_win', -- 'conversion_win', 'success_win' ].each { |name| -- page = self.get_object(name) -- -- child = page.children[0] -- page.remove(child) -- @pages[name] = child -- } -- -- # Set a default first page -- self.active_page = 'network_win' -- end --end -- --end # UI --end # VirtP2V -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/network.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/network.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/network.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/network.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,317 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' --require 'gtk2' --require 'ipaddr' --require 'virt-p2v/netdevice' -- --module VirtP2V::UI::Network -- include GetText -- -- # The indices of Device List colums, taken from glade -- DEVCOL_NAME = 0 -- DEVCOL_MAC = 1 -- DEVCOL_STATUS = 2 -- DEVCOL_AVAILABLE = 3 -- -- UI_STATE_INVALID = 0 -- UI_STATE_VALID = 1 -- UI_STATE_ACTIVATING = 2 -- UI_STATE_COMPLETE = 3 -- -- EV_IP_CONFIG = 0 -- EV_SELECTION = 1 -- EV_BUTTON = 2 -- EV_ACTIVATION = 3 -- -- def self.event(event, status) -- case event -- when EV_IP_CONFIG -- @ip_config = status -- when EV_SELECTION -- @selected = status -- when EV_BUTTON, EV_ACTIVATION -- # Persistent state not required -- else -- raise "Unexpected NetworkConfig event: #{event}" -- end -- -- case @state -- when UI_STATE_INVALID -- if @ip_config && @selected then -- set_state(UI_STATE_VALID) -- end -- when UI_STATE_VALID -- if !@ip_config || !@selected then -- set_state(UI_STATE_INVALID) -- elsif event == EV_BUTTON -- set_state(UI_STATE_ACTIVATING) -- end -- when UI_STATE_ACTIVATING -- # UI is disabled and we're waiting for EV_ACTIVATION, but we could -- # also get events triggered by NetworkManager signals. -- -- if event == EV_ACTIVATION then -- if status then -- set_state(UI_STATE_COMPLETE) -- else -- set_state(UI_STATE_VALID) -- end -- elsif !@ip_config || !@selected then -- set_state(UI_STATE_INVALID) -- end -- else -- raise "Unexpected NetworkConfig UI state: #{@state}" -- end -- end -- -- def self.init(ui) -- # Configure initial defaults -- @manual_mode = false -- @ip_address = nil -- @ip_prefix = nil -- @ip_gateway = nil -- @ip_dns = nil -- @state = UI_STATE_INVALID -- @ip_config = false -- @selected = false -- -- @network_button = ui.get_object('network_button') -- @device_list_frame = ui.get_object('device_list_frame') -- @ipv4_config_frame = ui.get_object('ipv4_config_frame') -- @dl_selection = ui.get_object('network_device_list_view'). -- selection -- @device_list = ui.get_object('network_device_list') -- @manual_ui = ui.get_object('ip_manual') -- @ip_address_ui = ui.get_object('ip_address') -- @ip_prefix_ui = ui.get_object('ip_prefix') -- @ip_gateway_ui = ui.get_object('ip_gateway') -- @ip_dns_ui = ui.get_object('ip_dns') -- -- ui.register_handler('network_button_clicked', -- method(:network_button_clicked)) -- ui.register_handler('ip_auto_toggled', -- method(:ip_auto_toggled)) -- ui.register_handler('ip_address_changed', -- method(:ip_address_changed)) -- ui.register_handler('ip_prefix_changed', -- method(:ip_prefix_changed)) -- ui.register_handler('ip_gateway_changed', -- method(:ip_gateway_changed)) -- ui.register_handler('ip_dns_changed', -- method(:ip_dns_changed)) -- -- check_config_valid() -- -- # The user may only select a single device -- @dl_selection.mode = Gtk::SELECTION_SINGLE -- -- @dl_selection.set_select_function { |selection, model, path, current| -- iter = model.get_iter(path) -- -- # This is a toggle event. The new state is the opposite of the -- # current state -- new_state = !current -- -- # Don't allow the user to select an unavailable device -- if new_state then -- # Notify the config UI if we're selecting a device -- if iter[DEVCOL_AVAILABLE] then -- event(EV_SELECTION, true) -- end -- -- iter[DEVCOL_AVAILABLE] -- -- # Always allow the user to unselect a device -- else -- # Notify the UI that we're unselecting the device -- event(EV_SELECTION, false) -- true -- end -- } -- -- # Store a map of device names to row references -- refs = {} -- -- # Populate the device list with all detected network devices -- VirtP2V::NetworkDevice.all_devices.each { |device| -- iter = @device_list.append() -- -- iter[DEVCOL_NAME] = device.name -- iter[DEVCOL_MAC] = device.mac -- iter[DEVCOL_STATUS] = device.state -- iter[DEVCOL_AVAILABLE] = device.connected -- -- # Store a stable reference to this row in the TreeModel -- refs[device.name] = -- Gtk::TreeRowReference.new(@device_list, iter.path) -- } -- -- # Listen for updates to device states -- VirtP2V::NetworkDevice.add_listener( lambda { |device| -- path = refs[device.name].path -- -- iter = @device_list.get_iter(path) -- iter[DEVCOL_STATUS] = device.state -- iter[DEVCOL_AVAILABLE] = device.connected -- -- # Notify the UI that a device was activated -- event(EV_ACTIVATION, device.activated) \ -- unless device.activated.nil? -- -- # Unselect the path if it was previously selected and is no -- # longer available -- if !device.connected && @dl_selection.iter_is_selected?(iter) -- then -- @dl_selection.unselect_all() -- event(EV_SELECTION, false) -- end -- } ) -- -- @ui = ui -- end -- -- def self.set_state(state) -- # Don't do anything if state hasn't changed -- return if state == @state -- -- case state -- when UI_STATE_INVALID -- @network_button.sensitive = false -- @device_list_frame.sensitive = true -- @ipv4_config_frame.sensitive = true -- -- @state = UI_STATE_INVALID -- when UI_STATE_VALID -- @network_button.sensitive = true -- @device_list_frame.sensitive = true -- @ipv4_config_frame.sensitive = true -- -- @state = UI_STATE_VALID -- when UI_STATE_ACTIVATING -- @network_button.sensitive = false -- @device_list_frame.sensitive = false -- @ipv4_config_frame.sensitive = false -- -- @state = UI_STATE_ACTIVATING -- when UI_STATE_COMPLETE -- # Activate the next page -- @ui.active_page = 'server_win' -- -- # ... then leave this one as we hope to find it if we come back here -- set_state(UI_STATE_VALID) -- else -- raise "Attempt to set unexected NetworkConfig UI state: #{@state}" -- end -- end -- -- def self.network_button_clicked -- event(EV_BUTTON, true) -- -- iter = @dl_selection.selected -- return if iter.nil? # Shouldn't be possible -- name = iter[DEVCOL_NAME] -- -- VirtP2V::NetworkDevice[name].activate(!@manual_mode, @ip_address, -- @ip_prefix, @ip_gateway, @ip_dns) -- end -- -- def self.ip_auto_toggled -- @manual_mode = !@manual_mode -- @manual_ui.sensitive = @manual_mode -- -- check_config_valid() -- end -- -- def self.ip_address_changed -- @ip_address = parse_ip(@ip_address_ui) -- -- check_config_valid() -- end -- -- # Check IP prefix is a positive integer -- # We check that it's appropriate to the address class in use elsewhere -- def self.ip_prefix_changed -- begin -- @ip_prefix = Integer(@ip_prefix_ui.text) -- rescue ArgumentError => e -- # Ignore the result if it didn't parse -- @ip_prefix = nil -- return -- end -- -- if @ip_prefix < 0 then -- @ip_prefix = nil -- end -- -- check_config_valid() -- end -- -- def self.ip_gateway_changed -- @ip_gateway = parse_ip(@ip_gateway_ui) -- -- check_config_valid() -- end -- -- # Parse an IP address understood by IPAddr -- def self.parse_ip(entry) -- a = entry.text.strip -- -- begin -- ip = IPAddr.new(a) -- rescue ArgumentError => e -- # Ignore the result if it didn't parse -- ip = nil -- end -- -- return ip -- end -- -- def self.ip_dns_changed -- dns = @ip_dns_ui.text -- -- @ip_dns = [] -- dns.split(/\s*,+\s*/).each { |entry| -- begin -- @ip_dns << IPAddr.new(entry) -- rescue ArgumentError => e -- @ip_dns = () -- break -- end -- } -- end -- -- def self.check_config_valid -- if !@manual_mode || (!@ip_address.nil? && -- !@ip_prefix.nil? && -- !@ip_gateway.nil?) then -- if @manual_mode then -- # Check that IPv4/IPv6 is used consistently -- if @ip_address.ipv4? then -- event(EV_IP_CONFIG, @ip_gateway.ipv4? && @ip_prefix < 32) -- else -- event(EV_IP_CONFIG, @ip_gateway.ipv6? && @ip_prefix < 128) -- end -- else -- event(EV_IP_CONFIG, true) -- end -- else -- event(EV_IP_CONFIG, false) -- end -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/p2v.ui virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/p2v.ui ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/p2v.ui 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/p2v.ui 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1031 +0,0 @@ -- -- -- -- -- -- False -- center-always -- False -- -- -- -- True -- 0 -- 0 -- -- -- 800 -- 600 -- True -- 0 -- 0 -- in -- -- -- True -- vertical -- 2 -- -- -- True -- -- -- True -- 0 -- 0 -- 5 -- 5 -- <span weight='bold' foreground='white' size='xx-large'>virt-p2v</span> -- True -- -- -- -- -- False -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 800 -- 550 -- -- -- True -- vertical -- -- -- True -- 0 -- 1 -- 11 -- Welcome to virt-p2v. -- -- -- False -- 0 -- -- -- -- -- True -- 0 -- out -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- network_device_list -- False -- 0 -- -- -- Device -- -- -- -- 3 -- 0 -- -- -- -- -- -- -- 18 -- MAC Address -- -- -- -- 3 -- 1 -- -- -- -- -- -- -- Status -- -- -- -- 3 -- 2 -- -- -- -- -- -- -- -- -- -- -- True -- <b>Select a network device</b> -- True -- -- -- -- -- 1 -- -- -- -- -- True -- 0 -- in -- -- -- True -- 12 -- -- -- True -- vertical -- -- -- Automatic configuration -- True -- True -- False -- True -- True -- -- -- -- 0 -- -- -- -- -- True -- False -- 3 -- 2 -- 2 -- -- -- True -- 0 -- IP Address: -- -- -- GTK_FILL -- GTK_FILL -- -- -- -- -- True -- 0 -- Gateway: -- -- -- 1 -- 2 -- GTK_FILL -- GTK_FILL -- -- -- -- -- True -- 0 -- DNS Servers: -- -- -- 2 -- 3 -- GTK_FILL -- GTK_FILL -- -- -- -- -- True -- True -- 39 -- 39 -- True -- -- -- -- 1 -- 2 -- 1 -- 2 -- GTK_FILL -- -- -- -- -- True -- True -- 35 -- -- -- -- 1 -- 2 -- 2 -- 3 -- GTK_FILL -- -- -- -- -- True -- 2 -- -- -- True -- True -- 39 -- 39 -- True -- -- -- -- 0 -- -- -- -- -- True -- 0 -- Prefix: -- -- -- False -- 1 -- -- -- -- -- True -- True -- 2 -- 2 -- True -- -- -- -- False -- 2 -- -- -- -- -- 1 -- 2 -- GTK_FILL -- -- -- -- -- 1 -- -- -- -- -- -- -- -- -- True -- <b>IP Configuration</b> -- True -- -- -- -- -- False -- 2 -- -- -- -- -- True -- 1 -- 0 -- -- -- Use these network settings -- True -- False -- True -- True -- -- -- -- -- -- False -- 3 -- -- -- -- -- -- -- -- -- True -- vertical -- -- -- True -- 0 -- 0 -- -- -- True -- 0 -- in -- -- -- True -- 12 -- -- -- True -- vertical -- -- -- True -- 3 -- 2 -- 2 -- -- -- True -- 0 -- Hostname: -- -- -- -- -- -- -- -- -- True -- 0 -- Username: -- -- -- 1 -- 2 -- -- -- -- -- -- -- True -- 0 -- Password: -- -- -- 2 -- 3 -- -- -- -- -- -- -- True -- True -- -- 40 -- -- -- -- 1 -- 2 -- -- -- -- -- -- True -- True -- False -- -- 40 -- -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- -- True -- True -- -- 40 -- root -- -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- -- False -- 0 -- -- -- -- -- True -- 0 -- 0 -- 8 -- 8 -- -- -- -- -- -- 1 -- -- -- -- -- -- -- -- -- True -- <b>Connect to conversion server</b> -- True -- -- -- -- -- -- -- 0 -- -- -- -- -- True -- 1 -- 0 -- 0 -- 0 -- -- -- Connect -- True -- False -- True -- True -- -- -- -- -- -- False -- 1 -- -- -- -- -- -- -- -- -- True -- vertical -- -- -- True -- -- -- True -- 0 -- out -- -- -- True -- 0 -- 0 -- 0 -- 0 -- 12 -- -- -- True -- 4 -- 2 -- 2 -- -- -- True -- 0 -- Destination Profile: -- -- -- -- -- True -- convert_profile_list -- -- -- -- -- 0 -- -- -- -- -- 1 -- 2 -- -- -- -- -- True -- 0 -- Memory (MB): -- -- -- 3 -- 4 -- -- -- -- -- True -- True -- -- True -- -- -- -- 1 -- 2 -- 3 -- 4 -- -- -- -- -- True -- 0 -- Number of CPUs: -- -- -- 2 -- 3 -- -- -- -- -- True -- 0 -- Name -- -- -- 1 -- 2 -- -- -- -- -- True -- True -- -- True -- -- -- -- 1 -- 2 -- 1 -- 2 -- -- -- -- -- True -- True -- -- True -- -- -- -- 1 -- 2 -- 2 -- 3 -- -- -- -- -- -- -- -- -- True -- <b>Target properties</b> -- True -- -- -- -- -- False -- False -- 0 -- -- -- -- -- True -- vertical -- -- -- True -- 0 -- out -- -- -- True -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- convert_fixed_list -- False -- 0 -- -- -- Convert -- True -- -- -- -- -- -- 0 -- -- -- -- -- -- -- Device -- -- -- -- 1 -- -- -- -- -- -- -- Transfer Progress -- True -- -- -- -- 2 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- <b>Fixed Storage</b> -- True -- -- -- -- -- 0 -- -- -- -- -- True -- 0 -- out -- -- -- True -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- convert_removable_list -- -- -- Convert -- -- -- -- -- -- 0 -- -- -- -- -- -- -- Device -- -- -- -- 1 -- -- -- -- -- -- -- Type -- -- -- -- 2 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- <b>Removable Media</b> -- True -- -- -- -- -- 1 -- -- -- -- -- True -- 0 -- out -- -- -- True -- 1 -- 1 -- -- -- True -- True -- automatic -- automatic -- -- -- True -- True -- convert_network_list -- False -- 0 -- -- -- Convert -- -- -- -- -- -- 0 -- -- -- -- -- -- -- Device -- -- -- -- 1 -- -- -- -- -- -- -- -- -- -- -- -- -- True -- <b>Network Interfaces</b> -- True -- -- -- -- -- 2 -- -- -- -- -- 1 -- -- -- -- -- 0 -- -- -- -- -- True -- -- -- True -- 0 -- 12 -- -- -- -- -- -- 0 -- -- -- -- -- Convert -- True -- True -- True -- -- -- -- False -- False -- 1 -- -- -- -- -- False -- False -- 1 -- -- -- -- -- -- -- -- -- True -- vertical -- -- -- True -- A guest has been successfully created on the target server. -- --Remove the temporary boot device from this machine and press 'Reboot' to continue. -- center -- -- -- 0 -- -- -- -- -- True -- 0.25 -- 0.25 -- -- -- Reboot -- True -- True -- True -- -- -- -- -- -- 1 -- -- -- -- -- -- -diff -ruN virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/success.rb virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/success.rb ---- virt-v2v-v0.8.1/p2v-client/lib/virt-p2v/ui/success.rb 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/lib/virt-p2v/ui/success.rb 1970-01-01 01:00:00.000000000 +0100 -@@ -1,33 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'gettext' -- --module VirtP2V::UI::Success -- include GetText -- -- def self.init(ui) -- ui.register_handler('reboot_button_clicked', -- method(:reboot_button_clicked)) -- -- @ui = ui -- end -- -- def self.reboot_button_clicked -- @ui.quit -- end -- --end # module -diff -ruN virt-v2v-v0.8.1/p2v-client/Manifest virt-v2v-v0.8.1.new/p2v-client/Manifest ---- virt-v2v-v0.8.1/p2v-client/Manifest 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/Manifest 1970-01-01 01:00:00.000000000 +0100 -@@ -1,15 +0,0 @@ --Rakefile --bin/virt-p2v --lib/virt-p2v/blockdevice.rb --lib/virt-p2v/connection.rb --lib/virt-p2v/converter.rb --lib/virt-p2v/gtk-queue.rb --lib/virt-p2v/netdevice.rb --lib/virt-p2v/ui/connect.rb --lib/virt-p2v/ui/convert.rb --lib/virt-p2v/ui/main.rb --lib/virt-p2v/ui/network.rb --lib/virt-p2v/ui/p2v.ui --lib/virt-p2v/ui/success.rb --virt-p2v.gemspec --Manifest -diff -ruN virt-v2v-v0.8.1/p2v-client/Rakefile virt-v2v-v0.8.1.new/p2v-client/Rakefile ---- virt-v2v-v0.8.1/p2v-client/Rakefile 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-client/Rakefile 1970-01-01 01:00:00.000000000 +0100 -@@ -1,37 +0,0 @@ --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --require 'rubygems' --require 'echoe' -- --Echoe.new("virt-p2v") do |p| -- p.project = "Virt P2V" -- p.version = `../Build version` -- p.author = "Matthew Booth" -- p.summary = "Send a machine's storage and metadata to virt-p2v-server" -- p.description = <= 1.2") if s.respond_to? :required_rubygems_version= -- s.authors = ["Matthew Booth"] -- s.date = %q{2011-04-15} -- s.default_executable = %q{virt-p2v} -- s.description = %q{virt-p2v is a client which connects to a virt-p2v-server and transfer's the host --machine's storage and metadata. virt-p2v is intended to be run from a live --image, so it is unlikely you want to install it. --} -- s.email = %q{libguestfs@redhat.com} -- s.executables = ["virt-p2v"] -- s.extra_rdoc_files = ["COPYING", "bin/virt-p2v", "lib/virt-p2v/blockdevice.rb", "lib/virt-p2v/connection.rb", "lib/virt-p2v/converter.rb", "lib/virt-p2v/gtk-queue.rb", "lib/virt-p2v/netdevice.rb", "lib/virt-p2v/ui/connect.rb", "lib/virt-p2v/ui/convert.rb", "lib/virt-p2v/ui/main.rb", "lib/virt-p2v/ui/network.rb", "lib/virt-p2v/ui/p2v.ui", "lib/virt-p2v/ui/success.rb"] -- s.files = ["COPYING", "Rakefile", "bin/virt-p2v", "lib/virt-p2v/blockdevice.rb", "lib/virt-p2v/connection.rb", "lib/virt-p2v/converter.rb", "lib/virt-p2v/gtk-queue.rb", "lib/virt-p2v/netdevice.rb", "lib/virt-p2v/ui/connect.rb", "lib/virt-p2v/ui/convert.rb", "lib/virt-p2v/ui/main.rb", "lib/virt-p2v/ui/network.rb", "lib/virt-p2v/ui/p2v.ui", "lib/virt-p2v/ui/success.rb", "virt-p2v.gemspec", "Manifest"] -- s.homepage = %q{http://libguestfs.org} -- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Virt-p2v"] -- s.require_paths = ["lib"] -- s.rubyforge_project = %q{Virt P2V} -- s.rubygems_version = %q{1.3.7} -- s.summary = %q{Send a machine's storage and metadata to virt-p2v-server} -- -- if s.respond_to? :specification_version then -- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION -- s.specification_version = 3 -- -- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then -- s.add_runtime_dependency(%q, [">= 0"]) -- s.add_runtime_dependency(%q, [">= 0"]) -- s.add_runtime_dependency(%q, [">= 0"]) -- else -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- end -- else -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- s.add_dependency(%q, [">= 0"]) -- end --end -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-install.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-install.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-install.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-install.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,54 +0,0 @@ --lang C --keyboard us --timezone --utc UTC --auth --useshadow --enablemd5 --selinux --disabled --firewall --disabled --# TODO: the sizing of the image needs to be more dynamic --part / --size 1024 --fstype ext2 --services --enabled=NetworkManager --disabled=auditd --bootloader --timeout=30 --rootpw --iscrypted $1$tQiZwocX$ghhurQEm56p/HqgN.XEtk1 -- --# add missing scsi modules to initramfs --device 3w-9xxx --device 3w-sas --device 3w-xxxx --device a100u2w --device aacraid --device aic79xx --device aic94xx --device arcmsr --device atp870u --device be2iscsi --device bfa --device BusLogic --device cxgb3i --device dc395x --device fnic --device gdth --device hpsa --device hptiop --device imm --device initio --device ips --device libosd --device libsas --device libsrp --device lpfc --device megaraid --device megaraid_mbox --device megaraid_mm --device megaraid_sas --device mpt2sas --device mvsas --device osd --device osst --device pm8001 --device pmcraid --device qla1280 --device qla2xxx --device qla4xxx --device qlogicfas408 --device stex --device tmscsim -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-manifest-post.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-manifest-post.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-manifest-post.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-manifest-post.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,36 +0,0 @@ --%post --echo -n "Creating manifest" --# Create post-image processing manifests --rpm -qa --qf '%{name}-%{version}-%{release}.%{arch} (%{SIGGPG:pgpsig})\n' | \ -- sort > /manifest-rpm.txt --rpm -qa --qf '%{sourcerpm}\n' | sort -u > /manifest-srpm.txt --# collect all included licenses rhbz#601927 --rpm -qa --qf '%{license}\n' | sort -u > /manifest-license.txt --# dependencies --rpm -qa | xargs -n1 rpm -e --test 2> /manifest-deps.txt --echo -n "." --find / -xdev -print -exec rpm -qf {} \; > /manifest-owns.txt --rpm -qa --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | \ -- sort > /rpm-qa.txt --echo -n "." -- --du -akx --exclude=/var/cache/yum / > /manifest-file.txt --du -x --exclude=/var/cache/yum / > /manifest-dir.txt --echo -n "." --bzip2 /manifest-deps.txt /manifest-owns.txt /manifest-file.txt /manifest-dir.txt --echo -n "." -- --%end -- --%post --nochroot --# Move manifests to ISO --mv $INSTALL_ROOT/manifest-* $LIVE_ROOT/isolinux --echo "done" -- --# only works on x86, x86_64 --if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then -- if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi -- cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS -- cp /usr/bin/livecd-iso-to-pxeboot $LIVE_ROOT/LiveOS --fi --%end -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-minimizer.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-minimizer.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-minimizer.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-minimizer.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,239 +0,0 @@ --# This file is only relatively lightly modified from the version copied from --# oVirt, and certainly contains much which is irrelevant to this image. I have, --# however, removed some obviously extraneous entries and added a few additional --# entries. --# --# Matthew Booth - 18/4/2011 -- --%post --nochroot --interpreter image-minimizer --# lokkit is just an install-time dependency; we can remove --# it afterwards, which we do here --droprpm system-config-* --droprpm libsemanage-python --droprpm python-libs --droprpm python -- --droprpm mkinitrd --droprpm isomd5sum --droprpm dmraid --droprpm checkpolicy --droprpm make --droprpm policycoreutils-python --droprpm setools-libs-python --droprpm setools-libs -- --droprpm gamin --droprpm pm-utils --droprpm kbd --droprpm usermode --droprpm vbetool --droprpm ConsoleKit --droprpm hdparm --droprpm efibootmgr --droprpm linux-atm-libs --droprpm mtools --droprpm syslinux --droprpm wireless-tools --droprpm radeontool --droprpm libicu --droprpm gnupg2 --droprpm fedora-release-notes --droprpm fedora-logos -- --# cronie pulls in exim (sendmail) which pulls in all kinds of perl deps --droprpm exim --droprpm perl* --droprpm postfix --droprpm mysql* -- --droprpm sysklogd -- --# unneeded rhn deps --droprpm yum* -- --# pam complains when this is missing --keeprpm ConsoleKit-libs -- --# kernel modules minimization -- --# filesystems --drop /lib/modules/*/kernel/fs --keep /lib/modules/*/kernel/fs/ext* --keep /lib/modules/*/kernel/fs/jbd* --keep /lib/modules/*/kernel/fs/btrfs --keep /lib/modules/*/kernel/fs/fat --keep /lib/modules/*/kernel/fs/nfs --keep /lib/modules/*/kernel/fs/nfs_common --keep /lib/modules/*/kernel/fs/fscache --keep /lib/modules/*/kernel/fs/lockd --keep /lib/modules/*/kernel/fs/nls/nls_utf8.ko --# autofs4 configfs exportfs *fat *jbd mbcache.ko nls xfs --#*btrfs cramfs *ext2 *fscache *jbd2 *nfs squashfs --# cachefiles dlm *ext3 fuse jffs2 *nfs_common ubifs --# cifs ecryptfs *ext4 gfs2 *lockd nfsd udf -- --# network --drop /lib/modules/*/kernel/net --keep /lib/modules/*/kernel/net/802* --keep /lib/modules/*/kernel/net/bridge --keep /lib/modules/*/kernel/net/core --keep /lib/modules/*/kernel/net/ipv* --keep /lib/modules/*/kernel/net/key --keep /lib/modules/*/kernel/net/llc --keep /lib/modules/*/kernel/net/netfilter --keep /lib/modules/*/kernel/net/rds --keep /lib/modules/*/kernel/net/sctp --keep /lib/modules/*/kernel/net/sunrpc --#*802 atm can ieee802154 *key *netfilter rfkill *sunrpc xfrm --#*8021q bluetooth *core *ipv4 *llc phonet sched wimax --# 9p *bridge dccp *ipv6 mac80211 *rds *sctp wireless -- --drop /lib/modules/*/kernel/sound -- --# drivers --drop /lib/modules/*/kernel/drivers --keep /lib/modules/*/kernel/drivers/ata --keep /lib/modules/*/kernel/drivers/block --keep /lib/modules/*/kernel/drivers/cdrom --keep /lib/modules/*/kernel/drivers/char --keep /lib/modules/*/kernel/drivers/cpufreq --keep /lib/modules/*/kernel/drivers/dca --keep /lib/modules/*/kernel/drivers/dma --keep /lib/modules/*/kernel/drivers/edac --keep /lib/modules/*/kernel/drivers/firmware --keep /lib/modules/*/kernel/drivers/idle --keep /lib/modules/*/kernel/drivers/infiniband --keep /lib/modules/*/kernel/drivers/md --keep /lib/modules/*/kernel/drivers/message --keep /lib/modules/*/kernel/drivers/net --drop /lib/modules/*/kernel/drivers/net/pcmcia --drop /lib/modules/*/kernel/drivers/net/wireless --drop /lib/modules/*/kernel/drivers/net/ppp* --keep /lib/modules/*/kernel/drivers/pci --keep /lib/modules/*/kernel/drivers/scsi --keep /lib/modules/*/kernel/drivers/staging/ramzswap --keep /lib/modules/*/kernel/drivers/uio --keep /lib/modules/*/kernel/drivers/usb --drop /lib/modules/*/kernel/drivers/usb/atm --drop /lib/modules/*/kernel/drivers/usb/class --drop /lib/modules/*/kernel/drivers/usb/image --drop /lib/modules/*/kernel/drivers/usb/misc --drop /lib/modules/*/kernel/drivers/usb/serial --keep /lib/modules/*/kernel/drivers/vhost --keep /lib/modules/*/kernel/drivers/virtio -- --# acpi *cpufreq hid leds mtd ?regulator uwb --#*ata crypto ?hwmon *md *net* rtc *vhost --# atm *dca ?i2c media ?parport *scsi* video --# auxdisplay *dma *idle memstick *pci ?serial *virtio --#*block *edac ieee802154 *message pcmcia ?ssb watchdog --# bluetooth firewire *infiniband ?mfd platform *staging xen --#*cdrom *firmware input misc ?power ?uio --#*char* ?gpu isdn mmc ?pps *usb -- --drop /usr/share/zoneinfo --keep /usr/share/zoneinfo/UTC -- --drop /etc/alsa --drop /usr/share/alsa --drop /usr/share/awk --drop /usr/share/vim --drop /usr/share/anaconda --drop /usr/share/backgrounds --drop /usr/share/wallpapers --drop /usr/share/kde-settings --drop /usr/share/gnome-background-properties --drop /usr/share/dracut --drop /usr/share/plymouth --drop /usr/share/setuptool --drop /usr/share/hwdata/MonitorsDB --drop /usr/share/hwdata/oui.txt --drop /usr/share/hwdata/videoaliases --drop /usr/share/hwdata/videodrivers --drop /usr/share/firstboot --drop /usr/share/lua --drop /usr/share/kde4 --drop /usr/share/pixmaps --drop /usr/share/icons --drop /usr/share/fedora-release --drop /usr/share/tabset -- --drop /usr/share/tc --drop /usr/share/emacs --drop /usr/share/info --drop /usr/src --drop /usr/etc --drop /usr/games --drop /usr/include --drop /usr/local --drop /usr/sbin/dell* --keep /usr/sbin/build-locale-archive --drop /usr/sbin/glibc_post_upgrade.* --drop /usr/lib*/tc --drop /usr/lib*/tls --drop /usr/lib*/sse2 --drop /usr/lib*/pkgconfig --drop /usr/lib*/nss --drop /usr/lib*/games --drop /usr/lib*/alsa-lib --drop /usr/lib*/krb5 --drop /usr/lib*/hal --drop /usr/lib*/gio -- --# syslinux --drop /usr/share/syslinux --# glibc-common locales --drop /usr/lib/locale --keep /usr/lib/locale/usr/share/locale/en_US --# openssh --drop /usr/bin/sftp --drop /usr/bin/slogin --drop /usr/bin/ssh-add --drop /usr/bin/ssh-agent --drop /usr/bin/ssh-keyscan --# docs --drop /usr/share/omf --drop /usr/share/gnome --drop /usr/share/doc --keep /usr/share/doc/*-firmware-* --drop /usr/share/locale/ --keep /usr/share/locale/en_US --drop /usr/share/man --drop /usr/share/i18n --drop /boot/* --drop /var/lib/builder -- --drop /usr/lib*/libboost* --keep /usr/lib*/libboost_program_options.so* --keep /usr/lib*/libboost_filesystem.so* --keep /usr/lib*/libboost_thread-mt.so* --keep /usr/lib*/libboost_system.so* --drop /usr/kerberos --keep /usr/kerberos/bin/kinit --keep /usr/kerberos/bin/klist --drop /lib/firmware --keep /lib/firmware/3com --keep /lib/firmware/acenic --keep /lib/firmware/adaptec --keep /lib/firmware/advansys --keep /lib/firmware/bnx2 --keep /lib/firmware/cxgb3 --keep /lib/firmware/e100 --keep /lib/firmware/myricom --keep /lib/firmware/ql* --keep /lib/firmware/sun --keep /lib/firmware/tehuti --keep /lib/firmware/tigon --drop /lib/kbd/consolefonts --drop /etc/pki/tls --drop /etc/pki/java --drop /etc/pki/nssdb --drop /etc/pki/rpm-gpg --%end -- --%post --echo "Removing python source files" --find / -name '*.py' -exec rm -f {} \; --find / -name '*.pyo' -exec rm -f {} \; -- --%end -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-pkgs.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-pkgs.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-pkgs.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-pkgs.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,48 +0,0 @@ --# Direct requirements --rubygem-virt-p2v --bitstream-vera-sans-fonts --xorg-x11-xinit --xorg-x11-drivers --xorg-x11-server-Xorg -- --# Boot requirements --device-mapper -- --# Required for livecd creation --passwd --rpm --/usr/sbin/lokkit -- --# Remove unnecessary packages ---audit-libs-python ---ustr ---authconfig ---wireless-tools ---setserial ---prelink ---newt-python ---newt ---libselinux-python ---kbd ---usermode ---fedora-release ---fedora-release-notes ---dmraid ---gzip ---less ---which ---parted ---tar ---libuser ---mtools ---cpio ---yum ---numactl # Pulls in perl dependency ---perl -- --# qlogic firmware --ql2100-firmware --ql2200-firmware --ql23xx-firmware --ql2400-firmware --ql2500-firmware -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-post.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-post.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-post.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-post.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,43 +0,0 @@ --# -*-Shell-script-*- --echo "Starting Kickstart Post" --PATH=/sbin:/usr/sbin:/bin:/usr/bin --export PATH -- --# cleanup rpmdb to allow non-matching host and chroot RPM versions --rm -f /var/lib/rpm/__db* -- --echo "Creating shadow files" --# because we aren't installing authconfig, we aren't setting up shadow --# and gshadow properly. Do it by hand here --pwconv --grpconv -- --echo "Forcing C locale" --# force logins (via ssh, etc) to use C locale, since we remove locales --cat >> /etc/profile << \EOF --# force our locale to C since we don't have locale stuff' --export LC_ALL=C LANG=C --EOF -- --# remove errors from /sbin/dhclient-script --DHSCRIPT=/sbin/dhclient-script --sed -i 's/mv /cp -p /g' $DHSCRIPT --sed -i '/rm -f.*${interface}/d' $DHSCRIPT --sed -i '/rm -f \/etc\/localtime/d' $DHSCRIPT --sed -i '/rm -f \/etc\/ntp.conf/d' $DHSCRIPT --sed -i '/rm -f \/etc\/yp.conf/d' $DHSCRIPT -- --# Lock root account --#passwd -l root -- --#strip out all unncesssary locales --localedef --list-archive | grep -v -i -E 'en_US.utf8' |xargs localedef --delete-from-archive --mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl --/usr/sbin/build-locale-archive -- --# Run virt-p2v --cat >> /etc/rc.local < /root/virt-p2v.log 2>&1 --poweroff --EOF -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/common-post-nochroot.ks virt-v2v-v0.8.1.new/p2v-image-builder/common-post-nochroot.ks ---- virt-v2v-v0.8.1/p2v-image-builder/common-post-nochroot.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/common-post-nochroot.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,60 +0,0 @@ --%include version.ks -- --PRODUCT='Virt P2V' --PRODUCT_SHORT='virt-p2v' --PACKAGE='virt-p2v' --RELEASE=${RELEASE:-devel.`date +%Y%m%d%H%M%S`} -- --echo "Customizing boot menu" --sed -i -e ' --# Put product information at the top of the file --1 { -- i '"say $PRODUCT $VERSION ($RELEASE)"' -- i '"menu title $PRODUCT_SHORT $VERSION ($RELEASE)"' --} -- --# Remove any existing menu title --/^menu title .*/d -- --# Remove quiet bootparam --#s/ quiet// -- --# Disable selinux entirely. Required, as we dont install an SELinux policy. --/^\s*append\s/ s/\s*$/ selinux=0/ -- --# Remove Verify and Boot option --/label check0/{N;N;N;d;} -- --# Set the default timeout to 15 seconds --s/^timeout .*/timeout 15/ --' $LIVE_ROOT/isolinux/isolinux.cfg -- --# TODO: Replace the splash screen with something P2V appropriate --#cp $INSTALL_ROOT//syslinux-vesa-splash.jpg $LIVE_ROOT/isolinux/splash.jpg -- --# store image version info in the ISO --cat > $LIVE_ROOT/isolinux/version < $INSTALL_ROOT/etc/$PACKAGE-release <> $INSTALL_ROOT/etc/issue --cp $INSTALL_ROOT/etc/issue $INSTALL_ROOT/etc/issue.net -- --# replace initramfs if regenerated --if [ -f "$INSTALL_ROOT/initrd0.img" ]; then -- mv -v "$INSTALL_ROOT/initrd0.img" "$LIVE_ROOT/isolinux/initrd0.img" --fi -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/Makefile virt-v2v-v0.8.1.new/p2v-image-builder/Makefile ---- virt-v2v-v0.8.1/p2v-image-builder/Makefile 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/Makefile 1970-01-01 01:00:00.000000000 +0100 -@@ -1,2 +0,0 @@ --version.ks: ../Build -- echo VERSION=`../Build version` > version.ks -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/version.ks virt-v2v-v0.8.1.new/p2v-image-builder/version.ks ---- virt-v2v-v0.8.1/p2v-image-builder/version.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/version.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1 +0,0 @@ --VERSION=0.8.1 -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image-builder virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image-builder ---- virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image-builder 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image-builder 1970-01-01 01:00:00.000000000 +0100 -@@ -1,188 +0,0 @@ --#!/bin/bash -- --# Copyright (C) 2010-2011, Red Hat, Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; version 2 of the License. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, --# MA 02110-1301, USA. A copy of the GNU General Public License is --# also available at http://www.gnu.org/copyleft/gpl.html. -- --# Requires: sudo livecd-creator, sudo setenforce, ksflatten -- --# Based on oVirt's node-creator -- --# Current fedora data --cur_rawhide=16 --cur_devel=15 -- --me=$(basename "$0") --warn() { printf '%s: %s\n' "$me" "$*" >&2; } --die() { warn "$*"; exit 1; } --usage() { --cat < -- --Build a virt-p2v bootable image. -- --OPTIONS: -- -a Additional yum repository. Can be specified multiple times. -- -c Yum cache directory. -- -d Directory containing virt-p2v-image.ks. -- -f Specific Fedora mirror to use if building a Fedora image. -- -l Boot image label. -- -r Primary yum repository. -- -u Updates yum repository. -- -h Show this message. --EOF --} -- --onlyonce() { -- warn "-$1 may only be specified once" -- usage -- exit 1 --} -- --while getopts "a:d:f:hl:r:u:w:" OPTION --do -- case $OPTION in -- a) -- n_elems=${#extra_repos[*]} -- extra_repos[$n_elems]="$OPTARG" -- ;; -- c) -- [ -n "$cachedir" ] && onlyonce $OPTION -- cachedir="$OPTARG" -- ;; -- d) -- [ -n "$datadir" ] && onlyonce $OPTION -- datadir="$OPTARG" -- ;; -- f) -- [ -n "$fedora_url" ] && onlyonce $OPTION -- fedora_url="$OPTARG" -- ;; -- l) -- [ -n "$label" ] && onlyonce $OPTION -- label="$OPTARG" -- ;; -- r) -- [ -n "$repo" ] && onlyonce $OPTION -- repo="$OPTARG" -- ;; -- u) -- [ -n "$updates" ] && onlyonce $OPTION -- updates="$OPTARG" -- ;; -- h) -- usage -- exit 0 -- ;; -- ?) -- usage -- exit 1 -- ;; -- esac --done -- --# Split out here for simple editing with sed during installation --DEFAULT_DATADIR=. -- --# Option defaults --datadir="${datadir:-$DEFAULT_DATADIR}" --cachedir="${cachedir:-/var/tmp/p2v-image-builder.$USER}" --label="${label:-Virt-P2V}" -- --arch=$(rpm --eval '%{_arch}') --kstmp=$(mktemp --tmpdir p2v-image-builder.XXXXXXXX) -- --if pgrep -xl nscd; then -- die "Please stop nscd first" --fi -- --rm -f "$kstmp" --# combine recipe includes --ksflatten --config "$datadir/virt-p2v-image.ks" --output "$kstmp" --# XXX broken ksflatten leaves %include --sed -i 's/^%include /#&/' "$kstmp" -- --if [ -z "$repo" ]; then -- # Set defaults for Fedora if this is a fedora system -- fedora=$(rpm --eval '%{fedora}' |grep [0-9]) -- -- mirrorlist="http://mirrors.fedoraproject.org/mirrorlist" -- -- case "$fedora" in -- $curr_rawhide) -- if [ -z "$fedora_url" ]; then -- repo="--mirrorlist=$mirrorlist?repo=rawhide&arch=$arch" -- else -- repo="--baseurl=$fedora_url/development/rawhide/$arch/os" -- fi -- ;; -- $cur_devel) -- if [ -z "$fedora_url" ]; then -- repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -- else -- repo="--baseurl=$fedora_url/development/$fedora/$arch/os" -- fi -- ;; -- ?*) -- if [ -z "$fedora_url" ]; then -- repo="--mirrorlist=$mirrorlist?repo=fedora-$fedora&arch=$arch" -- updates="--mirrorlist=$mirrorlist?repo=updates-released-f${fedora}&arch=$arch" -- else -- repo="--baseurl=$fedora_url/releases/$fedora/Everything/$arch/os" -- updates="--baseurl=$fedora_url/updates/$fedora/$arch" -- fi -- esac --else -- repo="--baseurl=$repo" -- [ -n "$updates" ] && updates="--baseurl=$updates" --fi -- --if [ -n "$repo" ]; then -- echo "repo --name=base $repo" >> "$kstmp" --else -- die "No repository specified, and no default available." --fi --if [ -n "$updates" ]; then -- echo "repo --name=updates $updates" >> "$kstmp" --fi --i=0 --for extra in "${extra_repos[@]}"; do -- ((i++)) -- [ -d "$extra" ] && extra="file://$extra" -- echo "repo --name=extra$i --baseurl=$extra" >> "$kstmp" --done -- --selinux_enforcing=$(/usr/sbin/getenforce) --case "$selinux_enforcing" in -- Enforcing) sudo /usr/sbin/setenforce Permissive ;; -- Permissive) ;; -- *) if grep -q '^selinux --disabled' "$kstmp"; -- then -- warn "WARNING: SELinux disabled in kickstart" -- else -- die "ERROR: SELinux enabled in kickstart, \ -- but disabled on the build machine" -- fi ;; --esac -- --mkdir -p $cachedir --sudo livecd-creator -c "$kstmp" -f "$label" --cache="$cachedir" -- --# Clean up --rm -f $kstmp --if [ "$selinux_enforcing" = Enforcing ]; then -- sudo /usr/sbin/setenforce Enforcing --fi -diff -ruN virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image.ks virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image.ks ---- virt-v2v-v0.8.1/p2v-image-builder/virt-p2v-image.ks 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-image-builder/virt-p2v-image.ks 1970-01-01 01:00:00.000000000 +0100 -@@ -1,19 +0,0 @@ --# virt-p2v Node image recipe -- --%include common-install.ks -- --%packages --excludedocs --nobase --%include common-pkgs.ks --%end -- --%post --%include common-post.ks --%end -- --%include common-minimizer.ks -- --%post --nochroot --%include common-post-nochroot.ks --%end -- --%include common-manifest-post.ks -diff -ruN virt-v2v-v0.8.1/p2v-server/run-p2v-locally virt-v2v-v0.8.1.new/p2v-server/run-p2v-locally ---- virt-v2v-v0.8.1/p2v-server/run-p2v-locally 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-server/run-p2v-locally 1970-01-01 01:00:00.000000000 +0100 -@@ -1,52 +0,0 @@ --#!/bin/sh --# virt-p2v --# Copyright (C) 2010 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --# This script sets up the environment so you can run virt-v2v in place --# without needing to do 'make install' first. --# --# Use it like this: --# ./run-p2v-locally --# --# It requires the environment variable VIRTV2V_ROOT to be set. If using --# libguestfs from source, LIBGUESTFS_ROOT must also be set. -- --if [ -z "$VIRTV2V_ROOT" ]; then -- echo "VIRTV2V_ROOT must be set" -- exit 1 --fi -- --if [ -z "$PERL5LIB" ]; then -- PERL5LIB="$VIRTV2V_ROOT/blib/lib" --else -- PERL5LIB="$VIRTV2V_ROOT/blib/lib:$PERL5LIB" --fi -- --if [ ! -z "$LIBGUESTFS_ROOT" ]; then -- if [ -z "$LD_LIBRARY_PATH" ]; then -- LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs" -- else -- LD_LIBRARY_PATH="$LIBGUESTFS_ROOT/src/.libs:$LD_LIBRARY_PATH" -- fi -- -- LIBGUESTFS_PATH="$LIBGUESTFS_ROOT/appliance" -- PERL5LIB="$LIBGUESTFS_ROOT/perl/blib/lib:$LIBGUESTFS_ROOT/perl/blib/arch:$PERL5LIB" --fi -- --export PERL5LIB LD_LIBRARY_PATH LIBGUESTFS_PATH -- --exec perl "$VIRTV2V_ROOT/p2v-server/virt-p2v-server.pl" "$@" -diff -ruN virt-v2v-v0.8.1/p2v-server/virt-p2v-server.pl virt-v2v-v0.8.1.new/p2v-server/virt-p2v-server.pl ---- virt-v2v-v0.8.1/p2v-server/virt-p2v-server.pl 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/p2v-server/virt-p2v-server.pl 1970-01-01 01:00:00.000000000 +0100 -@@ -1,505 +0,0 @@ --#!/usr/bin/perl --# virt-p2v-server --# Copyright (C) 2011 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --use warnings; --use strict; -- --use IO::Handle; --use YAML::Any; -- --use Locale::TextDomain 'virt-v2v'; -- --use Sys::Guestfs; -- --use Sys::VirtConvert; --use Sys::VirtConvert::Config; --use Sys::VirtConvert::Converter; --use Sys::VirtConvert::Connection::LibVirtTarget; --use Sys::VirtConvert::Connection::RHEVTarget; --use Sys::VirtConvert::GuestfsHandle; --use Sys::VirtConvert::Util qw(:DEFAULT logmsg_init logmsg_level); -- --=encoding utf8 -- --=head1 NAME -- --virt-p2v-server - Receive data from virt-p2v -- --=head1 DESCRIPTION -- --virt-p2v-server is invoked over SSH by virt-p2v. It is not intended to be run --manually. -- --=cut -- --# SIGPIPE will cause an untidy exit of the perl process, without calling --# destructors. We don't rely on it anywhere, as we check for errors when reading --# from or writing to a pipe. --$SIG{'PIPE'} = 'IGNORE'; -- --# The protocol version we support --use constant VERSION => 0; -- --# Message types --use constant MSG_VERSION => 'VERSION'; --use constant MSG_LANG => 'LANG'; --use constant MSG_METADATA => 'METADATA'; --use constant MSG_PATH => 'PATH'; --use constant MSG_CONVERT => 'CONVERT'; --use constant MSG_LIST_PROFILES => 'LIST_PROFILES'; --use constant MSG_SET_PROFILE => 'SET_PROFILE'; --use constant MSG_CONTAINER => 'CONTAINER'; --use constant MSG_DATA => 'DATA'; -- --# Container types --use constant CONT_RAW => 'RAW'; -- --# Global state --my $config; --my $meta; --my $target; -- --# Initialize logging --logmsg_init('syslog'); --#logmsg_level(DEBUG); -- --logmsg NOTICE, __x("{program} started.", program => 'p2v-server'); -- --# Wrap everything in a big eval to catch any die(). N.B. $SIG{__DIE__} is no --# good for this, as it catches every die(), even those inside an eval --eval { -- # Set the umask to a reasonable default -- umask(0022); -- -- # Don't buffer output -- # While perl will use line buffering when STDOUT is connected to a tty, when -- # not connected to a tty, for example when invoked directly over ssh, it -- # will use a regular, large output buffer. This results in messages being -- # held in the buffer indefinitely. -- STDOUT->autoflush(1); -- -- # Read the config file -- eval { -- $config = Sys::VirtConvert::Config->new('/etc/virt-v2v.conf'); -- }; -- v2vdie $@ if $@; -- -- my $msg; -- while ($msg = p2v_receive()) { -- my $type = $msg->{type}; -- -- # VERSION n -- if ($type eq MSG_VERSION) { -- my $version = $msg->{args}[0]; -- if ($version <= VERSION) { -- p2v_return_ok(); -- } -- -- else { -- err_and_die(__x('This version of virt-p2v-server does not '. -- 'support protocol version {version}.', -- version => $version)); -- } -- } -- -- # LANG lang -- elsif ($type eq MSG_LANG) { -- $ENV{LANG} = $msg->{args}[0]; -- p2v_return_ok(); -- } -- -- # METADATA length -- # length bytes of YAML -- elsif ($type eq MSG_METADATA) { -- my $yaml = p2v_read($msg->{args}[0]); -- eval { $meta = Load($yaml); }; -- err_and_die('Error parsing metadata: '.$@) if $@; -- -- p2v_return_ok(); -- } -- -- # PATH length path -- # N.B. path could theoretically include spaces -- elsif ($type eq MSG_PATH) { -- my $length = $msg->{args}[0]; -- -- my $path = join(' ', @{$msg->{args}}[1..$#{$msg->{args}}]); -- receive_path($path, $length); -- } -- -- # CONVERT -- elsif ($type eq MSG_CONVERT) { -- convert(); -- } -- -- # LIST_PROFILES -- elsif ($type eq MSG_LIST_PROFILES) { -- p2v_return_list($config->list_profiles()); -- } -- -- # SET_PROFILE profile -- elsif ($type eq MSG_SET_PROFILE) { -- set_profile($msg->{args}[0]); -- } -- -- else { -- unexpected_msg($type); -- } -- } --}; --logmsg FATAL, $@ if $@; -- --exit(0); -- --# Receive an image file --sub receive_path --{ -- my ($path, $length) = @_; -- -- err_and_die('PATH without prior SET_PROFILE command') -- unless defined($target); -- err_and_die('PATH without prior METADATA command') -- unless defined($meta); -- -- my ($disk) = grep { $_->{path} eq $path } @{$meta->{disks}}; -- err_and_die("$path not found in metadata") unless defined($disk); -- -- # Construct a volume name based on the path and hostname -- my $name = $meta->{name}.'-'.$disk->{device}; -- $name =~ s,/,_,g; # e.g. cciss devices have a directory structure -- -- my $sopts = $config->get_storage_opts(); -- -- my $convert = 0; -- my $format; -- my $sparse; -- -- # Default to raw. Conversion required for anything else. -- if (!exists($sopts->{format}) || $sopts->{format} eq 'raw') { -- $format = 'raw'; -- } else { -- $format = $sopts->{format}; -- $convert = 1; -- } -- -- # Default to non-sparse -- my $allocation = $sopts->{allocation}; -- if (!defined($allocation) || $allocation eq 'preallocated') { -- $sparse = 0; -- } elsif ($allocation eq 'sparse') { -- $sparse = 1; -- } else { -- err_and_die(__x('Invalid allocation policy {policy} in profile.', -- policy => $allocation)); -- } -- -- # Create the target volume -- my $vol; -- eval { -- $vol = $target->create_volume( -- $name, -- $format, -- $length, -- $sparse -- ); -- }; -- err_and_die($@) if $@; -- p2v_return_ok(); -- -- # Receive an initial container -- my $msg = p2v_receive(); -- unexpected_msg($msg->{type}) unless $msg->{type} eq MSG_CONTAINER; -- -- # We only support RAW container -- my $ctype = $msg->{args}[0]; -- err_and_die("Received unknown container type: $ctype") -- unless $ctype eq CONT_RAW; -- p2v_return_ok(); -- -- # Update the disk entry with the new volume details -- $disk->{local_path} = $vol->get_local_path(); -- $disk->{path} = $vol->get_path(); -- $disk->{is_block} = $vol->is_block(); -- -- my $writer = $vol->get_write_stream($convert); -- -- # Receive volume data in chunks -- my $received = 0; -- while ($received < $length) { -- my $data = p2v_receive(); -- -- unexpected_msg($data->command) unless $data->{type} eq MSG_DATA; -- -- # Read the data message in chunks of up to 4M -- my $remaining = $data->{args}[0]; -- while ($remaining > 0) { -- my $chunk = $remaining > 4*1024*1024 ? 4*1024*1024 : $remaining; -- my $buf = p2v_read($chunk); -- -- $received += $chunk; -- $remaining -= $chunk; -- -- eval { $writer->write($buf); }; -- err_and_die($@) if $@; -- } -- -- p2v_return_ok(); -- } --} -- --# Use the specified profile --sub set_profile --{ -- my ($profile) = @_; -- -- # Check the profile is in our list -- my $found = 0; -- for my $i ($config->list_profiles()) { -- if ($i eq $profile) { -- $found = 1; -- last; -- } -- } -- err_and_die(__x('Invalid profile: {profile}', profile => $profile)) -- unless ($found); -- -- $config->use_profile($profile); -- -- my $storage = $config->get_storage(); -- my $method = $config->get_method(); -- if ($method eq 'libvirt') { -- $target = new Sys::VirtConvert::Connection::LibVirtTarget -- ('qemu:///system', $storage); -- } elsif ($method eq 'rhev') { -- $target = new Sys::VirtConvert::Connection::RHEVTarget($storage); -- } else { -- err_and_die(__x('Profile {profile} specifies invalid method {method}.', -- profile => $profile, method => $method)); -- } -- -- p2v_return_ok(); --} -- --sub convert --{ -- err_and_die('CONVERT without prior SET_PROFILE command') -- unless (defined($target)); -- -- err_and_die('CONVERT without prior METADATA command') -- unless defined($meta); -- -- my @localpaths = map { $_->{local_path} } @{$meta->{disks}}; -- -- my $g; -- eval { -- my $transferiso = $config->get_transfer_iso(); -- -- $g = new Sys::VirtConvert::GuestfsHandle( -- \@localpaths, -- $transferiso, -- $target->isa('Sys::VirtConvert::Connection::RHEVTarget') -- ); -- -- my $transferdev; -- if (defined($transferiso)) { -- my @devices = $g->list_devices(); -- $transferdev = pop(@devices); -- } -- -- my $root = inspect_guest($g, $transferdev); -- my $guestcaps = -- Sys::VirtConvert::Converter->convert($g, $config, $root, $meta); -- $target->create_guest($g, $root, $meta, $config, $guestcaps, -- $meta->{name}); -- -- if($guestcaps->{block} eq 'virtio' && $guestcaps->{net} eq 'virtio') { -- logmsg NOTICE, __x('{name} configured with virtio drivers.', -- name => $meta->{name}); -- } elsif ($guestcaps->{block} eq 'virtio') { -- logmsg NOTICE, __x('{name} configured with virtio storage only.', -- name => $meta->{name}); -- } elsif ($guestcaps->{net} eq 'virtio') { -- logmsg NOTICE, __x('{name} configured with virtio networking only.', -- name => $meta->{name}); -- } else { -- logmsg NOTICE, __x('{name} configured without virtio drivers.', -- name => $meta->{name}); -- } -- }; -- -- # If any of the above commands result in failure, we need to ensure that -- # the guestfs qemu process is cleaned up before further cleanup. Failure to -- # do this can result in failure to umount RHEV export's temporary mount -- # point. -- if ($@) { -- my $err = $@; -- $g->close(); -- -- # We trust the error was already logged -- p2v_return_err($err); -- die($@); -- } -- -- p2v_return_ok(); --} -- --sub unexpected_msg --{ -- err_and_die('Received unexpected command: '.shift); --} -- --sub err_and_die --{ -- my $err = shift; -- p2v_return_err($err); -- v2vdie $err; --} -- --END { -- my $err = $?; -- -- logmsg NOTICE, __x("{program} exited.", program => 'p2v-server'); -- -- # die() sets $? to 255, which is untidy. -- $? = $err == 255 ? 1 : $err; --} -- --# Perform guest inspection using the libguestfs core inspection API. --# Returns the root device of the os to be converted. --sub inspect_guest --{ -- my $g = shift; -- my $transferdev = shift; -- -- # Get list of roots, sorted -- my @roots = $g->inspect_os(); -- -- # Filter out the transfer device from the results of inspect_os -- # There's a libguestfs bug (fixed upstream) which meant the transfer ISO -- # could be erroneously detected as an unknown Windows OS. As we know what it -- # is, we can filter out the transfer device here. Even when the fix is -- # released this is reasonable belt & braces. -- @roots = grep(!/^\Q$transferdev\E$/, @roots); -- -- @roots = sort @roots; -- -- # Only work on single-root operating systems. -- v2vdie __('No root device found in this operating system image.') -- if @roots == 0; -- -- v2vdie __('Multiboot operating systems are not supported.') -- if @roots > 1; -- -- return $roots[0]; --} -- --sub p2v_receive --{ -- my $in = <>; -- v2vdie __('Client closed connection unexpectedly') unless defined($in); -- -- # Messages consist of the message type followed by 0 or more arguments, -- # terminated by a newline -- chomp($in); -- $in =~ /^([A-Z_]+)( .+)?$/ or err_and_die("Received invalid message: $in"); -- -- my %msg; -- $msg{type} = $1; -- if (defined($2)) { -- my @args = split(' ', $2); -- $msg{args} = \@args; -- } else { -- $msg{args} = []; -- } -- -- logmsg DEBUG, __x('Received: {command} {args}', -- command => $msg{type}, -- args => join(' ', @{$msg{args}})); -- -- return \%msg; --} -- --sub p2v_read --{ -- my ($length) = @_; -- -- my $buf; -- my $total = 0; -- -- while($total < $length) { -- my $in = read(STDIN, $buf, $length, $total) -- or err_and_die(__x('Error receiving data: {error}', error => $@)); -- logmsg DEBUG, "Read $in bytes"; -- $total += $in; -- } -- -- return $buf; --} -- --sub p2v_return_ok --{ -- my $msg = "OK"; -- logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -- print $msg,"\n"; --} -- --sub p2v_return_list --{ -- my @values = @_; -- -- my $msg = 'LIST '.scalar(@values); -- foreach my $value (@values) { -- $msg .= "\n$value"; -- } -- logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -- print $msg,"\n"; --} -- --sub p2v_return_err --{ -- my $msg = 'ERROR '.shift; -- logmsg DEBUG, __x('Sent: {msg}', msg => $msg); -- print $msg,"\n"; --} -- --=head1 SEE ALSO -- --L, --L. -- --=head1 AUTHOR -- --Matthew Booth -- --=head1 COPYRIGHT -- --Copyright (C) 2011 Red Hat Inc. -- --This program is free software; you can redistribute it and/or modify --it under the terms of the GNU General Public License as published by --the Free Software Foundation; either version 2 of the License, or --(at your option) any later version. -- --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --GNU General Public License for more details. -- --You should have received a copy of the GNU General Public License --along with this program; if not, write to the Free Software --Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -diff -ruN virt-v2v-v0.8.1/virt-v2v.spec virt-v2v-v0.8.1.new/virt-v2v.spec ---- virt-v2v-v0.8.1/virt-v2v.spec 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/virt-v2v.spec 2011-05-11 17:20:21.000000000 +0100 -@@ -55,7 +55,6 @@ - - # virt-p2v build requirements - BuildRequires: rubygem(rake) --BuildRequires: rubygem(echoe) - - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - -@@ -141,7 +140,7 @@ - %{__perl} Build.PL - ./Build - --pushd p2v-client -+pushd p2v/client - rake gem - popd - -@@ -174,7 +173,7 @@ - mkdir -p %{buildroot}/%{gemdir} - - gem install --local --install-dir %{buildroot}%{gemdir} \ -- --force --rdoc p2v-client/pkg/%{gemname}-%{version}.gem -+ --force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem - mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} - find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x - cp COPYING %{buildroot}/%{geminstdir} -@@ -183,8 +182,8 @@ - %global builderdir %{_datadir}/virt-p2v-image-builder - builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder - mkdir -p %{buildroot}%{builderdir} --cp p2v-image-builder/*.ks %{buildroot}%{builderdir} --cp p2v-image-builder/virt-p2v-image-builder $builder -+cp p2v/image-builder/*.ks %{buildroot}%{builderdir} -+cp p2v/image-builder/virt-p2v-image-builder $builder - - # Set the default data directory - sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder -@@ -193,7 +192,7 @@ - %check - ./Build test - --pushd p2v-client -+pushd p2v/client - # No tests yet - #rake test - popd -diff -ruN virt-v2v-v0.8.1/virt-v2v.spec.PL virt-v2v-v0.8.1.new/virt-v2v.spec.PL ---- virt-v2v-v0.8.1/virt-v2v.spec.PL 2011-04-26 20:58:33.000000000 +0100 -+++ virt-v2v-v0.8.1.new/virt-v2v.spec.PL 2011-05-11 17:20:21.000000000 +0100 -@@ -165,7 +165,7 @@ - %{__perl} Build.PL - ./Build - --pushd p2v-client -+pushd p2v/client - rake gem - popd - -@@ -198,7 +198,7 @@ - mkdir -p %{buildroot}/%{gemdir} - - gem install --local --install-dir %{buildroot}%{gemdir} \ -- --force --rdoc p2v-client/pkg/%{gemname}-%{version}.gem -+ --force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem - mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} - find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x - cp COPYING %{buildroot}/%{geminstdir} -@@ -207,8 +207,8 @@ - %global builderdir %{_datadir}/virt-p2v-image-builder - builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder - mkdir -p %{buildroot}%{builderdir} --cp p2v-image-builder/*.ks %{buildroot}%{builderdir} --cp p2v-image-builder/virt-p2v-image-builder $builder -+cp p2v/image-builder/*.ks %{buildroot}%{builderdir} -+cp p2v/image-builder/virt-p2v-image-builder $builder - - # Set the default data directory - sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder -@@ -217,7 +217,7 @@ - %check - ./Build test - --pushd p2v-client -+pushd p2v/client - # No tests yet - #rake test - popd diff --git a/virt-v2v-0.8.1-01-e34a8c09.patch b/virt-v2v-0.8.1-01-e34a8c09.patch deleted file mode 100644 index 58b03a3..0000000 --- a/virt-v2v-0.8.1-01-e34a8c09.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit e34a8c0911f53cff64f9a33d3802ac7361f3fe19 -Author: Matthew Booth -Date: Wed May 11 16:05:18 2011 +0100 - - p2v-client: Drop echoe for build - - echoe changes incompatibly from F14->F15. We're not using the vast majority of - its features, and it remains completely undocumented as far as I can tell. This - patch drops it in favour of a simple, explicit gem build task. - -diff --git a/p2v/client/Rakefile b/p2v/client/Rakefile -index d190f08..23c26f5 100644 ---- a/p2v/client/Rakefile -+++ b/p2v/client/Rakefile -@@ -14,24 +14,10 @@ - # along with this program; if not, write to the Free Software - # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - --require 'rubygems' --require 'echoe' -+require 'rake' -+require 'rake/gempackagetask' - --Echoe.new("virt-p2v") do |p| -- p.project = "Virt P2V" -- p.version = `../../Build version` -- p.author = "Matthew Booth" -- p.summary = "Send a machine's storage and metadata to virt-p2v-server" -- p.description = < :gem -+ -+load 'virt-p2v.gemspec' -+Rake::GemPackageTask.new(GEMSPEC) {} -diff --git a/virt-v2v.spec.PL b/virt-v2v.spec.PL -index 2249b01..6a155e2 100644 ---- a/virt-v2v.spec.PL -+++ b/virt-v2v.spec.PL -@@ -79,7 +79,6 @@ BuildRequires: perl-hivex >= 1.2.2 - - # virt-p2v build requirements - BuildRequires: rubygem(rake) --BuildRequires: rubygem(echoe) - - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - diff --git a/virt-v2v-0.8.1-02-fadb1929.patch b/virt-v2v-0.8.1-02-fadb1929.patch deleted file mode 100644 index 8fc6c4a..0000000 --- a/virt-v2v-0.8.1-02-fadb1929.patch +++ /dev/null @@ -1,111 +0,0 @@ -commit fadb1929b4a8447a719a34f07e5934badf694f45 -Author: Matthew Booth -Date: Wed May 11 16:46:37 2011 +0100 - - p2v-client: Add missing gemspec - - gemspec used to be auto-generated, so was explicitly ignored. It's no longer - auto-generated, so we need it. - -diff --git a/p2v/client/virt-p2v.gemspec b/p2v/client/virt-p2v.gemspec -new file mode 100644 -index 0000000..d8edde8 ---- /dev/null -+++ b/p2v/client/virt-p2v.gemspec -@@ -0,0 +1,96 @@ -+# Copyright (C) 2011 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+V2V_VERSION = `../../Build version` -+abort "Failed to get version" unless $? == 0 -+ -+GEMSPEC = Gem::Specification.new do |s| -+ s.name = %q{virt-p2v} -+ s.version = V2V_VERSION -+ -+ s.authors = ["Matthew Booth"] -+ s.date = %q{2011-05-10} -+ s.summary = %q{Send a machine's storage and metadata to virt-p2v-server} -+ s.description = %q{ -+ virt-p2v is a client which connects to a virt-p2v-server and transfer's -+ the host machine's storage and metadata. virt-p2v is intended to be run -+ from a live image, so it is unlikely you want to install it. -+ } -+ s.email = %q{libguestfs@redhat.com} -+ s.homepage = %q{http://libguestfs.org} -+ -+ s.default_executable = %q{virt-p2v} -+ s.executables = ["virt-p2v"] -+ s.files = [ -+ "Rakefile", -+ "bin/virt-p2v", -+ "lib/virt-p2v/blockdevice.rb", -+ "lib/virt-p2v/connection.rb", -+ "lib/virt-p2v/converter.rb", -+ "lib/virt-p2v/gtk-queue.rb", -+ "lib/virt-p2v/netdevice.rb", -+ "lib/virt-p2v/ui/connect.rb", -+ "lib/virt-p2v/ui/convert.rb", -+ "lib/virt-p2v/ui/main.rb", -+ "lib/virt-p2v/ui/network.rb", -+ "lib/virt-p2v/ui/p2v.ui", -+ "lib/virt-p2v/ui/success.rb", -+ "virt-p2v.gemspec", -+ "Manifest" -+ ] -+ s.require_paths = ["lib"] -+ -+ if s.respond_to? :specification_version then -+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION -+ s.specification_version = 3 -+ -+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then -+ s.add_runtime_dependency(%q, [">= 0"]) -+ s.add_runtime_dependency(%q, [">= 0"]) -+ s.add_runtime_dependency(%q, [">= 0"]) -+ else -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ end -+ else -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ s.add_dependency(%q, [">= 0"]) -+ end -+ -+# Source doesn't contain any rdoc -+# s.extra_rdoc_files = [ -+# "bin/virt-p2v", -+# "lib/virt-p2v/blockdevice.rb", -+# "lib/virt-p2v/connection.rb", -+# "lib/virt-p2v/converter.rb", -+# "lib/virt-p2v/gtk-queue.rb", -+# "lib/virt-p2v/netdevice.rb", -+# "lib/virt-p2v/ui/connect.rb", -+# "lib/virt-p2v/ui/convert.rb", -+# "lib/virt-p2v/ui/main.rb", -+# "lib/virt-p2v/ui/network.rb", -+# "lib/virt-p2v/ui/p2v.ui", -+# "lib/virt-p2v/ui/success.rb" -+# ] -+# s.rdoc_options = [ -+# "--line-numbers", -+# "--inline-source", -+# "--title", -+# "Virt-p2v" -+# ] -+end diff --git a/virt-v2v-0.8.1-03-a965f7e0.patch b/virt-v2v-0.8.1-03-a965f7e0.patch deleted file mode 100644 index 2dc1eed..0000000 --- a/virt-v2v-0.8.1-03-a965f7e0.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit a965f7e0609acc6107ffbbf70054776ee3c81918 -Author: Matthew Booth -Date: Thu May 12 10:07:06 2011 +0100 - - p2v-client: Build rdoc with options - - Use rdoc options taken from gemspec generated by echoe. - -diff --git a/p2v/client/virt-p2v.gemspec b/p2v/client/virt-p2v.gemspec -index d8edde8..610c2a3 100644 ---- a/p2v/client/virt-p2v.gemspec -+++ b/p2v/client/virt-p2v.gemspec -@@ -72,25 +72,23 @@ GEMSPEC = Gem::Specification.new do |s| - s.add_dependency(%q, [">= 0"]) - end - --# Source doesn't contain any rdoc --# s.extra_rdoc_files = [ --# "bin/virt-p2v", --# "lib/virt-p2v/blockdevice.rb", --# "lib/virt-p2v/connection.rb", --# "lib/virt-p2v/converter.rb", --# "lib/virt-p2v/gtk-queue.rb", --# "lib/virt-p2v/netdevice.rb", --# "lib/virt-p2v/ui/connect.rb", --# "lib/virt-p2v/ui/convert.rb", --# "lib/virt-p2v/ui/main.rb", --# "lib/virt-p2v/ui/network.rb", --# "lib/virt-p2v/ui/p2v.ui", --# "lib/virt-p2v/ui/success.rb" --# ] --# s.rdoc_options = [ --# "--line-numbers", --# "--inline-source", --# "--title", --# "Virt-p2v" --# ] -+ s.extra_rdoc_files = [ -+ "bin/virt-p2v", -+ "lib/virt-p2v/blockdevice.rb", -+ "lib/virt-p2v/connection.rb", -+ "lib/virt-p2v/converter.rb", -+ "lib/virt-p2v/gtk-queue.rb", -+ "lib/virt-p2v/netdevice.rb", -+ "lib/virt-p2v/ui/connect.rb", -+ "lib/virt-p2v/ui/convert.rb", -+ "lib/virt-p2v/ui/main.rb", -+ "lib/virt-p2v/ui/network.rb", -+ "lib/virt-p2v/ui/p2v.ui", -+ "lib/virt-p2v/ui/success.rb" -+ ] -+ s.rdoc_options = [ -+ "--line-numbers", -+ "--inline-source", -+ "--title", "virt-p2v" -+ ] - end diff --git a/virt-v2v-0.8.1-04-77bd7908.patch b/virt-v2v-0.8.1-04-77bd7908.patch deleted file mode 100644 index 6ce160a..0000000 --- a/virt-v2v-0.8.1-04-77bd7908.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 77bd79083879c7bca15c00d96c570da6faa16839 -Author: Matthew Booth -Date: Tue May 17 10:00:34 2011 +0100 - - p2v-server: Fix YAML error parsing metadata - - The YAML perl module will produce a parse error when receiving metadata YAML - produced by virt-p2v. YAML::Tiny and YAML::Syck both parse it fine. - Unfortunately, YAML::Any is only provided by the YAML module, so it will always - be installed on Fedora, and will always break. We therefore need to pick one of - the others explicitly. I picked YAML::Tiny as it has fewer dependencies. - -diff --git a/p2v/server/virt-p2v-server.pl b/p2v/server/virt-p2v-server.pl -index d062d9d..2dfae24 100755 ---- a/p2v/server/virt-p2v-server.pl -+++ b/p2v/server/virt-p2v-server.pl -@@ -20,7 +20,11 @@ use warnings; - use strict; - - use IO::Handle; --use YAML::Any; -+ -+# The YAML module doesn't support YAML generated by Ruby. YAML::Tiny and -+# YAML::Syck are both fine. We can't use YAML::Any here because that breaks by -+# default. -+use YAML::Tiny; - - use Locale::TextDomain 'virt-v2v'; - diff --git a/virt-v2v-0.8.3-01-bd513aaf.patch b/virt-v2v-0.8.3-01-bd513aaf.patch new file mode 100644 index 0000000..d8d4081 --- /dev/null +++ b/virt-v2v-0.8.3-01-bd513aaf.patch @@ -0,0 +1,67 @@ +From bd513aaf12a9cd27432eb36d341fd88f4d64dac4 Mon Sep 17 00:00:00 2001 +From: Matthew Booth +Date: Fri, 19 Aug 2011 17:43:55 +0100 +Subject: [PATCH] Fix whitespace issues in translations + +--- + po/es.po | 2 +- + po/nl.po | 2 +- + po/pl.po | 2 +- + po/uk.po | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/po/es.po b/po/es.po +index c24bf59..09fb7fe 100644 +--- a/po/es.po ++++ b/po/es.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Héctor Daniel Cabrera , 2011. + msgid "" +diff --git a/po/nl.po b/po/nl.po +index 3f88fa0..fe74413 100644 +--- a/po/nl.po ++++ b/po/nl.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Geert Warrink , 2011. + msgid "" +diff --git a/po/pl.po b/po/pl.po +index 6465997..9508124 100644 +--- a/po/pl.po ++++ b/po/pl.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Piotr Drąg , 2011. + msgid "" +diff --git a/po/uk.po b/po/uk.po +index 13172bd..21676bc 100644 +--- a/po/uk.po ++++ b/po/uk.po +@@ -1,7 +1,7 @@ + # SOME DESCRIPTIVE TITLE. + # Copyright (C) YEAR Red Hat Inc. + # This file is distributed under the same license as the PACKAGE package. +-# ++# + # mdbooth , 2011. + # Yuri Chornoivan , 2011. + msgid "" +-- +1.7.6 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 3bf9131..eeaeffe 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v -Version: 0.8.1 -Release: 4%{?dist} +Version: 0.8.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -16,12 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # local seq no: the order the patches should be applied in # git commit: the first 8 characters of the git commit hash -# Upstream patches to fix p2v client build in rawhide/f15 -Patch0: virt-v2v-0.8.1-00-44eb9021-modified.patch -Patch1: virt-v2v-0.8.1-01-e34a8c09.patch -Patch2: virt-v2v-0.8.1-02-fadb1929.patch -Patch3: virt-v2v-0.8.1-03-a965f7e0.patch -Patch4: virt-v2v-0.8.1-04-77bd7908.patch +Patch1: virt-v2v-0.8.3-01-bd513aaf.patch # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't @@ -48,19 +43,19 @@ BuildRequires: perl(Net::SSL) BuildRequires: perl(Sys::Guestfs) BuildRequires: perl(Sys::Guestfs::Lib) BuildRequires: perl(Sys::Virt) -BuildRequires: perl(Term::ProgressBar) BuildRequires: perl(URI) BuildRequires: perl(XML::DOM) BuildRequires: perl(XML::DOM::XPath) BuildRequires: perl(XML::Writer) +# This is a bug introduced by f2c5c8fa337f361057353ffa3fe6539cb1a5823c +# perl(Term::ProgressBar) should not be a build requirement +BuildRequires: perl(Term::ProgressBar) + # Need an explicit package dependency for version requires BuildRequires: perl-libguestfs >= 1:1.6.0 BuildRequires: perl-hivex >= 1.2.2 -# virt-p2v build requirements -BuildRequires: rubygem(rake) - Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # Need an explicit package dependency for version requires @@ -72,6 +67,10 @@ Requires: perl-hivex >= 1.2.2 # discovered. Requires: perl(Net::SSL) +# Term::ProgressBar is loaded conditionally. The dependency isn't automatically +# discovered +Requires: perl(Term::ProgressBar) + # Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt Requires: libvirt >= 0.8.1 @@ -81,83 +80,32 @@ Requires: /usr/bin/mkisofs # For guest image inspection Requires: /usr/bin/qemu-img +# For ssh transfers +Requires: /usr/bin/ssh + +# For device_map lens +Requires: augeas-libs => augeas-libs-0.7.2-4 + %description virt-v2v is a tool for converting and importing virtual machines to libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a variety of guest operating systems from libvirt-managed hosts and VMware ESX. -%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) -%global gemname virt-p2v -%global geminstdir %{gemdir}/gems/%{gemname}-%{version} -%global rubyabi 1.8 - -%package -n rubygem-%{gemname} -Summary: Send a machine's storage and metadata to virt-p2v-server -BuildArch: noarch -Requires: ruby(abi) = %{rubyabi} -Requires: rubygem(gtk2) -Requires: rubygem(gettext) -Requires: rubygem(net-ssh) -Requires: ruby(dbus) - -Requires: /sbin/blockdev -Requires: /usr/bin/hwloc-info -Requires: NetworkManager - -Provides: rubygem(%{gemname}) = %{version} - -%description -n rubygem-%{gemname} -virt-p2v is a client which connects to a virt-p2v-server and transfer's the host -machine's storage and metadata. virt-p2v is intended to be run from a live -image, so it is unlikely you want to install it directly. - -%package -n rubygem-%{gemname}-doc -Summary: Documentation for rubygem-%{gemname} -Group: Documentation -BuildArch: noarch -Requires: rubygem-%{gemname} = %{version}-%{release} - -%description -n rubygem-%{gemname}-doc -Documentation for rubygem-%{gemname} - -%package -n virt-p2v-image-builder -Summary: Create a virt-p2v bootable image -BuildArch: noarch - -# image builder script requires -Requires: /usr/bin/ksflatten -Requires: /usr/sbin/setenforce -Requires: /usr/bin/livecd-creator - -# Kickstart nochroot scripts requires -Requires: /usr/bin/livecd-iso-to-disk -Requires: /usr/bin/livecd-iso-to-pxeboot -Requires: /usr/bin/image-minimizer - -%description -n virt-p2v-image-builder -virt-p2v-image-builder is a tool to create a bootable virt-p2v live image. %prep %setup -q -n %{name}-v%{version} -%patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build %{__perl} Build.PL ./Build -pushd p2v/client -rake gem -popd - -# Neither perl nor ruby need debuginfo +# perl doesn't need debuginfo %define debug_package %{nil} + %install rm -rf %{buildroot} ./Build install \ @@ -172,42 +120,19 @@ mkdir -p $statedir/software mkdir -p %{buildroot}%{_sysconfdir} cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ +cp v2v/virt-v2v.db $statedir/ %find_lang %{name} # Not clear why this is being created as there is nothing arch-specific in # virt-v2v. It isn't packaged, though, so we need to delete it. -find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm - -# Install p2v-client -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{gemdir} - -gem install --local --install-dir %{buildroot}%{gemdir} \ - --force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem -mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir} -find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x -cp COPYING %{buildroot}/%{geminstdir} - -# Install p2v-image-builder -%global builderdir %{_datadir}/virt-p2v-image-builder -builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder -mkdir -p %{buildroot}%{builderdir} -cp p2v/image-builder/*.ks %{buildroot}%{builderdir} -cp p2v/image-builder/virt-p2v-image-builder $builder - -# Set the default data directory -sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder +[ -d "%{buildroot}/%{perl_archlib}" ] && + find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm %check ./Build test -pushd p2v/client -# No tests yet -#rake test -popd - %clean rm -rf %{buildroot} @@ -236,32 +161,18 @@ rm -rf %{buildroot} %dir %{_localstatedir}/lib/virt-v2v %config(noreplace) %{_sysconfdir}/virt-v2v.conf +%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db %config(noreplace) %{_localstatedir}/lib/virt-v2v/software -%files -n rubygem-%{gemname} -%defattr(-, root, root, -) -%{_bindir}/virt-p2v -%dir %{geminstdir} -%{geminstdir}/bin -%{geminstdir}/lib -%doc %{geminstdir}/COPYING -%doc %{geminstdir}/Manifest -%doc %{geminstdir}/Rakefile -%doc %{geminstdir}/%{gemname}.gemspec -%{gemdir}/cache/%{gemname}-%{version}.gem -%{gemdir}/specifications/%{gemname}-%{version}.gemspec - -%files -n rubygem-%{gemname}-doc -%defattr(-, root, root, -) -%{gemdir}/doc/%{gemname}-%{version} - -%files -n virt-p2v-image-builder -%defattr(-, root, root, -) -%{_bindir}/virt-p2v-image-builder -%{builderdir} - %changelog +* Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 +- New upstream release 0.8.3. +- Include upstream patch to fix whitespace problems in PO files. +- Remove virt-p2v from build by synchronizing the spec file so it + almost matches the one in RHEL 6.2. Note that virt-p2v is built in + a separate SRPM called rubygem-virt-p2v. + * Thu Jul 21 2011 Petr Sabata - 0.8.1-4 - Perl mass rebuild From 36b1332657fec16aa0d624d8d9683a85b511fd12 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Mon, 19 Sep 2011 17:45:27 +0100 Subject: [PATCH 003/235] New upstream release 0.8.4 --- .gitignore | 1 + sources | 2 +- virt-v2v-0.8.3-01-bd513aaf.patch | 67 -------------------------------- virt-v2v.spec | 27 +++++-------- 4 files changed, 12 insertions(+), 85 deletions(-) delete mode 100644 virt-v2v-0.8.3-01-bd513aaf.patch diff --git a/.gitignore b/.gitignore index ecd4dd5..f4fa39a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ # Source /virt-v2v-v0.8.1.tar.gz /virt-v2v-v0.8.3.tar.gz +/virt-v2v-v0.8.4.tar.gz diff --git a/sources b/sources index 0c31efb..be20e16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -125315e4901b2dfae16590a746e35bfc virt-v2v-v0.8.3.tar.gz +d16952ccc7ddd06497cee289893494ff virt-v2v-v0.8.4.tar.gz diff --git a/virt-v2v-0.8.3-01-bd513aaf.patch b/virt-v2v-0.8.3-01-bd513aaf.patch deleted file mode 100644 index d8d4081..0000000 --- a/virt-v2v-0.8.3-01-bd513aaf.patch +++ /dev/null @@ -1,67 +0,0 @@ -From bd513aaf12a9cd27432eb36d341fd88f4d64dac4 Mon Sep 17 00:00:00 2001 -From: Matthew Booth -Date: Fri, 19 Aug 2011 17:43:55 +0100 -Subject: [PATCH] Fix whitespace issues in translations - ---- - po/es.po | 2 +- - po/nl.po | 2 +- - po/pl.po | 2 +- - po/uk.po | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/po/es.po b/po/es.po -index c24bf59..09fb7fe 100644 ---- a/po/es.po -+++ b/po/es.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Héctor Daniel Cabrera , 2011. - msgid "" -diff --git a/po/nl.po b/po/nl.po -index 3f88fa0..fe74413 100644 ---- a/po/nl.po -+++ b/po/nl.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Geert Warrink , 2011. - msgid "" -diff --git a/po/pl.po b/po/pl.po -index 6465997..9508124 100644 ---- a/po/pl.po -+++ b/po/pl.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Piotr Drąg , 2011. - msgid "" -diff --git a/po/uk.po b/po/uk.po -index 13172bd..21676bc 100644 ---- a/po/uk.po -+++ b/po/uk.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Yuri Chornoivan , 2011. - msgid "" --- -1.7.6 - diff --git a/virt-v2v.spec b/virt-v2v.spec index eeaeffe..90655a8 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v -Version: 0.8.3 -Release: 1%{?dist} +Version: 0.8.4 +Release: 1%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -16,8 +16,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # local seq no: the order the patches should be applied in # git commit: the first 8 characters of the git commit hash -Patch1: virt-v2v-0.8.3-01-bd513aaf.patch - # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't # available. @@ -43,15 +41,12 @@ BuildRequires: perl(Net::SSL) BuildRequires: perl(Sys::Guestfs) BuildRequires: perl(Sys::Guestfs::Lib) BuildRequires: perl(Sys::Virt) +BuildRequires: perl(Term::ProgressBar) BuildRequires: perl(URI) BuildRequires: perl(XML::DOM) BuildRequires: perl(XML::DOM::XPath) BuildRequires: perl(XML::Writer) -# This is a bug introduced by f2c5c8fa337f361057353ffa3fe6539cb1a5823c -# perl(Term::ProgressBar) should not be a build requirement -BuildRequires: perl(Term::ProgressBar) - # Need an explicit package dependency for version requires BuildRequires: perl-libguestfs >= 1:1.6.0 BuildRequires: perl-hivex >= 1.2.2 @@ -62,15 +57,14 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl-libguestfs >= 1:1.6.0 Requires: perl-hivex >= 1.2.2 +# Required for passing flags to get_xml_description +Requires: perl(Sys::Virt) >= 0.2.4 + # Net::SSL is loaded dynamically by Net::HTTPS in # Sys::VirtConvert::Transfer::ESX. The dependency isn't automatically # discovered. Requires: perl(Net::SSL) -# Term::ProgressBar is loaded conditionally. The dependency isn't automatically -# discovered -Requires: perl(Term::ProgressBar) - # Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt Requires: libvirt >= 0.8.1 @@ -78,14 +72,11 @@ Requires: libvirt >= 0.8.1 Requires: /usr/bin/mkisofs # For guest image inspection -Requires: /usr/bin/qemu-img +Requires: /usr/bin/qemu-img # For ssh transfers Requires: /usr/bin/ssh -# For device_map lens -Requires: augeas-libs => augeas-libs-0.7.2-4 - %description virt-v2v is a tool for converting and importing virtual machines to @@ -96,7 +87,6 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX. %prep %setup -q -n %{name}-v%{version} -%patch1 -p1 %build %{__perl} Build.PL @@ -166,6 +156,9 @@ rm -rf %{buildroot} %changelog +* Mon Sep 19 2011 Richard W.M. Jones - 0.8.4-1 +- New upstream release 0.8.4 + * Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 - New upstream release 0.8.3. - Include upstream patch to fix whitespace problems in PO files. From 23b63368b1205b4c0b091214ef3c19dd6774767d Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Mon, 5 Dec 2011 14:38:39 +0000 Subject: [PATCH 004/235] New upstream release 0.8.5 --- .gitignore | 10 ++++------ sources | 2 +- virt-v2v.spec | 13 ++++++++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index f4fa39a..2d73d2c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,9 @@ /x86_64 # Version-dependent build artifacts -/.build-0.8.1-1.fc*.log -/virt-v2v-v0.8.1 -/virt-v2v-0.8.1-1.fc*.src.rpm +/.build-*.log +/virt-v2v-v*/ +/virt-v2v-*.src.rpm # Source -/virt-v2v-v0.8.1.tar.gz -/virt-v2v-v0.8.3.tar.gz -/virt-v2v-v0.8.4.tar.gz +/virt-v2v-v*.tar.gz diff --git a/sources b/sources index be20e16..0b68e28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d16952ccc7ddd06497cee289893494ff virt-v2v-v0.8.4.tar.gz +2caf55a34ae086d34cbe82375c1b12c5 virt-v2v-v0.8.5.tar.gz diff --git a/virt-v2v.spec b/virt-v2v.spec index 90655a8..7ba24de 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,5 +1,5 @@ Name: virt-v2v -Version: 0.8.4 +Version: 0.8.5 Release: 1%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM @@ -37,9 +37,7 @@ BuildRequires: perl(IO::String) BuildRequires: perl(Locale::TextDomain) BuildRequires: perl(Module::Pluggable) BuildRequires: perl(Net::HTTPS) -BuildRequires: perl(Net::SSL) BuildRequires: perl(Sys::Guestfs) -BuildRequires: perl(Sys::Guestfs::Lib) BuildRequires: perl(Sys::Virt) BuildRequires: perl(Term::ProgressBar) BuildRequires: perl(URI) @@ -108,6 +106,12 @@ rm -rf %{buildroot} statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v mkdir -p $statedir/software +# Copy Windows dependencies into place +windir=$statedir/software/windows +mkdir -p $windir + +cp windows/rhsrvany.exe windows/firstboot.bat $windir/ + mkdir -p %{buildroot}%{_sysconfdir} cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ cp v2v/virt-v2v.db $statedir/ @@ -156,6 +160,9 @@ rm -rf %{buildroot} %changelog +* Mon Dec 5 2011 Matthew Booth - 0.8.5-1 +- New upstream release 0.8.5 + * Mon Sep 19 2011 Richard W.M. Jones - 0.8.4-1 - New upstream release 0.8.4 From 18d06fd2de2799101c3c3990b4003a13bfeecd4f Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Tue, 13 Dec 2011 14:35:32 +0000 Subject: [PATCH 005/235] 0.8.5-2 Fix for BZ 767197 --- virt-v2v.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 7ba24de..9f2b5a9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.8.5 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -16,6 +16,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # local seq no: the order the patches should be applied in # git commit: the first 8 characters of the git commit hash +Patch0: virt-v2v-0.8.5-00-786a74f0.patch + # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't # available. @@ -85,6 +87,8 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX. %prep %setup -q -n %{name}-v%{version} +%patch0 -p1 + %build %{__perl} Build.PL @@ -160,6 +164,9 @@ rm -rf %{buildroot} %changelog +* Tue Dec 13 2011 Matthew Booth - 0.8.5-2 +- Fix crash during format conversion (BZ#767197) + * Mon Dec 5 2011 Matthew Booth - 0.8.5-1 - New upstream release 0.8.5 From 143746c2524ecc33a5d8279060edeab8a0344a96 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Tue, 13 Dec 2011 14:42:12 +0000 Subject: [PATCH 006/235] Add missing patch --- virt-v2v-0.8.5-00-786a74f0.patch | 101 +++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 virt-v2v-0.8.5-00-786a74f0.patch diff --git a/virt-v2v-0.8.5-00-786a74f0.patch b/virt-v2v-0.8.5-00-786a74f0.patch new file mode 100644 index 0000000..19cac20 --- /dev/null +++ b/virt-v2v-0.8.5-00-786a74f0.patch @@ -0,0 +1,101 @@ +commit 786a74f0f1c14cfb54a65ea8c5fc097f612b03a5 +Author: Matthew Booth +Date: Tue Dec 13 14:18:10 2011 +0000 + + Fix crash during format conversions + + Fix a regression introduced by commit 6dec2753fd9e7d726e140bb246ccf32df8af9fb5. + We didn't update the format conversion code when updating the GuestfsHandle API. + This change updates the API again, removing an unnecessary dependency between + GuestfsHandle and Volume. + +diff --git a/lib/Sys/VirtConvert/GuestfsHandle.pm b/lib/Sys/VirtConvert/GuestfsHandle.pm +index f6fa63f..fe34d14 100644 +--- a/lib/Sys/VirtConvert/GuestfsHandle.pm ++++ b/lib/Sys/VirtConvert/GuestfsHandle.pm +@@ -57,9 +57,9 @@ close() method, and the ability to register pre-close callbacks. + =item new(disks, transferiso, isrhev) + + Create a new object. Open a new Sys::Guestfs handle to proxy, using the disks +-defined in I, which is taken from the guest metadata. Add I +-as a read-only drive if it is given. If I is true, the handle will use +-user and group 36:36. ++defined in I, which is list of disk metadata defined as: [ [ name, path, ++format ], ... ]. Add I as a read-only drive if it is given. If ++I is true, the handle will use user and group 36:36. + + =cut + +@@ -77,12 +77,12 @@ sub new + + $g = Sys::Guestfs->new(); + foreach my $disk (@{$disks}) { +- my $vol = $disk->{dst}; ++ my ($name, $path, $format) = @$disk; + +- $g->add_drive_opts($vol->get_path(), +- format => $vol->get_format(), ++ $g->add_drive_opts($path, ++ format => $format, + iface => $interface, +- name => $disk->{device}); ++ name => $name); + } + + # Add the transfer iso if there is one +diff --git a/lib/Sys/VirtConvert/Transfer/Local.pm b/lib/Sys/VirtConvert/Transfer/Local.pm +index 667b282..5053ccb 100644 +--- a/lib/Sys/VirtConvert/Transfer/Local.pm ++++ b/lib/Sys/VirtConvert/Transfer/Local.pm +@@ -179,12 +179,13 @@ package Sys::VirtConvert::Transfer::GuestfsStream; + sub new + { + my $class = shift; +- my ($path) = @_; ++ my ($path, $format) = @_; + + my $self = {}; + bless($self, $class); + +- $self->{g} = new Sys::VirtConvert::GuestfsHandle([$path], undef, 0); ++ $self->{g} = new Sys::VirtConvert::GuestfsHandle([['sda', $path, $format]], ++ undef, 0); + + return $self; + } +diff --git a/p2v/server/virt-p2v-server.pl b/p2v/server/virt-p2v-server.pl +index 8c52b08..7427055 100755 +--- a/p2v/server/virt-p2v-server.pl ++++ b/p2v/server/virt-p2v-server.pl +@@ -343,8 +343,12 @@ sub convert + eval { + my $transferiso = $config->get_transfer_iso(); + ++ my @disks = map { [ $_->{device}, ++ $_->{dst}->get_path(), ++ $_->{dst}->get_format() ] } @{$meta->{disks}}; ++ + $g = new Sys::VirtConvert::GuestfsHandle( +- $meta->{disks}, ++ \@disks, + $transferiso, + $target->isa('Sys::VirtConvert::Connection::RHEVTarget') + ); +diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl +index dead384..b438766 100755 +--- a/v2v/virt-v2v.pl ++++ b/v2v/virt-v2v.pl +@@ -518,8 +518,12 @@ v2vdie __('Guest doesn\'t define any storage devices') + $source->copy_storage($target, $output_format, $output_sparse); + + # Open a libguestfs handle on the guest's storage devices ++my @disks = map { [ $_->{device}, ++ $_->{dst}->get_path(), ++ $_->{dst}->get_format() ] } @{$meta->{disks}}; ++ + my $g = new Sys::VirtConvert::GuestfsHandle( +- $meta->{disks}, ++ \@disks, + $transferiso, + $output_method eq 'rhev' + ); From d8e2462b5ceb350a2ec94d60f7966ba1fa729b63 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 01:58:53 -0600 Subject: [PATCH 007/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index eeaeffe..ad8b9e7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.8.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -166,6 +166,9 @@ rm -rf %{buildroot} %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 0.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 - New upstream release 0.8.3. - Include upstream patch to fix whitespace problems in PO files. From 670b6fe9e06ada927d31f421a61ff35dc53e311c Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Mon, 25 Jun 2012 13:46:14 +0100 Subject: [PATCH 008/235] New upstream release 0.8.8 --- .gitignore | 11 +++--- sources | 2 +- virt-v2v-0.8.3-01-bd513aaf.patch | 67 -------------------------------- virt-v2v.spec | 53 +++++++++++++------------ 4 files changed, 34 insertions(+), 99 deletions(-) delete mode 100644 virt-v2v-0.8.3-01-bd513aaf.patch diff --git a/.gitignore b/.gitignore index ecd4dd5..99b68b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,11 @@ # RPM target directories -/noarch /x86_64 # Version-dependent build artifacts -/.build-0.8.1-1.fc*.log -/virt-v2v-v0.8.1 -/virt-v2v-0.8.1-1.fc*.src.rpm +/.build-*.log +/virt-v2v-v*/ +/virt-v2v-*.src.rpm +/results_virt-v2v/ # Source -/virt-v2v-v0.8.1.tar.gz -/virt-v2v-v0.8.3.tar.gz +/virt-v2v-v*.tar.gz diff --git a/sources b/sources index 0c31efb..b80b4d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -125315e4901b2dfae16590a746e35bfc virt-v2v-v0.8.3.tar.gz +534cc036325b8de0ebbf6c97f9f02598 virt-v2v-v0.8.8.tar.gz diff --git a/virt-v2v-0.8.3-01-bd513aaf.patch b/virt-v2v-0.8.3-01-bd513aaf.patch deleted file mode 100644 index d8d4081..0000000 --- a/virt-v2v-0.8.3-01-bd513aaf.patch +++ /dev/null @@ -1,67 +0,0 @@ -From bd513aaf12a9cd27432eb36d341fd88f4d64dac4 Mon Sep 17 00:00:00 2001 -From: Matthew Booth -Date: Fri, 19 Aug 2011 17:43:55 +0100 -Subject: [PATCH] Fix whitespace issues in translations - ---- - po/es.po | 2 +- - po/nl.po | 2 +- - po/pl.po | 2 +- - po/uk.po | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/po/es.po b/po/es.po -index c24bf59..09fb7fe 100644 ---- a/po/es.po -+++ b/po/es.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Héctor Daniel Cabrera , 2011. - msgid "" -diff --git a/po/nl.po b/po/nl.po -index 3f88fa0..fe74413 100644 ---- a/po/nl.po -+++ b/po/nl.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Geert Warrink , 2011. - msgid "" -diff --git a/po/pl.po b/po/pl.po -index 6465997..9508124 100644 ---- a/po/pl.po -+++ b/po/pl.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Piotr Drąg , 2011. - msgid "" -diff --git a/po/uk.po b/po/uk.po -index 13172bd..21676bc 100644 ---- a/po/uk.po -+++ b/po/uk.po -@@ -1,7 +1,7 @@ - # SOME DESCRIPTIVE TITLE. - # Copyright (C) YEAR Red Hat Inc. - # This file is distributed under the same license as the PACKAGE package. --# -+# - # mdbooth , 2011. - # Yuri Chornoivan , 2011. - msgid "" --- -1.7.6 - diff --git a/virt-v2v.spec b/virt-v2v.spec index ad8b9e7..deb2d05 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v -Version: 0.8.3 -Release: 2%{?dist} +Version: 0.8.8 +Release: 1%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -16,12 +16,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # local seq no: the order the patches should be applied in # git commit: the first 8 characters of the git commit hash -Patch1: virt-v2v-0.8.3-01-bd513aaf.patch - # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't # available. +%if 0%{?rhel} >= 6 +ExclusiveArch: x86_64 +%else ExclusiveArch: %{ix86} x86_64 +%endif # Build system direct requirements BuildRequires: gettext @@ -41,35 +43,31 @@ BuildRequires: perl(Module::Pluggable) BuildRequires: perl(Net::HTTPS) BuildRequires: perl(Net::SSL) BuildRequires: perl(Sys::Guestfs) -BuildRequires: perl(Sys::Guestfs::Lib) BuildRequires: perl(Sys::Virt) +BuildRequires: perl(Term::ProgressBar) BuildRequires: perl(URI) BuildRequires: perl(XML::DOM) BuildRequires: perl(XML::DOM::XPath) BuildRequires: perl(XML::Writer) -# This is a bug introduced by f2c5c8fa337f361057353ffa3fe6539cb1a5823c -# perl(Term::ProgressBar) should not be a build requirement -BuildRequires: perl(Term::ProgressBar) - -# Need an explicit package dependency for version requires -BuildRequires: perl-libguestfs >= 1:1.6.0 +BuildRequires: perl-Sys-Guestfs >= 1:1.14.0 BuildRequires: perl-hivex >= 1.2.2 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -# Need an explicit package dependency for version requires -Requires: perl-libguestfs >= 1:1.6.0 +# Required for the name optional argument to add_drive_opts +Requires: perl-Sys-Guestfs >= 1:1.14.0 + +# Undocumented from antiquity Requires: perl-hivex >= 1.2.2 -# Net::SSL is loaded dynamically by Net::HTTPS in -# Sys::VirtConvert::Transfer::ESX. The dependency isn't automatically -# discovered. -Requires: perl(Net::SSL) +# Required for passing flags to get_xml_description +Requires: perl(Sys::Virt) >= 0.2.4 -# Term::ProgressBar is loaded conditionally. The dependency isn't automatically -# discovered -Requires: perl(Term::ProgressBar) +# Net::SSL and Net::HTTPS are loaded with require rather than use, which +# rpmbuild doesn't seem to discover automatically. +Requires: perl(Net::SSL) +Requires: perl(Net::HTTPS) # Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt Requires: libvirt >= 0.8.1 @@ -78,14 +76,11 @@ Requires: libvirt >= 0.8.1 Requires: /usr/bin/mkisofs # For guest image inspection -Requires: /usr/bin/qemu-img +Requires: /usr/bin/qemu-img # For ssh transfers Requires: /usr/bin/ssh -# For device_map lens -Requires: augeas-libs => augeas-libs-0.7.2-4 - %description virt-v2v is a tool for converting and importing virtual machines to @@ -96,7 +91,6 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX. %prep %setup -q -n %{name}-v%{version} -%patch1 -p1 %build %{__perl} Build.PL @@ -118,6 +112,12 @@ rm -rf %{buildroot} statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v mkdir -p $statedir/software +# Copy Windows dependencies into place +windir=$statedir/software/windows +mkdir -p $windir + +cp windows/rhsrvany.exe windows/firstboot.bat $windir/ + mkdir -p %{buildroot}%{_sysconfdir} cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ cp v2v/virt-v2v.db $statedir/ @@ -166,6 +166,9 @@ rm -rf %{buildroot} %changelog +* Mon Jun 25 2012 Matthew Booth - 0.8.8-1 +- Rebase to upstream version 0.8.8 + * Sat Jan 14 2012 Fedora Release Engineering - 0.8.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 935c45107ecdc2dc2a86d10bcd9a8aabf3abcc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 10 Jul 2012 13:15:26 +0200 Subject: [PATCH 009/235] Perl 5.16 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index deb2d05..89ad879 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.8.8 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -166,6 +166,9 @@ rm -rf %{buildroot} %changelog +* Tue Jul 10 2012 Petr Pisar - 0.8.8-2 +- Perl 5.16 rebuild + * Mon Jun 25 2012 Matthew Booth - 0.8.8-1 - Rebase to upstream version 0.8.8 From 5fd58c0eb43b95f9b0ed0b7770dfe580869c3abc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 21:49:48 -0500 Subject: [PATCH 010/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 89ad879..a18433a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.8.8 -Release: 2%{?dist}%{?extra_release} +Release: 3%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -166,6 +166,9 @@ rm -rf %{buildroot} %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 0.8.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue Jul 10 2012 Petr Pisar - 0.8.8-2 - Perl 5.16 rebuild From 3cdbc99c57232e47a0751774f65232b981cd2466 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 6 Dec 2012 15:17:32 +0000 Subject: [PATCH 011/235] New upstream version 0.9.0 --- sources | 2 +- virt-v2v.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index b80b4d1..aaf49ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -534cc036325b8de0ebbf6c97f9f02598 virt-v2v-v0.8.8.tar.gz +652decfdf85a6d9091de2c0d3cf59489 virt-v2v-v0.9.0.tar.gz diff --git a/virt-v2v.spec b/virt-v2v.spec index a18433a..065ff17 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v -Version: 0.8.8 -Release: 3%{?dist}%{?extra_release} +Version: 0.9.0 +Release: 1%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -166,6 +166,9 @@ rm -rf %{buildroot} %changelog +* Thu Dec 6 2012 Matthew Booth - 0.9.0-1 +- New upstream release 0.9.0 + * Sun Jul 22 2012 Fedora Release Engineering - 0.8.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 621a89ab7c30fe1f1e0cd2dcc75abe903d93c766 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 6 Dec 2012 15:40:09 +0000 Subject: [PATCH 012/235] Add missing dep Archive::Extract --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 065ff17..cce6aa3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -36,6 +36,7 @@ BuildRequires: perl(Test::Pod::Coverage) BuildRequires: perl(Module::Find) # Runtime perl modules also required at build time for use_ok test +BuildRequires: perl(Archive::Extract) BuildRequires: perl(DateTime) BuildRequires: perl(IO::String) BuildRequires: perl(Locale::TextDomain) From 9fe2cbe45933dbd13b6f3cbb7d79c8d117837aa3 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 6 Dec 2012 16:16:43 +0000 Subject: [PATCH 013/235] Add missing dep Digest::SHA1 --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index cce6aa3..be7ac88 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -38,6 +38,7 @@ BuildRequires: perl(Module::Find) # Runtime perl modules also required at build time for use_ok test BuildRequires: perl(Archive::Extract) BuildRequires: perl(DateTime) +BuildRequires: perl(Digest::SHA1) BuildRequires: perl(IO::String) BuildRequires: perl(Locale::TextDomain) BuildRequires: perl(Module::Pluggable) From bda6837d2da80a974f14b224521750285707d2ae Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 20:50:24 -0600 Subject: [PATCH 014/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index be7ac88..4cdb539 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.9.0 -Release: 1%{?dist}%{?extra_release} +Release: 2%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM Group: Applications/System @@ -168,6 +168,9 @@ rm -rf %{buildroot} %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 0.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Thu Dec 6 2012 Matthew Booth - 0.9.0-1 - New upstream release 0.9.0 From a224796ba7f5a753ac5146c129c7e1a8d53b798c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 3 Jul 2013 14:51:49 +0100 Subject: [PATCH 015/235] Miscellaneous fixes for Fedora >= 18. - Default to using the appliance backend, since in Fedora >= 18 the libvirt backend doesn't support the 'iface' parameter which virt-v2v requires. - Add BR perl(Sys::Syslog), required to run the tests. - Remove some cruft from the spec file. --- virt-v2v-use-appliance-backend.patch | 15 +++++++++++++ virt-v2v.spec | 33 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 virt-v2v-use-appliance-backend.patch diff --git a/virt-v2v-use-appliance-backend.patch b/virt-v2v-use-appliance-backend.patch new file mode 100644 index 0000000..ad461fb --- /dev/null +++ b/virt-v2v-use-appliance-backend.patch @@ -0,0 +1,15 @@ +--- virt-v2v-v0.9.0.old/lib/Sys/VirtConvert/GuestfsHandle.pm 2012-12-06 15:09:51.000000000 +0000 ++++ virt-v2v-v0.9.0/lib/Sys/VirtConvert/GuestfsHandle.pm 2013-07-03 14:48:53.049335387 +0100 +@@ -76,6 +76,12 @@ + my $interface = "ide"; + + $g = Sys::Guestfs->new(); ++ ++ # Fedora-specific patch: The libvirt backend used in Fedora >= ++ # 18 does not support setting iface parameters. Therefore ++ # ensure we are using the direct (appliance) backend. ++ $g->set_attach_method ("appliance"); ++ + foreach my $disk (@{$disks}) { + my ($name, $path, $format) = @$disk; + diff --git a/virt-v2v.spec b/virt-v2v.spec index 4cdb539..2367f84 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,20 +1,16 @@ Name: virt-v2v Version: 0.9.0 -Release: 2%{?dist}%{?extra_release} +Release: 3%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM -Group: Applications/System License: GPLv2+ and LGPLv2+ URL: http://git.fedorahosted.org/git/virt-v2v.git -Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -# Backported upstream patches -# Naming scheme: ---.patch -# name: virt-v2v -# version: the version of virt-v2v the patch was originally rebased to -# local seq no: the order the patches should be applied in -# git commit: the first 8 characters of the git commit hash +Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz + +# Non-upstream patch to default to using the appliance backend +# for Fedora >= 18. +Patch1: virt-v2v-use-appliance-backend.patch # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't @@ -45,6 +41,7 @@ BuildRequires: perl(Module::Pluggable) BuildRequires: perl(Net::HTTPS) BuildRequires: perl(Net::SSL) BuildRequires: perl(Sys::Guestfs) +BuildRequires: perl(Sys::Syslog) BuildRequires: perl(Sys::Virt) BuildRequires: perl(Term::ProgressBar) BuildRequires: perl(URI) @@ -93,6 +90,8 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX. %prep %setup -q -n %{name}-v%{version} +%patch1 -p1 + %build %{__perl} Build.PL @@ -103,7 +102,6 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX. %install -rm -rf %{buildroot} ./Build install \ --destdir %{buildroot} \ --installdirs vendor \ @@ -136,13 +134,7 @@ cp v2v/virt-v2v.db $statedir/ ./Build test -%clean -rm -rf %{buildroot} - - %files -f %{name}.lang -%defattr(-,root,root,-) - %doc TODO.txt %doc META.yml %doc ChangeLog @@ -168,6 +160,13 @@ rm -rf %{buildroot} %changelog +* Wed Jul 3 2013 Richard W.M. Jones - 0.9.0-3 +- Default to using the appliance backend, since in Fedora >= 18 the + libvirt backend doesn't support the 'iface' parameter which virt-v2v + requires. +- Add BR perl(Sys::Syslog), required to run the tests. +- Remove some cruft from the spec file. + * Fri Feb 15 2013 Fedora Release Engineering - 0.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 6c163da4d5fbd67610f67949e93204b1281bfcb2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 01:18:52 -0500 Subject: [PATCH 016/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 2367f84..778fe77 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.9.0 -Release: 3%{?dist}%{?extra_release} +Release: 4%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM License: GPLv2+ and LGPLv2+ @@ -160,6 +160,9 @@ cp v2v/virt-v2v.db $statedir/ %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 0.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Wed Jul 3 2013 Richard W.M. Jones - 0.9.0-3 - Default to using the appliance backend, since in Fedora >= 18 the libvirt backend doesn't support the 'iface' parameter which virt-v2v From 6f7b339f018e1735bc70a826c8691fa425251a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 8 Aug 2013 23:54:01 +0200 Subject: [PATCH 017/235] Perl 5.18 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 778fe77..90bb04e 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.9.0 -Release: 4%{?dist}%{?extra_release} +Release: 5%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM License: GPLv2+ and LGPLv2+ @@ -160,6 +160,9 @@ cp v2v/virt-v2v.db $statedir/ %changelog +* Thu Aug 08 2013 Petr Pisar - 0.9.0-5 +- Perl 5.18 rebuild + * Sun Aug 04 2013 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 79f47d1cc3aa78b1d850e584e124e717f249a637 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:49:02 -0500 Subject: [PATCH 018/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 90bb04e..e809ea3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.9.0 -Release: 5%{?dist}%{?extra_release} +Release: 6%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM License: GPLv2+ and LGPLv2+ @@ -160,6 +160,9 @@ cp v2v/virt-v2v.db $statedir/ %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 0.9.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Aug 08 2013 Petr Pisar - 0.9.0-5 - Perl 5.18 rebuild From e61741b6b11738aa7ced28388d1fb6976306e79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 27 Jun 2014 17:28:39 +0200 Subject: [PATCH 019/235] Fix license metadata --- ...-The-license-metadata-must-be-a-list.patch | 34 +++++++++++++++++++ virt-v2v.spec | 9 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch diff --git a/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch b/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch new file mode 100644 index 0000000..2feb69f --- /dev/null +++ b/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch @@ -0,0 +1,34 @@ +From 6ea7529da49959ff164f39eae4423fdc730f9753 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 27 Jun 2014 17:20:00 +0200 +Subject: [PATCH] The license metadata must be a list +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CPAN::Meta::Spec defines the license value must be an array reference. +However current Build.PL uses simple scalar. This breaks generating +META.* files which breaks tests with recent Module::Build 0.4205. + +https://bugzilla.redhat.com/show_bug.cgi?id=1083430 +Signed-off-by: Petr Písař +--- + Build.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Build.PL b/Build.PL +index 55cee55..0ccace3 100644 +--- a/Build.PL ++++ b/Build.PL +@@ -316,7 +316,7 @@ my $build = $class->new ( + script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ], + meta_add => { + resources => { +- license => "http://www.gnu.org/licenses/gpl.html", ++ license => [ "http://www.gnu.org/licenses/gpl.html" ], + homepage => "http://people.redhat.com/mbooth/virt-v2v/", + repository => "git://git.fedorahosted.org/virt-v2v.git", + MailingList => "http://www.redhat.com/mailman/listinfo/libguestfs", +-- +1.9.3 + diff --git a/virt-v2v.spec b/virt-v2v.spec index e809ea3..57c9d17 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.9.0 -Release: 6%{?dist}%{?extra_release} +Release: 7%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM License: GPLv2+ and LGPLv2+ @@ -12,6 +12,9 @@ Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{versio # for Fedora >= 18. Patch1: virt-v2v-use-appliance-backend.patch +# Fix license metadata, bug #1083430 +Patch2: virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch + # Unfortunately, despite really being noarch, we have to make virt-v2v arch # dependent to avoid build failures on architectures where libguestfs isn't # available. @@ -91,6 +94,7 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX. %setup -q -n %{name}-v%{version} %patch1 -p1 +%patch2 -p1 %build @@ -160,6 +164,9 @@ cp v2v/virt-v2v.db $statedir/ %changelog +* Fri Jun 27 2014 Petr Pisar - 0.9.0-7 +- Fix license metadata (bug #1083430) + * Sun Jun 08 2014 Fedora Release Engineering - 0.9.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From aa0901eab349e5cb664cc67efd633b4c8e85d3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 27 Jun 2014 17:34:46 +0200 Subject: [PATCH 020/235] Fix changelog entry --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 57c9d17..1f2fc84 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -262,5 +262,5 @@ cp v2v/virt-v2v.db $statedir/ * Tue Sep 15 2009 Matthew Booth - 0.2.0-1 - Update to release 0.2.0 -* Tue Sep 4 2009 Matthew Booth - 0.1.0-1 +* Fri Sep 4 2009 Matthew Booth - 0.1.0-1 - Initial specfile From 3281f2d8adeb25afc2a38b8580c7924981e4bf58 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 07:58:35 +0000 Subject: [PATCH 021/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 1f2fc84..da697e0 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,6 +1,6 @@ Name: virt-v2v Version: 0.9.0 -Release: 7%{?dist}%{?extra_release} +Release: 8%{?dist}%{?extra_release} Summary: Convert a virtual machine to run on KVM License: GPLv2+ and LGPLv2+ @@ -164,6 +164,9 @@ cp v2v/virt-v2v.db $statedir/ %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 0.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Jun 27 2014 Petr Pisar - 0.9.0-7 - Fix license metadata (bug #1083430) From 969ea56ce1bc0b539781369cd3334d3d9fa19b46 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 6 Sep 2014 18:17:22 +0100 Subject: [PATCH 022/235] Replaced by virt-v2v subpackage of libguestfs. --- .gitignore | 11 - dead.package | 1 + sources | 1 - virt-v2v-use-appliance-backend.patch | 15 - ...-The-license-metadata-must-be-a-list.patch | 34 --- virt-v2v.spec | 269 ------------------ 6 files changed, 1 insertion(+), 330 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 sources delete mode 100644 virt-v2v-use-appliance-backend.patch delete mode 100644 virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch delete mode 100644 virt-v2v.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 99b68b2..0000000 --- a/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# RPM target directories -/x86_64 - -# Version-dependent build artifacts -/.build-*.log -/virt-v2v-v*/ -/virt-v2v-*.src.rpm -/results_virt-v2v/ - -# Source -/virt-v2v-v*.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..70f5671 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Replaced by virt-v2v subpackage of libguestfs. diff --git a/sources b/sources deleted file mode 100644 index aaf49ca..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -652decfdf85a6d9091de2c0d3cf59489 virt-v2v-v0.9.0.tar.gz diff --git a/virt-v2v-use-appliance-backend.patch b/virt-v2v-use-appliance-backend.patch deleted file mode 100644 index ad461fb..0000000 --- a/virt-v2v-use-appliance-backend.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- virt-v2v-v0.9.0.old/lib/Sys/VirtConvert/GuestfsHandle.pm 2012-12-06 15:09:51.000000000 +0000 -+++ virt-v2v-v0.9.0/lib/Sys/VirtConvert/GuestfsHandle.pm 2013-07-03 14:48:53.049335387 +0100 -@@ -76,6 +76,12 @@ - my $interface = "ide"; - - $g = Sys::Guestfs->new(); -+ -+ # Fedora-specific patch: The libvirt backend used in Fedora >= -+ # 18 does not support setting iface parameters. Therefore -+ # ensure we are using the direct (appliance) backend. -+ $g->set_attach_method ("appliance"); -+ - foreach my $disk (@{$disks}) { - my ($name, $path, $format) = @$disk; - diff --git a/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch b/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch deleted file mode 100644 index 2feb69f..0000000 --- a/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6ea7529da49959ff164f39eae4423fdc730f9753 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Fri, 27 Jun 2014 17:20:00 +0200 -Subject: [PATCH] The license metadata must be a list -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CPAN::Meta::Spec defines the license value must be an array reference. -However current Build.PL uses simple scalar. This breaks generating -META.* files which breaks tests with recent Module::Build 0.4205. - -https://bugzilla.redhat.com/show_bug.cgi?id=1083430 -Signed-off-by: Petr Písař ---- - Build.PL | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Build.PL b/Build.PL -index 55cee55..0ccace3 100644 ---- a/Build.PL -+++ b/Build.PL -@@ -316,7 +316,7 @@ my $build = $class->new ( - script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ], - meta_add => { - resources => { -- license => "http://www.gnu.org/licenses/gpl.html", -+ license => [ "http://www.gnu.org/licenses/gpl.html" ], - homepage => "http://people.redhat.com/mbooth/virt-v2v/", - repository => "git://git.fedorahosted.org/virt-v2v.git", - MailingList => "http://www.redhat.com/mailman/listinfo/libguestfs", --- -1.9.3 - diff --git a/virt-v2v.spec b/virt-v2v.spec deleted file mode 100644 index da697e0..0000000 --- a/virt-v2v.spec +++ /dev/null @@ -1,269 +0,0 @@ -Name: virt-v2v -Version: 0.9.0 -Release: 8%{?dist}%{?extra_release} -Summary: Convert a virtual machine to run on KVM - -License: GPLv2+ and LGPLv2+ -URL: http://git.fedorahosted.org/git/virt-v2v.git - -Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz - -# Non-upstream patch to default to using the appliance backend -# for Fedora >= 18. -Patch1: virt-v2v-use-appliance-backend.patch - -# Fix license metadata, bug #1083430 -Patch2: virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch - -# Unfortunately, despite really being noarch, we have to make virt-v2v arch -# dependent to avoid build failures on architectures where libguestfs isn't -# available. -%if 0%{?rhel} >= 6 -ExclusiveArch: x86_64 -%else -ExclusiveArch: %{ix86} x86_64 -%endif - -# Build system direct requirements -BuildRequires: gettext -BuildRequires: perl -BuildRequires: perl(Module::Build) -BuildRequires: perl(ExtUtils::Manifest) -BuildRequires: perl(Test::More) -BuildRequires: perl(Test::Pod) -BuildRequires: perl(Test::Pod::Coverage) -BuildRequires: perl(Module::Find) - -# Runtime perl modules also required at build time for use_ok test -BuildRequires: perl(Archive::Extract) -BuildRequires: perl(DateTime) -BuildRequires: perl(Digest::SHA1) -BuildRequires: perl(IO::String) -BuildRequires: perl(Locale::TextDomain) -BuildRequires: perl(Module::Pluggable) -BuildRequires: perl(Net::HTTPS) -BuildRequires: perl(Net::SSL) -BuildRequires: perl(Sys::Guestfs) -BuildRequires: perl(Sys::Syslog) -BuildRequires: perl(Sys::Virt) -BuildRequires: perl(Term::ProgressBar) -BuildRequires: perl(URI) -BuildRequires: perl(XML::DOM) -BuildRequires: perl(XML::DOM::XPath) -BuildRequires: perl(XML::Writer) - -BuildRequires: perl-Sys-Guestfs >= 1:1.14.0 -BuildRequires: perl-hivex >= 1.2.2 - -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - -# Required for the name optional argument to add_drive_opts -Requires: perl-Sys-Guestfs >= 1:1.14.0 - -# Undocumented from antiquity -Requires: perl-hivex >= 1.2.2 - -# Required for passing flags to get_xml_description -Requires: perl(Sys::Virt) >= 0.2.4 - -# Net::SSL and Net::HTTPS are loaded with require rather than use, which -# rpmbuild doesn't seem to discover automatically. -Requires: perl(Net::SSL) -Requires: perl(Net::HTTPS) - -# Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt -Requires: libvirt >= 0.8.1 - -# For GuestOS transfer image -Requires: /usr/bin/mkisofs - -# For guest image inspection -Requires: /usr/bin/qemu-img - -# For ssh transfers -Requires: /usr/bin/ssh - - -%description -virt-v2v is a tool for converting and importing virtual machines to -libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a -variety of guest operating systems from libvirt-managed hosts and VMware ESX. - - -%prep -%setup -q -n %{name}-v%{version} - -%patch1 -p1 -%patch2 -p1 - - -%build -%{__perl} Build.PL -./Build - -# perl doesn't need debuginfo -%define debug_package %{nil} - - -%install -./Build install \ - --destdir %{buildroot} \ - --installdirs vendor \ - --install_path locale=%{_datadir}/locale \ - --install_path confdoc=%{_mandir}/man5 - -# Create lib directory, used for holding software to be installed in guests -statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v -mkdir -p $statedir/software - -# Copy Windows dependencies into place -windir=$statedir/software/windows -mkdir -p $windir - -cp windows/rhsrvany.exe windows/firstboot.bat $windir/ - -mkdir -p %{buildroot}%{_sysconfdir} -cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ -cp v2v/virt-v2v.db $statedir/ - -%find_lang %{name} - -# Not clear why this is being created as there is nothing arch-specific in -# virt-v2v. It isn't packaged, though, so we need to delete it. -[ -d "%{buildroot}/%{perl_archlib}" ] && - find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm - - -%check -./Build test - - -%files -f %{name}.lang -%doc TODO.txt -%doc META.yml -%doc ChangeLog -%doc COPYING COPYING.LIB - -# For noarch packages: vendorlib -%{perl_vendorlib}/* - -# Man pages -%{_mandir}/man1/*.1* -%{_mandir}/man3/*.3* -%{_mandir}/man5/*.5* - -# Executables -%attr(0755,root,root) %{_bindir}/virt-v2v -%attr(0755,root,root) %{_bindir}/virt-p2v-server - -%dir %{_localstatedir}/lib/virt-v2v - -%config(noreplace) %{_sysconfdir}/virt-v2v.conf -%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db -%config(noreplace) %{_localstatedir}/lib/virt-v2v/software - - -%changelog -* Mon Aug 18 2014 Fedora Release Engineering - 0.9.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Jun 27 2014 Petr Pisar - 0.9.0-7 -- Fix license metadata (bug #1083430) - -* Sun Jun 08 2014 Fedora Release Engineering - 0.9.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Aug 08 2013 Petr Pisar - 0.9.0-5 -- Perl 5.18 rebuild - -* Sun Aug 04 2013 Fedora Release Engineering - 0.9.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 3 2013 Richard W.M. Jones - 0.9.0-3 -- Default to using the appliance backend, since in Fedora >= 18 the - libvirt backend doesn't support the 'iface' parameter which virt-v2v - requires. -- Add BR perl(Sys::Syslog), required to run the tests. -- Remove some cruft from the spec file. - -* Fri Feb 15 2013 Fedora Release Engineering - 0.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Dec 6 2012 Matthew Booth - 0.9.0-1 -- New upstream release 0.9.0 - -* Sun Jul 22 2012 Fedora Release Engineering - 0.8.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Jul 10 2012 Petr Pisar - 0.8.8-2 -- Perl 5.16 rebuild - -* Mon Jun 25 2012 Matthew Booth - 0.8.8-1 -- Rebase to upstream version 0.8.8 - -* Sat Jan 14 2012 Fedora Release Engineering - 0.8.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 -- New upstream release 0.8.3. -- Include upstream patch to fix whitespace problems in PO files. -- Remove virt-p2v from build by synchronizing the spec file so it - almost matches the one in RHEL 6.2. Note that virt-p2v is built in - a separate SRPM called rubygem-virt-p2v. - -* Thu Jul 21 2011 Petr Sabata - 0.8.1-4 -- Perl mass rebuild - -* Tue Jul 19 2011 Petr Sabata - 0.8.1-3 -- Perl mass rebuild - -* Tue May 17 2011 Matthew Booth - 0.8.1-2 -- Remove echoe build dependency -- Fix YAML error during P2V (RHBZ#705113) - -* Tue Apr 26 2011 Matthew Booth - 0.8.1-1 -- Update to release 0.8.1 - -* Tue Apr 19 2011 Matthew Booth - 0.8.0-1 -- Update to release 0.8.0 -- Include virt-p2v - -* Mon Feb 07 2011 Fedora Release Engineering - 0.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Nov 4 2010 Matthew Booth - 0.7.0-1 -- Update to release 0.7.0 - -* Thu Jul 1 2010 Matthew Booth - 0.6.1-1 -- Only build virt-v2v on architectures where libguestfs is available - -* Mon Jun 21 2010 Matthew Booth - 0.6.1-0 -- Update to release 0.6.1 -- Disable building of debuginfo - -* Mon Feb 22 2010 Matthew Booth - 0.4.0-1 -- Update to release 0.4.0 -- Change dependency on genisofs to mkisofs -- Update libguestfs dependency to 1.0.84 -- Add perl module dependencies: LWP::UserAgent, Net::HTTPS, Net::SSL, Net::URI -- Remove perl module dependency: Config::Tiny -- Add explicit build dependency on perl -- Add patch: virt-v2v-0.4.0-remove-fr.patch -- Add patch: virt-v2v-0.4.0-exechelper-cleanup.patch -- Add patch: virt-v2v-0.4.0-exechelper-tmpfile.patch - -* Mon Dec 7 2009 Stepan Kasal - 0.3.2-2 -- rebuild against perl 5.10.1 - -* Mon Nov 9 2009 Matthew Booth - 0.3.2-1 -- Update to release 0.3.2 -- Add BuildRequires gettext - -* Mon Nov 9 2009 Matthew Booth - 0.3.0-1 -- Update to release 0.3.0 - -* Tue Sep 15 2009 Matthew Booth - 0.2.0-1 -- Update to release 0.2.0 - -* Fri Sep 4 2009 Matthew Booth - 0.1.0-1 -- Initial specfile From 8beed2edaf223493e92d4f6c84b12a3bde3cf01c Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: Tue, 3 Dec 2019 10:24:57 +0100 Subject: [PATCH 023/235] Revert "Replaced by virt-v2v subpackage of libguestfs." This reverts commit 969ea56ce1bc0b539781369cd3334d3d9fa19b46. Unretirement request: https://pagure.io/releng/issue/9072 Signed-off-by: Tomas Hrcka --- .gitignore | 11 + dead.package | 1 - sources | 1 + virt-v2v-use-appliance-backend.patch | 15 + ...-The-license-metadata-must-be-a-list.patch | 34 +++ virt-v2v.spec | 269 ++++++++++++++++++ 6 files changed, 330 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 dead.package create mode 100644 sources create mode 100644 virt-v2v-use-appliance-backend.patch create mode 100644 virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch create mode 100644 virt-v2v.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99b68b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# RPM target directories +/x86_64 + +# Version-dependent build artifacts +/.build-*.log +/virt-v2v-v*/ +/virt-v2v-*.src.rpm +/results_virt-v2v/ + +# Source +/virt-v2v-v*.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index 70f5671..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Replaced by virt-v2v subpackage of libguestfs. diff --git a/sources b/sources new file mode 100644 index 0000000..aaf49ca --- /dev/null +++ b/sources @@ -0,0 +1 @@ +652decfdf85a6d9091de2c0d3cf59489 virt-v2v-v0.9.0.tar.gz diff --git a/virt-v2v-use-appliance-backend.patch b/virt-v2v-use-appliance-backend.patch new file mode 100644 index 0000000..ad461fb --- /dev/null +++ b/virt-v2v-use-appliance-backend.patch @@ -0,0 +1,15 @@ +--- virt-v2v-v0.9.0.old/lib/Sys/VirtConvert/GuestfsHandle.pm 2012-12-06 15:09:51.000000000 +0000 ++++ virt-v2v-v0.9.0/lib/Sys/VirtConvert/GuestfsHandle.pm 2013-07-03 14:48:53.049335387 +0100 +@@ -76,6 +76,12 @@ + my $interface = "ide"; + + $g = Sys::Guestfs->new(); ++ ++ # Fedora-specific patch: The libvirt backend used in Fedora >= ++ # 18 does not support setting iface parameters. Therefore ++ # ensure we are using the direct (appliance) backend. ++ $g->set_attach_method ("appliance"); ++ + foreach my $disk (@{$disks}) { + my ($name, $path, $format) = @$disk; + diff --git a/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch b/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch new file mode 100644 index 0000000..2feb69f --- /dev/null +++ b/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch @@ -0,0 +1,34 @@ +From 6ea7529da49959ff164f39eae4423fdc730f9753 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 27 Jun 2014 17:20:00 +0200 +Subject: [PATCH] The license metadata must be a list +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CPAN::Meta::Spec defines the license value must be an array reference. +However current Build.PL uses simple scalar. This breaks generating +META.* files which breaks tests with recent Module::Build 0.4205. + +https://bugzilla.redhat.com/show_bug.cgi?id=1083430 +Signed-off-by: Petr Písař +--- + Build.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Build.PL b/Build.PL +index 55cee55..0ccace3 100644 +--- a/Build.PL ++++ b/Build.PL +@@ -316,7 +316,7 @@ my $build = $class->new ( + script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ], + meta_add => { + resources => { +- license => "http://www.gnu.org/licenses/gpl.html", ++ license => [ "http://www.gnu.org/licenses/gpl.html" ], + homepage => "http://people.redhat.com/mbooth/virt-v2v/", + repository => "git://git.fedorahosted.org/virt-v2v.git", + MailingList => "http://www.redhat.com/mailman/listinfo/libguestfs", +-- +1.9.3 + diff --git a/virt-v2v.spec b/virt-v2v.spec new file mode 100644 index 0000000..da697e0 --- /dev/null +++ b/virt-v2v.spec @@ -0,0 +1,269 @@ +Name: virt-v2v +Version: 0.9.0 +Release: 8%{?dist}%{?extra_release} +Summary: Convert a virtual machine to run on KVM + +License: GPLv2+ and LGPLv2+ +URL: http://git.fedorahosted.org/git/virt-v2v.git + +Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz + +# Non-upstream patch to default to using the appliance backend +# for Fedora >= 18. +Patch1: virt-v2v-use-appliance-backend.patch + +# Fix license metadata, bug #1083430 +Patch2: virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch + +# Unfortunately, despite really being noarch, we have to make virt-v2v arch +# dependent to avoid build failures on architectures where libguestfs isn't +# available. +%if 0%{?rhel} >= 6 +ExclusiveArch: x86_64 +%else +ExclusiveArch: %{ix86} x86_64 +%endif + +# Build system direct requirements +BuildRequires: gettext +BuildRequires: perl +BuildRequires: perl(Module::Build) +BuildRequires: perl(ExtUtils::Manifest) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Pod::Coverage) +BuildRequires: perl(Module::Find) + +# Runtime perl modules also required at build time for use_ok test +BuildRequires: perl(Archive::Extract) +BuildRequires: perl(DateTime) +BuildRequires: perl(Digest::SHA1) +BuildRequires: perl(IO::String) +BuildRequires: perl(Locale::TextDomain) +BuildRequires: perl(Module::Pluggable) +BuildRequires: perl(Net::HTTPS) +BuildRequires: perl(Net::SSL) +BuildRequires: perl(Sys::Guestfs) +BuildRequires: perl(Sys::Syslog) +BuildRequires: perl(Sys::Virt) +BuildRequires: perl(Term::ProgressBar) +BuildRequires: perl(URI) +BuildRequires: perl(XML::DOM) +BuildRequires: perl(XML::DOM::XPath) +BuildRequires: perl(XML::Writer) + +BuildRequires: perl-Sys-Guestfs >= 1:1.14.0 +BuildRequires: perl-hivex >= 1.2.2 + +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +# Required for the name optional argument to add_drive_opts +Requires: perl-Sys-Guestfs >= 1:1.14.0 + +# Undocumented from antiquity +Requires: perl-hivex >= 1.2.2 + +# Required for passing flags to get_xml_description +Requires: perl(Sys::Virt) >= 0.2.4 + +# Net::SSL and Net::HTTPS are loaded with require rather than use, which +# rpmbuild doesn't seem to discover automatically. +Requires: perl(Net::SSL) +Requires: perl(Net::HTTPS) + +# Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt +Requires: libvirt >= 0.8.1 + +# For GuestOS transfer image +Requires: /usr/bin/mkisofs + +# For guest image inspection +Requires: /usr/bin/qemu-img + +# For ssh transfers +Requires: /usr/bin/ssh + + +%description +virt-v2v is a tool for converting and importing virtual machines to +libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a +variety of guest operating systems from libvirt-managed hosts and VMware ESX. + + +%prep +%setup -q -n %{name}-v%{version} + +%patch1 -p1 +%patch2 -p1 + + +%build +%{__perl} Build.PL +./Build + +# perl doesn't need debuginfo +%define debug_package %{nil} + + +%install +./Build install \ + --destdir %{buildroot} \ + --installdirs vendor \ + --install_path locale=%{_datadir}/locale \ + --install_path confdoc=%{_mandir}/man5 + +# Create lib directory, used for holding software to be installed in guests +statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v +mkdir -p $statedir/software + +# Copy Windows dependencies into place +windir=$statedir/software/windows +mkdir -p $windir + +cp windows/rhsrvany.exe windows/firstboot.bat $windir/ + +mkdir -p %{buildroot}%{_sysconfdir} +cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ +cp v2v/virt-v2v.db $statedir/ + +%find_lang %{name} + +# Not clear why this is being created as there is nothing arch-specific in +# virt-v2v. It isn't packaged, though, so we need to delete it. +[ -d "%{buildroot}/%{perl_archlib}" ] && + find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm + + +%check +./Build test + + +%files -f %{name}.lang +%doc TODO.txt +%doc META.yml +%doc ChangeLog +%doc COPYING COPYING.LIB + +# For noarch packages: vendorlib +%{perl_vendorlib}/* + +# Man pages +%{_mandir}/man1/*.1* +%{_mandir}/man3/*.3* +%{_mandir}/man5/*.5* + +# Executables +%attr(0755,root,root) %{_bindir}/virt-v2v +%attr(0755,root,root) %{_bindir}/virt-p2v-server + +%dir %{_localstatedir}/lib/virt-v2v + +%config(noreplace) %{_sysconfdir}/virt-v2v.conf +%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db +%config(noreplace) %{_localstatedir}/lib/virt-v2v/software + + +%changelog +* Mon Aug 18 2014 Fedora Release Engineering - 0.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jun 27 2014 Petr Pisar - 0.9.0-7 +- Fix license metadata (bug #1083430) + +* Sun Jun 08 2014 Fedora Release Engineering - 0.9.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Aug 08 2013 Petr Pisar - 0.9.0-5 +- Perl 5.18 rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 0.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 3 2013 Richard W.M. Jones - 0.9.0-3 +- Default to using the appliance backend, since in Fedora >= 18 the + libvirt backend doesn't support the 'iface' parameter which virt-v2v + requires. +- Add BR perl(Sys::Syslog), required to run the tests. +- Remove some cruft from the spec file. + +* Fri Feb 15 2013 Fedora Release Engineering - 0.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Dec 6 2012 Matthew Booth - 0.9.0-1 +- New upstream release 0.9.0 + +* Sun Jul 22 2012 Fedora Release Engineering - 0.8.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 10 2012 Petr Pisar - 0.8.8-2 +- Perl 5.16 rebuild + +* Mon Jun 25 2012 Matthew Booth - 0.8.8-1 +- Rebase to upstream version 0.8.8 + +* Sat Jan 14 2012 Fedora Release Engineering - 0.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 +- New upstream release 0.8.3. +- Include upstream patch to fix whitespace problems in PO files. +- Remove virt-p2v from build by synchronizing the spec file so it + almost matches the one in RHEL 6.2. Note that virt-p2v is built in + a separate SRPM called rubygem-virt-p2v. + +* Thu Jul 21 2011 Petr Sabata - 0.8.1-4 +- Perl mass rebuild + +* Tue Jul 19 2011 Petr Sabata - 0.8.1-3 +- Perl mass rebuild + +* Tue May 17 2011 Matthew Booth - 0.8.1-2 +- Remove echoe build dependency +- Fix YAML error during P2V (RHBZ#705113) + +* Tue Apr 26 2011 Matthew Booth - 0.8.1-1 +- Update to release 0.8.1 + +* Tue Apr 19 2011 Matthew Booth - 0.8.0-1 +- Update to release 0.8.0 +- Include virt-p2v + +* Mon Feb 07 2011 Fedora Release Engineering - 0.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Nov 4 2010 Matthew Booth - 0.7.0-1 +- Update to release 0.7.0 + +* Thu Jul 1 2010 Matthew Booth - 0.6.1-1 +- Only build virt-v2v on architectures where libguestfs is available + +* Mon Jun 21 2010 Matthew Booth - 0.6.1-0 +- Update to release 0.6.1 +- Disable building of debuginfo + +* Mon Feb 22 2010 Matthew Booth - 0.4.0-1 +- Update to release 0.4.0 +- Change dependency on genisofs to mkisofs +- Update libguestfs dependency to 1.0.84 +- Add perl module dependencies: LWP::UserAgent, Net::HTTPS, Net::SSL, Net::URI +- Remove perl module dependency: Config::Tiny +- Add explicit build dependency on perl +- Add patch: virt-v2v-0.4.0-remove-fr.patch +- Add patch: virt-v2v-0.4.0-exechelper-cleanup.patch +- Add patch: virt-v2v-0.4.0-exechelper-tmpfile.patch + +* Mon Dec 7 2009 Stepan Kasal - 0.3.2-2 +- rebuild against perl 5.10.1 + +* Mon Nov 9 2009 Matthew Booth - 0.3.2-1 +- Update to release 0.3.2 +- Add BuildRequires gettext + +* Mon Nov 9 2009 Matthew Booth - 0.3.0-1 +- Update to release 0.3.0 + +* Tue Sep 15 2009 Matthew Booth - 0.2.0-1 +- Update to release 0.2.0 + +* Fri Sep 4 2009 Matthew Booth - 0.1.0-1 +- Initial specfile From 4f8d3a89229cceb593c266c3557bd0dc2e3e5822 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 3 Dec 2019 11:57:38 +0000 Subject: [PATCH 024/235] Import virt-v2v 1.41.8. --- .gitignore | 3 +- ...OTFILES-ml-which-aren-t-included-in-.patch | 48 ++ 0002-Add-license-file.patch | 371 ++++++++++++++++ libguestfs.keyring | Bin 0 -> 2823 bytes sources | 3 +- virt-v2v-use-appliance-backend.patch | 15 - ...-The-license-metadata-must-be-a-list.patch | 34 -- virt-v2v.spec | 409 ++++++++---------- 8 files changed, 614 insertions(+), 269 deletions(-) create mode 100644 0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch create mode 100644 0002-Add-license-file.patch create mode 100644 libguestfs.keyring delete mode 100644 virt-v2v-use-appliance-backend.patch delete mode 100644 virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch diff --git a/.gitignore b/.gitignore index 99b68b2..b00c2b0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ /results_virt-v2v/ # Source -/virt-v2v-v*.tar.gz +/virt-v2v-*.tar.gz +/virt-v2v-*.tar.gz.sig diff --git a/0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch b/0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch new file mode 100644 index 0000000..9546b62 --- /dev/null +++ b/0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch @@ -0,0 +1,48 @@ +From f80f1c31c9446f326484ae93ba4919586f4f3df8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 19 Nov 2019 15:25:07 +0000 +Subject: [PATCH 1/2] po: Remove some POTFILES-ml which aren't included in the + tarball. + +--- + Makefile.am | 2 ++ + po/POTFILES-ml | 3 --- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 638268d8b..50322eb69 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -113,6 +113,8 @@ po/POTFILES-ml: configure.ac + rm -f $@ $@-t + cd $(srcdir); \ + find common/ml* v2v -name '*.ml' | \ ++ grep -v '^common/mlprogress/' | \ ++ grep -v '^common/mlvisit/' | \ + grep -v '^v2v/config.ml$$' | \ + LC_ALL=C sort > $@-t + mv $@-t $@ +diff --git a/po/POTFILES-ml b/po/POTFILES-ml +index b5cebb2f8..eef7c5f3b 100644 +--- a/po/POTFILES-ml ++++ b/po/POTFILES-ml +@@ -6,7 +6,6 @@ common/mlgettext/common_gettext.ml + common/mllibvirt/libvirt.ml + common/mlpcre/PCRE.ml + common/mlpcre/pcre_tests.ml +-common/mlprogress/progress.ml + common/mlstdutils/guestfs_config.ml + common/mlstdutils/std_utils.ml + common/mlstdutils/std_utils_tests.ml +@@ -34,8 +33,6 @@ common/mlutils/c_utils.ml + common/mlutils/c_utils_unit_tests.ml + common/mlutils/unix_utils.ml + common/mlv2v/uefi.ml +-common/mlvisit/visit.ml +-common/mlvisit/visit_tests.ml + common/mlxml/xml.ml + v2v/DOM.ml + v2v/changeuid.ml +-- +2.23.0 + diff --git a/0002-Add-license-file.patch b/0002-Add-license-file.patch new file mode 100644 index 0000000..0cba373 --- /dev/null +++ b/0002-Add-license-file.patch @@ -0,0 +1,371 @@ +From 508cda917ad106ba4759eb2df98e28f97b4a4583 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 19 Nov 2019 15:36:53 +0000 +Subject: [PATCH 2/2] Add license file. + +--- + COPYING | 339 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + Makefile.am | 1 + + 2 files changed, 340 insertions(+) + create mode 100644 COPYING + +diff --git a/COPYING b/COPYING +new file mode 100644 +index 000000000..d159169d1 +--- /dev/null ++++ b/COPYING +@@ -0,0 +1,339 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Lesser General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Lesser General ++Public License instead of this License. +diff --git a/Makefile.am b/Makefile.am +index 50322eb69..e80076bbc 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -72,6 +72,7 @@ EXTRA_DIST = \ + check-mli.sh \ + common/.gitignore \ + common/README \ ++ COPYING \ + lib/guestfs-internal-all.h \ + m4/.gitignore \ + ocaml-link.sh \ +-- +2.23.0 + diff --git a/libguestfs.keyring b/libguestfs.keyring new file mode 100644 index 0000000000000000000000000000000000000000..bb3eb5537b7c398a10b7e2b26ca00af011d1a73e GIT binary patch literal 2823 zcma*o_cI%g0s!zNh@cv+7)4sDC~4KE_7;1u)D}doT2(9drl?iaDypbGOYOv{*;+Ne z_NqOjH0s^=-MxG7-Mt^)|M0o{WP+$kwNm-IfHZ)i6Laf8iDHZe#RnxvK!O)6rq(SO z@nx&>aN10t6koV0fbtX7ACWsLI0FyJ@Pfu|=B(A~m#PuweNW!6ZNw+iE3ku-=2jTl z-R1Kp&IJO$u+0}F)tr1faEy{Y7^AhU)R~C@f;L|U(;bZA7XFYV$_df=Lk(rcmOkB; z)S!`^x0lVz=h?HQMv1soy+K~IC@;3ib@n&WJo)^vM=e&012y5w5lC{1Vr$%-f)DP% zG8>+0I6T|x0-c17DN0oD5G)GJ#Tv0QA`_&1YxON$_gR+nsxWeR@+*U|;ZLu`<~ZZL zb}lAl0+}{y9KH#`dC0F=fKw4mK4tiq#hTXnNO|A2&LnCbl}J*`J=P6P2w)t%_#~Ni z<5CX?FlaaK45s4fc+`zxL=1ZQlr;uF8MB%kfJe&QF}FTU2GrLW zqJoL`^QF5~7La|K*qp<&i|iiuwuG5-c+Y`9hLqVU0-*=rT}zW^h4{n!24-?!w5B5L zJDHd~YR;~9RmRo6SXRVZTVuupiWE+tcT#U?Vt3D|Yd`JQml+mOs0ksk06veG>Pp2z z#$gwujCGqx!3oGYFjf5`VZ%40WH@#DMU8px4r`anayTMxVa8S98{78$W{Y!;Tf&rt zSzNbt%vP(LA0kH72+RFIT%0S@6L1R%0M>KpIoe{ZJ&?|OTt7orQ0hH2yK~J}8JshZ@W!LI z-M4NO3G6uuXK5#0R%+aih%MZ^WFL9}_K$Qbehiq7*6e-`(+o69#+mu^SL`>(PjE?$ z9v&ppPtvAeurx2;DNmz|ZRT#yC%{HfUf3#G4T^=Mjr9Px1o2T4nR zZ1pdjh{60h=v?i`kcvw;`D)ye0%1PQ9?@pTf4x9Uy*qWbcDF?m^#|U=sZiOQBTv2Y z(~KQ*e#|T6$(d4Ts2j0br{Rses!aL;(crmXCLY4B&~}|^F%LvR>xZ{aykw4w)kp)G z4Osxb<}R=Iv!|oBc|z)k#uVLs?9`AhKe_lhLRpA)6F3r*Zqo3lPHe9ol81_qi|G6E z4o8p3JOnWhHo?+waZ$Tpb-(8=hsu=04#-d2e^N!szo*8Pi~oqA#cCE_@*SO{6sje$ z@TI6RMbo~Lb#1F(g%6Q&6{ zGhr{7C@+l6doz=%hN^mxA)?LclnP^x9TpX)wspTkY{ZP}b>$Zd6`^l+ApCE`-U~Y0 z8dQ_!`=HxQOf%|&`*eUUp8m%S1qlC9x|sX|LVV>m!3iJpL3q~u?Yr_&_bqw@GMgtb zN3h@AXg%lu6!!dYX|f)6XpFTNudSQQe-nF3_5TuMQ>Fowak8uAJT7I5#M21UX135g zGs~4Rv<`522?`g~<~erUc;O#Fw;!L^bk+?M%vhK)dA(f}R;1HN;I3iF(sri&RGg#@ zmLH6Hvl@qcHG3@}a7PDlc*>8}W{`e__2>^mdZUqS>0?4cjI;Dtk!{ zw(y-Wq;TG}(Orqzk!Z%c%|qPg+y}T~ejB&}4bg}GSaRBuhJ5&ZtU(q$-2TO%x?bKn zU1C)(Zk#(Ue^|~mKr$>J`z}2l$uKQrztdude9E`_5nY=j(7beJO!_Lu=p~Umx*Bbe zaaXv_>XI}z5OKTqMuad$__xSPg7-(2T1z6Buf*FzTSBfhvZQ;&s%lAiRiC1qU!;#{ z?a-99*ww>gj$}coPZCZ=kn2x>W_Sm-wW8Tnxif_54<1wj?Yww`ghQ!<%2;(ex~CZS zA?P=)tdq7Dkzqb|PG;C0ai!-2Q}RaDC$I}%efl;L=XIxts=E7olcp#We%A3nmv>An zB(K#6d`=!EO{bI5n@^pN{57JI|8!|wis(l^Y83K&k&{mbs*Sg0F_LnBTp6U0nhVFs zKNtCW5Kw~{od{S8=fq-k&tLtin0=hH{bySx^qNerUuEu@8K=ce1hl}X`QND>DbTX&E$#Fqr>x8dD+%_ia%sA& z-@-E*k_;lOcEc%6!hgZXyKo9HW@$loJcll?W#7v3av>4)xk)$5uW9Xl12{vPP#z`m zs2LrYwcDJ&HuK}b>kIRTnf*>e6iy|jj4e6UTDs}z{H{%;>o`28AchP`#1vkm9%H*S zoU>DWN;;Bf(C({v%Oa!+`GzIYlq}nbB@yDgTO{;r`S7a>(eUJc9dp#8x&m$~?E>Xu zQZmBuyhnH{K?-A&Xb*XP+gLf1SLt4Z^c%7G#xO1hI(zGmafx@1gQYru<*%)iZ_dBb z|Bb1aek=H z10)q1$4)>Do*ODQWg)QV#uOR!W%mWq@$ijmO%<)Dw`_}VtiAD7H5t~=RB~bQs5ra` z{QU>pG`sAB!wj<-$;hilBy>4_~OJ z%0_>c24yng-j6e{8;$K_c_|KG(_0Vgl=ucn~i1=x; zm1?xq_{fi_!ESgT8TSC6zV8=KU~}{8(Uba&{@Aa*HUiPNuMfwx8iMynCX$p_SHS1q z?H$wO+UHHDDFVH{JO$}0dbDQ~KlwK(d(_iUCGf`Lc9V*IhQhxeD>9vpy|`)~+um=D zg<8_$!w*H}5~0!TlT&@NLjHT=7oM!nTRWd6X`@!!wmnL&U!>jUUx&4}yFY={wB8Nh zA0w#m_%Uc5ra3z_s6d+}gYQb!bB$suWZS)^%eRI~!J$G4-{nibYcoyw$8F-)9GhwL zf^`wukA9opp_kHg$rT81yy?ZwxKcCuY&Q-Tgt#e|=%fp}c+1aw|3(R~opy=CE+z?b z(>ZkYs>9)myz%Pn7-DP|f|$$RG@K;3*Nl@9ueJ1h%e-Y|PoG^3Zj$gJ#i&h}JG=F9 zm>>;qK4MTXwg%V0Aa!hzB$@>;3Lj>+*kFFI<>e{edDH)+`)Mn$^g1(hKL{1kC+A_C zjW|_`i^xn9b9DCEvrOrD6cpeXE)tMl%g%g8133|+O&aU#Vo9Kcqnew(); -+ -+ # Fedora-specific patch: The libvirt backend used in Fedora >= -+ # 18 does not support setting iface parameters. Therefore -+ # ensure we are using the direct (appliance) backend. -+ $g->set_attach_method ("appliance"); -+ - foreach my $disk (@{$disks}) { - my ($name, $path, $format) = @$disk; - diff --git a/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch b/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch deleted file mode 100644 index 2feb69f..0000000 --- a/virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6ea7529da49959ff164f39eae4423fdc730f9753 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Fri, 27 Jun 2014 17:20:00 +0200 -Subject: [PATCH] The license metadata must be a list -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CPAN::Meta::Spec defines the license value must be an array reference. -However current Build.PL uses simple scalar. This breaks generating -META.* files which breaks tests with recent Module::Build 0.4205. - -https://bugzilla.redhat.com/show_bug.cgi?id=1083430 -Signed-off-by: Petr Písař ---- - Build.PL | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Build.PL b/Build.PL -index 55cee55..0ccace3 100644 ---- a/Build.PL -+++ b/Build.PL -@@ -316,7 +316,7 @@ my $build = $class->new ( - script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ], - meta_add => { - resources => { -- license => "http://www.gnu.org/licenses/gpl.html", -+ license => [ "http://www.gnu.org/licenses/gpl.html" ], - homepage => "http://people.redhat.com/mbooth/virt-v2v/", - repository => "git://git.fedorahosted.org/virt-v2v.git", - MailingList => "http://www.redhat.com/mailman/listinfo/libguestfs", --- -1.9.3 - diff --git a/virt-v2v.spec b/virt-v2v.spec index da697e0..1d3ca98 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,269 +1,242 @@ -Name: virt-v2v -Version: 0.9.0 -Release: 8%{?dist}%{?extra_release} -Summary: Convert a virtual machine to run on KVM +# If we should verify tarball signature with GPGv2. +%global verify_tarball_signature 1 -License: GPLv2+ and LGPLv2+ -URL: http://git.fedorahosted.org/git/virt-v2v.git +# If there are patches which touch autotools files, set this to 1. +%global patches_touch_autotools 1 -Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz +# The source directory. +%global source_directory 1.41-development -# Non-upstream patch to default to using the appliance backend -# for Fedora >= 18. -Patch1: virt-v2v-use-appliance-backend.patch +Name: virt-v2v +Version: 1.41.8 +Release: 4%{?dist} +Summary: Convert a virtual machine to run on KVM -# Fix license metadata, bug #1083430 -Patch2: virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch +License: GPLv2+ +URL: https://github.com/libguestfs/virt-v2v -# Unfortunately, despite really being noarch, we have to make virt-v2v arch -# dependent to avoid build failures on architectures where libguestfs isn't -# available. -%if 0%{?rhel} >= 6 -ExclusiveArch: x86_64 -%else -ExclusiveArch: %{ix86} x86_64 +Source0: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz +%if 0%{verify_tarball_signature} +Source1: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz.sig +# Keyring used to verify tarball signature. +Source2: libguestfs.keyring %endif -# Build system direct requirements -BuildRequires: gettext -BuildRequires: perl -BuildRequires: perl(Module::Build) -BuildRequires: perl(ExtUtils::Manifest) -BuildRequires: perl(Test::More) -BuildRequires: perl(Test::Pod) -BuildRequires: perl(Test::Pod::Coverage) -BuildRequires: perl(Module::Find) +# Upstream patches. +Patch1: 0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch +Patch2: 0002-Add-license-file.patch -# Runtime perl modules also required at build time for use_ok test -BuildRequires: perl(Archive::Extract) -BuildRequires: perl(DateTime) -BuildRequires: perl(Digest::SHA1) -BuildRequires: perl(IO::String) -BuildRequires: perl(Locale::TextDomain) -BuildRequires: perl(Module::Pluggable) -BuildRequires: perl(Net::HTTPS) -BuildRequires: perl(Net::SSL) -BuildRequires: perl(Sys::Guestfs) -BuildRequires: perl(Sys::Syslog) -BuildRequires: perl(Sys::Virt) -BuildRequires: perl(Term::ProgressBar) -BuildRequires: perl(URI) -BuildRequires: perl(XML::DOM) -BuildRequires: perl(XML::DOM::XPath) -BuildRequires: perl(XML::Writer) +# libguestfs hasn't been built on i686 for a while since there is no +# kernel built for this architecture any longer and libguestfs rather +# fundamentally depends on the kernel. Therefore we must exclude this +# arch. Note there is no bug filed for this because we do not ever +# expect that libguestfs or virt-v2v will be available on i686 so +# there is nothing that needs fixing. +ExcludeArch: %{ix86} -BuildRequires: perl-Sys-Guestfs >= 1:1.14.0 -BuildRequires: perl-hivex >= 1.2.2 +%if 0%{patches_touch_autotools} +BuildRequires: autoconf, automake, libtool +%endif -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +BuildRequires: /usr/bin/pod2man +BuildRequires: gcc +BuildRequires: ocaml >= 4.01 +BuildRequires: libguestfs-devel >= 1:1.40 -# Required for the name optional argument to add_drive_opts -Requires: perl-Sys-Guestfs >= 1:1.14.0 +BuildRequires: augeas-devel +BuildRequires: bash-completion +BuildRequires: file-devel +BuildRequires: gettext-devel +BuildRequires: jansson-devel +BuildRequires: libvirt-devel +BuildRequires: libvirt-daemon-qemu +BuildRequires: libvirt-daemon-kvm +BuildRequires: libxml2-devel +BuildRequires: pcre-devel +BuildRequires: perl(Sys::Guestfs) +BuildRequires: po4a +BuildRequires: /usr/bin/virsh -# Undocumented from antiquity -Requires: perl-hivex >= 1.2.2 +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-libguestfs-devel +BuildRequires: ocaml-fileutils-devel +BuildRequires: ocaml-gettext-devel +BuildRequires: ocaml-ounit-devel -# Required for passing flags to get_xml_description -Requires: perl(Sys::Virt) >= 0.2.4 +BuildRequires: nbdkit-python3-plugin -# Net::SSL and Net::HTTPS are loaded with require rather than use, which -# rpmbuild doesn't seem to discover automatically. -Requires: perl(Net::SSL) -Requires: perl(Net::HTTPS) +%if 0%{verify_tarball_signature} +BuildRequires: gnupg2 +%endif -# Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt -Requires: libvirt >= 0.8.1 +Requires: libguestfs%{?_isa} >= 1:1.40 +Requires: libguestfs-tools-c >= 1:1.40 -# For GuestOS transfer image -Requires: /usr/bin/mkisofs +Requires: gawk +Requires: gzip +Requires: unzip +Requires: curl +Requires: /usr/bin/virsh -# For guest image inspection -Requires: /usr/bin/qemu-img +Recommends: nbdkit +Recommends: nbdkit-curl-plugin +Recommends: nbdkit-python3-plugin +Recommends: nbdkit-ssh-plugin +Recommends: nbdkit-vddk-plugin -# For ssh transfers -Requires: /usr/bin/ssh +# For rhsrvany.exe, used to install firstboot scripts in Windows guests. +Requires: mingw32-srvany >= 1.0-13 %description -virt-v2v is a tool for converting and importing virtual machines to -libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a -variety of guest operating systems from libvirt-managed hosts and VMware ESX. +Virt-v2v converts a single guest from a foreign hypervisor to run on +KVM. It can read Linux and Windows guests running on VMware, Xen, +Hyper-V and some other hypervisors, and convert them to KVM managed by +libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several +other targets. It can modify the guest to make it bootable on KVM and +install virtio drivers so it will run quickly. + + +%package bash-completion +Summary: Bash tab-completion for %{name} +BuildArch: noarch +Requires: bash-completion >= 2.0 +Requires: %{name} = %{version}-%{release} + + +%description bash-completion +Install this package if you want intelligent bash tab-completion +for %{name}. + + +%package man-pages-ja +Summary: Japanese (ja) man pages for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description man-pages-ja +%{name}-man-pages-ja contains Japanese (ja) man pages +for %{name}. + + +%package man-pages-uk +Summary: Ukrainian (uk) man pages for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description man-pages-uk +%{name}-man-pages-uk contains Ukrainian (uk) man pages +for %{name}. %prep -%setup -q -n %{name}-v%{version} - -%patch1 -p1 -%patch2 -p1 +%if 0%{verify_tarball_signature} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif +%autosetup -p1 +%if 0%{patches_touch_autotools} +autoreconf -i +%endif %build -%{__perl} Build.PL -./Build - -# perl doesn't need debuginfo -%define debug_package %{nil} +%configure +make %{?_smp_mflags} %install -./Build install \ - --destdir %{buildroot} \ - --installdirs vendor \ - --install_path locale=%{_datadir}/locale \ - --install_path confdoc=%{_mandir}/man5 +%make_install -# Create lib directory, used for holding software to be installed in guests -statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v -mkdir -p $statedir/software +# Delete libtool crap. +find $RPM_BUILD_ROOT -name '*.la' -delete -# Copy Windows dependencies into place -windir=$statedir/software/windows -mkdir -p $windir +# Virt-tools data directory. This contains a symlink to rhsrvany.exe +# which is satisfied by the dependency on mingw32-srvany. +mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools +pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools +ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe +popd -cp windows/rhsrvany.exe windows/firstboot.bat $windir/ - -mkdir -p %{buildroot}%{_sysconfdir} -cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ -cp v2v/virt-v2v.db $statedir/ +# Delete the v2v test harness (except for the man page). +rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness +rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* +# Find locale files. %find_lang %{name} -# Not clear why this is being created as there is nothing arch-specific in -# virt-v2v. It isn't packaged, though, so we need to delete it. -[ -d "%{buildroot}/%{perl_archlib}" ] && - find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm - %check -./Build test +# Tests fail on both armv7 and ppc64le in Fedora 31 because the kernel +# cannot boot on qemu. +%ifnarch %{arm} ppc64le + +# On x86_64 this single test fails with: "virt-v2v: warning: the +# target hypervisor does not support a x86_64 KVM guest". Missing +# BuildRequires? +%ifarch x86_64 +truncate -s 0 tests/test-v2v-o-libvirt.sh +%endif + +# This test fails in mock. +truncate -s 0 tests/test-v2v-oa-option.sh + +# Make sure we can see the debug messages (RHBZ#1230160). +export LIBGUESTFS_DEBUG=1 +export LIBGUESTFS_TRACE=1 + +make %{?_smp_mflags} check || { + cat tests/test-suite.log + exit 1 + } + +%endif %files -f %{name}.lang -%doc TODO.txt -%doc META.yml -%doc ChangeLog -%doc COPYING COPYING.LIB +%license COPYING +#doc README +%{_bindir}/virt-v2v +%{_bindir}/virt-v2v-copy-to-local +%{_mandir}/man1/virt-v2v.1* +%{_mandir}/man1/virt-v2v-copy-to-local.1* +%{_mandir}/man1/virt-v2v-hacking.1* +%{_mandir}/man1/virt-v2v-input-vmware.1* +%{_mandir}/man1/virt-v2v-input-xen.1* +%{_mandir}/man1/virt-v2v-output-local.1* +%{_mandir}/man1/virt-v2v-output-openstack.1* +%{_mandir}/man1/virt-v2v-output-rhv.1* +%{_mandir}/man1/virt-v2v-support.1* +%{_mandir}/man1/virt-v2v-test-harness.1* +%{_datadir}/virt-tools -# For noarch packages: vendorlib -%{perl_vendorlib}/* -# Man pages -%{_mandir}/man1/*.1* -%{_mandir}/man3/*.3* -%{_mandir}/man5/*.5* +%files bash-completion +%license COPYING +%{_datadir}/bash-completion/completions/virt-v2v +%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local -# Executables -%attr(0755,root,root) %{_bindir}/virt-v2v -%attr(0755,root,root) %{_bindir}/virt-p2v-server -%dir %{_localstatedir}/lib/virt-v2v +%files man-pages-ja +%license COPYING +%lang(ja) %{_mandir}/ja/man1/*.1* -%config(noreplace) %{_sysconfdir}/virt-v2v.conf -%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db -%config(noreplace) %{_localstatedir}/lib/virt-v2v/software + +%files man-pages-uk +%license COPYING +%lang(uk) %{_mandir}/uk/man1/*.1* %changelog -* Mon Aug 18 2014 Fedora Release Engineering - 0.9.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild +* Wed Nov 27 2019 Richard W.M. Jones - 1.41.8-4 +- Use license instead of doc for COPYING file. +- Include license in all subpackages. +- Use gpgverify macro. +- Don't own bash-completion directory because we Require the + bash-completion package which owns it already. -* Fri Jun 27 2014 Petr Pisar - 0.9.0-7 -- Fix license metadata (bug #1083430) +* Tue Nov 26 2019 Richard W.M. Jones - 1.41.8-2 +- Fix permissions on .sig file. +- Disable -oa preallocated test since it fails in reviewers mock environment. -* Sun Jun 08 2014 Fedora Release Engineering - 0.9.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Aug 08 2013 Petr Pisar - 0.9.0-5 -- Perl 5.18 rebuild - -* Sun Aug 04 2013 Fedora Release Engineering - 0.9.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 3 2013 Richard W.M. Jones - 0.9.0-3 -- Default to using the appliance backend, since in Fedora >= 18 the - libvirt backend doesn't support the 'iface' parameter which virt-v2v - requires. -- Add BR perl(Sys::Syslog), required to run the tests. -- Remove some cruft from the spec file. - -* Fri Feb 15 2013 Fedora Release Engineering - 0.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Dec 6 2012 Matthew Booth - 0.9.0-1 -- New upstream release 0.9.0 - -* Sun Jul 22 2012 Fedora Release Engineering - 0.8.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Jul 10 2012 Petr Pisar - 0.8.8-2 -- Perl 5.16 rebuild - -* Mon Jun 25 2012 Matthew Booth - 0.8.8-1 -- Rebase to upstream version 0.8.8 - -* Sat Jan 14 2012 Fedora Release Engineering - 0.8.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Aug 22 2011 Richard W.M. Jones - 0.8.3-1 -- New upstream release 0.8.3. -- Include upstream patch to fix whitespace problems in PO files. -- Remove virt-p2v from build by synchronizing the spec file so it - almost matches the one in RHEL 6.2. Note that virt-p2v is built in - a separate SRPM called rubygem-virt-p2v. - -* Thu Jul 21 2011 Petr Sabata - 0.8.1-4 -- Perl mass rebuild - -* Tue Jul 19 2011 Petr Sabata - 0.8.1-3 -- Perl mass rebuild - -* Tue May 17 2011 Matthew Booth - 0.8.1-2 -- Remove echoe build dependency -- Fix YAML error during P2V (RHBZ#705113) - -* Tue Apr 26 2011 Matthew Booth - 0.8.1-1 -- Update to release 0.8.1 - -* Tue Apr 19 2011 Matthew Booth - 0.8.0-1 -- Update to release 0.8.0 -- Include virt-p2v - -* Mon Feb 07 2011 Fedora Release Engineering - 0.7.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Nov 4 2010 Matthew Booth - 0.7.0-1 -- Update to release 0.7.0 - -* Thu Jul 1 2010 Matthew Booth - 0.6.1-1 -- Only build virt-v2v on architectures where libguestfs is available - -* Mon Jun 21 2010 Matthew Booth - 0.6.1-0 -- Update to release 0.6.1 -- Disable building of debuginfo - -* Mon Feb 22 2010 Matthew Booth - 0.4.0-1 -- Update to release 0.4.0 -- Change dependency on genisofs to mkisofs -- Update libguestfs dependency to 1.0.84 -- Add perl module dependencies: LWP::UserAgent, Net::HTTPS, Net::SSL, Net::URI -- Remove perl module dependency: Config::Tiny -- Add explicit build dependency on perl -- Add patch: virt-v2v-0.4.0-remove-fr.patch -- Add patch: virt-v2v-0.4.0-exechelper-cleanup.patch -- Add patch: virt-v2v-0.4.0-exechelper-tmpfile.patch - -* Mon Dec 7 2009 Stepan Kasal - 0.3.2-2 -- rebuild against perl 5.10.1 - -* Mon Nov 9 2009 Matthew Booth - 0.3.2-1 -- Update to release 0.3.2 -- Add BuildRequires gettext - -* Mon Nov 9 2009 Matthew Booth - 0.3.0-1 -- Update to release 0.3.0 - -* Tue Sep 15 2009 Matthew Booth - 0.2.0-1 -- Update to release 0.2.0 - -* Fri Sep 4 2009 Matthew Booth - 0.1.0-1 -- Initial specfile +* Fri Nov 15 2019 Richard W.M. Jones - 1.41.8-1 +- Initial release of separate virt-v2v program, was part of libguestfs. From 83694a96ed0a64a4dbcc4a805f7876493721f498 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 17:35:41 +0000 Subject: [PATCH 025/235] OCaml 4.10.0+beta1 rebuild. --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 1d3ca98..ffeadd5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,9 @@ make %{?_smp_mflags} check || { %changelog +* Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-5 +- OCaml 4.10.0+beta1 rebuild. + * Wed Nov 27 2019 Richard W.M. Jones - 1.41.8-4 - Use license instead of doc for COPYING file. - Include license in all subpackages. From 17d121add70fc81ff4993e1c1546c5b0e58a03d7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 18:53:32 +0000 Subject: [PATCH 026/235] Use nbdkit-python-plugin (now all Python 3 in Rawhide). --- virt-v2v.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index ffeadd5..1feda83 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -63,7 +63,7 @@ BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-gettext-devel BuildRequires: ocaml-ounit-devel -BuildRequires: nbdkit-python3-plugin +BuildRequires: nbdkit-python-plugin %if 0%{verify_tarball_signature} BuildRequires: gnupg2 @@ -80,7 +80,7 @@ Requires: /usr/bin/virsh Recommends: nbdkit Recommends: nbdkit-curl-plugin -Recommends: nbdkit-python3-plugin +Recommends: nbdkit-python-plugin Recommends: nbdkit-ssh-plugin Recommends: nbdkit-vddk-plugin @@ -229,6 +229,7 @@ make %{?_smp_mflags} check || { %changelog * Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-5 - OCaml 4.10.0+beta1 rebuild. +- Use nbdkit-python-plugin (now all Python 3 in Rawhide). * Wed Nov 27 2019 Richard W.M. Jones - 1.41.8-4 - Use license instead of doc for COPYING file. From 1bf30001600799b65b6325d22cca500473f250f2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 19:44:37 +0000 Subject: [PATCH 027/235] Pull in some upstream patches to fix tests/test-v2v-o-rhv-upload.sh --- 0001-build-add-an-empty-config.sh.patch | 85 +++++++++++++++++++ ...-use-the-right-nbdkit-python3-plugin.patch | 37 ++++++++ virt-v2v.spec | 2 + 3 files changed, 124 insertions(+) create mode 100644 0001-build-add-an-empty-config.sh.patch create mode 100644 0001-tests-use-the-right-nbdkit-python3-plugin.patch diff --git a/0001-build-add-an-empty-config.sh.patch b/0001-build-add-an-empty-config.sh.patch new file mode 100644 index 0000000..86099bc --- /dev/null +++ b/0001-build-add-an-empty-config.sh.patch @@ -0,0 +1,85 @@ +From c7fd848a51fd53d8cf003d892efdb01e2b7efc0e Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Mon, 16 Dec 2019 10:42:09 +0100 +Subject: [PATCH] build: add an empty config.sh + +This helper script will contain variables with results of configure +checks, so other scripts can source it. + +Source it automatically in test-functions.sh, so every test can already +make use of it. +--- + .gitignore | 1 + + config.sh.in | 20 ++++++++++++++++++++ + configure.ac | 1 + + tests/test-functions.sh | 3 +++ + 4 files changed, 25 insertions(+) + create mode 100644 config.sh.in + +diff --git a/.gitignore b/.gitignore +index ee7e3cf9e..54e5b0ec2 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -40,6 +40,7 @@ Makefile.in + /config.h + /config.h.in + /config.log ++/config.sh + /config.status + /config.sub + /configure +diff --git a/config.sh.in b/config.sh.in +new file mode 100644 +index 000000000..061871a3c +--- /dev/null ++++ b/config.sh.in +@@ -0,0 +1,20 @@ ++#!/bin/bash - ++# (C) Copyright 2019 Red Hat Inc. ++# @configure_input@ ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++# This shell script contains the results of some configure checks, ++# mostly used in other shell scripts. +diff --git a/configure.ac b/configure.ac +index f7ff742a5..1b8f6a837 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -116,6 +116,7 @@ AC_CONFIG_FILES([Makefile + common/qemuopts/Makefile + common/utils/Makefile + common/windows/Makefile ++ config.sh + docs/Makefile + gnulib/lib/Makefile + gnulib/tests/Makefile +diff --git a/tests/test-functions.sh b/tests/test-functions.sh +index 565c4208d..446b20fe7 100755 +--- a/tests/test-functions.sh ++++ b/tests/test-functions.sh +@@ -33,6 +33,9 @@ export LANG=C + # parameters, so we eval those to define the variables. + while [ $# -ge 1 ]; do eval "$1"; shift; done + ++# Configure check results. ++source $abs_top_builddir/config.sh ++ + # Skip if $SKIP_ environment variable is set. + # Every test should call this function first. + skip_if_skipped () +-- +2.24.1 + diff --git a/0001-tests-use-the-right-nbdkit-python3-plugin.patch b/0001-tests-use-the-right-nbdkit-python3-plugin.patch new file mode 100644 index 0000000..9753544 --- /dev/null +++ b/0001-tests-use-the-right-nbdkit-python3-plugin.patch @@ -0,0 +1,37 @@ +From 3f8897aa36a723fe3fde5b62a6eb9ade427f77b2 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Mon, 16 Dec 2019 10:58:38 +0100 +Subject: [PATCH] tests: use the right nbdkit python3 plugin + +Add the configure result in config.sh, so it can be used as variable. +--- + config.sh.in | 2 ++ + tests/test-v2v-o-rhv-upload.sh | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/config.sh.in b/config.sh.in +index 061871a3c..f32453792 100644 +--- a/config.sh.in ++++ b/config.sh.in +@@ -18,3 +18,5 @@ + + # This shell script contains the results of some configure checks, + # mostly used in other shell scripts. ++ ++export VIRT_V2V_NBDKIT_PYTHON_PLUGIN="@VIRT_V2V_NBDKIT_PYTHON_PLUGIN@" +diff --git a/tests/test-v2v-o-rhv-upload.sh b/tests/test-v2v-o-rhv-upload.sh +index a2f5b0d5e..e70575c70 100755 +--- a/tests/test-v2v-o-rhv-upload.sh ++++ b/tests/test-v2v-o-rhv-upload.sh +@@ -29,7 +29,7 @@ $TEST_FUNCTIONS + skip_if_skipped + skip_if_backend uml + skip_unless python3 --version +-skip_unless nbdkit python3 --version ++skip_unless nbdkit $VIRT_V2V_NBDKIT_PYTHON_PLUGIN --version + skip_unless_phony_guest windows.img + + libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" +-- +2.24.1 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 1feda83..3b02a71 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -25,6 +25,8 @@ Source2: libguestfs.keyring # Upstream patches. Patch1: 0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch Patch2: 0002-Add-license-file.patch +Patch3: 0001-build-add-an-empty-config.sh.patch +Patch4: 0001-tests-use-the-right-nbdkit-python3-plugin.patch # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather From 7926cffa5e1c61f23a925ee572e5393e553e996c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 19:56:45 +0000 Subject: [PATCH 028/235] Disable all tests. libvirt blockdev causes too many failures. --- virt-v2v.spec | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 3b02a71..5d23715 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -168,30 +168,31 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %check -# Tests fail on both armv7 and ppc64le in Fedora 31 because the kernel -# cannot boot on qemu. -%ifnarch %{arm} ppc64le +# All tests fail at the moment because of bugs in libvirt blockdev. +# # Tests fail on both armv7 and ppc64le in Fedora 31 because the kernel +# # cannot boot on qemu. +# %ifnarch %{arm} ppc64le -# On x86_64 this single test fails with: "virt-v2v: warning: the -# target hypervisor does not support a x86_64 KVM guest". Missing -# BuildRequires? -%ifarch x86_64 -truncate -s 0 tests/test-v2v-o-libvirt.sh -%endif +# # On x86_64 this single test fails with: "virt-v2v: warning: the +# # target hypervisor does not support a x86_64 KVM guest". Missing +# # BuildRequires? +# %ifarch x86_64 +# truncate -s 0 tests/test-v2v-o-libvirt.sh +# %endif -# This test fails in mock. -truncate -s 0 tests/test-v2v-oa-option.sh +# # This test fails in mock. +# truncate -s 0 tests/test-v2v-oa-option.sh -# Make sure we can see the debug messages (RHBZ#1230160). -export LIBGUESTFS_DEBUG=1 -export LIBGUESTFS_TRACE=1 +# # Make sure we can see the debug messages (RHBZ#1230160). +# export LIBGUESTFS_DEBUG=1 +# export LIBGUESTFS_TRACE=1 -make %{?_smp_mflags} check || { - cat tests/test-suite.log - exit 1 - } +# make %{?_smp_mflags} check || { +# cat tests/test-suite.log +# exit 1 +# } -%endif +# %endif %files -f %{name}.lang From 5924ae47ea55b456b959a4a65fa0db7a732a6d9a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 20:04:35 +0000 Subject: [PATCH 029/235] Bump release and rebuild. --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 5d23715..b72bc87 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -230,6 +230,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-6 +- Bump release and rebuild. + * Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-5 - OCaml 4.10.0+beta1 rebuild. - Use nbdkit-python-plugin (now all Python 3 in Rawhide). From fef847ab607f446591e6ae23fcc382f1fd59d945 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 21:11:17 +0000 Subject: [PATCH 030/235] Bump release and rebuild. --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index b72bc87..fd0ddbb 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -230,6 +230,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-7 +- Bump release and rebuild. + * Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-6 - Bump release and rebuild. From 153ba641ec92789ed3fc338df50d217eafeb37db Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jan 2020 23:03:49 +0000 Subject: [PATCH 031/235] Bump release and rebuild. --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index fd0ddbb..9c1951a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -230,6 +230,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-8 +- Bump release and rebuild. + * Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-7 - Bump release and rebuild. From e47ea98a14be67b3bd4defed6125f910fbac41cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 03:15:26 +0000 Subject: [PATCH 032/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 9c1951a..304b6d9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -230,6 +230,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 1.41.8-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sun Jan 19 2020 Richard W.M. Jones - 1.41.8-8 - Bump release and rebuild. From 3e8c43329c674606b2bcbfb00f2c4df3fd1e13b6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Feb 2020 09:42:01 +0000 Subject: [PATCH 033/235] OCaml 4.10.0 final. --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 304b6d9..f4f5696 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -230,6 +230,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Thu Feb 27 2020 Richard W.M. Jones - 1.41.8-10 +- OCaml 4.10.0 final. + * Fri Jan 31 2020 Fedora Release Engineering - 1.41.8-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From b5277f69cf470d2ba11763be0dfe4143b0936645 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 4 Apr 2020 16:28:03 +0100 Subject: [PATCH 034/235] Update all OCaml dependencies for RPM 4.16. --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index f4f5696..bd918f7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.41.8 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -230,6 +230,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Sat Apr 04 2020 Richard W.M. Jones - 1.41.8-11 +- Update all OCaml dependencies for RPM 4.16. + * Thu Feb 27 2020 Richard W.M. Jones - 1.41.8-10 - OCaml 4.10.0 final. From e656ffdd3cbe1d408ff8a1bb045af54dbc74ae57 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Apr 2020 13:25:50 +0100 Subject: [PATCH 035/235] New upstream stable version 1.42.0. --- sources | 4 ++-- virt-v2v.spec | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sources b/sources index 990fd50..dad45a4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.41.8.tar.gz) = c7d4f258aa347f3866193df3aa15938389f38f86d387a9b04fe2b250ff313edd4c9477e8ca5723a3bb3d536a2826ce5be93fb9b687865083afaab9fdeb473bd3 -SHA512 (virt-v2v-1.41.8.tar.gz.sig) = bbcf4e36505b388390cc971a95f12105cded7e53c7632057918cb2503b7b05ad6a92b6b6e6b08d9dd822fb03715868996045022fc1f8e43580835004215d76c0 +SHA512 (virt-v2v-1.42.0.tar.gz) = 75841717d54479443eb63365375e44d0b9189bb72ed761685081cc3bc53aa0f50954e72df07d23c95412f25eae12eb6c6e13a8c45ba9ffd8f27f861a326a53d7 +SHA512 (virt-v2v-1.42.0.tar.gz.sig) = 8986f41829ef5635ff8453bd798856c0bdfd1c6ebd7a844d8771c92e6c898fa5c308bb91b31ebc8ec239f3896fbd23e02bd0fe653800fe8804c960dae244dec2 diff --git a/virt-v2v.spec b/virt-v2v.spec index bd918f7..0cac67d 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,14 +2,14 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} # The source directory. -%global source_directory 1.41-development +%global source_directory 1.42-stable Name: virt-v2v -Version: 1.41.8 -Release: 11%{?dist} +Version: 1.42.0 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -22,12 +22,6 @@ Source1: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{nam Source2: libguestfs.keyring %endif -# Upstream patches. -Patch1: 0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch -Patch2: 0002-Add-license-file.patch -Patch3: 0001-build-add-an-empty-config.sh.patch -Patch4: 0001-tests-use-the-right-nbdkit-python3-plugin.patch - # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather # fundamentally depends on the kernel. Therefore we must exclude this @@ -208,6 +202,7 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %{_mandir}/man1/virt-v2v-output-rhv.1* +%{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-support.1* %{_mandir}/man1/virt-v2v-test-harness.1* %{_datadir}/virt-tools @@ -230,6 +225,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Thu Apr 16 2020 Richard W.M. Jones - 1.42.0-1 +- New upstream stable version 1.42.0. + * Sat Apr 04 2020 Richard W.M. Jones - 1.41.8-11 - Update all OCaml dependencies for RPM 4.16. From d3d1fda8dbe2fef419a288fb567680a71eda3d93 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Apr 2020 13:30:50 +0100 Subject: [PATCH 036/235] Remove patches (now upstream) which were accidentally left in last commit. --- 0001-build-add-an-empty-config.sh.patch | 85 ---- ...OTFILES-ml-which-aren-t-included-in-.patch | 48 --- ...-use-the-right-nbdkit-python3-plugin.patch | 37 -- 0002-Add-license-file.patch | 371 ------------------ 4 files changed, 541 deletions(-) delete mode 100644 0001-build-add-an-empty-config.sh.patch delete mode 100644 0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch delete mode 100644 0001-tests-use-the-right-nbdkit-python3-plugin.patch delete mode 100644 0002-Add-license-file.patch diff --git a/0001-build-add-an-empty-config.sh.patch b/0001-build-add-an-empty-config.sh.patch deleted file mode 100644 index 86099bc..0000000 --- a/0001-build-add-an-empty-config.sh.patch +++ /dev/null @@ -1,85 +0,0 @@ -From c7fd848a51fd53d8cf003d892efdb01e2b7efc0e Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Mon, 16 Dec 2019 10:42:09 +0100 -Subject: [PATCH] build: add an empty config.sh - -This helper script will contain variables with results of configure -checks, so other scripts can source it. - -Source it automatically in test-functions.sh, so every test can already -make use of it. ---- - .gitignore | 1 + - config.sh.in | 20 ++++++++++++++++++++ - configure.ac | 1 + - tests/test-functions.sh | 3 +++ - 4 files changed, 25 insertions(+) - create mode 100644 config.sh.in - -diff --git a/.gitignore b/.gitignore -index ee7e3cf9e..54e5b0ec2 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -40,6 +40,7 @@ Makefile.in - /config.h - /config.h.in - /config.log -+/config.sh - /config.status - /config.sub - /configure -diff --git a/config.sh.in b/config.sh.in -new file mode 100644 -index 000000000..061871a3c ---- /dev/null -+++ b/config.sh.in -@@ -0,0 +1,20 @@ -+#!/bin/bash - -+# (C) Copyright 2019 Red Hat Inc. -+# @configure_input@ -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+# This shell script contains the results of some configure checks, -+# mostly used in other shell scripts. -diff --git a/configure.ac b/configure.ac -index f7ff742a5..1b8f6a837 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -116,6 +116,7 @@ AC_CONFIG_FILES([Makefile - common/qemuopts/Makefile - common/utils/Makefile - common/windows/Makefile -+ config.sh - docs/Makefile - gnulib/lib/Makefile - gnulib/tests/Makefile -diff --git a/tests/test-functions.sh b/tests/test-functions.sh -index 565c4208d..446b20fe7 100755 ---- a/tests/test-functions.sh -+++ b/tests/test-functions.sh -@@ -33,6 +33,9 @@ export LANG=C - # parameters, so we eval those to define the variables. - while [ $# -ge 1 ]; do eval "$1"; shift; done - -+# Configure check results. -+source $abs_top_builddir/config.sh -+ - # Skip if $SKIP_ environment variable is set. - # Every test should call this function first. - skip_if_skipped () --- -2.24.1 - diff --git a/0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch b/0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch deleted file mode 100644 index 9546b62..0000000 --- a/0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f80f1c31c9446f326484ae93ba4919586f4f3df8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 19 Nov 2019 15:25:07 +0000 -Subject: [PATCH 1/2] po: Remove some POTFILES-ml which aren't included in the - tarball. - ---- - Makefile.am | 2 ++ - po/POTFILES-ml | 3 --- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 638268d8b..50322eb69 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -113,6 +113,8 @@ po/POTFILES-ml: configure.ac - rm -f $@ $@-t - cd $(srcdir); \ - find common/ml* v2v -name '*.ml' | \ -+ grep -v '^common/mlprogress/' | \ -+ grep -v '^common/mlvisit/' | \ - grep -v '^v2v/config.ml$$' | \ - LC_ALL=C sort > $@-t - mv $@-t $@ -diff --git a/po/POTFILES-ml b/po/POTFILES-ml -index b5cebb2f8..eef7c5f3b 100644 ---- a/po/POTFILES-ml -+++ b/po/POTFILES-ml -@@ -6,7 +6,6 @@ common/mlgettext/common_gettext.ml - common/mllibvirt/libvirt.ml - common/mlpcre/PCRE.ml - common/mlpcre/pcre_tests.ml --common/mlprogress/progress.ml - common/mlstdutils/guestfs_config.ml - common/mlstdutils/std_utils.ml - common/mlstdutils/std_utils_tests.ml -@@ -34,8 +33,6 @@ common/mlutils/c_utils.ml - common/mlutils/c_utils_unit_tests.ml - common/mlutils/unix_utils.ml - common/mlv2v/uefi.ml --common/mlvisit/visit.ml --common/mlvisit/visit_tests.ml - common/mlxml/xml.ml - v2v/DOM.ml - v2v/changeuid.ml --- -2.23.0 - diff --git a/0001-tests-use-the-right-nbdkit-python3-plugin.patch b/0001-tests-use-the-right-nbdkit-python3-plugin.patch deleted file mode 100644 index 9753544..0000000 --- a/0001-tests-use-the-right-nbdkit-python3-plugin.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3f8897aa36a723fe3fde5b62a6eb9ade427f77b2 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Mon, 16 Dec 2019 10:58:38 +0100 -Subject: [PATCH] tests: use the right nbdkit python3 plugin - -Add the configure result in config.sh, so it can be used as variable. ---- - config.sh.in | 2 ++ - tests/test-v2v-o-rhv-upload.sh | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/config.sh.in b/config.sh.in -index 061871a3c..f32453792 100644 ---- a/config.sh.in -+++ b/config.sh.in -@@ -18,3 +18,5 @@ - - # This shell script contains the results of some configure checks, - # mostly used in other shell scripts. -+ -+export VIRT_V2V_NBDKIT_PYTHON_PLUGIN="@VIRT_V2V_NBDKIT_PYTHON_PLUGIN@" -diff --git a/tests/test-v2v-o-rhv-upload.sh b/tests/test-v2v-o-rhv-upload.sh -index a2f5b0d5e..e70575c70 100755 ---- a/tests/test-v2v-o-rhv-upload.sh -+++ b/tests/test-v2v-o-rhv-upload.sh -@@ -29,7 +29,7 @@ $TEST_FUNCTIONS - skip_if_skipped - skip_if_backend uml - skip_unless python3 --version --skip_unless nbdkit python3 --version -+skip_unless nbdkit $VIRT_V2V_NBDKIT_PYTHON_PLUGIN --version - skip_unless_phony_guest windows.img - - libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" --- -2.24.1 - diff --git a/0002-Add-license-file.patch b/0002-Add-license-file.patch deleted file mode 100644 index 0cba373..0000000 --- a/0002-Add-license-file.patch +++ /dev/null @@ -1,371 +0,0 @@ -From 508cda917ad106ba4759eb2df98e28f97b4a4583 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 19 Nov 2019 15:36:53 +0000 -Subject: [PATCH 2/2] Add license file. - ---- - COPYING | 339 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - Makefile.am | 1 + - 2 files changed, 340 insertions(+) - create mode 100644 COPYING - -diff --git a/COPYING b/COPYING -new file mode 100644 -index 000000000..d159169d1 ---- /dev/null -+++ b/COPYING -@@ -0,0 +1,339 @@ -+ GNU GENERAL PUBLIC LICENSE -+ Version 2, June 1991 -+ -+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+License is intended to guarantee your freedom to share and change free -+software--to make sure the software is free for all its users. This -+General Public License applies to most of the Free Software -+Foundation's software and to any other program whose authors commit to -+using it. (Some other Free Software Foundation software is covered by -+the GNU Lesser General Public License instead.) You can apply it to -+your programs, too. -+ -+ When we speak of free software, we are referring to freedom, not -+price. Our General Public Licenses are designed to make sure that you -+have the freedom to distribute copies of free software (and charge for -+this service if you wish), that you receive source code or can get it -+if you want it, that you can change the software or use pieces of it -+in new free programs; and that you know you can do these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+anyone to deny you these rights or to ask you to surrender the rights. -+These restrictions translate to certain responsibilities for you if you -+distribute copies of the software, or if you modify it. -+ -+ For example, if you distribute copies of such a program, whether -+gratis or for a fee, you must give the recipients all the rights that -+you have. You must make sure that they, too, receive or can get the -+source code. And you must show them these terms so they know their -+rights. -+ -+ We protect your rights with two steps: (1) copyright the software, and -+(2) offer you this license which gives you legal permission to copy, -+distribute and/or modify the software. -+ -+ Also, for each author's protection and ours, we want to make certain -+that everyone understands that there is no warranty for this free -+software. If the software is modified by someone else and passed on, we -+want its recipients to know that what they have is not the original, so -+that any problems introduced by others will not reflect on the original -+authors' reputations. -+ -+ Finally, any free program is threatened constantly by software -+patents. We wish to avoid the danger that redistributors of a free -+program will individually obtain patent licenses, in effect making the -+program proprietary. To prevent this, we have made it clear that any -+patent must be licensed for everyone's free use or not licensed at all. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. -+ -+ GNU GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License applies to any program or other work which contains -+a notice placed by the copyright holder saying it may be distributed -+under the terms of this General Public License. The "Program", below, -+refers to any such program or work, and a "work based on the Program" -+means either the Program or any derivative work under copyright law: -+that is to say, a work containing the Program or a portion of it, -+either verbatim or with modifications and/or translated into another -+language. (Hereinafter, translation is included without limitation in -+the term "modification".) Each licensee is addressed as "you". -+ -+Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running the Program is not restricted, and the output from the Program -+is covered only if its contents constitute a work based on the -+Program (independent of having been made by running the Program). -+Whether that is true depends on what the Program does. -+ -+ 1. You may copy and distribute verbatim copies of the Program's -+source code as you receive it, in any medium, provided that you -+conspicuously and appropriately publish on each copy an appropriate -+copyright notice and disclaimer of warranty; keep intact all the -+notices that refer to this License and to the absence of any warranty; -+and give any other recipients of the Program a copy of this License -+along with the Program. -+ -+You may charge a fee for the physical act of transferring a copy, and -+you may at your option offer warranty protection in exchange for a fee. -+ -+ 2. You may modify your copy or copies of the Program or any portion -+of it, thus forming a work based on the Program, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) You must cause the modified files to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ b) You must cause any work that you distribute or publish, that in -+ whole or in part contains or is derived from the Program or any -+ part thereof, to be licensed as a whole at no charge to all third -+ parties under the terms of this License. -+ -+ c) If the modified program normally reads commands interactively -+ when run, you must cause it, when started running for such -+ interactive use in the most ordinary way, to print or display an -+ announcement including an appropriate copyright notice and a -+ notice that there is no warranty (or else, saying that you provide -+ a warranty) and that users may redistribute the program under -+ these conditions, and telling the user how to view a copy of this -+ License. (Exception: if the Program itself is interactive but -+ does not normally print such an announcement, your work based on -+ the Program is not required to print an announcement.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Program, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Program, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Program. -+ -+In addition, mere aggregation of another work not based on the Program -+with the Program (or with a work based on the Program) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may copy and distribute the Program (or a work based on it, -+under Section 2) in object code or executable form under the terms of -+Sections 1 and 2 above provided that you also do one of the following: -+ -+ a) Accompany it with the complete corresponding machine-readable -+ source code, which must be distributed under the terms of Sections -+ 1 and 2 above on a medium customarily used for software interchange; or, -+ -+ b) Accompany it with a written offer, valid for at least three -+ years, to give any third party, for a charge no more than your -+ cost of physically performing source distribution, a complete -+ machine-readable copy of the corresponding source code, to be -+ distributed under the terms of Sections 1 and 2 above on a medium -+ customarily used for software interchange; or, -+ -+ c) Accompany it with the information you received as to the offer -+ to distribute corresponding source code. (This alternative is -+ allowed only for noncommercial distribution and only if you -+ received the program in object code or executable form with such -+ an offer, in accord with Subsection b above.) -+ -+The source code for a work means the preferred form of the work for -+making modifications to it. For an executable work, complete source -+code means all the source code for all modules it contains, plus any -+associated interface definition files, plus the scripts used to -+control compilation and installation of the executable. However, as a -+special exception, the source code distributed need not include -+anything that is normally distributed (in either source or binary -+form) with the major components (compiler, kernel, and so on) of the -+operating system on which the executable runs, unless that component -+itself accompanies the executable. -+ -+If distribution of executable or object code is made by offering -+access to copy from a designated place, then offering equivalent -+access to copy the source code from the same place counts as -+distribution of the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 4. You may not copy, modify, sublicense, or distribute the Program -+except as expressly provided under this License. Any attempt -+otherwise to copy, modify, sublicense or distribute the Program is -+void, and will automatically terminate your rights under this License. -+However, parties who have received copies, or rights, from you under -+this License will not have their licenses terminated so long as such -+parties remain in full compliance. -+ -+ 5. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Program or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Program (or any work based on the -+Program), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Program or works based on it. -+ -+ 6. Each time you redistribute the Program (or any work based on the -+Program), the recipient automatically receives a license from the -+original licensor to copy, distribute or modify the Program subject to -+these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties to -+this License. -+ -+ 7. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Program at all. For example, if a patent -+license would not permit royalty-free redistribution of the Program by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Program. -+ -+If any portion of this section is held invalid or unenforceable under -+any particular circumstance, the balance of the section is intended to -+apply and the section as a whole is intended to apply in other -+circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system, which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 8. If the distribution and/or use of the Program is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Program under this License -+may add an explicit geographical distribution limitation excluding -+those countries, so that distribution is permitted only in or among -+countries not thus excluded. In such case, this License incorporates -+the limitation as if written in the body of this License. -+ -+ 9. The Free Software Foundation may publish revised and/or new versions -+of the General Public License from time to time. Such new versions will -+be similar in spirit to the present version, but may differ in detail to -+address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Program -+specifies a version number of this License which applies to it and "any -+later version", you have the option of following the terms and conditions -+either of that version or of any later version published by the Free -+Software Foundation. If the Program does not specify a version number of -+this License, you may choose any version ever published by the Free Software -+Foundation. -+ -+ 10. If you wish to incorporate parts of the Program into other free -+programs whose distribution conditions are different, write to the author -+to ask for permission. For software which is copyrighted by the Free -+Software Foundation, write to the Free Software Foundation; we sometimes -+make exceptions for this. Our decision will be guided by the two goals -+of preserving the free status of all derivatives of our free software and -+of promoting the sharing and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -+REPAIR OR CORRECTION. -+ -+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -+POSSIBILITY OF SUCH DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ How to Apply These Terms to Your New Programs -+ -+ If you develop a new program, and you want it to be of the greatest -+possible use to the public, the best way to achieve this is to make it -+free software which everyone can redistribute and change under these terms. -+ -+ To do so, attach the following notices to the program. It is safest -+to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least -+the "copyright" line and a pointer to where the full notice is found. -+ -+ -+ Copyright (C) -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with this program; if not, write to the Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+If the program is interactive, make it output a short notice like this -+when it starts in an interactive mode: -+ -+ Gnomovision version 69, Copyright (C) year name of author -+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -+ This is free software, and you are welcome to redistribute it -+ under certain conditions; type `show c' for details. -+ -+The hypothetical commands `show w' and `show c' should show the appropriate -+parts of the General Public License. Of course, the commands you use may -+be called something other than `show w' and `show c'; they could even be -+mouse-clicks or menu items--whatever suits your program. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the program, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program -+ `Gnomovision' (which makes passes at compilers) written by James Hacker. -+ -+ , 1 April 1989 -+ Ty Coon, President of Vice -+ -+This General Public License does not permit incorporating your program into -+proprietary programs. If your program is a subroutine library, you may -+consider it more useful to permit linking proprietary applications with the -+library. If this is what you want to do, use the GNU Lesser General -+Public License instead of this License. -diff --git a/Makefile.am b/Makefile.am -index 50322eb69..e80076bbc 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -72,6 +72,7 @@ EXTRA_DIST = \ - check-mli.sh \ - common/.gitignore \ - common/README \ -+ COPYING \ - lib/guestfs-internal-all.h \ - m4/.gitignore \ - ocaml-link.sh \ --- -2.23.0 - From 4ec7e2eac60d288f6b668290689b5bd4ea94c9ba Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Apr 2020 13:35:56 +0100 Subject: [PATCH 037/235] +BR libosinfo-devel --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 0cac67d..20f0dfd 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -44,6 +44,7 @@ BuildRequires: bash-completion BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: jansson-devel +BuildRequires: libosinfo-devel BuildRequires: libvirt-devel BuildRequires: libvirt-daemon-qemu BuildRequires: libvirt-daemon-kvm From 805d78dcca9180495ab1cc4049d61d1d949c0a91 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 May 2020 22:03:30 +0100 Subject: [PATCH 038/235] OCaml 4.11.0+dev2-2020-04-22 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 20f0dfd..a0b0627 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,7 +9,7 @@ Name: virt-v2v Version: 1.42.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -226,6 +226,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Tue May 05 2020 Richard W.M. Jones - 1.42.0-2 +- OCaml 4.11.0+dev2-2020-04-22 rebuild + * Thu Apr 16 2020 Richard W.M. Jones - 1.42.0-1 - New upstream stable version 1.42.0. From 2692e3d6b8f3c5b0ccef461ed829e21b8b50b300 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 May 2020 13:11:50 +0100 Subject: [PATCH 039/235] Re-add Epoch. Forgotten when we split this package from libguestfs. --- virt-v2v.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index a0b0627..84b4fec 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -8,8 +8,9 @@ %global source_directory 1.42-stable Name: virt-v2v +Epoch: 1 Version: 1.42.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -226,6 +227,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Wed May 06 2020 Richard W.M. Jones - 1.42.0-3 +- Re-add Epoch. Forgotten when we split this package from libguestfs. + * Tue May 05 2020 Richard W.M. Jones - 1.42.0-2 - OCaml 4.11.0+dev2-2020-04-22 rebuild From be446a8c853e14b3bfb20a93df94f60ac45a47de Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 May 2020 14:44:44 +0100 Subject: [PATCH 040/235] Need to update Requires lines to match epoch added in previous commit. --- virt-v2v.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 84b4fec..f18a0da 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.42.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -99,7 +99,7 @@ install virtio drivers so it will run quickly. Summary: Bash tab-completion for %{name} BuildArch: noarch Requires: bash-completion >= 2.0 -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description bash-completion @@ -110,7 +110,7 @@ for %{name}. %package man-pages-ja Summary: Japanese (ja) man pages for %{name} BuildArch: noarch -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description man-pages-ja %{name}-man-pages-ja contains Japanese (ja) man pages @@ -120,7 +120,7 @@ for %{name}. %package man-pages-uk Summary: Ukrainian (uk) man pages for %{name} BuildArch: noarch -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} %description man-pages-uk %{name}-man-pages-uk contains Ukrainian (uk) man pages @@ -227,7 +227,7 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog -* Wed May 06 2020 Richard W.M. Jones - 1.42.0-3 +* Wed May 06 2020 Richard W.M. Jones - 1.42.0-4 - Re-add Epoch. Forgotten when we split this package from libguestfs. * Tue May 05 2020 Richard W.M. Jones - 1.42.0-2 From a3e6ed7219737669352467aa935ff9a7fbd852dc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 6 Jul 2020 16:31:35 +0100 Subject: [PATCH 041/235] New development branch 1.43. --- sources | 4 ++-- virt-v2v.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index dad45a4..af867db 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.42.0.tar.gz) = 75841717d54479443eb63365375e44d0b9189bb72ed761685081cc3bc53aa0f50954e72df07d23c95412f25eae12eb6c6e13a8c45ba9ffd8f27f861a326a53d7 -SHA512 (virt-v2v-1.42.0.tar.gz.sig) = 8986f41829ef5635ff8453bd798856c0bdfd1c6ebd7a844d8771c92e6c898fa5c308bb91b31ebc8ec239f3896fbd23e02bd0fe653800fe8804c960dae244dec2 +SHA512 (virt-v2v-1.43.1.tar.gz) = abbbc32f4e56d73e7f7faad8dd520fc8633d3fccdb316af1c4b583eff4d1f2a0b24b3b10ec4e94c9a9525a30de952faf20e4eefe3c6f4d1c0c3121110f02542a +SHA512 (virt-v2v-1.43.1.tar.gz.sig) = fb435f8177696348af59bc55b7b99a99006a99dee0cc53d25148635eaf005b68c8639dcbe201f8cc83b82dc7b4ada7019016c868032054218c392a85279a78c4 diff --git a/virt-v2v.spec b/virt-v2v.spec index f18a0da..99e5cd5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -5,12 +5,12 @@ %global patches_touch_autotools %{nil} # The source directory. -%global source_directory 1.42-stable +%global source_directory 1.43-development Name: virt-v2v Epoch: 1 -Version: 1.42.0 -Release: 4%{?dist} +Version: 1.43.1 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Mon Jul 06 2020 Richard W.M. Jones - 1.43.1-1 +- New development branch 1.43. + * Wed May 06 2020 Richard W.M. Jones - 1.42.0-4 - Re-add Epoch. Forgotten when we split this package from libguestfs. From 893e8138a2d9a2f1ab34bcf84d600f307ae5a57c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:47:26 +0000 Subject: [PATCH 042/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 99e5cd5..642434d 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1:1.43.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Jul 06 2020 Richard W.M. Jones - 1.43.1-1 - New development branch 1.43. From 4ca512e18439806cb4b6bb31c533b33d9614c87b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 09:35:57 +0000 Subject: [PATCH 043/235] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 642434d..8829832 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,10 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 1:1.43.1-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 1:1.43.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 658df65b8ce0ec7052978d9ba36e6927b0033f1c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 21 Aug 2020 20:05:44 +0100 Subject: [PATCH 044/235] OCaml 4.11.0 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 8829832..aec1ae1 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Fri Aug 21 2020 Richard W.M. Jones - 1:1.43.1-4 +- OCaml 4.11.0 rebuild + * Sat Aug 01 2020 Fedora Release Engineering - 1:1.43.1-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 2afadc4a830e336e878b4a6152b42a47d60bb294 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Sep 2020 22:20:33 +0100 Subject: [PATCH 045/235] OCaml 4.11.1 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index aec1ae1..bb34540 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Tue Sep 01 2020 Richard W.M. Jones - 1:1.43.1-5 +- OCaml 4.11.1 rebuild + * Fri Aug 21 2020 Richard W.M. Jones - 1:1.43.1-4 - OCaml 4.11.0 rebuild From db25f16e0c713aa1606d12fdc42740ac7f5f9f4f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Dec 2020 17:20:15 +0000 Subject: [PATCH 046/235] New upstream version 1.43.2. --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index af867db..e71637c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.43.1.tar.gz) = abbbc32f4e56d73e7f7faad8dd520fc8633d3fccdb316af1c4b583eff4d1f2a0b24b3b10ec4e94c9a9525a30de952faf20e4eefe3c6f4d1c0c3121110f02542a -SHA512 (virt-v2v-1.43.1.tar.gz.sig) = fb435f8177696348af59bc55b7b99a99006a99dee0cc53d25148635eaf005b68c8639dcbe201f8cc83b82dc7b4ada7019016c868032054218c392a85279a78c4 +SHA512 (virt-v2v-1.43.2.tar.gz) = 4de054276b3b421806fe9b9118d33bf3cb4fbb0263df782f1ba5f7e9f8b7f54d4192ceefbc9af60c2d9b6a36aa024cd8476b16afe176b62f846ae66692c0362c +SHA512 (virt-v2v-1.43.2.tar.gz.sig) = 6421460d8b7703803bff851b18621a728214020fc07b0002eba7156826f7cd175ceada7ae38c480208604392e3b5abcbca0de7d7f4e5912bbd3b1afb8bd096c6 diff --git a/virt-v2v.spec b/virt-v2v.spec index bb34540..725ed73 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,8 +9,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.43.1 -Release: 5%{?dist} +Version: 1.43.2 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -227,6 +227,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Tue Dec 01 2020 Richard W.M. Jones - 1:1.43.2-1 +- New upstream version 1.43.2. + * Tue Sep 01 2020 Richard W.M. Jones - 1:1.43.1-5 - OCaml 4.11.1 rebuild From 6ec7a0de065cda6bb35ea3eb7b8671427a9b10ca Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 2 Dec 2020 21:11:37 +0000 Subject: [PATCH 047/235] Unify Fedora and RHEL spec files. --- copy-patches.sh | 55 +++++++++++++++++++++++++++++++++++++++++ virt-v2v.spec | 66 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 106 insertions(+), 15 deletions(-) create mode 100755 copy-patches.sh diff --git a/copy-patches.sh b/copy-patches.sh new file mode 100755 index 0000000..4f63c5f --- /dev/null +++ b/copy-patches.sh @@ -0,0 +1,55 @@ +#!/bin/bash - + +set -e + +# Maintainer script to copy patches from the git repo to the current +# directory. Use it like this: +# ./copy-patches.sh + +rhel_version=av-8.3.0 + +# Check we're in the right directory. +if [ ! -f virt-v2v.spec ]; then + echo "$0: run this from the directory containing 'virt-v2v.spec'" + exit 1 +fi + +git_checkout=$HOME/d/virt-v2v-rhel-$rhel_version +if [ ! -d $git_checkout ]; then + echo "$0: $git_checkout does not exist" + echo "This script is only for use by the maintainer when preparing a" + echo "virt-v2v release on RHEL." + exit 1 +fi + +# Get the base version of virt-v2v. +version=`grep '^Version:' virt-v2v.spec | awk '{print $2}'` +tag="v$version" + +# Remove any existing patches. +git rm -f [0-9]*.patch ||: +rm -f [0-9]*.patch + +# Get the patches. +(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N --submodule=diff $tag) +mv $git_checkout/[0-9]*.patch . + +# Remove any not to be applied. +rm -f *NOT-FOR-RPM*.patch + +# Add the patches. +git add [0-9]*.patch + +# Print out the patch lines. +echo +echo "--- Copy the following text into virt-v2v.spec file" +echo + +echo "# Patches." +for f in [0-9]*.patch; do + n=`echo $f | awk -F- '{print $1}'` + echo "Patch$n: $f" +done + +echo +echo "--- End of text" diff --git a/virt-v2v.spec b/virt-v2v.spec index 725ed73..5d9292f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -23,6 +23,10 @@ Source1: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{nam Source2: libguestfs.keyring %endif +# Maintainer script which helps with handling patches. +Source3: copy-patches.sh + +%if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather # fundamentally depends on the kernel. Therefore we must exclude this @@ -30,6 +34,14 @@ Source2: libguestfs.keyring # expect that libguestfs or virt-v2v will be available on i686 so # there is nothing that needs fixing. ExcludeArch: %{ix86} +%else +# Architectures where virt-v2v is shipped on RHEL: +# +# not on aarch64 because it is not useful there +# not on %%{power64} because of RHBZ#1287826 +# not on s390x because it is not useful there +ExclusiveArch: x86_64 +%endif %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool @@ -38,7 +50,7 @@ BuildRequires: autoconf, automake, libtool BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.01 -BuildRequires: libguestfs-devel >= 1:1.40 +BuildRequires: libguestfs-devel >= 1:1.42 BuildRequires: augeas-devel BuildRequires: bash-completion @@ -47,7 +59,6 @@ BuildRequires: gettext-devel BuildRequires: jansson-devel BuildRequires: libosinfo-devel BuildRequires: libvirt-devel -BuildRequires: libvirt-daemon-qemu BuildRequires: libvirt-daemon-kvm BuildRequires: libxml2-devel BuildRequires: pcre-devel @@ -67,8 +78,13 @@ BuildRequires: nbdkit-python-plugin BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.40 -Requires: libguestfs-tools-c >= 1:1.40 +Requires: libguestfs%{?_isa} >= 1:1.42 +Requires: libguestfs-tools-c >= 1:1.42 + +%if 0%{?rhel} +# For Windows conversions on RHEL. +Requires: libguestfs-winsupport >= 7.2 +%endif Requires: gawk Requires: gzip @@ -76,11 +92,21 @@ Requires: unzip Requires: curl Requires: /usr/bin/virsh -Recommends: nbdkit -Recommends: nbdkit-curl-plugin -Recommends: nbdkit-python-plugin -Recommends: nbdkit-ssh-plugin -Recommends: nbdkit-vddk-plugin +# Ensure the UEFI firmware is available, to properly convert +# EFI guests (RHBZ#1429643). +%ifarch x86_64 +Requires: edk2-ovmf +%endif +%ifarch aarch64 +Requires: edk2-aarch64 +%endif + +# Needed for -it vddk, and -o rhv-upload. +Requires: nbdkit +Requires: nbdkit-curl-plugin +Requires: nbdkit-python-plugin +Requires: nbdkit-ssh-plugin +Requires: nbdkit-vddk-plugin # For rhsrvany.exe, used to install firstboot scripts in Windows guests. Requires: mingw32-srvany >= 1.0-13 @@ -132,14 +158,21 @@ for %{name}. %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif %autosetup -p1 + %if 0%{patches_touch_autotools} autoreconf -i %endif %build -%configure -make %{?_smp_mflags} +%configure \ +%if !0%{?rhel} + --with-extra="fedora=%{fedora},release=%{release}" \ +%else + --with-extra="rhel=%{rhel},release=%{release}" \ +%endif + +make V=1 %{?_smp_mflags} %install @@ -155,9 +188,10 @@ pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe popd -# Delete the v2v test harness (except for the man page). +# Delete the v2v test harness. rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* +rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-test-harness.1* # Find locale files. %find_lang %{name} @@ -193,7 +227,7 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %files -f %{name}.lang %license COPYING -#doc README +%doc README %{_bindir}/virt-v2v %{_bindir}/virt-v2v-copy-to-local %{_mandir}/man1/virt-v2v.1* @@ -206,7 +240,6 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %{_mandir}/man1/virt-v2v-output-rhv.1* %{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-support.1* -%{_mandir}/man1/virt-v2v-test-harness.1* %{_datadir}/virt-tools @@ -227,6 +260,9 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog +* Wed Dec 02 2020 Richard W.M. Jones - 1:1.43.2-2 +- Unify Fedora and RHEL spec files. + * Tue Dec 01 2020 Richard W.M. Jones - 1:1.43.2-1 - New upstream version 1.43.2. From 289db7e0c0d38a9eaec541829916732b100481e9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Dec 2020 12:16:28 +0000 Subject: [PATCH 048/235] Drop obsolete virt-v2v-copy-to-local tool for Fedora 34 and RHEL 9. --- virt-v2v.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 5d9292f..a9bc0d3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -193,6 +193,10 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-test-harness.1* +# Delete copy-to-local tool. +rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v-copy-to-local +rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-copy-to-local.1* + # Find locale files. %find_lang %{name} @@ -260,6 +264,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-test-harness.1* %changelog +* Thu Dec 03 2020 Richard W.M. Jones - 1:1.43.2-3 +- Drop obsolete virt-v2v-copy-to-local tool for Fedora 34 and RHEL 9. + * Wed Dec 02 2020 Richard W.M. Jones - 1:1.43.2-2 - Unify Fedora and RHEL spec files. From 493bd4f36eccc6e2cb8177de75d474a3b57e3498 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Dec 2020 12:33:07 +0000 Subject: [PATCH 049/235] Fix previous commit. --- virt-v2v.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index a9bc0d3..0e9ddb3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -196,6 +196,7 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-test-harness.1* # Delete copy-to-local tool. rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v-copy-to-local rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-copy-to-local.1* +rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local # Find locale files. %find_lang %{name} @@ -233,9 +234,7 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-copy-to-local.1* %license COPYING %doc README %{_bindir}/virt-v2v -%{_bindir}/virt-v2v-copy-to-local %{_mandir}/man1/virt-v2v.1* -%{_mandir}/man1/virt-v2v-copy-to-local.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* %{_mandir}/man1/virt-v2v-input-xen.1* @@ -250,7 +249,6 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-copy-to-local.1* %files bash-completion %license COPYING %{_datadir}/bash-completion/completions/virt-v2v -%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %files man-pages-ja From 94934a6a8932e5e467384f3de5fcf99a7ad59beb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Jan 2021 15:05:05 +0000 Subject: [PATCH 050/235] New upstream version 1.43.3. --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index e71637c..0c8e824 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.43.2.tar.gz) = 4de054276b3b421806fe9b9118d33bf3cb4fbb0263df782f1ba5f7e9f8b7f54d4192ceefbc9af60c2d9b6a36aa024cd8476b16afe176b62f846ae66692c0362c -SHA512 (virt-v2v-1.43.2.tar.gz.sig) = 6421460d8b7703803bff851b18621a728214020fc07b0002eba7156826f7cd175ceada7ae38c480208604392e3b5abcbca0de7d7f4e5912bbd3b1afb8bd096c6 +SHA512 (virt-v2v-1.43.3.tar.gz) = 39f6b4ad8b18a32dd3b584fb007f9c5b34140dde87874280b4df2e97f997aedef14312db032bff3ce6215ad5c7a58974789a41a7537fa06deac86e3a7cd04a8b +SHA512 (virt-v2v-1.43.3.tar.gz.sig) = 34dd70ad265af89aa9d9e971fdc0927e20d0926dc269c6125a95c139b0cfd0aaf040da4baeac8d81af3ae43f8d90a5ff5a6f53f30daa4c1374af002964f77975 diff --git a/virt-v2v.spec b/virt-v2v.spec index 0e9ddb3..f0471d4 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,8 +9,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.43.2 -Release: 3%{?dist} +Version: 1.43.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -262,6 +262,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Tue Jan 05 2021 Richard W.M. Jones - 1:1.43.3-1 +- New upstream version 1.43.3. + * Thu Dec 03 2020 Richard W.M. Jones - 1:1.43.2-3 - Drop obsolete virt-v2v-copy-to-local tool for Fedora 34 and RHEL 9. From 4b2c8b6497bf4e5a3f632a9851b47cd6f469e11c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 12 Jan 2021 01:36:39 +0000 Subject: [PATCH 051/235] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index f0471d4..f1da26a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -47,6 +47,7 @@ ExclusiveArch: x86_64 BuildRequires: autoconf, automake, libtool %endif +BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.01 From dbae216c1899cedea4b6172acf275de6436bb498 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:09:06 +0000 Subject: [PATCH 052/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index f1da26a..671a21f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -263,6 +263,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1:1.43.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jan 05 2021 Richard W.M. Jones - 1:1.43.3-1 - New upstream version 1.43.3. From 3b9c0f9f7be501dfd307f27597fa9cf8e70bda40 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 2 Mar 2021 10:49:20 +0000 Subject: [PATCH 053/235] Add fix for OCaml 4.12. --- ...tils-std_utils.ml-Fix-for-OCaml-4.12.patch | 35 +++++++++++++++++++ virt-v2v.spec | 8 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch diff --git a/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch b/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch new file mode 100644 index 0000000..4a21db6 --- /dev/null +++ b/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch @@ -0,0 +1,35 @@ +From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 2 Mar 2021 10:39:15 +0000 +Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12. + +We were using a default function from somewhere called "compare" +instead of the actual function (Pervasives.compare / Stdlib.compare). +Since the wrong default function was used it had a different type from +what we expected: + +File "std_utils.ml", line 312, characters 36-37: +312 | | (y, y') :: _ when cmp x y = 0 -> y' + ^ +Error: This expression has type int but an expression was expected of type + 'weak1 list -> int +--- + common/mlstdutils/std_utils.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml +index 4237ea519..88477179a 100644 +--- a/common/mlstdutils/std_utils.ml ++++ b/common/mlstdutils/std_utils.ml +@@ -307,7 +307,7 @@ module List = struct + | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs + | _ -> invalid_arg "combine3" + +- let rec assoc_lbl ?(cmp = compare) ~default x = function ++ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function + | [] -> default + | (y, y') :: _ when cmp x y = 0 -> y' + | _ :: ys -> assoc_lbl ~cmp ~default x ys +-- +2.29.0.rc2 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 671a21f..4b826d9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -26,6 +26,9 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh +# Fix for OCaml 4.12. +Patch1: 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch + %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather @@ -263,6 +266,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Tue Mar 2 2021 Richard W.M. Jones - 1:1.43.3-3 +- Add fix for OCaml 4.12. + * Wed Jan 27 2021 Fedora Release Engineering - 1:1.43.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From ff416b9134b8ddc79e5341ea00a970b6b52932f9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 2 Mar 2021 12:43:07 +0000 Subject: [PATCH 054/235] OCaml 4.12.0 build --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 4b826d9..8cb2be4 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -266,6 +266,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Tue Mar 2 12:43:06 GMT 2021 Richard W.M. Jones - 1:1.43.3-4 +- OCaml 4.12.0 build + * Tue Mar 2 2021 Richard W.M. Jones - 1:1.43.3-3 - Add fix for OCaml 4.12. From 104a51bea0e0619ce192c7e240650333334deb33 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 3 Mar 2021 12:59:29 +0000 Subject: [PATCH 055/235] New upstream version 1.43.4. --- ...tils-std_utils.ml-Fix-for-OCaml-4.12.patch | 35 ------------------- sources | 4 +-- virt-v2v.spec | 12 +++---- 3 files changed, 8 insertions(+), 43 deletions(-) delete mode 100644 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch diff --git a/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch b/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch deleted file mode 100644 index 4a21db6..0000000 --- a/0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 2 Mar 2021 10:39:15 +0000 -Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12. - -We were using a default function from somewhere called "compare" -instead of the actual function (Pervasives.compare / Stdlib.compare). -Since the wrong default function was used it had a different type from -what we expected: - -File "std_utils.ml", line 312, characters 36-37: -312 | | (y, y') :: _ when cmp x y = 0 -> y' - ^ -Error: This expression has type int but an expression was expected of type - 'weak1 list -> int ---- - common/mlstdutils/std_utils.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml -index 4237ea519..88477179a 100644 ---- a/common/mlstdutils/std_utils.ml -+++ b/common/mlstdutils/std_utils.ml -@@ -307,7 +307,7 @@ module List = struct - | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs - | _ -> invalid_arg "combine3" - -- let rec assoc_lbl ?(cmp = compare) ~default x = function -+ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function - | [] -> default - | (y, y') :: _ when cmp x y = 0 -> y' - | _ :: ys -> assoc_lbl ~cmp ~default x ys --- -2.29.0.rc2 - diff --git a/sources b/sources index 0c8e824..37e3750 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.43.3.tar.gz) = 39f6b4ad8b18a32dd3b584fb007f9c5b34140dde87874280b4df2e97f997aedef14312db032bff3ce6215ad5c7a58974789a41a7537fa06deac86e3a7cd04a8b -SHA512 (virt-v2v-1.43.3.tar.gz.sig) = 34dd70ad265af89aa9d9e971fdc0927e20d0926dc269c6125a95c139b0cfd0aaf040da4baeac8d81af3ae43f8d90a5ff5a6f53f30daa4c1374af002964f77975 +SHA512 (virt-v2v-1.43.4.tar.gz) = 3c11ea864b0a1dd579c8dff891295be9200c9ba9e1d804cfd50aa356d626b8aa11a08c70ac2c6e20e5e9e023fea0d46e8f84edc1fca59484521ca273857f5c57 +SHA512 (virt-v2v-1.43.4.tar.gz.sig) = 292d02fc94888446016b34637e1ea913a753d0f430a130f881b7f101ed4887b13b91c551353c45f9f73d9876b1e3941e846e8ecde5ed3996c999578557bbc944 diff --git a/virt-v2v.spec b/virt-v2v.spec index 8cb2be4..93457f2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -9,8 +9,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.43.3 -Release: 4%{?dist} +Version: 1.43.4 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -26,9 +26,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -# Fix for OCaml 4.12. -Patch1: 0001-mlstdutils-std_utils.ml-Fix-for-OCaml-4.12.patch - %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather @@ -266,7 +263,10 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog -* Tue Mar 2 12:43:06 GMT 2021 Richard W.M. Jones - 1:1.43.3-4 +* Tue Mar 3 2021 Richard W.M. Jones - 1:1.43.4-1 +- New upstream version 1.43.4. + +* Tue Mar 2 2021 Richard W.M. Jones - 1:1.43.3-4 - OCaml 4.12.0 build * Tue Mar 2 2021 Richard W.M. Jones - 1:1.43.3-3 From 0ef32f9020caa3cd048e3fa4c126283a0faa2ea7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Mar 2021 12:23:40 +0000 Subject: [PATCH 056/235] Bump and rebuild for ocaml-gettext update. --- virt-v2v.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 93457f2..a167b98 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,7 +10,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -263,7 +263,10 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog -* Tue Mar 3 2021 Richard W.M. Jones - 1:1.43.4-1 +* Mon Mar 8 2021 Richard W.M. Jones - 1:1.43.4-2 +- Bump and rebuild for ocaml-gettext update. + +* Wed Mar 3 2021 Richard W.M. Jones - 1:1.43.4-1 - New upstream version 1.43.4. * Tue Mar 2 2021 Richard W.M. Jones - 1:1.43.3-4 From 65fcab520f704bee13494fdc2def179b09be1b3a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Mar 2021 13:24:45 +0000 Subject: [PATCH 057/235] Make ocaml-ounit dependency conditional on !RHEL. It's only needed to run some unit tests. --- virt-v2v.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index a167b98..f41491c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -71,7 +71,9 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-libguestfs-devel BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-gettext-devel +%if !0%{?rhel} BuildRequires: ocaml-ounit-devel +%endif BuildRequires: nbdkit-python-plugin From 6be9aa8e5f805c2dbe02f1d93ed855fb888621fc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Mar 2021 12:07:53 +0100 Subject: [PATCH 058/235] Add downstream (RHEL-only) patches (RHBZ#1931724). --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 33 ++ ...le-the-qemu-boot-option-RHBZ-1147313.patch | 105 +++++++ ...-supported-sound-cards-to-match-RHEL.patch | 34 +++ ...-Fix-tests-for-libguestfs-winsupport.patch | 66 ++++ ...Disable-the-virt-v2v-in-place-option.patch | 288 ++++++++++++++++++ ...sk-force-VNC-as-display-RHBZ-1372671.patch | 26 ++ ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 26 ++ ...load-Remove-restriction-on-oa-sparse.patch | 89 ++++++ ...-for-supported-v2v-hypervisors-guest.patch | 127 ++++++++ virt-v2v.spec | 23 +- 10 files changed, 816 insertions(+), 1 deletion(-) create mode 100644 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch create mode 100644 0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch create mode 100644 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch create mode 100644 0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch create mode 100644 0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch create mode 100644 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch create mode 100644 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch create mode 100644 0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch create mode 100644 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch new file mode 100644 index 0000000..94f2e9c --- /dev/null +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -0,0 +1,33 @@ +From 9918c857eca2ce4efddb4ed9f17dccfc6144471f Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sun, 28 Sep 2014 19:14:43 +0100 +Subject: [PATCH 1/9] RHEL: v2v: Select correct qemu binary for -o qemu mode + (RHBZ#1147313). + +RHEL does not have qemu-system-x86_64 (etc), and in addition the +qemu binary is located in /usr/libexec. Encode the path to this +binary directly in the script. + +Note that we don't support people running qemu directly like this. +It's just for quick testing of converted VMs, and to help us with +support cases. +--- + v2v/output_qemu.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml +index d6d70c23..490576e9 100644 +--- a/v2v/output_qemu.ml ++++ b/v2v/output_qemu.ml +@@ -81,7 +81,7 @@ object + * module deals with shell and qemu comma quoting. + *) + let cmd = Qemuopts.create () in +- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch); ++ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm"; + + let flag = Qemuopts.flag cmd + and arg = Qemuopts.arg cmd +-- +2.30.1 + diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch new file mode 100644 index 0000000..1ccfcbd --- /dev/null +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch @@ -0,0 +1,105 @@ +From 51d18cc8da56f5b8395ae2f5edd6b11cda5c84df Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 30 Sep 2014 10:50:27 +0100 +Subject: [PATCH 2/9] RHEL: v2v: Disable the --qemu-boot option (RHBZ#1147313). + +This cannot work because there is no Gtk or SDL output mode +in RHEL's qemu-kvm. + +In addition you will have to edit the -display option in the +qemu script. +--- + docs/virt-v2v-output-local.pod | 6 ++---- + docs/virt-v2v.pod | 13 ------------- + v2v/cmdline.ml | 3 ++- + 3 files changed, 4 insertions(+), 18 deletions(-) + +diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod +index a5f155cb..3a2e6238 100644 +--- a/docs/virt-v2v-output-local.pod ++++ b/docs/virt-v2v-output-local.pod +@@ -9,7 +9,7 @@ or libvirt + + virt-v2v [-i* options] -o local -os DIRECTORY + +- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot] ++ virt-v2v [-i* options] -o qemu -os DIRECTORY + + virt-v2v [-i* options] -o json -os DIRECTORY + [-oo json-disks-pattern=PATTERN] +@@ -50,12 +50,10 @@ where C is the guest name. + + =item B<-o qemu -os> C + +-=item B<-o qemu -os> C B<--qemu-boot> +- + This converts the guest to files in C. Unlike I<-o local> + above, a shell script is created which contains the raw qemu command + you would need to boot the guest. However the shell script is not +-run, I you also add the I<--qemu-boot> option. ++run. + + =item B<-o json -os> C + +diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod +index 9323ff52..06ddd781 100644 +--- a/docs/virt-v2v.pod ++++ b/docs/virt-v2v.pod +@@ -144,11 +144,6 @@ Since F contains the path(s) to the guest disk + image(s) you do not need to specify the name of the disk image on the + command line. + +-To convert a local disk image and immediately boot it in local +-qemu, do: +- +- virt-v2v -i disk disk.img -o qemu -os /var/tmp --qemu-boot +- + =head1 OPTIONS + + =over 4 +@@ -537,9 +532,6 @@ This is similar to I<-o local>, except that a shell script is written + which you can use to boot the guest in qemu. The converted disks and + shell script are written to the directory specified by I<-os>. + +-When using this output mode, you can also specify the I<--qemu-boot> +-option which boots the guest under qemu immediately. +- + =item B<-o> B + + This is the same as I<-o rhv>. +@@ -815,11 +807,6 @@ Print information about the source guest and stop. This option is + useful when you are setting up network and bridge maps. + See L. + +-=item B<--qemu-boot> +- +-When using I<-o qemu> only, this boots the guest immediately after +-virt-v2v finishes. +- + =item B<-q> + + =item B<--quiet> +diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml +index 3b74f307..df69e2e0 100644 +--- a/v2v/cmdline.ml ++++ b/v2v/cmdline.ml +@@ -284,7 +284,6 @@ let parse_cmdline () = + s_"Estimate size of source and stop"; + [ L"print-source" ], Getopt.Set print_source, + s_"Print source and stop"; +- [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)"; + [ L"root" ], Getopt.String ("ask|... ", set_root_choice), + s_"How to choose root filesystem"; + [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), +@@ -668,6 +667,8 @@ read the man page virt-v2v(1). + | Some d when not (is_directory d) -> + error (f_"-os %s: output directory does not exist or is not a directory") d + | Some d -> d in ++ if qemu_boot then ++ error (f_"-o qemu: the --qemu-boot option cannot be used in RHEL"); + Output_qemu.output_qemu os qemu_boot, + output_format, output_alloc + +-- +2.30.1 + diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch new file mode 100644 index 0000000..418df08 --- /dev/null +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -0,0 +1,34 @@ +From e51db3fdf2b3abde05235f6c14c396eae0048320 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 24 Apr 2015 09:45:41 -0400 +Subject: [PATCH 3/9] RHEL: Fix list of supported sound cards to match RHEL + qemu (RHBZ#1176493). + +--- + v2v/utils.ml | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/v2v/utils.ml b/v2v/utils.ml +index 7136e4be..a6c359f0 100644 +--- a/v2v/utils.ml ++++ b/v2v/utils.ml +@@ -59,13 +59,14 @@ let kvm_arch = function + (* Does qemu support the given sound card? *) + let qemu_supports_sound_card = function + | Types.AC97 +- | Types.ES1370 + | Types.ICH6 + | Types.ICH9 + | Types.PCSpeaker ++ -> true ++ | Types.ES1370 + | Types.SB16 + | Types.USBAudio +- -> true ++ -> false + + (* Find the UEFI firmware. *) + let find_uefi_firmware guest_arch = +-- +2.30.1 + diff --git a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch new file mode 100644 index 0000000..7a57f6b --- /dev/null +++ b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch @@ -0,0 +1,66 @@ +From 709e21ab98a6d207301161e6463dab8a77c87749 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sun, 30 Aug 2015 03:21:57 -0400 +Subject: [PATCH 4/9] RHEL: Fix tests for libguestfs-winsupport. + +It doesn't let us use guestfish for arbitrary Windows edits. +--- + tests/test-v2v-virtio-win-iso.sh | 8 +++++++- + tests/test-v2v-windows-conversion.sh | 8 +++++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh +index 6e99f0f1..a8e572c5 100755 +--- a/tests/test-v2v-virtio-win-iso.sh ++++ b/tests/test-v2v-virtio-win-iso.sh +@@ -79,6 +79,12 @@ mktest () + :> "$script" + :> "$expected" + ++cat >> "$script" < "$response" ++guestfish --ro -a "$d/windows-sda" < "$script" > "$response" + diff -u "$expected" "$response" + + rm -r $d +diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh +index f1da222a..ff94fe39 100755 +--- a/tests/test-v2v-windows-conversion.sh ++++ b/tests/test-v2v-windows-conversion.sh +@@ -73,6 +73,12 @@ mktest () + :> "$script" + :> "$expected" + ++cat >> "$script" < "$response" ++guestfish --ro -a "$d/windows-sda" < "$script" > "$response" + diff -u "$expected" "$response" + + # We also update the Registry several times, for firstboot, and (ONLY +-- +2.30.1 + diff --git a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch b/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch new file mode 100644 index 0000000..e558ae3 --- /dev/null +++ b/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch @@ -0,0 +1,288 @@ +From 4773fdcb0be3517e658c8bf08ed65537851e43dc Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 14 Jan 2016 11:53:42 -0500 +Subject: [PATCH 5/9] RHEL: v2v: Disable the virt-v2v --in-place option. + +This disables the virt-v2v --in-place option which we do not +wish to support in RHEL. +(See commit d0069559a939e47e5f29973ed9a69a13f0b58301). +--- + docs/test-v2v-docs.sh | 1 + + docs/virt-v2v.pod | 50 +---------------- + tests/Makefile.am | 2 - + tests/test-v2v-in-place.sh | 108 ------------------------------------- + v2v/cmdline.ml | 8 +-- + 5 files changed, 8 insertions(+), 161 deletions(-) + delete mode 100755 tests/test-v2v-in-place.sh + +diff --git a/docs/test-v2v-docs.sh b/docs/test-v2v-docs.sh +index dd2b1233..8fef46cc 100755 +--- a/docs/test-v2v-docs.sh ++++ b/docs/test-v2v-docs.sh +@@ -27,6 +27,7 @@ $top_srcdir/podcheck.pl virt-v2v.pod virt-v2v \ + --debug-overlay,\ + --ic,\ + --if,\ ++--in-place,\ + --io,\ + --ip,\ + --it,\ +diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod +index 06ddd781..50b0bc8e 100644 +--- a/docs/virt-v2v.pod ++++ b/docs/virt-v2v.pod +@@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM + [-o mode] [other -o* options] + [guest|filename] + +- virt-v2v --in-place +- [-i mode] [other -i* options] +- [guest|filename] +- + =head1 DESCRIPTION + + Virt-v2v converts a single guest from a foreign hypervisor to run on +@@ -39,9 +35,6 @@ these sides of virt-v2v are documented separately in this manual. + + Virt-v2v normally copies from the input to the output, called "copying + mode". In this case the source guest is always left unchanged. +-In-place conversion (I<--in-place>) only uses the I<-i*> options and +-modifies the source guest in-place. (See L +-below.) + + =head2 Other virt-v2v topics + +@@ -301,20 +294,6 @@ For I<-i disk> only, this specifies the format of the input disk + image. For other input methods you should specify the input + format in the metadata. + +-=item B<--in-place> +- +-Do not create an output virtual machine in the target hypervisor. +-Instead, adjust the guest OS in the source VM to run in the input +-hypervisor. +- +-This mode is meant for integration with other toolsets, which take the +-responsibility of converting the VM configuration, providing for +-rollback in case of errors, transforming the storage, etc. +- +-See L below. +- +-Conflicts with all I<-o *> options. +- + =item B<-io> OPTION=VALUE + + Set input option(s) related to the current input mode or transport. +@@ -1332,8 +1311,8 @@ have at least 100 available inodes. + =head3 Minimum free space check in the host + + You must have sufficient free space in the host directory used to +-store large temporary overlays (except in I<--in-place> mode). To +-find out which directory this is, use: ++store large temporary overlays. To find out ++which directory this is, use: + + $ df -h "`guestfish get-cachedir`" + Filesystem Size Used Avail Use% Mounted on +@@ -1471,31 +1450,6 @@ that instead. + + + +-=head2 In-place conversion +- +-It is also possible to use virt-v2v in scenarios where a foreign VM +-has already been imported into a KVM-based hypervisor, but still needs +-adjustments in the guest to make it run in the new virtual hardware. +- +-In that case it is assumed that a third-party tool has created the +-target VM in the supported KVM-based hypervisor based on the source VM +-configuration and contents, but using virtual devices more appropriate +-for KVM (e.g. virtio storage and network, etc.). +- +-Then, to make the guest OS boot and run in the changed environment, +-one can use: +- +- virt-v2v -ic qemu:///system converted_vm --in-place +- +-Virt-v2v will analyze the configuration of C in the +-C libvirt instance, and apply various fixups to the +-guest OS configuration to make it match the VM configuration. This +-may include installing virtio drivers, configuring the bootloader, the +-mountpoints, the network interfaces, and so on. +- +-Should an error occur during the operation, virt-v2v exits with an +-error code leaving the VM in an undefined state. +- + =head2 Machine readable output + + The I<--machine-readable> option can be used to make the output more +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 871dc3c9..eee4e1af 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -76,7 +76,6 @@ TESTS = \ + test-v2v-floppy.sh \ + test-v2v-i-disk.sh \ + test-v2v-i-ova.sh \ +- test-v2v-in-place.sh \ + test-v2v-mac.sh \ + test-v2v-machine-readable.sh \ + test-v2v-networks-and-bridges.sh \ +@@ -225,7 +224,6 @@ EXTRA_DIST += \ + test-v2v-i-vmx-3.vmx \ + test-v2v-i-vmx-4.vmx \ + test-v2v-i-vmx-5.vmx \ +- test-v2v-in-place.sh \ + test-v2v-it-vddk-io-query.sh \ + test-v2v-machine-readable.sh \ + test-v2v-mac-expected.xml \ +diff --git a/tests/test-v2v-in-place.sh b/tests/test-v2v-in-place.sh +deleted file mode 100755 +index 6f7d78f3..00000000 +--- a/tests/test-v2v-in-place.sh ++++ /dev/null +@@ -1,108 +0,0 @@ +-#!/bin/bash - +-# libguestfs virt-v2v test script +-# Copyright (C) 2014 Red Hat Inc. +-# Copyright (C) 2015 Parallels IP Holdings GmbH. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- +-# Test --in-place. +- +-unset CDPATH +-export LANG=C +-set -e +- +-$TEST_FUNCTIONS +-skip_if_skipped +-skip_if_backend uml +-skip_unless_phony_guest windows.img +- +-img_base="$abs_top_builddir/test-data/phony-guests/windows.img" +- +-export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools" +-export VIRTIO_WIN="$top_srcdir/test-data/fake-virtio-win" +- +-d=$PWD/test-v2v-in-place.d +-rm -rf $d +-mkdir $d +- +-img="$d/test.qcow2" +-rm -f $img +-qemu-img create -f qcow2 -b $img_base -o compat=1.1,backing_fmt=raw $img +-md5="$(do_md5 $img_base)" +- +-libvirt_xml="$d/test.xml" +-rm -f $libvirt_xml +-n=windows-overlay +-cat > $libvirt_xml < +- +- $n +- 1048576 +- +- hvm +- +- +- +- +- +- +- +- +- +- +- +-EOF +- +-$VG virt-v2v --debug-gc -i libvirt -ic "test://$libvirt_xml" $n --in-place +- +-# Test that the drivers have been copied over into the guest +-script="$d/test.fish" +-expected="$d/expected" +-response="$d/response" +- +-mktest () +-{ +- local cmd="$1" exp="$2" +- +- echo "echo '$cmd'" >> "$script" +- echo "$cmd" >> "$expected" +- +- echo "$cmd" >> "$script" +- echo "$exp" >> "$expected" +-} +- +-:> "$script" +-:> "$expected" +- +-firstboot_dir="/Program Files/Guestfs/Firstboot" +-mktest "is-dir \"$firstboot_dir\"" true +-mktest "is-file \"$firstboot_dir/firstboot.bat\"" true +-mktest "is-dir \"$firstboot_dir/scripts\"" true +-virtio_dir="/Windows/Drivers/VirtIO" +-mktest "is-dir \"$virtio_dir\"" true +-for drv in netkvm qxl vioscsi viostor; do +- for sfx in cat inf sys; do +- mktest "is-file \"$virtio_dir/$drv.$sfx\"" true +- done +-done +- +-guestfish --ro -a "$img" -i < "$script" > "$response" +-diff -u "$expected" "$response" +- +-# Test the base image remained untouched +-test "$md5" = "$(do_md5 $img_base)" +- +-# Clean up. +-rm -r $d +diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml +index df69e2e0..7b79d462 100644 +--- a/v2v/cmdline.ml ++++ b/v2v/cmdline.ml +@@ -252,8 +252,7 @@ let parse_cmdline () = + s_"Use password from file to connect to input hypervisor"; + [ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport), + s_"Input transport"; +- [ L"in-place" ], Getopt.Set in_place, +- s_"Only tune the guest in the input VM"; ++ [ L"in-place" ], Getopt.Set in_place, Getopt.hidden_option_description; + [ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac), + s_"Map NIC to network or bridge or assign static IP"; + [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), +@@ -396,7 +395,6 @@ read the man page virt-v2v(1). + pr "vddk\n"; + pr "colours-option\n"; + pr "vdsm-compat-option\n"; +- pr "in-place\n"; + pr "io/oo\n"; + pr "mac-option\n"; + pr "bandwidth-option\n"; +@@ -572,6 +570,10 @@ read the man page virt-v2v(1). + error (f_"only ‘-it ssh’ can be used here") in + Input_vmx.input_vmx input_password input_transport arg in + ++ (* Prevent use of --in-place option in RHEL. *) ++ if in_place then ++ error (f_"--in-place cannot be used in RHEL"); ++ + (* Common error message. *) + let error_option_cannot_be_used_in_output_mode mode opt = + error (f_"-o %s: %s option cannot be used in this output mode") mode opt +-- +2.30.1 + diff --git a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch new file mode 100644 index 0000000..fe04aed --- /dev/null +++ b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -0,0 +1,26 @@ +From a128631fded7e2c4e45fcf4304945ca430296944 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 2 Mar 2017 14:21:37 +0100 +Subject: [PATCH 6/9] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) + +The SDL output mode is not supported in RHEL's qemu-kvm. +--- + v2v/input_disk.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml +index d146e84c..4e403003 100644 +--- a/v2v/input_disk.ml ++++ b/v2v/input_disk.ml +@@ -89,7 +89,7 @@ class input_disk input_format disk = object + s_features = [ "acpi"; "apic"; "pae" ]; + s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) + s_display = +- Some { s_display_type = Window; s_keymap = None; s_password = None; ++ Some { s_display_type = VNC; s_keymap = None; s_password = None; + s_listen = LNoListen; s_port = None }; + s_video = None; + s_sound = None; +-- +2.30.1 + diff --git a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch new file mode 100644 index 0000000..bf4b946 --- /dev/null +++ b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -0,0 +1,26 @@ +From c72bbcd9b22408023c686e64040db2693dd70467 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Wed, 8 Mar 2017 11:03:40 +0100 +Subject: [PATCH 7/9] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) + +They are not supported in RHEL. +--- + docs/virt-v2v-input-xen.pod | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod +index 3b3cf0f0..32da2848 100644 +--- a/docs/virt-v2v-input-xen.pod ++++ b/docs/virt-v2v-input-xen.pod +@@ -12,7 +12,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen + =head1 DESCRIPTION + + This page documents how to use L to convert guests from +-RHEL 5 Xen, or SLES and OpenSUSE Xen hosts. ++RHEL 5 Xen hosts. + + =head1 INPUT FROM XEN + +-- +2.30.1 + diff --git a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch new file mode 100644 index 0000000..c2d55e3 --- /dev/null +++ b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch @@ -0,0 +1,89 @@ +From 4663022f13c209260341b4586ef8787cfe158ea5 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 14 May 2018 10:16:58 +0100 +Subject: [PATCH 8/9] RHEL: v2v: rhv-upload: Remove restriction on -oa sparse. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681 +and the v2v-devel private thread "Do we already support migration using FC?" +--- + docs/virt-v2v-output-rhv.pod | 8 +------- + v2v/output_rhv_upload.ml | 10 +--------- + v2v/rhv-upload-plugin.py | 4 +--- + 3 files changed, 3 insertions(+), 19 deletions(-) + +diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod +index 7c9b478a..36c3676f 100644 +--- a/docs/virt-v2v-output-rhv.pod ++++ b/docs/virt-v2v-output-rhv.pod +@@ -5,7 +5,7 @@ virt-v2v-output-rhv - Using virt-v2v to convert guests to oVirt or RHV + =head1 SYNOPSIS + + virt-v2v [-i* options] -o rhv-upload [-oc ENGINE_URL] -os STORAGE +- [-op PASSWORD] [-of raw] ++ [-op PASSWORD] + [-oo rhv-cafile=FILE] + [-oo rhv-cluster=CLUSTER] + [-oo rhv-direct] +@@ -79,12 +79,6 @@ username is not specified then virt-v2v defaults to using + C which is the typical superuser account for oVirt + instances. + +-=item I<-of raw> +- +-Currently you must use I<-of raw> and you cannot use I<-oa preallocated>. +- +-These restrictions will be loosened in a future version. +- + =item I<-op> F + + A file containing a password to be used when connecting to the oVirt +diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml +index dbef7011..27925d7d 100644 +--- a/v2v/output_rhv_upload.ml ++++ b/v2v/output_rhv_upload.ml +@@ -135,17 +135,10 @@ let error_unless_nbdkit_compiled_with_selinux config = + error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") + ) + +-(* Output sparse must be sparse. We may be able to +- * lift this limitation in future, but it requires changes on the +- * RHV side. See TODO file for details. XXX +- *) ++(* Output format must be raw. *) + let error_current_limitation required_param = + error (f_"rhv-upload: currently you must use ‘%s’. This restriction will be loosened in a future version.") required_param + +-let error_unless_output_alloc_sparse output_alloc = +- if output_alloc <> Sparse then +- error_current_limitation "-oa sparse" +- + let json_optstring = function + | Some s -> JSON.String s + | None -> JSON.Null +@@ -253,7 +246,6 @@ object + error_unless_nbdkit_min_version config; + error_unless_nbdkit_python_plugin_working plugin_script; + error_unless_nbdkit_compiled_with_selinux config; +- error_unless_output_alloc_sparse output_alloc; + + (* Python code prechecks. *) + let precheck_fn = tmpdir // "v2vprecheck.json" in +diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py +index 2b0178a9..d817d915 100644 +--- a/v2v/rhv-upload-plugin.py ++++ b/v2v/rhv-upload-plugin.py +@@ -491,10 +491,8 @@ def create_disk(connection): + # size, based on qemu-img measure of the overlay. + initial_size=params['disk_size'], + provisioned_size=params['disk_size'], +- # XXX Ignores params['output_sparse']. +- # Handling this properly will be complex, see: + # https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html +- sparse=True, ++ sparse=params['output_sparse'], + storage_domains=[ + types.StorageDomain( + name=params['output_storage'], +-- +2.30.1 + diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch new file mode 100644 index 0000000..8e3f7e0 --- /dev/null +++ b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -0,0 +1,127 @@ +From 3fcf10ae7beaaf2de969b732afb35c9a5c36f52b Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Tue, 26 Mar 2019 09:42:25 +0100 +Subject: [PATCH 9/9] RHEL: point to KB for supported v2v hypervisors/guests + +--- + docs/virt-v2v-support.pod | 104 ++------------------------------------ + 1 file changed, 4 insertions(+), 100 deletions(-) + +diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod +index 9815f51f..1ffc0f9d 100644 +--- a/docs/virt-v2v-support.pod ++++ b/docs/virt-v2v-support.pod +@@ -8,106 +8,10 @@ systems and guests in virt-v2v + This page documents which foreign hypervisors, virtualization + management systems and guest types that L can support. + +-Note this page applies to upstream virt-v2v from +-L and in downstream distributions of virt-v2v +-sometimes features are intentionally removed, or are present but not +-supported. +- +-=head2 Hypervisors (Input) +- +-=over 4 +- +-=item VMware ESXi +- +-Must be managed by VMware vCenter E 5.0 unless VDDK is available. +- +-=item OVA exported from VMware +- +-OVAs from other hypervisors will not work. +- +-=item VMX from VMware +- +-VMX files generated by other hypervisors will not work. +- +-=item RHEL 5 Xen +- +-=item SUSE Xen +- +-=item Citrix Xen +- +-Citrix Xen has not been recently tested. +- +-=item Hyper-V +- +-Not recently tested. Requires that you export the disk or use +-L on Hyper-V. +- +-=item Direct from disk images +- +-Only disk images exported from supported hypervisors, and using +-container formats supported by qemu. +- +-=item Physical machines +- +-Using the L tool. +- +-=back +- +-=head2 Hypervisors (Output) +- +-QEMU and KVM only. +- +-=head2 Virtualization management systems (Output) +- +-=over 4 +- +-=item OpenStack +- +-=item Red Hat Virtualization (RHV) 4.1 and up +- +-=item Local libvirt +- +-And hence L, L, and similar tools. +- +-=item Local disk +- +-=back +- +-=head2 Guests +- +-=over 4 +- +-=item Red Hat Enterprise Linux 3, 4, 5, 6, 7 +- +-=item CentOS 3, 4, 5, 6, 7 +- +-=item Scientific Linux 3, 4, 5, 6, 7 +- +-=item Oracle Linux +- +-=item Fedora +- +-=item SLES 10 and up +- +-=item OpenSUSE 10 and up +- +-=item ALT Linux 9 and up +- +-=item Debian 6 and up +- +-=item Ubuntu 10.04, 12.04, 14.04, 16.04, and up +- +-=item Windows XP to Windows 10 / Windows Server 2016 +- +-We use Windows internal version numbers, see +-L +- +-Currently NT 5.2 to NT 6.3 are supported. +- +-See L below for additional notes on converting Windows +-guests. +- +-=back ++For more information on supported hypervisors, and guest types in ++RHEL, please consult the following Knowledgebase article on these ++Red Hat Customer Portal: ++L. + + =head2 Guest firmware + +-- +2.30.1 + diff --git a/virt-v2v.spec b/virt-v2v.spec index f41491c..e9b88fa 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,7 +2,12 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. +%if !0%{?rhel} %global patches_touch_autotools %{nil} +%else +# On RHEL the downstream patches always touch autotools files. +%global patches_touch_autotools 1 +%endif # The source directory. %global source_directory 1.43-development @@ -10,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -43,6 +48,19 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif +# Downstream (RHEL-only) patches. +%if 0%{?rhel} +Patch9001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch9002: 0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +Patch9003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch9004: 0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch +Patch9005: 0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch +Patch9006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch9007: 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +Patch9008: 0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +Patch9009: 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +%endif + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -265,6 +283,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Tue Mar 30 2021 Richard W.M. Jones - 1:1.43.4-3 +- Add downstream (RHEL-only) patches (RHBZ#1931724). + * Mon Mar 8 2021 Richard W.M. Jones - 1:1.43.4-2 - Bump and rebuild for ocaml-gettext update. From bed8938b69de8ef6fb46a7b55e11f0ef5a7bd783 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Mar 2021 20:17:41 +0100 Subject: [PATCH 059/235] Add BR xorriso. This will be required by virt-v2v >= 1.43.5. Previously genisoimage was being implicitly pulled in (via libguestfs) but recent changes to libguestfs mean that this will no longer happen. --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index e9b88fa..9b397ea 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -84,6 +84,7 @@ BuildRequires: pcre-devel BuildRequires: perl(Sys::Guestfs) BuildRequires: po4a BuildRequires: /usr/bin/virsh +BuildRequires: xorriso BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-libguestfs-devel From 4c68cfae2025e1505a308e760d7b47364622e1e4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Apr 2021 09:37:59 +0100 Subject: [PATCH 060/235] Add upstream patch to depend on xorriso. --- ...riso-over-genisoimage-to-generate-te.patch | 62 +++++++++++++++++++ virt-v2v.spec | 8 ++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch diff --git a/0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch b/0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch new file mode 100644 index 0000000..b9ff242 --- /dev/null +++ b/0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch @@ -0,0 +1,62 @@ +From 7a346548c052d535015f98874ea52dee4b392947 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 30 Mar 2021 12:41:58 +0100 +Subject: [PATCH] tests: Prefer xorriso over genisoimage to generate test.iso + +This Debian page explains the upstream situation: +https://wiki.debian.org/genisoimage + +On Fedora, xorriso provides a compatibility program called "mkisofs". +However this is not present in Debian. Hence the choice to look for +the program called "xorrisofs". + +(cherry picked from commit 2216ab2e328457ef172d6bfa534272edf2f81a3a) +--- + m4/guestfs-progs.m4 | 6 +++--- + test-data/Makefile.am | 2 +- + test-data/fake-virtio-win/Makefile.am | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 +index 4575a72a9..8f34faefa 100644 +--- a/m4/guestfs-progs.m4 ++++ b/m4/guestfs-progs.m4 +@@ -39,10 +39,10 @@ AC_PROG_AWK + + AC_PROG_LN_S + +-dnl Check for genisoimage/mkisofs +-AC_PATH_PROGS([GENISOIMAGE],[genisoimage mkisofs],[no], ++dnl Check for xorriso/genisoimage/mkisofs. ++AC_PATH_PROGS([MKISOFS],[xorrisofs genisoimage mkisofs],[no], + [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) +-test "x$GENISOIMAGE" = "xno" && AC_MSG_ERROR([genisoimage must be installed]) ++test "x$MKISOFS" = "xno" && AC_MSG_ERROR([xorriso or genisoimage or mkisofs must be installed]) + + dnl po4a for translating man pages and POD files (optional). + AC_CHECK_PROG([PO4A_GETTEXTIZE],[po4a-gettextize],[po4a-gettextize],[no]) +diff --git a/test-data/Makefile.am b/test-data/Makefile.am +index 8a60c72f6..69170516e 100644 +--- a/test-data/Makefile.am ++++ b/test-data/Makefile.am +@@ -97,6 +97,6 @@ test.iso: $(images_files) + cp $(image_files) d/ + mkdir -p d/directory + cd d && ln -sf /10klines abssymlink +- cd d && $(GENISOIMAGE) -J -r -o ../$@-t . ++ cd d && $(MKISOFS) -J -r -o ../$@-t . + rm -rf d + mv $@-t $@ +diff --git a/test-data/fake-virtio-win/Makefile.am b/test-data/fake-virtio-win/Makefile.am +index 9851ca07d..55b91a95a 100644 +--- a/test-data/fake-virtio-win/Makefile.am ++++ b/test-data/fake-virtio-win/Makefile.am +@@ -598,4 +598,4 @@ check_DATA = fake-virtio-win.iso + CLEANFILES += fake-virtio-win.iso + + fake-virtio-win.iso: $(cd_files) +- $(GENISOIMAGE) -J -r -o $@ $(srcdir)/cd ++ $(MKISOFS) -J -r -o $@ $(srcdir)/cd +-- +2.29.0.rc2 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 9b397ea..5980dbb 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -48,6 +48,9 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif +# Upstream patch to replace genisoimage with xorriso. +Patch0001: 0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch + # Downstream (RHEL-only) patches. %if 0%{?rhel} Patch9001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -284,6 +287,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Thu Apr 01 2021 Richard W.M. Jones - 1:1.43.4-4 +- Add upstream patch to depend on xorriso. + * Tue Mar 30 2021 Richard W.M. Jones - 1:1.43.4-3 - Add downstream (RHEL-only) patches (RHBZ#1931724). From 3b8b4a23579b5b9ed68c9aba3066de1abfc991f9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Apr 2021 09:52:51 +0100 Subject: [PATCH 061/235] Previous patch touches autotools. --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 5980dbb..575644b 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -3,7 +3,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 From d81b7720bf7a95a1c6eb8da965da6f389a21a1eb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Apr 2021 14:33:55 +0100 Subject: [PATCH 062/235] Change libguestfs-tools-c -> guestfs-tools. Thanks: Ming Xie --- virt-v2v.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 575644b..2dd851c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.43.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -104,7 +104,7 @@ BuildRequires: gnupg2 %endif Requires: libguestfs%{?_isa} >= 1:1.42 -Requires: libguestfs-tools-c >= 1:1.42 +Requires: guestfs-tools >= 1.42 %if 0%{?rhel} # For Windows conversions on RHEL. @@ -287,8 +287,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog -* Thu Apr 01 2021 Richard W.M. Jones - 1:1.43.4-4 +* Thu Apr 01 2021 Richard W.M. Jones - 1:1.43.4-5 - Add upstream patch to depend on xorriso. +- Change libguestfs-tools-c -> guestfs-tools. * Tue Mar 30 2021 Richard W.M. Jones - 1:1.43.4-3 - Add downstream (RHEL-only) patches (RHBZ#1931724). From 989dd6b636a1f2a3504ff0f4887a199992fa528e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 14 Apr 2021 12:42:59 +0100 Subject: [PATCH 063/235] New upstream version 1.43.5. --- ...riso-over-genisoimage-to-generate-te.patch | 62 ------------------- sources | 4 +- virt-v2v.spec | 12 ++-- 3 files changed, 8 insertions(+), 70 deletions(-) delete mode 100644 0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch diff --git a/0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch b/0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch deleted file mode 100644 index b9ff242..0000000 --- a/0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 7a346548c052d535015f98874ea52dee4b392947 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 30 Mar 2021 12:41:58 +0100 -Subject: [PATCH] tests: Prefer xorriso over genisoimage to generate test.iso - -This Debian page explains the upstream situation: -https://wiki.debian.org/genisoimage - -On Fedora, xorriso provides a compatibility program called "mkisofs". -However this is not present in Debian. Hence the choice to look for -the program called "xorrisofs". - -(cherry picked from commit 2216ab2e328457ef172d6bfa534272edf2f81a3a) ---- - m4/guestfs-progs.m4 | 6 +++--- - test-data/Makefile.am | 2 +- - test-data/fake-virtio-win/Makefile.am | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 -index 4575a72a9..8f34faefa 100644 ---- a/m4/guestfs-progs.m4 -+++ b/m4/guestfs-progs.m4 -@@ -39,10 +39,10 @@ AC_PROG_AWK - - AC_PROG_LN_S - --dnl Check for genisoimage/mkisofs --AC_PATH_PROGS([GENISOIMAGE],[genisoimage mkisofs],[no], -+dnl Check for xorriso/genisoimage/mkisofs. -+AC_PATH_PROGS([MKISOFS],[xorrisofs genisoimage mkisofs],[no], - [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) --test "x$GENISOIMAGE" = "xno" && AC_MSG_ERROR([genisoimage must be installed]) -+test "x$MKISOFS" = "xno" && AC_MSG_ERROR([xorriso or genisoimage or mkisofs must be installed]) - - dnl po4a for translating man pages and POD files (optional). - AC_CHECK_PROG([PO4A_GETTEXTIZE],[po4a-gettextize],[po4a-gettextize],[no]) -diff --git a/test-data/Makefile.am b/test-data/Makefile.am -index 8a60c72f6..69170516e 100644 ---- a/test-data/Makefile.am -+++ b/test-data/Makefile.am -@@ -97,6 +97,6 @@ test.iso: $(images_files) - cp $(image_files) d/ - mkdir -p d/directory - cd d && ln -sf /10klines abssymlink -- cd d && $(GENISOIMAGE) -J -r -o ../$@-t . -+ cd d && $(MKISOFS) -J -r -o ../$@-t . - rm -rf d - mv $@-t $@ -diff --git a/test-data/fake-virtio-win/Makefile.am b/test-data/fake-virtio-win/Makefile.am -index 9851ca07d..55b91a95a 100644 ---- a/test-data/fake-virtio-win/Makefile.am -+++ b/test-data/fake-virtio-win/Makefile.am -@@ -598,4 +598,4 @@ check_DATA = fake-virtio-win.iso - CLEANFILES += fake-virtio-win.iso - - fake-virtio-win.iso: $(cd_files) -- $(GENISOIMAGE) -J -r -o $@ $(srcdir)/cd -+ $(MKISOFS) -J -r -o $@ $(srcdir)/cd --- -2.29.0.rc2 - diff --git a/sources b/sources index 37e3750..0944d2f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.43.4.tar.gz) = 3c11ea864b0a1dd579c8dff891295be9200c9ba9e1d804cfd50aa356d626b8aa11a08c70ac2c6e20e5e9e023fea0d46e8f84edc1fca59484521ca273857f5c57 -SHA512 (virt-v2v-1.43.4.tar.gz.sig) = 292d02fc94888446016b34637e1ea913a753d0f430a130f881b7f101ed4887b13b91c551353c45f9f73d9876b1e3941e846e8ecde5ed3996c999578557bbc944 +SHA512 (virt-v2v-1.43.5.tar.gz) = 7d9222a98894683d7f399fe62fa9bd2a2d01eebcd68484a38dec1fee0b477f977c56773e3ddb8fd7283f493795217f36e4272bc8d8905484492e6bb38ec1b1f2 +SHA512 (virt-v2v-1.43.5.tar.gz.sig) = 107c3c6716b13ee7d8482d4a5592fcfd25a39cc6e983fe95da5d712a2316bc3543fc00005abe426b835c7c9a9264c724693c73db2940f787e329460f35e601c8 diff --git a/virt-v2v.spec b/virt-v2v.spec index 2dd851c..fd6c803 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -3,7 +3,7 @@ # If there are patches which touch autotools files, set this to 1. %if !0%{?rhel} -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} %else # On RHEL the downstream patches always touch autotools files. %global patches_touch_autotools 1 @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.43.4 -Release: 5%{?dist} +Version: 1.43.5 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -48,9 +48,6 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif -# Upstream patch to replace genisoimage with xorriso. -Patch0001: 0001-tests-Prefer-xorriso-over-genisoimage-to-generate-te.patch - # Downstream (RHEL-only) patches. %if 0%{?rhel} Patch9001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -287,6 +284,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Wed Apr 14 2021 Richard W.M. Jones - 1:1.43.5-1 +- New upstream version 1.43.5. + * Thu Apr 01 2021 Richard W.M. Jones - 1:1.43.4-5 - Add upstream patch to depend on xorriso. - Change libguestfs-tools-c -> guestfs-tools. From 4ba366e0fbe7a5b33f55f30225e7e5a0f259b9fd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 27 Apr 2021 17:58:39 +0100 Subject: [PATCH 064/235] Update RHEL patches. --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 2 +- ...le-the-qemu-boot-option-RHBZ-1147313.patch | 4 ++-- ...-supported-sound-cards-to-match-RHEL.patch | 2 +- ...-Fix-tests-for-libguestfs-winsupport.patch | 21 +++++++++++++++---- ...Disable-the-virt-v2v-in-place-option.patch | 8 +++---- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 2 +- ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 2 +- ...load-Remove-restriction-on-oa-sparse.patch | 2 +- ...-for-supported-v2v-hypervisors-guest.patch | 2 +- 9 files changed, 29 insertions(+), 16 deletions(-) diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 94f2e9c..69fcfc1 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 9918c857eca2ce4efddb4ed9f17dccfc6144471f Mon Sep 17 00:00:00 2001 +From 21781d79e323f7eaee7deb6981ecb783e35a39af Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 Subject: [PATCH 1/9] RHEL: v2v: Select correct qemu binary for -o qemu mode diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch index 1ccfcbd..837d7de 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch @@ -1,4 +1,4 @@ -From 51d18cc8da56f5b8395ae2f5edd6b11cda5c84df Mon Sep 17 00:00:00 2001 +From 05de88f9fe2415664adff793351f916cc6a01485 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 Subject: [PATCH 2/9] RHEL: v2v: Disable the --qemu-boot option (RHBZ#1147313). @@ -42,7 +42,7 @@ index a5f155cb..3a2e6238 100644 =item B<-o json -os> C diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 9323ff52..06ddd781 100644 +index fb8b6a5d..924e1d2d 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -144,11 +144,6 @@ Since F contains the path(s) to the guest disk diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index 418df08..61b73d2 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From e51db3fdf2b3abde05235f6c14c396eae0048320 Mon Sep 17 00:00:00 2001 +From f3c0c18b122b55e3f94b3bb757addaf18c2c5b6f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 Subject: [PATCH 3/9] RHEL: Fix list of supported sound cards to match RHEL diff --git a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch index 7a57f6b..41ecc50 100644 --- a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch +++ b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch @@ -1,14 +1,27 @@ -From 709e21ab98a6d207301161e6463dab8a77c87749 Mon Sep 17 00:00:00 2001 +From 2a4386e45aa52ebfdd501a8189458e2a6bad4708 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 Subject: [PATCH 4/9] RHEL: Fix tests for libguestfs-winsupport. It doesn't let us use guestfish for arbitrary Windows edits. --- - tests/test-v2v-virtio-win-iso.sh | 8 +++++++- - tests/test-v2v-windows-conversion.sh | 8 +++++++- - 2 files changed, 14 insertions(+), 2 deletions(-) + test-data/phony-guests/make-windows-img.sh | 1 + + tests/test-v2v-virtio-win-iso.sh | 8 +++++++- + tests/test-v2v-windows-conversion.sh | 8 +++++++- + 3 files changed, 15 insertions(+), 2 deletions(-) +diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh +index 30908a91..73cf5144 100755 +--- a/test-data/phony-guests/make-windows-img.sh ++++ b/test-data/phony-guests/make-windows-img.sh +@@ -37,6 +37,7 @@ fi + + # Create a disk image. + guestfish < Date: Thu, 14 Jan 2016 11:53:42 -0500 Subject: [PATCH 5/9] RHEL: v2v: Disable the virt-v2v --in-place option. @@ -28,7 +28,7 @@ index dd2b1233..8fef46cc 100755 --ip,\ --it,\ diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 06ddd781..50b0bc8e 100644 +index 924e1d2d..4016c724 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM @@ -73,7 +73,7 @@ index 06ddd781..50b0bc8e 100644 =item B<-io> OPTION=VALUE Set input option(s) related to the current input mode or transport. -@@ -1332,8 +1311,8 @@ have at least 100 available inodes. +@@ -1338,8 +1317,8 @@ have at least 100 available inodes. =head3 Minimum free space check in the host You must have sufficient free space in the host directory used to @@ -84,7 +84,7 @@ index 06ddd781..50b0bc8e 100644 $ df -h "`guestfish get-cachedir`" Filesystem Size Used Avail Use% Mounted on -@@ -1471,31 +1450,6 @@ that instead. +@@ -1477,31 +1456,6 @@ that instead. diff --git a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index fe04aed..8ffe091 100644 --- a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From a128631fded7e2c4e45fcf4304945ca430296944 Mon Sep 17 00:00:00 2001 +From bf5b711b261a6a577a441235db68ad58b20711bd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 Subject: [PATCH 6/9] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) diff --git a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index bf4b946..1e0fd47 100644 --- a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,4 +1,4 @@ -From c72bbcd9b22408023c686e64040db2693dd70467 Mon Sep 17 00:00:00 2001 +From d3eece67059c836c88f6001a5a928a3063a1aaa2 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 Subject: [PATCH 7/9] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) diff --git a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch index c2d55e3..a1ad4a0 100644 --- a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +++ b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch @@ -1,4 +1,4 @@ -From 4663022f13c209260341b4586ef8787cfe158ea5 Mon Sep 17 00:00:00 2001 +From fba7d8bf5dad6fce2a0122570f6b69e0db9ce697 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 May 2018 10:16:58 +0100 Subject: [PATCH 8/9] RHEL: v2v: rhv-upload: Remove restriction on -oa sparse. diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 8e3f7e0..a7b5eb3 100644 --- a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From 3fcf10ae7beaaf2de969b732afb35c9a5c36f52b Mon Sep 17 00:00:00 2001 +From b003d781dacf76572e11fad17ea699a99a324f54 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 Subject: [PATCH 9/9] RHEL: point to KB for supported v2v hypervisors/guests From 7dd7c798f39488f705947f4f32f2b40a9e8d0bf6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 30 Apr 2021 15:52:35 +0100 Subject: [PATCH 065/235] New upstream stable branch version 1.44.0. --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 0944d2f..e06fc6f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.43.5.tar.gz) = 7d9222a98894683d7f399fe62fa9bd2a2d01eebcd68484a38dec1fee0b477f977c56773e3ddb8fd7283f493795217f36e4272bc8d8905484492e6bb38ec1b1f2 -SHA512 (virt-v2v-1.43.5.tar.gz.sig) = 107c3c6716b13ee7d8482d4a5592fcfd25a39cc6e983fe95da5d712a2316bc3543fc00005abe426b835c7c9a9264c724693c73db2940f787e329460f35e601c8 +SHA512 (virt-v2v-1.44.0.tar.gz) = 9d8de6c6376dd33a5fb4d5fd10fac13a8bce7d834bbb65274a09ae6558b2c3107c5ccb8b39b330a27ccff09313eb72cf7139f378d5e427af67589443168d7e17 +SHA512 (virt-v2v-1.44.0.tar.gz.sig) = e6b830389d475bb5514b8f6c6f273d06ed90bc31ff785c709964e4f492cbca6a5d78b25ad60605f9778ac9300754d62630481c80d4232d0fa17fefde65d22a90 diff --git a/virt-v2v.spec b/virt-v2v.spec index fd6c803..af137b9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,11 +10,11 @@ %endif # The source directory. -%global source_directory 1.43-development +%global source_directory 1.44-stable Name: virt-v2v Epoch: 1 -Version: 1.43.5 +Version: 1.44.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -284,6 +284,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Fri Apr 30 2021 Richard W.M. Jones - 1:1.44.0-1 +- New upstream stable branch version 1.44.0. + * Wed Apr 14 2021 Richard W.M. Jones - 1:1.43.5-1 - New upstream version 1.43.5. From 6e9ced10a55236a45c6b2203d7c8ecd1a94758d2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 6 May 2021 17:50:21 +0100 Subject: [PATCH 066/235] Recommend libguestfs-xfs It is the default filesystem on Fedora and RHEL so usually required in order to convert those guests. --- virt-v2v.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index af137b9..64ca356 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -103,6 +103,9 @@ BuildRequires: gnupg2 Requires: libguestfs%{?_isa} >= 1:1.42 Requires: guestfs-tools >= 1.42 +# XFS is the default filesystem in Fedora and RHEL. +Recommends: libguestfs-xfs + %if 0%{?rhel} # For Windows conversions on RHEL. Requires: libguestfs-winsupport >= 7.2 From 7599291a166126f123e4e51281a6726eb6576974 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 7 May 2021 11:57:58 +0100 Subject: [PATCH 067/235] Change Recommends -> Requires for libguestfs-xfs. Just using Recommends is insufficient to get RHEL to pull in libguestfs-xfs as a dependency. Thanks: Josh Boyer --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 64ca356..d81c370 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -104,7 +104,7 @@ Requires: libguestfs%{?_isa} >= 1:1.42 Requires: guestfs-tools >= 1.42 # XFS is the default filesystem in Fedora and RHEL. -Recommends: libguestfs-xfs +Requires: libguestfs-xfs %if 0%{?rhel} # For Windows conversions on RHEL. From 41e9bece4c65761d85af8cb3bfae0f32314d7c14 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 10 Jun 2021 09:04:27 +0100 Subject: [PATCH 068/235] nbdkit-vddk-plugin dep only exists on x86-64 --- virt-v2v.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index d81c370..55b6e5a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.44.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -131,7 +131,9 @@ Requires: nbdkit Requires: nbdkit-curl-plugin Requires: nbdkit-python-plugin Requires: nbdkit-ssh-plugin +%ifarch x86_64 Requires: nbdkit-vddk-plugin +%endif # For rhsrvany.exe, used to install firstboot scripts in Windows guests. Requires: mingw32-srvany >= 1.0-13 @@ -287,6 +289,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Thu Jun 10 2021 Richard W.M. Jones - 1:1.44.0-2 +- nbdkit-vddk-plugin dep only exists on x86-64. + * Fri Apr 30 2021 Richard W.M. Jones - 1:1.44.0-1 - New upstream stable branch version 1.44.0. From 00d876a814b7e9a30b933dac5e7a470c4277868d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 11 Jun 2021 14:52:39 +0100 Subject: [PATCH 069/235] Add gating tests https://bugzilla.redhat.com/show_bug.cgi?id=1950611 Thanks: Xiaodai Wang --- .gitignore | 2 ++ gating.yaml | 7 +++++++ tests/basic-test.sh | 10 ++++++++++ tests/tests.yml | 12 ++++++++++++ 4 files changed, 31 insertions(+) create mode 100755 gating.yaml create mode 100755 tests/basic-test.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index b00c2b0..8203505 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*~ + # RPM target directories /x86_64 diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..8c4c77a --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: libvirt-ci.v2v.brew-build.gating.x86_64.tier1.functional} diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..9c30edc --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,10 @@ +#!/bin/bash - +set -e +set -x + +# This only makes sure that virt-v2v isn't totally broken. +# virt-v2v is extensively tested on real guests by the QE +# team using a mix of automated and manual testing. + +virt-builder fedora-30 +virt-v2v -i disk fedora-30.img -o null diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..e67d372 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - virt-v2v + - guestfs-tools + tests: + - simple: + dir: . + run: ./basic-test.sh From b004c173884be5dd7d7f4b516a9f60ea93f174f0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 11 Jun 2021 18:43:04 +0100 Subject: [PATCH 070/235] tests: Try harder to fix libvirt Tests failed previously with: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory --- tests/basic-test.sh | 3 +++ tests/tests.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 9c30edc..17fc7c3 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -6,5 +6,8 @@ set -x # virt-v2v is extensively tested on real guests by the QE # team using a mix of automated and manual testing. +# Fix libvirt. +systemctl restart libvirtd + virt-builder fedora-30 virt-v2v -i disk fedora-30.img -o null diff --git a/tests/tests.yml b/tests/tests.yml index e67d372..9dae6bd 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -6,6 +6,7 @@ required_packages: - virt-v2v - guestfs-tools + - libvirt-daemon-kvm tests: - simple: dir: . From c1c9277cd11decdefad25da5a8ad41929153024d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jun 2021 11:44:07 +0100 Subject: [PATCH 071/235] New upstream development version 1.45.1. --- sources | 4 ++-- virt-v2v.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index e06fc6f..7d40232 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.44.0.tar.gz) = 9d8de6c6376dd33a5fb4d5fd10fac13a8bce7d834bbb65274a09ae6558b2c3107c5ccb8b39b330a27ccff09313eb72cf7139f378d5e427af67589443168d7e17 -SHA512 (virt-v2v-1.44.0.tar.gz.sig) = e6b830389d475bb5514b8f6c6f273d06ed90bc31ff785c709964e4f492cbca6a5d78b25ad60605f9778ac9300754d62630481c80d4232d0fa17fefde65d22a90 +SHA512 (virt-v2v-1.45.1.tar.gz) = be9cb75c2fe01e989d0b1f35e8496ed7e78076d17b4a4e7b24b6372a8cc3ed633d749dc5e5adf2d7c0d2a8a61f81b3d71cba47917f6a5e91edca341f2827627e +SHA512 (virt-v2v-1.45.1.tar.gz.sig) = 94afc18b3c5954b318dcf668fc6f71b5a3f9b0568f2b0bc27eea92a92096a1197cc24048b18df2a2d69ece56b2864ba5dcc1e4c0d469903ff631d541646ea3d2 diff --git a/virt-v2v.spec b/virt-v2v.spec index 55b6e5a..6b12b93 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,12 +10,12 @@ %endif # The source directory. -%global source_directory 1.44-stable +%global source_directory 1.45-development Name: virt-v2v Epoch: 1 -Version: 1.44.0 -Release: 2%{?dist} +Version: 1.45.1 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -289,6 +289,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog +* Wed Jun 16 2021 Richard W.M. Jones - 1:1.45.1-1 +- New upstream development version 1.45.1. + * Thu Jun 10 2021 Richard W.M. Jones - 1:1.44.0-2 - nbdkit-vddk-plugin dep only exists on x86-64. From 3a7cb22e41140e0a0f2fbf499e4470d16af93fe4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jun 2021 12:33:22 +0100 Subject: [PATCH 072/235] Require virtio-win on RHEL (RHBZ#1972644). --- virt-v2v.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 6b12b93..5436f27 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -138,6 +138,12 @@ Requires: nbdkit-vddk-plugin # For rhsrvany.exe, used to install firstboot scripts in Windows guests. Requires: mingw32-srvany >= 1.0-13 +# On RHEL, virtio-win should be used to install virtio drivers +# and qemu-ga in converted guests. (RHBZ#1972644) +%if 0%{?rhel} +Requires: virtio-win +%endif + %description Virt-v2v converts a single guest from a foreign hypervisor to run on @@ -291,6 +297,7 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local %changelog * Wed Jun 16 2021 Richard W.M. Jones - 1:1.45.1-1 - New upstream development version 1.45.1. +- Require virtio-win on RHEL (RHBZ#1972644). * Thu Jun 10 2021 Richard W.M. Jones - 1:1.44.0-2 - nbdkit-vddk-plugin dep only exists on x86-64. From 85358a32264c5acad2e8e2fb959d7fb69e690977 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jun 2021 12:58:43 +0100 Subject: [PATCH 073/235] v2v-test-harness, virt-v2v-copy-to-local have been removed upstream. --- virt-v2v.spec | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 5436f27..1278525 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -221,16 +221,6 @@ pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe popd -# Delete the v2v test harness. -rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness -rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-test-harness.1* - -# Delete copy-to-local tool. -rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v-copy-to-local -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-copy-to-local.1* -rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local - # Find locale files. %find_lang %{name} @@ -298,6 +288,7 @@ rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local * Wed Jun 16 2021 Richard W.M. Jones - 1:1.45.1-1 - New upstream development version 1.45.1. - Require virtio-win on RHEL (RHBZ#1972644). +- v2v-test-harness, virt-v2v-copy-to-local have been removed upstream. * Thu Jun 10 2021 Richard W.M. Jones - 1:1.44.0-2 - nbdkit-vddk-plugin dep only exists on x86-64. From 29135227ce9b5746c1facc3a5e07d2aa1ba63e04 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jun 2021 13:20:03 +0100 Subject: [PATCH 074/235] Go with Recommends instead of Requires virtio-win See https://bugzilla.redhat.com/show_bug.cgi?id=1972644 --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 1278525..577de9c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -141,7 +141,7 @@ Requires: mingw32-srvany >= 1.0-13 # On RHEL, virtio-win should be used to install virtio drivers # and qemu-ga in converted guests. (RHBZ#1972644) %if 0%{?rhel} -Requires: virtio-win +Recommends: virtio-win %endif From 3f9c4466805902a81ca8398036be00cc1bc54ee6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jun 2021 13:42:06 +0100 Subject: [PATCH 075/235] Rebase RHEL 9 patches on top of 1.45.1. --- ...Select-correct-qemu-binary-for-o-qemu-mode-.patch | 2 +- ...v-Disable-the-qemu-boot-option-RHBZ-1147313.patch | 10 +++++----- ...list-of-supported-sound-cards-to-match-RHEL.patch | 2 +- 0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch | 2 +- ...EL-v2v-Disable-the-virt-v2v-in-place-option.patch | 12 ++++++------ ...2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch | 2 +- ...-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 4 ++-- ...-rhv-upload-Remove-restriction-on-oa-sparse.patch | 10 +++++----- ...t-to-KB-for-supported-v2v-hypervisors-guest.patch | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 69fcfc1..eae5beb 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 21781d79e323f7eaee7deb6981ecb783e35a39af Mon Sep 17 00:00:00 2001 +From fc6b61fc9f5830de87354b329ba8dedd2e0fd361 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 Subject: [PATCH 1/9] RHEL: v2v: Select correct qemu binary for -o qemu mode diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch index 837d7de..ce72232 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch @@ -1,4 +1,4 @@ -From 05de88f9fe2415664adff793351f916cc6a01485 Mon Sep 17 00:00:00 2001 +From 74ecf578578c168ee172dae7b5e8100d15fda497 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 Subject: [PATCH 2/9] RHEL: v2v: Disable the --qemu-boot option (RHBZ#1147313). @@ -42,10 +42,10 @@ index a5f155cb..3a2e6238 100644 =item B<-o json -os> C diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index fb8b6a5d..924e1d2d 100644 +index 694313a8..ff02e6c9 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -144,11 +144,6 @@ Since F contains the path(s) to the guest disk +@@ -141,11 +141,6 @@ Since F contains the path(s) to the guest disk image(s) you do not need to specify the name of the disk image on the command line. @@ -57,7 +57,7 @@ index fb8b6a5d..924e1d2d 100644 =head1 OPTIONS =over 4 -@@ -537,9 +532,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -534,9 +529,6 @@ This is similar to I<-o local>, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by I<-os>. @@ -67,7 +67,7 @@ index fb8b6a5d..924e1d2d 100644 =item B<-o> B This is the same as I<-o rhv>. -@@ -815,11 +807,6 @@ Print information about the source guest and stop. This option is +@@ -812,11 +804,6 @@ Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See L. diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index 61b73d2..e7d019a 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From f3c0c18b122b55e3f94b3bb757addaf18c2c5b6f Mon Sep 17 00:00:00 2001 +From 86398c37f8f6385a8c925eda282e52a2569a9944 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 Subject: [PATCH 3/9] RHEL: Fix list of supported sound cards to match RHEL diff --git a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch index 41ecc50..3c0636c 100644 --- a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch +++ b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch @@ -1,4 +1,4 @@ -From 2a4386e45aa52ebfdd501a8189458e2a6bad4708 Mon Sep 17 00:00:00 2001 +From ac1a6322b9df9364fee49e742b3fad6bc891f131 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 Subject: [PATCH 4/9] RHEL: Fix tests for libguestfs-winsupport. diff --git a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch b/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch index 01b5efa..00859d1 100644 --- a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch +++ b/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch @@ -1,4 +1,4 @@ -From 1d74df726204bb9c6220ccd0505c8b63db10f833 Mon Sep 17 00:00:00 2001 +From b6ed3e6e33e084497d50f8fb1bc8a6565ec16f10 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Jan 2016 11:53:42 -0500 Subject: [PATCH 5/9] RHEL: v2v: Disable the virt-v2v --in-place option. @@ -28,7 +28,7 @@ index dd2b1233..8fef46cc 100755 --ip,\ --it,\ diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 924e1d2d..4016c724 100644 +index ff02e6c9..9f087849 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM @@ -52,7 +52,7 @@ index 924e1d2d..4016c724 100644 =head2 Other virt-v2v topics -@@ -301,20 +294,6 @@ For I<-i disk> only, this specifies the format of the input disk +@@ -298,20 +291,6 @@ For I<-i disk> only, this specifies the format of the input disk image. For other input methods you should specify the input format in the metadata. @@ -73,7 +73,7 @@ index 924e1d2d..4016c724 100644 =item B<-io> OPTION=VALUE Set input option(s) related to the current input mode or transport. -@@ -1338,8 +1317,8 @@ have at least 100 available inodes. +@@ -1335,8 +1314,8 @@ have at least 100 available inodes. =head3 Minimum free space check in the host You must have sufficient free space in the host directory used to @@ -84,7 +84,7 @@ index 924e1d2d..4016c724 100644 $ df -h "`guestfish get-cachedir`" Filesystem Size Used Avail Use% Mounted on -@@ -1477,31 +1456,6 @@ that instead. +@@ -1474,31 +1453,6 @@ that instead. @@ -117,7 +117,7 @@ index 924e1d2d..4016c724 100644 The I<--machine-readable> option can be used to make the output more diff --git a/tests/Makefile.am b/tests/Makefile.am -index 871dc3c9..eee4e1af 100644 +index 680fa89f..d33b81a7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -76,7 +76,6 @@ TESTS = \ diff --git a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index 8ffe091..a5118a9 100644 --- a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From bf5b711b261a6a577a441235db68ad58b20711bd Mon Sep 17 00:00:00 2001 +From cee07552e4ef7dffbf70eee8c4bd3fde0533c33b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 Subject: [PATCH 6/9] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) diff --git a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index 1e0fd47..35a0313 100644 --- a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,4 +1,4 @@ -From d3eece67059c836c88f6001a5a928a3063a1aaa2 Mon Sep 17 00:00:00 2001 +From 2e74525029c1debe441ea6430e57ebce3279b7cc Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 Subject: [PATCH 7/9] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) @@ -9,7 +9,7 @@ They are not supported in RHEL. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod -index 3b3cf0f0..32da2848 100644 +index cd3210bf..e9f336a9 100644 --- a/docs/virt-v2v-input-xen.pod +++ b/docs/virt-v2v-input-xen.pod @@ -12,7 +12,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen diff --git a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch index a1ad4a0..084564d 100644 --- a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +++ b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch @@ -1,4 +1,4 @@ -From fba7d8bf5dad6fce2a0122570f6b69e0db9ce697 Mon Sep 17 00:00:00 2001 +From 0795af0275af81058e54a9b7ad3d5e79ba66a21e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 May 2018 10:16:58 +0100 Subject: [PATCH 8/9] RHEL: v2v: rhv-upload: Remove restriction on -oa sparse. @@ -38,10 +38,10 @@ index 7c9b478a..36c3676f 100644 A file containing a password to be used when connecting to the oVirt diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index dbef7011..27925d7d 100644 +index 15ba1078..ac5b3fa7 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml -@@ -135,17 +135,10 @@ let error_unless_nbdkit_compiled_with_selinux config = +@@ -147,17 +147,10 @@ let error_unless_nbdkit_compiled_with_selinux config = error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") ) @@ -60,14 +60,14 @@ index dbef7011..27925d7d 100644 let json_optstring = function | Some s -> JSON.String s | None -> JSON.Null -@@ -253,7 +246,6 @@ object +@@ -265,7 +258,6 @@ object error_unless_nbdkit_min_version config; error_unless_nbdkit_python_plugin_working plugin_script; error_unless_nbdkit_compiled_with_selinux config; - error_unless_output_alloc_sparse output_alloc; (* Python code prechecks. *) - let precheck_fn = tmpdir // "v2vprecheck.json" in + let json_params = match rhv_options.rhv_disk_uuids with diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 2b0178a9..d817d915 100644 --- a/v2v/rhv-upload-plugin.py diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index a7b5eb3..84e8f41 100644 --- a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From b003d781dacf76572e11fad17ea699a99a324f54 Mon Sep 17 00:00:00 2001 +From 649b0821d0d78065f48b3d3709769d5124fd4a3a Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 Subject: [PATCH 9/9] RHEL: point to KB for supported v2v hypervisors/guests From be8fe16bb55d69d8b09c9f804618ea91f9ffbeaa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 12:00:38 +0100 Subject: [PATCH 076/235] New upstream development version 1.45.2. Remove --debug-overlays and --print-estimate options. Remove -o glance option on RHEL 9 (RHBZ#1977539). Remove support for RHEV-APT (RHBZ#1945549). --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 10 +- ...le-the-qemu-boot-option-RHBZ-1147313.patch | 21 +- ...-supported-sound-cards-to-match-RHEL.patch | 6 +- ...-Fix-tests-for-libguestfs-winsupport.patch | 6 +- ...Disable-the-virt-v2v-in-place-option.patch | 26 +-- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 10 +- ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 6 +- ...load-Remove-restriction-on-oa-sparse.patch | 11 +- ...-for-supported-v2v-hypervisors-guest.patch | 6 +- 0010-RHEL-9-Disable-o-glance.patch | 200 ++++++++++++++++++ sources | 4 +- virt-v2v.spec | 9 +- 12 files changed, 262 insertions(+), 53 deletions(-) create mode 100644 0010-RHEL-9-Disable-o-glance.patch diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index eae5beb..f35155a 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,7 +1,7 @@ -From fc6b61fc9f5830de87354b329ba8dedd2e0fd361 Mon Sep 17 00:00:00 2001 +From 9f5965837da442e4402aae1f40b322070a4f060a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 -Subject: [PATCH 1/9] RHEL: v2v: Select correct qemu binary for -o qemu mode +Subject: [PATCH 01/10] RHEL: v2v: Select correct qemu binary for -o qemu mode (RHBZ#1147313). RHEL does not have qemu-system-x86_64 (etc), and in addition the @@ -16,10 +16,10 @@ support cases. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml -index d6d70c23..490576e9 100644 +index 12c56836..7391eda0 100644 --- a/v2v/output_qemu.ml +++ b/v2v/output_qemu.ml -@@ -81,7 +81,7 @@ object +@@ -79,7 +79,7 @@ object * module deals with shell and qemu comma quoting. *) let cmd = Qemuopts.create () in @@ -29,5 +29,5 @@ index d6d70c23..490576e9 100644 let flag = Qemuopts.flag cmd and arg = Qemuopts.arg cmd -- -2.30.1 +2.31.1 diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch index ce72232..33ec10c 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch @@ -1,7 +1,8 @@ -From 74ecf578578c168ee172dae7b5e8100d15fda497 Mon Sep 17 00:00:00 2001 +From 8a58d716ba714ddd9198e726b422bcd236fee2b5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 -Subject: [PATCH 2/9] RHEL: v2v: Disable the --qemu-boot option (RHBZ#1147313). +Subject: [PATCH 02/10] RHEL: v2v: Disable the --qemu-boot option + (RHBZ#1147313). This cannot work because there is no Gtk or SDL output mode in RHEL's qemu-kvm. @@ -42,7 +43,7 @@ index a5f155cb..3a2e6238 100644 =item B<-o json -os> C diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 694313a8..ff02e6c9 100644 +index bdf4d716..83f6fd4d 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -141,11 +141,6 @@ Since F contains the path(s) to the guest disk @@ -57,7 +58,7 @@ index 694313a8..ff02e6c9 100644 =head1 OPTIONS =over 4 -@@ -534,9 +529,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -528,9 +523,6 @@ This is similar to I<-o local>, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by I<-os>. @@ -67,7 +68,7 @@ index 694313a8..ff02e6c9 100644 =item B<-o> B This is the same as I<-o rhv>. -@@ -812,11 +804,6 @@ Print information about the source guest and stop. This option is +@@ -775,11 +767,6 @@ Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See L. @@ -80,18 +81,18 @@ index 694313a8..ff02e6c9 100644 =item B<--quiet> diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml -index 3b74f307..df69e2e0 100644 +index 5e7c01f8..ac10ec31 100644 --- a/v2v/cmdline.ml +++ b/v2v/cmdline.ml -@@ -284,7 +284,6 @@ let parse_cmdline () = - s_"Estimate size of source and stop"; +@@ -276,7 +276,6 @@ let parse_cmdline () = + s_"Same as ‘-ip filename’"; [ L"print-source" ], Getopt.Set print_source, s_"Print source and stop"; - [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)"; [ L"root" ], Getopt.String ("ask|... ", set_root_choice), s_"How to choose root filesystem"; [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), -@@ -668,6 +667,8 @@ read the man page virt-v2v(1). +@@ -652,6 +651,8 @@ read the man page virt-v2v(1). | Some d when not (is_directory d) -> error (f_"-os %s: output directory does not exist or is not a directory") d | Some d -> d in @@ -101,5 +102,5 @@ index 3b74f307..df69e2e0 100644 output_format, output_alloc -- -2.30.1 +2.31.1 diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index e7d019a..07e5de8 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,7 +1,7 @@ -From 86398c37f8f6385a8c925eda282e52a2569a9944 Mon Sep 17 00:00:00 2001 +From 0b12d6b45295cb4e1f06be2463e93fef2a793681 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 -Subject: [PATCH 3/9] RHEL: Fix list of supported sound cards to match RHEL +Subject: [PATCH 03/10] RHEL: Fix list of supported sound cards to match RHEL qemu (RHBZ#1176493). --- @@ -30,5 +30,5 @@ index 7136e4be..a6c359f0 100644 (* Find the UEFI firmware. *) let find_uefi_firmware guest_arch = -- -2.30.1 +2.31.1 diff --git a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch index 3c0636c..02f236f 100644 --- a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch +++ b/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch @@ -1,7 +1,7 @@ -From ac1a6322b9df9364fee49e742b3fad6bc891f131 Mon Sep 17 00:00:00 2001 +From ca035dde2b4efaea38563660a51102e96e9e85e5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 -Subject: [PATCH 4/9] RHEL: Fix tests for libguestfs-winsupport. +Subject: [PATCH 04/10] RHEL: Fix tests for libguestfs-winsupport. It doesn't let us use guestfish for arbitrary Windows edits. --- @@ -75,5 +75,5 @@ index f1da222a..ff94fe39 100755 # We also update the Registry several times, for firstboot, and (ONLY -- -2.30.1 +2.31.1 diff --git a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch b/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch index 00859d1..9c2f68d 100644 --- a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch +++ b/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch @@ -1,7 +1,7 @@ -From b6ed3e6e33e084497d50f8fb1bc8a6565ec16f10 Mon Sep 17 00:00:00 2001 +From 44d88b1170601c31f6199667a6f23cbac4364654 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Jan 2016 11:53:42 -0500 -Subject: [PATCH 5/9] RHEL: v2v: Disable the virt-v2v --in-place option. +Subject: [PATCH 05/10] RHEL: v2v: Disable the virt-v2v --in-place option. This disables the virt-v2v --in-place option which we do not wish to support in RHEL. @@ -28,7 +28,7 @@ index dd2b1233..8fef46cc 100755 --ip,\ --it,\ diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index ff02e6c9..9f087849 100644 +index 83f6fd4d..719a95b5 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM @@ -52,7 +52,7 @@ index ff02e6c9..9f087849 100644 =head2 Other virt-v2v topics -@@ -298,20 +291,6 @@ For I<-i disk> only, this specifies the format of the input disk +@@ -292,20 +285,6 @@ For I<-i disk> only, this specifies the format of the input disk image. For other input methods you should specify the input format in the metadata. @@ -73,7 +73,7 @@ index ff02e6c9..9f087849 100644 =item B<-io> OPTION=VALUE Set input option(s) related to the current input mode or transport. -@@ -1335,8 +1314,8 @@ have at least 100 available inodes. +@@ -1298,8 +1277,8 @@ have at least 100 available inodes. =head3 Minimum free space check in the host You must have sufficient free space in the host directory used to @@ -84,7 +84,7 @@ index ff02e6c9..9f087849 100644 $ df -h "`guestfish get-cachedir`" Filesystem Size Used Avail Use% Mounted on -@@ -1474,31 +1453,6 @@ that instead. +@@ -1437,31 +1416,6 @@ that instead. @@ -117,7 +117,7 @@ index ff02e6c9..9f087849 100644 The I<--machine-readable> option can be used to make the output more diff --git a/tests/Makefile.am b/tests/Makefile.am -index 680fa89f..d33b81a7 100644 +index f08ea69a..5fb7898c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -76,7 +76,6 @@ TESTS = \ @@ -128,7 +128,7 @@ index 680fa89f..d33b81a7 100644 test-v2v-mac.sh \ test-v2v-machine-readable.sh \ test-v2v-networks-and-bridges.sh \ -@@ -225,7 +224,6 @@ EXTRA_DIST += \ +@@ -224,7 +223,6 @@ EXTRA_DIST += \ test-v2v-i-vmx-3.vmx \ test-v2v-i-vmx-4.vmx \ test-v2v-i-vmx-5.vmx \ @@ -251,10 +251,10 @@ index 6f7d78f3..00000000 -# Clean up. -rm -r $d diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml -index df69e2e0..7b79d462 100644 +index ac10ec31..01314580 100644 --- a/v2v/cmdline.ml +++ b/v2v/cmdline.ml -@@ -252,8 +252,7 @@ let parse_cmdline () = +@@ -246,8 +246,7 @@ let parse_cmdline () = s_"Use password from file to connect to input hypervisor"; [ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport), s_"Input transport"; @@ -264,7 +264,7 @@ index df69e2e0..7b79d462 100644 [ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac), s_"Map NIC to network or bridge or assign static IP"; [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), -@@ -396,7 +395,6 @@ read the man page virt-v2v(1). +@@ -386,7 +385,6 @@ read the man page virt-v2v(1). pr "vddk\n"; pr "colours-option\n"; pr "vdsm-compat-option\n"; @@ -272,7 +272,7 @@ index df69e2e0..7b79d462 100644 pr "io/oo\n"; pr "mac-option\n"; pr "bandwidth-option\n"; -@@ -572,6 +570,10 @@ read the man page virt-v2v(1). +@@ -556,6 +554,10 @@ read the man page virt-v2v(1). error (f_"only ‘-it ssh’ can be used here") in Input_vmx.input_vmx input_password input_transport arg in @@ -284,5 +284,5 @@ index df69e2e0..7b79d462 100644 let error_option_cannot_be_used_in_output_mode mode opt = error (f_"-o %s: %s option cannot be used in this output mode") mode opt -- -2.30.1 +2.31.1 diff --git a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index a5118a9..0628e4b 100644 --- a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,7 +1,7 @@ -From cee07552e4ef7dffbf70eee8c4bd3fde0533c33b Mon Sep 17 00:00:00 2001 +From a3054b424c417d89b92d1f55aa1f59adcf7779c8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 -Subject: [PATCH 6/9] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) +Subject: [PATCH 06/10] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) The SDL output mode is not supported in RHEL's qemu-kvm. --- @@ -9,10 +9,10 @@ The SDL output mode is not supported in RHEL's qemu-kvm. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml -index d146e84c..4e403003 100644 +index b3acb5f6..5b39dbe2 100644 --- a/v2v/input_disk.ml +++ b/v2v/input_disk.ml -@@ -89,7 +89,7 @@ class input_disk input_format disk = object +@@ -88,7 +88,7 @@ class input_disk input_format disk = object s_features = [ "acpi"; "apic"; "pae" ]; s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) s_display = @@ -22,5 +22,5 @@ index d146e84c..4e403003 100644 s_video = None; s_sound = None; -- -2.30.1 +2.31.1 diff --git a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index 35a0313..147ebfd 100644 --- a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,7 +1,7 @@ -From 2e74525029c1debe441ea6430e57ebce3279b7cc Mon Sep 17 00:00:00 2001 +From 28ab3e6e5e76678c4656dbb9cd54893f7ccdf21d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 -Subject: [PATCH 7/9] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) +Subject: [PATCH 07/10] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) They are not supported in RHEL. --- @@ -22,5 +22,5 @@ index cd3210bf..e9f336a9 100644 =head1 INPUT FROM XEN -- -2.30.1 +2.31.1 diff --git a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch index 084564d..97fb3d3 100644 --- a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +++ b/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch @@ -1,7 +1,8 @@ -From 0795af0275af81058e54a9b7ad3d5e79ba66a21e Mon Sep 17 00:00:00 2001 +From 0eb7d51c403a81837a58537257202bece4e116e0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 May 2018 10:16:58 +0100 -Subject: [PATCH 8/9] RHEL: v2v: rhv-upload: Remove restriction on -oa sparse. +Subject: [PATCH 08/10] RHEL: v2v: rhv-upload: Remove restriction on -oa + sparse. See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681 and the v2v-devel private thread "Do we already support migration using FC?" @@ -12,7 +13,7 @@ and the v2v-devel private thread "Do we already support migration using FC?" 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod -index 7c9b478a..36c3676f 100644 +index dc6b2c0a..7b8fdc0f 100644 --- a/docs/virt-v2v-output-rhv.pod +++ b/docs/virt-v2v-output-rhv.pod @@ -5,7 +5,7 @@ virt-v2v-output-rhv - Using virt-v2v to convert guests to oVirt or RHV @@ -38,7 +39,7 @@ index 7c9b478a..36c3676f 100644 A file containing a password to be used when connecting to the oVirt diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index 15ba1078..ac5b3fa7 100644 +index 466de38d..34caaa6a 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml @@ -147,17 +147,10 @@ let error_unless_nbdkit_compiled_with_selinux config = @@ -85,5 +86,5 @@ index 2b0178a9..d817d915 100644 types.StorageDomain( name=params['output_storage'], -- -2.30.1 +2.31.1 diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 84e8f41..82497c4 100644 --- a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,7 +1,7 @@ -From 649b0821d0d78065f48b3d3709769d5124fd4a3a Mon Sep 17 00:00:00 2001 +From 02c4ae37bec8c0dddfa92cd324f92ac32a928384 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 -Subject: [PATCH 9/9] RHEL: point to KB for supported v2v hypervisors/guests +Subject: [PATCH 09/10] RHEL: point to KB for supported v2v hypervisors/guests --- docs/virt-v2v-support.pod | 104 ++------------------------------------ @@ -123,5 +123,5 @@ index 9815f51f..1ffc0f9d 100644 =head2 Guest firmware -- -2.30.1 +2.31.1 diff --git a/0010-RHEL-9-Disable-o-glance.patch b/0010-RHEL-9-Disable-o-glance.patch new file mode 100644 index 0000000..c51d804 --- /dev/null +++ b/0010-RHEL-9-Disable-o-glance.patch @@ -0,0 +1,200 @@ +From e425f0836c502799c05cdcd6e215de4fff994e70 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 30 Jun 2021 11:15:52 +0100 +Subject: [PATCH 10/10] RHEL 9: Disable -o glance + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 +--- + docs/virt-v2v-output-openstack.pod | 56 ++---------------------------- + docs/virt-v2v.pod | 22 ------------ + tests/test-v2v-o-glance.sh | 3 ++ + v2v/cmdline.ml | 3 -- + v2v/output_glance.ml | 2 +- + 5 files changed, 6 insertions(+), 80 deletions(-) + +diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod +index f5a3abad..1ab356e8 100644 +--- a/docs/virt-v2v-output-openstack.pod ++++ b/docs/virt-v2v-output-openstack.pod +@@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack + [-oo verify-server-certificate=false] + [-oo os-username=admin] [-oo os-*=*] + +- virt-v2v [-i* options] -o glance +- + =head1 DESCRIPTION + + This page documents how to use L to convert guests to run +-on OpenStack. There are two output modes you can select, but only +-I<-o openstack> should be used normally. ++on OpenStack. + + =over 4 + +@@ -27,15 +24,6 @@ Full description: L + This is the modern method for uploading to OpenStack via the REST API. + Guests can be directly converted into Cinder volumes. + +-=item B<-o glance> +- +-Full description: L +- +-This is the old method for uploading to Glance. Unfortunately Glance +-is not well suited to storing converted guests (since virt-v2v deals +-with "pets" not templated "cattle"), so this method is not recommended +-unless you really know what you are doing. +- + =back + + =head1 OUTPUT TO OPENSTACK +@@ -170,50 +158,10 @@ no Cinder volume type is used. + The following options are B supported with OpenStack: I<-oa>, + I<-of>. + +-=head1 OUTPUT TO GLANCE +- +-Note this is a legacy option. In most cases you should use +-L instead. +- +-To output to OpenStack Glance, use the I<-o glance> option. +- +-This runs the L CLI program which must be installed on the +-virt-v2v conversion host. For authentication to work, you will need +-to set C environment variables. +- +-Normally there is a file called C or C +-which you can simply C to set everything up. +- +-Virt-v2v adds metadata for the guest to Glance, describing such things +-as the guest operating system and what drivers it requires. The +-command C will display the metadata as "Property" +-fields such as C and C. +- +-=head2 Glance and sparseness +- +-Glance image upload doesn't appear to correctly handle sparseness. +-For this reason, using qcow2 will be faster and use less space on the +-Glance server. Use the virt-v2v S> option. +- +-=head2 Glance and multiple disks +- +-If the guest has a single disk, then the name of the disk in Glance +-will be the name of the guest. You can control this using the I<-on> +-option. +- +-Glance doesn't have a concept of associating multiple disks with a +-single guest, and Nova doesn't allow you to boot a guest from multiple +-Glance disks either. If the guest has multiple disks, then the first +-(assumed to be the system disk) will have the name of the guest, and +-the second and subsequent data disks will be called +-C-disk2>, C-disk3> etc. It may be best to +-leave the system disk in Glance, and import the data disks to Cinder. +- + =head1 SEE ALSO + + L, +-L, +-L. ++L. + + =head1 AUTHOR + +diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod +index 719a95b5..2f4fe86c 100644 +--- a/docs/virt-v2v.pod ++++ b/docs/virt-v2v.pod +@@ -422,20 +422,10 @@ interested in looking at the metadata. + This option is not compatible with I<-o libvirt> since it would create + a faulty guest (one with no disks). + +-This option is not compatible with I<-o glance> for technical reasons. +- + =item B<-o> B + + This is the same as I<-o local>. + +-=item B<-o> B +- +-This is a legacy option. You should probably use I<-o openstack> +-instead. +- +-Set the output method to OpenStack Glance. In this mode the converted +-guest is uploaded to Glance. See L. +- + =item B<-o> B + + Set the output method to I. +@@ -1148,11 +1138,6 @@ and output methods may use disk space, as outlined in the table below. + This temporarily places a full copy of the uncompressed source disks + in C<$VIRT_V2V_TMPDIR> (or F). + +-=item I<-o glance> +- +-This temporarily places a full copy of the output disks in +-C<$VIRT_V2V_TMPDIR> (or F). +- + =item I<-o local> + + =item I<-o qemu> +@@ -1337,13 +1322,6 @@ instance. + Because of how Cinder volumes are presented as F block devices, + using I<-o openstack> normally requires that virt-v2v is run as root. + +-=item Writing to Glance +- +-This does I need root (in fact it probably won’t work), but may +-require either a special user and/or for you to source a script that +-sets authentication environment variables. Consult the Glance +-documentation. +- + =item Writing to block devices + + This normally requires root. See the next section. +diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh +index 162c397e..48d45dce 100755 +--- a/tests/test-v2v-o-glance.sh ++++ b/tests/test-v2v-o-glance.sh +@@ -20,6 +20,9 @@ + + set -e + ++# Feature is disabled in RHEL 9. ++exit 77 ++ + $TEST_FUNCTIONS + skip_if_skipped + skip_if_backend uml +diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml +index 01314580..e6c86b6f 100644 +--- a/v2v/cmdline.ml ++++ b/v2v/cmdline.ml +@@ -170,7 +170,6 @@ let parse_cmdline () = + if !output_mode <> `Not_set then + error (f_"%s option used more than once on the command line") "-o"; + match mode with +- | "glance" -> output_mode := `Glance + | "libvirt" -> output_mode := `Libvirt + | "disk" | "local" -> output_mode := `Local + | "json" -> output_mode := `JSON +@@ -323,8 +322,6 @@ let parse_cmdline () = + + virt-v2v -i disk disk.img -o local -os /var/tmp + +- virt-v2v -i disk disk.img -o glance +- + There is a companion front-end called \"virt-p2v\" which comes as an + ISO or CD image that can be booted on physical machines. + +diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml +index 8c5426b9..3fce4e7a 100644 +--- a/v2v/output_glance.ml ++++ b/v2v/output_glance.ml +@@ -100,4 +100,4 @@ object + end + + let output_glance = new output_glance +-let () = Modules_list.register_output_module "glance" ++(* let () = Modules_list.register_output_module "glance" *) +-- +2.31.1 + diff --git a/sources b/sources index 7d40232..41968b2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.1.tar.gz) = be9cb75c2fe01e989d0b1f35e8496ed7e78076d17b4a4e7b24b6372a8cc3ed633d749dc5e5adf2d7c0d2a8a61f81b3d71cba47917f6a5e91edca341f2827627e -SHA512 (virt-v2v-1.45.1.tar.gz.sig) = 94afc18b3c5954b318dcf668fc6f71b5a3f9b0568f2b0bc27eea92a92096a1197cc24048b18df2a2d69ece56b2864ba5dcc1e4c0d469903ff631d541646ea3d2 +SHA512 (virt-v2v-1.45.2.tar.gz) = 908c762b2200ca2125b7623fe4d14253e0d91de6e7691e540b1e70f68d4a18b8c21de75c894240cf6a0ae5296845dec5cd4cbac5f30c614ffa2c293649a3e6e1 +SHA512 (virt-v2v-1.45.2.tar.gz.sig) = 89c19dcc995472b958a1a6f5b5769331e014fc1d2fafd1abddb5edf78b32baf93135e2a57bee5c33de9f782c30970101921aea4b965ff308da9117850d717ba6 diff --git a/virt-v2v.spec b/virt-v2v.spec index 577de9c..0a3de15 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.1 +Version: 1.45.2 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -59,6 +59,7 @@ Patch9006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch Patch9007: 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch Patch9008: 0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch Patch9009: 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch9010: 0010-RHEL-9-Disable-o-glance.patch %endif %if 0%{patches_touch_autotools} @@ -285,6 +286,12 @@ popd %changelog +* Wed Jun 30 2021 Richard W.M. Jones - 1:1.45.2-1 +- New upstream development version 1.45.2. +- Remove --debug-overlays and --print-estimate options. +- Remove -o glance option on RHEL 9 (RHBZ#1977539). +- Remove support for RHEV-APT (RHBZ#1945549). + * Wed Jun 16 2021 Richard W.M. Jones - 1:1.45.1-1 - New upstream development version 1.45.1. - Require virtio-win on RHEL (RHBZ#1972644). From 7dc6e87cf5855a2e01bac03f84d00400e47bebc4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:33:43 +0000 Subject: [PATCH 077/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 0a3de15..01dbcad 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.45.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -286,6 +286,9 @@ popd %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1:1.45.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jun 30 2021 Richard W.M. Jones - 1:1.45.2-1 - New upstream development version 1.45.2. - Remove --debug-overlays and --print-estimate options. From c8d08693ef2ea67d480ec9fb74f469dd41b92c2c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Aug 2021 13:11:05 +0100 Subject: [PATCH 078/235] New upstream development version 1.45.3. Rebase RHEL patches. --- ...-Remove-o-rhv-upload-oa-preallocated.patch | 123 ++++++++++++++++++ ...load-Remove-restriction-on-oa-sparse.patch | 22 ++-- ...correct-qemu-binary-for-o-qemu-mode-.patch | 4 +- ...le-the-qemu-boot-option-RHBZ-1147313.patch | 4 +- ...-supported-sound-cards-to-match-RHEL.patch | 4 +- ...-Fix-tests-for-libguestfs-winsupport.patch | 18 ++- ...Disable-the-virt-v2v-in-place-option.patch | 32 ++--- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 4 +- ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 4 +- ...-for-supported-v2v-hypervisors-guest.patch | 4 +- ...atch => 0011-RHEL-9-Disable-o-glance.patch | 12 +- sources | 4 +- virt-v2v.spec | 29 +++-- 13 files changed, 195 insertions(+), 69 deletions(-) create mode 100644 0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch rename 0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch => 0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch (86%) rename 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch => 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch (88%) rename 0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch => 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch (96%) rename 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch => 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch (84%) rename 0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch => 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch (84%) rename 0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch => 0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch (93%) rename 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch => 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch (86%) rename 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch => 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch (83%) rename 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch => 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch (95%) rename 0010-RHEL-9-Disable-o-glance.patch => 0011-RHEL-9-Disable-o-glance.patch (97%) diff --git a/0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch b/0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch new file mode 100644 index 0000000..f922f3e --- /dev/null +++ b/0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch @@ -0,0 +1,123 @@ +From 4d5509a98823cc0b8930678716b862adbd2c0b81 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 6 Aug 2021 13:01:28 +0100 +Subject: [PATCH 01/11] Revert "v2v: Remove -o rhv-upload -oa preallocated" + +This reverts commit 18084f90d9dd9092831cb3487039328981796291. +--- + v2v/cmdline.ml | 2 +- + v2v/output_rhv_upload.ml | 22 ++++++++++++++++++++-- + v2v/output_rhv_upload.mli | 7 ++++--- + v2v/rhv-upload-transfer.py | 1 + + 4 files changed, 26 insertions(+), 6 deletions(-) + +diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml +index 79d943df..5e7c01f8 100644 +--- a/v2v/cmdline.ml ++++ b/v2v/cmdline.ml +@@ -699,7 +699,7 @@ read the man page virt-v2v(1). + | Some os -> os in + if qemu_boot then + error_option_cannot_be_used_in_output_mode "rhv-upload" "--qemu-boot"; +- Output_rhv_upload.output_rhv_upload output_conn ++ Output_rhv_upload.output_rhv_upload output_alloc output_conn + output_password os + rhv_options, + output_format, output_alloc +diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml +index 6a632eaa..50baa595 100644 +--- a/v2v/output_rhv_upload.ml ++++ b/v2v/output_rhv_upload.ml +@@ -146,11 +146,22 @@ let error_unless_nbdkit_compiled_with_selinux config = + error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") + ) + ++(* Output sparse must be sparse. We may be able to ++ * lift this limitation in future, but it requires changes on the ++ * RHV side. See TODO file for details. XXX ++ *) ++let error_current_limitation required_param = ++ error (f_"rhv-upload: currently you must use ‘%s’. This restriction will be loosened in a future version.") required_param ++ ++let error_unless_output_alloc_sparse output_alloc = ++ if output_alloc <> Sparse then ++ error_current_limitation "-oa sparse" ++ + let json_optstring = function + | Some s -> JSON.String s + | None -> JSON.Null + +-class output_rhv_upload output_conn ++class output_rhv_upload output_alloc output_conn + output_password output_storage + rhv_options = + (* Create a temporary directory which will be deleted on exit. *) +@@ -189,6 +200,9 @@ class output_rhv_upload output_conn + "output_conn", JSON.String output_conn; + "output_password", JSON.String output_password; + "output_storage", JSON.String output_storage; ++ "output_sparse", JSON.Bool (match output_alloc with ++ | Sparse -> true ++ | Preallocated -> false); + "rhv_cafile", json_optstring rhv_options.rhv_cafile; + "rhv_cluster", + JSON.String (Option.default "Default" rhv_options.rhv_cluster); +@@ -257,6 +271,7 @@ object + error_unless_nbdkit_min_version config; + error_unless_nbdkit_python_plugin_working plugin_script; + error_unless_nbdkit_compiled_with_selinux config; ++ error_unless_output_alloc_sparse output_alloc; + + (* Python code prechecks. *) + let json_params = match rhv_options.rhv_disk_uuids with +@@ -282,6 +297,9 @@ object + + method as_options = + "-o rhv-upload" ^ ++ (match output_alloc with ++ | Sparse -> "" (* default, don't need to print it *) ++ | Preallocated -> " -oa preallocated") ^ + sprintf " -oc %s -op %s -os %s" + output_conn output_password output_storage + +@@ -449,7 +467,7 @@ object + (* Create the metadata. *) + let ovf = + Create_ovf.create_ovf source inspect target_meta targets +- Sparse sd_uuid disk_uuids vol_uuids vm_uuid ++ output_alloc sd_uuid disk_uuids vol_uuids vm_uuid + OVirt in + let ovf = DOM.doc_to_string ovf in + +diff --git a/v2v/output_rhv_upload.mli b/v2v/output_rhv_upload.mli +index 01507dff..eb85a57d 100644 +--- a/v2v/output_rhv_upload.mli ++++ b/v2v/output_rhv_upload.mli +@@ -25,8 +25,9 @@ val print_output_options : unit -> unit + val parse_output_options : (string * string) list -> rhv_options + (** Print and parse rhv-upload -oo options. *) + +-val output_rhv_upload : string -> string -> string -> rhv_options -> +- Types.output +-(** [output_rhv_upload output_conn output_password output_storage rhv_options] ++val output_rhv_upload : Types.output_allocation -> string -> string -> ++ string -> rhv_options -> Types.output ++(** [output_rhv_upload output_alloc output_conn output_password output_storage ++ rhv_options] + creates and returns a new {!Types.output} object specialized for writing + output to oVirt or RHV directly via RHV APIs. *) +diff --git a/v2v/rhv-upload-transfer.py b/v2v/rhv-upload-transfer.py +index cf4f8807..5aebcd1d 100644 +--- a/v2v/rhv-upload-transfer.py ++++ b/v2v/rhv-upload-transfer.py +@@ -111,6 +111,7 @@ def create_disk(connection): + # size, based on qemu-img measure of the overlay. + initial_size=params['disk_size'], + provisioned_size=params['disk_size'], ++ # XXX Ignores params['output_sparse']. + # Handling this properly will be complex, see: + # https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html + sparse=True, +-- +2.31.1 + diff --git a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch b/0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch similarity index 86% rename from 0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch rename to 0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch index 97fb3d3..c1a1163 100644 --- a/0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +++ b/0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch @@ -1,7 +1,7 @@ -From 0eb7d51c403a81837a58537257202bece4e116e0 Mon Sep 17 00:00:00 2001 +From abe3c7539b6221e8ab3cc35ee3d58b1aa06bbef4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 May 2018 10:16:58 +0100 -Subject: [PATCH 08/10] RHEL: v2v: rhv-upload: Remove restriction on -oa +Subject: [PATCH 02/11] RHEL: v2v: rhv-upload: Remove restriction on -oa sparse. See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681 @@ -9,7 +9,7 @@ and the v2v-devel private thread "Do we already support migration using FC?" --- docs/virt-v2v-output-rhv.pod | 8 +------- v2v/output_rhv_upload.ml | 10 +--------- - v2v/rhv-upload-plugin.py | 4 +--- + v2v/rhv-upload-transfer.py | 4 +--- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod @@ -39,10 +39,10 @@ index dc6b2c0a..7b8fdc0f 100644 A file containing a password to be used when connecting to the oVirt diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index 466de38d..34caaa6a 100644 +index 50baa595..be5e9851 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml -@@ -147,17 +147,10 @@ let error_unless_nbdkit_compiled_with_selinux config = +@@ -146,17 +146,10 @@ let error_unless_nbdkit_compiled_with_selinux config = error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") ) @@ -61,7 +61,7 @@ index 466de38d..34caaa6a 100644 let json_optstring = function | Some s -> JSON.String s | None -> JSON.Null -@@ -265,7 +258,6 @@ object +@@ -271,7 +264,6 @@ object error_unless_nbdkit_min_version config; error_unless_nbdkit_python_plugin_working plugin_script; error_unless_nbdkit_compiled_with_selinux config; @@ -69,11 +69,11 @@ index 466de38d..34caaa6a 100644 (* Python code prechecks. *) let json_params = match rhv_options.rhv_disk_uuids with -diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py -index 2b0178a9..d817d915 100644 ---- a/v2v/rhv-upload-plugin.py -+++ b/v2v/rhv-upload-plugin.py -@@ -491,10 +491,8 @@ def create_disk(connection): +diff --git a/v2v/rhv-upload-transfer.py b/v2v/rhv-upload-transfer.py +index 5aebcd1d..f38cd9c0 100644 +--- a/v2v/rhv-upload-transfer.py ++++ b/v2v/rhv-upload-transfer.py +@@ -111,10 +111,8 @@ def create_disk(connection): # size, based on qemu-img measure of the overlay. initial_size=params['disk_size'], provisioned_size=params['disk_size'], diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch similarity index 88% rename from 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename to 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index f35155a..b32b106 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,7 +1,7 @@ -From 9f5965837da442e4402aae1f40b322070a4f060a Mon Sep 17 00:00:00 2001 +From 0839ba57487b73cfb684ea495280db5d946f667a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 -Subject: [PATCH 01/10] RHEL: v2v: Select correct qemu binary for -o qemu mode +Subject: [PATCH 03/11] RHEL: v2v: Select correct qemu binary for -o qemu mode (RHBZ#1147313). RHEL does not have qemu-system-x86_64 (etc), and in addition the diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch b/0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch similarity index 96% rename from 0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch rename to 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch index 33ec10c..9a77b34 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +++ b/0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch @@ -1,7 +1,7 @@ -From 8a58d716ba714ddd9198e726b422bcd236fee2b5 Mon Sep 17 00:00:00 2001 +From bb55b78b68e6e8039734eb1d7af22b455f8fbdc2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 -Subject: [PATCH 02/10] RHEL: v2v: Disable the --qemu-boot option +Subject: [PATCH 04/11] RHEL: v2v: Disable the --qemu-boot option (RHBZ#1147313). This cannot work because there is no Gtk or SDL output mode diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 84% rename from 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index 07e5de8..f93f057 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,7 +1,7 @@ -From 0b12d6b45295cb4e1f06be2463e93fef2a793681 Mon Sep 17 00:00:00 2001 +From 49385571ce5967f8d9a102e935f201ee9c22326d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 -Subject: [PATCH 03/10] RHEL: Fix list of supported sound cards to match RHEL +Subject: [PATCH 05/11] RHEL: Fix list of supported sound cards to match RHEL qemu (RHBZ#1176493). --- diff --git a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch b/0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch similarity index 84% rename from 0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch rename to 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch index 02f236f..402b09e 100644 --- a/0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch +++ b/0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch @@ -1,7 +1,7 @@ -From ca035dde2b4efaea38563660a51102e96e9e85e5 Mon Sep 17 00:00:00 2001 +From db2150a5d790c35fb23c6d9d6b29e602482ce555 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 -Subject: [PATCH 04/10] RHEL: Fix tests for libguestfs-winsupport. +Subject: [PATCH 06/11] RHEL: Fix tests for libguestfs-winsupport. It doesn't let us use guestfish for arbitrary Windows edits. --- @@ -23,10 +23,10 @@ index 30908a91..73cf5144 100755 run diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh -index 6e99f0f1..a8e572c5 100755 +index 69f6f414..b9b806fb 100755 --- a/tests/test-v2v-virtio-win-iso.sh +++ b/tests/test-v2v-virtio-win-iso.sh -@@ -79,6 +79,12 @@ mktest () +@@ -82,6 +82,12 @@ mktest () :> "$script" :> "$expected" @@ -39,20 +39,18 @@ index 6e99f0f1..a8e572c5 100755 firstboot_dir="/Program Files/Guestfs/Firstboot" mktest "is-dir \"$firstboot_dir\"" true mktest "is-file \"$firstboot_dir/firstboot.bat\"" true -@@ -91,7 +97,7 @@ for drv in netkvm vioscsi viostor; do +@@ -94,5 +100,5 @@ for drv in netkvm vioscsi viostor; do done done -guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response" +guestfish --ro -a "$d/windows-sda" < "$script" > "$response" diff -u "$expected" "$response" - - rm -r $d diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh -index f1da222a..ff94fe39 100755 +index aeab9a48..4b422c5b 100755 --- a/tests/test-v2v-windows-conversion.sh +++ b/tests/test-v2v-windows-conversion.sh -@@ -73,6 +73,12 @@ mktest () +@@ -76,6 +76,12 @@ mktest () :> "$script" :> "$expected" @@ -65,7 +63,7 @@ index f1da222a..ff94fe39 100755 firstboot_dir="/Program Files/Guestfs/Firstboot" mktest "is-dir \"$firstboot_dir\"" true mktest "is-file \"$firstboot_dir/firstboot.bat\"" true -@@ -85,7 +91,7 @@ for drv in netkvm qxl vioscsi viostor; do +@@ -88,7 +94,7 @@ for drv in netkvm qxl vioscsi viostor; do done done diff --git a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch b/0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch similarity index 93% rename from 0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch rename to 0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch index 9c2f68d..66041e7 100644 --- a/0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch +++ b/0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch @@ -1,7 +1,7 @@ -From 44d88b1170601c31f6199667a6f23cbac4364654 Mon Sep 17 00:00:00 2001 +From 3b69cfa365c7b014ca81b09e857ab294cff04914 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Jan 2016 11:53:42 -0500 -Subject: [PATCH 05/10] RHEL: v2v: Disable the virt-v2v --in-place option. +Subject: [PATCH 07/11] RHEL: v2v: Disable the virt-v2v --in-place option. This disables the virt-v2v --in-place option which we do not wish to support in RHEL. @@ -16,10 +16,10 @@ wish to support in RHEL. delete mode 100755 tests/test-v2v-in-place.sh diff --git a/docs/test-v2v-docs.sh b/docs/test-v2v-docs.sh -index dd2b1233..8fef46cc 100755 +index 465df26f..ae1a6c68 100755 --- a/docs/test-v2v-docs.sh +++ b/docs/test-v2v-docs.sh -@@ -27,6 +27,7 @@ $top_srcdir/podcheck.pl virt-v2v.pod virt-v2v \ +@@ -30,6 +30,7 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \ --debug-overlay,\ --ic,\ --if,\ @@ -117,10 +117,10 @@ index 83f6fd4d..719a95b5 100644 The I<--machine-readable> option can be used to make the output more diff --git a/tests/Makefile.am b/tests/Makefile.am -index f08ea69a..5fb7898c 100644 +index 41d38d30..9bbd86d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -76,7 +76,6 @@ TESTS = \ +@@ -77,7 +77,6 @@ TESTS = \ test-v2v-floppy.sh \ test-v2v-i-disk.sh \ test-v2v-i-ova.sh \ @@ -128,7 +128,7 @@ index f08ea69a..5fb7898c 100644 test-v2v-mac.sh \ test-v2v-machine-readable.sh \ test-v2v-networks-and-bridges.sh \ -@@ -224,7 +223,6 @@ EXTRA_DIST += \ +@@ -226,7 +225,6 @@ EXTRA_DIST += \ test-v2v-i-vmx-3.vmx \ test-v2v-i-vmx-4.vmx \ test-v2v-i-vmx-5.vmx \ @@ -138,7 +138,7 @@ index f08ea69a..5fb7898c 100644 test-v2v-mac-expected.xml \ diff --git a/tests/test-v2v-in-place.sh b/tests/test-v2v-in-place.sh deleted file mode 100755 -index 6f7d78f3..00000000 +index 9da8fa63..00000000 --- a/tests/test-v2v-in-place.sh +++ /dev/null @@ -1,108 +0,0 @@ @@ -167,18 +167,21 @@ index 6f7d78f3..00000000 -export LANG=C -set -e - --$TEST_FUNCTIONS +-source ./functions.sh +-set -e +-set -x +- -skip_if_skipped --skip_if_backend uml --skip_unless_phony_guest windows.img +-requires test -f ../test-data/phony-guests/windows.img - -img_base="$abs_top_builddir/test-data/phony-guests/windows.img" - --export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools" --export VIRTIO_WIN="$top_srcdir/test-data/fake-virtio-win" +-export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" +-export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - -d=$PWD/test-v2v-in-place.d -rm -rf $d +-cleanup_fn rm -r $d -mkdir $d - -img="$d/test.qcow2" @@ -247,9 +250,6 @@ index 6f7d78f3..00000000 - -# Test the base image remained untouched -test "$md5" = "$(do_md5 $img_base)" -- --# Clean up. --rm -r $d diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml index ac10ec31..01314580 100644 --- a/v2v/cmdline.ml diff --git a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch similarity index 86% rename from 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename to 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index 0628e4b..cd2c206 100644 --- a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,7 +1,7 @@ -From a3054b424c417d89b92d1f55aa1f59adcf7779c8 Mon Sep 17 00:00:00 2001 +From e57a5dafc00b3b5737824977aad0feb0ec497a1f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 -Subject: [PATCH 06/10] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) +Subject: [PATCH 08/11] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) The SDL output mode is not supported in RHEL's qemu-kvm. --- diff --git a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch similarity index 83% rename from 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch rename to 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index 147ebfd..06db995 100644 --- a/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,7 +1,7 @@ -From 28ab3e6e5e76678c4656dbb9cd54893f7ccdf21d Mon Sep 17 00:00:00 2001 +From aa5cf3ba5d10400ee6d6c63dd77c711b6fdec116 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 -Subject: [PATCH 07/10] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) +Subject: [PATCH 09/11] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) They are not supported in RHEL. --- diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 95% rename from 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 82497c4..f00865c 100644 --- a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,7 +1,7 @@ -From 02c4ae37bec8c0dddfa92cd324f92ac32a928384 Mon Sep 17 00:00:00 2001 +From ccaae02ef3f081b544eca82f3652ca50ac5566a9 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 -Subject: [PATCH 09/10] RHEL: point to KB for supported v2v hypervisors/guests +Subject: [PATCH 10/11] RHEL: point to KB for supported v2v hypervisors/guests --- docs/virt-v2v-support.pod | 104 ++------------------------------------ diff --git a/0010-RHEL-9-Disable-o-glance.patch b/0011-RHEL-9-Disable-o-glance.patch similarity index 97% rename from 0010-RHEL-9-Disable-o-glance.patch rename to 0011-RHEL-9-Disable-o-glance.patch index c51d804..1336f6c 100644 --- a/0010-RHEL-9-Disable-o-glance.patch +++ b/0011-RHEL-9-Disable-o-glance.patch @@ -1,7 +1,7 @@ -From e425f0836c502799c05cdcd6e215de4fff994e70 Mon Sep 17 00:00:00 2001 +From 7edb403ee54153c64205915c0bd1d177c0094ee0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 11:15:52 +0100 -Subject: [PATCH 10/10] RHEL 9: Disable -o glance +Subject: [PATCH 11/11] RHEL 9: Disable -o glance Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 --- @@ -151,7 +151,7 @@ index 719a95b5..2f4fe86c 100644 This normally requires root. See the next section. diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh -index 162c397e..48d45dce 100755 +index c0db9115..074b5e16 100755 --- a/tests/test-v2v-o-glance.sh +++ b/tests/test-v2v-o-glance.sh @@ -20,6 +20,9 @@ @@ -161,9 +161,9 @@ index 162c397e..48d45dce 100755 +# Feature is disabled in RHEL 9. +exit 77 + - $TEST_FUNCTIONS - skip_if_skipped - skip_if_backend uml + source ./functions.sh + set -e + set -x diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml index 01314580..e6c86b6f 100644 --- a/v2v/cmdline.ml diff --git a/sources b/sources index 41968b2..6a6c6fc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.2.tar.gz) = 908c762b2200ca2125b7623fe4d14253e0d91de6e7691e540b1e70f68d4a18b8c21de75c894240cf6a0ae5296845dec5cd4cbac5f30c614ffa2c293649a3e6e1 -SHA512 (virt-v2v-1.45.2.tar.gz.sig) = 89c19dcc995472b958a1a6f5b5769331e014fc1d2fafd1abddb5edf78b32baf93135e2a57bee5c33de9f782c30970101921aea4b965ff308da9117850d717ba6 +SHA512 (virt-v2v-1.45.3.tar.gz) = 24606acb039e630d8cbe4befe232bf9f3e8a2064e931d9064adc59704d34b67269933e2b24cb9f996c31b8c16b4e4f2ebdd7f40c9d29bb0f4a9f3df98d8edf34 +SHA512 (virt-v2v-1.45.3.tar.gz.sig) = efbeb0b925b403e6973936a89125b169c7522fc5073a0b8978326de861819a3b8756e219a381e3eac3ee40d97cc16919286a797557e6391e301a0871b38628e7 diff --git a/virt-v2v.spec b/virt-v2v.spec index 01dbcad..625ccb6 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.2 -Release: 2%{?dist} +Version: 1.45.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -50,16 +50,17 @@ ExclusiveArch: x86_64 # Downstream (RHEL-only) patches. %if 0%{?rhel} -Patch9001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch9002: 0002-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch -Patch9003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch9004: 0004-RHEL-Fix-tests-for-libguestfs-winsupport.patch -Patch9005: 0005-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch -Patch9006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch9007: 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch -Patch9008: 0008-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch -Patch9009: 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch9010: 0010-RHEL-9-Disable-o-glance.patch +Patch9001: 0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch +Patch9002: 0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +Patch9003: 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch9004: 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +Patch9005: 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch9006: 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch +Patch9007: 0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch +Patch9008: 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch9009: 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +Patch9010: 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch9011: 0011-RHEL-9-Disable-o-glance.patch %endif %if 0%{patches_touch_autotools} @@ -286,6 +287,10 @@ popd %changelog +* Fri Aug 06 2021 Richard W.M. Jones - 1:1.45.3-1 +- New upstream development version 1.45.3. +- Rebase RHEL patches. + * Fri Jul 23 2021 Fedora Release Engineering - 1:1.45.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 4e3368f10c692635aa0d958a8d480b1968826577 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 21 Sep 2021 14:53:40 +0100 Subject: [PATCH 079/235] New upstream development version 1.45.90 (preview of 2.0) --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 33 ++ ...-Remove-o-rhv-upload-oa-preallocated.patch | 123 -------- ...-the-qemu-boot-oo-qemu-boot-option-R.patch | 70 +++-- ...load-Remove-restriction-on-oa-sparse.patch | 90 ------ ...-supported-sound-cards-to-match-RHEL.patch | 14 +- ...correct-qemu-binary-for-o-qemu-mode-.patch | 33 -- ...RHEL-Fixes-for-libguestfs-winsupport.patch | 35 ++- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 26 ++ ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 4 +- ...-for-supported-v2v-hypervisors-guest.patch | 4 +- ...Disable-the-virt-v2v-in-place-option.patch | 288 ------------------ ...atch => 0008-RHEL-9-Disable-o-glance.patch | 70 ++--- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 26 -- sources | 4 +- virt-v2v.spec | 50 +-- 15 files changed, 197 insertions(+), 673 deletions(-) create mode 100644 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch delete mode 100644 0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch rename 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch => 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch (58%) delete mode 100644 0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch rename 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch => 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch (67%) delete mode 100644 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch => 0004-RHEL-Fixes-for-libguestfs-winsupport.patch (61%) create mode 100644 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch => 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch (82%) rename 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch => 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch (94%) delete mode 100644 0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch rename 0011-RHEL-9-Disable-o-glance.patch => 0008-RHEL-9-Disable-o-glance.patch (75%) delete mode 100644 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch new file mode 100644 index 0000000..dffafb4 --- /dev/null +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -0,0 +1,33 @@ +From f417ca536219b151284a5a0e28698bfa19a5c160 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sun, 28 Sep 2014 19:14:43 +0100 +Subject: [PATCH 1/8] RHEL: v2v: Select correct qemu binary for -o qemu mode + (RHBZ#1147313). + +RHEL does not have qemu-system-x86_64 (etc), and in addition the +qemu binary is located in /usr/libexec. Encode the path to this +binary directly in the script. + +Note that we don't support people running qemu directly like this. +It's just for quick testing of converted VMs, and to help us with +support cases. +--- + output/output.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/output/output.ml b/output/output.ml +index 9c2d8853..92b03525 100644 +--- a/output/output.ml ++++ b/output/output.ml +@@ -1413,7 +1413,7 @@ and qemu_finalize dir source inspect target_meta + * module deals with shell and qemu comma quoting. + *) + let cmd = Qemuopts.create () in +- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch); ++ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm"; + + let flag = Qemuopts.flag cmd + and arg = Qemuopts.arg cmd +-- +2.31.1 + diff --git a/0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch b/0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch deleted file mode 100644 index f922f3e..0000000 --- a/0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 4d5509a98823cc0b8930678716b862adbd2c0b81 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 6 Aug 2021 13:01:28 +0100 -Subject: [PATCH 01/11] Revert "v2v: Remove -o rhv-upload -oa preallocated" - -This reverts commit 18084f90d9dd9092831cb3487039328981796291. ---- - v2v/cmdline.ml | 2 +- - v2v/output_rhv_upload.ml | 22 ++++++++++++++++++++-- - v2v/output_rhv_upload.mli | 7 ++++--- - v2v/rhv-upload-transfer.py | 1 + - 4 files changed, 26 insertions(+), 6 deletions(-) - -diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml -index 79d943df..5e7c01f8 100644 ---- a/v2v/cmdline.ml -+++ b/v2v/cmdline.ml -@@ -699,7 +699,7 @@ read the man page virt-v2v(1). - | Some os -> os in - if qemu_boot then - error_option_cannot_be_used_in_output_mode "rhv-upload" "--qemu-boot"; -- Output_rhv_upload.output_rhv_upload output_conn -+ Output_rhv_upload.output_rhv_upload output_alloc output_conn - output_password os - rhv_options, - output_format, output_alloc -diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index 6a632eaa..50baa595 100644 ---- a/v2v/output_rhv_upload.ml -+++ b/v2v/output_rhv_upload.ml -@@ -146,11 +146,22 @@ let error_unless_nbdkit_compiled_with_selinux config = - error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") - ) - -+(* Output sparse must be sparse. We may be able to -+ * lift this limitation in future, but it requires changes on the -+ * RHV side. See TODO file for details. XXX -+ *) -+let error_current_limitation required_param = -+ error (f_"rhv-upload: currently you must use ‘%s’. This restriction will be loosened in a future version.") required_param -+ -+let error_unless_output_alloc_sparse output_alloc = -+ if output_alloc <> Sparse then -+ error_current_limitation "-oa sparse" -+ - let json_optstring = function - | Some s -> JSON.String s - | None -> JSON.Null - --class output_rhv_upload output_conn -+class output_rhv_upload output_alloc output_conn - output_password output_storage - rhv_options = - (* Create a temporary directory which will be deleted on exit. *) -@@ -189,6 +200,9 @@ class output_rhv_upload output_conn - "output_conn", JSON.String output_conn; - "output_password", JSON.String output_password; - "output_storage", JSON.String output_storage; -+ "output_sparse", JSON.Bool (match output_alloc with -+ | Sparse -> true -+ | Preallocated -> false); - "rhv_cafile", json_optstring rhv_options.rhv_cafile; - "rhv_cluster", - JSON.String (Option.default "Default" rhv_options.rhv_cluster); -@@ -257,6 +271,7 @@ object - error_unless_nbdkit_min_version config; - error_unless_nbdkit_python_plugin_working plugin_script; - error_unless_nbdkit_compiled_with_selinux config; -+ error_unless_output_alloc_sparse output_alloc; - - (* Python code prechecks. *) - let json_params = match rhv_options.rhv_disk_uuids with -@@ -282,6 +297,9 @@ object - - method as_options = - "-o rhv-upload" ^ -+ (match output_alloc with -+ | Sparse -> "" (* default, don't need to print it *) -+ | Preallocated -> " -oa preallocated") ^ - sprintf " -oc %s -op %s -os %s" - output_conn output_password output_storage - -@@ -449,7 +467,7 @@ object - (* Create the metadata. *) - let ovf = - Create_ovf.create_ovf source inspect target_meta targets -- Sparse sd_uuid disk_uuids vol_uuids vm_uuid -+ output_alloc sd_uuid disk_uuids vol_uuids vm_uuid - OVirt in - let ovf = DOM.doc_to_string ovf in - -diff --git a/v2v/output_rhv_upload.mli b/v2v/output_rhv_upload.mli -index 01507dff..eb85a57d 100644 ---- a/v2v/output_rhv_upload.mli -+++ b/v2v/output_rhv_upload.mli -@@ -25,8 +25,9 @@ val print_output_options : unit -> unit - val parse_output_options : (string * string) list -> rhv_options - (** Print and parse rhv-upload -oo options. *) - --val output_rhv_upload : string -> string -> string -> rhv_options -> -- Types.output --(** [output_rhv_upload output_conn output_password output_storage rhv_options] -+val output_rhv_upload : Types.output_allocation -> string -> string -> -+ string -> rhv_options -> Types.output -+(** [output_rhv_upload output_alloc output_conn output_password output_storage -+ rhv_options] - creates and returns a new {!Types.output} object specialized for writing - output to oVirt or RHV directly via RHV APIs. *) -diff --git a/v2v/rhv-upload-transfer.py b/v2v/rhv-upload-transfer.py -index cf4f8807..5aebcd1d 100644 ---- a/v2v/rhv-upload-transfer.py -+++ b/v2v/rhv-upload-transfer.py -@@ -111,6 +111,7 @@ def create_disk(connection): - # size, based on qemu-img measure of the overlay. - initial_size=params['disk_size'], - provisioned_size=params['disk_size'], -+ # XXX Ignores params['output_sparse']. - # Handling this properly will be complex, see: - # https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html - sparse=True, --- -2.31.1 - diff --git a/0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch similarity index 58% rename from 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch rename to 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index 9a77b34..15f4600 100644 --- a/0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,7 +1,7 @@ -From bb55b78b68e6e8039734eb1d7af22b455f8fbdc2 Mon Sep 17 00:00:00 2001 +From 00490feb06496ad4bf22dbc5493a7cf186476e9f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 -Subject: [PATCH 04/11] RHEL: v2v: Disable the --qemu-boot option +Subject: [PATCH 2/8] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option (RHBZ#1147313). This cannot work because there is no Gtk or SDL output mode @@ -11,9 +11,10 @@ In addition you will have to edit the -display option in the qemu script. --- docs/virt-v2v-output-local.pod | 6 ++---- - docs/virt-v2v.pod | 13 ------------- - v2v/cmdline.ml | 3 ++- - 3 files changed, 4 insertions(+), 18 deletions(-) + docs/virt-v2v.pod | 12 ------------ + output/output.ml | 3 +++ + v2v/v2v.ml | 2 -- + 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod index a5f155cb..3a2e6238 100644 @@ -43,7 +44,7 @@ index a5f155cb..3a2e6238 100644 =item B<-o json -os> C diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index bdf4d716..83f6fd4d 100644 +index b25d678d..0a47b611 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -141,11 +141,6 @@ Since F contains the path(s) to the guest disk @@ -53,54 +54,59 @@ index bdf4d716..83f6fd4d 100644 -To convert a local disk image and immediately boot it in local -qemu, do: - -- virt-v2v -i disk disk.img -o qemu -os /var/tmp --qemu-boot +- virt-v2v -i disk disk.img -o qemu -os /var/tmp -oo qemu-boot - =head1 OPTIONS =over 4 -@@ -528,9 +523,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -511,9 +506,6 @@ This is similar to I<-o local>, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by I<-os>. --When using this output mode, you can also specify the I<--qemu-boot> +-When using this output mode, you can also specify the I<-oo qemu-boot> -option which boots the guest under qemu immediately. - =item B<-o> B This is the same as I<-o rhv>. -@@ -775,11 +767,6 @@ Print information about the source guest and stop. This option is +@@ -769,10 +761,6 @@ Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See L. -=item B<--qemu-boot> - --When using I<-o qemu> only, this boots the guest immediately after --virt-v2v finishes. +-This is the same as I<-oo qemu-boot>. - =item B<-q> =item B<--quiet> -diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml -index 5e7c01f8..ac10ec31 100644 ---- a/v2v/cmdline.ml -+++ b/v2v/cmdline.ml -@@ -276,7 +276,6 @@ let parse_cmdline () = - s_"Same as ‘-ip filename’"; - [ L"print-source" ], Getopt.Set print_source, - s_"Print source and stop"; -- [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)"; - [ L"root" ], Getopt.String ("ask|... ", set_root_choice), - s_"How to choose root filesystem"; - [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), -@@ -652,6 +651,8 @@ read the man page virt-v2v(1). - | Some d when not (is_directory d) -> - error (f_"-os %s: output directory does not exist or is not a directory") d - | Some d -> d in -+ if qemu_boot then -+ error (f_"-o qemu: the --qemu-boot option cannot be used in RHEL"); - Output_qemu.output_qemu os qemu_boot, - output_format, output_alloc +diff --git a/output/output.ml b/output/output.ml +index 92b03525..1414a521 100644 +--- a/output/output.ml ++++ b/output/output.ml +@@ -1346,6 +1346,9 @@ and qemu_parse_options cmdline = + ) cmdline.output_options; + let qemu_boot = !qemu_boot in ++ if qemu_boot then ++ error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL"); ++ + (* -os must be set to a directory. *) + let output_storage = + match cmdline.output_storage with +diff --git a/v2v/v2v.ml b/v2v/v2v.ml +index a88e0509..1104295c 100644 +--- a/v2v/v2v.ml ++++ b/v2v/v2v.ml +@@ -218,8 +218,6 @@ let rec main () = + s_"Same as ‘-ip filename’"; + [ L"print-source" ], Getopt.Set print_source, + s_"Print source and stop"; +- [ L"qemu-boot" ], Getopt.Unit (fun () -> add_o_option "-oo" "qemu-boot"), +- s_"Boot in qemu (-o qemu only)"; + [ L"root" ], Getopt.String ("ask|... ", add_conv_option "--root"), + s_"How to choose root filesystem"; + [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), -- 2.31.1 diff --git a/0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch b/0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch deleted file mode 100644 index c1a1163..0000000 --- a/0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch +++ /dev/null @@ -1,90 +0,0 @@ -From abe3c7539b6221e8ab3cc35ee3d58b1aa06bbef4 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 14 May 2018 10:16:58 +0100 -Subject: [PATCH 02/11] RHEL: v2v: rhv-upload: Remove restriction on -oa - sparse. - -See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681 -and the v2v-devel private thread "Do we already support migration using FC?" ---- - docs/virt-v2v-output-rhv.pod | 8 +------- - v2v/output_rhv_upload.ml | 10 +--------- - v2v/rhv-upload-transfer.py | 4 +--- - 3 files changed, 3 insertions(+), 19 deletions(-) - -diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod -index dc6b2c0a..7b8fdc0f 100644 ---- a/docs/virt-v2v-output-rhv.pod -+++ b/docs/virt-v2v-output-rhv.pod -@@ -5,7 +5,7 @@ virt-v2v-output-rhv - Using virt-v2v to convert guests to oVirt or RHV - =head1 SYNOPSIS - - virt-v2v [-i* options] -o rhv-upload [-oc ENGINE_URL] -os STORAGE -- [-op PASSWORD] [-of raw] -+ [-op PASSWORD] - [-oo rhv-cafile=FILE] - [-oo rhv-cluster=CLUSTER] - [-oo rhv-direct] -@@ -79,12 +79,6 @@ username is not specified then virt-v2v defaults to using - C which is the typical superuser account for oVirt - instances. - --=item I<-of raw> -- --Currently you must use I<-of raw> and you cannot use I<-oa preallocated>. -- --These restrictions will be loosened in a future version. -- - =item I<-op> F - - A file containing a password to be used when connecting to the oVirt -diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index 50baa595..be5e9851 100644 ---- a/v2v/output_rhv_upload.ml -+++ b/v2v/output_rhv_upload.ml -@@ -146,17 +146,10 @@ let error_unless_nbdkit_compiled_with_selinux config = - error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.") - ) - --(* Output sparse must be sparse. We may be able to -- * lift this limitation in future, but it requires changes on the -- * RHV side. See TODO file for details. XXX -- *) -+(* Output format must be raw. *) - let error_current_limitation required_param = - error (f_"rhv-upload: currently you must use ‘%s’. This restriction will be loosened in a future version.") required_param - --let error_unless_output_alloc_sparse output_alloc = -- if output_alloc <> Sparse then -- error_current_limitation "-oa sparse" -- - let json_optstring = function - | Some s -> JSON.String s - | None -> JSON.Null -@@ -271,7 +264,6 @@ object - error_unless_nbdkit_min_version config; - error_unless_nbdkit_python_plugin_working plugin_script; - error_unless_nbdkit_compiled_with_selinux config; -- error_unless_output_alloc_sparse output_alloc; - - (* Python code prechecks. *) - let json_params = match rhv_options.rhv_disk_uuids with -diff --git a/v2v/rhv-upload-transfer.py b/v2v/rhv-upload-transfer.py -index 5aebcd1d..f38cd9c0 100644 ---- a/v2v/rhv-upload-transfer.py -+++ b/v2v/rhv-upload-transfer.py -@@ -111,10 +111,8 @@ def create_disk(connection): - # size, based on qemu-img measure of the overlay. - initial_size=params['disk_size'], - provisioned_size=params['disk_size'], -- # XXX Ignores params['output_sparse']. -- # Handling this properly will be complex, see: - # https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html -- sparse=True, -+ sparse=params['output_sparse'], - storage_domains=[ - types.StorageDomain( - name=params['output_storage'], --- -2.31.1 - diff --git a/0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 67% rename from 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index f93f057..39d35f8 100644 --- a/0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,17 +1,17 @@ -From 49385571ce5967f8d9a102e935f201ee9c22326d Mon Sep 17 00:00:00 2001 +From 539e158e5dffdb0324a89b2a059b44ae51d2cc29 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 -Subject: [PATCH 05/11] RHEL: Fix list of supported sound cards to match RHEL +Subject: [PATCH 3/8] RHEL: Fix list of supported sound cards to match RHEL qemu (RHBZ#1176493). --- - v2v/utils.ml | 5 +++-- + lib/utils.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -diff --git a/v2v/utils.ml b/v2v/utils.ml -index 7136e4be..a6c359f0 100644 ---- a/v2v/utils.ml -+++ b/v2v/utils.ml +diff --git a/lib/utils.ml b/lib/utils.ml +index 1eac3f3f..a478fc33 100644 +--- a/lib/utils.ml ++++ b/lib/utils.ml @@ -59,13 +59,14 @@ let kvm_arch = function (* Does qemu support the given sound card? *) let qemu_supports_sound_card = function diff --git a/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch deleted file mode 100644 index b32b106..0000000 --- a/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0839ba57487b73cfb684ea495280db5d946f667a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sun, 28 Sep 2014 19:14:43 +0100 -Subject: [PATCH 03/11] RHEL: v2v: Select correct qemu binary for -o qemu mode - (RHBZ#1147313). - -RHEL does not have qemu-system-x86_64 (etc), and in addition the -qemu binary is located in /usr/libexec. Encode the path to this -binary directly in the script. - -Note that we don't support people running qemu directly like this. -It's just for quick testing of converted VMs, and to help us with -support cases. ---- - v2v/output_qemu.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml -index 12c56836..7391eda0 100644 ---- a/v2v/output_qemu.ml -+++ b/v2v/output_qemu.ml -@@ -79,7 +79,7 @@ object - * module deals with shell and qemu comma quoting. - *) - let cmd = Qemuopts.create () in -- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch); -+ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm"; - - let flag = Qemuopts.flag cmd - and arg = Qemuopts.arg cmd --- -2.31.1 - diff --git a/0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch similarity index 61% rename from 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch rename to 0004-RHEL-Fixes-for-libguestfs-winsupport.patch index 402b09e..45a5349 100644 --- a/0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch +++ b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,15 +1,42 @@ -From db2150a5d790c35fb23c6d9d6b29e602482ce555 Mon Sep 17 00:00:00 2001 +From b4bab3eda2afabadcbf2e07501eab2049d1a3133 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 -Subject: [PATCH 06/11] RHEL: Fix tests for libguestfs-winsupport. +Subject: [PATCH 4/8] RHEL: Fixes for libguestfs-winsupport. -It doesn't let us use guestfish for arbitrary Windows edits. +In tests we cannot use guestfish for arbitrary Windows edits. +In virt-v2v helpers we must set the program name to virt-v2v. --- + convert/convert.ml | 1 + + convert/windows_virtio.ml | 1 + test-data/phony-guests/make-windows-img.sh | 1 + tests/test-v2v-virtio-win-iso.sh | 8 +++++++- tests/test-v2v-windows-conversion.sh | 8 +++++++- - 3 files changed, 15 insertions(+), 2 deletions(-) + 5 files changed, 17 insertions(+), 2 deletions(-) +diff --git a/convert/convert.ml b/convert/convert.ml +index 07c7aee9..a4b0c60e 100644 +--- a/convert/convert.ml ++++ b/convert/convert.ml +@@ -190,6 +190,7 @@ helper-v2v-convert V2VDIR + + message (f_"Opening the source"); + let g = open_guestfs ~identifier:"v2v" () in ++ g#set_program "virt-v2v"; + g#set_memsize (g#get_memsize () * 2); + (* Setting the number of vCPUs allows parallel mkinitrd, but make + * sure this is not too large because each vCPU consumes guest RAM. +diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml +index f843dae2..6623d03d 100644 +--- a/convert/windows_virtio.ml ++++ b/convert/windows_virtio.ml +@@ -356,6 +356,7 @@ and copy_from_virtio_win g inspect srcdir destdir filter missing = + let g2 = + try + let g2 = open_guestfs ~identifier:"virtio_win" () in ++ g#set_program "virt-v2v"; + g2#add_drive_opts virtio_win ~readonly:true; + g2#launch (); + g2 diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh index 30908a91..73cf5144 100755 --- a/test-data/phony-guests/make-windows-img.sh diff --git a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch new file mode 100644 index 0000000..6374372 --- /dev/null +++ b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -0,0 +1,26 @@ +From 4022a90a8974147000fb5053d7596066db1b82b9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 2 Mar 2017 14:21:37 +0100 +Subject: [PATCH 5/8] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) + +The SDL output mode is not supported in RHEL's qemu-kvm. +--- + input/input.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/input/input.ml b/input/input.ml +index a8416eaf..9175a531 100644 +--- a/input/input.ml ++++ b/input/input.ml +@@ -270,7 +270,7 @@ and disk_source cmdline args = + s_features = [ "acpi"; "apic"; "pae" ]; + s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) + s_display = +- Some { s_display_type = Window; s_keymap = None; s_password = None; ++ Some { s_display_type = VNC; s_keymap = None; s_password = None; + s_listen = LNoListen; s_port = None }; + s_video = None; + s_sound = None; +-- +2.31.1 + diff --git a/0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch similarity index 82% rename from 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch rename to 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index 06db995..7c54981 100644 --- a/0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,7 +1,7 @@ -From aa5cf3ba5d10400ee6d6c63dd77c711b6fdec116 Mon Sep 17 00:00:00 2001 +From 7f77cb4a56eb8dcd26db9e81e0fb2f41777129c3 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 -Subject: [PATCH 09/11] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) +Subject: [PATCH 6/8] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) They are not supported in RHEL. --- diff --git a/0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 94% rename from 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index f00865c..712c684 100644 --- a/0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,7 +1,7 @@ -From ccaae02ef3f081b544eca82f3652ca50ac5566a9 Mon Sep 17 00:00:00 2001 +From a4db166d7a5c480c765ee74340463db800533c73 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 -Subject: [PATCH 10/11] RHEL: point to KB for supported v2v hypervisors/guests +Subject: [PATCH 7/8] RHEL: point to KB for supported v2v hypervisors/guests --- docs/virt-v2v-support.pod | 104 ++------------------------------------ diff --git a/0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch b/0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch deleted file mode 100644 index 66041e7..0000000 --- a/0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch +++ /dev/null @@ -1,288 +0,0 @@ -From 3b69cfa365c7b014ca81b09e857ab294cff04914 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 14 Jan 2016 11:53:42 -0500 -Subject: [PATCH 07/11] RHEL: v2v: Disable the virt-v2v --in-place option. - -This disables the virt-v2v --in-place option which we do not -wish to support in RHEL. -(See commit d0069559a939e47e5f29973ed9a69a13f0b58301). ---- - docs/test-v2v-docs.sh | 1 + - docs/virt-v2v.pod | 50 +---------------- - tests/Makefile.am | 2 - - tests/test-v2v-in-place.sh | 108 ------------------------------------- - v2v/cmdline.ml | 8 +-- - 5 files changed, 8 insertions(+), 161 deletions(-) - delete mode 100755 tests/test-v2v-in-place.sh - -diff --git a/docs/test-v2v-docs.sh b/docs/test-v2v-docs.sh -index 465df26f..ae1a6c68 100755 ---- a/docs/test-v2v-docs.sh -+++ b/docs/test-v2v-docs.sh -@@ -30,6 +30,7 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \ - --debug-overlay,\ - --ic,\ - --if,\ -+--in-place,\ - --io,\ - --ip,\ - --it,\ -diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 83f6fd4d..719a95b5 100644 ---- a/docs/virt-v2v.pod -+++ b/docs/virt-v2v.pod -@@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM - [-o mode] [other -o* options] - [guest|filename] - -- virt-v2v --in-place -- [-i mode] [other -i* options] -- [guest|filename] -- - =head1 DESCRIPTION - - Virt-v2v converts a single guest from a foreign hypervisor to run on -@@ -39,9 +35,6 @@ these sides of virt-v2v are documented separately in this manual. - - Virt-v2v normally copies from the input to the output, called "copying - mode". In this case the source guest is always left unchanged. --In-place conversion (I<--in-place>) only uses the I<-i*> options and --modifies the source guest in-place. (See L --below.) - - =head2 Other virt-v2v topics - -@@ -292,20 +285,6 @@ For I<-i disk> only, this specifies the format of the input disk - image. For other input methods you should specify the input - format in the metadata. - --=item B<--in-place> -- --Do not create an output virtual machine in the target hypervisor. --Instead, adjust the guest OS in the source VM to run in the input --hypervisor. -- --This mode is meant for integration with other toolsets, which take the --responsibility of converting the VM configuration, providing for --rollback in case of errors, transforming the storage, etc. -- --See L below. -- --Conflicts with all I<-o *> options. -- - =item B<-io> OPTION=VALUE - - Set input option(s) related to the current input mode or transport. -@@ -1298,8 +1277,8 @@ have at least 100 available inodes. - =head3 Minimum free space check in the host - - You must have sufficient free space in the host directory used to --store large temporary overlays (except in I<--in-place> mode). To --find out which directory this is, use: -+store large temporary overlays. To find out -+which directory this is, use: - - $ df -h "`guestfish get-cachedir`" - Filesystem Size Used Avail Use% Mounted on -@@ -1437,31 +1416,6 @@ that instead. - - - --=head2 In-place conversion -- --It is also possible to use virt-v2v in scenarios where a foreign VM --has already been imported into a KVM-based hypervisor, but still needs --adjustments in the guest to make it run in the new virtual hardware. -- --In that case it is assumed that a third-party tool has created the --target VM in the supported KVM-based hypervisor based on the source VM --configuration and contents, but using virtual devices more appropriate --for KVM (e.g. virtio storage and network, etc.). -- --Then, to make the guest OS boot and run in the changed environment, --one can use: -- -- virt-v2v -ic qemu:///system converted_vm --in-place -- --Virt-v2v will analyze the configuration of C in the --C libvirt instance, and apply various fixups to the --guest OS configuration to make it match the VM configuration. This --may include installing virtio drivers, configuring the bootloader, the --mountpoints, the network interfaces, and so on. -- --Should an error occur during the operation, virt-v2v exits with an --error code leaving the VM in an undefined state. -- - =head2 Machine readable output - - The I<--machine-readable> option can be used to make the output more -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 41d38d30..9bbd86d6 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -77,7 +77,6 @@ TESTS = \ - test-v2v-floppy.sh \ - test-v2v-i-disk.sh \ - test-v2v-i-ova.sh \ -- test-v2v-in-place.sh \ - test-v2v-mac.sh \ - test-v2v-machine-readable.sh \ - test-v2v-networks-and-bridges.sh \ -@@ -226,7 +225,6 @@ EXTRA_DIST += \ - test-v2v-i-vmx-3.vmx \ - test-v2v-i-vmx-4.vmx \ - test-v2v-i-vmx-5.vmx \ -- test-v2v-in-place.sh \ - test-v2v-it-vddk-io-query.sh \ - test-v2v-machine-readable.sh \ - test-v2v-mac-expected.xml \ -diff --git a/tests/test-v2v-in-place.sh b/tests/test-v2v-in-place.sh -deleted file mode 100755 -index 9da8fa63..00000000 ---- a/tests/test-v2v-in-place.sh -+++ /dev/null -@@ -1,108 +0,0 @@ --#!/bin/bash - --# libguestfs virt-v2v test script --# Copyright (C) 2014 Red Hat Inc. --# Copyright (C) 2015 Parallels IP Holdings GmbH. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --# Test --in-place. -- --unset CDPATH --export LANG=C --set -e -- --source ./functions.sh --set -e --set -x -- --skip_if_skipped --requires test -f ../test-data/phony-guests/windows.img -- --img_base="$abs_top_builddir/test-data/phony-guests/windows.img" -- --export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" --export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" -- --d=$PWD/test-v2v-in-place.d --rm -rf $d --cleanup_fn rm -r $d --mkdir $d -- --img="$d/test.qcow2" --rm -f $img --qemu-img create -f qcow2 -b $img_base -o compat=1.1,backing_fmt=raw $img --md5="$(do_md5 $img_base)" -- --libvirt_xml="$d/test.xml" --rm -f $libvirt_xml --n=windows-overlay --cat > $libvirt_xml < -- -- $n -- 1048576 -- -- hvm -- -- -- -- -- -- -- -- -- -- -- --EOF -- --$VG virt-v2v --debug-gc -i libvirt -ic "test://$libvirt_xml" $n --in-place -- --# Test that the drivers have been copied over into the guest --script="$d/test.fish" --expected="$d/expected" --response="$d/response" -- --mktest () --{ -- local cmd="$1" exp="$2" -- -- echo "echo '$cmd'" >> "$script" -- echo "$cmd" >> "$expected" -- -- echo "$cmd" >> "$script" -- echo "$exp" >> "$expected" --} -- --:> "$script" --:> "$expected" -- --firstboot_dir="/Program Files/Guestfs/Firstboot" --mktest "is-dir \"$firstboot_dir\"" true --mktest "is-file \"$firstboot_dir/firstboot.bat\"" true --mktest "is-dir \"$firstboot_dir/scripts\"" true --virtio_dir="/Windows/Drivers/VirtIO" --mktest "is-dir \"$virtio_dir\"" true --for drv in netkvm qxl vioscsi viostor; do -- for sfx in cat inf sys; do -- mktest "is-file \"$virtio_dir/$drv.$sfx\"" true -- done --done -- --guestfish --ro -a "$img" -i < "$script" > "$response" --diff -u "$expected" "$response" -- --# Test the base image remained untouched --test "$md5" = "$(do_md5 $img_base)" -diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml -index ac10ec31..01314580 100644 ---- a/v2v/cmdline.ml -+++ b/v2v/cmdline.ml -@@ -246,8 +246,7 @@ let parse_cmdline () = - s_"Use password from file to connect to input hypervisor"; - [ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport), - s_"Input transport"; -- [ L"in-place" ], Getopt.Set in_place, -- s_"Only tune the guest in the input VM"; -+ [ L"in-place" ], Getopt.Set in_place, Getopt.hidden_option_description; - [ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac), - s_"Map NIC to network or bridge or assign static IP"; - [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), -@@ -386,7 +385,6 @@ read the man page virt-v2v(1). - pr "vddk\n"; - pr "colours-option\n"; - pr "vdsm-compat-option\n"; -- pr "in-place\n"; - pr "io/oo\n"; - pr "mac-option\n"; - pr "bandwidth-option\n"; -@@ -556,6 +554,10 @@ read the man page virt-v2v(1). - error (f_"only ‘-it ssh’ can be used here") in - Input_vmx.input_vmx input_password input_transport arg in - -+ (* Prevent use of --in-place option in RHEL. *) -+ if in_place then -+ error (f_"--in-place cannot be used in RHEL"); -+ - (* Common error message. *) - let error_option_cannot_be_used_in_output_mode mode opt = - error (f_"-o %s: %s option cannot be used in this output mode") mode opt --- -2.31.1 - diff --git a/0011-RHEL-9-Disable-o-glance.patch b/0008-RHEL-9-Disable-o-glance.patch similarity index 75% rename from 0011-RHEL-9-Disable-o-glance.patch rename to 0008-RHEL-9-Disable-o-glance.patch index 1336f6c..8776133 100644 --- a/0011-RHEL-9-Disable-o-glance.patch +++ b/0008-RHEL-9-Disable-o-glance.patch @@ -1,16 +1,15 @@ -From 7edb403ee54153c64205915c0bd1d177c0094ee0 Mon Sep 17 00:00:00 2001 +From f801f4a34f9b136e2cb5af3b936948f1ecb88154 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 11:15:52 +0100 -Subject: [PATCH 11/11] RHEL 9: Disable -o glance +Subject: [PATCH 8/8] RHEL 9: Disable -o glance Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 --- docs/virt-v2v-output-openstack.pod | 56 ++---------------------------- - docs/virt-v2v.pod | 22 ------------ + docs/virt-v2v.pod | 20 ----------- + output/output.ml | 3 +- tests/test-v2v-o-glance.sh | 3 ++ - v2v/cmdline.ml | 3 -- - v2v/output_glance.ml | 2 +- - 5 files changed, 6 insertions(+), 80 deletions(-) + 4 files changed, 7 insertions(+), 75 deletions(-) diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod index f5a3abad..1ab356e8 100644 @@ -100,16 +99,10 @@ index f5a3abad..1ab356e8 100644 =head1 AUTHOR diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 719a95b5..2f4fe86c 100644 +index 0a47b611..c70bfef5 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -422,20 +422,10 @@ interested in looking at the metadata. - This option is not compatible with I<-o libvirt> since it would create - a faulty guest (one with no disks). - --This option is not compatible with I<-o glance> for technical reasons. -- - =item B<-o> B +@@ -432,14 +432,6 @@ See L below. This is the same as I<-o local>. @@ -124,7 +117,7 @@ index 719a95b5..2f4fe86c 100644 =item B<-o> B Set the output method to I. -@@ -1148,11 +1138,6 @@ and output methods may use disk space, as outlined in the table below. +@@ -1163,11 +1155,6 @@ and output methods may use disk space, as outlined in the table below. This temporarily places a full copy of the uncompressed source disks in C<$VIRT_V2V_TMPDIR> (or F). @@ -136,7 +129,7 @@ index 719a95b5..2f4fe86c 100644 =item I<-o local> =item I<-o qemu> -@@ -1337,13 +1322,6 @@ instance. +@@ -1352,13 +1339,6 @@ instance. Because of how Cinder volumes are presented as F block devices, using I<-o openstack> normally requires that virt-v2v is run as root. @@ -150,6 +143,20 @@ index 719a95b5..2f4fe86c 100644 =item Writing to block devices This normally requires root. See the next section. +diff --git a/output/output.ml b/output/output.ml +index 1414a521..69768ff1 100644 +--- a/output/output.ml ++++ b/output/output.ml +@@ -75,7 +75,8 @@ let rec main () = + error (f_"%s option used more than once on the command line") "-om"; + match mode with + | "disk" -> output_mode := Some `Disk +- | "glance" -> output_mode := Some `Glance ++ | "glance" -> ++ error(f_"-o glance option has been removed from RHEL 9") + | "json" -> output_mode := Some `Json + | "libvirt" -> output_mode := Some `Libvirt + | "null" -> output_mode := Some `Null diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh index c0db9115..074b5e16 100755 --- a/tests/test-v2v-o-glance.sh @@ -164,37 +171,6 @@ index c0db9115..074b5e16 100755 source ./functions.sh set -e set -x -diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml -index 01314580..e6c86b6f 100644 ---- a/v2v/cmdline.ml -+++ b/v2v/cmdline.ml -@@ -170,7 +170,6 @@ let parse_cmdline () = - if !output_mode <> `Not_set then - error (f_"%s option used more than once on the command line") "-o"; - match mode with -- | "glance" -> output_mode := `Glance - | "libvirt" -> output_mode := `Libvirt - | "disk" | "local" -> output_mode := `Local - | "json" -> output_mode := `JSON -@@ -323,8 +322,6 @@ let parse_cmdline () = - - virt-v2v -i disk disk.img -o local -os /var/tmp - -- virt-v2v -i disk disk.img -o glance -- - There is a companion front-end called \"virt-p2v\" which comes as an - ISO or CD image that can be booted on physical machines. - -diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml -index 8c5426b9..3fce4e7a 100644 ---- a/v2v/output_glance.ml -+++ b/v2v/output_glance.ml -@@ -100,4 +100,4 @@ object - end - - let output_glance = new output_glance --let () = Modules_list.register_output_module "glance" -+(* let () = Modules_list.register_output_module "glance" *) -- 2.31.1 diff --git a/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch deleted file mode 100644 index cd2c206..0000000 --- a/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e57a5dafc00b3b5737824977aad0feb0ec497a1f Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 2 Mar 2017 14:21:37 +0100 -Subject: [PATCH 08/11] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) - -The SDL output mode is not supported in RHEL's qemu-kvm. ---- - v2v/input_disk.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml -index b3acb5f6..5b39dbe2 100644 ---- a/v2v/input_disk.ml -+++ b/v2v/input_disk.ml -@@ -88,7 +88,7 @@ class input_disk input_format disk = object - s_features = [ "acpi"; "apic"; "pae" ]; - s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) - s_display = -- Some { s_display_type = Window; s_keymap = None; s_password = None; -+ Some { s_display_type = VNC; s_keymap = None; s_password = None; - s_listen = LNoListen; s_port = None }; - s_video = None; - s_sound = None; --- -2.31.1 - diff --git a/sources b/sources index 6a6c6fc..d4d5702 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.3.tar.gz) = 24606acb039e630d8cbe4befe232bf9f3e8a2064e931d9064adc59704d34b67269933e2b24cb9f996c31b8c16b4e4f2ebdd7f40c9d29bb0f4a9f3df98d8edf34 -SHA512 (virt-v2v-1.45.3.tar.gz.sig) = efbeb0b925b403e6973936a89125b169c7522fc5073a0b8978326de861819a3b8756e219a381e3eac3ee40d97cc16919286a797557e6391e301a0871b38628e7 +SHA512 (virt-v2v-1.45.90.tar.gz) = bbe5a6cbe949609c93bdbca0853aae6b9ca87882e49420a763440aab986bdd90a000181e9ec9b1271a42d052749e579f810a4c0122a5dbfa37ff81681147aacd +SHA512 (virt-v2v-1.45.90.tar.gz.sig) = 445b0a1f1db0abc86f3be31e39e9430536f5d62d73f56d88abf27c58ef554db7b0844f92ef1ae267dd27d5be9f5b80aadf1f7e6b1267c732f99a219639f7db9a diff --git a/virt-v2v.spec b/virt-v2v.spec index 625ccb6..7f4b6a3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.3 +Version: 1.45.90 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -50,17 +50,14 @@ ExclusiveArch: x86_64 # Downstream (RHEL-only) patches. %if 0%{?rhel} -Patch9001: 0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch -Patch9002: 0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch -Patch9003: 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch9004: 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch -Patch9005: 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch9006: 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch -Patch9007: 0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch -Patch9008: 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch9009: 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch -Patch9010: 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch9011: 0011-RHEL-9-Disable-o-glance.patch +Patch9001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch9002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +Patch9003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch9004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch9005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch9006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +Patch9007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch9008: 0008-RHEL-9-Disable-o-glance.patch %endif %if 0%{patches_touch_autotools} @@ -71,16 +68,17 @@ BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.01 -BuildRequires: libguestfs-devel >= 1:1.42 +BuildRequires: libguestfs-devel >= 1:1.42 BuildRequires: augeas-devel BuildRequires: bash-completion BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: jansson-devel +BuildRequires: libnbd-devel BuildRequires: libosinfo-devel -BuildRequires: libvirt-devel BuildRequires: libvirt-daemon-kvm +BuildRequires: libvirt-devel BuildRequires: libxml2-devel BuildRequires: pcre-devel BuildRequires: perl(Sys::Guestfs) @@ -90,6 +88,7 @@ BuildRequires: xorriso BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-libguestfs-devel +BuildRequires: ocaml-libnbd-devel BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-gettext-devel %if !0%{?rhel} @@ -117,7 +116,7 @@ Requires: gawk Requires: gzip Requires: unzip Requires: curl -Requires: /usr/bin/virsh +Requires: %{_bindir}/virsh # Ensure the UEFI firmware is available, to properly convert # EFI guests (RHBZ#1429643). @@ -128,14 +127,25 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -# Needed for -it vddk, and -o rhv-upload. -Requires: nbdkit +Requires: libnbd >= 1.8.2-2.el9 +Requires: %{_bindir}/qemu-nbd +Requires: %{_bindir}/nbdcopy +Requires: %{_bindir}/nbdinfo +Requires: nbdkit-server >= 1.26.5-1.el9 Requires: nbdkit-curl-plugin +Requires: nbdkit-file-plugin +Requires: nbdkit-nbd-plugin +Requires: nbdkit-null-plugin Requires: nbdkit-python-plugin Requires: nbdkit-ssh-plugin %ifarch x86_64 Requires: nbdkit-vddk-plugin %endif +Requires: nbdkit-cacheextents-filter +Requires: nbdkit-cow-filter >= 1.26.5-1.el9 +Requires: nbdkit-rate-filter +Requires: nbdkit-readahead-filter +Requires: nbdkit-retry-filter # For rhsrvany.exe, used to install firstboot scripts in Windows guests. Requires: mingw32-srvany >= 1.0-13 @@ -258,6 +268,9 @@ popd %files -f %{name}.lang %license COPYING %doc README +%{_bindir}/helper-v2v-convert +%{_bindir}/helper-v2v-input +%{_bindir}/helper-v2v-output %{_bindir}/virt-v2v %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* @@ -287,6 +300,9 @@ popd %changelog +* Tue Sep 21 2021 Richard W.M. Jones - 1:1.45.90-1 +- New upstream development version 1.45.90 (preview of 2.0) + * Fri Aug 06 2021 Richard W.M. Jones - 1:1.45.3-1 - New upstream development version 1.45.3. - Rebase RHEL patches. From ea395b60dc76d5db3625fc3b8968d93d4f94ce91 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Oct 2021 11:36:31 +0100 Subject: [PATCH 080/235] OCaml 4.13.1 build --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 7f4b6a3..b86ea8f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.45.90 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -300,6 +300,9 @@ popd %changelog +* Tue Oct 05 2021 Richard W.M. Jones - 1:1.45.90-2 +- OCaml 4.13.1 build + * Tue Sep 21 2021 Richard W.M. Jones - 1:1.45.90-1 - New upstream development version 1.45.90 (preview of 2.0) From 88e3f5af253d8345abe8e8e60422f09bf7e74060 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Nov 2021 15:12:39 +0000 Subject: [PATCH 081/235] New upstream development version 1.45.91 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index d4d5702..af46769 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.90.tar.gz) = bbe5a6cbe949609c93bdbca0853aae6b9ca87882e49420a763440aab986bdd90a000181e9ec9b1271a42d052749e579f810a4c0122a5dbfa37ff81681147aacd -SHA512 (virt-v2v-1.45.90.tar.gz.sig) = 445b0a1f1db0abc86f3be31e39e9430536f5d62d73f56d88abf27c58ef554db7b0844f92ef1ae267dd27d5be9f5b80aadf1f7e6b1267c732f99a219639f7db9a +SHA512 (virt-v2v-1.45.91.tar.gz) = 41b1897b2e491dadce890623bb94e149c2921662f140c25281ad7c60f324438718cf05b61b6b8b56010e1245e45b1843cde3535307d02e269ee60ee4aa125cf8 +SHA512 (virt-v2v-1.45.91.tar.gz.sig) = 60c97207f8e8ec61b14a52aa8b1e6080fd9f5a0e795d62eff46b214249d8f6ee41e101b586fdb7c3a2a49c5a2a42f7d4dc55a292d5143f7e57527490bf8fcd42 diff --git a/virt-v2v.spec b/virt-v2v.spec index b86ea8f..450c957 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.90 -Release: 2%{?dist} +Version: 1.45.91 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -300,6 +300,9 @@ popd %changelog +* Tue Nov 23 2021 Richard W.M. Jones - 1:1.45.91-1 +- New upstream development version 1.45.91 (preview of 2.0) + * Tue Oct 05 2021 Richard W.M. Jones - 1:1.45.90-2 - OCaml 4.13.1 build From 7ba90de2bf297b3a9a527fe22aa79cd4f7295b08 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Nov 2021 15:28:40 +0000 Subject: [PATCH 082/235] ExcludeArch %{arm} temporarily --- virt-v2v.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 450c957..94036af 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -12,6 +12,9 @@ # The source directory. %global source_directory 1.45-development +# TEMPORARY while qemu is not available in Rawhide on armv7 +ExcludeArch: %{arm} + Name: virt-v2v Epoch: 1 Version: 1.45.91 From f8610faa00a5e3ec308e769fc516cfbdc833d687 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Nov 2021 08:33:04 +0000 Subject: [PATCH 083/235] Revert "ExcludeArch %{arm} temporarily" This reverts commit 7ba90de2bf297b3a9a527fe22aa79cd4f7295b08. --- virt-v2v.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 94036af..450c957 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -12,9 +12,6 @@ # The source directory. %global source_directory 1.45-development -# TEMPORARY while qemu is not available in Rawhide on armv7 -ExcludeArch: %{arm} - Name: virt-v2v Epoch: 1 Version: 1.45.91 From 2e0afa9b9185dd3196712d8c29be18a194e09efc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Nov 2021 08:33:15 +0000 Subject: [PATCH 084/235] Bump release and rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 450c957..c77ac0c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.45.91 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -300,6 +300,9 @@ popd %changelog +* Thu Nov 25 2021 Richard W.M. Jones - 1:1.45.91-2 +- Bump release and rebuild + * Tue Nov 23 2021 Richard W.M. Jones - 1:1.45.91-1 - New upstream development version 1.45.91 (preview of 2.0) From 28215114449f071ef94214d505537062d542416a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Dec 2021 10:46:00 +0000 Subject: [PATCH 085/235] New upstream development version 1.45.92 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources b/sources index af46769..4db993f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.91.tar.gz) = 41b1897b2e491dadce890623bb94e149c2921662f140c25281ad7c60f324438718cf05b61b6b8b56010e1245e45b1843cde3535307d02e269ee60ee4aa125cf8 -SHA512 (virt-v2v-1.45.91.tar.gz.sig) = 60c97207f8e8ec61b14a52aa8b1e6080fd9f5a0e795d62eff46b214249d8f6ee41e101b586fdb7c3a2a49c5a2a42f7d4dc55a292d5143f7e57527490bf8fcd42 +SHA512 (virt-v2v-1.45.92.tar.gz) = 0a9166b023ea60d34c10891bd3610874929790526ddfad13d5514e34010b59d288a59918423ef3dd970ade435437a452bc31c2b225c72f8676fd9559254ccc58 +SHA512 (virt-v2v-1.45.92.tar.gz.sig) = d1bb3f101e1272e59616c971ce86675c2b35248f8a5e91dd623a31eff7a39974a88e9fd7bc14be80434e69e935222fcb6389908cd0da47a537bfdff9266614b5 diff --git a/virt-v2v.spec b/virt-v2v.spec index c77ac0c..10cf1c3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.91 -Release: 2%{?dist} +Version: 1.45.92 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -268,9 +268,6 @@ popd %files -f %{name}.lang %license COPYING %doc README -%{_bindir}/helper-v2v-convert -%{_bindir}/helper-v2v-input -%{_bindir}/helper-v2v-output %{_bindir}/virt-v2v %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* @@ -300,6 +297,9 @@ popd %changelog +* Thu Dec 02 2021 Richard W.M. Jones - 1:1.45.92-1 +- New upstream development version 1.45.92 (preview of 2.0) + * Thu Nov 25 2021 Richard W.M. Jones - 1:1.45.91-2 - Bump release and rebuild From d58960176f1d6356a875056db5b71d3e244191a8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Dec 2021 13:05:59 +0000 Subject: [PATCH 086/235] Require openssh-clients scp >= 8.7p1 See: https://bugzilla.redhat.com/show_bug.cgi?id=2027673 https://github.com/libguestfs/virt-v2v/commit/e2af12ba69c4463bb73d30db63290a887cdd41eb --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 10cf1c3..1bdb6ec 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -116,6 +116,7 @@ Requires: gawk Requires: gzip Requires: unzip Requires: curl +Requires: %{_bindir}/scp >= 8.7p1 Requires: %{_bindir}/virsh # Ensure the UEFI firmware is available, to properly convert From df4a127b931d513fa34fbfe585ef4de21b2fe756 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Dec 2021 13:21:25 +0000 Subject: [PATCH 087/235] Fix previous commit Apparently versioned filenames are not allowed: error: line 121: Versioned file name not permitted: Requires: /usr/bin/scp >= 8.7p1 --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 1bdb6ec..1effaa1 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -116,7 +116,7 @@ Requires: gawk Requires: gzip Requires: unzip Requires: curl -Requires: %{_bindir}/scp >= 8.7p1 +Requires: openssh-clients >= 8.7p1 Requires: %{_bindir}/virsh # Ensure the UEFI firmware is available, to properly convert From 3ef80726690e7f79e2b072d115a272f341fb1213 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 3 Dec 2021 17:17:46 +0000 Subject: [PATCH 088/235] New upstream development version 1.45.93 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 4db993f..fa0fd0a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.92.tar.gz) = 0a9166b023ea60d34c10891bd3610874929790526ddfad13d5514e34010b59d288a59918423ef3dd970ade435437a452bc31c2b225c72f8676fd9559254ccc58 -SHA512 (virt-v2v-1.45.92.tar.gz.sig) = d1bb3f101e1272e59616c971ce86675c2b35248f8a5e91dd623a31eff7a39974a88e9fd7bc14be80434e69e935222fcb6389908cd0da47a537bfdff9266614b5 +SHA512 (virt-v2v-1.45.93.tar.gz) = d70ef9bdebf0c3579274ddbcce96681600eb263576c605fdf6f17cc6ae76bed6452a4c978e91ff662f7c2f4c6dc28fe760a49e545adce14ce5743c492bea8246 +SHA512 (virt-v2v-1.45.93.tar.gz.sig) = e2f6e203940490409bc234113e4b2d7cfd2be4ada08897fbd59eba52411f06bb30c4a7fba9b1ecf1c1ef9b3d5bed2f889703758e99820b2e3d4787835bc45958 diff --git a/virt-v2v.spec b/virt-v2v.spec index 1effaa1..818e841 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.92 +Version: 1.45.93 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -298,6 +298,9 @@ popd %changelog +* Fri Dec 03 2021 Richard W.M. Jones - 1:1.45.93-1 +- New upstream development version 1.45.93 (preview of 2.0) + * Thu Dec 02 2021 Richard W.M. Jones - 1:1.45.92-1 - New upstream development version 1.45.92 (preview of 2.0) From b06ee3b61c34ae0f33391c43aee1c757f82aad64 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Dec 2021 09:54:46 +0000 Subject: [PATCH 089/235] New upstream development version 1.45.94 (preview of 2.0) Requires nbdkit >= 1.28.3 / 1.29.9 Containing this fix: https://gitlab.com/nbdkit/nbdkit/-/commit/c6fe9cb5b4a45e026f6c45ff3f92a510731d87b9 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index fa0fd0a..589d3a0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.93.tar.gz) = d70ef9bdebf0c3579274ddbcce96681600eb263576c605fdf6f17cc6ae76bed6452a4c978e91ff662f7c2f4c6dc28fe760a49e545adce14ce5743c492bea8246 -SHA512 (virt-v2v-1.45.93.tar.gz.sig) = e2f6e203940490409bc234113e4b2d7cfd2be4ada08897fbd59eba52411f06bb30c4a7fba9b1ecf1c1ef9b3d5bed2f889703758e99820b2e3d4787835bc45958 +SHA512 (virt-v2v-1.45.94.tar.gz) = d3a7644f08decf50074632df727605c9adcf7fa0eada39c5def99f6f682353a40355e48fe5e2207b976fa3bfa42127a226317f7502f32dc7cc0666efcabb44ce +SHA512 (virt-v2v-1.45.94.tar.gz.sig) = 61d4ba66ceea91312ca1b730179d6ce2a565f2bfab17c7ebd54f5f54f3ac176b922987f217fbb02b6906004ebefb22fb8e66e4c88da579352d643ddbbe175249 diff --git a/virt-v2v.spec b/virt-v2v.spec index 818e841..74eb119 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.93 +Version: 1.45.94 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -132,7 +132,7 @@ Requires: libnbd >= 1.8.2-2.el9 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy Requires: %{_bindir}/nbdinfo -Requires: nbdkit-server >= 1.26.5-1.el9 +Requires: nbdkit-server >= 1.28.3-1.el9 Requires: nbdkit-curl-plugin Requires: nbdkit-file-plugin Requires: nbdkit-nbd-plugin @@ -298,6 +298,9 @@ popd %changelog +* Tue Dec 07 2021 Richard W.M. Jones - 1:1.45.94-1 +- New upstream development version 1.45.94 (preview of 2.0) + * Fri Dec 03 2021 Richard W.M. Jones - 1:1.45.93-1 - New upstream development version 1.45.93 (preview of 2.0) From 41daf44a4db6f3ff2079336fb3c22102121f9874 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Dec 2021 11:39:33 +0000 Subject: [PATCH 090/235] Add dependency on nbdkit-multi-conn-filter And update version of nbdkit-cow-filter required. --- virt-v2v.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 74eb119..c7013f0 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -143,7 +143,8 @@ Requires: nbdkit-ssh-plugin Requires: nbdkit-vddk-plugin %endif Requires: nbdkit-cacheextents-filter -Requires: nbdkit-cow-filter >= 1.26.5-1.el9 +Requires: nbdkit-cow-filter >= 1.28.3-1.el9 +Requires: nbdkit-multi-conn-filter Requires: nbdkit-rate-filter Requires: nbdkit-readahead-filter Requires: nbdkit-retry-filter From 8d832087f290c1833191dd1487dbd641b0c85360 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 18 Dec 2021 11:11:39 +0000 Subject: [PATCH 091/235] New upstream development version 1.45.95 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 589d3a0..f3c4a1b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.94.tar.gz) = d3a7644f08decf50074632df727605c9adcf7fa0eada39c5def99f6f682353a40355e48fe5e2207b976fa3bfa42127a226317f7502f32dc7cc0666efcabb44ce -SHA512 (virt-v2v-1.45.94.tar.gz.sig) = 61d4ba66ceea91312ca1b730179d6ce2a565f2bfab17c7ebd54f5f54f3ac176b922987f217fbb02b6906004ebefb22fb8e66e4c88da579352d643ddbbe175249 +SHA512 (virt-v2v-1.45.95.tar.gz) = 2d408d98d8a67f0aed264cb15fb69d9e5ab4f9b31577ae58a0da7d180f705efb81997308fade3018d16b816a3e3e789927c1a1f03ddc9c02883c37ca0f70e3db +SHA512 (virt-v2v-1.45.95.tar.gz.sig) = cfa919ae26f9497f113c85fa320797eca6977cabc91048cbeacc97e596439fdc93fa9feba2fb3ed1164c7e221dc993344faa4ce07214ee2a697dbd0dc06daf77 diff --git a/virt-v2v.spec b/virt-v2v.spec index c7013f0..e4658cc 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.94 +Version: 1.45.95 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -299,6 +299,9 @@ popd %changelog +* Sat Dec 18 2021 Richard W.M. Jones - 1:1.45.95-1 +- New upstream development version 1.45.95 (preview of 2.0) + * Tue Dec 07 2021 Richard W.M. Jones - 1:1.45.94-1 - New upstream development version 1.45.94 (preview of 2.0) From 66047589bf8ecd358e291f82118bfcdf6a63594c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 6 Jan 2022 14:30:59 +0000 Subject: [PATCH 092/235] New upstream development version 1.45.96 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f3c4a1b..d40f0e3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.95.tar.gz) = 2d408d98d8a67f0aed264cb15fb69d9e5ab4f9b31577ae58a0da7d180f705efb81997308fade3018d16b816a3e3e789927c1a1f03ddc9c02883c37ca0f70e3db -SHA512 (virt-v2v-1.45.95.tar.gz.sig) = cfa919ae26f9497f113c85fa320797eca6977cabc91048cbeacc97e596439fdc93fa9feba2fb3ed1164c7e221dc993344faa4ce07214ee2a697dbd0dc06daf77 +SHA512 (virt-v2v-1.45.96.tar.gz) = f4349ce19761db32905395a1ce4bb893eb68823808386edce656bcd452aac1c82d39a6af6e17f226c04e027199cb71b27c42a52bfc4b9153cb31e4c5c1988b49 +SHA512 (virt-v2v-1.45.96.tar.gz.sig) = b0bd15eef79267ca93c0af96e5af041fd006dc9e50e25a3afb6a08257bc5ac997690dd5daf993c9fa14428fff2a4e5cca5934adeafc537a47d17c833d004ab1b diff --git a/virt-v2v.spec b/virt-v2v.spec index e4658cc..c250864 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.95 +Version: 1.45.96 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -299,6 +299,9 @@ popd %changelog +* Thu Jan 06 2022 Richard W.M. Jones - 1:1.45.96-1 +- New upstream development version 1.45.96 (preview of 2.0) + * Sat Dec 18 2021 Richard W.M. Jones - 1:1.45.95-1 - New upstream development version 1.45.95 (preview of 2.0) From 287af44206039e411b7d6e37ee09a1203203411f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 17 Jan 2022 16:58:20 +0000 Subject: [PATCH 093/235] New upstream development version 1.45.97 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index d40f0e3..01f38c5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.96.tar.gz) = f4349ce19761db32905395a1ce4bb893eb68823808386edce656bcd452aac1c82d39a6af6e17f226c04e027199cb71b27c42a52bfc4b9153cb31e4c5c1988b49 -SHA512 (virt-v2v-1.45.96.tar.gz.sig) = b0bd15eef79267ca93c0af96e5af041fd006dc9e50e25a3afb6a08257bc5ac997690dd5daf993c9fa14428fff2a4e5cca5934adeafc537a47d17c833d004ab1b +SHA512 (virt-v2v-1.45.97.tar.gz) = 9f3725099237e705142fe9563f73d34362771f2cb82af7fd976462f25a9301ec97cbecb5cd70a22903f6df16ab45354619a19e5369e29c86a58f19151664356a +SHA512 (virt-v2v-1.45.97.tar.gz.sig) = 6bc57719d5acbe8ccc895280bf3f585b31a1d87cc927d98f1f7a8a169634a69ca0787265d10e55616c0bcb430f63e8c39a41e65b439bc0ff2e90439c2f003ccd diff --git a/virt-v2v.spec b/virt-v2v.spec index c250864..a48721f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,7 +14,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.96 +Version: 1.45.97 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -299,6 +299,9 @@ popd %changelog +* Mon Jan 17 2022 Richard W.M. Jones - 1:1.45.97-1 +- New upstream development version 1.45.97 (preview of 2.0) + * Thu Jan 06 2022 Richard W.M. Jones - 1:1.45.96-1 - New upstream development version 1.45.96 (preview of 2.0) From 1ef832f0538f7b01ba38019813a6b2489219e161 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:04:27 +0000 Subject: [PATCH 094/235] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index a48721f..720e43a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.45.97 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -299,6 +299,9 @@ popd %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 1:1.45.97-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Jan 17 2022 Richard W.M. Jones - 1:1.45.97-1 - New upstream development version 1.45.97 (preview of 2.0) From d1a170c6cef6d6921eb3ae5afaa1cb8e7f88cca9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 4 Feb 2022 17:16:36 +0000 Subject: [PATCH 095/235] OCaml 4.13.1 rebuild to remove package notes --- virt-v2v.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 720e43a..d567867 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,3 +1,4 @@ +%undefine _package_note_flags # If we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 @@ -15,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 1.45.97 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -299,6 +300,9 @@ popd %changelog +* Fri Feb 04 2022 Richard W.M. Jones - 1:1.45.97-3 +- OCaml 4.13.1 rebuild to remove package notes + * Sat Jan 22 2022 Fedora Release Engineering - 1:1.45.97-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 71c77c8ee46b7bb04000f7c93c22a321c09017d1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 10 Feb 2022 19:44:59 +0000 Subject: [PATCH 096/235] New upstream development version 1.45.98 (preview of 2.0) --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 01f38c5..8f6e432 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.97.tar.gz) = 9f3725099237e705142fe9563f73d34362771f2cb82af7fd976462f25a9301ec97cbecb5cd70a22903f6df16ab45354619a19e5369e29c86a58f19151664356a -SHA512 (virt-v2v-1.45.97.tar.gz.sig) = 6bc57719d5acbe8ccc895280bf3f585b31a1d87cc927d98f1f7a8a169634a69ca0787265d10e55616c0bcb430f63e8c39a41e65b439bc0ff2e90439c2f003ccd +SHA512 (virt-v2v-1.45.98.tar.gz) = a709ae109675064b0b96f8fa7e9d2ef37d9f557f1aa9d8f9152bb15a814e5539af4d5569b44a10229dbf7e62ff4d6f6361f71393ac6a614e3d737548ee131746 +SHA512 (virt-v2v-1.45.98.tar.gz.sig) = 1e98fb61bcdfcf2f8b9a3ab3b39d2b2dee73cdd40a43aefb97fe4671afa121373f7d8ba111e6a39a001e50901508341fed76ed0bd313df3991c81f1ead2868f2 diff --git a/virt-v2v.spec b/virt-v2v.spec index d567867..f10dbb2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.97 -Release: 3%{?dist} +Version: 1.45.98 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -300,6 +300,9 @@ popd %changelog +* Thu Feb 10 2022 Richard W.M. Jones - 1:1.45.98-1 +- New upstream development version 1.45.98 (preview of 2.0) + * Fri Feb 04 2022 Richard W.M. Jones - 1:1.45.97-3 - OCaml 4.13.1 rebuild to remove package notes From f7fec29fc3c2a916e331ee820b38c0172d92d333 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 15 Feb 2022 18:35:09 +0000 Subject: [PATCH 097/235] New upstream development version 1.45.99 (preview of 2.0) Requires nbdkit-blocksize-filter. --- sources | 4 ++-- virt-v2v.spec | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8f6e432..1572551 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.98.tar.gz) = a709ae109675064b0b96f8fa7e9d2ef37d9f557f1aa9d8f9152bb15a814e5539af4d5569b44a10229dbf7e62ff4d6f6361f71393ac6a614e3d737548ee131746 -SHA512 (virt-v2v-1.45.98.tar.gz.sig) = 1e98fb61bcdfcf2f8b9a3ab3b39d2b2dee73cdd40a43aefb97fe4671afa121373f7d8ba111e6a39a001e50901508341fed76ed0bd313df3991c81f1ead2868f2 +SHA512 (virt-v2v-1.45.99.tar.gz) = 46fd087e584fee94a95f229ef860220201f75b85cf4cb4137349cc64e447094d5c1db192121095779f99a997336aa547ba7d2aed2d1778e381cd003a8ab83327 +SHA512 (virt-v2v-1.45.99.tar.gz.sig) = d34ca220bc2161357ddf32ccb46117fdbcb98347384e284027a02e67c2ebe9851b1e5deb3e59607d84916bb689dd5e053462d862aff3a813021493fd33f1f1b9 diff --git a/virt-v2v.spec b/virt-v2v.spec index f10dbb2..3c31b0c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 1.45.98 +Version: 1.45.99 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -143,6 +143,7 @@ Requires: nbdkit-ssh-plugin %ifarch x86_64 Requires: nbdkit-vddk-plugin %endif +Requires: nbdkit-blocksize-filter Requires: nbdkit-cacheextents-filter Requires: nbdkit-cow-filter >= 1.28.3-1.el9 Requires: nbdkit-multi-conn-filter @@ -300,6 +301,10 @@ popd %changelog +* Tue Feb 15 2022 Richard W.M. Jones - 1:1.45.99-1 +- New upstream development version 1.45.99 (preview of 2.0) +- Requires nbdkit-blocksize-filter. + * Thu Feb 10 2022 Richard W.M. Jones - 1:1.45.98-1 - New upstream development version 1.45.98 (preview of 2.0) From 1dc352f4e465c85fad41989cfab633f05fc62fac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 9 Mar 2022 11:50:49 +0000 Subject: [PATCH 098/235] Add symlink to pnp_wait.exe from the virt tools directory For background on this change see: https://bugzilla.redhat.com/show_bug.cgi?id=1788823 --- virt-v2v.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 3c31b0c..085f95b 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -230,11 +230,13 @@ make V=1 %{?_smp_mflags} # Delete libtool crap. find $RPM_BUILD_ROOT -name '*.la' -delete -# Virt-tools data directory. This contains a symlink to rhsrvany.exe -# which is satisfied by the dependency on mingw32-srvany. +# Virt-tools data directory. This contains symlinks to rhsrvany.exe +# and pnp_wait.exe which are satisfied by the dependency on +# mingw32-srvany. mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe +ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/pnp_wait.exe popd # Find locale files. From ba3ddbc0653d30c6d49b431b42e7b5a33e4f5e3a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 Mar 2022 14:19:38 +0000 Subject: [PATCH 099/235] New upstream stable branch version 2.0.0 New virt-v2v-in-place and release notes man pages. Remove the RHEL (downstream) patches which are out of date. --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 33 ---- ...-the-qemu-boot-oo-qemu-boot-option-R.patch | 112 ----------- ...-supported-sound-cards-to-match-RHEL.patch | 34 ---- ...RHEL-Fixes-for-libguestfs-winsupport.patch | 104 ----------- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 26 --- ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 26 --- ...-for-supported-v2v-hypervisors-guest.patch | 127 ------------- 0008-RHEL-9-Disable-o-glance.patch | 176 ------------------ sources | 4 +- virt-v2v.spec | 23 +-- 10 files changed, 11 insertions(+), 654 deletions(-) delete mode 100644 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch delete mode 100644 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch delete mode 100644 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch delete mode 100644 0004-RHEL-Fixes-for-libguestfs-winsupport.patch delete mode 100644 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch delete mode 100644 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch delete mode 100644 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch delete mode 100644 0008-RHEL-9-Disable-o-glance.patch diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch deleted file mode 100644 index dffafb4..0000000 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f417ca536219b151284a5a0e28698bfa19a5c160 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sun, 28 Sep 2014 19:14:43 +0100 -Subject: [PATCH 1/8] RHEL: v2v: Select correct qemu binary for -o qemu mode - (RHBZ#1147313). - -RHEL does not have qemu-system-x86_64 (etc), and in addition the -qemu binary is located in /usr/libexec. Encode the path to this -binary directly in the script. - -Note that we don't support people running qemu directly like this. -It's just for quick testing of converted VMs, and to help us with -support cases. ---- - output/output.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/output/output.ml b/output/output.ml -index 9c2d8853..92b03525 100644 ---- a/output/output.ml -+++ b/output/output.ml -@@ -1413,7 +1413,7 @@ and qemu_finalize dir source inspect target_meta - * module deals with shell and qemu comma quoting. - *) - let cmd = Qemuopts.create () in -- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch); -+ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm"; - - let flag = Qemuopts.flag cmd - and arg = Qemuopts.arg cmd --- -2.31.1 - diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch deleted file mode 100644 index 15f4600..0000000 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 00490feb06496ad4bf22dbc5493a7cf186476e9f Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 30 Sep 2014 10:50:27 +0100 -Subject: [PATCH 2/8] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option - (RHBZ#1147313). - -This cannot work because there is no Gtk or SDL output mode -in RHEL's qemu-kvm. - -In addition you will have to edit the -display option in the -qemu script. ---- - docs/virt-v2v-output-local.pod | 6 ++---- - docs/virt-v2v.pod | 12 ------------ - output/output.ml | 3 +++ - v2v/v2v.ml | 2 -- - 4 files changed, 5 insertions(+), 18 deletions(-) - -diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod -index a5f155cb..3a2e6238 100644 ---- a/docs/virt-v2v-output-local.pod -+++ b/docs/virt-v2v-output-local.pod -@@ -9,7 +9,7 @@ or libvirt - - virt-v2v [-i* options] -o local -os DIRECTORY - -- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot] -+ virt-v2v [-i* options] -o qemu -os DIRECTORY - - virt-v2v [-i* options] -o json -os DIRECTORY - [-oo json-disks-pattern=PATTERN] -@@ -50,12 +50,10 @@ where C is the guest name. - - =item B<-o qemu -os> C - --=item B<-o qemu -os> C B<--qemu-boot> -- - This converts the guest to files in C. Unlike I<-o local> - above, a shell script is created which contains the raw qemu command - you would need to boot the guest. However the shell script is not --run, I you also add the I<--qemu-boot> option. -+run. - - =item B<-o json -os> C - -diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index b25d678d..0a47b611 100644 ---- a/docs/virt-v2v.pod -+++ b/docs/virt-v2v.pod -@@ -141,11 +141,6 @@ Since F contains the path(s) to the guest disk - image(s) you do not need to specify the name of the disk image on the - command line. - --To convert a local disk image and immediately boot it in local --qemu, do: -- -- virt-v2v -i disk disk.img -o qemu -os /var/tmp -oo qemu-boot -- - =head1 OPTIONS - - =over 4 -@@ -511,9 +506,6 @@ This is similar to I<-o local>, except that a shell script is written - which you can use to boot the guest in qemu. The converted disks and - shell script are written to the directory specified by I<-os>. - --When using this output mode, you can also specify the I<-oo qemu-boot> --option which boots the guest under qemu immediately. -- - =item B<-o> B - - This is the same as I<-o rhv>. -@@ -769,10 +761,6 @@ Print information about the source guest and stop. This option is - useful when you are setting up network and bridge maps. - See L. - --=item B<--qemu-boot> -- --This is the same as I<-oo qemu-boot>. -- - =item B<-q> - - =item B<--quiet> -diff --git a/output/output.ml b/output/output.ml -index 92b03525..1414a521 100644 ---- a/output/output.ml -+++ b/output/output.ml -@@ -1346,6 +1346,9 @@ and qemu_parse_options cmdline = - ) cmdline.output_options; - let qemu_boot = !qemu_boot in - -+ if qemu_boot then -+ error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL"); -+ - (* -os must be set to a directory. *) - let output_storage = - match cmdline.output_storage with -diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index a88e0509..1104295c 100644 ---- a/v2v/v2v.ml -+++ b/v2v/v2v.ml -@@ -218,8 +218,6 @@ let rec main () = - s_"Same as ‘-ip filename’"; - [ L"print-source" ], Getopt.Set print_source, - s_"Print source and stop"; -- [ L"qemu-boot" ], Getopt.Unit (fun () -> add_o_option "-oo" "qemu-boot"), -- s_"Boot in qemu (-o qemu only)"; - [ L"root" ], Getopt.String ("ask|... ", add_conv_option "--root"), - s_"How to choose root filesystem"; - [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), --- -2.31.1 - diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch deleted file mode 100644 index 39d35f8..0000000 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 539e158e5dffdb0324a89b2a059b44ae51d2cc29 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 24 Apr 2015 09:45:41 -0400 -Subject: [PATCH 3/8] RHEL: Fix list of supported sound cards to match RHEL - qemu (RHBZ#1176493). - ---- - lib/utils.ml | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/utils.ml b/lib/utils.ml -index 1eac3f3f..a478fc33 100644 ---- a/lib/utils.ml -+++ b/lib/utils.ml -@@ -59,13 +59,14 @@ let kvm_arch = function - (* Does qemu support the given sound card? *) - let qemu_supports_sound_card = function - | Types.AC97 -- | Types.ES1370 - | Types.ICH6 - | Types.ICH9 - | Types.PCSpeaker -+ -> true -+ | Types.ES1370 - | Types.SB16 - | Types.USBAudio -- -> true -+ -> false - - (* Find the UEFI firmware. *) - let find_uefi_firmware guest_arch = --- -2.31.1 - diff --git a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch deleted file mode 100644 index 45a5349..0000000 --- a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch +++ /dev/null @@ -1,104 +0,0 @@ -From b4bab3eda2afabadcbf2e07501eab2049d1a3133 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sun, 30 Aug 2015 03:21:57 -0400 -Subject: [PATCH 4/8] RHEL: Fixes for libguestfs-winsupport. - -In tests we cannot use guestfish for arbitrary Windows edits. -In virt-v2v helpers we must set the program name to virt-v2v. ---- - convert/convert.ml | 1 + - convert/windows_virtio.ml | 1 + - test-data/phony-guests/make-windows-img.sh | 1 + - tests/test-v2v-virtio-win-iso.sh | 8 +++++++- - tests/test-v2v-windows-conversion.sh | 8 +++++++- - 5 files changed, 17 insertions(+), 2 deletions(-) - -diff --git a/convert/convert.ml b/convert/convert.ml -index 07c7aee9..a4b0c60e 100644 ---- a/convert/convert.ml -+++ b/convert/convert.ml -@@ -190,6 +190,7 @@ helper-v2v-convert V2VDIR - - message (f_"Opening the source"); - let g = open_guestfs ~identifier:"v2v" () in -+ g#set_program "virt-v2v"; - g#set_memsize (g#get_memsize () * 2); - (* Setting the number of vCPUs allows parallel mkinitrd, but make - * sure this is not too large because each vCPU consumes guest RAM. -diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml -index f843dae2..6623d03d 100644 ---- a/convert/windows_virtio.ml -+++ b/convert/windows_virtio.ml -@@ -356,6 +356,7 @@ and copy_from_virtio_win g inspect srcdir destdir filter missing = - let g2 = - try - let g2 = open_guestfs ~identifier:"virtio_win" () in -+ g#set_program "virt-v2v"; - g2#add_drive_opts virtio_win ~readonly:true; - g2#launch (); - g2 -diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh -index 30908a91..73cf5144 100755 ---- a/test-data/phony-guests/make-windows-img.sh -+++ b/test-data/phony-guests/make-windows-img.sh -@@ -37,6 +37,7 @@ fi - - # Create a disk image. - guestfish < "$script" - :> "$expected" - -+cat >> "$script" < "$response" -+guestfish --ro -a "$d/windows-sda" < "$script" > "$response" - diff -u "$expected" "$response" -diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh -index aeab9a48..4b422c5b 100755 ---- a/tests/test-v2v-windows-conversion.sh -+++ b/tests/test-v2v-windows-conversion.sh -@@ -76,6 +76,12 @@ mktest () - :> "$script" - :> "$expected" - -+cat >> "$script" < "$response" -+guestfish --ro -a "$d/windows-sda" < "$script" > "$response" - diff -u "$expected" "$response" - - # We also update the Registry several times, for firstboot, and (ONLY --- -2.31.1 - diff --git a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch deleted file mode 100644 index 6374372..0000000 --- a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4022a90a8974147000fb5053d7596066db1b82b9 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 2 Mar 2017 14:21:37 +0100 -Subject: [PATCH 5/8] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) - -The SDL output mode is not supported in RHEL's qemu-kvm. ---- - input/input.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/input/input.ml b/input/input.ml -index a8416eaf..9175a531 100644 ---- a/input/input.ml -+++ b/input/input.ml -@@ -270,7 +270,7 @@ and disk_source cmdline args = - s_features = [ "acpi"; "apic"; "pae" ]; - s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) - s_display = -- Some { s_display_type = Window; s_keymap = None; s_password = None; -+ Some { s_display_type = VNC; s_keymap = None; s_password = None; - s_listen = LNoListen; s_port = None }; - s_video = None; - s_sound = None; --- -2.31.1 - diff --git a/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch deleted file mode 100644 index 7c54981..0000000 --- a/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 7f77cb4a56eb8dcd26db9e81e0fb2f41777129c3 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Wed, 8 Mar 2017 11:03:40 +0100 -Subject: [PATCH 6/8] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) - -They are not supported in RHEL. ---- - docs/virt-v2v-input-xen.pod | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod -index cd3210bf..e9f336a9 100644 ---- a/docs/virt-v2v-input-xen.pod -+++ b/docs/virt-v2v-input-xen.pod -@@ -12,7 +12,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen - =head1 DESCRIPTION - - This page documents how to use L to convert guests from --RHEL 5 Xen, or SLES and OpenSUSE Xen hosts. -+RHEL 5 Xen hosts. - - =head1 INPUT FROM XEN - --- -2.31.1 - diff --git a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch deleted file mode 100644 index 712c684..0000000 --- a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ /dev/null @@ -1,127 +0,0 @@ -From a4db166d7a5c480c765ee74340463db800533c73 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Tue, 26 Mar 2019 09:42:25 +0100 -Subject: [PATCH 7/8] RHEL: point to KB for supported v2v hypervisors/guests - ---- - docs/virt-v2v-support.pod | 104 ++------------------------------------ - 1 file changed, 4 insertions(+), 100 deletions(-) - -diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod -index 9815f51f..1ffc0f9d 100644 ---- a/docs/virt-v2v-support.pod -+++ b/docs/virt-v2v-support.pod -@@ -8,106 +8,10 @@ systems and guests in virt-v2v - This page documents which foreign hypervisors, virtualization - management systems and guest types that L can support. - --Note this page applies to upstream virt-v2v from --L and in downstream distributions of virt-v2v --sometimes features are intentionally removed, or are present but not --supported. -- --=head2 Hypervisors (Input) -- --=over 4 -- --=item VMware ESXi -- --Must be managed by VMware vCenter E 5.0 unless VDDK is available. -- --=item OVA exported from VMware -- --OVAs from other hypervisors will not work. -- --=item VMX from VMware -- --VMX files generated by other hypervisors will not work. -- --=item RHEL 5 Xen -- --=item SUSE Xen -- --=item Citrix Xen -- --Citrix Xen has not been recently tested. -- --=item Hyper-V -- --Not recently tested. Requires that you export the disk or use --L on Hyper-V. -- --=item Direct from disk images -- --Only disk images exported from supported hypervisors, and using --container formats supported by qemu. -- --=item Physical machines -- --Using the L tool. -- --=back -- --=head2 Hypervisors (Output) -- --QEMU and KVM only. -- --=head2 Virtualization management systems (Output) -- --=over 4 -- --=item OpenStack -- --=item Red Hat Virtualization (RHV) 4.1 and up -- --=item Local libvirt -- --And hence L, L, and similar tools. -- --=item Local disk -- --=back -- --=head2 Guests -- --=over 4 -- --=item Red Hat Enterprise Linux 3, 4, 5, 6, 7 -- --=item CentOS 3, 4, 5, 6, 7 -- --=item Scientific Linux 3, 4, 5, 6, 7 -- --=item Oracle Linux -- --=item Fedora -- --=item SLES 10 and up -- --=item OpenSUSE 10 and up -- --=item ALT Linux 9 and up -- --=item Debian 6 and up -- --=item Ubuntu 10.04, 12.04, 14.04, 16.04, and up -- --=item Windows XP to Windows 10 / Windows Server 2016 -- --We use Windows internal version numbers, see --L -- --Currently NT 5.2 to NT 6.3 are supported. -- --See L below for additional notes on converting Windows --guests. -- --=back -+For more information on supported hypervisors, and guest types in -+RHEL, please consult the following Knowledgebase article on these -+Red Hat Customer Portal: -+L. - - =head2 Guest firmware - --- -2.31.1 - diff --git a/0008-RHEL-9-Disable-o-glance.patch b/0008-RHEL-9-Disable-o-glance.patch deleted file mode 100644 index 8776133..0000000 --- a/0008-RHEL-9-Disable-o-glance.patch +++ /dev/null @@ -1,176 +0,0 @@ -From f801f4a34f9b136e2cb5af3b936948f1ecb88154 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 30 Jun 2021 11:15:52 +0100 -Subject: [PATCH 8/8] RHEL 9: Disable -o glance - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 ---- - docs/virt-v2v-output-openstack.pod | 56 ++---------------------------- - docs/virt-v2v.pod | 20 ----------- - output/output.ml | 3 +- - tests/test-v2v-o-glance.sh | 3 ++ - 4 files changed, 7 insertions(+), 75 deletions(-) - -diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod -index f5a3abad..1ab356e8 100644 ---- a/docs/virt-v2v-output-openstack.pod -+++ b/docs/virt-v2v-output-openstack.pod -@@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack - [-oo verify-server-certificate=false] - [-oo os-username=admin] [-oo os-*=*] - -- virt-v2v [-i* options] -o glance -- - =head1 DESCRIPTION - - This page documents how to use L to convert guests to run --on OpenStack. There are two output modes you can select, but only --I<-o openstack> should be used normally. -+on OpenStack. - - =over 4 - -@@ -27,15 +24,6 @@ Full description: L - This is the modern method for uploading to OpenStack via the REST API. - Guests can be directly converted into Cinder volumes. - --=item B<-o glance> -- --Full description: L -- --This is the old method for uploading to Glance. Unfortunately Glance --is not well suited to storing converted guests (since virt-v2v deals --with "pets" not templated "cattle"), so this method is not recommended --unless you really know what you are doing. -- - =back - - =head1 OUTPUT TO OPENSTACK -@@ -170,50 +158,10 @@ no Cinder volume type is used. - The following options are B supported with OpenStack: I<-oa>, - I<-of>. - --=head1 OUTPUT TO GLANCE -- --Note this is a legacy option. In most cases you should use --L instead. -- --To output to OpenStack Glance, use the I<-o glance> option. -- --This runs the L CLI program which must be installed on the --virt-v2v conversion host. For authentication to work, you will need --to set C environment variables. -- --Normally there is a file called C or C --which you can simply C to set everything up. -- --Virt-v2v adds metadata for the guest to Glance, describing such things --as the guest operating system and what drivers it requires. The --command C will display the metadata as "Property" --fields such as C and C. -- --=head2 Glance and sparseness -- --Glance image upload doesn't appear to correctly handle sparseness. --For this reason, using qcow2 will be faster and use less space on the --Glance server. Use the virt-v2v S> option. -- --=head2 Glance and multiple disks -- --If the guest has a single disk, then the name of the disk in Glance --will be the name of the guest. You can control this using the I<-on> --option. -- --Glance doesn't have a concept of associating multiple disks with a --single guest, and Nova doesn't allow you to boot a guest from multiple --Glance disks either. If the guest has multiple disks, then the first --(assumed to be the system disk) will have the name of the guest, and --the second and subsequent data disks will be called --C-disk2>, C-disk3> etc. It may be best to --leave the system disk in Glance, and import the data disks to Cinder. -- - =head1 SEE ALSO - - L, --L, --L. -+L. - - =head1 AUTHOR - -diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 0a47b611..c70bfef5 100644 ---- a/docs/virt-v2v.pod -+++ b/docs/virt-v2v.pod -@@ -432,14 +432,6 @@ See L below. - - This is the same as I<-o local>. - --=item B<-o> B -- --This is a legacy option. You should probably use I<-o openstack> --instead. -- --Set the output method to OpenStack Glance. In this mode the converted --guest is uploaded to Glance. See L. -- - =item B<-o> B - - Set the output method to I. -@@ -1163,11 +1155,6 @@ and output methods may use disk space, as outlined in the table below. - This temporarily places a full copy of the uncompressed source disks - in C<$VIRT_V2V_TMPDIR> (or F). - --=item I<-o glance> -- --This temporarily places a full copy of the output disks in --C<$VIRT_V2V_TMPDIR> (or F). -- - =item I<-o local> - - =item I<-o qemu> -@@ -1352,13 +1339,6 @@ instance. - Because of how Cinder volumes are presented as F block devices, - using I<-o openstack> normally requires that virt-v2v is run as root. - --=item Writing to Glance -- --This does I need root (in fact it probably won’t work), but may --require either a special user and/or for you to source a script that --sets authentication environment variables. Consult the Glance --documentation. -- - =item Writing to block devices - - This normally requires root. See the next section. -diff --git a/output/output.ml b/output/output.ml -index 1414a521..69768ff1 100644 ---- a/output/output.ml -+++ b/output/output.ml -@@ -75,7 +75,8 @@ let rec main () = - error (f_"%s option used more than once on the command line") "-om"; - match mode with - | "disk" -> output_mode := Some `Disk -- | "glance" -> output_mode := Some `Glance -+ | "glance" -> -+ error(f_"-o glance option has been removed from RHEL 9") - | "json" -> output_mode := Some `Json - | "libvirt" -> output_mode := Some `Libvirt - | "null" -> output_mode := Some `Null -diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh -index c0db9115..074b5e16 100755 ---- a/tests/test-v2v-o-glance.sh -+++ b/tests/test-v2v-o-glance.sh -@@ -20,6 +20,9 @@ - - set -e - -+# Feature is disabled in RHEL 9. -+exit 77 -+ - source ./functions.sh - set -e - set -x --- -2.31.1 - diff --git a/sources b/sources index 1572551..4f88c4c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-1.45.99.tar.gz) = 46fd087e584fee94a95f229ef860220201f75b85cf4cb4137349cc64e447094d5c1db192121095779f99a997336aa547ba7d2aed2d1778e381cd003a8ab83327 -SHA512 (virt-v2v-1.45.99.tar.gz.sig) = d34ca220bc2161357ddf32ccb46117fdbcb98347384e284027a02e67c2ebe9851b1e5deb3e59607d84916bb689dd5e053462d862aff3a813021493fd33f1f1b9 +SHA512 (virt-v2v-2.0.0.tar.gz) = 0ccf9e9141a0166f969383f9e103ffa11fa2ce00a5fbf4ada6c4480b888886a5a149b33d905f0f1947edaec14d16dd89a15ef53dd0cc042b29d473235430f5de +SHA512 (virt-v2v-2.0.0.tar.gz.sig) = e1c7e308043951c2aab59d288daa8cfd0da4794f566811b2bab6e138ea511f337e10ab2118973f08df1b29406e1bf12d09591805dd21621a6350b628715a9b99 diff --git a/virt-v2v.spec b/virt-v2v.spec index 085f95b..d90cceb 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -11,11 +11,11 @@ %endif # The source directory. -%global source_directory 1.45-development +%global source_directory 2.0-stable Name: virt-v2v Epoch: 1 -Version: 1.45.99 +Version: 2.0.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -49,18 +49,6 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif -# Downstream (RHEL-only) patches. -%if 0%{?rhel} -Patch9001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch9002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch -Patch9003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch9004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch -Patch9005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch9006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch -Patch9007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch9008: 0008-RHEL-9-Disable-o-glance.patch -%endif - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -279,10 +267,12 @@ popd %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* %{_mandir}/man1/virt-v2v-input-xen.1* +%{_mandir}/man1/virt-v2v-in-place.1* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %{_mandir}/man1/virt-v2v-output-rhv.1* %{_mandir}/man1/virt-v2v-release-notes-1.42.1* +%{_mandir}/man1/virt-v2v-release-notes-2.0.1* %{_mandir}/man1/virt-v2v-support.1* %{_datadir}/virt-tools @@ -303,6 +293,11 @@ popd %changelog +* Mon Mar 14 2022 Richard W.M. Jones - 1:2.0.0-1 +- New upstream stable branch version 2.0.0 +- New virt-v2v-in-place and release notes man pages. +- Remove the RHEL (downstream) patches which are out of date. + * Tue Feb 15 2022 Richard W.M. Jones - 1:1.45.99-1 - New upstream development version 1.45.99 (preview of 2.0) - Requires nbdkit-blocksize-filter. From b30f630728e0974ef274ff86c398dac29070538b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 Mar 2022 14:58:55 +0000 Subject: [PATCH 100/235] Add virt-v2v-in-place binary Also don't use absolute symlinks because of this error: RPM build errors: absolute symlink: /usr/share/virt-tools/pnp_wait.exe -> /usr/i686-w64-mingw32/sys-root/mingw/bin/pnp_wait.exe absolute symlink: /usr/share/virt-tools/rhsrvany.exe -> /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe --- virt-v2v.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index d90cceb..f11a8f1 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -223,10 +223,16 @@ find $RPM_BUILD_ROOT -name '*.la' -delete # mingw32-srvany. mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools -ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe -ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/pnp_wait.exe +ln -sf ../../i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe +ln -sf ../../i686-w64-mingw32/sys-root/mingw/bin/pnp_wait.exe popd +%if 0%{?rhel} +# On RHEL remove virt-v2v-in-place. +rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place +rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* +%endif + # Find locale files. %find_lang %{name} @@ -263,11 +269,16 @@ popd %license COPYING %doc README %{_bindir}/virt-v2v +%if !0%{?rhel} +%{_bindir}/virt-v2v-in-place +%endif %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* %{_mandir}/man1/virt-v2v-input-xen.1* +%if !0%{?rhel} %{_mandir}/man1/virt-v2v-in-place.1* +%endif %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %{_mandir}/man1/virt-v2v-output-rhv.1* @@ -297,6 +308,7 @@ popd - New upstream stable branch version 2.0.0 - New virt-v2v-in-place and release notes man pages. - Remove the RHEL (downstream) patches which are out of date. +- Don't use absolute symlinks. * Tue Feb 15 2022 Richard W.M. Jones - 1:1.45.99-1 - New upstream development version 1.45.99 (preview of 2.0) From 715f90f312fb1b97a9ac1c5b6ec841c438759a5c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 Mar 2022 15:39:30 +0000 Subject: [PATCH 101/235] Update dependencies to match release notes https://libguestfs.org/virt-v2v-release-notes-2.0.1.html#build-changes --- virt-v2v.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index f11a8f1..57f87c2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -56,9 +56,9 @@ BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gcc -BuildRequires: ocaml >= 4.01 +BuildRequires: ocaml >= 4.04 -BuildRequires: libguestfs-devel >= 1:1.42 +BuildRequires: libguestfs-devel >= 1:1.44 BuildRequires: augeas-devel BuildRequires: bash-completion BuildRequires: file-devel @@ -69,7 +69,7 @@ BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm BuildRequires: libvirt-devel BuildRequires: libxml2-devel -BuildRequires: pcre-devel +BuildRequires: pcre2-devel BuildRequires: perl(Sys::Guestfs) BuildRequires: po4a BuildRequires: /usr/bin/virsh @@ -105,7 +105,7 @@ Requires: gawk Requires: gzip Requires: unzip Requires: curl -Requires: openssh-clients >= 8.7p1 +Requires: openssh-clients >= 8.8p1 Requires: %{_bindir}/virsh # Ensure the UEFI firmware is available, to properly convert @@ -119,7 +119,7 @@ Requires: edk2-aarch64 Requires: libnbd >= 1.8.2-2.el9 Requires: %{_bindir}/qemu-nbd -Requires: %{_bindir}/nbdcopy +Requires: %{_bindir}/nbdcopy >= 1.10 Requires: %{_bindir}/nbdinfo Requires: nbdkit-server >= 1.28.3-1.el9 Requires: nbdkit-curl-plugin From bc43f9d3fe2267ba6c73720ce353b26469cfdb07 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 14 Mar 2022 15:42:59 +0000 Subject: [PATCH 102/235] Fix nbdcopy versioned dependency error: line 122: Versioned file name not permitted: Requires: /usr/bin/nbdcopy >= 1.10 --- virt-v2v.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 57f87c2..ef09e6c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -117,9 +117,9 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -Requires: libnbd >= 1.8.2-2.el9 +Requires: libnbd >= 1.10 Requires: %{_bindir}/qemu-nbd -Requires: %{_bindir}/nbdcopy >= 1.10 +Requires: %{_bindir}/nbdcopy Requires: %{_bindir}/nbdinfo Requires: nbdkit-server >= 1.28.3-1.el9 Requires: nbdkit-curl-plugin From 071890f38aab88df3168f40110143a8367620a48 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 23 Mar 2022 13:57:25 +0000 Subject: [PATCH 103/235] New upstream stable branch version 2.0.1 Fixes security issue when running virt-v2v as root (RHBZ#2066773). --- sources | 4 ++-- virt-v2v.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 4f88c4c..5e35c01 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.0.0.tar.gz) = 0ccf9e9141a0166f969383f9e103ffa11fa2ce00a5fbf4ada6c4480b888886a5a149b33d905f0f1947edaec14d16dd89a15ef53dd0cc042b29d473235430f5de -SHA512 (virt-v2v-2.0.0.tar.gz.sig) = e1c7e308043951c2aab59d288daa8cfd0da4794f566811b2bab6e138ea511f337e10ab2118973f08df1b29406e1bf12d09591805dd21621a6350b628715a9b99 +SHA512 (virt-v2v-2.0.1.tar.gz) = ca976c1ceba3ef9c759dd3b43effcbc15e50eaa0ec3c2e84e0e5ca03afe222f992602cf24f6a0567c63d605afc3da2628c15901c62b2de3e23dda31d84b6a191 +SHA512 (virt-v2v-2.0.1.tar.gz.sig) = c17c0d07800db8019ad5bc64dce71322fb8066a4c5e35f8861e8eb9d2db1dedb8df01d82e5dbd01361386c5ce7d9da2210de72a1981d6d229f587e036f0a3077 diff --git a/virt-v2v.spec b/virt-v2v.spec index ef09e6c..015d95c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.0.0 +Version: 2.0.1 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -304,6 +304,10 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Wed Mar 23 2022 Richard W.M. Jones - 1:2.0.1-1 +- New upstream stable branch version 2.0.1 +- Fixes security issue when running virt-v2v as root (RHBZ#2066773). + * Mon Mar 14 2022 Richard W.M. Jones - 1:2.0.0-1 - New upstream stable branch version 2.0.0 - New virt-v2v-in-place and release notes man pages. From 3c02e4033d630c178d4963eaedd3266552294026 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 4 Apr 2022 13:50:43 +0100 Subject: [PATCH 104/235] New upstream stable branch version 2.0.2 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 5e35c01..9432f8c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.0.1.tar.gz) = ca976c1ceba3ef9c759dd3b43effcbc15e50eaa0ec3c2e84e0e5ca03afe222f992602cf24f6a0567c63d605afc3da2628c15901c62b2de3e23dda31d84b6a191 -SHA512 (virt-v2v-2.0.1.tar.gz.sig) = c17c0d07800db8019ad5bc64dce71322fb8066a4c5e35f8861e8eb9d2db1dedb8df01d82e5dbd01361386c5ce7d9da2210de72a1981d6d229f587e036f0a3077 +SHA512 (virt-v2v-2.0.2.tar.gz) = 63a198e407df47dc4afffeb147453449e36d9f82952fef5af490888f8708a44f3a75d1dcd233e2a1fe9b58715f61a9875dac9c406a1fced08da6574bf577ffe9 +SHA512 (virt-v2v-2.0.2.tar.gz.sig) = 6dc0da82c92243fc11071c569dd49a11a035589722a00b5a7d592f2266ba30eb7ded02746bfd6a88f1cb78d116ac1f6f4de5708f3bd226b9585fd7e0bbe02e05 diff --git a/virt-v2v.spec b/virt-v2v.spec index 015d95c..fd56ab7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.0.1 +Version: 2.0.2 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -304,6 +304,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Mon Apr 04 2022 Richard W.M. Jones - 1:2.0.2-1 +- New upstream stable branch version 2.0.2 + * Wed Mar 23 2022 Richard W.M. Jones - 1:2.0.1-1 - New upstream stable branch version 2.0.1 - Fixes security issue when running virt-v2v as root (RHBZ#2066773). From 56f912639fc27c83b16d0a384d68f6aea4bbee5a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Apr 2022 12:05:45 +0100 Subject: [PATCH 105/235] New upstream development version 2.1.1 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 9432f8c..f40178d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.0.2.tar.gz) = 63a198e407df47dc4afffeb147453449e36d9f82952fef5af490888f8708a44f3a75d1dcd233e2a1fe9b58715f61a9875dac9c406a1fced08da6574bf577ffe9 -SHA512 (virt-v2v-2.0.2.tar.gz.sig) = 6dc0da82c92243fc11071c569dd49a11a035589722a00b5a7d592f2266ba30eb7ded02746bfd6a88f1cb78d116ac1f6f4de5708f3bd226b9585fd7e0bbe02e05 +SHA512 (virt-v2v-2.1.1.tar.gz) = f4ec00a0a630b40f51c90801884b15de618c212334e94737d0f32f064c834f4e177cd88441b473c2e1a8db9a5a67781ca45a91c6c3d42accb8470f92dfbe5ba4 +SHA512 (virt-v2v-2.1.1.tar.gz.sig) = b7418f06dd0796cfcf368e4b6ed2e7cdd87c53b0a354bd54fc5581a5ea17aac61bd93f2f3c7c492881ee53a22f9cf9a876bf8e7ebb5223a908ea5225b8886d24 diff --git a/virt-v2v.spec b/virt-v2v.spec index fd56ab7..9af1c66 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -11,11 +11,11 @@ %endif # The source directory. -%global source_directory 2.0-stable +%global source_directory 2.1-development Name: virt-v2v Epoch: 1 -Version: 2.0.2 +Version: 2.1.1 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -304,6 +304,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Tue Apr 12 2022 Richard W.M. Jones - 1:2.1.1-1 +- New upstream development version 2.1.1 + * Mon Apr 04 2022 Richard W.M. Jones - 1:2.0.2-1 - New upstream stable branch version 2.0.2 From efe47b57c3d1c3e86da8347d71f34ff82f61d1e7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 26 Apr 2022 10:55:44 +0100 Subject: [PATCH 106/235] New upstream development version 2.1.2 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f40178d..a1e1c6f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.1.tar.gz) = f4ec00a0a630b40f51c90801884b15de618c212334e94737d0f32f064c834f4e177cd88441b473c2e1a8db9a5a67781ca45a91c6c3d42accb8470f92dfbe5ba4 -SHA512 (virt-v2v-2.1.1.tar.gz.sig) = b7418f06dd0796cfcf368e4b6ed2e7cdd87c53b0a354bd54fc5581a5ea17aac61bd93f2f3c7c492881ee53a22f9cf9a876bf8e7ebb5223a908ea5225b8886d24 +SHA512 (virt-v2v-2.1.2.tar.gz) = 614e7838045defb68604f3a1fff7793cac42a34ed1a3dfbae402e319d99d76adf81cfaea22583c4b0a3f2491b57bc0992ee78cf09409c38ce32b53d78cf1e365 +SHA512 (virt-v2v-2.1.2.tar.gz.sig) = 1376bb450f912c296a7f2e580b1aaa79b957303ce7ab5e1c4c30c0d11aa15dc03604541decf2327be87106a149f4e5e65dc37dce52eeb5ceed45525810e84abc diff --git a/virt-v2v.spec b/virt-v2v.spec index 9af1c66..af29be7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.1 +Version: 2.1.2 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -304,6 +304,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Tue Apr 26 2022 Richard W.M. Jones - 1:2.1.2-1 +- New upstream development version 2.1.2 + * Tue Apr 12 2022 Richard W.M. Jones - 1:2.1.1-1 - New upstream development version 2.1.1 From 91effd144894597e93059c79ba4587167b8886bd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 28 Apr 2022 17:42:56 +0100 Subject: [PATCH 107/235] +BR ocaml-libvirt-devel --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index af29be7..0fc0fdc 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -77,6 +77,7 @@ BuildRequires: xorriso BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-libguestfs-devel +BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-libnbd-devel BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-gettext-devel From 8eba39402e2c31fc70e056c3d323d18143a30b7e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 May 2022 15:35:15 +0100 Subject: [PATCH 108/235] New upstream development version 2.1.3 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a1e1c6f..6c5a1f7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.2.tar.gz) = 614e7838045defb68604f3a1fff7793cac42a34ed1a3dfbae402e319d99d76adf81cfaea22583c4b0a3f2491b57bc0992ee78cf09409c38ce32b53d78cf1e365 -SHA512 (virt-v2v-2.1.2.tar.gz.sig) = 1376bb450f912c296a7f2e580b1aaa79b957303ce7ab5e1c4c30c0d11aa15dc03604541decf2327be87106a149f4e5e65dc37dce52eeb5ceed45525810e84abc +SHA512 (virt-v2v-2.1.3.tar.gz) = 8f0c3779953dab651a65568799c86cf7ffa09729e768f8a7ee349796655d13b4cd4d601d0772689ac8cb8ae689cb9e448a5aaf005d7e2abfe9adf8fe3be28a11 +SHA512 (virt-v2v-2.1.3.tar.gz.sig) = 974ee49c3e652eef2e112432512c8900301f8ff479225a0177a17a2aa40d72e6785fd22e0dea4f787ffec937790732e37b4a22bb9a9bb517684229bc57eeb5e2 diff --git a/virt-v2v.spec b/virt-v2v.spec index 0fc0fdc..e3270e0 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.2 +Version: 2.1.3 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -305,6 +305,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Thu May 12 2022 Richard W.M. Jones - 1:2.1.3-1 +- New upstream development version 2.1.3 + * Tue Apr 26 2022 Richard W.M. Jones - 1:2.1.2-1 - New upstream development version 2.1.2 From cb7aba7e976065a151b8e935bb502b148103fd02 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 26 May 2022 12:43:47 +0100 Subject: [PATCH 109/235] New upstream development version 2.1.4 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 6c5a1f7..0fd9fab 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.3.tar.gz) = 8f0c3779953dab651a65568799c86cf7ffa09729e768f8a7ee349796655d13b4cd4d601d0772689ac8cb8ae689cb9e448a5aaf005d7e2abfe9adf8fe3be28a11 -SHA512 (virt-v2v-2.1.3.tar.gz.sig) = 974ee49c3e652eef2e112432512c8900301f8ff479225a0177a17a2aa40d72e6785fd22e0dea4f787ffec937790732e37b4a22bb9a9bb517684229bc57eeb5e2 +SHA512 (virt-v2v-2.1.4.tar.gz) = 968819f477900cb9f421fcc94c3522b600b0921190806ca86ded87f8638a962621405ec3ef17cbf84d910bcaa4497751549aefdeef22561f31524e06e3a29c0d +SHA512 (virt-v2v-2.1.4.tar.gz.sig) = 918efdcc591ce74992d13171cef9b4fb7b295e6a193688dec2559467f47c4123182ee82b499d9b75804093fa5ff95a4c7ec2ff96da26bf4ccd12240a35c5493c diff --git a/virt-v2v.spec b/virt-v2v.spec index e3270e0..8398875 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.3 +Version: 2.1.4 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -305,6 +305,9 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Thu May 26 2022 Richard W.M. Jones - 1:2.1.4-1 +- New upstream development version 2.1.4 + * Thu May 12 2022 Richard W.M. Jones - 1:2.1.3-1 - New upstream development version 2.1.3 From 1180dbb9125efb9733a95786576b7a6465683099 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 8 Jun 2022 12:49:45 +0100 Subject: [PATCH 110/235] Add Requires python3 / platform-python (RHBZ#2094779) --- virt-v2v.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 8398875..7b85ea6 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -118,6 +118,11 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif +%if !0%{?rhel} +Requires: python3 +%else +Requires: platform-python +%endif Requires: libnbd >= 1.10 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy From 76a47e52e46ec6a9b387e1b6e5845479ff52da44 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 8 Jun 2022 14:27:33 +0100 Subject: [PATCH 111/235] Remove nbdkit-readahead-filter as it is no longer used --- virt-v2v.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 7b85ea6..b248e34 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -142,7 +142,6 @@ Requires: nbdkit-cacheextents-filter Requires: nbdkit-cow-filter >= 1.28.3-1.el9 Requires: nbdkit-multi-conn-filter Requires: nbdkit-rate-filter -Requires: nbdkit-readahead-filter Requires: nbdkit-retry-filter # For rhsrvany.exe, used to install firstboot scripts in Windows guests. From 754f31a25a2a4ba7df374f808cd0f92f5af12239 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 8 Jun 2022 12:50:04 +0100 Subject: [PATCH 112/235] Enable the tests --- virt-v2v.spec | 56 +++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index b248e34..4ffce39 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.1.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -85,7 +85,14 @@ BuildRequires: ocaml-gettext-devel BuildRequires: ocaml-ounit-devel %endif +# These are for running our limited test. +BuildRequires: %{_bindir}/qemu-nbd +BuildRequires: %{_bindir}/nbdcopy +BuildRequires: %{_bindir}/nbdinfo +BuildRequires: nbdkit-file-plugin +BuildRequires: nbdkit-null-plugin BuildRequires: nbdkit-python-plugin +BuildRequires: nbdkit-cow-filter >= 1.28.3-1.el9 %if 0%{verify_tarball_signature} BuildRequires: gnupg2 @@ -243,31 +250,27 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %check -# All tests fail at the moment because of bugs in libvirt blockdev. -# # Tests fail on both armv7 and ppc64le in Fedora 31 because the kernel -# # cannot boot on qemu. -# %ifnarch %{arm} ppc64le +%ifarch x86_64 +# Only run the tests with non-debug (ie. non-Rawhide) kernels. +# XXX This tests for any debug kernel installed. +if grep CONFIG_DEBUG_MUTEXES=y /lib/modules/*/config ; then + echo "Skipping tests because debug kernel is installed" + exit 0 +fi -# # On x86_64 this single test fails with: "virt-v2v: warning: the -# # target hypervisor does not support a x86_64 KVM guest". Missing -# # BuildRequires? -# %ifarch x86_64 -# truncate -s 0 tests/test-v2v-o-libvirt.sh -# %endif +# Make sure we can see the debug messages (RHBZ#1230160). +export LIBGUESTFS_DEBUG=1 +export LIBGUESTFS_TRACE=1 -# # This test fails in mock. -# truncate -s 0 tests/test-v2v-oa-option.sh - -# # Make sure we can see the debug messages (RHBZ#1230160). -# export LIBGUESTFS_DEBUG=1 -# export LIBGUESTFS_TRACE=1 - -# make %{?_smp_mflags} check || { -# cat tests/test-suite.log -# exit 1 -# } - -# %endif +# The built in tests take a very long time to run under TCG (in Koji), +# so just perform a very simple conversion to check things are +# working. +make -C test-data/phony-guests windows.img +./run virt-v2v -v -x -i disk test-data/phony-guests/windows.img -o null +# XXX Enable in virt-v2v >= 2.1.5 +#make -C test-data/phony-guests fedora.img +#./run virt-v2v -v -x -i disk test-data/phony-guests/fedora.img -o null +%endif %files -f %{name}.lang @@ -309,6 +312,11 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog +* Wed Jun 08 2022 Richard W.M. Jones - 1:2.1.4-2 +- Add Requires python3 / platform-python (RHBZ#2094779) +- Remove nbdkit-readahead-filter as it is no longer used +- Enable the tests + * Thu May 26 2022 Richard W.M. Jones - 1:2.1.4-1 - New upstream development version 2.1.4 From 5b1f7b0dca3cf34cf97823d275362499580a6734 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 11 Jun 2022 10:36:54 +0100 Subject: [PATCH 113/235] New upstream development version 2.1.5 Add Requires python3 / platform-python (RHBZ#2094779) Remove nbdkit-readahead-filter as it is no longer used Enable the tests --- sources | 4 ++-- virt-v2v.spec | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sources b/sources index 0fd9fab..8b8968c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.4.tar.gz) = 968819f477900cb9f421fcc94c3522b600b0921190806ca86ded87f8638a962621405ec3ef17cbf84d910bcaa4497751549aefdeef22561f31524e06e3a29c0d -SHA512 (virt-v2v-2.1.4.tar.gz.sig) = 918efdcc591ce74992d13171cef9b4fb7b295e6a193688dec2559467f47c4123182ee82b499d9b75804093fa5ff95a4c7ec2ff96da26bf4ccd12240a35c5493c +SHA512 (virt-v2v-2.1.5.tar.gz) = 27be08b02fe22681ca7bb35a0a3243697c55bd555f336f78cf0a120ef09ae67cd37b2a05bff38782287acf5605452957b52966163303b336a0d48d0555d70bf0 +SHA512 (virt-v2v-2.1.5.tar.gz.sig) = 15a0038588e751ddf4e19cf225991fbf36f4c96fdcc986a8a685f79067b208e168154301b58bd6046a87680caa3165a8b0908c73912c8f3cee14ce83e76bd9ee diff --git a/virt-v2v.spec b/virt-v2v.spec index 4ffce39..1c4a1b9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.4 -Release: 2%{?dist} +Version: 2.1.5 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -267,9 +267,8 @@ export LIBGUESTFS_TRACE=1 # working. make -C test-data/phony-guests windows.img ./run virt-v2v -v -x -i disk test-data/phony-guests/windows.img -o null -# XXX Enable in virt-v2v >= 2.1.5 -#make -C test-data/phony-guests fedora.img -#./run virt-v2v -v -x -i disk test-data/phony-guests/fedora.img -o null +make -C test-data/phony-guests fedora.img +./run virt-v2v -v -x -i disk test-data/phony-guests/fedora.img -o null %endif @@ -312,7 +311,8 @@ make -C test-data/phony-guests windows.img %changelog -* Wed Jun 08 2022 Richard W.M. Jones - 1:2.1.4-2 +* Sat Jun 11 2022 Richard W.M. Jones - 1:2.1.5-1 +- New upstream development version 2.1.5 - Add Requires python3 / platform-python (RHBZ#2094779) - Remove nbdkit-readahead-filter as it is no longer used - Enable the tests From 4adf248ad7e022238ace51d08bad465873746957 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Jun 2022 13:05:43 +0100 Subject: [PATCH 114/235] New upstream development version 2.1.6 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8b8968c..28d655a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.5.tar.gz) = 27be08b02fe22681ca7bb35a0a3243697c55bd555f336f78cf0a120ef09ae67cd37b2a05bff38782287acf5605452957b52966163303b336a0d48d0555d70bf0 -SHA512 (virt-v2v-2.1.5.tar.gz.sig) = 15a0038588e751ddf4e19cf225991fbf36f4c96fdcc986a8a685f79067b208e168154301b58bd6046a87680caa3165a8b0908c73912c8f3cee14ce83e76bd9ee +SHA512 (virt-v2v-2.1.6.tar.gz) = d61e1b9228ca1cadb563c0d38cbad458851dee7ca7882ba78006c5c24ace3b61a4d4b181788d344cfe90a0548c0b81784e0365f3b016fa2faba2a6ecdd8957e1 +SHA512 (virt-v2v-2.1.6.tar.gz.sig) = 96b95596ff59e464417d714e0e2d08d834a1cf1f21c2e01edd3ca0eaa9f5b1f2a23835689345a6d01486830463e01d211cede343f580307875d10ccbb8a427eb diff --git a/virt-v2v.spec b/virt-v2v.spec index 1c4a1b9..19a8318 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -311,6 +311,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Fri Jun 17 2022 Richard W.M. Jones - 1:2.1.6-1 +- New upstream development version 2.1.6 + * Sat Jun 11 2022 Richard W.M. Jones - 1:2.1.5-1 - New upstream development version 2.1.5 - Add Requires python3 / platform-python (RHBZ#2094779) From 7fbfa0974edb8bd5ed16db3d0fa62870ac41c8e2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 19 Jun 2022 12:18:06 +0100 Subject: [PATCH 115/235] OCaml 4.14.0 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 19a8318..5e8f7c0 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -311,6 +311,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Sun Jun 19 2022 Richard W.M. Jones - 1:2.1.6-2 +- OCaml 4.14.0 rebuild + * Fri Jun 17 2022 Richard W.M. Jones - 1:2.1.6-1 - New upstream development version 2.1.6 From a0b231bb848dfd3c5ba8e96ae05f12d1c7698f3d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Jul 2022 13:58:04 +0100 Subject: [PATCH 116/235] New upstream development version 2.1.7 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 28d655a..6059cae 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.6.tar.gz) = d61e1b9228ca1cadb563c0d38cbad458851dee7ca7882ba78006c5c24ace3b61a4d4b181788d344cfe90a0548c0b81784e0365f3b016fa2faba2a6ecdd8957e1 -SHA512 (virt-v2v-2.1.6.tar.gz.sig) = 96b95596ff59e464417d714e0e2d08d834a1cf1f21c2e01edd3ca0eaa9f5b1f2a23835689345a6d01486830463e01d211cede343f580307875d10ccbb8a427eb +SHA512 (virt-v2v-2.1.7.tar.gz) = d3388afc595f30fb6a3baf9007286ed7c594aa465f8da56a51d2e74c909ff0125e95cf2cb7ced3935deff8715a5e42967f2e93f2ff2785c67952f42d1018df77 +SHA512 (virt-v2v-2.1.7.tar.gz.sig) = 34353bbd3f152dcea6e0bebb80f0d42c79b206a1ddbce9766300fb70011603cffe710f9d8ae00ca1762ecdf9c9ee3911836b6cbb478d7c1dad7f69ef57050878 diff --git a/virt-v2v.spec b/virt-v2v.spec index 5e8f7c0..7aae48f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.6 -Release: 2%{?dist} +Version: 2.1.7 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -311,6 +311,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Tue Jul 05 2022 Richard W.M. Jones - 1:2.1.7-1 +- New upstream development version 2.1.7 + * Sun Jun 19 2022 Richard W.M. Jones - 1:2.1.6-2 - OCaml 4.14.0 rebuild From 898c0086da8515f3afb98dd94c8e8f6ec198233f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:59:43 +0000 Subject: [PATCH 117/235] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 7aae48f..0cb02b9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.1.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -311,6 +311,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1:2.1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Jul 05 2022 Richard W.M. Jones - 1:2.1.7-1 - New upstream development version 2.1.7 From 55ac73a3a65ef9fc561a9bb7a970446522608cff Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 1 Aug 2022 15:23:21 +0100 Subject: [PATCH 118/235] New upstream development version 2.1.8 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 6059cae..3b32d44 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.7.tar.gz) = d3388afc595f30fb6a3baf9007286ed7c594aa465f8da56a51d2e74c909ff0125e95cf2cb7ced3935deff8715a5e42967f2e93f2ff2785c67952f42d1018df77 -SHA512 (virt-v2v-2.1.7.tar.gz.sig) = 34353bbd3f152dcea6e0bebb80f0d42c79b206a1ddbce9766300fb70011603cffe710f9d8ae00ca1762ecdf9c9ee3911836b6cbb478d7c1dad7f69ef57050878 +SHA512 (virt-v2v-2.1.8.tar.gz) = 4d7742de31928a92ebb6db43d74bcf1715d6cb50f0c396e5c2546a4d907790099bdbe03f15e44938f972047418d612653433e97dd84f5b8d9ef2efc036f77c3d +SHA512 (virt-v2v-2.1.8.tar.gz.sig) = 5477d12b5cc075ced6c701f5c3a521f181313a7f41f06c2c4ea0cb9ca96f74f81eb79e60b56ba755da7a6b7f3da111e80b0eef72f48f06a0dd77c4bd32fcb402 diff --git a/virt-v2v.spec b/virt-v2v.spec index 0cb02b9..5f10519 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.7 -Release: 2%{?dist} +Version: 2.1.8 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -311,6 +311,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Mon Aug 01 2022 Richard W.M. Jones - 1:2.1.8-1 +- New upstream development version 2.1.8 + * Sat Jul 23 2022 Fedora Release Engineering - 1:2.1.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From c4fd3776bccc8ea8fefc0311f08bfe01c45ae02e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2022 11:59:28 +0100 Subject: [PATCH 119/235] Add BR glibc-static As part of the test we build a small static binary which acts like 'rpm' inside our test VM. This needs glibc-static. We only run this test on x86-64. --- virt-v2v.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 5f10519..cb967a4 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -93,6 +93,9 @@ BuildRequires: nbdkit-file-plugin BuildRequires: nbdkit-null-plugin BuildRequires: nbdkit-python-plugin BuildRequires: nbdkit-cow-filter >= 1.28.3-1.el9 +%ifarch x86_64 +BuildRequires: glibc-static +%endif %if 0%{verify_tarball_signature} BuildRequires: gnupg2 @@ -311,6 +314,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Tue Aug 23 2022 Richard W.M. Jones - 1:2.1.8-2 +- Add BR glibc-static for tests on x86_64. + * Mon Aug 01 2022 Richard W.M. Jones - 1:2.1.8-1 - New upstream development version 2.1.8 From 2871ca26489afe94640232282dd6453dd39e38d9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Oct 2022 16:47:32 +0100 Subject: [PATCH 120/235] New upstream development version 2.1.9 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 3b32d44..a3bdaf4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.8.tar.gz) = 4d7742de31928a92ebb6db43d74bcf1715d6cb50f0c396e5c2546a4d907790099bdbe03f15e44938f972047418d612653433e97dd84f5b8d9ef2efc036f77c3d -SHA512 (virt-v2v-2.1.8.tar.gz.sig) = 5477d12b5cc075ced6c701f5c3a521f181313a7f41f06c2c4ea0cb9ca96f74f81eb79e60b56ba755da7a6b7f3da111e80b0eef72f48f06a0dd77c4bd32fcb402 +SHA512 (virt-v2v-2.1.9.tar.gz) = be07e9bbf6e0b2e66823f9a9402c9f550cfd847fd4801bc7071809a00af160ea054dc7540694f78e758238ba67be60fe35fc4144dd24264777bbd7d6a92bfdad +SHA512 (virt-v2v-2.1.9.tar.gz.sig) = b6b08fa7b0627ae1008eedaa0c1d8d350ed18f488bc4a022fafc8b4206fd47a2c3ef20b70de935b97d336c926a4a7ef48602afe244fa7f17fdb6a1a942fb8583 diff --git a/virt-v2v.spec b/virt-v2v.spec index cb967a4..f19134f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.8 -Release: 2%{?dist} +Version: 2.1.9 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -314,6 +314,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Tue Oct 11 2022 Richard W.M. Jones - 1:2.1.9-1 +- New upstream development version 2.1.9 + * Tue Aug 23 2022 Richard W.M. Jones - 1:2.1.8-2 - Add BR glibc-static for tests on x86_64. From cceac096a80e960b806186d2d072f5d0e7f4e9e7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 26 Nov 2022 15:41:35 +0000 Subject: [PATCH 121/235] New upstream development version 2.1.10 New tool: virt-v2v-inspector --- sources | 4 ++-- virt-v2v.spec | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a3bdaf4..7ca8a13 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.9.tar.gz) = be07e9bbf6e0b2e66823f9a9402c9f550cfd847fd4801bc7071809a00af160ea054dc7540694f78e758238ba67be60fe35fc4144dd24264777bbd7d6a92bfdad -SHA512 (virt-v2v-2.1.9.tar.gz.sig) = b6b08fa7b0627ae1008eedaa0c1d8d350ed18f488bc4a022fafc8b4206fd47a2c3ef20b70de935b97d336c926a4a7ef48602afe244fa7f17fdb6a1a942fb8583 +SHA512 (virt-v2v-2.1.10.tar.gz) = e783acb401e281f7b6bce52c2093a23b4464f269236f4ca36e6c1a9b0bbb57984e4bb0063ad967fbeb8e0c41080949b80eecc2d29503db4a0cf71f400e42e568 +SHA512 (virt-v2v-2.1.10.tar.gz.sig) = e4bbd6442fb02ee62205dfb9f1518f1668a74be087f0d7790d4c9d5e9a8163634fedff0cc20c542508710f51e812a34a811f5a809e70cfa9e085e3dbab92d5ed diff --git a/virt-v2v.spec b/virt-v2v.spec index f19134f..30e1251 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.9 +Version: 2.1.10 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -282,6 +282,7 @@ make -C test-data/phony-guests fedora.img %if !0%{?rhel} %{_bindir}/virt-v2v-in-place %endif +%{_bindir}/virt-v2v-inspector %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* @@ -289,6 +290,7 @@ make -C test-data/phony-guests fedora.img %if !0%{?rhel} %{_mandir}/man1/virt-v2v-in-place.1* %endif +%{_mandir}/man1/virt-v2v-inspector.1* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %{_mandir}/man1/virt-v2v-output-rhv.1* @@ -314,6 +316,10 @@ make -C test-data/phony-guests fedora.img %changelog +* Sat Nov 26 2022 Richard W.M. Jones - 1:2.1.10-1 +- New upstream development version 2.1.10 +- New tool: virt-v2v-inspector + * Tue Oct 11 2022 Richard W.M. Jones - 1:2.1.9-1 - New upstream development version 2.1.9 From eda3bba64d0476db1da5a6cd4652c13f2992d8ca Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 10 Dec 2022 12:40:50 +0000 Subject: [PATCH 122/235] New upstream development version 2.1.11 --- sources | 4 ++-- virt-v2v.spec | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 7ca8a13..6ea1fbe 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.10.tar.gz) = e783acb401e281f7b6bce52c2093a23b4464f269236f4ca36e6c1a9b0bbb57984e4bb0063ad967fbeb8e0c41080949b80eecc2d29503db4a0cf71f400e42e568 -SHA512 (virt-v2v-2.1.10.tar.gz.sig) = e4bbd6442fb02ee62205dfb9f1518f1668a74be087f0d7790d4c9d5e9a8163634fedff0cc20c542508710f51e812a34a811f5a809e70cfa9e085e3dbab92d5ed +SHA512 (virt-v2v-2.1.11.tar.gz) = 239cf084a60f7652558a9aacc681820030e7de195386c43847ee450899af199d24850e128291625d82731cdf95c7625bc1318fac6f059dd10ed2225882b7ff52 +SHA512 (virt-v2v-2.1.11.tar.gz.sig) = 15d156d78424196708ff03c6af455908ffce9e88355ba6ea4a8fbdffed026443b0a500b63308534086cbe609145bfefcbbf79278cc71183f54ae3b5a7bd5364c diff --git a/virt-v2v.spec b/virt-v2v.spec index 30e1251..6e6e1a7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.10 +Version: 2.1.11 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -58,7 +58,7 @@ BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.04 -BuildRequires: libguestfs-devel >= 1:1.44 +BuildRequires: libguestfs-devel >= 1:1.49.8-1 BuildRequires: augeas-devel BuildRequires: bash-completion BuildRequires: file-devel @@ -101,8 +101,8 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.42 -Requires: guestfs-tools >= 1.42 +Requires: libguestfs%{?_isa} >= 1:1.49.8-1 +Requires: guestfs-tools >= 1:1.49.7-1 # XFS is the default filesystem in Fedora and RHEL. Requires: libguestfs-xfs @@ -316,6 +316,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Sat Dec 10 2022 Richard W.M. Jones - 1:2.1.11-1 +- New upstream development version 2.1.11 + * Sat Nov 26 2022 Richard W.M. Jones - 1:2.1.10-1 - New upstream development version 2.1.10 - New tool: virt-v2v-inspector From d5dbc41678e499d8a52fbc25057954460b7f4405 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 10 Dec 2022 14:47:46 +0000 Subject: [PATCH 123/235] Remove bogus guestfs-tools 1: (Epoch) prefix in dependency guestfs-tools main package does not have an Epoch. --- virt-v2v.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 6e6e1a7..33efda0 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.1.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -102,7 +102,7 @@ BuildRequires: gnupg2 %endif Requires: libguestfs%{?_isa} >= 1:1.49.8-1 -Requires: guestfs-tools >= 1:1.49.7-1 +Requires: guestfs-tools >= 1.49.7-1 # XFS is the default filesystem in Fedora and RHEL. Requires: libguestfs-xfs @@ -316,7 +316,7 @@ make -C test-data/phony-guests fedora.img %changelog -* Sat Dec 10 2022 Richard W.M. Jones - 1:2.1.11-1 +* Sat Dec 10 2022 Richard W.M. Jones - 1:2.1.11-2 - New upstream development version 2.1.11 * Sat Nov 26 2022 Richard W.M. Jones - 1:2.1.10-1 From 060522be72119166a62c58597ade6e757b7e9977 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 6 Jan 2023 11:08:44 +0000 Subject: [PATCH 124/235] New upstream development version 2.1.12 Add release notes for future virt-v2v 2.2 --- sources | 4 ++-- virt-v2v.spec | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 6ea1fbe..e2fdb85 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.11.tar.gz) = 239cf084a60f7652558a9aacc681820030e7de195386c43847ee450899af199d24850e128291625d82731cdf95c7625bc1318fac6f059dd10ed2225882b7ff52 -SHA512 (virt-v2v-2.1.11.tar.gz.sig) = 15d156d78424196708ff03c6af455908ffce9e88355ba6ea4a8fbdffed026443b0a500b63308534086cbe609145bfefcbbf79278cc71183f54ae3b5a7bd5364c +SHA512 (virt-v2v-2.1.12.tar.gz) = 2d7532d5f9730fef398d00092d884d018e35ed10279dab0d16f9f95f4059ec856ba81b475c37822cfe56364f48f6fca30635d2af4433f23ef5b496bb97e2aaa8 +SHA512 (virt-v2v-2.1.12.tar.gz.sig) = 965da728175330b6525d31be7bf24144f2e08a34614d03ab8d274e3b939ed6c46cd6834384159951637b9f11c0816038f54ac66aed5bdd87444232670170ed85 diff --git a/virt-v2v.spec b/virt-v2v.spec index 33efda0..9d15ef5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.1.11 -Release: 2%{?dist} +Version: 2.1.12 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -296,6 +296,7 @@ make -C test-data/phony-guests fedora.img %{_mandir}/man1/virt-v2v-output-rhv.1* %{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-release-notes-2.0.1* +%{_mandir}/man1/virt-v2v-release-notes-2.2.1* %{_mandir}/man1/virt-v2v-support.1* %{_datadir}/virt-tools @@ -316,6 +317,10 @@ make -C test-data/phony-guests fedora.img %changelog +* Fri Jan 06 2023 Richard W.M. Jones - 1:2.1.12-1 +- New upstream development version 2.1.12 +- Add release notes for future virt-v2v 2.2 + * Sat Dec 10 2022 Richard W.M. Jones - 1:2.1.11-2 - New upstream development version 2.1.11 From cf3e580f28366350d2d4b0f3cedeee8f754619e9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 10 Jan 2023 15:06:27 +0000 Subject: [PATCH 125/235] New stable branch version 2.2.0 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index e2fdb85..511b99b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.1.12.tar.gz) = 2d7532d5f9730fef398d00092d884d018e35ed10279dab0d16f9f95f4059ec856ba81b475c37822cfe56364f48f6fca30635d2af4433f23ef5b496bb97e2aaa8 -SHA512 (virt-v2v-2.1.12.tar.gz.sig) = 965da728175330b6525d31be7bf24144f2e08a34614d03ab8d274e3b939ed6c46cd6834384159951637b9f11c0816038f54ac66aed5bdd87444232670170ed85 +SHA512 (virt-v2v-2.2.0.tar.gz) = 8251d8b232cc93d2ebd8a9d21d6807795559928c557a34dbc84a72473f548df85268521b7a803ef26b3abe2ef21170ab8d8d923a99d5228b761586d43bebb81f +SHA512 (virt-v2v-2.2.0.tar.gz.sig) = 40ceb183c48d673dcd2a42b394ade98753f5cb2abc6978c7ba33c461dee77c4b1c461cce55fa188d594297c47e9d8cff9d01e8eabd63fdc2eadeea65327156c2 diff --git a/virt-v2v.spec b/virt-v2v.spec index 9d15ef5..246f084 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -11,11 +11,11 @@ %endif # The source directory. -%global source_directory 2.1-development +%global source_directory 2.2-stable Name: virt-v2v Epoch: 1 -Version: 2.1.12 +Version: 2.2.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -317,6 +317,9 @@ make -C test-data/phony-guests fedora.img %changelog +* Tue Jan 10 2023 Richard W.M. Jones - 1:2.2.0-1 +- New stable branch version 2.2.0 + * Fri Jan 06 2023 Richard W.M. Jones - 1:2.1.12-1 - New upstream development version 2.1.12 - Add release notes for future virt-v2v 2.2 From dcd10a79fda9f52c09ce7ce7c11268d99e300953 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 10 Jan 2023 15:41:07 +0000 Subject: [PATCH 126/235] Make %check section compatible with RHEL On RHEL, windows.img is created zero sized. Change the test so it checks the image size is > 0 before running the test. --- virt-v2v.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 246f084..08dfd85 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -268,10 +268,12 @@ export LIBGUESTFS_TRACE=1 # The built in tests take a very long time to run under TCG (in Koji), # so just perform a very simple conversion to check things are # working. -make -C test-data/phony-guests windows.img -./run virt-v2v -v -x -i disk test-data/phony-guests/windows.img -o null -make -C test-data/phony-guests fedora.img -./run virt-v2v -v -x -i disk test-data/phony-guests/fedora.img -o null +for f in windows.img fedora.img; do + make -C test-data/phony-guests $f + if -s test-data/phony-guests/$f; then + ./run virt-v2v -v -x -i disk test-data/phony-guests/$f -o null + fi +done %endif From 8d307c79fbe6049c3eed022a29a0ae1b178e12a6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Jan 2023 10:47:10 +0000 Subject: [PATCH 127/235] New development branch version 2.3.1 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 511b99b..2bed168 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.2.0.tar.gz) = 8251d8b232cc93d2ebd8a9d21d6807795559928c557a34dbc84a72473f548df85268521b7a803ef26b3abe2ef21170ab8d8d923a99d5228b761586d43bebb81f -SHA512 (virt-v2v-2.2.0.tar.gz.sig) = 40ceb183c48d673dcd2a42b394ade98753f5cb2abc6978c7ba33c461dee77c4b1c461cce55fa188d594297c47e9d8cff9d01e8eabd63fdc2eadeea65327156c2 +SHA512 (virt-v2v-2.3.1.tar.gz) = 7e5737a0a47096377db190c25dcc1b5640ee54675060f1627e8464ff8a11198adffa6c87fabc70ffeca89c04e6180ab5b1a66e2ff185afdb1c6e24181a8ea1c5 +SHA512 (virt-v2v-2.3.1.tar.gz.sig) = b686102f851cc415b91c6fbc9cf0ff623646cb6db9aef736451e6ac2f5f160076b73baa52d2ad2db1af32612b350375a3d64b63b181b7eaaebc7a9984c07e3ad diff --git a/virt-v2v.spec b/virt-v2v.spec index 08dfd85..c8c5058 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -11,11 +11,11 @@ %endif # The source directory. -%global source_directory 2.2-stable +%global source_directory 2.3-development Name: virt-v2v Epoch: 1 -Version: 2.2.0 +Version: 2.3.1 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -319,6 +319,9 @@ done %changelog +* Tue Jan 17 2023 Richard W.M. Jones - 1:2.3.1-1 +- New development branch version 2.3.1 + * Tue Jan 10 2023 Richard W.M. Jones - 1:2.2.0-1 - New stable branch version 2.2.0 From 367ef1d16e2c65c7a993933a67867c58a62406ac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 19 Jan 2023 11:09:07 +0000 Subject: [PATCH 128/235] New development branch version 2.3.2 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 2bed168..9e6470d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.1.tar.gz) = 7e5737a0a47096377db190c25dcc1b5640ee54675060f1627e8464ff8a11198adffa6c87fabc70ffeca89c04e6180ab5b1a66e2ff185afdb1c6e24181a8ea1c5 -SHA512 (virt-v2v-2.3.1.tar.gz.sig) = b686102f851cc415b91c6fbc9cf0ff623646cb6db9aef736451e6ac2f5f160076b73baa52d2ad2db1af32612b350375a3d64b63b181b7eaaebc7a9984c07e3ad +SHA512 (virt-v2v-2.3.2.tar.gz) = 69773079df7266b09074919c67be47d563512d71f1296ec2f1894f4608dd7d1e8781331a8b8ecd5f77a08408433c00924e9c25810d79b253955ac13ef10b48c5 +SHA512 (virt-v2v-2.3.2.tar.gz.sig) = f1eb6ee115873ee98c292a8768f17c1a5ce4d83b02e476f1bdb33093b6e375193621ad74ea484a224c674b66b58c5f257df77104a82f3f08d41e104346fb5779 diff --git a/virt-v2v.spec b/virt-v2v.spec index c8c5058..8d99004 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.1 +Version: 2.3.2 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -319,6 +319,9 @@ done %changelog +* Thu Jan 19 2023 Richard W.M. Jones - 1:2.3.2-1 +- New development branch version 2.3.2 + * Tue Jan 17 2023 Richard W.M. Jones - 1:2.3.1-1 - New development branch version 2.3.1 From 1f21f51f2e3a4e8e1ec8bba0cfee6a970967ed52 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jan 2023 18:32:38 +0000 Subject: [PATCH 129/235] Rebuild OCaml packages for F38 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 8d99004..1721c9c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -319,6 +319,9 @@ done %changelog +* Tue Jan 24 2023 Richard W.M. Jones - 1:2.3.2-2 +- Rebuild OCaml packages for F38 + * Thu Jan 19 2023 Richard W.M. Jones - 1:2.3.2-1 - New development branch version 2.3.2 From 32e3130e0f5790f8d6e4f2a4387c67ff471857f2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 6 Feb 2023 14:54:20 +0000 Subject: [PATCH 130/235] New development branch version 2.3.3 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 9e6470d..158e29b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.2.tar.gz) = 69773079df7266b09074919c67be47d563512d71f1296ec2f1894f4608dd7d1e8781331a8b8ecd5f77a08408433c00924e9c25810d79b253955ac13ef10b48c5 -SHA512 (virt-v2v-2.3.2.tar.gz.sig) = f1eb6ee115873ee98c292a8768f17c1a5ce4d83b02e476f1bdb33093b6e375193621ad74ea484a224c674b66b58c5f257df77104a82f3f08d41e104346fb5779 +SHA512 (virt-v2v-2.3.3.tar.gz) = 7ad5e64c2a1ad96e8d2cd0cfaa5844042c09632cee1ab28217a7eaf51e5449172beb41b9b46fa1e5924256787fe8540786fa16ba62278bf6db5687facf510348 +SHA512 (virt-v2v-2.3.3.tar.gz.sig) = 33cb1fbf3fcf953559ca8410810425a3925e96a87082e37a1f0b6d16ca67a3da0b0b37f3115bf26a3305233d814c3634852c6aabb341c00c88d0ff77161b0e24 diff --git a/virt-v2v.spec b/virt-v2v.spec index 1721c9c..4d939d5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,8 +15,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.2 -Release: 2%{?dist} +Version: 2.3.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -319,6 +319,9 @@ done %changelog +* Mon Feb 06 2023 Richard W.M. Jones - 1:2.3.3-1 +- New development branch version 2.3.3 + * Tue Jan 24 2023 Richard W.M. Jones - 1:2.3.2-2 - Rebuild OCaml packages for F38 From 0aacc5e2aacee5885f66e4f4342c805b84dc358a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Apr 2023 12:38:25 +0100 Subject: [PATCH 131/235] New development branch version 2.3.4 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 158e29b..495870b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.3.tar.gz) = 7ad5e64c2a1ad96e8d2cd0cfaa5844042c09632cee1ab28217a7eaf51e5449172beb41b9b46fa1e5924256787fe8540786fa16ba62278bf6db5687facf510348 -SHA512 (virt-v2v-2.3.3.tar.gz.sig) = 33cb1fbf3fcf953559ca8410810425a3925e96a87082e37a1f0b6d16ca67a3da0b0b37f3115bf26a3305233d814c3634852c6aabb341c00c88d0ff77161b0e24 +SHA512 (virt-v2v-2.3.4.tar.gz) = 0ed49b4bcfc17d1ef769eb740fc70f16d1c8a53b0f6135e758bbc7bbad619302ec158db17bba7673bcfcf702c90f324c34135a4fc3221f7324af0b1780d9d75f +SHA512 (virt-v2v-2.3.4.tar.gz.sig) = 6a59411c1a9fa14ee065076d1e96df4071eccbef6415c70889f02234fd3fe4daba854e70b1b7c761d3017f1c8ebf640fa4c1663da35b1c5763e350f1eb6adf10 diff --git a/virt-v2v.spec b/virt-v2v.spec index 4d939d5..f6b2b8c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.3 +Version: 2.3.4 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -319,6 +319,9 @@ done %changelog +* Wed Apr 19 2023 Richard W.M. Jones - 1:2.3.4-1 +- New development branch version 2.3.4 + * Mon Feb 06 2023 Richard W.M. Jones - 1:2.3.3-1 - New development branch version 2.3.3 From 686b6069737102c2a0e081163592ccfbeaaa273f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 5 Jun 2023 15:10:20 +0100 Subject: [PATCH 132/235] Migrated to SPDX license --- virt-v2v.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index f6b2b8c..8d5bd80 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,10 +16,10 @@ Name: virt-v2v Epoch: 1 Version: 2.3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM -License: GPLv2+ +License: GPL-2.0-or-later AND LGPL-2.0-or-later URL: https://github.com/libguestfs/virt-v2v Source0: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz @@ -319,6 +319,9 @@ done %changelog +* Mon Jun 05 2023 Richard W.M. Jones - 1:2.3.4-2 +- Migrated to SPDX license + * Wed Apr 19 2023 Richard W.M. Jones - 1:2.3.4-1 - New development branch version 2.3.4 From 20323cd1bc9ba938d03525205cce6a9567657cf4 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 7 Jun 2023 01:34:10 -0400 Subject: [PATCH 133/235] Fix installation on newer RHEL libguestfs-winsupport is not available in ELN, only RHEL. platform-python was limited to RHEL 8, but was virtually provided by python3 in RHEL 9 for compatibility. --- virt-v2v.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 8d5bd80..8cd6f7c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -107,7 +107,7 @@ Requires: guestfs-tools >= 1.49.7-1 # XFS is the default filesystem in Fedora and RHEL. Requires: libguestfs-xfs -%if 0%{?rhel} +%if 0%{?rhel} && ! 0%{?eln} # For Windows conversions on RHEL. Requires: libguestfs-winsupport >= 7.2 %endif @@ -128,7 +128,7 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -%if !0%{?rhel} +%if 0%{?rhel} != 8 Requires: python3 %else Requires: platform-python @@ -321,6 +321,7 @@ done %changelog * Mon Jun 05 2023 Richard W.M. Jones - 1:2.3.4-2 - Migrated to SPDX license +- Fix installation on newer RHEL * Wed Apr 19 2023 Richard W.M. Jones - 1:2.3.4-1 - New development branch version 2.3.4 From 484ddbffba8195998c3e3b9e329247d6377d9917 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 10 Jul 2023 22:52:00 -0600 Subject: [PATCH 134/235] OCaml 5.0.0 rebuild --- virt-v2v-ocaml5.patch | 17 +++++++++++++++++ virt-v2v.spec | 9 +++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 virt-v2v-ocaml5.patch diff --git a/virt-v2v-ocaml5.patch b/virt-v2v-ocaml5.patch new file mode 100644 index 0000000..1ed5a80 --- /dev/null +++ b/virt-v2v-ocaml5.patch @@ -0,0 +1,17 @@ +--- virt-v2v-2.3.4/common/mlstdutils/std_utils.ml.orig 2023-02-20 12:00:29.154785477 -0700 ++++ virt-v2v-2.3.4/common/mlstdutils/std_utils.ml 2023-07-10 09:34:10.295869331 -0600 +@@ -341,12 +341,12 @@ module List = struct + | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs + | _ -> invalid_arg "combine3" + +- let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function ++ let rec assoc_lbl ?(cmp = Stdlib.compare) ~default x = function + | [] -> default + | (y, y') :: _ when cmp x y = 0 -> y' + | _ :: ys -> assoc_lbl ~cmp ~default x ys + +- let uniq ?(cmp = Pervasives.compare) xs = ++ let uniq ?(cmp = Stdlib.compare) xs = + let rec loop acc = function + | [] -> acc + | [x] -> x :: acc diff --git a/virt-v2v.spec b/virt-v2v.spec index 8cd6f7c..02a2e8a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,4 +1,3 @@ -%undefine _package_note_flags # If we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 @@ -16,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -32,6 +31,9 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh +# Adapt to OCaml 5.0.0 +Patch0: %{name}-ocaml5.patch + %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather @@ -319,6 +321,9 @@ done %changelog +* Mon Jul 10 2023 Jerry James - 1:2.3.4-3 +- OCaml 5.0.0 rebuild + * Mon Jun 05 2023 Richard W.M. Jones - 1:2.3.4-2 - Migrated to SPDX license - Fix installation on newer RHEL From 6f4ec77358c4c4207cb7d41aebb7c48599c525c6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 14:00:35 +0100 Subject: [PATCH 135/235] OCaml 5.0 rebuild for Fedora 39 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 02a2e8a..34deebf 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -321,6 +321,9 @@ done %changelog +* Wed Jul 12 2023 Richard W.M. Jones - 1:2.3.4-4 +- OCaml 5.0 rebuild for Fedora 39 + * Mon Jul 10 2023 Jerry James - 1:2.3.4-3 - OCaml 5.0.0 rebuild From 2eb925871d8f44f9d0113be289122eb58b038bf0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 14 Jul 2023 15:13:46 +0100 Subject: [PATCH 136/235] New development branch version 2.3.5 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 495870b..921a9a3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.4.tar.gz) = 0ed49b4bcfc17d1ef769eb740fc70f16d1c8a53b0f6135e758bbc7bbad619302ec158db17bba7673bcfcf702c90f324c34135a4fc3221f7324af0b1780d9d75f -SHA512 (virt-v2v-2.3.4.tar.gz.sig) = 6a59411c1a9fa14ee065076d1e96df4071eccbef6415c70889f02234fd3fe4daba854e70b1b7c761d3017f1c8ebf640fa4c1663da35b1c5763e350f1eb6adf10 +SHA512 (virt-v2v-2.3.5.tar.gz) = 30829a8e88a773476198f96c7355bcbc715fa95ca2b3be5427de6e1ff1db05e7e22312e7e7d60b4b0e7c556ddd54f517206332b65f8b8649cbb05ec96304373e +SHA512 (virt-v2v-2.3.5.tar.gz.sig) = bab80165cebc9e71387769949123f577d5a587bce8e3a7bf9973a0a9b9bee0b2b4a32a98d73d9de97774edd68098debf6d0a60aec4c529c0b3efdd239eb555d6 diff --git a/virt-v2v.spec b/virt-v2v.spec index 34deebf..9d034ee 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.4 -Release: 4%{?dist} +Version: 2.3.5 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -321,6 +321,9 @@ done %changelog +* Fri Jul 14 2023 Richard W.M. Jones - 1:2.3.5-1 +- New development branch version 2.3.5 + * Wed Jul 12 2023 Richard W.M. Jones - 1:2.3.4-4 - OCaml 5.0 rebuild for Fedora 39 From 19b8f91663ffcab93ce369c0ad88a478f2bc63a7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 14 Jul 2023 15:23:16 +0100 Subject: [PATCH 137/235] Remove OCaml 5 patch Equivalent change is now upstream. --- virt-v2v-ocaml5.patch | 17 ----------------- virt-v2v.spec | 5 +---- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 virt-v2v-ocaml5.patch diff --git a/virt-v2v-ocaml5.patch b/virt-v2v-ocaml5.patch deleted file mode 100644 index 1ed5a80..0000000 --- a/virt-v2v-ocaml5.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- virt-v2v-2.3.4/common/mlstdutils/std_utils.ml.orig 2023-02-20 12:00:29.154785477 -0700 -+++ virt-v2v-2.3.4/common/mlstdutils/std_utils.ml 2023-07-10 09:34:10.295869331 -0600 -@@ -341,12 +341,12 @@ module List = struct - | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs - | _ -> invalid_arg "combine3" - -- let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function -+ let rec assoc_lbl ?(cmp = Stdlib.compare) ~default x = function - | [] -> default - | (y, y') :: _ when cmp x y = 0 -> y' - | _ :: ys -> assoc_lbl ~cmp ~default x ys - -- let uniq ?(cmp = Pervasives.compare) xs = -+ let uniq ?(cmp = Stdlib.compare) xs = - let rec loop acc = function - | [] -> acc - | [x] -> x :: acc diff --git a/virt-v2v.spec b/virt-v2v.spec index 9d034ee..963e6b5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ %global patches_touch_autotools %{nil} %else # On RHEL the downstream patches always touch autotools files. -%global patches_touch_autotools 1 +%global patches_touch_autotools %{nil} %endif # The source directory. @@ -31,9 +31,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -# Adapt to OCaml 5.0.0 -Patch0: %{name}-ocaml5.patch - %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather From 53cd9839461dc95f8d8df1150a5ec1cd2d997ecb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:44:59 +0000 Subject: [PATCH 138/235] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 963e6b5..4dbd440 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -318,6 +318,9 @@ done %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 1:2.3.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jul 14 2023 Richard W.M. Jones - 1:2.3.5-1 - New development branch version 2.3.5 From 71520a8e8f788f15e4d24003854f5ed15fa78ddc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 5 Oct 2023 16:34:50 +0100 Subject: [PATCH 139/235] OCaml 5.1 rebuild for Fedora 40 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 4dbd440..421e193 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -318,6 +318,9 @@ done %changelog +* Thu Oct 05 2023 Richard W.M. Jones - 1:2.3.5-3 +- OCaml 5.1 rebuild for Fedora 40 + * Sat Jul 22 2023 Fedora Release Engineering - 1:2.3.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 8f1820aa6f1f715c8b6c1ce5b13dfade2586db06 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 20 Oct 2023 16:49:41 -0400 Subject: [PATCH 140/235] Use mingw-srvany-redistributable srvany provides only mingw32 executables used by virt-v2v. However, by virtue of being installed in the mingw32 directory hierarchy, it is handled as other mingw packages, and ends up pulling in mingw toolchain components which are not needed for running virt-v2v. A new mingw-srvany-redistributable subpackage now provides those binaries outside of the mingw32 paths, avoiding unnecessary mingw dependency detection, and directly into the location where virt-v2v expects them. --- virt-v2v.spec | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 421e193..0f30cf6 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -154,7 +154,7 @@ Requires: nbdkit-rate-filter Requires: nbdkit-retry-filter # For rhsrvany.exe, used to install firstboot scripts in Windows guests. -Requires: mingw32-srvany >= 1.0-13 +Requires: mingw-srvany-redistributable >= 1.1-6 # On RHEL, virtio-win should be used to install virtio drivers # and qemu-ga in converted guests. (RHBZ#1972644) @@ -232,15 +232,6 @@ make V=1 %{?_smp_mflags} # Delete libtool crap. find $RPM_BUILD_ROOT -name '*.la' -delete -# Virt-tools data directory. This contains symlinks to rhsrvany.exe -# and pnp_wait.exe which are satisfied by the dependency on -# mingw32-srvany. -mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools -pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools -ln -sf ../../i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe -ln -sf ../../i686-w64-mingw32/sys-root/mingw/bin/pnp_wait.exe -popd - %if 0%{?rhel} # On RHEL remove virt-v2v-in-place. rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place @@ -299,7 +290,6 @@ done %{_mandir}/man1/virt-v2v-release-notes-2.0.1* %{_mandir}/man1/virt-v2v-release-notes-2.2.1* %{_mandir}/man1/virt-v2v-support.1* -%{_datadir}/virt-tools %files bash-completion @@ -318,6 +308,9 @@ done %changelog +* Fri Oct 20 2023 Yaakov Selkowitz - 1:2.3.5-4 +- Use mingw-srvany-redistributable + * Thu Oct 05 2023 Richard W.M. Jones - 1:2.3.5-3 - OCaml 5.1 rebuild for Fedora 40 From 5b1d48a6d91df0dc9832cb2aaf926fda52b5dc3d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Nov 2023 11:25:19 +0000 Subject: [PATCH 141/235] New development branch version 2.3.6 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 921a9a3..3c8ab31 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.5.tar.gz) = 30829a8e88a773476198f96c7355bcbc715fa95ca2b3be5427de6e1ff1db05e7e22312e7e7d60b4b0e7c556ddd54f517206332b65f8b8649cbb05ec96304373e -SHA512 (virt-v2v-2.3.5.tar.gz.sig) = bab80165cebc9e71387769949123f577d5a587bce8e3a7bf9973a0a9b9bee0b2b4a32a98d73d9de97774edd68098debf6d0a60aec4c529c0b3efdd239eb555d6 +SHA512 (virt-v2v-2.3.6.tar.gz) = 214839bd9667dff73eae0cf7dda2f9cb8999654df387c363595e9cbd1eddc6febe73926356dfee26d18ed0f823e1fc21433278428cd083803080635ab5a20eaa +SHA512 (virt-v2v-2.3.6.tar.gz.sig) = b1a0dcff0633231d3edcd5ce46708a2a864e300396290f9dd015552f6a8ac9c5bef0da96d340f313c17f68b35f7f55f2d9db35cb507672b9dc10c85473811aa1 diff --git a/virt-v2v.spec b/virt-v2v.spec index 0f30cf6..57bae9a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.5 -Release: 4%{?dist} +Version: 2.3.6 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -308,6 +308,9 @@ done %changelog +* Thu Nov 02 2023 Richard W.M. Jones - 1:2.3.6-1 +- New development branch version 2.3.6 + * Fri Oct 20 2023 Yaakov Selkowitz - 1:2.3.5-4 - Use mingw-srvany-redistributable From 1b882146a35d63fa4a6ae44a2737d20c243fad02 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 27 Nov 2023 14:38:49 +0000 Subject: [PATCH 142/235] Fix build for libxml2 2.12.1 --- 0001-common-Update-submodule.patch | 28 ++++++++++++++++++++++++++++ virt-v2v.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-common-Update-submodule.patch diff --git a/0001-common-Update-submodule.patch b/0001-common-Update-submodule.patch new file mode 100644 index 0000000..4a2c17e --- /dev/null +++ b/0001-common-Update-submodule.patch @@ -0,0 +1,28 @@ +From ef769cb91b54a6d4f1309518d7048b2c46559cc8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 27 Nov 2023 14:08:01 +0000 +Subject: [PATCH] common: Update submodule + +Pick up this commit required by libxml2 2.12.1: + + mlxml: Include for xmlReadMemory +--- + common | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Submodule common e711121607..6185aa8431: +diff --git a/common/mlxml/xml-c.c b/common/mlxml/xml-c.c +index 715c3bb..e024bd8 100644 +--- a/common/mlxml/xml-c.c ++++ b/common/mlxml/xml-c.c +@@ -34,6 +34,7 @@ + #include + #include + ++#include + #include + #include + #include +-- +2.42.0 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 57bae9a..c1680c9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -48,6 +48,8 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif +Patch: 0001-common-Update-submodule.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -308,6 +310,9 @@ done %changelog +* Mon Nov 27 2023 Richard W.M. Jones - 1:2.3.6-2 +- Fix build for libxml2 2.12.1 + * Thu Nov 02 2023 Richard W.M. Jones - 1:2.3.6-1 - New development branch version 2.3.6 From 3777fa33c6449e38d33d78ca05480f5346ab8889 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 9 Dec 2023 11:51:02 +0000 Subject: [PATCH 143/235] New development branch version 2.3.7 --- 0001-common-Update-submodule.patch | 28 ---------------------------- sources | 4 ++-- virt-v2v.spec | 9 +++++---- 3 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 0001-common-Update-submodule.patch diff --git a/0001-common-Update-submodule.patch b/0001-common-Update-submodule.patch deleted file mode 100644 index 4a2c17e..0000000 --- a/0001-common-Update-submodule.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ef769cb91b54a6d4f1309518d7048b2c46559cc8 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 27 Nov 2023 14:08:01 +0000 -Subject: [PATCH] common: Update submodule - -Pick up this commit required by libxml2 2.12.1: - - mlxml: Include for xmlReadMemory ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common e711121607..6185aa8431: -diff --git a/common/mlxml/xml-c.c b/common/mlxml/xml-c.c -index 715c3bb..e024bd8 100644 ---- a/common/mlxml/xml-c.c -+++ b/common/mlxml/xml-c.c -@@ -34,6 +34,7 @@ - #include - #include - -+#include - #include - #include - #include --- -2.42.0 - diff --git a/sources b/sources index 3c8ab31..fc0a319 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.6.tar.gz) = 214839bd9667dff73eae0cf7dda2f9cb8999654df387c363595e9cbd1eddc6febe73926356dfee26d18ed0f823e1fc21433278428cd083803080635ab5a20eaa -SHA512 (virt-v2v-2.3.6.tar.gz.sig) = b1a0dcff0633231d3edcd5ce46708a2a864e300396290f9dd015552f6a8ac9c5bef0da96d340f313c17f68b35f7f55f2d9db35cb507672b9dc10c85473811aa1 +SHA512 (virt-v2v-2.3.7.tar.gz) = 7b17319c2dbcb594a98d0f2b0605ea9fd6cd6c01fd9cc21f8964b438a280d2c39cb5badb7d992e65d3823a44c8d662a00bdf8b7922991c078cd34d5943db4c1f +SHA512 (virt-v2v-2.3.7.tar.gz.sig) = 2b66218532f8e85804b4cdf059cabb9b64b4619c4c238cca41682581af073fba2389ebad6874ad756c0d382f09e1ca7bc4b89441f7c298406c44ea2a6729dc25 diff --git a/virt-v2v.spec b/virt-v2v.spec index c1680c9..0971e40 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.6 -Release: 2%{?dist} +Version: 2.3.7 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -48,8 +48,6 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif -Patch: 0001-common-Update-submodule.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -310,6 +308,9 @@ done %changelog +* Sat Dec 09 2023 Richard W.M. Jones - 1:2.3.7-1 +- New development branch version 2.3.7 + * Mon Nov 27 2023 Richard W.M. Jones - 1:2.3.6-2 - Fix build for libxml2 2.12.1 From 04f4df603174d1b4c1fed8de94709710d3aaad37 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 9 Dec 2023 13:10:44 +0000 Subject: [PATCH 144/235] Fixes a crash in virt-v2v and virt-customize --- 0001-Update-common-submodule.patch | 29 +++++++++++++++++++++++++++++ virt-v2v.spec | 7 +++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 0001-Update-common-submodule.patch diff --git a/0001-Update-common-submodule.patch b/0001-Update-common-submodule.patch new file mode 100644 index 0000000..4915cc8 --- /dev/null +++ b/0001-Update-common-submodule.patch @@ -0,0 +1,29 @@ +From 056401c8c6db33536c477078008649054f347a9c Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 9 Dec 2023 12:59:13 +0000 +Subject: [PATCH] Update common submodule + +Pick up this bug fix: + + mltools/libosinfo-c.c: Fix off-by-one error +--- + common | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Submodule common cd29aee912..0dba002c20: +diff --git a/common/mltools/libosinfo-c.c b/common/mltools/libosinfo-c.c +index 93357fd..a48c898 100644 +--- a/common/mltools/libosinfo-c.c ++++ b/common/mltools/libosinfo-c.c +@@ -296,7 +296,7 @@ v2v_osinfo_os_get_device_drivers (value osv) + + driver = OSINFO_DEVICE_DRIVER(osinfo_list_get_nth (OSINFO_LIST(list), i)); + +- vi = caml_alloc (6, 0); ++ vi = caml_alloc (7, 0); + str = osinfo_device_driver_get_architecture (driver); + copyv = caml_copy_string (str); + Store_field (vi, 0, copyv); +-- +2.43.0 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 0971e40..4f9b7ef 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -31,6 +31,9 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh +# Fixes a crash in virt-v2v and virt-customize +Patch: 0001-Update-common-submodule.patch + %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather @@ -308,7 +311,7 @@ done %changelog -* Sat Dec 09 2023 Richard W.M. Jones - 1:2.3.7-1 +* Sat Dec 09 2023 Richard W.M. Jones - 1:2.3.7-2 - New development branch version 2.3.7 * Mon Nov 27 2023 Richard W.M. Jones - 1:2.3.6-2 From ba6123fc75adbfd1d44ac6b9d0ab299ab5975a33 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 11 Dec 2023 17:19:35 +0000 Subject: [PATCH 145/235] Fix broken tests 'if test -s ...' Thanks: Laszlo Ersek --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 4f9b7ef..f82a763 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -263,7 +263,7 @@ export LIBGUESTFS_TRACE=1 # working. for f in windows.img fedora.img; do make -C test-data/phony-guests $f - if -s test-data/phony-guests/$f; then + if test -s test-data/phony-guests/$f; then ./run virt-v2v -v -x -i disk test-data/phony-guests/$f -o null fi done From df9fe268dbf9a4363c4ef37b1e1675adc7a8fb88 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Dec 2023 16:05:37 +0000 Subject: [PATCH 146/235] OCaml 5.1.1 rebuild for Fedora 40 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index f82a763..218caa0 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -311,6 +311,9 @@ done %changelog +* Tue Dec 12 2023 Richard W.M. Jones - 1:2.3.7-3 +- OCaml 5.1.1 rebuild for Fedora 40 + * Sat Dec 09 2023 Richard W.M. Jones - 1:2.3.7-2 - New development branch version 2.3.7 From a6ffe0a668b44a95725c3bae07a3a1b47605b2b5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Dec 2023 11:28:46 +0000 Subject: [PATCH 147/235] BR mingw-srvany-redistributable This is needed to run the limited test, else you will see: virt-v2v: error: One of rhsrvany.exe or pvvxsvc.exe is missing in /usr/share/virt-tools. One of them is required in order to install Windows firstboot scripts. You can get one by building rhsrvany (https://github.com/rwmjones/rhsrvany) I'm not quite sure why this error has cropped up now. Perhaps pulled in by an indirect dependency before? --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 218caa0..26debda 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -95,6 +95,7 @@ BuildRequires: nbdkit-file-plugin BuildRequires: nbdkit-null-plugin BuildRequires: nbdkit-python-plugin BuildRequires: nbdkit-cow-filter >= 1.28.3-1.el9 +BuildRequires: mingw-srvany-redistributable >= 1.1-6 %ifarch x86_64 BuildRequires: glibc-static %endif From 6f1854e2fb0623603b2c0f9a92d1ba71ff4dd2f5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Dec 2023 15:33:44 +0000 Subject: [PATCH 148/235] OCaml 5.1.1 + s390x code gen fix for Fedora 40 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 26debda..8d4532f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -312,6 +312,9 @@ done %changelog +* Mon Dec 18 2023 Richard W.M. Jones - 1:2.3.7-4 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + * Tue Dec 12 2023 Richard W.M. Jones - 1:2.3.7-3 - OCaml 5.1.1 rebuild for Fedora 40 From 354d96158433508e6c51d7a907c90ef55b51d293 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 19 Dec 2023 15:51:14 +0000 Subject: [PATCH 149/235] New development branch version 2.3.8 --- 0001-Update-common-submodule.patch | 29 ----------------------------- sources | 4 ++-- virt-v2v.spec | 10 +++++----- 3 files changed, 7 insertions(+), 36 deletions(-) delete mode 100644 0001-Update-common-submodule.patch diff --git a/0001-Update-common-submodule.patch b/0001-Update-common-submodule.patch deleted file mode 100644 index 4915cc8..0000000 --- a/0001-Update-common-submodule.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 056401c8c6db33536c477078008649054f347a9c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 9 Dec 2023 12:59:13 +0000 -Subject: [PATCH] Update common submodule - -Pick up this bug fix: - - mltools/libosinfo-c.c: Fix off-by-one error ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common cd29aee912..0dba002c20: -diff --git a/common/mltools/libosinfo-c.c b/common/mltools/libosinfo-c.c -index 93357fd..a48c898 100644 ---- a/common/mltools/libosinfo-c.c -+++ b/common/mltools/libosinfo-c.c -@@ -296,7 +296,7 @@ v2v_osinfo_os_get_device_drivers (value osv) - - driver = OSINFO_DEVICE_DRIVER(osinfo_list_get_nth (OSINFO_LIST(list), i)); - -- vi = caml_alloc (6, 0); -+ vi = caml_alloc (7, 0); - str = osinfo_device_driver_get_architecture (driver); - copyv = caml_copy_string (str); - Store_field (vi, 0, copyv); --- -2.43.0 - diff --git a/sources b/sources index fc0a319..ced2dc0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.7.tar.gz) = 7b17319c2dbcb594a98d0f2b0605ea9fd6cd6c01fd9cc21f8964b438a280d2c39cb5badb7d992e65d3823a44c8d662a00bdf8b7922991c078cd34d5943db4c1f -SHA512 (virt-v2v-2.3.7.tar.gz.sig) = 2b66218532f8e85804b4cdf059cabb9b64b4619c4c238cca41682581af073fba2389ebad6874ad756c0d382f09e1ca7bc4b89441f7c298406c44ea2a6729dc25 +SHA512 (virt-v2v-2.3.8.tar.gz) = b5ac52131f7aeee5dbe33861081100ae5de0e39bde138b57a75dd5f0351881bffbcbca86558ee0f103f9839d758908740908dcdb37831f6d39c82422b5188352 +SHA512 (virt-v2v-2.3.8.tar.gz.sig) = 6a31e54a3689d294c1de4111e4a153179255eebc7ff43769b8e38938f45311e911976e7cfdd664a1ca16a71b9788c6fd004dbe5585509948ce9dc078bd28e263 diff --git a/virt-v2v.spec b/virt-v2v.spec index 8d4532f..a553d13 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.3.7 -Release: 4%{?dist} +Version: 2.3.8 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -31,9 +31,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -# Fixes a crash in virt-v2v and virt-customize -Patch: 0001-Update-common-submodule.patch - %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather @@ -312,6 +309,9 @@ done %changelog +* Tue Dec 19 2023 Richard W.M. Jones - 1:2.3.8-1 +- New development branch version 2.3.8 + * Mon Dec 18 2023 Richard W.M. Jones - 1:2.3.7-4 - OCaml 5.1.1 + s390x code gen fix for Fedora 40 From 557617d39a5060d0d6aab3939e54adaecf9aaf81 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 4 Jan 2024 18:02:07 +0000 Subject: [PATCH 150/235] New stable branch version 2.4.0 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index ced2dc0..cfd35cf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.3.8.tar.gz) = b5ac52131f7aeee5dbe33861081100ae5de0e39bde138b57a75dd5f0351881bffbcbca86558ee0f103f9839d758908740908dcdb37831f6d39c82422b5188352 -SHA512 (virt-v2v-2.3.8.tar.gz.sig) = 6a31e54a3689d294c1de4111e4a153179255eebc7ff43769b8e38938f45311e911976e7cfdd664a1ca16a71b9788c6fd004dbe5585509948ce9dc078bd28e263 +SHA512 (virt-v2v-2.4.0.tar.gz) = c59c613bcc2474c1efec6a68401d3c1dd4dd6f0e8bfdbc0f77ff2fff2191982c35d14944ca1727aee31e111361ab498e0c0e0d840099a340d05603a36f6e6639 +SHA512 (virt-v2v-2.4.0.tar.gz.sig) = 4b1bd638f0e5489ed4fe076d0b2d2c7e7a7514bca8a4d44f201253147adfbb2d97a4b9b35f884520c6dfbb94f84733d7a61981fbba5e2ecc636eb5d64635658c diff --git a/virt-v2v.spec b/virt-v2v.spec index a553d13..47de2f2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,11 +10,11 @@ %endif # The source directory. -%global source_directory 2.3-development +%global source_directory 2.4-stable Name: virt-v2v Epoch: 1 -Version: 2.3.8 +Version: 2.4.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -309,6 +309,9 @@ done %changelog +* Thu Jan 4 2024 Richard W.M. Jones - 1:2.4.0-1 +- New stable branch version 2.4.0 + * Tue Dec 19 2023 Richard W.M. Jones - 1:2.3.8-1 - New development branch version 2.3.8 From f979570668af2cedadd01a1e7eb91b0a655a4b38 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 4 Jan 2024 18:14:11 +0000 Subject: [PATCH 151/235] Add new virt-v2v-release-notes-2.4(1) man page to %files --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 47de2f2..6b908d3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -290,6 +290,7 @@ done %{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-release-notes-2.0.1* %{_mandir}/man1/virt-v2v-release-notes-2.2.1* +%{_mandir}/man1/virt-v2v-release-notes-2.4.1* %{_mandir}/man1/virt-v2v-support.1* From faab6c711a3b183d60b3f6bbd267e8ca3fac8bab Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 18 Jan 2024 17:29:25 +0000 Subject: [PATCH 152/235] New development branch version 2.5.1 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index cfd35cf..52f9962 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.4.0.tar.gz) = c59c613bcc2474c1efec6a68401d3c1dd4dd6f0e8bfdbc0f77ff2fff2191982c35d14944ca1727aee31e111361ab498e0c0e0d840099a340d05603a36f6e6639 -SHA512 (virt-v2v-2.4.0.tar.gz.sig) = 4b1bd638f0e5489ed4fe076d0b2d2c7e7a7514bca8a4d44f201253147adfbb2d97a4b9b35f884520c6dfbb94f84733d7a61981fbba5e2ecc636eb5d64635658c +SHA512 (virt-v2v-2.5.1.tar.gz) = 999fdbae02007bcaf0e6e5d5d919cdcd2114b906bce1da9df427ffca65376ee7ca9455dbe50fa1449eabaa7cbae445dcd7e6c757ddca068fa0487797f353af15 +SHA512 (virt-v2v-2.5.1.tar.gz.sig) = 8988bc47aadb1b7aa10888e16ea3d19d39ce40167ebe89f2be7503fb17f6d002716b3d516469ea0b8584d6d7f735ba666fad9925c5de0bef82b634d57227a2c5 diff --git a/virt-v2v.spec b/virt-v2v.spec index 6b908d3..db18d72 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -10,11 +10,11 @@ %endif # The source directory. -%global source_directory 2.4-stable +%global source_directory 2.5-development Name: virt-v2v Epoch: 1 -Version: 2.4.0 +Version: 2.5.1 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -310,6 +310,9 @@ done %changelog +* Thu Jan 18 2024 Richard W.M. Jones - 1:2.5.1-1 +- New development branch version 2.5.1 + * Thu Jan 4 2024 Richard W.M. Jones - 1:2.4.0-1 - New stable branch version 2.4.0 From 1dba3b8c1b757d41f9948ee0be87771796abc822 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 07:57:58 +0000 Subject: [PATCH 153/235] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index db18d72..8b8d19d 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -310,6 +310,9 @@ done %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 1:2.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jan 18 2024 Richard W.M. Jones - 1:2.5.1-1 - New development branch version 2.5.1 From 8d27cb1379a7e26812349929a42b4b00b0ce704b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Mar 2024 10:01:12 +0000 Subject: [PATCH 154/235] New development branch version 2.5.2 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 52f9962..f24bd8c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.1.tar.gz) = 999fdbae02007bcaf0e6e5d5d919cdcd2114b906bce1da9df427ffca65376ee7ca9455dbe50fa1449eabaa7cbae445dcd7e6c757ddca068fa0487797f353af15 -SHA512 (virt-v2v-2.5.1.tar.gz.sig) = 8988bc47aadb1b7aa10888e16ea3d19d39ce40167ebe89f2be7503fb17f6d002716b3d516469ea0b8584d6d7f735ba666fad9925c5de0bef82b634d57227a2c5 +SHA512 (virt-v2v-2.5.2.tar.gz) = 2b0eedb58b8e2f6f5550147b4bae0fab2b82e671b711d88cc7f0b43b0e83ed4a6db4218f35b3edbb4d94731602d5bf88045bd371748bff6ec38cca6f85e28cfc +SHA512 (virt-v2v-2.5.2.tar.gz.sig) = 89f5de8b490d01b7c19a0ee29bf2c5d538f4a1067d573e20d889394bae346ce5f0515300bdcaeae1517067dde43410e53e213f5ac413b1d9644b0538df565132 diff --git a/virt-v2v.spec b/virt-v2v.spec index 8b8d19d..d503e43 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -14,8 +14,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.1 -Release: 2%{?dist} +Version: 2.5.2 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -310,6 +310,9 @@ done %changelog +* Tue Mar 12 2024 Richard W.M. Jones - 1:2.5.2-1 +- New development branch version 2.5.2 + * Sat Jan 27 2024 Fedora Release Engineering - 1:2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From db13600d9d85572bdea518e510348f44776d4dd5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Mar 2024 10:10:39 +0000 Subject: [PATCH 155/235] BR bash-completion-devel (new in Rawhide) --- virt-v2v.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index d503e43..2495d8b 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -59,7 +59,7 @@ BuildRequires: ocaml >= 4.04 BuildRequires: libguestfs-devel >= 1:1.49.8-1 BuildRequires: augeas-devel -BuildRequires: bash-completion +BuildRequires: bash-completion, bash-completion-devel BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: jansson-devel @@ -312,6 +312,7 @@ done %changelog * Tue Mar 12 2024 Richard W.M. Jones - 1:2.5.2-1 - New development branch version 2.5.2 +- BR bash-completion-devel (new in Rawhide) * Sat Jan 27 2024 Fedora Release Engineering - 1:2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From c66f3a4d6857d318f59c39b1942dae87603d0625 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 25 Mar 2024 11:17:03 +0000 Subject: [PATCH 156/235] Use %{bash_completions_dir} macro --- virt-v2v.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 2495d8b..2287307 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -296,7 +296,7 @@ done %files bash-completion %license COPYING -%{_datadir}/bash-completion/completions/virt-v2v +%{bash_completions_dir}/virt-v2v %files man-pages-ja @@ -310,6 +310,9 @@ done %changelog +* Mon Mar 25 2024 Richard W.M. Jones - 1:2.5.2-2 +- Use %%{bash_completions_dir} macro + * Tue Mar 12 2024 Richard W.M. Jones - 1:2.5.2-1 - New development branch version 2.5.2 - BR bash-completion-devel (new in Rawhide) From aae2f9ce73a44ab56b6b69206ab54f9763e27a61 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Apr 2024 17:55:14 +0100 Subject: [PATCH 157/235] Unconditionally run autoreconf --- virt-v2v.spec | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 2287307..c7eb533 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -1,14 +1,6 @@ # If we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 -# If there are patches which touch autotools files, set this to 1. -%if !0%{?rhel} -%global patches_touch_autotools %{nil} -%else -# On RHEL the downstream patches always touch autotools files. -%global patches_touch_autotools %{nil} -%endif - # The source directory. %global source_directory 2.5-development @@ -48,10 +40,7 @@ ExcludeArch: %{ix86} ExclusiveArch: x86_64 %endif -%if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool -%endif - BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gcc @@ -211,9 +200,7 @@ for %{name}. %endif %autosetup -p1 -%if 0%{patches_touch_autotools} -autoreconf -i -%endif +autoreconf -fiv %build From 3417df1151664b751c424e0bdb55eb5b044204fb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Apr 2024 17:56:13 +0100 Subject: [PATCH 158/235] New development branch version 2.5.3 --- sources | 4 ++-- virt-v2v.spec | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index f24bd8c..bd7cbc4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.2.tar.gz) = 2b0eedb58b8e2f6f5550147b4bae0fab2b82e671b711d88cc7f0b43b0e83ed4a6db4218f35b3edbb4d94731602d5bf88045bd371748bff6ec38cca6f85e28cfc -SHA512 (virt-v2v-2.5.2.tar.gz.sig) = 89f5de8b490d01b7c19a0ee29bf2c5d538f4a1067d573e20d889394bae346ce5f0515300bdcaeae1517067dde43410e53e213f5ac413b1d9644b0538df565132 +SHA512 (virt-v2v-2.5.3.tar.gz) = 9f6e0618db7c6e57192ad83aeb9f4978935aa387fabe62e952c5ea473fe88973323fb02d43eac615dca33b88590f8a824a3ea761691d273e6853674974c193da +SHA512 (virt-v2v-2.5.3.tar.gz.sig) = c4fc7f3ff201501bdeda1202268da9fa9d393131762a28f38e0addd6397ba2f92a1c4bf811672cac66b54f095293e90a757786f2aec14c2f73da8035403c6b19 diff --git a/virt-v2v.spec b/virt-v2v.spec index c7eb533..97966eb 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.2 -Release: 2%{?dist} +Version: 2.5.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -297,6 +297,10 @@ done %changelog +* Thu Apr 11 2024 Richard W.M. Jones - 1:2.5.3-1 +- New development branch version 2.5.3 +- Unconditionally run autoreconf. + * Mon Mar 25 2024 Richard W.M. Jones - 1:2.5.2-2 - Use %%{bash_completions_dir} macro From 5d4370f7888a20b2b953ad92db59dc4999b4df61 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 12 Apr 2024 22:12:58 +0100 Subject: [PATCH 159/235] Fix bytecode compilation (RHBZ#2274708) --- ...pilation-to-output-whole-exe-instead.patch | 31 +++++++++++++++++++ virt-v2v.spec | 3 ++ 2 files changed, 34 insertions(+) create mode 100644 0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch diff --git a/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch b/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch new file mode 100644 index 0000000..382d18f --- /dev/null +++ b/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch @@ -0,0 +1,31 @@ +From 5eeae696b2c56230d5d5fed5c86b7bf2b3942d4e Mon Sep 17 00:00:00 2001 +From: Jerry James +Date: Fri, 12 Apr 2024 20:11:50 +0100 +Subject: [PATCH] Fix bytecode compilation to output whole exe instead of using + -custom + +These binaries are more resistant to being stripped. + +Reported-by: Ilya Leoshkevich +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2274708 +(cherry picked from guestfs-tools commit c249fd5caca8f1eed439f83e2bb1af46c8a28a27) +--- + subdir-rules.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/subdir-rules.mk b/subdir-rules.mk +index 78d574a813..e969f357b7 100644 +--- a/subdir-rules.mk ++++ b/subdir-rules.mk +@@ -47,7 +47,7 @@ $(top_builddir)/generator/generator: + + if !HAVE_OCAMLOPT + MLARCHIVE = cma +-LINK_CUSTOM_OCAMLC_ONLY = -custom ++LINK_CUSTOM_OCAMLC_ONLY = -output-complete-exe + BEST = c + else + MLARCHIVE = cmxa +-- +2.44.0 + diff --git a/virt-v2v.spec b/virt-v2v.spec index 97966eb..74d7c31 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -23,6 +23,9 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh +# Fix bytecode compilation (RHBZ#2274708) +Patch: 0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch + %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather From c087ce454eb4da068dc2d6e10c19378b7862a2e9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 12 Apr 2024 22:15:18 +0100 Subject: [PATCH 160/235] Bump release - Fix bytecode compilation (RHBZ#2274708) --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 74d7c31..3e1db3d 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -300,6 +300,9 @@ done %changelog +* Fri Apr 12 2024 Richard W.M. Jones - 1:2.5.3-2 +- Fix bytecode compilation (RHBZ#2274708) + * Thu Apr 11 2024 Richard W.M. Jones - 1:2.5.3-1 - New development branch version 2.5.3 - Unconditionally run autoreconf. From 6084b1f112d62ae9f28a47e877b755b84a6f2a18 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 16 Apr 2024 13:02:33 +0100 Subject: [PATCH 161/235] gating: Match any version of RHEL --- gating.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gating.yaml b/gating.yaml index 8c4c77a..336c565 100755 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-9 + - rhel-* decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} From 8aab9f5c68fc11366152d0b98676d91544c997d8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Apr 2024 15:23:35 +0100 Subject: [PATCH 162/235] New upstream development version 2.5.4 --- ...pilation-to-output-whole-exe-instead.patch | 31 ------------------- sources | 4 +-- virt-v2v.spec | 10 +++--- 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch diff --git a/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch b/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch deleted file mode 100644 index 382d18f..0000000 --- a/0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5eeae696b2c56230d5d5fed5c86b7bf2b3942d4e Mon Sep 17 00:00:00 2001 -From: Jerry James -Date: Fri, 12 Apr 2024 20:11:50 +0100 -Subject: [PATCH] Fix bytecode compilation to output whole exe instead of using - -custom - -These binaries are more resistant to being stripped. - -Reported-by: Ilya Leoshkevich -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2274708 -(cherry picked from guestfs-tools commit c249fd5caca8f1eed439f83e2bb1af46c8a28a27) ---- - subdir-rules.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/subdir-rules.mk b/subdir-rules.mk -index 78d574a813..e969f357b7 100644 ---- a/subdir-rules.mk -+++ b/subdir-rules.mk -@@ -47,7 +47,7 @@ $(top_builddir)/generator/generator: - - if !HAVE_OCAMLOPT - MLARCHIVE = cma --LINK_CUSTOM_OCAMLC_ONLY = -custom -+LINK_CUSTOM_OCAMLC_ONLY = -output-complete-exe - BEST = c - else - MLARCHIVE = cmxa --- -2.44.0 - diff --git a/sources b/sources index bd7cbc4..9c7906f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.3.tar.gz) = 9f6e0618db7c6e57192ad83aeb9f4978935aa387fabe62e952c5ea473fe88973323fb02d43eac615dca33b88590f8a824a3ea761691d273e6853674974c193da -SHA512 (virt-v2v-2.5.3.tar.gz.sig) = c4fc7f3ff201501bdeda1202268da9fa9d393131762a28f38e0addd6397ba2f92a1c4bf811672cac66b54f095293e90a757786f2aec14c2f73da8035403c6b19 +SHA512 (virt-v2v-2.5.4.tar.gz) = ea872978eefc9feacb6048bb217449804612e5cc68bfbd1f20e5aaf637ca7ca8be92798ba1cbc1d2d6ddbf6a07628e79beea7db1966150675d9fbda9d4361b7a +SHA512 (virt-v2v-2.5.4.tar.gz.sig) = 02780e8ae0bdff8c5b22b52bdd24d5f9dfa2d808b792abf7f8bcaa8c4e2c12ea52d3f2cd2c64b8a261437db69409f9ea1d12ac182dbc96e2bb5441a434ac7f84 diff --git a/virt-v2v.spec b/virt-v2v.spec index 3e1db3d..135d2ac 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.3 -Release: 2%{?dist} +Version: 2.5.4 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -23,9 +23,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -# Fix bytecode compilation (RHBZ#2274708) -Patch: 0001-Fix-bytecode-compilation-to-output-whole-exe-instead.patch - %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no # kernel built for this architecture any longer and libguestfs rather @@ -300,6 +297,9 @@ done %changelog +* Thu Apr 25 2024 Richard W.M. Jones - 1:2.5.4-1 +- New upstream development version 2.5.4 + * Fri Apr 12 2024 Richard W.M. Jones - 1:2.5.3-2 - Fix bytecode compilation (RHBZ#2274708) From 8b3ce3589904d3514618751ff940c2f93149e599 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 29 May 2024 22:39:22 +0100 Subject: [PATCH 163/235] OCaml 5.2.0 for Fedora 41 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 135d2ac..d4a2486 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -297,6 +297,9 @@ done %changelog +* Wed May 29 2024 Richard W.M. Jones - 1:2.5.4-2 +- OCaml 5.2.0 for Fedora 41 + * Thu Apr 25 2024 Richard W.M. Jones - 1:2.5.4-1 - New upstream development version 2.5.4 From 5c0984165191c0758931c85b0ff848100a486881 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jun 2024 17:00:53 +0100 Subject: [PATCH 164/235] OCaml 5.2.0 ppc64le fix --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index d4a2486..d53c07c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -297,6 +297,9 @@ done %changelog +* Wed Jun 19 2024 Richard W.M. Jones - 1:2.5.4-3 +- OCaml 5.2.0 ppc64le fix + * Wed May 29 2024 Richard W.M. Jones - 1:2.5.4-2 - OCaml 5.2.0 for Fedora 41 From f722fff7336eab416641291ba753b50a9375a836 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jun 2024 17:55:42 +0100 Subject: [PATCH 165/235] BR glibc-utils Avoids this error with latest glibc: ERROR: ld.so: object 'libc_malloc_debug.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. --- virt-v2v.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index d53c07c..ec9a263 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -74,6 +74,7 @@ BuildRequires: ocaml-ounit-devel %endif # These are for running our limited test. +BuildRequires: glibc-utils BuildRequires: %{_bindir}/qemu-nbd BuildRequires: %{_bindir}/nbdcopy BuildRequires: %{_bindir}/nbdinfo From 41bc8532d0c2dd6ee325d8579db7d231afc46cfe Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jul 2024 10:38:25 +0100 Subject: [PATCH 166/235] RHEL 10: Remove virt-v2v-input-xen.1* and virt-v2v-output-rhv.1* See: https://issues.redhat.com/browse/RHEL-36712 https://issues.redhat.com/browse/RHEL-37687 --- virt-v2v.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index ec9a263..ba74fbd 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -267,14 +267,16 @@ done %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* -%{_mandir}/man1/virt-v2v-input-xen.1* %if !0%{?rhel} +%{_mandir}/man1/virt-v2v-input-xen.1* %{_mandir}/man1/virt-v2v-in-place.1* %endif %{_mandir}/man1/virt-v2v-inspector.1* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* +%if !0%{?rhel} %{_mandir}/man1/virt-v2v-output-rhv.1* +%endif %{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-release-notes-2.0.1* %{_mandir}/man1/virt-v2v-release-notes-2.2.1* From 37f4f2f35dc14de187f53abc82c0e0054c315243 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Jul 2024 11:25:24 +0100 Subject: [PATCH 167/235] Install virt-v2v-in-place as unsupported tool on RHEL On RHEL we want to ship virt-v2v-in-place, but it is not supported, so move it to libexec and remove the documentation. Fixes: https://issues.redhat.com/browse/RHEL-40903 --- virt-v2v.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index ba74fbd..3ea2d2c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -222,8 +222,10 @@ make V=1 %{?_smp_mflags} find $RPM_BUILD_ROOT -name '*.la' -delete %if 0%{?rhel} -# On RHEL remove virt-v2v-in-place. -rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place +# On RHEL move virt-v2v-in-place to libexec since it is not supported, +# and remove the documentation. +mkdir -p $RPM_BUILD_ROOT%{_libexecdir} +mv $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place $RPM_BUILD_ROOT%{_libexecdir}/ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %endif @@ -262,6 +264,8 @@ done %{_bindir}/virt-v2v %if !0%{?rhel} %{_bindir}/virt-v2v-in-place +%else +%{_libexecdir}/virt-v2v-in-place %endif %{_bindir}/virt-v2v-inspector %{_mandir}/man1/virt-v2v.1* From 4ca1dbba4b7aba2b9eb4fc93a7a740922524e958 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Jul 2024 12:28:07 +0100 Subject: [PATCH 168/235] New upstream development version 2.5.5 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 9c7906f..d3310de 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.4.tar.gz) = ea872978eefc9feacb6048bb217449804612e5cc68bfbd1f20e5aaf637ca7ca8be92798ba1cbc1d2d6ddbf6a07628e79beea7db1966150675d9fbda9d4361b7a -SHA512 (virt-v2v-2.5.4.tar.gz.sig) = 02780e8ae0bdff8c5b22b52bdd24d5f9dfa2d808b792abf7f8bcaa8c4e2c12ea52d3f2cd2c64b8a261437db69409f9ea1d12ac182dbc96e2bb5441a434ac7f84 +SHA512 (virt-v2v-2.5.5.tar.gz) = 06c8ba67cb604387c5aa371815b0be333378eac2bc3672f6f5c61d6914ed93b49d72355a9e549aca1e3f6d4bf07b357b800aa4e30cd7fe14de05d39f1c4a4007 +SHA512 (virt-v2v-2.5.5.tar.gz.sig) = 74397d5d890018ac604d1f563ec2d2298c34dd01b406a90d8e3db52a0f80696938dd7d93a08c93130780a2b6e9f47c74c9eb9be5b7c7c2e0a4fdf72561d40d08 diff --git a/virt-v2v.spec b/virt-v2v.spec index 3ea2d2c..4a55552 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.4 -Release: 3%{?dist} +Version: 2.5.5 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -304,6 +304,9 @@ done %changelog +* Thu Jul 11 2024 Richard W.M. Jones - 1:2.5.5-1 +- New upstream development version 2.5.5 + * Wed Jun 19 2024 Richard W.M. Jones - 1:2.5.4-3 - OCaml 5.2.0 ppc64le fix From 0a9c525871cdf5b77b751c7f82b82e68effac836 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Jul 2024 12:46:58 +0100 Subject: [PATCH 169/235] Fix basic test on RHEL 10 --- tests/basic-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 17fc7c3..71929e0 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -7,7 +7,7 @@ set -x # team using a mix of automated and manual testing. # Fix libvirt. -systemctl restart libvirtd +systemctl restart virtqemud virtsecretd virtstoraged virtnetworkd virt-builder fedora-30 virt-v2v -i disk fedora-30.img -o null From fec9e2b674bb95fbc3c3d37262fda4e8ceb986e8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 17 Jul 2024 11:51:23 +0100 Subject: [PATCH 170/235] Remove python dependencies for RHEL 10 Only used by -o rhv-upload which has been removed. --- virt-v2v.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 4a55552..8341ec4 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -80,7 +80,9 @@ BuildRequires: %{_bindir}/nbdcopy BuildRequires: %{_bindir}/nbdinfo BuildRequires: nbdkit-file-plugin BuildRequires: nbdkit-null-plugin +%if !0%{?rhel} BuildRequires: nbdkit-python-plugin +%endif BuildRequires: nbdkit-cow-filter >= 1.28.3-1.el9 BuildRequires: mingw-srvany-redistributable >= 1.1-6 %ifarch x86_64 @@ -118,10 +120,11 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -%if 0%{?rhel} != 8 +%if !0%{?rhel} Requires: python3 -%else +%elif %{?rhel} == 9 Requires: platform-python +# Python is not needed by RHEL 10. %endif Requires: libnbd >= 1.10 Requires: %{_bindir}/qemu-nbd @@ -132,7 +135,9 @@ Requires: nbdkit-curl-plugin Requires: nbdkit-file-plugin Requires: nbdkit-nbd-plugin Requires: nbdkit-null-plugin +%if !0%{?rhel} Requires: nbdkit-python-plugin +%endif Requires: nbdkit-ssh-plugin %ifarch x86_64 Requires: nbdkit-vddk-plugin From 6b78c8afd5070c21cec3ccac88956f3ad6b23249 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:53:08 +0000 Subject: [PATCH 171/235] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 8341ec4..3ce3f15 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -309,6 +309,9 @@ done %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1:2.5.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jul 11 2024 Richard W.M. Jones - 1:2.5.5-1 - New upstream development version 2.5.5 From c3753c426c7cf96745770819dac1ca52ce138c39 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 22 Jul 2024 15:01:48 +0100 Subject: [PATCH 172/235] Depend on /usr/bin/python3 instead of python3 for -o rhv-upload scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_dependencies Thanks: Miro Hrončok --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 3ce3f15..9061b00 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -121,7 +121,7 @@ Requires: edk2-aarch64 %endif %if !0%{?rhel} -Requires: python3 +Requires: /usr/bin/python3 %elif %{?rhel} == 9 Requires: platform-python # Python is not needed by RHEL 10. From fe16fdb390579f4aff2abd03fcbf7963fb5c8b3c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Jul 2024 17:03:30 +0100 Subject: [PATCH 173/235] New upstream development version 2.5.6 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index d3310de..8cd4356 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.5.tar.gz) = 06c8ba67cb604387c5aa371815b0be333378eac2bc3672f6f5c61d6914ed93b49d72355a9e549aca1e3f6d4bf07b357b800aa4e30cd7fe14de05d39f1c4a4007 -SHA512 (virt-v2v-2.5.5.tar.gz.sig) = 74397d5d890018ac604d1f563ec2d2298c34dd01b406a90d8e3db52a0f80696938dd7d93a08c93130780a2b6e9f47c74c9eb9be5b7c7c2e0a4fdf72561d40d08 +SHA512 (virt-v2v-2.5.6.tar.gz) = 86cc41042518d1ea62627c6fa0605f42dcc397e7ddc3c549bcdc3f54e3703426c14f8b42e102483afb0fad818ff569e1440042c624e9fecf3d04f14233b7a3f5 +SHA512 (virt-v2v-2.5.6.tar.gz.sig) = 39d7fcdb88b1abe325b3f3c2e8bda506fb8ecf41d5adb09e7c6bcd84f881cb73a897c1556735c49e420955ae0cc79614c42930495088d8ae6a3bc0cf39ff93f9 diff --git a/virt-v2v.spec b/virt-v2v.spec index 9061b00..fbd233b 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.5 -Release: 2%{?dist} +Version: 2.5.6 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -309,6 +309,9 @@ done %changelog +* Tue Jul 30 2024 Richard W.M. Jones - 1:2.5.6-1 +- New upstream development version 2.5.6 + * Sat Jul 20 2024 Fedora Release Engineering - 1:2.5.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From c7a2f1f49aec901277541c5e26e6b6b1ffcc8c01 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 13 Aug 2024 11:57:34 +0100 Subject: [PATCH 174/235] New upstream development version 2.5.7 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8cd4356..085af98 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.6.tar.gz) = 86cc41042518d1ea62627c6fa0605f42dcc397e7ddc3c549bcdc3f54e3703426c14f8b42e102483afb0fad818ff569e1440042c624e9fecf3d04f14233b7a3f5 -SHA512 (virt-v2v-2.5.6.tar.gz.sig) = 39d7fcdb88b1abe325b3f3c2e8bda506fb8ecf41d5adb09e7c6bcd84f881cb73a897c1556735c49e420955ae0cc79614c42930495088d8ae6a3bc0cf39ff93f9 +SHA512 (virt-v2v-2.5.7.tar.gz) = a0543d3823e29b08c01490040b608dc49d1710ca15498bcd6e8442ed318d42117d04954b044a9db6c9a87d05db700f8d57ffd0cbac540f070cf855cc78bffe5f +SHA512 (virt-v2v-2.5.7.tar.gz.sig) = f5f4e4e91d79c5852cd421a3af1c2e1d58d832eac96076bc91783944ebc511d4f609d29354096adc5751928248364be57def2aafdb597dd6aa1d16d3a034b4a9 diff --git a/virt-v2v.spec b/virt-v2v.spec index fbd233b..60f55a3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.6 +Version: 2.5.7 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -309,6 +309,9 @@ done %changelog +* Tue Aug 13 2024 Richard W.M. Jones - 1:2.5.7-1 +- New upstream development version 2.5.7 + * Tue Jul 30 2024 Richard W.M. Jones - 1:2.5.6-1 - New upstream development version 2.5.6 From 8935660aa2368d661fc0694970dc84e2c552796b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 20 Aug 2024 12:19:25 +0100 Subject: [PATCH 175/235] New upstream development version 2.5.8 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 085af98..9789f5b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.7.tar.gz) = a0543d3823e29b08c01490040b608dc49d1710ca15498bcd6e8442ed318d42117d04954b044a9db6c9a87d05db700f8d57ffd0cbac540f070cf855cc78bffe5f -SHA512 (virt-v2v-2.5.7.tar.gz.sig) = f5f4e4e91d79c5852cd421a3af1c2e1d58d832eac96076bc91783944ebc511d4f609d29354096adc5751928248364be57def2aafdb597dd6aa1d16d3a034b4a9 +SHA512 (virt-v2v-2.5.8.tar.gz) = 48540aafe029ae61d6cffa5bb949324646561c73d6d4fdcc2662664b9fdf631239a94a768f82097304f047f2b28025c6fecd083d2a53c168c72ddf68733f3b0a +SHA512 (virt-v2v-2.5.8.tar.gz.sig) = afc66be86b8e3234c0a0592df7f2ee2a214c9338c0eed19fa4d56db7d680e0c6b0c1766a0790a152378cce2edc60be7111fa8e027223202974e070b7f7939eac diff --git a/virt-v2v.spec b/virt-v2v.spec index 60f55a3..a4ad46a 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.7 +Version: 2.5.8 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -309,6 +309,9 @@ done %changelog +* Tue Aug 20 2024 Richard W.M. Jones - 1:2.5.8-1 +- New upstream development version 2.5.8 + * Tue Aug 13 2024 Richard W.M. Jones - 1:2.5.7-1 - New upstream development version 2.5.7 From 325d55230c464e058edd559bcb020fa04bbdd1a3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 29 Aug 2024 15:42:16 +0100 Subject: [PATCH 176/235] New upstream development version 2.5.9 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 9789f5b..80b1d9e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.8.tar.gz) = 48540aafe029ae61d6cffa5bb949324646561c73d6d4fdcc2662664b9fdf631239a94a768f82097304f047f2b28025c6fecd083d2a53c168c72ddf68733f3b0a -SHA512 (virt-v2v-2.5.8.tar.gz.sig) = afc66be86b8e3234c0a0592df7f2ee2a214c9338c0eed19fa4d56db7d680e0c6b0c1766a0790a152378cce2edc60be7111fa8e027223202974e070b7f7939eac +SHA512 (virt-v2v-2.5.9.tar.gz) = 93c557439f69e1ab75ad7caf6bd42e3877aff9454f844dad99d9296bbc2caa45a319ae5688c8f184acd5702cd7e732627591db2ff39292af62a6f61bba76d597 +SHA512 (virt-v2v-2.5.9.tar.gz.sig) = 2d687146ad6d6c3ab9791ac5c064f4f6cfb97209e08a081c51104bf9c3aba5cb9e00689692fd70831caa5c6405b40e5e67b8f4f92ec95200ac3d97dd4c3ce298 diff --git a/virt-v2v.spec b/virt-v2v.spec index a4ad46a..5439ee8 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.8 +Version: 2.5.9 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -309,6 +309,9 @@ done %changelog +* Thu Aug 29 2024 Richard W.M. Jones - 1:2.5.9-1 +- New upstream development version 2.5.9 + * Tue Aug 20 2024 Richard W.M. Jones - 1:2.5.8-1 - New upstream development version 2.5.8 From 0cc7156fdfd6b900d6c6a468f5eab4730a49fdd3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 10 Sep 2024 10:53:46 +0100 Subject: [PATCH 177/235] New upstream development version 2.5.10 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 80b1d9e..86e77c6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.9.tar.gz) = 93c557439f69e1ab75ad7caf6bd42e3877aff9454f844dad99d9296bbc2caa45a319ae5688c8f184acd5702cd7e732627591db2ff39292af62a6f61bba76d597 -SHA512 (virt-v2v-2.5.9.tar.gz.sig) = 2d687146ad6d6c3ab9791ac5c064f4f6cfb97209e08a081c51104bf9c3aba5cb9e00689692fd70831caa5c6405b40e5e67b8f4f92ec95200ac3d97dd4c3ce298 +SHA512 (virt-v2v-2.5.10.tar.gz) = 3dfe32df4c0a552c2e416cf310bc0f5576b6a9e4e8224437a66ae3779b8beaef2bca60db3ca77f4ccf6c2a1266641c3112b2be9ad5f9492de234b69e7c43be6d +SHA512 (virt-v2v-2.5.10.tar.gz.sig) = 74ddedf4b9d999ee0f8b631a684b8edee5ea52f579f779863373b35bf778fc42f4dd07566251a0e748b65b4285c5c3dfe9006935bd7815a78bb0eb6ef8638ef4 diff --git a/virt-v2v.spec b/virt-v2v.spec index 5439ee8..63b3f49 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.9 +Version: 2.5.10 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -309,6 +309,9 @@ done %changelog +* Tue Sep 10 2024 Richard W.M. Jones - 1:2.5.10-1 +- New upstream development version 2.5.10 + * Thu Aug 29 2024 Richard W.M. Jones - 1:2.5.9-1 - New upstream development version 2.5.9 From 90d18ab510a2403cfc634056ca9c17584196d7be Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 10 Sep 2024 23:16:25 -0400 Subject: [PATCH 178/235] Fix ELN build These manpages are excludes in %files, as these features are not supported on RHEL. --- virt-v2v.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index 63b3f49..8c2576f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -232,6 +232,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mv $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place $RPM_BUILD_ROOT%{_libexecdir}/ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* +# these are also not supported on RHEL +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-input-xen.1* +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-output-rhv.1* %endif # Find locale files. From ff66613be20c4af9a93e4f9b43a9635d077948de Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Oct 2024 13:22:26 +0100 Subject: [PATCH 179/235] New upstream development version 2.5.11 --- sources | 4 ++-- virt-v2v.spec | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 86e77c6..4a90e65 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.10.tar.gz) = 3dfe32df4c0a552c2e416cf310bc0f5576b6a9e4e8224437a66ae3779b8beaef2bca60db3ca77f4ccf6c2a1266641c3112b2be9ad5f9492de234b69e7c43be6d -SHA512 (virt-v2v-2.5.10.tar.gz.sig) = 74ddedf4b9d999ee0f8b631a684b8edee5ea52f579f779863373b35bf778fc42f4dd07566251a0e748b65b4285c5c3dfe9006935bd7815a78bb0eb6ef8638ef4 +SHA512 (virt-v2v-2.5.11.tar.gz) = 275529228b6d1cb630ee84053d5c77ee984eb60521d2079ec364a3fa529e77ff628c340de6ad0b1e29b43b06a2004df07e929a3e3f0bd47f7d84d8ca5e803ca5 +SHA512 (virt-v2v-2.5.11.tar.gz.sig) = cc6298fecce15a319756188ea41eabd4177ae16144416aa7ded3dbb0a0bb24611f8f2dc35c5f263163b9050fc2406f427a9004f38f94bddbbdf3750033ba3871 diff --git a/virt-v2v.spec b/virt-v2v.spec index 8c2576f..b21901c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.5.10 +Version: 2.5.11 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -290,9 +290,7 @@ done %{_mandir}/man1/virt-v2v-output-rhv.1* %endif %{_mandir}/man1/virt-v2v-release-notes-1.42.1* -%{_mandir}/man1/virt-v2v-release-notes-2.0.1* -%{_mandir}/man1/virt-v2v-release-notes-2.2.1* -%{_mandir}/man1/virt-v2v-release-notes-2.4.1* +%{_mandir}/man1/virt-v2v-release-notes-2.*.1* %{_mandir}/man1/virt-v2v-support.1* @@ -312,6 +310,9 @@ done %changelog +* Thu Oct 03 2024 Richard W.M. Jones - 1:2.5.11-1 +- New upstream development version 2.5.11 + * Tue Sep 10 2024 Richard W.M. Jones - 1:2.5.10-1 - New upstream development version 2.5.10 From a53ed8e5fc9a76fa7689ea81a22ca660b5d77603 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Oct 2024 15:00:56 +0100 Subject: [PATCH 180/235] New upstream stable version 2.6.0 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 4a90e65..2a2aa81 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.5.11.tar.gz) = 275529228b6d1cb630ee84053d5c77ee984eb60521d2079ec364a3fa529e77ff628c340de6ad0b1e29b43b06a2004df07e929a3e3f0bd47f7d84d8ca5e803ca5 -SHA512 (virt-v2v-2.5.11.tar.gz.sig) = cc6298fecce15a319756188ea41eabd4177ae16144416aa7ded3dbb0a0bb24611f8f2dc35c5f263163b9050fc2406f427a9004f38f94bddbbdf3750033ba3871 +SHA512 (virt-v2v-2.6.0.tar.gz) = bc7ecf99e66bae057eaf5d7c82ca38ded4aa6ef8732544bc7079f2894c9c79542a415fede02cf8c2cb7e83756683457c705f816b1da57e5ca9565350b9376a73 +SHA512 (virt-v2v-2.6.0.tar.gz.sig) = 630166caf41d48ac2efca646611248263e58a4e7e644a7606b647911164a39a449ae3916d05248d48e80925f3f9179b1cfb850001b0f3dd30a48c301d62b11a0 diff --git a/virt-v2v.spec b/virt-v2v.spec index b21901c..9bd1e65 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,11 +2,11 @@ %global verify_tarball_signature 1 # The source directory. -%global source_directory 2.5-development +%global source_directory 2.6-stable Name: virt-v2v Epoch: 1 -Version: 2.5.11 +Version: 2.6.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -310,6 +310,9 @@ done %changelog +* Tue Oct 08 2024 Richard W.M. Jones - 1:2.6.0-1 +- New upstream stable version 2.6.0 + * Thu Oct 03 2024 Richard W.M. Jones - 1:2.5.11-1 - New upstream development version 2.5.11 From 6fddb7b7d939d6053247e535e3f2b4460fec3eb1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Oct 2024 13:41:23 +0100 Subject: [PATCH 181/235] Rebuild for Jansson 2.14 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) --- virt-v2v.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 9bd1e65..cc7aa74 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.6.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -310,6 +310,10 @@ done %changelog +* Tue Oct 22 2024 Richard W.M. Jones - 1:2.6.0-2 +- Rebuild for Jansson 2.14 + (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) + * Tue Oct 08 2024 Richard W.M. Jones - 1:2.6.0-1 - New upstream stable version 2.6.0 From c28b7c26fcdafa0c4294311c7ddf59e1cf5206d3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Oct 2024 17:53:22 +0100 Subject: [PATCH 182/235] New upstream development version 2.7.1 Replace jansson with json-c --- sources | 4 ++-- virt-v2v.spec | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 2a2aa81..09dd863 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.6.0.tar.gz) = bc7ecf99e66bae057eaf5d7c82ca38ded4aa6ef8732544bc7079f2894c9c79542a415fede02cf8c2cb7e83756683457c705f816b1da57e5ca9565350b9376a73 -SHA512 (virt-v2v-2.6.0.tar.gz.sig) = 630166caf41d48ac2efca646611248263e58a4e7e644a7606b647911164a39a449ae3916d05248d48e80925f3f9179b1cfb850001b0f3dd30a48c301d62b11a0 +SHA512 (virt-v2v-2.7.1.tar.gz) = 11f5528a48208050fda9c64c8aa6dcfd28352e26c96f15059ef66230577e87cae79286dbe035ee5fdf3c43398cba1f94569e11ff3871b26f21e7a6265a4bfa6d +SHA512 (virt-v2v-2.7.1.tar.gz.sig) = a73bce78f116f68565e1288c130c0ea4adc4e1d87174f72fc9aeff747c541afd16404d59d12d0431d50b83a9d0dbe5ff12dddbfed97d2e1d431212a895078cad diff --git a/virt-v2v.spec b/virt-v2v.spec index cc7aa74..641acbf 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,12 +2,12 @@ %global verify_tarball_signature 1 # The source directory. -%global source_directory 2.6-stable +%global source_directory 2.7-development Name: virt-v2v Epoch: 1 -Version: 2.6.0 -Release: 2%{?dist} +Version: 2.7.1 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -51,7 +51,7 @@ BuildRequires: augeas-devel BuildRequires: bash-completion, bash-completion-devel BuildRequires: file-devel BuildRequires: gettext-devel -BuildRequires: jansson-devel +BuildRequires: json-c-devel BuildRequires: libnbd-devel BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm @@ -310,6 +310,10 @@ done %changelog +* Tue Oct 22 2024 Richard W.M. Jones - 1:2.7.1-1 +- New upstream development version 2.7.1 +- Replace jansson with json-c + * Tue Oct 22 2024 Richard W.M. Jones - 1:2.6.0-2 - Rebuild for Jansson 2.14 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/) From 501cdb20ae8ee363a10c742359b631335e5eb03f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Nov 2024 14:52:32 +0000 Subject: [PATCH 183/235] New upstream development version 2.7.2 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 09dd863..2e52a3d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.1.tar.gz) = 11f5528a48208050fda9c64c8aa6dcfd28352e26c96f15059ef66230577e87cae79286dbe035ee5fdf3c43398cba1f94569e11ff3871b26f21e7a6265a4bfa6d -SHA512 (virt-v2v-2.7.1.tar.gz.sig) = a73bce78f116f68565e1288c130c0ea4adc4e1d87174f72fc9aeff747c541afd16404d59d12d0431d50b83a9d0dbe5ff12dddbfed97d2e1d431212a895078cad +SHA512 (virt-v2v-2.7.2.tar.gz) = 19e3277af13734462c871db7b6d09f003a326c093dcbb97da19ca575708a21f3735992a9f870cb895f12ccafa3b6ecb3337d9a5fbbe3151df6e2d801d91e89c0 +SHA512 (virt-v2v-2.7.2.tar.gz.sig) = e71a07b5f35a00e917255936743afd9feced3ab6a4ada106ed42d309feca1ef1f7da1476910f041500c28ab12eeb7eaeffe94b6df6d535fcfe6a102ef8bbfab6 diff --git a/virt-v2v.spec b/virt-v2v.spec index 641acbf..d6655ab 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.1 +Version: 2.7.2 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -310,6 +310,9 @@ done %changelog +* Mon Nov 18 2024 Richard W.M. Jones - 1:2.7.2-1 +- New upstream development version 2.7.2 + * Tue Oct 22 2024 Richard W.M. Jones - 1:2.7.1-1 - New upstream development version 2.7.1 - Replace jansson with json-c From 36d6e0b700a1ab296b65934c42646e81be3fbf3b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 2 Dec 2024 18:35:02 +0000 Subject: [PATCH 184/235] New upstream development version 2.7.3 New upstream development version 2.7.3 New upstream development version 2.7.3 New upstream development version 2.7.3 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 2e52a3d..60712b5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.2.tar.gz) = 19e3277af13734462c871db7b6d09f003a326c093dcbb97da19ca575708a21f3735992a9f870cb895f12ccafa3b6ecb3337d9a5fbbe3151df6e2d801d91e89c0 -SHA512 (virt-v2v-2.7.2.tar.gz.sig) = e71a07b5f35a00e917255936743afd9feced3ab6a4ada106ed42d309feca1ef1f7da1476910f041500c28ab12eeb7eaeffe94b6df6d535fcfe6a102ef8bbfab6 +SHA512 (virt-v2v-2.7.3.tar.gz) = 669717474536fe73c5ed0fdf9598da66f59ef9b3a4795eab3ce670e48027fe5b29236d8c7012921e122df9b1a21a35f98ee6cd7f92f1b64dba34f164a5ed02b3 +SHA512 (virt-v2v-2.7.3.tar.gz.sig) = b2641d21078eae317bfa14f81c830496210bc943929402235357b64938e30d3de187fe7bbee80cc08742883bbb69ee399215a1227123d91960cc9a28f153268d diff --git a/virt-v2v.spec b/virt-v2v.spec index d6655ab..fd8d1f2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.2 +Version: 2.7.3 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -310,6 +310,9 @@ done %changelog +* Mon Dec 02 2024 Richard W.M. Jones - 1:2.7.3-1 +- New upstream development version 2.7.3 + * Mon Nov 18 2024 Richard W.M. Jones - 1:2.7.2-1 - New upstream development version 2.7.2 From d0673fc50f554aff55cea09110524ed4e8b7ea51 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 9 Dec 2024 17:43:29 +0000 Subject: [PATCH 185/235] New upstream development version 2.7.4 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 60712b5..c15d1c4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.3.tar.gz) = 669717474536fe73c5ed0fdf9598da66f59ef9b3a4795eab3ce670e48027fe5b29236d8c7012921e122df9b1a21a35f98ee6cd7f92f1b64dba34f164a5ed02b3 -SHA512 (virt-v2v-2.7.3.tar.gz.sig) = b2641d21078eae317bfa14f81c830496210bc943929402235357b64938e30d3de187fe7bbee80cc08742883bbb69ee399215a1227123d91960cc9a28f153268d +SHA512 (virt-v2v-2.7.4.tar.gz) = b59df1d26929ef6ed1e2599e044d3fd6e05df4c37f2854f2c567554918e0b106ffbd535be50b9bc32dbfc9d3fc5feadf157e51d394f5989449f6eb18b0a3d8dc +SHA512 (virt-v2v-2.7.4.tar.gz.sig) = a28b5c6c6ff7599bfb771ee649101745dcfff9b9e51846b7c057764565dbb5c0c80ac22e2167f875df88e466a251f760e951ee7b92672fca6b49c4d3bd8db143 diff --git a/virt-v2v.spec b/virt-v2v.spec index fd8d1f2..c217851 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.3 +Version: 2.7.4 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -310,6 +310,9 @@ done %changelog +* Mon Dec 09 2024 Richard W.M. Jones - 1:2.7.4-1 +- New upstream development version 2.7.4 + * Mon Dec 02 2024 Richard W.M. Jones - 1:2.7.3-1 - New upstream development version 2.7.3 From 0c56c2baacb52f2856745037a3215debf7227fb6 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 10 Jan 2025 14:40:37 -0700 Subject: [PATCH 186/235] OCaml 5.3.0 rebuild for Fedora 42 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index c217851..2aae3b9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.7.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -310,6 +310,9 @@ done %changelog +* Fri Jan 10 2025 Jerry James - 1:2.7.4-2 +- OCaml 5.3.0 rebuild for Fedora 42 + * Mon Dec 09 2024 Richard W.M. Jones - 1:2.7.4-1 - New upstream development version 2.7.4 From 5cf65da2df2703100ce661e235cac5e54c1b4d99 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 14:28:22 +0000 Subject: [PATCH 187/235] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 2aae3b9..1838740 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.7.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -310,6 +310,9 @@ done %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 1:2.7.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jan 10 2025 Jerry James - 1:2.7.4-2 - OCaml 5.3.0 rebuild for Fedora 42 From ec7068338036acf2760cda65ac5dc285d5c42d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 1 Feb 2025 19:58:09 +0100 Subject: [PATCH 188/235] Add explicit BR: libxcrypt-devel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- virt-v2v.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 1838740..487daec 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.7.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -56,6 +56,7 @@ BuildRequires: libnbd-devel BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm BuildRequires: libvirt-devel +BuildRequires: libxcrypt-devel BuildRequires: libxml2-devel BuildRequires: pcre2-devel BuildRequires: perl(Sys::Guestfs) @@ -310,6 +311,9 @@ done %changelog +* Sat Feb 01 2025 Björn Esser - 1:2.7.4-4 +- Add explicit BR: libxcrypt-devel + * Sun Jan 19 2025 Fedora Release Engineering - 1:2.7.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From ea0459111dcd66abd1b10153ddb67d3f0ba57cfb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Feb 2025 15:12:04 +0000 Subject: [PATCH 189/235] Bump and rebuild (RHBZ#2341511) Move to OCaml 4.08, new baseline version upstream. --- virt-v2v.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 487daec..d8f51d6 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.7.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -44,7 +44,7 @@ BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gcc -BuildRequires: ocaml >= 4.04 +BuildRequires: ocaml >= 4.08 BuildRequires: libguestfs-devel >= 1:1.49.8-1 BuildRequires: augeas-devel @@ -311,6 +311,9 @@ done %changelog +* Tue Feb 04 2025 Richard W.M. Jones - 1:2.7.4-5 +- Bump and rebuild (RHBZ#2341511) + * Sat Feb 01 2025 Björn Esser - 1:2.7.4-4 - Add explicit BR: libxcrypt-devel From 938ffd31a882d343e64f13864659513b5baefa23 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 5 Feb 2025 15:26:39 +0000 Subject: [PATCH 190/235] New upstream development version 2.7.5 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index c15d1c4..b1d2f7f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.4.tar.gz) = b59df1d26929ef6ed1e2599e044d3fd6e05df4c37f2854f2c567554918e0b106ffbd535be50b9bc32dbfc9d3fc5feadf157e51d394f5989449f6eb18b0a3d8dc -SHA512 (virt-v2v-2.7.4.tar.gz.sig) = a28b5c6c6ff7599bfb771ee649101745dcfff9b9e51846b7c057764565dbb5c0c80ac22e2167f875df88e466a251f760e951ee7b92672fca6b49c4d3bd8db143 +SHA512 (virt-v2v-2.7.5.tar.gz) = e852fcfd1229023f3f5ae3cbfe6a76f8c13400fe2fb70609ebeaa5edb6d87acd0ab4bcc614a24940de18545972a038045cfa03262fca1b85b163d56924d52cac +SHA512 (virt-v2v-2.7.5.tar.gz.sig) = 45cd3c8be8f6bb0e2c7aea42b0d9694d3e2820bdc346faebf368c07e1de8f872c45e5a2fcd852c15e759942d80772fd40bcdf7dd52d3a771d06d62d2ada30a42 diff --git a/virt-v2v.spec b/virt-v2v.spec index d8f51d6..438610f 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.4 -Release: 5%{?dist} +Version: 2.7.5 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -311,6 +311,9 @@ done %changelog +* Wed Feb 05 2025 Richard W.M. Jones - 1:2.7.5-1 +- New upstream development version 2.7.5 + * Tue Feb 04 2025 Richard W.M. Jones - 1:2.7.4-5 - Bump and rebuild (RHBZ#2341511) From 68cc862c48dce79772a43f7ade941e0e58f4e7e7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 13 Feb 2025 09:54:55 +0000 Subject: [PATCH 191/235] New upstream development version 2.7.6 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index b1d2f7f..bd53cbf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.5.tar.gz) = e852fcfd1229023f3f5ae3cbfe6a76f8c13400fe2fb70609ebeaa5edb6d87acd0ab4bcc614a24940de18545972a038045cfa03262fca1b85b163d56924d52cac -SHA512 (virt-v2v-2.7.5.tar.gz.sig) = 45cd3c8be8f6bb0e2c7aea42b0d9694d3e2820bdc346faebf368c07e1de8f872c45e5a2fcd852c15e759942d80772fd40bcdf7dd52d3a771d06d62d2ada30a42 +SHA512 (virt-v2v-2.7.6.tar.gz) = da70b2ceb0ddf691e2558c17d18f61814027dddaff2b7c83211139fa3690df00abf61c67a3a0e164591f400a47fd8c12f4ef8b97ee3b6b61bbefd156d9c30141 +SHA512 (virt-v2v-2.7.6.tar.gz.sig) = 2ad432847ca5653fede175911cfa873eb5a2479d6ccb317a7104650e8e5ec4a8c930588221f4aef7c4cadc0411a1220b2c51a676c0187276bf20d8e34b50a890 diff --git a/virt-v2v.spec b/virt-v2v.spec index 438610f..bc3dffa 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.5 +Version: 2.7.6 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -311,6 +311,9 @@ done %changelog +* Thu Feb 13 2025 Richard W.M. Jones - 1:2.7.6-1 +- New upstream development version 2.7.6 + * Wed Feb 05 2025 Richard W.M. Jones - 1:2.7.5-1 - New upstream development version 2.7.5 From 1765b12755ea534df67cd326766a1af00a7c4163 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Feb 2025 09:37:21 +0000 Subject: [PATCH 192/235] Bump and rebuild for ocaml-gettext 0.5.0 --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index bc3dffa..fdbaab8 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.7.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -311,6 +311,9 @@ done %changelog +* Thu Feb 27 2025 Richard W.M. Jones - 1:2.7.6-2 +- Bump and rebuild for ocaml-gettext 0.5.0 + * Thu Feb 13 2025 Richard W.M. Jones - 1:2.7.6-1 - New upstream development version 2.7.6 From 27be67588bde942689b5ae0fa70235c5e6ef010f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Feb 2025 18:24:35 +0000 Subject: [PATCH 193/235] New upstream development version 2.7.7 Disable gettext support in Fedora Rawhide --- sources | 4 ++-- virt-v2v.spec | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sources b/sources index bd53cbf..dcc29aa 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.6.tar.gz) = da70b2ceb0ddf691e2558c17d18f61814027dddaff2b7c83211139fa3690df00abf61c67a3a0e164591f400a47fd8c12f4ef8b97ee3b6b61bbefd156d9c30141 -SHA512 (virt-v2v-2.7.6.tar.gz.sig) = 2ad432847ca5653fede175911cfa873eb5a2479d6ccb317a7104650e8e5ec4a8c930588221f4aef7c4cadc0411a1220b2c51a676c0187276bf20d8e34b50a890 +SHA512 (virt-v2v-2.7.7.tar.gz) = 05f4cedb45c6a3596b4ec4922f018497a4852a1a20b14161068e556003d19ee5cf2737ce408515a9e701df88551008b1a674ecfe37ba547a16dfe6a91b139d7e +SHA512 (virt-v2v-2.7.7.tar.gz.sig) = b9466b9971fcd02fbece5c511a5d3264128d5293ae39607e1d7a5c38358aa84a9cfc62a5a9d60205b4c6b6a4685d887ed13163aa166380866ad478a9fd80187a diff --git a/virt-v2v.spec b/virt-v2v.spec index fdbaab8..23a8cb5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.6 -Release: 2%{?dist} +Version: 2.7.7 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -69,7 +69,11 @@ BuildRequires: ocaml-libguestfs-devel BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-libnbd-devel BuildRequires: ocaml-fileutils-devel +%if 0%{?fedora} <= 42 +# Disable ocaml-gettext-devel in Rawhide temporarily. +# https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3 BuildRequires: ocaml-gettext-devel +%endif %if !0%{?rhel} BuildRequires: ocaml-ounit-devel %endif @@ -311,6 +315,10 @@ done %changelog +* Thu Feb 27 2025 Richard W.M. Jones - 1:2.7.7-1 +- New upstream development version 2.7.7 +- Disable gettext support in Fedora Rawhide + * Thu Feb 27 2025 Richard W.M. Jones - 1:2.7.6-2 - Bump and rebuild for ocaml-gettext 0.5.0 From dba25ec5fb8761d0825a1dd47e0da8f1b28fa4db Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Mar 2025 15:39:14 +0000 Subject: [PATCH 194/235] New upstream development version 2.7.8 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index dcc29aa..11899f8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.7.tar.gz) = 05f4cedb45c6a3596b4ec4922f018497a4852a1a20b14161068e556003d19ee5cf2737ce408515a9e701df88551008b1a674ecfe37ba547a16dfe6a91b139d7e -SHA512 (virt-v2v-2.7.7.tar.gz.sig) = b9466b9971fcd02fbece5c511a5d3264128d5293ae39607e1d7a5c38358aa84a9cfc62a5a9d60205b4c6b6a4685d887ed13163aa166380866ad478a9fd80187a +SHA512 (virt-v2v-2.7.8.tar.gz) = 0f8696f995f1c7b5816129f9b33bb7ab659eba2dd401fbd103aed253bccc0a061c3d9818bce6c143036df7f2d7b5b03957fda934bfb0d6fe6667cd040d857766 +SHA512 (virt-v2v-2.7.8.tar.gz.sig) = 56884ae3cc470b034fd1fa480a74a132e9467f33c77c15e4a902c0ce05e732f7489203a34ab0cee8079f3a679c2dfc2b2102d14eb99ee4cf5fa1bebb282e933e diff --git a/virt-v2v.spec b/virt-v2v.spec index 23a8cb5..8248270 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.7 +Version: 2.7.8 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -315,6 +315,9 @@ done %changelog +* Tue Mar 11 2025 Richard W.M. Jones - 1:2.7.8-1 +- New upstream development version 2.7.8 + * Thu Feb 27 2025 Richard W.M. Jones - 1:2.7.7-1 - New upstream development version 2.7.7 - Disable gettext support in Fedora Rawhide From bc0707eb3b37df61844865b05a2e8decb971282b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 18 Mar 2025 15:38:43 +0000 Subject: [PATCH 195/235] Fix use of rhel macro With RPM 4.14.3 from SUSE I got this error: error: line 130: Unknown tag: %elif == 9 After correcting %{?rhel} -> 0%{?rhel}, this error appeared instead: error: line 130: Unknown tag: %elif 0 == 9 --- virt-v2v.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 8248270..2f1d8a6 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -127,10 +127,12 @@ Requires: edk2-aarch64 %if !0%{?rhel} Requires: /usr/bin/python3 -%elif %{?rhel} == 9 +%else +%if 0%{?rhel} == 9 Requires: platform-python # Python is not needed by RHEL 10. %endif +%endif Requires: libnbd >= 1.10 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy From fbf3a55ceb2c859ea1609c7e463929eb7a7c3826 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 22 Mar 2025 10:10:33 +0000 Subject: [PATCH 196/235] New upstream development version 2.7.9 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 11899f8..dccc1d5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.8.tar.gz) = 0f8696f995f1c7b5816129f9b33bb7ab659eba2dd401fbd103aed253bccc0a061c3d9818bce6c143036df7f2d7b5b03957fda934bfb0d6fe6667cd040d857766 -SHA512 (virt-v2v-2.7.8.tar.gz.sig) = 56884ae3cc470b034fd1fa480a74a132e9467f33c77c15e4a902c0ce05e732f7489203a34ab0cee8079f3a679c2dfc2b2102d14eb99ee4cf5fa1bebb282e933e +SHA512 (virt-v2v-2.7.9.tar.gz) = bf52305e06d9119dcb5ceee6d9cf8289c610e222dbd1abb89ef52e78750d5559a3b597ebccf20e9107ccde8f8fa031113c9b877b0e528302cb4f5230df0769cb +SHA512 (virt-v2v-2.7.9.tar.gz.sig) = b26a6a6ca914dd1dc750883127dacffc7f43d46398e8867046854634ed35089e4bb0fcc68cc483d206d63817f5d15833d244f7d172f73e129ac0d5b0d034511c diff --git a/virt-v2v.spec b/virt-v2v.spec index 2f1d8a6..2433598 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.8 +Version: 2.7.9 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -317,6 +317,9 @@ done %changelog +* Sat Mar 22 2025 Richard W.M. Jones - 1:2.7.9-1 +- New upstream development version 2.7.9 + * Tue Mar 11 2025 Richard W.M. Jones - 1:2.7.8-1 - New upstream development version 2.7.8 From f575eed3ef0a89cd575c3c9b616bed3b8a44d297 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 22 Mar 2025 11:14:34 +0000 Subject: [PATCH 197/235] New upstream version 2.7.10 The upstream 2.7.9 tarball contained a mistake that meant it required hivexregedit to build. 2.7.10 fixes this. --- sources | 4 ++-- virt-v2v.spec | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sources b/sources index dccc1d5..05e0263 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.9.tar.gz) = bf52305e06d9119dcb5ceee6d9cf8289c610e222dbd1abb89ef52e78750d5559a3b597ebccf20e9107ccde8f8fa031113c9b877b0e528302cb4f5230df0769cb -SHA512 (virt-v2v-2.7.9.tar.gz.sig) = b26a6a6ca914dd1dc750883127dacffc7f43d46398e8867046854634ed35089e4bb0fcc68cc483d206d63817f5d15833d244f7d172f73e129ac0d5b0d034511c +SHA512 (virt-v2v-2.7.10.tar.gz) = dc45a1af2ee19f8952d84e3d4da95993c6cfe45e488df4160e87bae702ef970a0d752a85cdd90a9c6a0a350708f3f16f2658eacb9820810a14da989d4b773926 +SHA512 (virt-v2v-2.7.10.tar.gz.sig) = 4b3defa5619d8a212a5c0f62a41f2a88256acb115721b36b576ff24d9503c522a7f3bcaa34c16505bda7e1a42959cd40dcc0fb05ee43364647487f629d636e13 diff --git a/virt-v2v.spec b/virt-v2v.spec index 2433598..817ee96 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.9 +Version: 2.7.10 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -317,8 +317,8 @@ done %changelog -* Sat Mar 22 2025 Richard W.M. Jones - 1:2.7.9-1 -- New upstream development version 2.7.9 +* Sat Mar 22 2025 Richard W.M. Jones - 1:2.7.10-1 +- New upstream development version 2.7.10 * Tue Mar 11 2025 Richard W.M. Jones - 1:2.7.8-1 - New upstream development version 2.7.8 From 87a7e3cd66dbffc6d86f13d0313228a983375258 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Apr 2025 09:47:17 +0100 Subject: [PATCH 198/235] Enable ocaml-gettext again --- virt-v2v.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 817ee96..a82065b 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.7.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -69,11 +69,7 @@ BuildRequires: ocaml-libguestfs-devel BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-libnbd-devel BuildRequires: ocaml-fileutils-devel -%if 0%{?fedora} <= 42 -# Disable ocaml-gettext-devel in Rawhide temporarily. -# https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3 BuildRequires: ocaml-gettext-devel -%endif %if !0%{?rhel} BuildRequires: ocaml-ounit-devel %endif @@ -317,6 +313,9 @@ done %changelog +* Thu Apr 03 2025 Richard W.M. Jones - 1:2.7.10-2 +- Enable ocaml-gettext again + * Sat Mar 22 2025 Richard W.M. Jones - 1:2.7.10-1 - New upstream development version 2.7.10 From e94005d4aef6d2446f2a85c1abbced066ee98e65 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Apr 2025 10:06:44 +0100 Subject: [PATCH 199/235] Remove oUnit --- virt-v2v.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index a82065b..ea26923 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -70,9 +70,6 @@ BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-libnbd-devel BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-gettext-devel -%if !0%{?rhel} -BuildRequires: ocaml-ounit-devel -%endif # These are for running our limited test. BuildRequires: glibc-utils From eef1115428363cf4d2ab5129bec30c2c8989adce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Apr 2025 12:53:44 +0100 Subject: [PATCH 200/235] New upstream development version 2.7.11 --- sources | 4 ++-- virt-v2v.spec | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 05e0263..7d00cdb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.10.tar.gz) = dc45a1af2ee19f8952d84e3d4da95993c6cfe45e488df4160e87bae702ef970a0d752a85cdd90a9c6a0a350708f3f16f2658eacb9820810a14da989d4b773926 -SHA512 (virt-v2v-2.7.10.tar.gz.sig) = 4b3defa5619d8a212a5c0f62a41f2a88256acb115721b36b576ff24d9503c522a7f3bcaa34c16505bda7e1a42959cd40dcc0fb05ee43364647487f629d636e13 +SHA512 (virt-v2v-2.7.11.tar.gz) = eb26d09dcd5a47969f1e94ebf26d0f71a3e618ca35c21d093c42b195c30cf6c548001bb04c9d395469bda7bfb7cef396c84e09920dde768fc4b8fcda127abd84 +SHA512 (virt-v2v-2.7.11.tar.gz.sig) = e2d9337e5d487b8542af25b67242e8b2155fede46339c7e8861ed0171bf9e97e93d0eea439acf0132c731d67412ae7237ce3341ae68e8a4f639471b5c8fd665b diff --git a/virt-v2v.spec b/virt-v2v.spec index ea26923..5e38d39 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.10 -Release: 2%{?dist} +Version: 2.7.11 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -310,8 +310,10 @@ done %changelog -* Thu Apr 03 2025 Richard W.M. Jones - 1:2.7.10-2 +* Thu Apr 03 2025 Richard W.M. Jones - 1:2.7.11-1 +- New upstream development version 2.7.11 - Enable ocaml-gettext again +- Remove oUnit * Sat Mar 22 2025 Richard W.M. Jones - 1:2.7.10-1 - New upstream development version 2.7.10 From b9cfcbc1bd184d4622b45823bfb8346a4e0754c0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 15 Apr 2025 17:02:45 +0100 Subject: [PATCH 201/235] New upstream development version 2.7.12 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 7d00cdb..7ea33b9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.11.tar.gz) = eb26d09dcd5a47969f1e94ebf26d0f71a3e618ca35c21d093c42b195c30cf6c548001bb04c9d395469bda7bfb7cef396c84e09920dde768fc4b8fcda127abd84 -SHA512 (virt-v2v-2.7.11.tar.gz.sig) = e2d9337e5d487b8542af25b67242e8b2155fede46339c7e8861ed0171bf9e97e93d0eea439acf0132c731d67412ae7237ce3341ae68e8a4f639471b5c8fd665b +SHA512 (virt-v2v-2.7.12.tar.gz) = 0de36782f19570ca48610e6d8a277ec6d3ed77f1dbe084bbc485fa21b380282c71311de650eaa2c1bff8f17e2073a9b5fd97bca67d576ba7c83a4b0c0a6d2d91 +SHA512 (virt-v2v-2.7.12.tar.gz.sig) = ec991f3e6444b9fa58a6b645649458c13b3ba76833d75087a0cdb733d628ef5f82ac6ed8ab35a7ec8b0bd4cd086faa62db1877a769c9832a71038c3161ac5531 diff --git a/virt-v2v.spec b/virt-v2v.spec index 5e38d39..ec82921 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.11 +Version: 2.7.12 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -310,6 +310,9 @@ done %changelog +* Tue Apr 15 2025 Richard W.M. Jones - 1:2.7.12-1 +- New upstream development version 2.7.12 + * Thu Apr 03 2025 Richard W.M. Jones - 1:2.7.11-1 - New upstream development version 2.7.11 - Enable ocaml-gettext again From d82a76fce56b7cea77fa05e88f189a29a6daef11 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 Apr 2025 16:40:22 +0100 Subject: [PATCH 202/235] New upstream development version 2.7.13 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 7ea33b9..28cdd76 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.12.tar.gz) = 0de36782f19570ca48610e6d8a277ec6d3ed77f1dbe084bbc485fa21b380282c71311de650eaa2c1bff8f17e2073a9b5fd97bca67d576ba7c83a4b0c0a6d2d91 -SHA512 (virt-v2v-2.7.12.tar.gz.sig) = ec991f3e6444b9fa58a6b645649458c13b3ba76833d75087a0cdb733d628ef5f82ac6ed8ab35a7ec8b0bd4cd086faa62db1877a769c9832a71038c3161ac5531 +SHA512 (virt-v2v-2.7.13.tar.gz) = c7dc3cbafcdefa15cf0abd9b13aa2e99705f316725daca93213b7bd913905358106de3a965fbf79edd3248054c85898ee4867abad1e7de062c1e24c54e14823d +SHA512 (virt-v2v-2.7.13.tar.gz.sig) = ac1e107f2c4364791d1bcd0a96c352351178ed0cc80ffd0167f894248607fff3110b6073c4949168df42e32c01a8f1062200d729cc54c2dc2fe40603af0ab0e6 diff --git a/virt-v2v.spec b/virt-v2v.spec index ec82921..67e7ef7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.12 +Version: 2.7.13 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -143,9 +143,9 @@ Requires: nbdkit-ssh-plugin Requires: nbdkit-vddk-plugin %endif Requires: nbdkit-blocksize-filter -Requires: nbdkit-cacheextents-filter Requires: nbdkit-cow-filter >= 1.28.3-1.el9 Requires: nbdkit-multi-conn-filter +Requires: nbdkit-noextents-filter Requires: nbdkit-rate-filter Requires: nbdkit-retry-filter @@ -310,6 +310,9 @@ done %changelog +* Tue Apr 29 2025 Richard W.M. Jones - 1:2.7.13-1 +- New upstream development version 2.7.13 + * Tue Apr 15 2025 Richard W.M. Jones - 1:2.7.12-1 - New upstream development version 2.7.12 From a9f381c640f661ae0426ea88df5d473897372fda Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 7 May 2025 12:32:57 +0100 Subject: [PATCH 203/235] New upstream development version 2.7.14 New tool: virt-v2v-open --- sources | 4 ++-- virt-v2v.spec | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 28cdd76..b333fe4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.13.tar.gz) = c7dc3cbafcdefa15cf0abd9b13aa2e99705f316725daca93213b7bd913905358106de3a965fbf79edd3248054c85898ee4867abad1e7de062c1e24c54e14823d -SHA512 (virt-v2v-2.7.13.tar.gz.sig) = ac1e107f2c4364791d1bcd0a96c352351178ed0cc80ffd0167f894248607fff3110b6073c4949168df42e32c01a8f1062200d729cc54c2dc2fe40603af0ab0e6 +SHA512 (virt-v2v-2.7.14.tar.gz) = 9043e55f9072a1a7bd418c9ba3fb6703db853641a8a3cfaca53973be0cd05b7db29626fdaa497019b48f63e4e164e5932ec136a19a30005179c5fb34b59d3c91 +SHA512 (virt-v2v-2.7.14.tar.gz.sig) = 492ab121a8d47cbf5187cd7b1c0e9523897397998a58072685c10944d9440a8c602f6c375c599ebabad3f50048e89957bbefff7da707305c1b4a129e0e7efcdc diff --git a/virt-v2v.spec b/virt-v2v.spec index 67e7ef7..f040b94 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.13 +Version: 2.7.14 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -276,6 +276,7 @@ done %{_libexecdir}/virt-v2v-in-place %endif %{_bindir}/virt-v2v-inspector +%{_bindir}/virt-v2v-open %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* @@ -284,6 +285,7 @@ done %{_mandir}/man1/virt-v2v-in-place.1* %endif %{_mandir}/man1/virt-v2v-inspector.1* +%{_mandir}/man1/virt-v2v-open.1* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %if !0%{?rhel} @@ -310,6 +312,10 @@ done %changelog +* Wed May 07 2025 Richard W.M. Jones - 1:2.7.14-1 +- New upstream development version 2.7.14 +- New tool: virt-v2v-open + * Tue Apr 29 2025 Richard W.M. Jones - 1:2.7.13-1 - New upstream development version 2.7.13 From 959a529547ea36b42c5415e4314c2d370886b581 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 May 2025 17:13:28 +0100 Subject: [PATCH 204/235] New upstream development version 2.7.15 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index b333fe4..f30eb94 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.14.tar.gz) = 9043e55f9072a1a7bd418c9ba3fb6703db853641a8a3cfaca53973be0cd05b7db29626fdaa497019b48f63e4e164e5932ec136a19a30005179c5fb34b59d3c91 -SHA512 (virt-v2v-2.7.14.tar.gz.sig) = 492ab121a8d47cbf5187cd7b1c0e9523897397998a58072685c10944d9440a8c602f6c375c599ebabad3f50048e89957bbefff7da707305c1b4a129e0e7efcdc +SHA512 (virt-v2v-2.7.15.tar.gz) = 3762a48dbb8ebb04e39496a816b6a367b78fb6a1137f5bc7b11c369692f80790afea8a0314a0f2e5dfbd9891f055f3f163e77fb6203029f1b2c17c444e3b7343 +SHA512 (virt-v2v-2.7.15.tar.gz.sig) = 1e9d2bab8a1cb757cd3222c2f77f4ff887fffd3b82ce380ce9b9850f183a31c1686f054b5b48cf0dad286d0fc5c5a12a7fe5a8b708b9f3b1b1ab0227ff35bac3 diff --git a/virt-v2v.spec b/virt-v2v.spec index f040b94..b9a6dd1 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.14 +Version: 2.7.15 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -312,6 +312,9 @@ done %changelog +* Mon May 12 2025 Richard W.M. Jones - 1:2.7.15-1 +- New upstream development version 2.7.15 + * Wed May 07 2025 Richard W.M. Jones - 1:2.7.14-1 - New upstream development version 2.7.14 - New tool: virt-v2v-open From 670ec36027beb4579ccf9426315dddd1609b59b6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 May 2025 18:58:41 +0100 Subject: [PATCH 205/235] Rename virt-v2v-output-rhv(1) -> virt-v2v-output-ovirt(1) --- virt-v2v.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index b9a6dd1..9373baf 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -234,7 +234,7 @@ mv $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place $RPM_BUILD_ROOT%{_libexecdir}/ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* # these are also not supported on RHEL rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-input-xen.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-output-rhv.1* +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-output-ovirt.1* %endif # Find locale files. @@ -289,7 +289,7 @@ done %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %if !0%{?rhel} -%{_mandir}/man1/virt-v2v-output-rhv.1* +%{_mandir}/man1/virt-v2v-output-ovirt.1* %endif %{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-release-notes-2.*.1* From b04c24f962fdd2e38ab53370c43e4218190c10a4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 May 2025 15:08:45 +0100 Subject: [PATCH 206/235] New upstream development version 2.7.16 --- sources | 4 ++-- virt-v2v.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index f30eb94..ddc954d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.15.tar.gz) = 3762a48dbb8ebb04e39496a816b6a367b78fb6a1137f5bc7b11c369692f80790afea8a0314a0f2e5dfbd9891f055f3f163e77fb6203029f1b2c17c444e3b7343 -SHA512 (virt-v2v-2.7.15.tar.gz.sig) = 1e9d2bab8a1cb757cd3222c2f77f4ff887fffd3b82ce380ce9b9850f183a31c1686f054b5b48cf0dad286d0fc5c5a12a7fe5a8b708b9f3b1b1ab0227ff35bac3 +SHA512 (virt-v2v-2.7.16.tar.gz) = 321512ab4773616d0ff8ad21268617e20097a8f6b44850497fce2d5830727c49aca82b0142eca775447522b1d29edef82afd062cf01c2c84388b0193a73902f8 +SHA512 (virt-v2v-2.7.16.tar.gz.sig) = da589c28af55801305a9fbe2463907a91ec7cf75ba438096ab844065cb7b0ad44208541260047bcd6bdd938230689bc4c685f4ca6cb95fc095eaa660213d9687 diff --git a/virt-v2v.spec b/virt-v2v.spec index 9373baf..a8fe4e7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.15 +Version: 2.7.16 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -46,7 +46,7 @@ BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.08 -BuildRequires: libguestfs-devel >= 1:1.49.8-1 +BuildRequires: libguestfs-devel >= 1:1.55.12-1 BuildRequires: augeas-devel BuildRequires: bash-completion, bash-completion-devel BuildRequires: file-devel @@ -91,7 +91,7 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.49.8-1 +Requires: libguestfs%{?_isa} >= 1:1.55.12-1 Requires: guestfs-tools >= 1.49.7-1 # XFS is the default filesystem in Fedora and RHEL. @@ -312,6 +312,9 @@ done %changelog +* Mon May 19 2025 Richard W.M. Jones - 1:2.7.16-1 +- New upstream development version 2.7.16 + * Mon May 12 2025 Richard W.M. Jones - 1:2.7.15-1 - New upstream development version 2.7.15 From 5d3dce2ea50b1b91064304793269d0b5e61460b2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 19 May 2025 16:43:07 +0100 Subject: [PATCH 207/235] Add temporary workaround for bug in gettext --- virt-v2v.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index a8fe4e7..cd2f164 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -206,6 +206,9 @@ for %{name}. %endif %autosetup -p1 +# ACLOCAL_PATH is temporarily required to work around +# https://bugzilla.redhat.com/show_bug.cgi?id=2366708 +export ACLOCAL_PATH=/usr/share/gettext/m4/ autoreconf -fiv From 0950fa2dd44fbe9bc781a310fe5f64ecf0b34d2e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 3 Jun 2025 16:34:56 +0100 Subject: [PATCH 208/235] New upstream development version 2.7.17 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index ddc954d..4ebab14 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.16.tar.gz) = 321512ab4773616d0ff8ad21268617e20097a8f6b44850497fce2d5830727c49aca82b0142eca775447522b1d29edef82afd062cf01c2c84388b0193a73902f8 -SHA512 (virt-v2v-2.7.16.tar.gz.sig) = da589c28af55801305a9fbe2463907a91ec7cf75ba438096ab844065cb7b0ad44208541260047bcd6bdd938230689bc4c685f4ca6cb95fc095eaa660213d9687 +SHA512 (virt-v2v-2.7.17.tar.gz) = 72b476ca6f0198ddd1ac9f52b834bc6720374b86d52014a3707ba42a0bfdb2098a8a8f76bae6b01c222c1d83c60909e472fc4ad000e057faad337fce49299a15 +SHA512 (virt-v2v-2.7.17.tar.gz.sig) = a196e3e2100777a714c11e9adb7f8bf49bb626b57ec5ec7db9bf459a2942d3523fd4801aacffc0354357b5054fd69e1dfc222c7a254ff6b53f55d8832dea8295 diff --git a/virt-v2v.spec b/virt-v2v.spec index cd2f164..a4b256d 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.16 +Version: 2.7.17 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -315,6 +315,9 @@ done %changelog +* Tue Jun 03 2025 Richard W.M. Jones - 1:2.7.17-1 +- New upstream development version 2.7.17 + * Mon May 19 2025 Richard W.M. Jones - 1:2.7.16-1 - New upstream development version 2.7.16 From 689bbb8b49fe0261c4e7bd8717f8630497b3ed55 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Jun 2025 14:47:45 +0100 Subject: [PATCH 209/235] New upstream stable version 2.8.0 Finetune BRs to match upstream. --- sources | 4 ++-- virt-v2v.spec | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sources b/sources index 4ebab14..87f7673 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.17.tar.gz) = 72b476ca6f0198ddd1ac9f52b834bc6720374b86d52014a3707ba42a0bfdb2098a8a8f76bae6b01c222c1d83c60909e472fc4ad000e057faad337fce49299a15 -SHA512 (virt-v2v-2.7.17.tar.gz.sig) = a196e3e2100777a714c11e9adb7f8bf49bb626b57ec5ec7db9bf459a2942d3523fd4801aacffc0354357b5054fd69e1dfc222c7a254ff6b53f55d8832dea8295 +SHA512 (virt-v2v-2.8.0.tar.gz) = b4ceb8694a418fc4c1dd0951ddabe332cbce4e9b75137ab5a186a22d1ad0d1e09476aa51b44fd6da3016d3d45b69b2c0ee40941b5f0a2cf25f3f3df514b3dd25 +SHA512 (virt-v2v-2.8.0.tar.gz.sig) = cd79caaea2edb345f641f6be7ffda3f58322d788aa716cde0654dc7f340f13303c437a7e8dd7507ed01e502257a0b808977e5b93c88b7b26669b9c0ba32753a7 diff --git a/virt-v2v.spec b/virt-v2v.spec index a4b256d..fa206c3 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,11 +2,11 @@ %global verify_tarball_signature 1 # The source directory. -%global source_directory 2.7-development +%global source_directory 2.8-stable Name: virt-v2v Epoch: 1 -Version: 2.7.17 +Version: 2.8.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -46,13 +46,13 @@ BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.08 -BuildRequires: libguestfs-devel >= 1:1.55.12-1 +BuildRequires: libguestfs-devel >= 1:1.56.0-1 BuildRequires: augeas-devel BuildRequires: bash-completion, bash-completion-devel -BuildRequires: file-devel +BuildRequires: file BuildRequires: gettext-devel BuildRequires: json-c-devel -BuildRequires: libnbd-devel +BuildRequires: libnbd-devel >= 1.14 BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm BuildRequires: libvirt-devel @@ -315,6 +315,10 @@ done %changelog +* Wed Jun 11 2025 Richard W.M. Jones - 1:2.8.0-1 +- New upstream stable version 2.8.0 +- Finetune BRs to match upstream. + * Tue Jun 03 2025 Richard W.M. Jones - 1:2.7.17-1 - New upstream development version 2.7.17 From b406c18f55bc4e608e9d0489a89ea55ca740cdd8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 26 Jun 2025 16:26:03 +0100 Subject: [PATCH 210/235] New upstream stable version 2.8.1 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 87f7673..55ec579 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.8.0.tar.gz) = b4ceb8694a418fc4c1dd0951ddabe332cbce4e9b75137ab5a186a22d1ad0d1e09476aa51b44fd6da3016d3d45b69b2c0ee40941b5f0a2cf25f3f3df514b3dd25 -SHA512 (virt-v2v-2.8.0.tar.gz.sig) = cd79caaea2edb345f641f6be7ffda3f58322d788aa716cde0654dc7f340f13303c437a7e8dd7507ed01e502257a0b808977e5b93c88b7b26669b9c0ba32753a7 +SHA512 (virt-v2v-2.8.1.tar.gz) = 70da68563e870955ca013e6d55be8f56ad65dde6f84909f06fae7ab928227a566e8949bb90e839fffce2ad4ebc604b2cfa1c5547394c8d1bd092bb95f9e6435c +SHA512 (virt-v2v-2.8.1.tar.gz.sig) = 1236dd21272c53dbafb4cd0ac4177bcf73600ff52ea8949b878793eafb1829a67880043c6e03c2d82c691d986ea8a7daa60508f4ae22345c961a939b3b6a43b0 diff --git a/virt-v2v.spec b/virt-v2v.spec index fa206c3..b2742dc 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.8.0 +Version: 2.8.1 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -315,6 +315,9 @@ done %changelog +* Thu Jun 26 2025 Richard W.M. Jones - 1:2.8.1-1 +- New upstream stable version 2.8.1 + * Wed Jun 11 2025 Richard W.M. Jones - 1:2.8.0-1 - New upstream stable version 2.8.0 - Finetune BRs to match upstream. From d99c2b9523d8fa1b2cbbcb2529ab7df28e20e629 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 12 Jul 2025 16:38:48 -0600 Subject: [PATCH 211/235] Rebuild to fix OCaml dependencies --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index b2742dc..b314f17 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.8.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -315,6 +315,9 @@ done %changelog +* Sat Jul 12 2025 Jerry James - 1:2.8.1-2 +- Rebuild to fix OCaml dependencies + * Thu Jun 26 2025 Richard W.M. Jones - 1:2.8.1-1 - New upstream stable version 2.8.1 From 5b7f91c42fa4271cf98577b8ea7724e96c489048 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 13 Jul 2025 13:03:31 +0100 Subject: [PATCH 212/235] New upstream development version 2.9.1 --- sources | 4 ++-- virt-v2v.spec | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 55ec579..9c7b034 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.8.1.tar.gz) = 70da68563e870955ca013e6d55be8f56ad65dde6f84909f06fae7ab928227a566e8949bb90e839fffce2ad4ebc604b2cfa1c5547394c8d1bd092bb95f9e6435c -SHA512 (virt-v2v-2.8.1.tar.gz.sig) = 1236dd21272c53dbafb4cd0ac4177bcf73600ff52ea8949b878793eafb1829a67880043c6e03c2d82c691d986ea8a7daa60508f4ae22345c961a939b3b6a43b0 +SHA512 (virt-v2v-2.9.1.tar.gz) = af44995b7bfbfd58263773600f3dcdf1ab4c221fd5a2a3137a63e12f33e8a9d017f6c11e623c8b1e268a23475222b764121fc9cb546639a508a7304305f40ea0 +SHA512 (virt-v2v-2.9.1.tar.gz.sig) = 587d6ae2933a634ee105ff50e2dbcb65105e0e417e57a1a5bae99b55380cff5ff99854eec161bcf7f2b9557529de43b83dab0cf78c57dc6a61a485c9fd23c475 diff --git a/virt-v2v.spec b/virt-v2v.spec index b314f17..52dbe65 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,12 +2,12 @@ %global verify_tarball_signature 1 # The source directory. -%global source_directory 2.8-stable +%global source_directory 2.9-development Name: virt-v2v Epoch: 1 -Version: 2.8.1 -Release: 2%{?dist} +Version: 2.9.1 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -315,6 +315,9 @@ done %changelog +* Sun Jul 13 2025 Richard W.M. Jones - 1:2.9.1-1 +- New upstream development version 2.9.1 + * Sat Jul 12 2025 Jerry James - 1:2.8.1-2 - Rebuild to fix OCaml dependencies From 69d7d754bc64df2a3c6127d754620c18db284678 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sun, 13 Jul 2025 13:00:12 -0600 Subject: [PATCH 213/235] Rebuild to fix OCaml dependencies again --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 52dbe65..02ce801 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -315,6 +315,9 @@ done %changelog +* Sun Jul 13 2025 Jerry James - 1:2.9.1-2 +- Rebuild to fix OCaml dependencies again + * Sun Jul 13 2025 Richard W.M. Jones - 1:2.9.1-1 - New upstream development version 2.9.1 From 10c9afdfa8009357ed1944271184773df489e7d8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Jul 2025 13:37:40 +0100 Subject: [PATCH 214/235] New upstream development version 2.9.2 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 9c7b034..0286d0c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.1.tar.gz) = af44995b7bfbfd58263773600f3dcdf1ab4c221fd5a2a3137a63e12f33e8a9d017f6c11e623c8b1e268a23475222b764121fc9cb546639a508a7304305f40ea0 -SHA512 (virt-v2v-2.9.1.tar.gz.sig) = 587d6ae2933a634ee105ff50e2dbcb65105e0e417e57a1a5bae99b55380cff5ff99854eec161bcf7f2b9557529de43b83dab0cf78c57dc6a61a485c9fd23c475 +SHA512 (virt-v2v-2.9.2.tar.gz) = 62e635322322ffefe17639c3eff036a96c2ba2eb7df2276b0d902138070b6b459bc71d757f4c1b2aa71869c8620bc67cb4094db6d7341c4202c24c83c3ae7b1a +SHA512 (virt-v2v-2.9.2.tar.gz.sig) = d122260fd4cf17efe08396c52e211480b34f5117e14a291673c8d4669122e4e524becd5e12afb66b8c7903a8e531f58d38ea93fa42e03a7fcf47407acab9c2fb diff --git a/virt-v2v.spec b/virt-v2v.spec index 02ce801..e3c34cf 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.9.1 -Release: 2%{?dist} +Version: 2.9.2 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -315,6 +315,9 @@ done %changelog +* Wed Jul 16 2025 Richard W.M. Jones - 1:2.9.2-1 +- New upstream development version 2.9.2 + * Sun Jul 13 2025 Jerry James - 1:2.9.1-2 - Rebuild to fix OCaml dependencies again From 25e2eae876a4e86c84e74c064ecced2fdc985e0c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 19 Jul 2025 17:01:43 +0100 Subject: [PATCH 215/235] Bump minimum version of nbdkit to 1.45.1, matching current Rawhide Bump minimum version of nbdcopy to 1.22, matching current Fedora 42 Bump minimum version of libguestfs to 1.56 Bump minimum version of guestfs-tools to 1.54 Also: - Remove nbdkit-noextents-filter, option removed from virt-v2v 2.9.1 - Add nbdkit-count-filter, added in nbdkit 1.45 - Drop BR nbdkit-python-plugin, as it is not needed by our test --- virt-v2v.spec | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index e3c34cf..2ac4bd1 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.9.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -46,13 +46,13 @@ BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.08 -BuildRequires: libguestfs-devel >= 1:1.56.0-1 +BuildRequires: libguestfs-devel >= 1:1.56 BuildRequires: augeas-devel BuildRequires: bash-completion, bash-completion-devel BuildRequires: file BuildRequires: gettext-devel BuildRequires: json-c-devel -BuildRequires: libnbd-devel >= 1.14 +BuildRequires: libnbd-devel >= 1.22 BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm BuildRequires: libvirt-devel @@ -76,12 +76,10 @@ BuildRequires: glibc-utils BuildRequires: %{_bindir}/qemu-nbd BuildRequires: %{_bindir}/nbdcopy BuildRequires: %{_bindir}/nbdinfo +BuildRequires: nbdkit-server >= 1.45.1 BuildRequires: nbdkit-file-plugin BuildRequires: nbdkit-null-plugin -%if !0%{?rhel} -BuildRequires: nbdkit-python-plugin -%endif -BuildRequires: nbdkit-cow-filter >= 1.28.3-1.el9 +BuildRequires: nbdkit-cow-filter BuildRequires: mingw-srvany-redistributable >= 1.1-6 %ifarch x86_64 BuildRequires: glibc-static @@ -91,8 +89,8 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.55.12-1 -Requires: guestfs-tools >= 1.49.7-1 +Requires: libguestfs%{?_isa} >= 1:1.56 +Requires: guestfs-tools >= 1.54 # XFS is the default filesystem in Fedora and RHEL. Requires: libguestfs-xfs @@ -126,11 +124,11 @@ Requires: platform-python # Python is not needed by RHEL 10. %endif %endif -Requires: libnbd >= 1.10 +Requires: libnbd >= 1.22 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy Requires: %{_bindir}/nbdinfo -Requires: nbdkit-server >= 1.28.3-1.el9 +Requires: nbdkit-server >= 1.45.1 Requires: nbdkit-curl-plugin Requires: nbdkit-file-plugin Requires: nbdkit-nbd-plugin @@ -143,9 +141,9 @@ Requires: nbdkit-ssh-plugin Requires: nbdkit-vddk-plugin %endif Requires: nbdkit-blocksize-filter -Requires: nbdkit-cow-filter >= 1.28.3-1.el9 +Requires: nbdkit-count-filter +Requires: nbdkit-cow-filter Requires: nbdkit-multi-conn-filter -Requires: nbdkit-noextents-filter Requires: nbdkit-rate-filter Requires: nbdkit-retry-filter @@ -315,6 +313,15 @@ done %changelog +* Sat Jul 19 2025 Richard W.M. Jones - 1:2.9.2-2 +- Bump minimum version of nbdkit to 1.45.1, matching current Rawhide +- Bump minimum version of nbdcopy to 1.22, matching current Fedora 42 +- Bump minimum version of libguestfs to 1.56 +- Bump minimum version of guestfs-tools to 1.54 +- Remove nbdkit-noextents-filter, option removed from virt-v2v 2.9.1 +- Add nbdkit-count-filter, added in nbdkit 1.45 +- Drop BR nbdkit-python-plugin, as it is not needed by our test + * Wed Jul 16 2025 Richard W.M. Jones - 1:2.9.2-1 - New upstream development version 2.9.2 From 71d5e395b29695ce42e3532016d2e03d6b1e15ba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:09:05 +0000 Subject: [PATCH 216/235] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 2ac4bd1..63e6fff 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -7,7 +7,7 @@ Name: virt-v2v Epoch: 1 Version: 2.9.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -313,6 +313,9 @@ done %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1:2.9.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Jul 19 2025 Richard W.M. Jones - 1:2.9.2-2 - Bump minimum version of nbdkit to 1.45.1, matching current Rawhide - Bump minimum version of nbdcopy to 1.22, matching current Fedora 42 From 3a85108e5c431bfd7ce9ad2cb044e14d0ab1a892 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 15 Aug 2025 11:00:49 +0100 Subject: [PATCH 217/235] New upstream development version 2.9.3 Ensure minimum libguestfs is 1.57.1 (for guestfs_setfiles) --- sources | 4 ++-- virt-v2v.spec | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 0286d0c..e4b0acb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.2.tar.gz) = 62e635322322ffefe17639c3eff036a96c2ba2eb7df2276b0d902138070b6b459bc71d757f4c1b2aa71869c8620bc67cb4094db6d7341c4202c24c83c3ae7b1a -SHA512 (virt-v2v-2.9.2.tar.gz.sig) = d122260fd4cf17efe08396c52e211480b34f5117e14a291673c8d4669122e4e524becd5e12afb66b8c7903a8e531f58d38ea93fa42e03a7fcf47407acab9c2fb +SHA512 (virt-v2v-2.9.3.tar.gz) = 9565f850e8e88fc6248bcdd0aba6e9fa098023abe343b7dea2f1564bd2ecf2912ce7afa1faf6f2c68021617304432b1cb60ab9b6e522e4b1ae47c79abc3264f6 +SHA512 (virt-v2v-2.9.3.tar.gz.sig) = 8f2b1d65c9cace756596357e9e16560bfa6ae1de0dcdb4a5353bf964831f9dcd25c512be94fa49e4ba81ea889169f77dc63415bfe3f6925ac37067b69e628cb1 diff --git a/virt-v2v.spec b/virt-v2v.spec index 63e6fff..345a670 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.9.2 -Release: 3%{?dist} +Version: 2.9.3 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -46,7 +46,7 @@ BuildRequires: /usr/bin/pod2man BuildRequires: gcc BuildRequires: ocaml >= 4.08 -BuildRequires: libguestfs-devel >= 1:1.56 +BuildRequires: libguestfs-devel >= 1:1.57.1-1 BuildRequires: augeas-devel BuildRequires: bash-completion, bash-completion-devel BuildRequires: file @@ -89,7 +89,7 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.56 +Requires: libguestfs%{?_isa} >= 1:1.57.1-1 Requires: guestfs-tools >= 1.54 # XFS is the default filesystem in Fedora and RHEL. @@ -313,6 +313,10 @@ done %changelog +* Fri Aug 15 2025 Richard W.M. Jones - 1:2.9.3-1 +- New upstream development version 2.9.3 +- Ensure minimum libguestfs is 1.57.1 (for guestfs_setfiles) + * Fri Jul 25 2025 Fedora Release Engineering - 1:2.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 72edbc55f8e493a089bfd5e79bdafee2480fdb9b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 27 Aug 2025 10:03:26 +0100 Subject: [PATCH 218/235] New upstream development version 2.9.4 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index e4b0acb..e4dbf84 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.3.tar.gz) = 9565f850e8e88fc6248bcdd0aba6e9fa098023abe343b7dea2f1564bd2ecf2912ce7afa1faf6f2c68021617304432b1cb60ab9b6e522e4b1ae47c79abc3264f6 -SHA512 (virt-v2v-2.9.3.tar.gz.sig) = 8f2b1d65c9cace756596357e9e16560bfa6ae1de0dcdb4a5353bf964831f9dcd25c512be94fa49e4ba81ea889169f77dc63415bfe3f6925ac37067b69e628cb1 +SHA512 (virt-v2v-2.9.4.tar.gz) = eb25a103c4f4af72bb6be6cb32e9014997532b53ca3a5319abdbfa5d8187d32cd7caae3a812b5f066ddc348303a2957a926524b016e66100d6ca785dcd1d02a2 +SHA512 (virt-v2v-2.9.4.tar.gz.sig) = ed927b57b78469781275849843c1ca6d557791d83362a7f02db47eba13d2ea0345f7959e918fd8d83d4c69459312a077fcf202c6dba2f35ae4408634fee1285a diff --git a/virt-v2v.spec b/virt-v2v.spec index 345a670..dbc2260 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.9.3 +Version: 2.9.4 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -313,6 +313,9 @@ done %changelog +* Wed Aug 27 2025 Richard W.M. Jones - 1:2.9.4-1 +- New upstream development version 2.9.4 + * Fri Aug 15 2025 Richard W.M. Jones - 1:2.9.3-1 - New upstream development version 2.9.3 - Ensure minimum libguestfs is 1.57.1 (for guestfs_setfiles) From 26965f881b5c76fc2f77c7e255d3c9579279f58d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Aug 2025 10:34:15 +0100 Subject: [PATCH 219/235] New upstream development version 2.9.4 Use new ./configure --disable/--enable flags for excluding RHEL features --- sources | 4 +- virt-v2v.spec | 106 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 85 insertions(+), 25 deletions(-) diff --git a/sources b/sources index e4dbf84..a005b1c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.4.tar.gz) = eb25a103c4f4af72bb6be6cb32e9014997532b53ca3a5319abdbfa5d8187d32cd7caae3a812b5f066ddc348303a2957a926524b016e66100d6ca785dcd1d02a2 -SHA512 (virt-v2v-2.9.4.tar.gz.sig) = ed927b57b78469781275849843c1ca6d557791d83362a7f02db47eba13d2ea0345f7959e918fd8d83d4c69459312a077fcf202c6dba2f35ae4408634fee1285a +SHA512 (virt-v2v-2.9.5.tar.gz) = 035a9bcbae6143364bd5b0c5236520a89e1d2543e46c4fdfaba1fe0f71db09af8899e75f67669f77318340dce54bcdc4810462e97c2913ef2663f9bc0264398d +SHA512 (virt-v2v-2.9.5.tar.gz.sig) = bc7963e14432b945b688d3efc88d8df13a7a3960c949add5a4de6c128a5db9b2f769333b12e9a255e96663a932d1789de8a1253d6934610d81f376205941b3a5 diff --git a/virt-v2v.spec b/virt-v2v.spec index dbc2260..cd09cf2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -4,9 +4,47 @@ # The source directory. %global source_directory 2.9-development +%if !0%{?rhel} +# Optional features enabled in this build for Fedora. +%global with_block_driver 1 +%global with_glance 1 +%global with_ovirt 1 +%global with_xen 1 + +# libguestfs hasn't been built on i686 for a while since there is no +# kernel built for this architecture any longer and libguestfs rather +# fundamentally depends on the kernel. Therefore we must exclude this +# arch. Note there is no bug filed for this because we do not ever +# expect that libguestfs or virt-v2v will be available on i686 so +# there is nothing that needs fixing. +ExcludeArch: %{ix86} + +# Version extra string for Fedora. +%global version_extra fedora=%{fedora},release=%{release} + +%else + +# Optional features enabled in this build for RHEL. +%global with_block_driver 0 +%global with_glance 0 +%global with_ovirt 0 +%global with_xen 0 + +# Architectures where virt-v2v is shipped on RHEL: +# +# not on aarch64 because it is not useful there +# not on %%{power64} because of RHBZ#1287826 +# not on s390x because it is not useful there +ExclusiveArch: x86_64 + +# Version extra string for RHEL. +%global version_extra rhel=%{rhel},release=%{release} + +%endif + Name: virt-v2v Epoch: 1 -Version: 2.9.4 +Version: 2.9.5 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -23,23 +61,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -%if !0%{?rhel} -# libguestfs hasn't been built on i686 for a while since there is no -# kernel built for this architecture any longer and libguestfs rather -# fundamentally depends on the kernel. Therefore we must exclude this -# arch. Note there is no bug filed for this because we do not ever -# expect that libguestfs or virt-v2v will be available on i686 so -# there is nothing that needs fixing. -ExcludeArch: %{ix86} -%else -# Architectures where virt-v2v is shipped on RHEL: -# -# not on aarch64 because it is not useful there -# not on %%{power64} because of RHBZ#1287826 -# not on s390x because it is not useful there -ExclusiveArch: x86_64 -%endif - BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man @@ -212,11 +233,27 @@ autoreconf -fiv %build %configure \ -%if !0%{?rhel} - --with-extra="fedora=%{fedora},release=%{release}" \ +%if %{with_block_driver} + --enable-block-driver \ %else - --with-extra="rhel=%{rhel},release=%{release}" \ + --disable-block-driver \ %endif +%if %{with_glance} + --enable-glance \ +%else + --disable-glance \ +%endif +%if %{with_ovirt} + --enable-ovirt \ +%else + --disable-ovirt \ +%endif +%if %{with_xen} + --enable-xen \ +%else + --disable-xen \ +%endif + --with-extra="%{version_extra}" make V=1 %{?_smp_mflags} @@ -243,6 +280,23 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-output-ovirt.1* %check +# Check that the binary runs and the features match those configured. +./run virt-v2v --version +./run virt-v2v --machine-readable | tee machine-readable.out +grep "virt-v2v-2.0" machine-readable.out +grep "input:disk" machine-readable.out +%if %{with_block_driver} +grep "block-driver-option" machine-readable.out +%endif +%if %{with_glance} +grep "output:glance" machine-readable.out +%endif +%if %{with_ovirt} +grep "output:ovirt$" machine-readable.out +grep "output:ovirt-upload" machine-readable.out +grep "output:vdsm" machine-readable.out +%endif + %ifarch x86_64 # Only run the tests with non-debug (ie. non-Rawhide) kernels. # XXX This tests for any debug kernel installed. @@ -281,15 +335,17 @@ done %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* -%if !0%{?rhel} +%if %{with_xen} %{_mandir}/man1/virt-v2v-input-xen.1* +%endif +%if !0%{?rhel} %{_mandir}/man1/virt-v2v-in-place.1* %endif %{_mandir}/man1/virt-v2v-inspector.1* %{_mandir}/man1/virt-v2v-open.1* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* -%if !0%{?rhel} +%if %{with_ovirt} %{_mandir}/man1/virt-v2v-output-ovirt.1* %endif %{_mandir}/man1/virt-v2v-release-notes-1.42.1* @@ -313,6 +369,10 @@ done %changelog +* Fri Aug 29 2025 Richard W.M. Jones - 1:2.9.5-1 +- New upstream development version 2.9.4 +- Use new ./configure --disable/--enable flags for excluding RHEL features + * Wed Aug 27 2025 Richard W.M. Jones - 1:2.9.4-1 - New upstream development version 2.9.4 From 66650d837a4229eaec71ef73631d3a3b7d5b4fdd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Aug 2025 10:55:37 +0100 Subject: [PATCH 220/235] Fix version number in changelog --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index cd09cf2..f06e022 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -370,7 +370,7 @@ done %changelog * Fri Aug 29 2025 Richard W.M. Jones - 1:2.9.5-1 -- New upstream development version 2.9.4 +- New upstream development version 2.9.5 - Use new ./configure --disable/--enable flags for excluding RHEL features * Wed Aug 27 2025 Richard W.M. Jones - 1:2.9.4-1 From 520c690092220eb65c15ecbb9ebc132458b63208 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Aug 2025 11:07:23 +0100 Subject: [PATCH 221/235] Add missing perl dependencies Previously some of these were pulled in implicitly. However IPC::Run3 is a new dependency of podwrapper and we need to be explicit about that one. --- virt-v2v.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virt-v2v.spec b/virt-v2v.spec index f06e022..c937dac 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -64,6 +64,9 @@ Source3: copy-patches.sh BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man +BuildRequires: perl(Pod::Usage) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IPC::Run3) BuildRequires: gcc BuildRequires: ocaml >= 4.08 From 1fa63ef939c375b0d8d5b72fc2a6570d7f1a8c32 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Aug 2025 13:09:22 +0100 Subject: [PATCH 222/235] Require nbdkit-python-plugin only if we built oVirt support --- virt-v2v.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index c937dac..4481f45 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -140,7 +140,7 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -%if !0%{?rhel} +%if !%{with_ovirt} Requires: /usr/bin/python3 %else %if 0%{?rhel} == 9 @@ -157,7 +157,7 @@ Requires: nbdkit-curl-plugin Requires: nbdkit-file-plugin Requires: nbdkit-nbd-plugin Requires: nbdkit-null-plugin -%if !0%{?rhel} +%if !%{with_ovirt} Requires: nbdkit-python-plugin %endif Requires: nbdkit-ssh-plugin From 4a4aa3a93881e4d716231fa016fc4f893bde8ee1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 29 Aug 2025 13:05:42 +0100 Subject: [PATCH 223/235] Unify Fedora and RHEL 10.2 spec files --- virt-v2v.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 4481f45..2a9018e 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -72,7 +72,10 @@ BuildRequires: ocaml >= 4.08 BuildRequires: libguestfs-devel >= 1:1.57.1-1 BuildRequires: augeas-devel -BuildRequires: bash-completion, bash-completion-devel +BuildRequires: bash-completion +%if !0%{?rhel} +BuildRequires: bash-completion-devel +%endif BuildRequires: file BuildRequires: gettext-devel BuildRequires: json-c-devel @@ -142,11 +145,6 @@ Requires: edk2-aarch64 %if !%{with_ovirt} Requires: /usr/bin/python3 -%else -%if 0%{?rhel} == 9 -Requires: platform-python -# Python is not needed by RHEL 10. -%endif %endif Requires: libnbd >= 1.22 Requires: %{_bindir}/qemu-nbd From 030036337929546c950207af6775c960eb660c91 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 1 Sep 2025 09:39:16 +0100 Subject: [PATCH 224/235] RHEL: Unnecessary to delete input-xen and output-ovirt man pages Since RHEL is compiled with_xen == 0 && with_ovirt == 0, the project should not generate these files, so deleting them should not be necessary. --- virt-v2v.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 2a9018e..6063de4 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -271,9 +271,6 @@ find $RPM_BUILD_ROOT -name '*.la' -delete mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mv $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place $RPM_BUILD_ROOT%{_libexecdir}/ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* -# these are also not supported on RHEL -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-input-xen.1* -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-output-ovirt.1* %endif # Find locale files. From 4a7db747882488105c4bde7aae87206091671b1e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Sep 2025 21:34:06 +0100 Subject: [PATCH 225/235] New upstream development version 2.9.6 --- sources | 4 ++-- virt-v2v.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a005b1c..f972117 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.5.tar.gz) = 035a9bcbae6143364bd5b0c5236520a89e1d2543e46c4fdfaba1fe0f71db09af8899e75f67669f77318340dce54bcdc4810462e97c2913ef2663f9bc0264398d -SHA512 (virt-v2v-2.9.5.tar.gz.sig) = bc7963e14432b945b688d3efc88d8df13a7a3960c949add5a4de6c128a5db9b2f769333b12e9a255e96663a932d1789de8a1253d6934610d81f376205941b3a5 +SHA512 (virt-v2v-2.9.6.tar.gz) = 983c784d5190c0590f83357dea1ccb2c1f9a528a26f39122b24ef35dd0209151e89acb749f11cb0d7201d33ada31330f858becc049d11790229cadcaa306bcc4 +SHA512 (virt-v2v-2.9.6.tar.gz.sig) = 28199a3d7d38148b16033831c5b26f3e5013d47d769dbd7e5571deb64e4bf094e31c8df62f5c55a0bae621b19a5011b209917d671e7c34531e6b95d304d88aaf diff --git a/virt-v2v.spec b/virt-v2v.spec index 6063de4..83d26a8 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -44,7 +44,7 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 -Version: 2.9.5 +Version: 2.9.6 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -367,6 +367,9 @@ done %changelog +* Tue Sep 9 2025 Richard W.M. Jones - 1:2.9.6-1 +- New upstream development version 2.9.6 + * Fri Aug 29 2025 Richard W.M. Jones - 1:2.9.5-1 - New upstream development version 2.9.5 - Use new ./configure --disable/--enable flags for excluding RHEL features From 792368a646919e24c8adb0e1a24e804dd6214371 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 20 Sep 2025 17:25:20 +0100 Subject: [PATCH 226/235] New upstream development version 2.9.7 Ignore non-upstream patch to improve Windows conversions --- 0001-Update-common-submodule.patch | 48 ++++++++++++++++++++++++++++++ sources | 4 +-- virt-v2v.spec | 10 ++++++- 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 0001-Update-common-submodule.patch diff --git a/0001-Update-common-submodule.patch b/0001-Update-common-submodule.patch new file mode 100644 index 0000000..a9cbd58 --- /dev/null +++ b/0001-Update-common-submodule.patch @@ -0,0 +1,48 @@ +From 6e15298cb5e7438ecda8fd5c08f2a5ec868e97a7 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 20 Sep 2025 17:20:25 +0100 +Subject: [PATCH] Update common submodule + + Richard W.M. Jones (2): + daemon, generator: Use power of 2 for initial size of Hashtbl.create + mlcustomize/inject_virtio_win.ml: Use viostor.inf instead of guestor +--- + common | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Submodule common 5be8d55214..ebcd4d5ecc: +diff --git a/common/mlcustomize/customize_run.ml b/common/mlcustomize/customize_run.ml +index ff719f4..64afd3a 100644 +--- a/common/mlcustomize/customize_run.ml ++++ b/common/mlcustomize/customize_run.ml +@@ -97,7 +97,7 @@ let run (g : G.guestfs) root (ops : ops) = + ) in + + (* Store the passwords and set them all at the end. *) +- let passwords = Hashtbl.create 13 in ++ let passwords = Hashtbl.create 16 in + let set_password user pw = + if Hashtbl.mem passwords user then + error (f_"multiple --root-password/--password options set the \ +diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml +index b26b14d..114df06 100644 +--- a/common/mlcustomize/inject_virtio_win.ml ++++ b/common/mlcustomize/inject_virtio_win.ml +@@ -310,8 +310,13 @@ and ddb_regedits inspect drv_name drv_pciid = + * one must add keys into the DriverDatabase. + *) + ++ let winarch = ++ match inspect.i_arch with ++ | "i386" -> "x86" | "x86_64" -> "amd64" ++ | _ -> assert false in ++ + let drv_inf = "guestor.inf" in +- let drv_inf_label = drv_inf ^ "_tmp" in ++ let drv_inf_label = sprintf "%s_%s_0000000000000000" drv_inf winarch in + let drv_config = "guestor_conf" in + + [ +-- +2.50.1 + diff --git a/sources b/sources index f972117..d9ef2db 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.6.tar.gz) = 983c784d5190c0590f83357dea1ccb2c1f9a528a26f39122b24ef35dd0209151e89acb749f11cb0d7201d33ada31330f858becc049d11790229cadcaa306bcc4 -SHA512 (virt-v2v-2.9.6.tar.gz.sig) = 28199a3d7d38148b16033831c5b26f3e5013d47d769dbd7e5571deb64e4bf094e31c8df62f5c55a0bae621b19a5011b209917d671e7c34531e6b95d304d88aaf +SHA512 (virt-v2v-2.9.7.tar.gz) = 55e517ec9b5a5850b1bf5f4ac14df307e1ffa0fb8b3f836c05964a091a204de7f9931ca7572618ba6e9f5902c7e4f524de76c3e4c725a302d0007d2fb4a26326 +SHA512 (virt-v2v-2.9.7.tar.gz.sig) = 0a7b49b809a6c08c7722d4d1029aecf6cf170b8bdf5e8e4bef37c401fa0212d2770760cfc4c77169d34d6f473a9f367eeedb9406005c7e0bf9d77c5034c8477b diff --git a/virt-v2v.spec b/virt-v2v.spec index 83d26a8..3eaebc5 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -44,7 +44,7 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 -Version: 2.9.6 +Version: 2.9.7 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -61,6 +61,10 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh +# Improve Windows conversions. Not upstream yet. +# https://github.com/libguestfs/libguestfs-common/pull/17 +Patch: 0001-Update-common-submodule.patch + BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man @@ -367,6 +371,10 @@ done %changelog +* Sat Sep 20 2025 Richard W.M. Jones - 1:2.9.7-1 +- New upstream development version 2.9.7 +- Ignore non-upstream patch to improve Windows conversions + * Tue Sep 9 2025 Richard W.M. Jones - 1:2.9.6-1 - New upstream development version 2.9.6 From 9ba178aca41062fe1e9f0e85775399723cefb6f4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 20 Sep 2025 18:07:17 +0100 Subject: [PATCH 227/235] Fix changelog of previous commit --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 3eaebc5..fb693b7 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -373,7 +373,7 @@ done %changelog * Sat Sep 20 2025 Richard W.M. Jones - 1:2.9.7-1 - New upstream development version 2.9.7 -- Ignore non-upstream patch to improve Windows conversions +- Backport non-upstream patch to improve Windows conversions * Tue Sep 9 2025 Richard W.M. Jones - 1:2.9.6-1 - New upstream development version 2.9.6 From f5b4a662695021d26418b3bb26aaff2850f699e9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 22 Sep 2025 15:47:18 +0100 Subject: [PATCH 228/235] New upstream development version 2.9.8 Remove Windows conversion patch which is now upstream. --- 0001-Update-common-submodule.patch | 48 ------------------------------ sources | 4 +-- virt-v2v.spec | 10 +++---- 3 files changed, 7 insertions(+), 55 deletions(-) delete mode 100644 0001-Update-common-submodule.patch diff --git a/0001-Update-common-submodule.patch b/0001-Update-common-submodule.patch deleted file mode 100644 index a9cbd58..0000000 --- a/0001-Update-common-submodule.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 6e15298cb5e7438ecda8fd5c08f2a5ec868e97a7 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 20 Sep 2025 17:20:25 +0100 -Subject: [PATCH] Update common submodule - - Richard W.M. Jones (2): - daemon, generator: Use power of 2 for initial size of Hashtbl.create - mlcustomize/inject_virtio_win.ml: Use viostor.inf instead of guestor ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common 5be8d55214..ebcd4d5ecc: -diff --git a/common/mlcustomize/customize_run.ml b/common/mlcustomize/customize_run.ml -index ff719f4..64afd3a 100644 ---- a/common/mlcustomize/customize_run.ml -+++ b/common/mlcustomize/customize_run.ml -@@ -97,7 +97,7 @@ let run (g : G.guestfs) root (ops : ops) = - ) in - - (* Store the passwords and set them all at the end. *) -- let passwords = Hashtbl.create 13 in -+ let passwords = Hashtbl.create 16 in - let set_password user pw = - if Hashtbl.mem passwords user then - error (f_"multiple --root-password/--password options set the \ -diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml -index b26b14d..114df06 100644 ---- a/common/mlcustomize/inject_virtio_win.ml -+++ b/common/mlcustomize/inject_virtio_win.ml -@@ -310,8 +310,13 @@ and ddb_regedits inspect drv_name drv_pciid = - * one must add keys into the DriverDatabase. - *) - -+ let winarch = -+ match inspect.i_arch with -+ | "i386" -> "x86" | "x86_64" -> "amd64" -+ | _ -> assert false in -+ - let drv_inf = "guestor.inf" in -- let drv_inf_label = drv_inf ^ "_tmp" in -+ let drv_inf_label = sprintf "%s_%s_0000000000000000" drv_inf winarch in - let drv_config = "guestor_conf" in - - [ --- -2.50.1 - diff --git a/sources b/sources index d9ef2db..5a8739c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.7.tar.gz) = 55e517ec9b5a5850b1bf5f4ac14df307e1ffa0fb8b3f836c05964a091a204de7f9931ca7572618ba6e9f5902c7e4f524de76c3e4c725a302d0007d2fb4a26326 -SHA512 (virt-v2v-2.9.7.tar.gz.sig) = 0a7b49b809a6c08c7722d4d1029aecf6cf170b8bdf5e8e4bef37c401fa0212d2770760cfc4c77169d34d6f473a9f367eeedb9406005c7e0bf9d77c5034c8477b +SHA512 (virt-v2v-2.9.8.tar.gz) = b8f07f8fe451375aa6500861566c6d80dbcc38226ce8319444838087c433759274577303355b9445bfc09e9dcd51b809c599232f0f7ddb49fb33fbf8210f1031 +SHA512 (virt-v2v-2.9.8.tar.gz.sig) = 974568808749d78ad9120f262722feffec1aabec7817473fc63565750dfdf9d9eda96ef3cc6ab8de2f1490fba7a2e296b0e6ef908abff0384df24ec4f4bada15 diff --git a/virt-v2v.spec b/virt-v2v.spec index fb693b7..68416e2 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -44,7 +44,7 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 -Version: 2.9.7 +Version: 2.9.8 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -61,10 +61,6 @@ Source2: libguestfs.keyring # Maintainer script which helps with handling patches. Source3: copy-patches.sh -# Improve Windows conversions. Not upstream yet. -# https://github.com/libguestfs/libguestfs-common/pull/17 -Patch: 0001-Update-common-submodule.patch - BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man @@ -371,6 +367,10 @@ done %changelog +* Mon Sep 22 2025 Richard W.M. Jones - 1:2.9.8-1 +- New upstream development version 2.9.8 +- Remove Windows conversion patch which is now upstream. + * Sat Sep 20 2025 Richard W.M. Jones - 1:2.9.7-1 - New upstream development version 2.9.7 - Backport non-upstream patch to improve Windows conversions From 790400f357e36761367678decd53f01be94d1479 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 25 Sep 2025 10:54:37 -0400 Subject: [PATCH 229/235] Fix bash-completion conditional ELN (the future RHEL 11) tracks rawhide and therefore also has bash-completion-devel and the %bash_completions_dir macro. --- virt-v2v.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 68416e2..060016d 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -73,7 +73,7 @@ BuildRequires: ocaml >= 4.08 BuildRequires: libguestfs-devel >= 1:1.57.1-1 BuildRequires: augeas-devel BuildRequires: bash-completion -%if !0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} >= 11 BuildRequires: bash-completion-devel %endif BuildRequires: file From a0f001aa68f950fd6596934dbc01970c0505962e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 14 Oct 2025 09:21:09 +0100 Subject: [PATCH 230/235] OCaml 5.4.0 rebuild --- virt-v2v.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 060016d..3c0f719 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -45,7 +45,7 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 Version: 2.9.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -367,6 +367,9 @@ done %changelog +* Tue Oct 14 2025 Richard W.M. Jones - 1:2.9.8-2 +- OCaml 5.4.0 rebuild + * Mon Sep 22 2025 Richard W.M. Jones - 1:2.9.8-1 - New upstream development version 2.9.8 - Remove Windows conversion patch which is now upstream. From 5af6be536a9658b15273f62c033f93b0f0bbb62c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Oct 2025 17:50:24 +0100 Subject: [PATCH 231/235] New upstream development version 2.9.9 --- sources | 4 ++-- virt-v2v.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 5a8739c..19e488a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.8.tar.gz) = b8f07f8fe451375aa6500861566c6d80dbcc38226ce8319444838087c433759274577303355b9445bfc09e9dcd51b809c599232f0f7ddb49fb33fbf8210f1031 -SHA512 (virt-v2v-2.9.8.tar.gz.sig) = 974568808749d78ad9120f262722feffec1aabec7817473fc63565750dfdf9d9eda96ef3cc6ab8de2f1490fba7a2e296b0e6ef908abff0384df24ec4f4bada15 +SHA512 (virt-v2v-2.9.9.tar.gz) = 82a73de492bc3565ad09cd9981d63459482872b4d3ebf376a15d8681698ae4caeb181ca4a84e0cd68b852b886346009f5350a268761f7ca7db9ac589af92938c +SHA512 (virt-v2v-2.9.9.tar.gz.sig) = dbd8b9702baa1b69f69c3aff52d95e6c2a0a1ef8f066248f3e33990ffefe429409b80001041389692dd24faf8628557d79173cc098e3fce1c5890feb27229bc5 diff --git a/virt-v2v.spec b/virt-v2v.spec index 3c0f719..165bd9c 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -44,8 +44,8 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 -Version: 2.9.8 -Release: 2%{?dist} +Version: 2.9.9 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -367,6 +367,9 @@ done %changelog +* Thu Oct 16 2025 Richard W.M. Jones - 1:2.9.9-1 +- New upstream development version 2.9.9 + * Tue Oct 14 2025 Richard W.M. Jones - 1:2.9.8-2 - OCaml 5.4.0 rebuild From 7ba7c6543851970522074c426acaa5324dd1332d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 20 Oct 2025 15:06:42 +0100 Subject: [PATCH 232/235] Bump minimum nbdkit version to 1.45.11 This will be the new minimum in the next development version of virt-v2v. --- virt-v2v.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 165bd9c..388d5f9 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -103,7 +103,7 @@ BuildRequires: glibc-utils BuildRequires: %{_bindir}/qemu-nbd BuildRequires: %{_bindir}/nbdcopy BuildRequires: %{_bindir}/nbdinfo -BuildRequires: nbdkit-server >= 1.45.1 +BuildRequires: nbdkit-server >= 1.45.11 BuildRequires: nbdkit-file-plugin BuildRequires: nbdkit-null-plugin BuildRequires: nbdkit-cow-filter @@ -150,7 +150,7 @@ Requires: libnbd >= 1.22 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy Requires: %{_bindir}/nbdinfo -Requires: nbdkit-server >= 1.45.1 +Requires: nbdkit-server >= 1.45.11 Requires: nbdkit-curl-plugin Requires: nbdkit-file-plugin Requires: nbdkit-nbd-plugin From b07fed3631cf8afde580707c80034f1ca20dc8e1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Nov 2025 16:37:14 +0000 Subject: [PATCH 233/235] New upstream development version 2.9.10 Requires libguestfs 1.57.6 for new inspection APIs. --- sources | 4 ++-- virt-v2v.spec | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 19e488a..b452ce6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.9.tar.gz) = 82a73de492bc3565ad09cd9981d63459482872b4d3ebf376a15d8681698ae4caeb181ca4a84e0cd68b852b886346009f5350a268761f7ca7db9ac589af92938c -SHA512 (virt-v2v-2.9.9.tar.gz.sig) = dbd8b9702baa1b69f69c3aff52d95e6c2a0a1ef8f066248f3e33990ffefe429409b80001041389692dd24faf8628557d79173cc098e3fce1c5890feb27229bc5 +SHA512 (virt-v2v-2.9.10.tar.gz) = 950b5320413de5b398785ce98645833a770acd68ad289c86a6ea2dbe019a40c4642063cba0f6d4e7988d4521b045feb83dd7551f0ebfdba6d964757473cafcb3 +SHA512 (virt-v2v-2.9.10.tar.gz.sig) = 467a105c9469ca67c3254155682a87021610a057bc8124e1644d522bf540a944234a7118751a4f1c1308ec5bbd91904445a0223443607426f7decae2dd40c65f diff --git a/virt-v2v.spec b/virt-v2v.spec index 388d5f9..6d17d45 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -44,7 +44,7 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 -Version: 2.9.9 +Version: 2.9.10 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -70,7 +70,7 @@ BuildRequires: perl(IPC::Run3) BuildRequires: gcc BuildRequires: ocaml >= 4.08 -BuildRequires: libguestfs-devel >= 1:1.57.1-1 +BuildRequires: libguestfs-devel >= 1:1.57.6-1 BuildRequires: augeas-devel BuildRequires: bash-completion %if 0%{?fedora} || 0%{?rhel} >= 11 @@ -116,7 +116,7 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.57.1-1 +Requires: libguestfs%{?_isa} >= 1:1.57.6-1 Requires: guestfs-tools >= 1.54 # XFS is the default filesystem in Fedora and RHEL. @@ -367,6 +367,10 @@ done %changelog +* Tue Nov 4 2025 Richard W.M. Jones - 1:2.9.10-1 +- New upstream development version 2.9.10 +- Requires libguestfs 1.57.6 for new inspection APIs. + * Thu Oct 16 2025 Richard W.M. Jones - 1:2.9.9-1 - New upstream development version 2.9.9 From 1a5178ef0ccbf93ca30775013885db83f8e47c63 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 6 Jan 2026 11:01:45 +0000 Subject: [PATCH 234/235] New upstream stable branch version 2.10.0 Requires libguestfs >= 1.58.0 and nbdkit >= 1.46. --- sources | 4 ++-- virt-v2v.spec | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sources b/sources index b452ce6..8fc8fc9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.9.10.tar.gz) = 950b5320413de5b398785ce98645833a770acd68ad289c86a6ea2dbe019a40c4642063cba0f6d4e7988d4521b045feb83dd7551f0ebfdba6d964757473cafcb3 -SHA512 (virt-v2v-2.9.10.tar.gz.sig) = 467a105c9469ca67c3254155682a87021610a057bc8124e1644d522bf540a944234a7118751a4f1c1308ec5bbd91904445a0223443607426f7decae2dd40c65f +SHA512 (virt-v2v-2.10.0.tar.gz) = 035f2181c1cc5f482e96d3e21b513b95939ca224d71ac6ad938842d5af5d60ef07db1600d2ccb609dc2042b1c74088f6f39ffbe595cb51e80278ecb50c314515 +SHA512 (virt-v2v-2.10.0.tar.gz.sig) = cb6301224ef00577a9cd0fc8fa504e583eb447341bd3849e6854f2d78ae72ca39bca68b70f30efd3d1d64480acf161c5e4bc9ba943595ef4dd2a654c3268aa66 diff --git a/virt-v2v.spec b/virt-v2v.spec index 6d17d45..7557908 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -2,7 +2,7 @@ %global verify_tarball_signature 1 # The source directory. -%global source_directory 2.9-development +%global source_directory 2.10-stable %if !0%{?rhel} # Optional features enabled in this build for Fedora. @@ -44,7 +44,7 @@ ExclusiveArch: x86_64 Name: virt-v2v Epoch: 1 -Version: 2.9.10 +Version: 2.10.0 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -70,7 +70,7 @@ BuildRequires: perl(IPC::Run3) BuildRequires: gcc BuildRequires: ocaml >= 4.08 -BuildRequires: libguestfs-devel >= 1:1.57.6-1 +BuildRequires: libguestfs-devel >= 1:1.58.0-1 BuildRequires: augeas-devel BuildRequires: bash-completion %if 0%{?fedora} || 0%{?rhel} >= 11 @@ -103,7 +103,7 @@ BuildRequires: glibc-utils BuildRequires: %{_bindir}/qemu-nbd BuildRequires: %{_bindir}/nbdcopy BuildRequires: %{_bindir}/nbdinfo -BuildRequires: nbdkit-server >= 1.45.11 +BuildRequires: nbdkit-server >= 1.46.1 BuildRequires: nbdkit-file-plugin BuildRequires: nbdkit-null-plugin BuildRequires: nbdkit-cow-filter @@ -116,7 +116,7 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %endif -Requires: libguestfs%{?_isa} >= 1:1.57.6-1 +Requires: libguestfs%{?_isa} >= 1:1.58.0-1 Requires: guestfs-tools >= 1.54 # XFS is the default filesystem in Fedora and RHEL. @@ -150,7 +150,7 @@ Requires: libnbd >= 1.22 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy Requires: %{_bindir}/nbdinfo -Requires: nbdkit-server >= 1.45.11 +Requires: nbdkit-server >= 1.46.1 Requires: nbdkit-curl-plugin Requires: nbdkit-file-plugin Requires: nbdkit-nbd-plugin @@ -367,6 +367,10 @@ done %changelog +* Tue Jan 06 2026 Richard W.M. Jones - 1:2.10.0-1 +- New upstream stable branch version 2.10.0 +- Requires libguestfs >= 1.58.0 and nbdkit >= 1.46. + * Tue Nov 4 2025 Richard W.M. Jones - 1:2.9.10-1 - New upstream development version 2.9.10 - Requires libguestfs 1.57.6 for new inspection APIs. From daaa263ad1b2d452da262945e0033122daeb247d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 13 Jan 2026 10:50:17 +0000 Subject: [PATCH 235/235] Hard depend on libnbd >= 1.24 This is not actually necessary for Fedora. But for RHEL 10.2, where we partially backported some 1.24 APIs to libnbd 1.22, the libnbd 1.22 package now provides LIBNBD_1.24 versioned symbols. However not all of them, so for example virt-v2v can fail with: virt-v2v: symbol lookup error: virt-v2v: undefined symbol: nbd_get_handle_size, version LIBNBD_1.24 Practically this means that you can update virt-v2v to RHEL 10.2, but leave libnbd from RHEL 10.1, and virt-v2v will then fail to run. Adding a hard dependency avoids this problem, and is fine for Fedora too. Related: https://issues.redhat.com/browse/RHEL-140894 --- virt-v2v.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 7557908..9309b31 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -79,7 +79,7 @@ BuildRequires: bash-completion-devel BuildRequires: file BuildRequires: gettext-devel BuildRequires: json-c-devel -BuildRequires: libnbd-devel >= 1.22 +BuildRequires: libnbd-devel >= 1.24 BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm BuildRequires: libvirt-devel @@ -146,7 +146,7 @@ Requires: edk2-aarch64 %if !%{with_ovirt} Requires: /usr/bin/python3 %endif -Requires: libnbd >= 1.22 +Requires: libnbd >= 1.24 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy Requires: %{_bindir}/nbdinfo