#!/bin/sh # Wrapper script to recompile rpms and also check which rpms have # failed to compile correctly. SRPMS=/SRPMS LOG=/LOG test -d $SRPMS || exit 0 test -d $LOG || exit 0 build() { local bn target test -f "$1" || continue bn=`basename $1 .src.rpm` test -n "$2" && bn=$bn.$2 test -f $LOG/$bn && continue touch $LOG/$bn target= test -n "$2" && target="--target=$2" rpmbuild --rebuild $target $1 2>&1 | tee $LOG/$bn } # look at failed builds if test "$1" = check ; then for i in $LOG/* ; do test "x`tail -1 $i`" = "x+ exit 0" && continue { echo $i; tail $i; } | less # XXX or use: less +G $i done exit 0 fi for i in $SRPMS/*.rpm ; do build $i done if test $HOSTTYPE = i386 ; then # build i686 rpms for glibc and openssl for i in $SRPMS/{glibc-2,openssl-}*.rpm ; do build $i i686 done # build i586/i686/athlon kernel rpms for a in i586 i686 athlon ; do for i in $SRPMS/kernel-2*.rpm ; do build $i $a done done fi # After the rebuild of rpms, you can check if the compiled rpms # pick up additional provides/requires by comparing them to the # original ones. # for i in *.rpm ; do echo "--- $i"; \ # rpm -qp --nosignature --requires $i; done # Another check could be comparing the file lists for # any differences to the original rpms.