]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
Debian mirrors: Support proxy, and default to ftp.debian.org if specified
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 24 Mar 2015 18:50:14 +0000 (18:50 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Mar 2015 18:53:52 +0000 (18:53 +0000)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest.pm
Osstest/Debian.pm
README

index 22dbc8bae47087b5872ea34cbec7e58d0e5ffc9b..aaaaf7a8231c879e39705601fe63adc47f04085d 100644 (file)
@@ -76,6 +76,7 @@ our %c = qw(
 
 $c{$_}='' foreach qw(
     DebianPreseed
+    DebianMirrorProxy
     TftpPxeTemplatesReal
 );
 
@@ -186,6 +187,8 @@ sub readglobalconfig () {
     $c{GuestDebianSuite} ||= $c{DebianSuite};
 
     $c{DefaultBranch} ||= 'xen-unstable';
+
+    $c{DebianMirrorHost} ||= 'ftp.debian.org' if $c{DebianMirrorProxy};
 }
 
 sub augmentconfigdefaults {
index 7633b510e3a9b1b38d83ccf8fd256436c995d73a..f419f224d6f1490373e410f4893456fa67ad7240 100644 (file)
@@ -562,6 +562,7 @@ d-i finish-install/reboot_in_progress note
 d-i cdrom-detect/eject boolean false
 
 d-i mirror/http/hostname string $c{DebianMirrorHost}
+d-i mirror/http/proxy string $c{DebianMirrorProxy}
 d-i mirror/http/directory string /$c{DebianMirrorSubpath}
 d-i apt-setup/use_mirror boolean yes
 d-i apt-setup/another boolean false
diff --git a/README b/README
index e7807621b90db36842d207d03202fe91960e1b5f..9634185afd7b15c08b880f20b2087df732d6019a 100644 (file)
--- a/README
+++ b/README
@@ -291,7 +291,12 @@ NetNameservers
 DebianMirrorHost
    Domain name or address of the Debian mirror to use.
    Set DebianMirrorSubpath to the path inside the mirror if
-   your mirror isn't at http://<DebianMirrorHost>/debian/
+   your mirror isn't at http://<DebianMirrorHost>/debian/ .
+   Defaults to ftp.debian.org if DebianMirrorProxy is set.
+
+DebianMirrorProxy
+   The apt proxy to specify for Debian (and derivatives),
+   eg http://apt-cacher:3142/ .
 
 TestHost <hostname>
 TestHost_<ident> <hostname>