Re: [PATCH] spec: fix libvirt-docs subpackage on RHEL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Nov 2013, Daniel P. Berrange wrote:
On Wed, Nov 13, 2013 at 12:02:08PM +1100, Michael Chapman wrote:
RHEL's rpmbuild wipes the docdir for a (sub-)package if any %doc
directives are present, prior to copying in the marked documentation.
This means we can't prepopulate this directory with the HTML
documentation during the %install phase.

Instead, move the HTML documentation to a temporary directory during
%install and mark the contents of this temporary directory with %doc.

Huh, AFAICT, this has worked fine for years. What actual problem are
you seeing without this patch ?  Do you have the 'redhat-rpm-config'
package installed ?

Yes, I do.

Here's the relevant bits from my Mock log:

 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.ZgFSCX
 + umask 022
 + cd /builddir/build/BUILD
 + cd libvirt-1.1.4
 + DOCDIR=/builddir/build/BUILDROOT/libvirt-1.1.4-1.el6.x86_64/usr/share/doc/libvirt-docs-1.1.4
 + export DOCDIR
 + rm -rf /builddir/build/BUILDROOT/libvirt-1.1.4-1.el6.x86_64/usr/share/doc/libvirt-docs-1.1.4
 + /bin/mkdir -p /builddir/build/BUILDROOT/libvirt-1.1.4-1.el6.x86_64/usr/share/doc/libvirt-docs-1.1.4
 + cp -pr AUTHORS ChangeLog.gz NEWS README TODO /builddir/build/BUILDROOT/libvirt-1.1.4-1.el6.x86_64/usr/share/doc/libvirt-docs-1.1.4
 + exit 0
 warning: File listed twice: /usr/share/doc/libvirt-docs-1.1.4
 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
 ...
 error: create archive failed on file /builddir/build/BUILDROOT/libvirt-1.1.4-1.el6.x86_64/usr/share/doc/libvirt-docs-1.1.4/html/32favicon.png: cpio: Bad magic
 RPM build errors:
     File listed twice: /usr/share/doc/libvirt-docs-1.1.4
     create archive failed on file /builddir/build/BUILDROOT/libvirt-1.1.4-1.el6.x86_64/usr/share/doc/libvirt-docs-1.1.4/html/32favicon.png: cpio: Bad magic

I think the problem was introduced with commit e23216da, and that it's only because the %doc directive now contains relative paths. Before then the only %doc directives in that subpackage were absolute paths. RHEL 6's rpmbuild at least seems to handle those differently, and it doesn't generate an "rm -rf" line if only absolute paths are present.

- Michael

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]