Bug#907704: choose-mirror: default to deb.debian.org

2018-09-14 Thread Peter Palfrader
On Mon, 10 Sep 2018, Philipp Kern wrote:

> What's mirroradm's take on this?

Well, (with my hat on, ) my take on this is that
 a) all (3rd party) http mirrors are potentially bad and can go out of
date and become unmaintained and users may never notice.
 b) deb.debian.org aims to be a reasonable default choice for most that
is backed and maintained by DSA.

If we have some means of automatically finding a close-by/fast mirror,
then we could do the following:
 - Add it to sources.list, *and* *also*, given (a) above,
 - add deb.debian.org as a fallback.


[ Also, once we have reasonable default choices, we should stop asking
  people at priority high.  Sure, if you know you want a proxy, switch
  to medium and pick that.  Ditto if you have your own preferred mirror.  ]
-- 
|  .''`.   ** Debian **
  Peter Palfrader   | : :' :  The  universal
 https://www.palfrader.org/ | `. `'  Operating System
|   `-https://www.debian.org/



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-12 Thread Julien Cristau
On Wed, Sep 12, 2018 at 21:57:41 +0200, Philipp Kern wrote:

> On 10.09.2018 09:20, Philipp Kern wrote:
> > [+mirrors@]
> > 
> > On 07.09.2018 14:42, Julien Cristau wrote:
> >> Control: retitle -1 choose-mirror: hide mirror selection by default
> >>
> >> On 09/04/2018 11:07 AM, Julien Cristau wrote:
> >>> If switching the mirror question from high to medium priority proves
> >>> controversial I guess I could separate that to its own bug too, to at
> >>> least get the default changed.
> >> Since there still seems to be some discussion around that, I'm going to
> >> use bug#797340 to make deb.debian.org the default, and repurpose this
> >> bug to stop asking the mirror country + hostname questions by default.
> > 
> > What's mirroradm's take on this?
> 
> For the record, this change just landed in unstable.
> 
"This change" being "select deb.d.o as the default mirror".  The
country and mirror questions are still "high" priority so shown by
default, for now.

Cheers,
Julien



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-12 Thread Philipp Kern
On 10.09.2018 09:20, Philipp Kern wrote:
> [+mirrors@]
> 
> On 07.09.2018 14:42, Julien Cristau wrote:
>> Control: retitle -1 choose-mirror: hide mirror selection by default
>>
>> On 09/04/2018 11:07 AM, Julien Cristau wrote:
>>> If switching the mirror question from high to medium priority proves
>>> controversial I guess I could separate that to its own bug too, to at
>>> least get the default changed.
>> Since there still seems to be some discussion around that, I'm going to
>> use bug#797340 to make deb.debian.org the default, and repurpose this
>> bug to stop asking the mirror country + hostname questions by default.
> 
> What's mirroradm's take on this?

For the record, this change just landed in unstable.

Kind regards
Philipp Kern



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-10 Thread Philipp Kern
[+mirrors@]

On 07.09.2018 14:42, Julien Cristau wrote:
> Control: retitle -1 choose-mirror: hide mirror selection by default
> 
> On 09/04/2018 11:07 AM, Julien Cristau wrote:
>> If switching the mirror question from high to medium priority proves
>> controversial I guess I could separate that to its own bug too, to at
>> least get the default changed.
> Since there still seems to be some discussion around that, I'm going to
> use bug#797340 to make deb.debian.org the default, and repurpose this
> bug to stop asking the mirror country + hostname questions by default.

What's mirroradm's take on this?

Kind regards and thanks
Philipp Kern



Processed: Re: Bug#907704: choose-mirror: default to deb.debian.org

2018-09-07 Thread Debian Bug Tracking System
Processing control commands:

> retitle -1 choose-mirror: hide mirror selection by default
Bug #907704 [choose-mirror] choose-mirror: default to deb.debian.org
Changed Bug title to 'choose-mirror: hide mirror selection by default' from 
'choose-mirror: default to deb.debian.org'.

