Bug 1005480

Summary: mock builds for epel-5-x86_64 fail at unpacking of cpio archive: md5 sum mismatch
Product: [Fedora] Fedora Reporter: David Timms <dtimms>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: mebrown, msuchy, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-02 13:22:38 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
mock's build.log indicating unpack failure. none

Description David Timms 2013-09-07 13:02:34 UTC
Created attachment 795109 [details]
mock's build.log indicating unpack failure.

Description of problem:
Attempting a mock build of a few different packages fails for epel-5-x86_64.

Version-Release number of selected component (if applicable):
mock-1.1.33-1.fc19.noarch

How reproducible:
Yes.

Steps to Reproduce:
1. yum install mock
2. mock -r epel-5-x86_64 --rebuild /home/davidt/rpmbuild/SRPMS/tnef-1.4.9-1.fc17.src.rpm 

Actual results:
Finish: device setup
Start: build setup for tnef-1.4.9-1.fc17.src.rpm
ERROR: Exception(/home/davidt/rpmbuild/SRPMS/tnef-1.4.9-1.fc17.src.rpm) Config(epel-5-x86_64) 0 minutes 15 seconds
INFO: Results and/or logs in: /var/lib/mock/epel-5-x86_64/result
ERROR: Command failed. See logs for output.
 # ['rpm', '-Uvh', '--nodeps', '/builddir/build/originals/tnef-1.4.9-1.fc17.src.rpm']


Expected results:
Build progresses past .src.rpm extract into actual build process.

Additional info:
/var/lib/mock/epel-5-x86_64/result/root/log:
DEBUG util.py:316:  Executing command: ['rpm', '-Uvh', '--nodeps', '/builddir/build/originals/tnef-1.4.9-1.fc17.src.rpm'] with env {'LANG': 'en_US.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMASK': '002'}
DEBUG util.py:266:  tnef                        warning: user davidt does not exist - using root
DEBUG util.py:266:  warning: group davidt does not exist - using root
DEBUG util.py:266:  ##################################################
DEBUG util.py:266:  error: unpacking of archive failed on file /builddir/build/SOURCES/tnef-1.4.9.tar.gz;522b2173: cpio: MD5 sum mismatch
DEBUG util.py:356:  Child return code was: 1
DEBUG util.py:316:  Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-5-x86_64/root/proc/filesystems'] with env {'LANG': 'en_US.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
DEBUG util.py:356:  Child return code was: 0
DEBUG util.py:316:  Executing command: ['/bin/um

Comment 1 David Timms 2013-09-15 11:40:50 UTC
Will this be because el5 doesn't have the new packing type inside the rpm that fedora 19 etc has ?

Is there a workaround ?

Comment 2 Clark Williams 2013-09-27 21:57:26 UTC
This sort of problem has always plagued us. At some point the host environment moves far enough away from an old target that it's almost impossible to get builds working. That's why the koji builders for RHEL5 are running older versions of mock. 

The thing that's failing is the installation of the SRPM inside the chroot. This is done with the chroot rpm, meaning the target distro package, which in this case is the old epel5 rpm, which does md5 verification of the archive. I'll look at allowing a --nomd5 option (or --nofiledigest on later fedora's) inside the chroot to see if we can keep building epel5 packages on fedora. 

The only workaround I can suggest trying is to rebuild the SRPM on an epel5 box (or inside a mock chroot using mock --shell) and build he resulting SRPM with mock. You still may encounter rpm difference problems due to rpmdb changes.

Comment 3 Miroslav Suchý 2014-04-02 13:22:38 UTC
You will get exactly same error if you will build using rpmbuild in native RHEL5.

The correct solution is to create srpm using:
  rpmbuild --define "_source_filedigest_algorithm md5"