Backport again:

Change wget usage to make option handling easier

Switch all usage to $WGET, then set WGET in CONF.sh
First usage is to add --ca-directory /etc/ssl/ca-debian/ so https
certificates work.
This commit is contained in:
Steve McIntyre 2016-01-03 13:07:12 +00:00
parent dcce7d822a
commit b7619516fa
31 changed files with 58 additions and 52 deletions

View File

@ -410,6 +410,11 @@ case "$OFFICIAL" in
;; ;;
esac esac
# Add options to wget to include support for the Debian CA, so
# https://d-i.debian.org et al will work.
export WGET_OPTS="--ca-directory /etc/ssl/ca-debian/"
export WGET="wget $WGET_OPTS"
# Set this to force the Release file(s) to say "stable". Used in first # Set this to force the Release file(s) to say "stable". Used in first
# Etch builds to allow us to build before the archive updated # Etch builds to allow us to build before the archive updated
#EARLY_BUILD_HACK=1 #EARLY_BUILD_HACK=1

3
debian/changelog vendored
View File

@ -23,7 +23,8 @@ debian-cd (3.1.17-jessie) UNRELEASED; urgency=medium
- Drop the d390oco loader from and jessie - Drop the d390oco loader from and jessie
+ include espeakup on cd1, not speakup, and alsa-utils. Closes: #809497 + include espeakup on cd1, not speakup, and alsa-utils. Closes: #809497
+ Switch references to d-i.debian.org to use https instead of http. + Switch references to d-i.debian.org to use https instead of http.
Closes: #809698 Closes: #809698. Also use --ca-directory /etc/ssl/ca-debian/ with wget
to ensure this works.
-- Steve McIntyre <93sam@debian.org> Mon, 20 Apr 2015 12:36:57 +0100 -- Steve McIntyre <93sam@debian.org> Mon, 20 Apr 2015 12:36:57 +0100

View File

@ -70,7 +70,7 @@ for image in initrd.gz vmlinuz; do
ab_file=`ls "$DI_DIR"/$image* | tail -1` ab_file=`ls "$DI_DIR"/$image* | tail -1`
cp "$ab_file" . cp "$ab_file" .
else else
wget "$DI_WWW_HOME/$image" $WGET "$DI_WWW_HOME/$image"
fi fi
fi fi
done done

View File

@ -64,7 +64,7 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
cp "$DI_DIR/MANIFEST" MANIFEST cp "$DI_DIR/MANIFEST" MANIFEST
else else
wget "$DI_WWW_HOME/MANIFEST" -O MANIFEST $WGET "$DI_WWW_HOME/MANIFEST" -O MANIFEST
fi fi
for image in $(awk '{print $1}' MANIFEST); do for image in $(awk '{print $1}' MANIFEST); do
@ -79,12 +79,12 @@ for image in $(awk '{print $1}' MANIFEST); do
fi fi
cp -a "$DI_DIR/$image" "$image" cp -a "$DI_DIR/$image" "$image"
else else
wget --no-parent -r -nH --cut-dirs=3 "$DI_WWW_HOME/$image" $WGET --no-parent -r -nH --cut-dirs=3 "$DI_WWW_HOME/$image"
fi fi
fi fi
done done
# Clean up in case we had to use wget :-( # Clean up in case we had to use $WGET :-(
find . -name 'index.html*' -delete find . -name 'index.html*' -delete
exit 0 exit 0

View File

@ -60,7 +60,7 @@ for image in $BOOT_IMAGES; do
fi fi
cp "$DI_DIR/$image" "$image" cp "$DI_DIR/$image" "$image"
else else
wget "$DI_WWW_HOME/$image" -O "$image" $WGET "$DI_WWW_HOME/$image" -O "$image"
fi fi
fi fi
done done

View File

@ -44,7 +44,7 @@ if [ ! "$DI_WWW_HOME" ];then
else else
DI_DIR="di_stuff" DI_DIR="di_stuff"
mkdir "$DI_DIR" mkdir "$DI_DIR"
wget -r -nd --no-parent -P "$DI_DIR" "$DI_WWW_HOME" $WGET -r -nd --no-parent -P "$DI_DIR" "$DI_WWW_HOME"
fi fi
K32=$(basename "$DI_DIR"/vmlinux-*-parisc) K32=$(basename "$DI_DIR"/vmlinux-*-parisc)

