Bug 126287

Summary: rpm -V will sometimes flag size difference when --nomd5 is used but not without --nomd5 option
Product: [Fedora] Fedora Reporter: Bret Hughes <bhughes>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-19 04:46:18 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 Bret Hughes 2004-06-18 14:49:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20030212

Description of problem:
rpm appears to incorrectly indicate a file size difference on some
files  if used with the --nomd5 option.  I have tried this on two
seperate machines running fedora core 1 both running athlon kernels on
duron processors.

It appears to only happen on some packages

passwd and kernel-pcmcia-cs are two off the top of my head

ethereal is a third

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

How reproducible:
Always

Steps to Reproduce:
1.run rpm -V kernel-pcmcia-cs
2.run rpm -V --nomd5 kernel-pcmcia-cs
3.compare outputs of two commands
    

Actual Results:  sizes flagged as different in --nomd5 version

Expected Results:  same files found by each version



Additional info:

passwd example :

# rpm -V  passwd
# rpm -V --nomd5 passwd
S.......   /usr/bin/passwd
# 

kernel-pcmcia-cs

# rpm -V  kernel-pcmcia-cs
S.5....T c /etc/pcmcia/config.opts
S.5....T c /etc/sysconfig/pcmcia
# rpm -V --nomd5 kernel-pcmcia-cs
S......T c /etc/pcmcia/config.opts
S......T c /etc/sysconfig/pcmcia
S.......   /sbin/cardctl
S.......   /sbin/cardmgr
S.......   /sbin/dump_cis
S.......   /sbin/ftl_check
S.......   /sbin/ftl_format
S.......   /sbin/ide_info
S.......   /sbin/ifport
S.......   /sbin/ifuser
S.......   /sbin/lspnp
S.......   /sbin/pack_cis
S.......   /sbin/probe
S.......   /sbin/scsi_info

ethereal:

# rpm -V  ethereal
# rpm -V --nomd5 ethereal
S.......   /usr/lib/libethereal.so.0.0.1
S.......   /usr/lib/libwiretap.so.0.0.1
S.......   /usr/sbin/editcap
S.......   /usr/sbin/mergecap
S.......   /usr/sbin/tethereal
S.......   /usr/sbin/text2pcap
# 



some info on the machine:

# cat /etc/redhat-release 
Fedora Core release 1 (Yarrow)


# uname -a
Linux mensroom_580_king_toronto 2.4.22-1.2188.nptl #1 Wed Apr 21
20:36:05 EDT 2004 i686 i686 i386 GNU/Linux

# mount
/dev/hda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)

Comment 1 Jeff Johnson 2004-06-19 04:46:18 UTC
# rpm -V passwd ethereal
# rpm -V --nomd5 passwd ethereal
S........   /usr/bin/passwd
S........   /usr/lib/libethereal.0.0.1
S........   /usr/lib/libwiretap.so.0.0.1
S........   /usr/sbin/editcap
S........   /usr/sbin/mergecap
S........   /usr/sbin/tethereal
S........   /usr/sbin/text2pcap

Yup. all those files are prelinked, and there are different
means to get the file size depending on whether --nomd5 was
specified or not. When computing the MD5 digest, the size
is the number of bytes written from the pipe to prelink --undo,
while with --nomd5, the size is what is actually on the file
system (which has been modified by prelinking the file)

# ls -al /usr/bin/passwd
-r-s--x--x  1 root root 92757 Feb 15 13:04 /usr/bin/passwd
# prelink -u /usr/bin/passwd
# ls -al /usr/bin/passwd
-r-s--x--x  1 root root 89273 Feb 15 13:04 /usr/bin/passwd
# rpm -V passwd
# rpm -V --nomd5 passwd
#

It's not at all clear what the fix is, the behavior
using the prelink -u helper is the expected behavior,
--nomd5 is the surprising behavior (but is actually
accurate, check with ls).

Alternatively, disable the size check if/when using --nomd5.
# rpm -V --nomd5 passwd
S........   /usr/bin/passwd
# rpm -V --nomd5 --nosize passwd
#