-- 
907704: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907704
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-07 Thread Julien Cristau
Control: retitle -1 choose-mirror: hide mirror selection by default

On 09/04/2018 11:07 AM, Julien Cristau wrote:
> If switching the mirror question from high to medium priority proves
> controversial I guess I could separate that to its own bug too, to at
> least get the default changed.
> 
Since there still seems to be some discussion around that, I'm going to
use bug#797340 to make deb.debian.org the default, and repurpose this
bug to stop asking the mirror country + hostname questions by default.

Cheers,
Julien



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-07 Thread Wouter Verhelst
On Wed, Sep 05, 2018 at 02:58:17PM +0200, Philipp Kern wrote:
> On 2018-09-05 12:35, Wouter Verhelst wrote:
[...]
> > I disagree with that, but I do also agree that it would be preferable if
> > local proxies or mirrors were used preferably.
> > 
> > However, this shouldn't be done by way of manual configuration; instead,
> > I think it should be done by way of autodetection performed by apt,
> > something not unlike the proxy-PAC scheme, where a browser looks for
> > pac., with the  part being what was passed to it by
> > DHCP, incrementally dropping off the leaf-most part of that until it
> > resolves.
> > 
> > I think such a scheme could work for apt too.
> 
> Arguably the correct way would be to fetch the PAC and execute it to
> determine the proxy for the host. Of course that'd require interpreting
> Javascript.

