ARGH getting really fed up with ISP transparent proxies that break
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 9 Sep 2021 14:12:05 +0000 (15:12 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 9 Sep 2021 14:12:05 +0000 (15:12 +0100)
coriolis2-chroot
mk-deb-chroot

index 121f15abe09c9f4e7b18eda53149dd47a5ab05e8..b34527bd0125d92aa4e355eece56b3effd95655f 100755 (executable)
@@ -6,9 +6,18 @@ fi
 # Create coriolis chroot dir in /opt
 mkdir -p /opt/chroot/coriolis
 
+# argh apt with broken proxies and unreliable ISPs, getting fed up with it
+cat <<EOF >/tmp/brokenproxy
+APT::Acquire::Retries "20";
+APT::Get::Fix-Broken "true";
+Acquire::http::Pipeline-Depth "0";
+Acquire::http::No-Cache=True;
+Acquire::BrokenProxy=true;
+EOF
+
 echo "adding retries for debootstrap to not fail"
-echo 'APT::Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
-echo 'APT::Acquire::Retries "10";' > /opt/chroot/coriolis/etc/apt/apt.conf.d/80-retries
+cp /tmp/brokenproxy /etc/apt/apt.conf.d/80-retries
+cp /tmp/brokenproxy /opt/chroot/coriolis/etc/apt/apt.conf.d/80-retries
 
 # Install debootstrap and schroot via apt
 apt install -y debootstrap schroot
index 23c08421c38958d1524d117367a67cc553493fe3..a30ef30152f3ede7f59a72259aca9f5b9936970b 100755 (executable)
@@ -20,9 +20,17 @@ echo "Creating chroot dir '$chrootdir'"
 # Create coriolis chroot dir in /opt
 mkdir /opt/chroot/$chrootdir
 
-echo "adding retries for debootstrap to not fail"
-echo 'APT::Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
-echo 'APT::Acquire::Retries "10";' > /opt/chroot/$chrootdir/etc/apt/apt.conf.d/80-retries
+# argh apt with broken proxies and unreliable ISPs, getting fed up with it
+cat <<EOF >/tmp/brokenproxy
+APT::Acquire::Retries "20";
+APT::Get::Fix-Broken "true";
+Acquire::http::Pipeline-Depth "0";
+Acquire::http::No-Cache=True;
+Acquire::BrokenProxy=true;
+EOF
+
+cp /tmp/brokenproxy /etc/apt/apt.conf.d/80-retries
+cp /tmp/brokenproxy /opt/chroot/coriolis/etc/apt/apt.conf.d/80-retries
 
 # Install debootstrap and schroot
 if [ -e /etc/debian_version ]; then