globalcitizen/lxc-gentoo — pull request #62 by specing (2013-07-30 20:02:24+00:00)
Title: Fetch fixes

july update:

What this does:
- Adds support for all architectures but MIPS
- security enhancements
- quoting
- code cleanup

What this doesen't do:
- automatic setup of Qemu emulation for non-native containers

regarding quoting:
please quote *everything* in Bash (or any other shell) and force contributors to do this as well
If you want to see why, run create with -n "name with spaces" and enjoy the cleanup you'll have
to do after the script changes/adds "random" files on your host system.

regarding code cleanups:
I found two things in code that were unconnected with anything/unimplemented and traced the cause back
to you and @gza. It appears to me that they were a result of squashing all things into a single
commit or carelessness or both.

regarding things left to do:
- automatic Qemu support: I'm not yet sure how deep I want to go with this. I guess copying
qemu-$ARCH into the rootfs would make sense, but what if the user wanted to have a
seperate repo for static binaries?. While installing qemu and configuring binfmt_misc
are distro-specific things and I'd rather not have to code support for everything out there.
- $ARCHVARIANT: this variable doesen't have a command-line argument yet. I evaluated various
options that came to mind and decided neither is good enough to just commit and forget about
it: -v is usually for verbosity, -V doesen't match up with -a and encoding it in -a
"arm:armv7a-hardfp" would break compatibility with thatever people use to run this script
with.
- wget caching: wget should be wrapped up in a function that would cache things for as long
the user wishes and not redownload a stage3 every week to keep up with autobuilds.
(currently, the portage snapshot is not updated at all)
- $CACHE/: I think the current layout under $CACHE is stupid and too deep.
I recommend $CACHE/$ARCH-$ARCHVARIANT/...tar.* or $CACHE/$ARCH/$ARCHVARIANT/stage3-....tar.*
and have the above caching keep one or two (or how many the user wishes) versions around.