Bug 1196101

Summary: virt-builder --upload option doesn't work to a FAT partition
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Maros Zatko <mzatko>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mzatko, ptoscano, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-08 12:47:38 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:

Description Richard W.M. Jones 2015-02-25 10:10:10 UTC
Description of problem:

The aarch64 Fedora 21 image uses EFI and therefore has a
FAT partition mounted under /boot/efi.  Trying to use
the virt-builder --upload option fails:

$ touch /tmp/test
$ virt-builder --arch aarch64 fedora-21 \
  --upload /tmp/test:/boot/efi/test
[...]
virt-builder: error: libguestfs error: chown: /boot/efi/test: 1000.1000: 
Operation not permitted

Enabling trace shows that we're running chmod + chown (why?)

libguestfs: trace: chmod 420 "/boot/efi/test"
libguestfs: trace: chmod = 0
libguestfs: trace: chown 1000 1000 "/boot/efi/test"
libguestfs: trace: chown = -1 (error)

It should probably detect if the mountpoint is FAT and
avoid the chown at least.

Version-Release number of selected component (if applicable):

virt-builder 1.29.24

How reproducible:

100%

Comment 1 Maros Zatko 2015-04-08 18:05:38 UTC
fixed in commit e6dadd6aca139792863cd3d274270095ec49a34e
and commit 6297534091666ccb7a5192763b53a4350cb550e3