Bug 1724242

Summary: Should ignore the ext2fs libraries during building rpms from nbdkit src package
Product: Red Hat Enterprise Linux 7 Reporter: mxie <mxie>
Component: nbdkitAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.7CC: juzhou, mtessun, mzhan, tzheng, xiaodwan, zili
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: nbdkit-1.8.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 20:09:01 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:
Attachments:
Description Flags
tps-srpmtest.log none

Description mxie@redhat.com 2019-06-26 14:29:11 UTC
Created attachment 1584839 [details]
tps-srpmtest.log

Description of problem:
Should ignore the ext2fs libraries during building rpms from nbdkit src package

Version-Release number of selected component (if applicable):
nbdkit-1.8.0-1.el7
libvirt-4.5.0-23.el7.x86_64
qemu-kvm-rhev-2.12.0-33.el7.x86_64
libguestfs-devel-1.40.2-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Run the tps-srpmtest for rhel7.7 nbdkit on tps server, rebuild test will be failed with below error, details pls refer to the log

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/test/rpmbuild/BUILDROOT/nbdkit-1.8.0-1.el7.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/nbdkit/plugins/nbdkit-ext2-plugin.so
   /usr/share/man/man1/nbdkit-ext2-plugin.1.gz


Actual results:
Can't build rpm packages from nbdkit src package if the server has ext2fs libraries installed

Expected results:
Building rpm from nbdkit src package should be ran with the --without-ext2 option so that ext2fs libraries can be ignored

Additional info:

Comment 2 Richard W.M. Jones 2019-06-26 15:46:28 UTC
We would need blocker+ or exception+ to add this to RHEL 7.7 at this point.  I'm
fairly certain that a TPS failure wouldn't qualify for that.

Nevertheless the fix is very simple, just:

diff --git a/nbdkit.spec b/nbdkit.spec
index ab0258c..72c29a5 100644
--- a/nbdkit.spec
+++ b/nbdkit.spec
@@ -27,7 +27,7 @@
 
 Name:           nbdkit
 Version:        1.8.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        NBD server
 
 License:        BSD
@@ -297,6 +297,7 @@ mv "$copy" python3
        --disable-ocaml \
        --disable-ruby \
        --without-curl \
+       --without-ext2 \
        --without-libvirt \
        --without-zlib \
        --without-liblzma \
@@ -456,6 +457,10 @@ make check -j1 || {
 
 
 %changelog
+* Wed Jun 26 2019 Richard W.M. Jones <rjones> - 1.8.0-2
+- Explicitly disable nbdkit-ext2-plugin in configure
+  resolves: rhbz#1724242
+
 * Tue Nov 13 2018 Richard W.M. Jones <rjones> - 1.8.0-1
 - Rebase to upstream stable version 1.8.0.
   resolves: rhbz#1621894

Comment 3 Richard W.M. Jones 2019-06-26 20:46:34 UTC
Martin suggests that we must move this to RHEL 7.8 since we won't get the required
blocker flag for 7.7.  This bug does NOT affect RHEL 8.

Comment 5 mxie@redhat.com 2019-10-14 08:24:02 UTC
I can reproduce the bug with build:
nbdkit-1.8.0-1.el7.src.rpm

Steps to reproduce:
1.Prepare a rhel7.8 server which has installed ext2fs libraries
# rpm -qa |grep e2fs
e2fsprogs-1.42.9-16.el7.x86_64
e2fsprogs-libs-1.42.9-16.el7.x86_64
e2fsprogs-devel-1.42.9-16.el7.x86_64
e2fsprogs-static-1.42.9-16.el7.x86_64


2.Download nbdkit-1.8.0-1.el7.src.rpm package to the server and copy to /home

3.log into server with regular user and create .rpmmacros file containing:
$ cat .rpmmacros 
%_topdir  %(echo $HOME)/rpmbuild
%_smp_mflags -j5

4.Resolve the dependence problem before rebuilding,then build nbdkit rpm packages from 1.8.0-1 src package
$rpmbuild --rebuild nbdkit-1.8.0-1.el7.src.rpm 
......
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mxie/rpmbuild/BUILDROOT/nbdkit-1.8.0-1.el7.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/nbdkit/plugins/nbdkit-ext2-plugin.so
   /usr/share/man/man1/nbdkit-ext2-plugin.1.gz



Verify the bug with build:
nbdkit-1.8.0-3.el7.src.rpm 

Steps:
1.Build nbdkit rpm packages from 1.8.0-3 src package on the same server
$ rpmbuild --rebuild nbdkit-1.8.0-3.el7.src.rpm 
....
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mxie/rpmbuild/BUILDROOT/nbdkit-1.8.0-3.el7.x86_64
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-basic-plugins-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-example-plugins-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-plugin-python-common-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-plugin-python2-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-plugin-vddk-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-devel-1.8.0-3.el7.x86_64.rpm
Wrote: /home/mxie/rpmbuild/RPMS/x86_64/nbdkit-debuginfo-1.8.0-3.el7.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.0KZoUz
+ umask 022
+ cd /home/mxie/rpmbuild/BUILD
+ cd nbdkit-1.8.0
+ /usr/bin/rm -rf /home/mxie/rpmbuild/BUILDROOT/nbdkit-1.8.0-3.el7.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.6HA3rV
+ umask 022
+ cd /home/mxie/rpmbuild/BUILD
+ rm -rf nbdkit-1.8.0
+ exit 0


Result:
  Can build nbdkit rpm packages from 1.8.0-3 src package successfully when rhel7 server has installed ext2fs libraries, so move the bug from ON_QA to VERIFIED

Comment 7 errata-xmlrpc 2020-03-31 20:09:01 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://access.redhat.com/errata/RHSA-2020:1167