Make build system more configurable
Created by: wijnen
I'm using this system to build my own images, and needed some changes. This pull request contains three commits which allow me to build my own images without further editing of the sources.
"Support for flat repositories" allows repositories with a "flat" layout, such as the ones locally hosted by mini-dinstall. I have such a repository, and want to include local packages in my build. Because I need more than one (/all and /armhf), I decided to make the setting an array variable. However, this requires /bin/bash, so I changed that everywhere. It would probably be good to make the other variables arrays as well, but I didn't need that, so I didn't do it.
"allow greater version of debootstrap" fixes the equality check of debootstrap; it also changes the generation of the number, because I think cut is simpler than awk, but that part shouldn't be required for it to work.
"workarounds for unconfigurable settings" contains three parts; you may not want to include them in this form.
The first part disables cape_universal=enable, because I don't want it; it would be good if this could be configured with a variable.
The second part writes the content of DISABLE_ETH into /etc/network/interfaces if it is set. This way I can set eth0 up in a different way than the default (by setting it to a value that includes newlines). The reason I need this is that the file is created after the chroot_after_hook is run, so I have no other way to change it; the proper fix would be to create it before that hook, so it can be edited or replaced from the hook script.
Finally, it adds auto and allow-hotplug to usb0 and removes the default gateway from it. I think this would be good by default. If the file is created before the hook, I can also fix it in my build from the hook script, so then we can agree to disagree on that.