Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Reproducible by this src.rpm:
http://praiskup.fedorapeople.org/copr/rh-postgresql94-postgresql-9.4.4-2.el6.src.rpm
$ rpmbuild -vv --rebuild rh-postgresql94-postgresql-9.4.4-2.el6.src.rpm
...SNIP...
D: fini 100644 1 ( 0, 0) 163 /home/praiskup/rpmbuild/BUILDROOT/rh-postgresql94-postgresql-9.4.4-2.el6.x86_64/opt/rh/rh-postgresql94/root/usr/share/doc/rh-postgresql94-postgresql-9.4.4/MISSING_FEATURES
D: fini 100644 1 ( 0, 0) 1209 /home/praiskup/rpmbuild/BUILDROOT/rh-postgresql94-postgresql-9.4.4-2.el6.x86_64/opt/rh/rh-postgresql94/root/usr/share/doc/rh-postgresql94-postgresql-9.4.4/README
D: undo 100644 0 ( 0, 0) 0 /home/praiskup/rpmbuild/BUILDROOT/rh-postgresql94-postgresql-9.4.4-2.el6.x86_64/opt/rh/rh-postgresql94/root/usr/share/doc/rh-postgresql94-postgresql-9.4.4/README.rpm-dist
XZDIO: 59 writes, 1582164 total bytes in 0.243617 secs
error: create archive failed on file /home/praiskup/rpmbuild/BUILDROOT/rh-postgresql94-postgresql-9.4.4-2.el6.x86_64/opt/rh/rh-postgresql94/root/usr/share/doc/rh-postgresql94-postgresql-9.4.4/README.rpm-dist: cpio: Bad magic
RPM build errors:
create archive failed on file /home/praiskup/rpmbuild/BUILDROOT/rh-postgresql94-postgresql-9.4.4-2.el6.x86_64/opt/rh/rh-postgresql94/root/usr/share/doc/rh-postgresql94-postgresql-9.4.4/README.rpm-dist: cpio: Bad magic
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
$ ..
This is caused by '%doc %{_pkgdocdir}/README.rpm-dist' line in %files section.
If I do 'cp %{buildroot}%{_pkgdocdir}/README.rpm-dist ./' and then
I do '%doc README.rpm-dist' => this problem disappears and the package builds
fine.
This bug was fixed in rpm-4.9.1 [1], but I am against backporting that patch into rpm-4.8.0 that is in rhel-6 because it caused many problems. But we can add at least a better error message that you can't have the %doc tag with relative path and file with absolute path into the document directory at the same time in a rpm file list.
[1] https://github.com/rpm-software-management/rpm/commit/2f6bfc99d01df941f6aaad8497150f82eeb75311
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-2016-0936.html