From owner-freebsd-current@FreeBSD.ORG Mon Nov 14 12:18:56 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D03A106564A for ; Mon, 14 Nov 2011 12:18:56 +0000 (UTC) (envelope-from jlaffaye.freebsd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1BC8FC0A for ; Mon, 14 Nov 2011 12:18:55 +0000 (UTC) Received: by wwg14 with SMTP id 14so6140490wwg.31 for ; Mon, 14 Nov 2011 04:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Qrlk0HK3MRMKOEBYSg1KZF1wuXBa+tAGACks+WCifws=; b=TSrXQKrGgG1SgyfTjmzC0pnWDJJX9kU0IDVspO5fOFPXYzuHB2rV0m6pT7UL5sKd8N bEG87+nYohY2zNQidzh1hk1W7XqJ3S2GPCNJW1rrVRrAK+/cjMO9K3ZQOC0cOro4HCjb CLs4iRGajtBGoQ7cWxSnbiphkfogMuelOi5+4= Received: by 10.227.198.77 with SMTP id en13mr14574710wbb.28.1321271606342; Mon, 14 Nov 2011 03:53:26 -0800 (PST) Received: from [10.42.116.106] (proxy.ovh.net. [213.186.50.98]) by mx.google.com with ESMTPS id en10sm16988152wbb.0.2011.11.14.03.53.24 (version=SSLv3 cipher=OTHER); Mon, 14 Nov 2011 03:53:24 -0800 (PST) Message-ID: <4EC10134.8010906@gmail.com> Date: Mon, 14 Nov 2011 12:53:24 +0100 From: Julien Laffaye User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 14 Nov 2011 12:31:33 +0000 Subject: Re: FreeBSD ftp mirror sites and pkg_add X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2011 12:18:56 -0000 On 11/14/2011 12:45 PM, Mehmet Erol Sanliturk wrote: > In Arch Linux , package manager Pacman is using a configuration file > /etc/pacman.conf with its included files . > > > It is using a file such as the following ( some parts are deleted for > message ) : > > ( obtained from > http://www.archlinux.org/mirrorlist/all/ftp/ > ) : > > --------------------------------- > > ## > ## Arch Linux repository mirrorlist > ## Generated on 2011-11-13 > ## > > ## Any > #Server = ftp://mirrors.kernel.org/archlinux/$repo/os/$arch > > ## Australia > #Server = ftp://mirror.aarnet.edu.au/pub/archlinux/$repo/os/$arch > #Server = ftp://ftp.iinet.net.au/pub/archlinux/$repo/os/$arch > #Server = ftp://mirror.internode.on.net/pub/archlinux/$repo/os/$arch > #Server = ftp://mirror.optus.net/archlinux/$repo/os/$arch > > ... > > ## Canada > #Server = ftp://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch > #Server = ftp://mirror.its.dal.ca/archlinux/$repo/os/$arch > #Server = ftp://less.cogeco.net/pub/archlinux/$repo/os/$arch > > ... > > ## Great Britain > #Server = ftp://mirror.lividpenguin.com/pub/archlinux/$repo/os/$arch > #Server = ftp://mirror.cinosure.com/archlinux/$repo/os/$arch > #Server = ftp://mirrors.uk2.net/pub/archlinux/$repo/os/$arch > > ... > > ## Turkey > #Server = ftp://ftp.linux.org.tr/archlinux/$repo/os/$arch > > ... > > ## United States > #Server = ftp://archlinux.supsec.org/pub/linux/arch/$repo/os/$arch > #Server = ftp://cake.lib.fit.edu/archlinux/$repo/os/$arch > #Server = ftp://cosmos.cites.illinois.edu/pub/archlinux/$repo/os/$arch > #Server = ftp://ftp.archlinux.org/$repo/os/$arch > #Server = ftp://ftp.gtlib.gatech.edu/pub/archlinux/$repo/os/$arch > #Server = ftp://mirror.ancl.hawaii.edu/linux/archlinux/$repo/os/$arch > #Server = ftp://mirror.us.leaseweb.net/archlinux/$repo/os/$arch > #Server = ftp://locke.suu.edu/linux/dist/archlinux/$repo/os/$arch > #Server = ftp://ftp.osuosl.org/pub/archlinux/$repo/os/$arch > #Server = ftp://mirror.rit.edu/archlinux/$repo/os/$arch > > --------------------------------- > > The advised action is to edit this file and activate nearest or > suitable mirrors by removing comment sign ( # ) in front of > the relevant mirror . > > During package install , this file is used and traversed up to > an available mirror , when a mirror fails from beginning . > > ................. > > > In FreeBSD , pkg_add > > > http://svnweb.freebsd.org/base/head/usr.sbin/pkg_install/add/main.c?view=markup > > the ONLY package site is taken by > > getpackagesite(void) > > from > > if (getenv("PACKAGESITE")) > > which it is ONLY ftp.FreeBSD.org . > > When the statement > > if ((packagesite = getpackagesite()) == NULL) > > fails , it is necessary either to wait up to a working state of the > ftp.FreeBSD.org > or edit the "PACKAGESITE" environment variable up to a success which > is NOT an expected action from the beginners . > > > Instead of this , it is possible to use a pkg_add.conf > and insert into a list of ALL available ftp.*.FreeBSD.org sites > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html > > AND > > OTHER mirror ftp sites synchronized by central FreeBSD ftp sites . > > Every site will be commented out , but > > ftp://ftp.FreeBSD.org... > > will be available . > > For example : > > --------------------------------- > > # From > > # http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html > > : > > # The official sources for FreeBSD are available via anonymous FTP > # from a worldwide set of mirror sites. > # The site ftp://ftp.FreeBSD.org/pub/FreeBSD/ is well connected and > # allows a large number of connections to it, > # but you are probably better off finding a closer mirror site > # (especially if you decide to set up some sort of mirror site). > > > # The adviced action is the following : > > > # Move the nearest mirror site link to top , > # and second nearest mirror to second line , > # up to mirrors suitable to use , > # AND remove comment signs in front of them . > > ## Australia > > #ftp://ftp.au.freebsd.org/pub/FreeBSD/ > #ftp://ftp2.au.freebsd.org/pub/FreeBSD/ > > ... > > ## Canada > > #ftp://ftp.ca.freebsd.org/pub/FreeBSD/ > #ftp://ftp2.ca.freebsd.org/ > #ftp://ftp3.ca.freebsd.org/pub/FreeBSD/ > > ... > > ## Turkey > > #ftp://ftp.tr.freebsd.org/pub/FreeBSD/ > #ftp://ftp2.tr.freebsd.org/pub/FreeBSD/ > > ... > > ## United Kingdom > > #ftp://ftp.uk.freebsd.org/pub/FreeBSD/ > #ftp://ftp2.uk.freebsd.org/pub/FreeBSD/ > > ... > > ## United States > > #ftp://ftp1.us.freebsd.org/pub/FreeBSD/ > #ftp://ftp2.us.freebsd.org/pub/FreeBSD/ > > ... > > ftp://ftp.freebsd.org/pub/FreeBSD/ > > --------------------------------- > > This feature and what to do advise will be stated in the release notes . > > When pkg_add is started , it will load pkg_add.conf list > into an array , AND traverse this array from element one to > end , last being the ftp://ftp.freebsd.org/pub/FreeBSD/ . > > If a mirror site is successful , the package will be installed from this > one , > and the loop will be discontinued . > > The suggested structure does NOT change anything from the new > user point of view . > > It is very likely that , experienced users will adhere to > use nearest mirror usage advise to reduce load currently > carried by the default FreeBSD ftp site . > > I think , the default ftp site is incurring cost for > internet band width usage . > > Then any cost is saved may be transferred to projects to > improve FreeBSD features . > > ................. > > I do NOT know such suggestions are irritative or useful , > because sometimes it is possible to hear that > > "if you do ( or can ) not supply a patch , > then shut up , ... , shut up" > > > ( where "shut up , ... , shut up" is from "Titanic is sinking" ) . > > > Thank you very much . > > > Mehmet Erol Sanliturk With the new pkgng tool, you can change the ftp site in a configuration file. Please also note that the distribution method might change in the near future (a CDN?).