* 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:
parent
a46520a7fd
commit
93fe864b6f
4
Makefile
4
Makefile
|
@ -802,9 +802,9 @@ conf:
|
|||
|
||||
mirrorcheck-binary: ok
|
||||
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 \
|
||||
$(grab_md5) $(NONUS) $(ARCH) $(CODENAME) $(BDIR)/md5-check; \
|
||||
$(grab_md5) $(NONUS) $(ARCH) $(CODENAME) $(DI_CODENAME) $(BDIR)/md5-check; \
|
||||
fi
|
||||
$(Q)if [ -e $(BASEDIR)/data/$(CODENAME)/$(ARCH)/extra-sources ]; then \
|
||||
echo "Extra dedicated source added; need to grab source MD5 info too"; \
|
||||
|
|
159
tools/grab_md5
159
tools/grab_md5
|
@ -9,93 +9,82 @@
|
|||
# them into a single list ready for mkisofs to check later
|
||||
|
||||
MIRROR=$1
|
||||
ARCH=$2
|
||||
ARCHES="$2"
|
||||
SUITE=$3
|
||||
OUT=$4
|
||||
DI_SUITE=$4
|
||||
OUT=$5
|
||||
|
||||
case $ARCH in
|
||||
source)
|
||||
FILES=`find $MIRROR/dists/$SUITE/ -name Sources.gz`
|
||||
echo -e "Using MD5 sums from Sources files:\n$FILES"
|
||||
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
||||
/^Directory:/ {
|
||||
DIR = $2
|
||||
next
|
||||
}
|
||||
/^Files:/ {
|
||||
in_files = 1
|
||||
next
|
||||
}
|
||||
/^ / {
|
||||
if (in_files) {
|
||||
gsub("^ ", "", $0)
|
||||
MD5 = $1
|
||||
SIZE = $2
|
||||
FILE = $3
|
||||
printf("%s %12s %s/%s/%s\n", MD5, SIZE, MIRROR, DIR, FILE);
|
||||
for ARCH in $ARCHES
|
||||
do
|
||||
LOCATIONS="$MIRROR/dists/$SUITE/ $MIRROR/dists/$DI_SUITE/"
|
||||
echo "Looking in $LOCATIONS"
|
||||
|
||||
case $ARCH in
|
||||
source)
|
||||
FILES=`find $LOCATIONS -name Sources.gz`
|
||||
echo -e "Using MD5 sums from Sources files:\n$FILES"
|
||||
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
||||
/^Directory:/ {
|
||||
DIR = $2
|
||||
next
|
||||
}
|
||||
}
|
||||
/^[^ ]/ {
|
||||
in_files = 0
|
||||
FILE = ""
|
||||
DIR = ""
|
||||
}' | sort | uniq >> $OUT
|
||||
;;
|
||||
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`
|
||||
echo -e "Using MD5 sums from Packages files:\n$FILES"
|
||||
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
||||
/^Filename:/ {
|
||||
FILE = $2
|
||||
}
|
||||
/^Size:/ {
|
||||
SIZE = $2
|
||||
}
|
||||
/^MD5sum:/ {
|
||||
MD5 = $2
|
||||
printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE)
|
||||
}' | 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"
|
||||
# link; it causes problems with overlaid files...
|
||||
for VER in $MIRROR/dists/$SUITE/main/installer-$ARCH/*
|
||||
do
|
||||
if [ -d $VER ] && [ ! -L $VER ] ; then
|
||||
FILE=$VER/images/MD5SUMS
|
||||
echo "Using MD5 sums from d-i: $FILE"
|
||||
LOC=dists/$SUITE/main/installer-$ARCH/`basename $VER`/images
|
||||
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
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Unknown arch/source $ARCH!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
/^Files:/ {
|
||||
in_files = 1
|
||||
next
|
||||
}
|
||||
/^ / {
|
||||
if (in_files) {
|
||||
gsub("^ ", "", $0)
|
||||
MD5 = $1
|
||||
SIZE = $2
|
||||
FILE = $3
|
||||
printf("%s %12s %s/%s/%s\n", MD5, SIZE, MIRROR, DIR, FILE);
|
||||
next
|
||||
}
|
||||
}
|
||||
/^[^ ]/ {
|
||||
in_files = 0
|
||||
FILE = ""
|
||||
DIR = ""
|
||||
}' | sort | uniq >> $OUT
|
||||
;;
|
||||
alpha|amd64|arm|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc)
|
||||
FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH`
|
||||
echo -e "Using MD5 sums from Packages files:\n$FILES"
|
||||
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
||||
/^Filename:/ {
|
||||
FILE = $2
|
||||
}
|
||||
/^Size:/ {
|
||||
SIZE = $2
|
||||
}
|
||||
/^MD5sum:/ {
|
||||
MD5 = $2
|
||||
printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE)
|
||||
}' | sort | uniq >> $OUT
|
||||
# Use the new D-I images. Do NOT use the "current"
|
||||
# link; it causes problems with overlaid files...
|
||||
for VER in $MIRROR/dists/$DI_SUITE/main/installer-$ARCH/*
|
||||
do
|
||||
if [ -d $VER ] && [ ! -L $VER ] ; then
|
||||
FILE=$VER/images/MD5SUMS
|
||||
echo "Using MD5 sums from d-i: $FILE"
|
||||
LOC=dists/$DI_SUITE/main/installer-$ARCH/`basename $VER`/images
|
||||
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
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo "Unknown arch/source $ARCH!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -24,7 +24,7 @@ MIRROR_AMD64=/mirror/debian-amd64
|
|||
NONFREE=0
|
||||
|
||||
# What release version is this?
|
||||
VER=3.1r3
|
||||
VER=3.1r4
|
||||
|
||||
# Is this an official CD?
|
||||
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
|
||||
# this blank, we'll try to determine the changes from the ChangeLog files,
|
||||
# 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
|
||||
REL=Debian"$VER"
|
||||
|
@ -114,6 +114,7 @@ create_control_files () {
|
|||
ARCH=$ARCH $scanpackages scan $CDDIR > /dev/null 2>&1
|
||||
ARCH=$ARCH $scanpackages -noPackages.cd install $CDDIR > /dev/null 2>&1
|
||||
rm -f $CDDIR/*.Packages* #>/dev/null 2>&1
|
||||
find $CDDIR/ -name Packages | xargs rm -f
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -215,9 +216,9 @@ do
|
|||
fi
|
||||
|
||||
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
|
||||
$GRAB_MD5 $NONUS $THISARCH $CODENAME $UPD/md5-check
|
||||
$GRAB_MD5 $NONUS $THISARCH $CODENAME $CODENAME $UPD/md5-check
|
||||
fi
|
||||
|
||||
for file in `cat $UPD/list`
|
||||
|
|
Loading…
Reference in New Issue