Bug 1201507

Summary: fuse missing from BuildRequires
Product: Red Hat Enterprise Linux 7 Reporter: Anssi Johansson <rhbugs>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.1CC: huzhan, leiwang, ptoscano, riehecky, tis, toracat, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libguestfs-1.28.1-1.25.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 07:00:15 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 Anssi Johansson 2015-03-12 20:38:14 UTC
Description of problem:
libguestfs fails to build if fuse with its fusermount binary is not installed. There is already a BuildRequires of fuse-devel and a Requires of fuse, but fuse should also be listed as a BuildRequires. The build fails due to a number of tests requiring fusermount to function properly. The tests are not simply skipped if fusermount is not present, but instead, the tests fail.

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

How reproducible:
Always

Steps to Reproduce:
1. ensure fuse is not installed
2. rpmbuild --define %_topdir /builddir/libguestfs -ba SPECS/libguestfs.spe

Actual results:
These tests fail:
FAIL: test-xattrs-fuse.sh
FAIL: test-parallel-mount-local
FAIL: test-mount-local.sh
FAIL: test-virt-sysprep-script.sh
FAIL: test-fuse
FAIL: test-fuse-umount-race.sh
FAIL: test-guestmount-fd

The error message in each is similar to:
libguestfs: guestfs__mount_local: fuse_mount /tmp/lieYxhyH9K
fuse: failed to exec fusermount: No such file or directory
libguestfs: trace: mount_local = -1 (error)

Expected results:
The tests should pass or get skipped. fuse's installation should be enforced by having it as a BuildRequires.

Additional info:
Installing fuse prior to building the package makes the tests pass.

Comment 1 Richard W.M. Jones 2015-03-12 20:46:15 UTC
It seems like a few things conspire here:

(1) On RHEL builders, /dev/fuse is not available, so fuse tests are
skipped.  This would be different if building using rpmbuild.

(2) On Fedora, we BuildRequire zfs-fuse which pulls in fuse.  On RHEL
we don't have zfs-fuse.

Anyway, it does appear to be a bug in both RHEL and Fedora.  I have
fixed it in Fedora.

Comment 3 Hu Zhang 2015-10-20 07:34:07 UTC
Verified with the packages:
libguestfs-1.28.1-1.55.el7.x86_64

Verify steps:
1. remove the fuse package
# yum remove fuse

2. build the libguestfs
# rpmbuild --define '%_topdir /root/rpmbuild' -ba /root/rpmbuild/SPECS/libguestfs.spec
error: Failed build dependencies:
        fuse is needed by libguestfs-1:1.28.1-1.55.el7.x86_64

On RHEL7.2, fuse is needed when rpmbuild libguestfs.
So verified.

Comment 5 errata-xmlrpc 2015-11-19 07:00:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2183.html