Bug 1156497

Summary: cpio digest mismatch when initializing fc19 chroot
Product: [Fedora] Fedora Reporter: David Caro <dcaroest>
Component: rpmAssignee: packaging-team-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: admiller, eedri, fweimer, jdisnard, jzeleny, mebrown, msimacek, msuchy, novyjindrich, packaging-team-maint, pknirsch, pmatilai, praiskup, sbonazzo, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rpm-4.12.0.1-3.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Fresh fc21 server install, updated and just installed mock.
Last Closed: 2014-11-01 12:39:56 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description David Caro 2014-10-24 11:07:15 EDT
Description of problem:
When initializing a fc19 mock environment it fails to install the package binutils with the error:

Error unpacking rpm package binutils-2.23.52.0.1-9.fc19.x86_64
error: unpacking of archive failed on file /usr/bin/ld;544a3ab2: cpio: Digest mismatch
error: binutils-2.23.52.0.1-9.fc19.x86_64: install failed

Version-Release number of selected component (if applicable):
Installed Packages
mock.noarch
  1.1.41-3.fc21
python-mock.noarch
  1.0.1-4.fc21
yum.noarch
  3.4.3-153.fc21
cpio.x86_64
  2.11-30.fc21
rpm.x86_64
  4.12.0.1-2.fc21

How reproducible:
On a fresh server install of fc21 (x86_64) (haven't tested on desktop) install mock and run mock using the default configuration for fedora-19-x86_64 (installed by mock).

> mock --root=fedora-19-x86_64 --init


Steps to Reproduce:
1.mock --root=fedora-19-x86_64 --init
2.
3.

Actual results:
Init fails on
Error unpacking rpm package binutils-2.23.52.0.1-9.fc19.x86_64
error: unpacking of archive failed on file /usr/bin/ld;544a6a02: cpio: Digest mismatch
error: binutils-2.23.52.0.1-9.fc19.x86_64: install failed


Expected results:
Init successful

Additional info:
Comment 1 Miroslav Suchý 2014-10-27 07:04:21 EDT
Mock just use yum. It may be problem of yum, rpm or cpio. Moving to first one in this chain.

Changing the reproducer to:
1. sudo /usr/bin/yum --installroot /var/lib/mock/fedora-19-x86_64/root --releasever 19 install @buildsys-build  --nogpgcheck

This pass on Fedora 19, but fails on Fedora 21 with:
Error unpacking rpm package binutils-2.23.52.0.1-9.fc19.x86_64
error: unpacking of archive failed on file /usr/bin/ld;544a6a02: cpio: Digest mismatch
error: binutils-2.23.52.0.1-9.fc19.x86_64: install failed
Comment 2 Panu Matilainen 2014-10-27 07:08:55 EDT
This is rpm territory, and yes I can reproduce.
Comment 3 Panu Matilainen 2014-10-27 07:50:09 EDT
Its a regression on handling a hardlinked %ghost file: in binutils /usr/bin/ld and /usr/bin/ld.gold are hardlinked files in the buildroot but /usr/bin/ld  is packaged as %ghost. Rpm >= 4.12 thinks a %ghost doesn't not count as a hardlink and it goes wrong from there.

Will fix...
Comment 4 Fedora Update System 2014-10-28 06:00:02 EDT
rpm-4.12.0.1-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/rpm-4.12.0.1-3.fc21
Comment 5 Fedora Update System 2014-11-01 12:39:56 EDT
rpm-4.12.0.1-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Ľuboš Kardoš 2015-07-02 10:04:41 EDT
*** Bug 1173997 has been marked as a duplicate of this bug. ***