Not what I meant (but I certainly could've been clearer).

Autodetecting a proxy using the WPAD scheme is complicated, and I agree
that adding a Javascript interpreter to apt just so we can figure out
where a proxy can be found is probably way overkill. It might be nice,
but I don't think we should do it.

However, it would be nice if a network administrator could somehow
suggest a closeby *mirror*. That's why I said "something not unlike" in
the above quote. Since this'd be something we'd be creating ourselves,
we can decide that no scripting language would be necessary, but instead
just a simple configuration file that says "if you're looking for a
mirror for something of which the Release file has fields matching
, please go to ".

-- 
Could you people please use IRC like normal people?!?

  -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
 Hacklab



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-05 Thread Ben Hutchings
On Wed, 2018-09-05 at 14:58 +0200, Philipp Kern wrote:
> On 2018-09-05 12:35, Wouter Verhelst wrote:
[...]
> > I disagree with that, but I do also agree that it would be preferable 
> > if
> > local proxies or mirrors were used preferably.
> > 
> > However, this shouldn't be done by way of manual configuration; 
> > instead,
> > I think it should be done by way of autodetection performed by apt,
> > something not unlike the proxy-PAC scheme, where a browser looks for
> > pac., with the  part being what was passed to it by
> > DHCP, incrementally dropping off the leaf-most part of that until it
> > resolves.
> > 
> > I think such a scheme could work for apt too.
> 
> Arguably the correct way would be to fetch the PAC and execute it to 
> determine the proxy for the host. Of course that'd require interpreting 
> Javascript.

Indeed.  The use of Javascript makes WPAD implementation quite risky. 
There are other dangers in implementating WPAD; for example see
.

It could be useful, and maybe even worth enabling by default, if it was
supported in all (or at least most) of the different HTTP libraries we
ship.  But I don't think we're anywhere near there, so supporting it at
installation time only doesn't seem worth the trouble.

Ben.

-- 
Ben Hutchings
I'm always amazed by the number of people who take up solipsism because
they heard someone else explain it. - E*Borg on alt.fan.pratchett



signature.asc
Description: This is a digitally signed message part


Bug#907704: choose-mirror: default to deb.debian.org

2018-09-05 Thread Philipp Kern

On 2018-09-05 12:35, Wouter Verhelst wrote:

On Mon, Sep 03, 2018 at 08:13:55PM +0200, Karsten Merker wrote:

On Mon, Sep 03, 2018 at 04:41:10PM +0200, Julien Cristau wrote:
> Control: tag -1 + patch
>
> On 08/31/2018 06:27 PM, Julien Cristau wrote:
> > Package: choose-mirror
> > Severity: wishlist
> > X-Debbugs-Cc: tfh...@debian.org
> >
> > I think it's time for choose-mirror to stop asking by default.  AFAIK
> > deb.debian.org works well enough now that we don't need users to
> > manually select a mirror close to them.
> >
> > PoC patch, completely untested:
> >
> Updated patch, at least somewhat tested.  It downgrades the debconf
> priority for mirror/http/countries and mirror/http/mirrors so they're
> not asked by default (previous patch would still ask for a country).
> Only the "proxy" question remains; I'd kind of want to skip it by
> default unless we find out we can't get at the mirror directly, but
> that's something for another bug/patch.

Hello,

I can see the argument for not asking to select a mirror when
there is a well-working mechanism for automatically choosing a
"near" (in networking terms) mirror.  Does deb.debian.org fulfill
everybody's needs in this regard?  ISTR that there were some
discussions in the past that deb.debian.org didn't resolve to
particularly useful mirrors for some parts of the world, but I
have no idea whether that is still a problem.  My personal
experience with deb.debian.org hasn't been that great - instead
of redirecting me to the Debian mirror that is run by my local
ISP (and that is in d-i's mirrorlist), it redirects me to an AWS
instance hosted rather "far" away in networking terms.

Regarding hiding the proxy question: I'm not sure that it would
be a good decision to hide the proxy question by default.  Being
able to connect to the mirror directly doesn't mean that one
doesn't want to use a proxy, in particular when a package-proxy
like apt-cacher-ng is available in the local network.
Personally, I would prefer if the proxy question remains
at default debconf priority.


I disagree with that, but I do also agree that it would be preferable 
if

local proxies or mirrors were used preferably.

However, this shouldn't be done by way of manual configuration; 
instead,

I think it should be done by way of autodetection performed by apt,
something not unlike the proxy-PAC scheme, where a browser looks for
pac., with the  part being what was passed to it by
DHCP, incrementally dropping off the leaf-most part of that until it
resolves.

I think such a scheme could work for apt too.


Arguably the correct way would be to fetch the PAC and execute it to 
determine the proxy for the host. Of course that'd require interpreting 
Javascript.


Kind regards
Philipp Kern



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-05 Thread Wouter Verhelst
On Mon, Sep 03, 2018 at 08:13:55PM +0200, Karsten Merker wrote:
> On Mon, Sep 03, 2018 at 04:41:10PM +0200, Julien Cristau wrote:
> > Control: tag -1 + patch
> > 
> > On 08/31/2018 06:27 PM, Julien Cristau wrote:
> > > Package: choose-mirror
> > > Severity: wishlist
> > > X-Debbugs-Cc: tfh...@debian.org
> > > 
> > > I think it's time for choose-mirror to stop asking by default.  AFAIK
> > > deb.debian.org works well enough now that we don't need users to
> > > manually select a mirror close to them.
> > > 
> > > PoC patch, completely untested:
> > > 
> > Updated patch, at least somewhat tested.  It downgrades the debconf
> > priority for mirror/http/countries and mirror/http/mirrors so they're
> > not asked by default (previous patch would still ask for a country).
> > Only the "proxy" question remains; I'd kind of want to skip it by
> > default unless we find out we can't get at the mirror directly, but
> > that's something for another bug/patch.
> 
> Hello,
> 
> I can see the argument for not asking to select a mirror when
> there is a well-working mechanism for automatically choosing a
> "near" (in networking terms) mirror.  Does deb.debian.org fulfill
> everybody's needs in this regard?  ISTR that there were some
> discussions in the past that deb.debian.org didn't resolve to
> particularly useful mirrors for some parts of the world, but I
> have no idea whether that is still a problem.  My personal
> experience with deb.debian.org hasn't been that great - instead
> of redirecting me to the Debian mirror that is run by my local
> ISP (and that is in d-i's mirrorlist), it redirects me to an AWS
> instance hosted rather "far" away in networking terms.
> 
> Regarding hiding the proxy question: I'm not sure that it would
> be a good decision to hide the proxy question by default.  Being
> able to connect to the mirror directly doesn't mean that one
> doesn't want to use a proxy, in particular when a package-proxy
> like apt-cacher-ng is available in the local network.
> Personally, I would prefer if the proxy question remains
> at default debconf priority.

I disagree with that, but I do also agree that it would be preferable if
local proxies or mirrors were used preferably.

However, this shouldn't be done by way of manual configuration; instead,
I think it should be done by way of autodetection performed by apt,
something not unlike the proxy-PAC scheme, where a browser looks for
pac., with the  part being what was passed to it by
DHCP, incrementally dropping off the leaf-most part of that until it
resolves.

I think such a scheme could work for apt too.

-- 
Could you people please use IRC like normal people?!?

  -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
 Hacklab



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-04 Thread Julien Cristau
On 09/03/2018 10:44 PM, Nicholas D Steeves wrote:
> Like Karsten, my experience with deb.debian.org has been inconsistent.
> With a 50 Mb/s ADSL line in Montréal, most of the top candidates
> mirrors from netselect will consistently deliver ~6200 kB/s, but
> deb.debian.org often connects to an AWS instance where the download
> proceeds no more than 350 KB/s...
> 
http://deb.debian.org/debian, which is being proposed here, does not
point at AWS.  Only the https endpoint currently does, and that's not
what I'm switching to in this bug.

To Philipp's point, there are multiple CDNs we could use in the
(unlikely) event the current one(s) went away.  However, I believe the
consensus within DSA is that we explicitly do not want to maintain more
frontends for the sake of it, we'd rather have a single one that works
well, from a sponsor we're confident won't go away without enough notice
to let us move the service without affecting users.

Issues with deb.debian.org can be reported against the "mirrors"
pseudo-package in the BTS, or to the dsa@ or mirrors@ aliases.

If switching the mirror question from high to medium priority proves
controversial I guess I could separate that to its own bug too, to at
least get the default changed.

Cheers,
Julien



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-04 Thread Bastian Blank
Hi Philipp

On Tue, Sep 04, 2018 at 09:02:42AM +0200, Philipp Kern wrote:
> I pulled out my RT account to check for mirror-related problems (they
> seem to be in a different queue I can't see) and found [0], so it looks
> like there's now a third unannounced provider that is not in the
> rotation (yet?). Unfortunately it seems to be TLS-less as well.

This was my project, as you can see.  Due to the completely non-existant
communication from DSA side, I have no idea how to go forward.  Google
actually supports TLS, it is even enabled, but needs some help to get
certificates in.

People from mainland China reported that it works lot better then for
example Fastly.

> I also wonder if we actually have sensible escalation points to solve
> problems for the users and the bandwidth to do so. That concern is
> especially grave if we're going to auto-hide the question by default.
> Defaulting is something that makes sense to me.

Not really, from my experience in the past months.

Regards,
Bastian

-- 
The heart is not a logical organ.
-- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-04 Thread Philipp Kern
On 03.09.2018 21:54, Ben Hutchings wrote:
> That's why deb.debian.org is a plain CDN which doesn't rely on the
> existing mirror network.  It also supports TLS (which I think should
> also be enabled by default in the installer).

Note that TLS is only supported by one of the two CDN providers behind
deb.debian.org (AWS) right now. So if we make TLS the default, we end up
behind dependent on that single sponsor, which doesn't seem to be a
great idea.

> If deb.debian.org still doesn't provide reasonably fast service in some
> countries, then maybe we should still ask—but then we should put
> deb.debian.org at the top of the mirror list for most countries.

If only we could auto-select the right one automatically. I repeatedly
had to pin one of the two CDN providers (different ones on different
hosts) because the performance was inconsistent between them.

I pulled out my RT account to check for mirror-related problems (they
seem to be in a different queue I can't see) and found [0], so it looks
like there's now a third unannounced provider that is not in the
rotation (yet?). Unfortunately it seems to be TLS-less as well.

I also wonder if we actually have sensible escalation points to solve
problems for the users and the bandwidth to do so. That concern is
especially grave if we're going to auto-hide the question by default.
Defaulting is something that makes sense to me.

Kind regards
Philipp Kern

[0] https://rt.debian.org/Ticket/Display.html?id=7104



signature.asc
Description: OpenPGP digital signature


Bug#907704: choose-mirror: default to deb.debian.org

2018-09-03 Thread Nicholas D Steeves
On Mon, Sep 03, 2018 at 08:54:56PM +0100, Ben Hutchings wrote:
> On Mon, 2018-09-03 at 20:13 +0200, Karsten Merker wrote:
> > On Mon, Sep 03, 2018 at 04:41:10PM +0200, Julien Cristau wrote:
> > > Control: tag -1 + patch
> > > 
> > > On 08/31/2018 06:27 PM, Julien Cristau wrote:
> > > > Package: choose-mirror
> > > > Severity: wishlist
> > > > X-Debbugs-Cc: tfh...@debian.org
> > > > 
> > > > I think it's time for choose-mirror to stop asking by default.  AFAIK
> > > > deb.debian.org works well enough now that we don't need users to
> > > > manually select a mirror close to them.
[...]
> > 
> > Hello,
> > 
> > I can see the argument for not asking to select a mirror when
> > there is a well-working mechanism for automatically choosing a
> > "near" (in networking terms) mirror.  Does deb.debian.org fulfill
> > everybody's needs in this regard?  ISTR that there were some
> > discussions in the past that deb.debian.org didn't resolve to
> > particularly useful mirrors for some parts of the world, but I
> > have no idea whether that is still a problem.  My personal
> > experience with deb.debian.org hasn't been that great - instead
> > of redirecting me to the Debian mirror that is run by my local
> > ISP (and that is in d-i's mirrorlist), it redirects me to an AWS
> > instance hosted rather "far" away in networking terms.
> [...]
> 
> The existing mirror network has several longstanding problems:
> 
> 1. Many mirrors don't reliably update
> 2. Some mirrors aren't reliably available at all
> 3. Many mirrors don't carry all release architectures (even a few
>of the "primary" ones don't)
> 4. Most mirrors don't support TLS
> 
> httpredir.debian.org attempted to solve the first 3 problems while
> still doing what you want: it redirected to local mirrors known to have
> up-to-date files.  This would have been almost ideal as a default.  But
> apparently it required a lot of maintenance work, which no-one was
> prepared to continue doing.
> 
> That's why deb.debian.org is a plain CDN which doesn't rely on the
> existing mirror network.  It also supports TLS (which I think should
> also be enabled by default in the installer).
> 
> If deb.debian.org still doesn't provide reasonably fast service in some
> countries, then maybe we should still ask—but then we should put
> deb.debian.org at the top of the mirror list for most countries.

/\ +1 /\

Like Karsten, my experience with deb.debian.org has been inconsistent.
With a 50 Mb/s ADSL line in Montréal, most of the top candidates
mirrors from netselect will consistently deliver ~6200 kB/s, but
deb.debian.org often connects to an AWS instance where the download
proceeds no more than 350 KB/s...

Additionally, I think that it is reasonable that users look at the
mirror list for the following reason: Our mirrors are a list of
organisations and universities who donate storage and bandwidth.
Having users look at this list provides the opportunity for the user
to recognise their donation--something like "oh, these are the
entities who support FLOSS in my country".

Thus, I believe that hiding this from the user reduces the reciprocity
with these donors, and reduces the incentive to donate
storage/bandwidth.

That said, I think there should be some sort of mechanism to reward
those mirrors who provide TLS.  It's becoming normal for a browser to
display "insecure site" for those which don't support SSL...

Cheers,
Nicholas


signature.asc
Description: PGP signature


Bug#907704: choose-mirror: default to deb.debian.org

2018-09-03 Thread Ben Hutchings
On Mon, 2018-09-03 at 20:13 +0200, Karsten Merker wrote:
> On Mon, Sep 03, 2018 at 04:41:10PM +0200, Julien Cristau wrote:
> > Control: tag -1 + patch
> > 
> > On 08/31/2018 06:27 PM, Julien Cristau wrote:
> > > Package: choose-mirror
> > > Severity: wishlist
> > > X-Debbugs-Cc: tfh...@debian.org
> > > 
> > > I think it's time for choose-mirror to stop asking by default.  AFAIK
> > > deb.debian.org works well enough now that we don't need users to
> > > manually select a mirror close to them.
> > > 
> > > PoC patch, completely untested:
> > > 
> > 
> > Updated patch, at least somewhat tested.  It downgrades the debconf
> > priority for mirror/http/countries and mirror/http/mirrors so they're
> > not asked by default (previous patch would still ask for a country).
> > Only the "proxy" question remains; I'd kind of want to skip it by
> > default unless we find out we can't get at the mirror directly, but
> > that's something for another bug/patch.
> 
> Hello,
> 
> I can see the argument for not asking to select a mirror when
> there is a well-working mechanism for automatically choosing a
> "near" (in networking terms) mirror.  Does deb.debian.org fulfill
> everybody's needs in this regard?  ISTR that there were some
> discussions in the past that deb.debian.org didn't resolve to
> particularly useful mirrors for some parts of the world, but I
> have no idea whether that is still a problem.  My personal
> experience with deb.debian.org hasn't been that great - instead
> of redirecting me to the Debian mirror that is run by my local
> ISP (and that is in d-i's mirrorlist), it redirects me to an AWS
> instance hosted rather "far" away in networking terms.
[...]

The existing mirror network has several longstanding problems:

1. Many mirrors don't reliably update
2. Some mirrors aren't reliably available at all
3. Many mirrors don't carry all release architectures (even a few
   of the "primary" ones don't)
4. Most mirrors don't support TLS

httpredir.debian.org attempted to solve the first 3 problems while
still doing what you want: it redirected to local mirrors known to have
up-to-date files.  This would have been almost ideal as a default.  But
apparently it required a lot of maintenance work, which no-one was
prepared to continue doing.

That's why deb.debian.org is a plain CDN which doesn't rely on the
existing mirror network.  It also supports TLS (which I think should
also be enabled by default in the installer).

If deb.debian.org still doesn't provide reasonably fast service in some
countries, then maybe we should still ask—but then we should put
deb.debian.org at the top of the mirror list for most countries.

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.
It's the only way to be sure.




signature.asc
Description: This is a digitally signed message part


Processed: Re: Bug#907704: choose-mirror: default to deb.debian.org

2018-09-03 Thread Debian Bug Tracking System
Processing control commands:

> tag -1 + patch
Bug #907704 [choose-mirror] choose-mirror: default to deb.debian.org
Added tag(s) patch.

-- 
907704: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907704
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#907704: choose-mirror: default to deb.debian.org

2018-09-03 Thread Julien Cristau
Control: tag -1 + patch

On 08/31/2018 06:27 PM, Julien Cristau wrote:
> Package: choose-mirror
> Severity: wishlist
> X-Debbugs-Cc: tfh...@debian.org
> 
> I think it's time for choose-mirror to stop asking by default.  AFAIK
> deb.debian.org works well enough now that we don't need users to
> manually select a mirror close to them.
> 
> PoC patch, completely untested:
> 
Updated patch, at least somewhat tested.  It downgrades the debconf
priority for mirror/http/countries and mirror/http/mirrors so they're
not asked by default (previous patch would still ask for a country).
Only the "proxy" question remains; I'd kind of want to skip it by
default unless we find out we can't get at the mirror directly, but
that's something for another bug/patch.

Cheers,
Julien
>From 5773506afb888b03d03b570bda4492c293d0d2f9 Mon Sep 17 00:00:00 2001
From: Julien Cristau 
Date: Mon, 3 Sep 2018 15:34:39 +0200
Subject: [PATCH] Default http mirror to deb.debian.org (closes: #907704).

---
 choose-mirror.c| 6 --
 debian/changelog   | 6 ++
 debian/choose-mirror-bin.templates.http-in | 3 ++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/choose-mirror.c b/choose-mirror.c
index 2662c5f..f44c7ad 100644
--- a/choose-mirror.c
+++ b/choose-mirror.c
@@ -617,8 +617,10 @@ static int choose_country(void) {
 		debconf_set(debconf, countries, country);
 		debconf_fget(debconf, DEBCONF_BASE "country", "seen");
 		debconf_fset(debconf, countries, "seen", debconf->value);
+		debconf_input(debconf, "medium", countries);
+	} else {
+		debconf_input(debconf, "high", countries);
 	}
-	debconf_input(debconf, "high", countries);
 
 	free (countries);
 	return 0;
@@ -665,7 +667,7 @@ static int choose_mirror(void) {
 		debconf_subst(debconf, mir, "mirrors", list);
 		free(list);
 
-		debconf_input(debconf, "high", mir);
+		debconf_input(debconf, "medium", mir);
 		free(mir);
 	} else {
 		char *host = add_protocol("hostname");
diff --git a/debian/changelog b/debian/changelog
index 762d821..e7fbf12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+choose-mirror (2.92) UNRELEASED; urgency=medium
+
+  * Default http mirror to deb.debian.org (closes: #907704).
+
+ -- Julien Cristau   Mon, 03 Sep 2018 15:33:14 +0200
+
 choose-mirror (2.91) unstable; urgency=medium
 
   * Update Vcs-{Browser,Git} to point to salsa (alioth's replacement).
diff --git a/debian/choose-mirror-bin.templates.http-in b/debian/choose-mirror-bin.templates.http-in
index 785851e..2dc1f02 100644
--- a/debian/choose-mirror-bin.templates.http-in
+++ b/debian/choose-mirror-bin.templates.http-in
@@ -29,13 +29,14 @@ _Description: Debian archive mirror country:
 Template: mirror/http/mirror
 Type: select
 Choices: ${mirrors}
+Default: deb.debian.org
 # :sl1:
 _Description: Debian archive mirror:
  Please select a Debian archive mirror. You should use a mirror in
  your country or region if you do not know which mirror has the best
  Internet connection to you.
  .
- Usually, ftp..debian.org is a good choice.
+ Usually, deb.debian.org is a good choice.
 
 Template: mirror/http/hostname
 Type: string
-- 
2.18.0



Bug#907704: choose-mirror: default to deb.debian.org

2018-08-31 Thread Julien Cristau
Package: choose-mirror
Severity: wishlist
X-Debbugs-Cc: tfh...@debian.org

I think it's time for choose-mirror to stop asking by default.  AFAIK
deb.debian.org works well enough now that we don't need users to
manually select a mirror close to them.

PoC patch, completely untested:

diff --git a/choose-mirror.c b/choose-mirror.c
index 2662c5f..5463fa7 100644
--- a/choose-mirror.c
+++ b/choose-mirror.c
@@ -665,7 +665,7 @@ static int choose_mirror(void) {
debconf_subst(debconf, mir, "mirrors", list);
free(list);

-   debconf_input(debconf, "high", mir);
+   debconf_input(debconf, "medium", mir);
free(mir);
} else {
char *host = add_protocol("hostname");
diff --git a/debian/choose-mirror-bin.templates.http-in
b/debian/choose-mirror-bin.templates.http-in
index 785851e..2dc1f02 100644
--- a/debian/choose-mirror-bin.templates.http-in
+++ b/debian/choose-mirror-bin.templates.http-in
@@ -29,13 +29,14 @@ _Description: Debian archive mirror country:
 Template: mirror/http/mirror
 Type: select
 Choices: ${mirrors}
+Default: deb.debian.org
 # :sl1:
 _Description: Debian archive mirror:
  Please select a Debian archive mirror. You should use a mirror in
  your country or region if you do not know which mirror has the best
  Internet connection to you.
  .
- Usually, ftp..debian.org is a good choice.
+ Usually, deb.debian.org is a good choice.

 Template: mirror/http/hostname
 Type: string


Cheers,
Julien