* 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
|
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"; \
|
||||||
|
|
159
tools/grab_md5
159
tools/grab_md5
|
@ -9,93 +9,82 @@
|
||||||
# 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
|
||||||
|
|
||||||
case $ARCH in
|
for ARCH in $ARCHES
|
||||||
source)
|
do
|
||||||
FILES=`find $MIRROR/dists/$SUITE/ -name Sources.gz`
|
LOCATIONS="$MIRROR/dists/$SUITE/ $MIRROR/dists/$DI_SUITE/"
|
||||||
echo -e "Using MD5 sums from Sources files:\n$FILES"
|
echo "Looking in $LOCATIONS"
|
||||||
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
|
||||||
/^Directory:/ {
|
case $ARCH in
|
||||||
DIR = $2
|
source)
|
||||||
next
|
FILES=`find $LOCATIONS -name Sources.gz`
|
||||||
}
|
echo -e "Using MD5 sums from Sources files:\n$FILES"
|
||||||
/^Files:/ {
|
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
||||||
in_files = 1
|
/^Directory:/ {
|
||||||
next
|
DIR = $2
|
||||||
}
|
|
||||||
/^ / {
|
|
||||||
if (in_files) {
|
|
||||||
gsub("^ ", "", $0)
|
|
||||||
MD5 = $1
|
|
||||||
SIZE = $2
|
|
||||||
FILE = $3
|
|
||||||
printf("%s %12s %s/%s/%s\n", MD5, SIZE, MIRROR, DIR, FILE);
|
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
}
|
/^Files:/ {
|
||||||
/^[^ ]/ {
|
in_files = 1
|
||||||
in_files = 0
|
next
|
||||||
FILE = ""
|
}
|
||||||
DIR = ""
|
/^ / {
|
||||||
}' | sort | uniq >> $OUT
|
if (in_files) {
|
||||||
;;
|
gsub("^ ", "", $0)
|
||||||
alpha|amd64|arm|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc)
|
MD5 = $1
|
||||||
FILES=`find $MIRROR/dists/$SUITE/ -name Packages -o -name Packages.gz | grep binary-$ARCH`
|
SIZE = $2
|
||||||
echo -e "Using MD5 sums from Packages files:\n$FILES"
|
FILE = $3
|
||||||
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
printf("%s %12s %s/%s/%s\n", MD5, SIZE, MIRROR, DIR, FILE);
|
||||||
/^Filename:/ {
|
next
|
||||||
FILE = $2
|
}
|
||||||
}
|
}
|
||||||
/^Size:/ {
|
/^[^ ]/ {
|
||||||
SIZE = $2
|
in_files = 0
|
||||||
}
|
FILE = ""
|
||||||
/^MD5sum:/ {
|
DIR = ""
|
||||||
MD5 = $2
|
}' | sort | uniq >> $OUT
|
||||||
printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE)
|
;;
|
||||||
}' | sort | uniq >> $OUT
|
alpha|amd64|arm|hppa|i386|ia64|m68k|mips|mipsel|powerpc|s390|sparc)
|
||||||
case $SUITE in
|
FILES=`find $LOCATIONS -name Packages.gz | grep binary-$ARCH`
|
||||||
woody)
|
echo -e "Using MD5 sums from Packages files:\n$FILES"
|
||||||
# Use the old boot-floppies images
|
zcat -f $FILES | awk -v MIRROR=$MIRROR '
|
||||||
FILE=$MIRROR/dists/$SUITE/main/disks-$ARCH/current/md5sum.txt
|
/^Filename:/ {
|
||||||
echo "Using MD5 sums from boot-floppies: $FILE"
|
FILE = $2
|
||||||
LOC=dists/$SUITE/main/disks-$ARCH/current
|
}
|
||||||
for ENTRY in `cat $FILE | sed 's/ /:/g'`
|
/^Size:/ {
|
||||||
do
|
SIZE = $2
|
||||||
PATH=`echo $ENTRY | /bin/sed "s?^.*:\./?$MIRROR/$LOC/?g"`
|
}
|
||||||
MD5=`echo $ENTRY | /bin/sed 's/:.*$//g'`
|
/^MD5sum:/ {
|
||||||
SIZE=`/usr/bin/stat -c %s $PATH`
|
MD5 = $2
|
||||||
printf '%s %12.12s %s\n' $MD5 $SIZE $PATH
|
printf("%s %12d %s/%s\n", MD5, SIZE, MIRROR, FILE)
|
||||||
done | sort | uniq >> $OUT
|
}' | 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/*
|
||||||
# Use the new D-I images. Do NOT use the "current"
|
do
|
||||||
# link; it causes problems with overlaid files...
|
if [ -d $VER ] && [ ! -L $VER ] ; then
|
||||||
for VER in $MIRROR/dists/$SUITE/main/installer-$ARCH/*
|
FILE=$VER/images/MD5SUMS
|
||||||
do
|
echo "Using MD5 sums from d-i: $FILE"
|
||||||
if [ -d $VER ] && [ ! -L $VER ] ; then
|
LOC=dists/$DI_SUITE/main/installer-$ARCH/`basename $VER`/images
|
||||||
FILE=$VER/images/MD5SUMS
|
for ENTRY in `cat $FILE | sed 's/ /:/g'`
|
||||||
echo "Using MD5 sums from d-i: $FILE"
|
do
|
||||||
LOC=dists/$SUITE/main/installer-$ARCH/`basename $VER`/images
|
PATH=`echo $ENTRY | /bin/sed "s?^.*:\./?$MIRROR/$LOC/?g"`
|
||||||
for ENTRY in `cat $FILE | sed 's/ /:/g'`
|
MD5=`echo $ENTRY | /bin/sed 's/:.*$//g'`
|
||||||
do
|
SIZE=`/usr/bin/stat -c %s $PATH`
|
||||||
PATH=`echo $ENTRY | /bin/sed "s?^.*:\./?$MIRROR/$LOC/?g"`
|
printf '%s %12.12s %s\n' $MD5 $SIZE $PATH
|
||||||
MD5=`echo $ENTRY | /bin/sed 's/:.*$//g'`
|
done | sort | uniq >> $OUT
|
||||||
SIZE=`/usr/bin/stat -c %s $PATH`
|
fi
|
||||||
printf '%s %12.12s %s\n' $MD5 $SIZE $PATH
|
done
|
||||||
done | sort | uniq >> $OUT
|
;;
|
||||||
fi
|
*)
|
||||||
done
|
echo "Unknown arch/source $ARCH!"
|
||||||
;;
|
exit 1
|
||||||
esac
|
;;
|
||||||
;;
|
esac
|
||||||
*)
|
done
|
||||||
echo "Unknown arch/source $ARCH!"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -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`
|
||||||
|
|
Loading…
Reference in New Issue