* Another devel branch merge: Change tools/grab_md5 to also look for

md5sums in the installer suite as well as the archive suite in
    case they're different. Also removed old woody support, to clean
    up the code a little. Updated Makefile and update-cd to match the
    command-line interface change.
This commit is contained in:
Steve McIntyre 2006-11-30 22:13:42 +00:00
parent a46520a7fd
commit 93fe864b6f
3 changed files with 81 additions and 91 deletions

View File

@ -802,9 +802,9 @@ conf:
mirrorcheck-binary: ok mirrorcheck-binary: ok
rm -f $(BDIR)/md5-check rm -f $(BDIR)/md5-check
$(Q)$(grab_md5) $(MIRROR) $(ARCH) $(CODENAME) $(BDIR)/md5-check $(Q)$(grab_md5) $(MIRROR) $(ARCH) $(CODENAME) $(DI_CODENAME) $(BDIR)/md5-check
if [ -n "$(NONUS)" ]; then \ if [ -n "$(NONUS)" ]; then \
$(grab_md5) $(NONUS) $(ARCH) $(CODENAME) $(BDIR)/md5-check; \ $(grab_md5) $(NONUS) $(ARCH) $(CODENAME) $(DI_CODENAME) $(BDIR)/md5-check; \
fi fi
$(Q)if [ -e $(BASEDIR)/data/$(CODENAME)/$(ARCH)/extra-sources ]; then \ $(Q)if [ -e $(BASEDIR)/data/$(CODENAME)/$(ARCH)/extra-sources ]; then \
echo "Extra dedicated source added; need to grab source MD5 info too"; \ echo "Extra dedicated source added; need to grab source MD5 info too"; \

View File

