Bug 681013 - contrary to the man page, rpm keeps adding signatures to rpm packages when attempting to sign them.
Summary: contrary to the man page, rpm keeps adding signatures to rpm packages when at...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-28 19:20 UTC by RedHatBugMonkey
Modified: 2011-05-19 14:19 UTC (History)
1 user (show)

Fixed In Version: rpm-4.8.0-14.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 14:19:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0739 0 normal SHIPPED_LIVE rpm bug fix and enhancement update 2012-10-23 19:19:10 UTC

Description RedHatBugMonkey 2011-02-28 19:20:58 UTC
Description of problem:

contrary to the man page, rpm keeps adding signatures to rpm packages when attempting to sign them.

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

rpm-4.8.0-12.el6.x86_64

How reproducible:

100% of the time

Steps to Reproduce:
1.  create a 4096 bit rsa signing key with gpg
2.  find a test RPM package
3.  rpm --resign the package 3 times.
4.  rpm -K the package
  
Actual results:

find 3 insertions of the GPG key into the package.

Expected results:

find 1 insertion of the GPG into the package as the man page states.

Additional info:

From the man page:

"rpm --addsign|--resign PACKAGE_FILE ...

       Both  of  the  --addsign  and --resign options generate and insert new signatures for each package PACKAGE_FILE given, replacing any existing signatures. There are two options for historical reasons,
       there is no difference in behavior currently."

A simple demo:

root@hostname:~/rpmbug >rpm -K somedumbrpm-1.0-1.0.noarch.rpm
somedumbrpm-1.0-1.0.noarch.rpm: sha1 md5 OK
root@hostname:~/rpmbug >rpm -vv --resign somedumbrpm-1.0-1.0.noarch.rpm
Enter pass phrase: 
Pass phrase is good.
somedumbrpm-1.0-1.0.noarch.rpm:
D: Expected size:        21684 = lead(96)+sigs(180)+pad(4)+data(21404)
D:   Actual size:        21684
D: GPG sig size: 543
D: Got 543 bytes of GPG sig
D: GPG sig size: 543
D: Got 543 bytes of GPG sig
D: Signature: size(1296)+pad(0)
root@hostname:~/rpmbug >rpm -K somedumbrpm-1.0-1.0.noarch.rpm
somedumbrpm-1.0-1.0.noarch.rpm: RSA sha1 ((MD5) PGP) md5 NOT OK (MISSING KEYS: (MD5) PGP#deadf00d) 
root@hostname:~/rpmbug >rpm -vv --resign somedumbrpm-1.0-1.0.noarch.rpm
Enter pass phrase: 
Pass phrase is good.
somedumbrpm-1.0-1.0.noarch.rpm:
D: Expected size:        22796 = lead(96)+sigs(1296)+pad(0)+data(21404)
D:   Actual size:        22796
D: GPG sig size: 543
D: Got 543 bytes of GPG sig
D: GPG sig size: 543
D: Got 543 bytes of GPG sig
D: Signature: size(1856)+pad(0)
root@hostname:~/rpmbug >rpm -K somedumbrpm-1.0-1.0.noarch.rpm
somedumbrpm-1.0-1.0.noarch.rpm: RSA sha1 ((MD5) PGP) ((MD5) PGP) md5 NOT OK (MISSING KEYS: (MD5) PGP#deadf00d (MD5) PGP#deadf00d) 
root@hostname:~/rpmbug >rpm -vv --resign somedumbrpm-1.0-1.0.noarch.rpm
Enter pass phrase: 
Pass phrase is good.
somedumbrpm-1.0-1.0.noarch.rpm:
D: Expected size:        23356 = lead(96)+sigs(1856)+pad(0)+data(21404)
D:   Actual size:        23356
D: GPG sig size: 543
D: Got 543 bytes of GPG sig
D: GPG sig size: 543
D: Got 543 bytes of GPG sig
D: Signature: size(2416)+pad(0)
root@hostname:~/rpmbug >rpm -K somedumbrpm-1.0-1.0.noarch.rpm
somedumbrpm-1.0-1.0.noarch.rpm: RSA sha1 ((MD5) PGP) ((MD5) PGP) ((MD5) PGP) md5 NOT OK (MISSING KEYS: (MD5) PGP#deadf00d (MD5) PGP#deadf00d (MD5) PGP#deadf00d)

Comment 2 Panu Matilainen 2011-03-01 07:21:19 UTC
This is fixed as an intended side-effect of fixing bug 608608 so ACK, and no new code needed.

Comment 7 errata-xmlrpc 2011-05-19 14:19:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0739.html


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