View File

@ -51,7 +51,7 @@ for image in $BOOT_IMAGES; do
fi fi
cp "$DI_DIR/$image" $image cp "$DI_DIR/$image" $image
else else
wget "$DI_WWW_HOME/$image" -O $image $WGET "$DI_WWW_HOME/$image" -O $image
fi fi
fi fi
done done

View File

@ -35,8 +35,8 @@ for image in boot.img; do
cp "$DI_DIR/cdrom/$image" . || \ cp "$DI_DIR/cdrom/$image" . || \
cp "$DI_DIR/$image" . cp "$DI_DIR/$image" .
else else
wget "$DI_WWW_HOME/cdrom/$image" || \ $WGET "$DI_WWW_HOME/cdrom/$image" || \
wget "$DI_WWW_HOME/$image" $WGET "$DI_WWW_HOME/$image"
fi fi
fi fi
done done

View File

@ -62,7 +62,7 @@ for image in $BOOT_IMAGES; do
fi fi
cp "$DI_DIR/$image" $image || true cp "$DI_DIR/$image" $image || true
else else
wget "$DI_WWW_HOME/$image" -O $image $WGET "$DI_WWW_HOME/$image" -O $image
fi fi
fi fi
done done

View File

@ -65,7 +65,7 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
cp -a $DI_DIR/* . cp -a $DI_DIR/* .
else else
wget -q -np -nH --cut-dirs=4 -r -l 3 -R '.gif,.log,stats.txt,index*' "$DI_WWW_HOME" $WGET -q -np -nH --cut-dirs=4 -r -l 3 -R '.gif,.log,stats.txt,index*' "$DI_WWW_HOME"
fi fi
# amiga specific stuff # amiga specific stuff

View File

@ -31,9 +31,9 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
else else
DI_DIR="di_stuff" DI_DIR="di_stuff"
wget -P "$DI_DIR/r4k-ip22" "$DI_WWW_HOME/r4k-ip22/cdrom-boot.img" $WGET -P "$DI_DIR/r4k-ip22" "$DI_WWW_HOME/r4k-ip22/cdrom-boot.img"
# r5k-ip32 has no cdrom boot image yet # r5k-ip32 has no cdrom boot image yet
# wget -P "$DI_DIR/r5k-ip32" "$DI_WWW_HOME/r5k-ip32/cdrom-boot.img" # $WGET -P "$DI_DIR/r5k-ip32" "$DI_WWW_HOME/r5k-ip32/cdrom-boot.img"
fi fi
install -m 644 -D "$DI_DIR"/r4k-ip22/cdrom-boot.img "$CDROOT"/install/r4k-ip22-boot.img install -m 644 -D "$DI_DIR"/r4k-ip22/cdrom-boot.img "$CDROOT"/install/r4k-ip22-boot.img
#r5k-ip32 has no cdrom boot image yet #r5k-ip32 has no cdrom boot image yet

View File

@ -64,12 +64,12 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
else else
DI_DIR="." DI_DIR="."
wget "$DI_WWW_HOME" -O di.dir $WGET "$DI_WWW_HOME" -O di.dir
r3k=$(sed -n 's/.*a href="\(vmlinux-.*-r3k-kn02\)".*/\1/ip' di.dir) r3k=$(sed -n 's/.*a href="\(vmlinux-.*-r3k-kn02\)".*/\1/ip' di.dir)
r4k=$(sed -n 's/.*a href="\(vmlinux-.*-r4k-kn04\)".*/\1/ip' di.dir) r4k=$(sed -n 's/.*a href="\(vmlinux-.*-r4k-kn04\)".*/\1/ip' di.dir)
wget "$DI_WWW_HOME/$r3k" -O vmlinux-x-r3k-kn02 $WGET "$DI_WWW_HOME/$r3k" -O vmlinux-x-r3k-kn02
wget "$DI_WWW_HOME/$r4k" -O vmlinux-x-r4k-kn04 $WGET "$DI_WWW_HOME/$r4k" -O vmlinux-x-r4k-kn04
wget "$DI_WWW_HOME/initrd.gz" $WGET "$DI_WWW_HOME/initrd.gz"
fi fi
cp "$DI_DIR"/initrd.gz "$CDROOT/boot/initrd.gz" cp "$DI_DIR"/initrd.gz "$CDROOT/boot/initrd.gz"
cp "$DI_DIR"/vmlinux-*-r3k-kn02 "$CDROOT/boot/vmlinux-r3k-kn02" cp "$DI_DIR"/vmlinux-*-r3k-kn02 "$CDROOT/boot/vmlinux-r3k-kn02"

View File

@ -118,8 +118,8 @@ do
cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch" cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch"
fi fi
else else
if ! wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom/" && [ "$bitness" ]; then if ! $WGET -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom/" && [ "$bitness" ]; then
wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom${bitness}/" $WGET -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom${bitness}/"
fi fi
fi fi

View File

@ -53,7 +53,7 @@ for image in $BOOT_IMAGES; do
fi fi
cp "$DI_DIR/$image" "$image" cp "$DI_DIR/$image" "$image"
else else
wget "$DI_WWW_HOME/$image" -O "$image" $WGET "$DI_WWW_HOME/$image" -O "$image"
fi fi
fi fi
done done

View File

@ -73,7 +73,7 @@ for image in $images_S390; do
fi fi
cp "$DI_DIR/$image" "$imagedest" cp "$DI_DIR/$image" "$imagedest"
else else
wget "$DI_WWW_HOME/$image" -O "$imagedest" $WGET "$DI_WWW_HOME/$image" -O "$imagedest"
fi fi
done done

View File

@ -75,10 +75,10 @@ if [ ! "$DI_WWW_HOME" ];then
else else
DI_DIR="cdrom" DI_DIR="cdrom"
mkdir "./$DI_DIR" mkdir "./$DI_DIR"
wget "$DI_WWW_HOME" -O ./$DI_DIR/di.dir $WGET "$DI_WWW_HOME" -O ./$DI_DIR/di.dir
sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/ip' ./$DI_DIR/di.dir) sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/ip' ./$DI_DIR/di.dir)
wget "$DI_WWW_HOME/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64 $WGET "$DI_WWW_HOME/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64
wget "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz $WGET "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz
fi fi
if [ ! -e "$DI_DIR"/initrd.gz ] ; then if [ ! -e "$DI_DIR"/initrd.gz ] ; then

View File

@ -97,7 +97,7 @@ for image in $BOOT_IMAGES; do
# echo "Copying images from $DI_DIR" # echo "Copying images from $DI_DIR"
cp "$DI_DIR/$image" "$image" cp "$DI_DIR/$image" "$image"
else else
wget "$DI_WWW_HOME/$image" -O "$image" $WGET "$DI_WWW_HOME/$image" -O "$image"
fi fi
fi fi
done done
@ -115,7 +115,7 @@ for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
fi fi
cp "$DI_DIR/$image" "$image" || true cp "$DI_DIR/$image" "$image" || true
else else
wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image" $WGET "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
fi fi
fi fi
done done
@ -154,7 +154,7 @@ extra_image () {
fi fi
cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image" cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
else else
wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image" $WGET "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
fi fi
fi fi
for doppelganger in $doppelgangers ; do for doppelganger in $doppelgangers ; do

View File

@ -75,7 +75,7 @@ for image in initrd.gz vmlinuz; do
fi fi
cp "$DI_DIR/$image" . cp "$DI_DIR/$image" .
else else
wget "$DI_WWW_HOME/$image" $WGET "$DI_WWW_HOME/$image"
fi fi
fi fi
done done

View File

@ -50,7 +50,7 @@ if [ ! "$DI_WWW_HOME" ];then
else else
DI_DIR="di_stuff" DI_DIR="di_stuff"
mkdir "$DI_DIR" mkdir "$DI_DIR"
wget -r -nd --no-parent -P "$DI_DIR" "$DI_WWW_HOME" $WGET -r -nd --no-parent -P "$DI_DIR" "$DI_WWW_HOME"
fi fi
cp "$DI_DIR"/vmlinux-*-parisc "$CDROOT/install" cp "$DI_DIR"/vmlinux-*-parisc "$CDROOT/install"

View File

@ -48,7 +48,7 @@ for image in $BOOT_IMAGES; do
fi fi
cp "$DI_DIR/$image" $image cp "$DI_DIR/$image" $image
else else
wget "$DI_WWW_HOME/$image" -O $image $WGET "$DI_WWW_HOME/$image" -O $image
fi fi
fi fi
done done

View File

@ -41,8 +41,8 @@ for image in boot.img; do
cp "$DI_DIR/cdrom/$image" . || \ cp "$DI_DIR/cdrom/$image" . || \
cp "$DI_DIR/$image" . cp "$DI_DIR/$image" .
else else
wget "$DI_WWW_HOME/cdrom/$image" || \ $WGET "$DI_WWW_HOME/cdrom/$image" || \
wget "$DI_WWW_HOME/$image" $WGET "$DI_WWW_HOME/$image"
fi fi
fi fi
done done

View File

@ -56,7 +56,7 @@ for image in $BOOT_IMAGES; do
fi fi
cp "$DI_DIR/$image" $image || true cp "$DI_DIR/$image" $image || true
else else
wget "$DI_WWW_HOME/$image" -O $image $WGET "$DI_WWW_HOME/$image" -O $image
fi fi
fi fi
done done

View File

@ -68,7 +68,7 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
cp -a $DI_DIR/* . cp -a $DI_DIR/* .
else else
wget -q -np -nH --cut-dirs=4 -r -l 3 -R '.gif,.log,stats.txt,index*' "$DI_WWW_HOME" $WGET -q -np -nH --cut-dirs=4 -r -l 3 -R '.gif,.log,stats.txt,index*' "$DI_WWW_HOME"
fi fi
# amiga specific stuff # amiga specific stuff

View File

@ -37,9 +37,9 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
else else
DI_DIR="di_stuff" DI_DIR="di_stuff"
wget -P "$DI_DIR/r4k-ip22" "$DI_WWW_HOME/r4k-ip22/cdrom-boot.img" $WGET -P "$DI_DIR/r4k-ip22" "$DI_WWW_HOME/r4k-ip22/cdrom-boot.img"
# r5k-ip32 has no cdrom boot image yet # r5k-ip32 has no cdrom boot image yet
# wget -P "$DI_DIR/r5k-ip32" "$DI_WWW_HOME/r5k-ip32/cdrom-boot.img" # $WGET -P "$DI_DIR/r5k-ip32" "$DI_WWW_HOME/r5k-ip32/cdrom-boot.img"
fi fi
install -m 644 -D "$DI_DIR"/r4k-ip22/cdrom-boot.img "$CDROOT"/install/r4k-ip22-boot.img install -m 644 -D "$DI_DIR"/r4k-ip22/cdrom-boot.img "$CDROOT"/install/r4k-ip22-boot.img
#r5k-ip32 has no cdrom boot image yet #r5k-ip32 has no cdrom boot image yet

View File

@ -70,12 +70,12 @@ if [ ! "$DI_WWW_HOME" ];then
fi fi
else else
DI_DIR="." DI_DIR="."
wget "$DI_WWW_HOME" -O di.dir $WGET "$DI_WWW_HOME" -O di.dir
r3k=$(sed -n 's/.*a href="\(vmlinux-.*-r3k-kn02\)".*/\1/ip' di.dir) r3k=$(sed -n 's/.*a href="\(vmlinux-.*-r3k-kn02\)".*/\1/ip' di.dir)
r4k=$(sed -n 's/.*a href="\(vmlinux-.*-r4k-kn04\)".*/\1/ip' di.dir) r4k=$(sed -n 's/.*a href="\(vmlinux-.*-r4k-kn04\)".*/\1/ip' di.dir)
wget "$DI_WWW_HOME/$r3k" -O vmlinux-x-r3k-kn02 $WGET "$DI_WWW_HOME/$r3k" -O vmlinux-x-r3k-kn02
wget "$DI_WWW_HOME/$r4k" -O vmlinux-x-r4k-kn04 $WGET "$DI_WWW_HOME/$r4k" -O vmlinux-x-r4k-kn04
wget "$DI_WWW_HOME/initrd.gz" $WGET "$DI_WWW_HOME/initrd.gz"
fi fi
cp "$DI_DIR"/initrd.gz "$CDROOT/boot/initrd.gz" cp "$DI_DIR"/initrd.gz "$CDROOT/boot/initrd.gz"
cp "$DI_DIR"/vmlinux-*-r3k-kn02 "$CDROOT/boot/vmlinux-r3k-kn02" cp "$DI_DIR"/vmlinux-*-r3k-kn02 "$CDROOT/boot/vmlinux-r3k-kn02"

View File

@ -124,8 +124,8 @@ do
cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch" cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch"
fi fi
else else
if ! wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom/" && [ "$bitness" ]; then if ! $WGET -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom/" && [ "$bitness" ]; then
wget -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom${bitness}/" $WGET -r -nd --no-parent --level=1 -P "$subarch" -R 'index*' "$DI_WWW_HOME/$subarch/cdrom${bitness}/"
fi fi
fi fi

View File

@ -85,7 +85,7 @@ for image in $images_S390; do
fi fi
cp "$DI_DIR/$image" "$imagedest" cp "$DI_DIR/$image" "$imagedest"
else else
wget "$DI_WWW_HOME/$image" -O "$imagedest" $WGET "$DI_WWW_HOME/$image" -O "$imagedest"
fi fi
done done

View File

@ -81,10 +81,10 @@ if [ ! "$DI_WWW_HOME" ];then
else else
DI_DIR="cdrom" DI_DIR="cdrom"
mkdir "./$DI_DIR" mkdir "./$DI_DIR"
wget "$DI_WWW_HOME" -O ./$DI_DIR/di.dir $WGET "$DI_WWW_HOME" -O ./$DI_DIR/di.dir
sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/ip' ./$DI_DIR/di.dir) sparc64=$(sed -n 's/.*a href="\(vmlinuz-.*-sparc64\)".*/\1/ip' ./$DI_DIR/di.dir)
wget "$DI_WWW_HOME/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64 $WGET "$DI_WWW_HOME/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64
wget "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz $WGET "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz
fi fi
if [ ! -e "$DI_DIR"/initrd.gz ] ; then if [ ! -e "$DI_DIR"/initrd.gz ] ; then

View File

@ -88,7 +88,7 @@ for image in $BOOT_IMAGES; do
# echo "Copying images from $DI_DIR" # echo "Copying images from $DI_DIR"
cp "$DI_DIR/$image" "$image" cp "$DI_DIR/$image" "$image"
else else
wget "$DI_WWW_HOME/$image" -O "$image" $WGET "$DI_WWW_HOME/$image" -O "$image"
fi fi
fi fi
done done
@ -106,7 +106,7 @@ for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
fi fi
cp "$DI_DIR/$image" "$image" || true cp "$DI_DIR/$image" "$image" || true
else else
wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image" $WGET "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
fi fi
fi fi
done done
@ -145,7 +145,7 @@ extra_image () {
fi fi
cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image" cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
else else
wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image" $WGET "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
fi fi
fi fi
for doppelganger in $doppelgangers ; do for doppelganger in $doppelgangers ; do

View File

@ -59,7 +59,7 @@ if [ "$OMIT_RELEASE_NOTES" != 1 ]; then
mkdir -p $RN mkdir -p $RN
cd $RN cd $RN
echo "Downloading most recent release notes for $ARCH" echo "Downloading most recent release notes for $ARCH"
wget $RELEASE_NOTES_LOCATION/release-notes-$ARCH.tar.gz $WGET $RELEASE_NOTES_LOCATION/release-notes-$ARCH.tar.gz
if [ -e release-notes-$ARCH.tar.gz ] ; then if [ -e release-notes-$ARCH.tar.gz ] ; then
tar xzvf release-notes-$ARCH.tar.gz tar xzvf release-notes-$ARCH.tar.gz
rm -f release-notes-$ARCH.tar.gz rm -f release-notes-$ARCH.tar.gz

View File

@ -59,7 +59,7 @@ if [ "$OMIT_RELEASE_NOTES" != 1 ]; then
mkdir -p $RN mkdir -p $RN
cd $RN cd $RN
echo "Downloading most recent release notes for $ARCH" echo "Downloading most recent release notes for $ARCH"
wget $RELEASE_NOTES_LOCATION/release-notes-$ARCH.tar.gz $WGET $RELEASE_NOTES_LOCATION/release-notes-$ARCH.tar.gz
if [ -e release-notes-$ARCH.tar.gz ] ; then if [ -e release-notes-$ARCH.tar.gz ] ; then
tar xzvf release-notes-$ARCH.tar.gz tar xzvf release-notes-$ARCH.tar.gz
rm -f release-notes-$ARCH.tar.gz rm -f release-notes-$ARCH.tar.gz