@ -9,13 +9,19 @@
# them into a single list ready for mkisofs to check later # them into a single list ready for mkisofs to check later
MIRROR=$1 MIRROR=$1
ARCH=$2 ARCHES="$2"
SUITE=$3 SUITE=$3
OUT=$4 DI_SUITE=$4
OUT=$5
for ARCH in $ARCHES
do
LOCATIONS="$MIRROR/dists/$SUITE/ $MIRROR/dists/$DI_SUITE/"
echo "Looking in $LOCATIONS"
case $ARCH in case $ARCH in
source) source)
FILES=`find $MIRROR/dists/$SUITE/ -name Sources.gz` FILES=`find $LOCATIONS -name Sources.gz`
echo -e "Using MD5 sums from Sources files:\n$FILES" echo -e "Using MD5 sums from Sources files:\n$FILES"
zcat -f $FILES | awk -v MIRROR=$MIRROR ' zcat -f $FILES | awk -v MIRROR=$MIRROR '
/^Directory:/ { /^Directory:/ {
@ -43,7 +49,7 @@ case $ARCH in
}' | sort | uniq >> $OUT }' | sort | uniq >> $OUT
;; ;;
alpha|amd64|arm|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc) alpha|amd64|arm|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc)
FILES=`find $MIRROR/dists/$SUITE/ -name Packages -o -name Packages.gz | grep binary-$ARCH` FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH`
echo -e "Using MD5 sums from Packages files:\n$FILES" echo -e "Using MD5 sums from Packages files:\n$FILES"
zcat -f $FILES | awk -v MIRROR=$MIRROR ' zcat -f $FILES | awk -v MIRROR=$MIRROR '
/^Filename:/ { /^Filename:/ {
@ -56,30 +62,14 @@ case $ARCH in
MD5 = $2 MD5 = $2
printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE) printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE)
}' | sort | uniq >> $OUT }' | sort | uniq >> $OUT
case $SUITE in
woody)
# Use the old boot-floppies images
FILE=$MIRROR/dists/$SUITE/main/disks-$ARCH/current/md5sum.txt
echo "Using MD5 sums from boot-floppies: $FILE"
LOC=dists/$SUITE/main/disks-$ARCH/current
for ENTRY in `cat $FILE | sed 's/ /:/g'`
do
PATH=`echo $ENTRY | /bin/sed "s?^.*:\./?$MIRROR/$LOC/?g"`
MD5=`echo $ENTRY | /bin/sed 's/:.*$//g'`
SIZE=`/usr/bin/stat -c %s $PATH`
printf '%s %12.12s %s\n' $MD5 $SIZE $PATH
done | sort | uniq >> $OUT
;;
*)
# Use the new D-I images. Do NOT use the "current" # Use the new D-I images. Do NOT use the "current"
# link; it causes problems with overlaid files... # link; it causes problems with overlaid files...
for VER in $MIRROR/dists/$SUITE/main/installer-$ARCH/* for VER in $MIRROR/dists/$DI_SUITE/main/installer-$ARCH/*
do do
if [ -d $VER ] && [ ! -L $VER ] ; then if [ -d $VER ] && [ ! -L $VER ] ; then
FILE=$VER/images/MD5SUMS FILE=$VER/images/MD5SUMS
echo "Using MD5 sums from d-i: $FILE" echo "Using MD5 sums from d-i: $FILE"
LOC=dists/$SUITE/main/installer-$ARCH/`basename $VER`/images LOC=dists/$DI_SUITE/main/installer-$ARCH/`basename $VER`/images
for ENTRY in `cat $FILE | sed 's/ /:/g'` for ENTRY in `cat $FILE | sed 's/ /:/g'`
do do
PATH=`echo $ENTRY | /bin/sed "s?^.*:\./?$MIRROR/$LOC/?g"` PATH=`echo $ENTRY | /bin/sed "s?^.*:\./?$MIRROR/$LOC/?g"`
@ -90,12 +80,11 @@ case $ARCH in
fi fi
done done
;; ;;
esac
;;
*) *)
echo "Unknown arch/source $ARCH!" echo "Unknown arch/source $ARCH!"
exit 1 exit 1
;; ;;
esac esac
done
exit 0 exit 0

View File

@ -24,7 +24,7 @@ MIRROR_AMD64=/mirror/debian-amd64
NONFREE=0 NONFREE=0
# What release version is this? # What release version is this?
VER=3.1r3 VER=3.1r4
# Is this an official CD? # Is this an official CD?
OFFICIAL=Official OFFICIAL=Official
@ -52,7 +52,7 @@ SNAPSHOT='Debian=http://us.cdimage.debian.org/cdimage/snapshot/Debian/ --try-las
# Location of the diff file to use to determine the changes. If you leave # Location of the diff file to use to determine the changes. If you leave
# this blank, we'll try to determine the changes from the ChangeLog files, # this blank, we'll try to determine the changes from the ChangeLog files,
# which is probably less accurate. # which is probably less accurate.
DIFF=/mirror/lists/$CODENAME/r0-r3.diff.full #~/r3.diff DIFF=/mirror/lists/$CODENAME/r0-r4.diff.full #~/r3.diff
CDSIZE=620 # megabytes, leaving space for metadata CDSIZE=620 # megabytes, leaving space for metadata
REL=Debian"$VER" REL=Debian"$VER"
@ -114,6 +114,7 @@ create_control_files () {
ARCH=$ARCH $scanpackages scan $CDDIR > /dev/null 2>&1 ARCH=$ARCH $scanpackages scan $CDDIR > /dev/null 2>&1
ARCH=$ARCH $scanpackages -noPackages.cd install $CDDIR > /dev/null 2>&1 ARCH=$ARCH $scanpackages -noPackages.cd install $CDDIR > /dev/null 2>&1
rm -f $CDDIR/*.Packages* #>/dev/null 2>&1 rm -f $CDDIR/*.Packages* #>/dev/null 2>&1
find $CDDIR/ -name Packages | xargs rm -f
;; ;;
esac esac
done done
@ -215,9 +216,9 @@ do
fi fi
rm -f $UPD/md5-check rm -f $UPD/md5-check
$GRAB_MD5 $MIRROR $THISARCH $CODENAME $UPD/md5-check $GRAB_MD5 $MIRROR $THISARCH $CODENAME $CODENAME $UPD/md5-check
if [ "$NONUS"x != ""x ] ; then if [ "$NONUS"x != ""x ] ; then
$GRAB_MD5 $NONUS $THISARCH $CODENAME $UPD/md5-check $GRAB_MD5 $NONUS $THISARCH $CODENAME $CODENAME $UPD/md5-check
fi fi
for file in `cat $UPD/list` for file in `cat $UPD/list`