Another backport:

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:13:57 +00:00
parent ada6c815b8
commit fccf852167
30 changed files with 55 additions and 49 deletions

View File

@ -410,6 +410,11 @@ case "$OFFICIAL" in
;;
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
# Etch builds to allow us to build before the archive updated
#EARLY_BUILD_HACK=1

3
debian/changelog vendored
View File

@ -22,7 +22,8 @@ debian-cd (3.1.13-deb7u1) UNRELEASED; urgency=low
+ Create checksums for firmware images
+ include espeakup on cd1, not speakup, and alsa-utils. Closes: #809497
+ 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, 17 June 2013 15:44:32 +0100

View File

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

View File

@ -51,7 +51,7 @@ cd $INSTALLDIR
# DI_DIR2="$DI_DIR/$subarch/cdrom"
# else
# DI_DIR2="di_stuff"
# wget -r -nd --no-parent --level=1 -P "$DI_DIR2" "$DI_WWW_HOME/$subarch/cdrom/"
# $WGET -r -nd --no-parent --level=1 -P "$DI_DIR2" "$DI_WWW_HOME/$subarch/cdrom/"
# rm -f "$DI_DIR2"/index*
# fi
# cp -a "$DI_DIR2" "$subarch"

View File

@ -41,7 +41,7 @@ if [ ! "$DI_WWW_HOME" ];then
else
DI_DIR="di_stuff"
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
cp "$DI_DIR"/vmlinux-*-parisc "$CDROOT/install"

View File

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

View File

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

View File

@ -68,7 +68,7 @@ if [ ! "$DI_WWW_HOME" ];then
fi
cp -a $DI_DIR/* .
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
# amiga specific stuff

View File

@ -37,9 +37,9 @@ if [ ! "$DI_WWW_HOME" ];then
fi
else
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
# 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
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

View File

@ -61,12 +61,12 @@ if [ ! "$DI_WWW_HOME" ];then
fi
else
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)
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/$r4k" -O vmlinux-x-r4k-kn04
wget "$DI_WWW_HOME/initrd.gz"
$WGET "$DI_WWW_HOME/$r3k" -O vmlinux-x-r3k-kn02
$WGET "$DI_WWW_HOME/$r4k" -O vmlinux-x-r4k-kn04
$WGET "$DI_WWW_HOME/initrd.gz"
fi
cp "$DI_DIR"/initrd.gz "$CDROOT/boot/initrd.gz"
cp "$DI_DIR"/vmlinux-*-r3k-kn02 "$CDROOT/boot/vmlinux-r3k-kn02"

View File

@ -105,8 +105,8 @@ do
cp -a "$DI_DIR/$subarch/cdrom${bitness}" "$subarch"
fi
else
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}/"
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}/"
fi
fi

View File

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

View File

@ -79,10 +79,10 @@ if [ ! "$DI_WWW_HOME" ];then
else
DI_DIR="cdrom"
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)
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/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64
$WGET "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz
fi
if [ ! -e "$DI_DIR"/initrd.gz ] ; then

View File

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

View File

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

View File

@ -51,7 +51,7 @@ if [ ! "$DI_WWW_HOME" ];then
else
DI_DIR="di_stuff"
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
cp "$DI_DIR"/vmlinux-*-parisc "$CDROOT/install"

View File

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

View File

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

View File

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

View File

@ -68,7 +68,7 @@ if [ ! "$DI_WWW_HOME" ];then
fi
cp -a $DI_DIR/* .
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
# amiga specific stuff

View File

@ -37,9 +37,9 @@ if [ ! "$DI_WWW_HOME" ];then
fi
else
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
# 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
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

View File

@ -70,12 +70,12 @@ if [ ! "$DI_WWW_HOME" ];then
fi
else
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)
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/$r4k" -O vmlinux-x-r4k-kn04
wget "$DI_WWW_HOME/initrd.gz"
$WGET "$DI_WWW_HOME/$r3k" -O vmlinux-x-r3k-kn02
$WGET "$DI_WWW_HOME/$r4k" -O vmlinux-x-r4k-kn04
$WGET "$DI_WWW_HOME/initrd.gz"
fi
cp "$DI_DIR"/initrd.gz "$CDROOT/boot/initrd.gz"
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"
fi
else
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}/"
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}/"
fi
fi

View File

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

View File

@ -81,10 +81,10 @@ if [ ! "$DI_WWW_HOME" ];then
else
DI_DIR="cdrom"
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)
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/$sparc64" -O ./$DI_DIR/vmlinuz-x-sparc64
$WGET "$DI_WWW_HOME/initrd.gz" -O ./$DI_DIR/initrd.gz
fi
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"
cp "$DI_DIR/$image" "$image"
else
wget "$DI_WWW_HOME/$image" -O "$image"
$WGET "$DI_WWW_HOME/$image" -O "$image"
fi
fi
done
@ -106,7 +106,7 @@ for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
fi
cp "$DI_DIR/$image" "$image" || true
else
wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
$WGET "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
fi
fi
done
@ -145,7 +145,7 @@ extra_image () {
fi
cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
else
wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
$WGET "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
fi
fi
for doppelganger in $doppelgangers ; do

View File

@ -59,7 +59,7 @@ if [ "$OMIT_RELEASE_NOTES" != 1 ]; then
mkdir -p $RN
cd $RN
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
tar xzvf 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
cd $RN
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
tar xzvf 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
cd $RN
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
tar xzvf 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
cd $RN
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
tar xzvf release-notes-$ARCH.tar.gz
rm -f release-notes-$ARCH.tar.gz