[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpm-4.0.4: rpm -V md5sum failure, file corruption



On Tue, 21 Jan 2003, Jeff Johnson wrote:

> Again, if you can characterize some aspect of the problem that is testable
> and/or reproducible, I can try to run a test.
>
> 73 de Jeff

Well, you should be able to set up a system using 2.2.20 or 2.2.23, IDE,
ext2, and rpm-4.0.4, and run my test script (below).  It usually comes
up with a few errors a day.

Note that I have taken pains to build a set of minimum rpms for a
system, where (almost) every file is owned by an rpm.  Thus rpm -Va
produces a pretty minimal set of files, where md5sum failures are
confined to config files (marked with a "c" in rpm -V output).  So, the
following script just logs rpm -Va and looks for the md5 lines related
to non-config files, then grabs a copy.

#! /bin/bash
# run me from /var/tmp

try=0

findfiles () {
  FILE=$1
  grep "\.5\." $FILE |\
  grep -v "/var/tmp" |\
  while read PRE BADFILE; do
    if [ -f "$BADFILE" ]; then  # this skips config files
      cp $BADFILE ./$(basename $BADFILE).$$.$try
      echo FAILURE on try $try
    fi
  done
}

while true; do
echo $try
DIR=roguetest.$$.$try
mkdir $DIR
cd $DIR
awk -f /usr/share/awk/rogue.awk > log
findfiles log
FOUND=$( find . -type f -not -name log )
cd ..
if [ -z "$FOUND" ]; then
  rm -rf $DIR
fi
try=$[ $try+1 ]
done
# end


Matt





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []