Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157108 - rpm install issues "cpio: MD5 sum mismatch" for symlinks that generated prelink error during build
Summary: rpm install issues "cpio: MD5 sum mismatch" for symlinks that generated preli...
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-06 21:43 UTC by Chris Cogdon
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-11-04 12:52:05 UTC

Attachments (Terms of Use)

Description Chris Cogdon 2005-05-06 21:43:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050331 Camino/0.8.3

Description of problem:
During the 'package' phase of building an RPM, when packaging a symlink that points to a library, and the 'prelink check' phase generates the following error on that symlink:

"prelink: <full-path-to-symlink>: at least one of file�s dependencies has changed since prelinking"

Then attempting to install the resulting rpm file will generate the following error:

error: unpacking of archive failed on file <path to symlink>;<some number>: cpio: MD5 sum mismatch

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a 'build root' tree that may or may not contain several files. However, copy at least one library file into this tree, and create a symlink in the tree that points to the library. (My example used, and the symlink was simply
2. Create a very simple .spec file that does nothing but package up that tree, setting the BuildRoot to the top of the tree. For example:

--- --- ---
Summary: Test Package
Name: test-package
Version: 1.0
Release: 1
License: Public Domain
Group: Applications/Development
AutoReqProv: off
BuildRoot: %{inbuildroot}

Simple Test






%defattr(-, root, root)
--- --- ---

3. Run the specfile. (Notice the warning message from prelink)
4. Attempt to install the package.

Actual Results:  Installation Generates "error: unpacking of archive failed on file <path to symlink>;<some number>: cpio: MD5 sum mismatch"

Expected Results:  Installation should complete without error.

Additional info:

I SUSPECT what is happening is that the warning from the prelink check is confusing RPM somewhat, and causing RPM to generate an incorrect md5 for the affected symlink.

--nomd5 during the install allows rpm --install to complete, and DOES save the symlink correctly.

As a workaround, add the following to the top of the SPEC file that's giving problems:

%define __prelink_undo_cmd %{nil}

This will turn off the prelink check during packaging, and the resulting package will install fine.

I COMPLETELY understand that this is an exceptionally esoteric issue, and probably won't be fixed anytime soon. However, I spent a lot of time tracking this one down, and I'd like to save the next person from the same heartache :)

Comment 1 Jeff Johnson 2005-11-04 12:52:05 UTC
Considering the complexity of the interaction of prelink and rpm --verify, I see no
meaningful way to permit prelink to change the contents of a file while rpm --verify
computes an invariant digest.

Insuring that prelink has been run, and is not actively running while building, needs
to be done by the build system, not by rpmbuild.

Note You need to log in before you can comment on or make changes to this bug.