Proxy/Mirror support #374

neerolyte opened this Issue Aug 27, 2012 · 5 comments


None yet

3 participants

It'd be useful to be able to specify a proxy (or even a mirror).

E.g. in the url and repo lines are hardcoded to arbitrary mirrors.

It'd be useful to able to configure it to use a local proxy and/or mirror so that when I have a local source (e.g. I use apt-cacher) I can use it.

Both url and repo lines can receive proxy's to use:

url ... --proxy=[protocol://][username[:password]@]host[:port]
repo ... --proxy=[protocol://][username[:password]@]host[:port]



You're right; though there is no generic answer to this: If there is a mirror list we might be able to do something similar to the gentoo - See de90a8b

As for the proxy, yup, maybe we can pass them as environment vars. It would help if you changed an existing template to one that uses a proxy. Then I can use it as a template for search/replace values.

I didn't realise when I posted this issue originally that I could just edit the created definition structure (facepalm), so I've got a work around that's pretty comfortable now.

Having a mirror list doesn't actually quite solve the problem I was dealing with.

What I'm trying to do is have a caching/mirroring proxy (e.g. apt-cacher-ng) enabled that I can then build the base box through (on my connection this is orders of magnitude faster for common builds).

I ended up solving the problem by saving the generated definition layout in my repo and putting a bash script around it that runs a regex over a template version of ks.cfg to replace the proxy and mirror components:

I'm not sure if this is useful enough to be absorbed in to the template some how.

One option might be if there was a way to put files in the definition template that were .irb files that could resolve to variables specified in definitions.rb, or as CLI arguments - I'm currently preparing some .template files in that directory and pre-processing them with bash before letting VeeWee have them (e.g. to create a cacheable VirtualBox Guest additions installer and for the kick start


KenMacD commented Sep 12, 2012

I would be interested in this as well. I'm sure @neerolyte's solution would work, but if possible it would be nice to not have to change the default templates to build with a specific mirror.


postinstalls can now be .erb files and with params you can now pass environment vars to postinstall scripts.
See for example -

so if the templates are generically written this can work. But I won't spend time on it right now

@jedi4ever jedi4ever closed this Feb 20, 2013

Sorry for poking something old but wondering if you can check the example link?

You mention we can now use .erb files, but the linked example isn't an erb file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment