Bug 118385

Summary: rpm -e --repackage creates rpm with bad md5sum
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-16 13:15:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Green 2004-03-16 07:45:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Description of problem:
Install an rpm and then uninstall it with

rpm -e --repackage foo

The /var/spool/repackage/foo.rpm will have a bad internal md5 sum.

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

How reproducible:
Always

Steps to Reproduce:
1. rpm -ivh foo-1.2-3.rpm
2. rpm -e --repackage foo
3. rpm -ivh /var/spool/repackage/foo-1.2-3.rpm


Actual Results: 
/etc/security/selinux/src/policy/file_contexts/file_contexts: No such
file or directory
error: /root/jaf-1.0.2-3jpp.noarch.rpm: MD5 digest: BAD
Expected(5ca691b5226c05c1db9dc9993fbcbbd4) !=
(044928a134aeef433d7017af9645c414)
error: /root/jaf-1.0.2-3jpp.noarch.rpm cannot be installed


Expected Results:  Preparing...               
########################################### [100%]
   1:jaf                   
########################################### [100%]


Additional info:

Comment 1 Jeff Johnson 2004-03-16 13:15:24 UTC
Yup.

In fact a tag is added to the header deliberately to poison
the MD5 sum, so that repackaged packages are not packages.