SCIENTIFIC-LINUX-USERS Archives

December 2006

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jaroslaw Polok <[log in to unmask]>
Reply To:
Jaroslaw Polok <[log in to unmask]>
Date:
Thu, 14 Dec 2006 16:44:08 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
Hello.

The inconsistency in md5 sums you see  is most likely due to prelinking
of binaries used on SL4 (see man prelink) - this process changes the
binary ELF header and in consequence also the md5 sum.

> $ rpm --dump -q bash | grep ^/bin/bash\
> /bin/bash 741384 1155510881 d9fc37e72601d7f756dee6c7f2f70dcd 0100755

This is the md5 sum of the original /bin/bash taken when rpm was built

> $ md5sum /bin/bash
> 234de4be15eeba794e5cb4f0996e6156  /bin/bash

This is the md5 sum of prelinked binary (note: on a freshly installed
system it will be identical as first one, prelink runs from cron after
some time only from /etc/cron.daily/prelink )

> $ rpm --verify bash

rpm uses a 'trick' (see: /etc/rpm/macros.prelink) to get back the
original md5sum (undoing, then redoing the prelink)

You can repeat the 'trick' (and get the coherent md5sums) by  running:

/usr/sbin/prelink -y /bin/bash --md5

On my (x86_64) system it gives:

# rpm --dump -q bash | grep ^/bin/bash
/bin/bash 741384 1155132807 fcd8c27a12887dd913a3701a64c22b70 0100755
root root 0 0 0 X

# md5sum /bin/bash
5d8e6175e0f2f2a2f9c37e1f512b20bb  /bin/bash

# /usr/sbin/prelink -y /bin/bash --md5
fcd8c27a12887dd913a3701a64c22b70  /bin/bash


Jarek
__
-------------------------------------------------------
_ Jaroslaw_Polok ___________________ CERN - IT/FIO/LA _
_ http://home.cern.ch/~jpolok ___ tel_+41_22_767_1834 _
_____________________________________ +41_78_792_0795 _

ATOM RSS1 RSS2