6bbd8f8c21
virt-manager-1.3.0.tar.bz2 * Git hosting moved to http://github.com/virt-manager/virt-manager * Switch translation infrastructure from transifex to fedora.zanata.org * Add dogtail UI tests and infrastructure * Improved support for s390x kvm (Kevin Zhao) * virt-install and virt-manager now remove created disk images if VM install startup fails * Replace urlgrabber usage with requests and urllib2 * virt-install: add –network virtualport support for openvswitch (Daniel P. Berrange) * virt-install: support multiple –security labels * virt-install: support –features kvm_hidden=on|off (Pavel Hrdina) * virt-install: add –features pmu=on|off * virt-install: add –features pvspinlock=on|off (Abhijeet Kasurde) * virt-install: add –events on_lockfailure=on|off (Abhijeet Kasurde) * virt-install: add –network link_state=up|down * virt-install: add –vcpu placement=static|auto - Dropped virt-manager-1.2.1.tar.bz2 34db1af7-fix-adding-iscsi-pools.patch 360fe110-add-s390x-arch-support.patch 4970615f-fix-qemu-vs-lxc-detection.patch 590f5a52-urlfetcher-Clear-cached-ftp-connection-on-cleanupLoc.patch 5e68b0fc-dont-try-to-set-vmport-on-non-x86.patch 601a82cb-fix-console_type-if-xen.patch 76bad650-fix-virt-xml-define-and-update.patch 77423e7a-connection-catch-more-errors-in-filter_nodedevs.patch 8dbe96fc-add-s390x-arch-support.patch a9b303fb-fix-copy-host-cpu-definition.patch aebebbf8-report-an-error-for-pxe-install-without-network.patch cde2f0ef-Suppress-gi-warnings-about-lack-of-require_version.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=283
67 lines
2.7 KiB
Diff
67 lines
2.7 KiB
Diff
References: bnc#934270
|
|
We don't ship unar with any suse distro (not even in Factory).
|
|
Until we do, keep this patch to execute the correct archiver
|
|
program.
|
|
|
|
Index: virt-manager-1.3.0/virtconv/formats.py
|
|
===================================================================
|
|
--- virt-manager-1.3.0.orig/virtconv/formats.py
|
|
+++ virt-manager-1.3.0/virtconv/formats.py
|
|
@@ -118,6 +118,8 @@ def _find_input(input_file, parser, prin
|
|
try:
|
|
ext = os.path.splitext(input_file)[1]
|
|
tempdir = None
|
|
+ binname = None
|
|
+ pkg = None
|
|
if ext and ext[1:] in ["zip", "gz", "ova",
|
|
"tar", "bz2", "bzip2", "7z", "xz"]:
|
|
basedir = "/var/tmp"
|
|
@@ -129,19 +131,40 @@ def _find_input(input_file, parser, prin
|
|
|
|
base = os.path.basename(input_file)
|
|
|
|
- # check if 'unar' command existed.
|
|
- if not find_executable("unar"):
|
|
+ if (ext[1:] == "zip"):
|
|
+ binname = "unzip"
|
|
+ pkg = "unzip"
|
|
+ cmd = ["unzip", "-o", "-d", tempdir, input_file]
|
|
+ elif (ext[1:] == "7z"):
|
|
+ binname = "7z"
|
|
+ pkg = "p7zip"
|
|
+ cmd = ["7z", "-o" + tempdir, "e", input_file]
|
|
+ elif (ext[1:] == "ova" or ext[1:] == "tar"):
|
|
+ binname = "tar"
|
|
+ pkg = "tar"
|
|
+ cmd = ["tar", "xf", input_file, "-C", tempdir]
|
|
+ elif (ext[1:] == "gz"):
|
|
+ binname = "gzip"
|
|
+ pkg = "gzip"
|
|
+ cmd = ["tar", "zxf", input_file, "-C", tempdir]
|
|
+ elif (ext[1:] == "bz2" or ext[1:] == "bzip2"):
|
|
+ binname = "bzip2"
|
|
+ pkg = "bzip2"
|
|
+ cmd = ["tar", "jxf", input_file, "-C", tempdir]
|
|
+ elif (ext[1:] == "xz"):
|
|
+ binname = "xz"
|
|
+ pkg = "xz"
|
|
+ cmd = ["tar", "Jxf", input_file, "-C", tempdir]
|
|
+ if not find_executable(binname):
|
|
raise RuntimeError(_("%s appears to be an archive, "
|
|
- "but 'unar' is not installed. "
|
|
- "Please either install 'unar', or extract the archive "
|
|
+ "but '%s' is not installed. "
|
|
+ "Please either install '%s', or extract the archive "
|
|
"yourself and point virt-convert at "
|
|
- "the extracted directory.") % base)
|
|
+ "the extracted directory.") % (base, pkg, pkg))
|
|
|
|
- cmd = ["unar", "-o", tempdir, base]
|
|
print_cb(_("%s appears to be an archive, running: %s") %
|
|
(base, " ".join(cmd)))
|
|
|
|
- cmd[-1] = input_file
|
|
_run_cmd(cmd)
|
|
force_clean.append(tempdir)
|
|
input_file = tempdir
|