Country specific sources.list

47 views
Skip to first unread message

Raja

unread,
Aug 28, 2010, 6:11:24 AM8/28/10
to Vagrant
Im using the lucid32 distribution as my base. Once I create a vm
using that, it seems that sources.list uses repositories from the US.

It might be better if it can look up the LANG env variable or maybe
ask a question about where the user is in. With this information, a
different sources.list could be generated that may perform better. In
my case, Im in India and my host's sources.list has http://in.archive.ubuntu.com/ubuntu/
as its url, but for the ones created using Vagrant, it is
http://us.archive.ubuntu.com/ubuntu/.

I was able to find the Ubuntu source list generator from
http://repogen.simplylinux.ch/. We could possibly combine this with
vagrant so a better sources.list could be generated.

Should I file an enhancement report for this. Ill try to work on a
patch for this depending on the LANG variable.

Thanks
Raja

JD Harrington

unread,
Aug 28, 2010, 6:37:09 AM8/28/10
to vagra...@googlegroups.com
On Sat, Aug 28, 2010 at 6:11 AM, Raja <raja...@gmail.com> wrote:
> Im using the lucid32  distribution as my base. Once I create a vm
> using that, it seems that sources.list uses repositories from the US.
>
> It might be better if it can look up the LANG env variable or maybe
> ask a question about where the user is in. With this information, a
> different sources.list could be generated that may perform better. In
> my case, Im in India and my host's sources.list has http://in.archive.ubuntu.com/ubuntu/
> as its url, but for the ones created using Vagrant, it is
> http://us.archive.ubuntu.com/ubuntu/.

This sounds like something that should be handled by Chef, no?

John Bender

unread,
Aug 30, 2010, 4:06:30 AM8/30/10
to vagra...@googlegroups.com
Raja,

JD is correct, any post vm creation alterations to base boxes should be handled by the provisioner. Vagrant currently supports one provisioner and thats chef. 

If you are interested in altering the VM via a chef recipe you can start at http://vagrantup.com/docs/provisioners.html and look at using the http://wiki.opscode.com/display/chef/Resources#Resources-CookbookFile resource in your recipe to create a new sources list on the vm. 

Best

John

Raja

unread,
Aug 30, 2010, 11:42:40 AM8/30/10
to Vagrant
Thanks, Ill look into the Chef recipes. I was just thinking that it
would make a new vagrant users' life much easier (just as it would be
if they installed Ubuntu themselves).


On Aug 30, 1:06 pm, John Bender <john.m.ben...@gmail.com> wrote:
> Raja,
>
> JD is correct, any post vm creation alterations to base boxes should be
> handled by the provisioner. Vagrant currently supports one provisioner and
> thats chef.
>
> If you are interested in altering the VM via a chef recipe you can start athttp://vagrantup.com/docs/provisioners.htmland look at using thehttp://wiki.opscode.com/display/chef/Resources#Resources-CookbookFileresource
> in your recipe to create a new sources list on the vm.
>
> Best
>
> John
>
>
>
> On Sat, Aug 28, 2010 at 3:37 AM, JD Harrington <p...@y0ru.net> wrote:
Reply all
Reply to author
Forward
0 new messages