Bug 1084921

Summary: supermin fails if TMPDIR contains space
Product: [Community] Virtualization Tools Reporter: Laurent Bigonville <bigon>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, mbooth, ptoscano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1084960 (view as bug list) Environment:
Last Closed: 2014-04-07 11:49:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1084960    

Description Laurent Bigonville 2014-04-07 09:22:44 UTC
Description of problem:
When setting at TMPDIR to a path that contains a white space, supermin is failing with an error.

Version-Release number of selected component (if applicable):
supermin: 5.1.6
libguestfs: 1.26.0

How reproducible:
Set TMPDIR to a path that includes a white space and try to use virt virt-sparsify

Steps to Reproduce:
1. export TMPDIR="/tmp/foo bar"
2. Run virt-sparsify

Actual results:
Fails with:

supermin: ext2: creating empty ext2 filesystem '/media/bigon/Little disk/.guestfs-1000/appliance.d.p4ovrvj6/root'
mke2fs: invalid blocks 'disk/.guestfs-1000/appliance.d.p4ovrvj6/root' on device '/media/bigon/Little'

Expected results:
The appliance is built and virt-sparsify can run

Additional info:

Comment 1 Richard W.M. Jones 2014-04-07 11:46:43 UTC
There was missing quoting around the call out to mke2fs.  I
have fix it in this commit:

https://github.com/libguestfs/supermin/commit/ae88217aa64f1924ff88941d2ad0ce1aa6ad7fc4

I tested libguestfs-test-tool with this and TMPDIR pointing
to a directory containing a space, and everything else seems
to work.