rpm5 package verification and md5sum of config files

Jan Rękorajski baggins at pld-linux.org
Tue Oct 16 08:37:17 CEST 2012


On Tue, 16 Oct 2012, Jeffrey Johnson wrote:

> 
> On Oct 16, 2012, at 2:14 AM, Jan Rękorajski <baggins at pld-linux.org> wrote:
> 
> > As simple as possible:
> > 
> > $ rpm -V wget
> > ..5.....  c /etc/wgetrc
> > 
> > - rpm reports /etc/wgetrc on disk has different digest than in package
> > 
> > md5 of /etc/wgetrc in package:
> > 
> > $ rpm -qf --qf '%{FILEDIGESTS}\n' /etc/wgetrc
> > 0dbf720f5c9d29cbad8356f758a6a889
> > 
> > md5 of /etc/wgetrc on disk:
> > 
> > $ md5sum /etc/wgetrc
> > 0dbf720f5c9d29cbad8356f758a6a889  /etc/wgetrc
> > 
> > once again:
> > 
> > $ rpm -V wget
> > ..5.....  c /etc/wgetrc
> > 
> > So, file is unchanged, yet rpm reports it as changed, and as Adam
> > reported this happens for any file marked as %config(), even despite
> > %verify(not md5). This is clearly a bug in rpm5.
> > 
> 
> Yes likely (without checking). It's also likely a 1-liner fix,
> and perhaps caused by the previous patch to add a trailing '\0'
> (the same code is traversed).
> 
> The --Va code is also multi-threaded, leading to (iirc) about
> a 1.5x speedup, and the behavior may change depending on how
> rpm is built.

We build rpm with -fopenmp.

> This report is different than the original, which
> claimed that '5' was being displayed for all files (including
> directories which indicates some seriously different breakage
> if affecting all files, not just %config files.

The confusion here is because Adam found a second bug during duscussion
here, so it happened to be two reports mixed, the one above
and the '--nofdigests' option breakage - if you add this
option then rpm5 reports _all_ files as having bad digest.

Adam, which bug is fixed by your 1-liner?

-- 
Jan Rękorajski                                 | PLD/Linux
SysAdm                                         | http://www.pld-linux.org/
baggins<at>mimuw.edu.pl
baggins<at>pld-linux.org


More information about the pld-devel-en mailing list