Bug 1212807 - virt-builder --selinux-relabel flag fails on cross-architecture builds
Summary: virt-builder --selinux-relabel flag fails on cross-architecture builds
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1222993
TreeView+ depends on / blocked
 
Reported: 2015-04-17 11:02 UTC by Richard W.M. Jones
Modified: 2015-05-19 14:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1222993 (view as bug list)
Environment:
Last Closed: 2015-05-18 11:08:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2015-04-17 11:02:09 UTC
Description of problem:

If host arch != guest arch, the virt-builder --selinux-relabel
flag fails:

$ virt-builder --arch ppc64 fedora-21 --selinux-relabel
[   1.0] Downloading: http://libguestfs.org/download/builder/fedora-21-ppc64.xz
[   1.0] Planning how to build this image
[   1.0] Uncompressing
[  14.0] Opening the new disk
[  27.0] Setting a random seed
[  27.0] Setting passwords
virt-builder: Setting random password of root to 9XFmS9JoU10hYuWf
[  28.0] SELinux relabelling
virt-builder: warning: log file /tmp/builder.log: Guestfs.Error("download: 
/tmp/builder.log: No such file or directory") (ignored)
virt-builder: error: load_policy && fixfiles restore: command exited with 
an error

This is because the code tries to run binaries from the
guest (load_policy etc), but it should skip that step and just
touch /.autorelabel directly.

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

libguestfs-1.29.36-1.fc23.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See command above.

Comment 1 Richard W.M. Jones 2015-05-15 09:08:51 UTC
Patches posted upstream:
https://www.redhat.com/archives/libguestfs/2015-May/msg00053.html

Comment 2 Richard W.M. Jones 2015-05-15 14:32:28 UTC
v2 patches:
https://www.redhat.com/archives/libguestfs/2015-May/msg00073.html

Comment 3 Richard W.M. Jones 2015-05-18 11:08:50 UTC
Fixed upstream in >= 1.29.43.


Note You need to log in before you can comment on or make changes to this bug.