Commit Graph

360 Commits

Author SHA1 Message Date
Natanael Copa
0e18cacab5 lxc-alpine: add support for architecture arm
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-20 10:22:25 -05:00
Stéphane Graber
96283b5460
templates: Fix bashisms in common code
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-19 10:45:14 -05:00
Natanael Copa
6460d3c5f0 lxc-alpine: add checksums for musl libc build server pubkeys
We have added 3 new build servers for Alpine Linux musl libc x86, x86_64
and arm. Add the sha256sum for those keys.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-19 10:39:30 -05:00
Natanael Copa
d2b2911c55 lxc-alpine: fixes for checkbashism
Fix the issues reported by checkbashisms and change back to #!/bin/sh

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-19 10:39:26 -05:00
Stéphane Graber
f74e080cf7 download: Support nested containers in unpriv
This adds detection for the case where we are root in an unprivileged
container and then run LXC from there. In this case, we want to download
to the system location, ignore the missing uid/gid ranges and run
templates that are userns-ready.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-02-17 11:59:10 -05:00
TAMUKI Shoichi
ffeb76b460 lxc-plamo: various small changes
- Change redirection of fd 200 to 9 (greater than 9 may conflict with
  fd the shell uses internally)
- Replace numeric line addressing of ed to regular expression to avoid
  correcting the line addressing at each modification of init scripts
- Correct the option order (trivial)

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-02-10 13:14:09 -06:00
Stéphane Graber
ef9512b491
download: Use port-80 pool for gpg over http
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-06 17:34:12 -05:00
Stéphane Graber
207bf0e475 templates: Make sure usual locations are in PATH
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-02-06 17:14:03 -05:00
Stéphane Graber
4eb706b3ce
download: Fix previous change
The previous change to support http proxies only worked when http_proxy
was set... Instead add some detection code and only use :80 when using
http_proxy.

That's a bit of a workaround, but it's the only way I could find to get
GPG to work with http_proxy.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-06 17:11:51 -05:00
Stéphane Graber
2262880d63
download: Force hkp on port 80 (for http proxies)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-06 12:24:58 -05:00
TAMUKI Shoichi
c63c04fcaf templates: improve refusing to run unprivileged
For all templates except lxc-ubuntu-cloud and lxc-download, detect not
only --mapped-uid but also --mapped-gid and error out.  Detecting will
not be done after -- parameter because of non-option parameters.

Also, change the mode of lxc-archlinux.in 100755 to 100644.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-06 11:05:20 -05:00
gza
cf261d584e gentoo: fix portage rw problem
Signed-off-by: Guillaume Zitta <github.guillaume@zitta.fr>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-05 13:44:11 -05:00
Serge Hallyn
2133f58c66 create: pass --mapped-gid to templates next to --mapped-uid
That way templates can fix group ownership alongside uid ownership.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-02-04 16:31:37 -05:00
Stéphane Graber
8ec981fc8b templates: Refuse to run unprivileged
Only the download and ubuntu-cloud templates work with unprivileged
containers, for all others, detect --mapped-uid and error out as early
as possible, recommending the use of the download template.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-02-04 14:30:51 -05:00
Harald Dunkel
3a6ef65aa2 support a custom CentOS repository
This change introduces a flag --repo to the lxc-centos template
to allow using a local repository (e.g. a loop mounted installer
iso on your web server).

Signed-off-by: Harald Dunkel <harri@afaics.de>
Acked-by: Michael H. Warfield <mhw@WittsEnd.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-02-04 07:49:09 -06:00
Stéphane Graber
d46417540f lxc-ubuntu-cloud: Update arm* cross
| host arch | arm64 | armhf | armel |
-------------------------------------
| arm64     |   X   |   X   |   X   |
| armhf     |       |   X   |   X   |
| armel     |       |   X   |   X   |
-------------------------------------

Although optional, all existing arm64 silicon supports 32bit instructions.
armel/armhf is only a userspace change, so they are interchangeable.
However armhf isn't supported on all armel platforms (e.g. armv6) but
all those we support have hard-float.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-31 09:38:32 +00:00
Scott Moser
ad3f14ab58 lxc-ubuntu-cloud: various small changes
* ppc64el images now exist and generally function.
   Instead of failing because an arch isnt in the list,
   let that check happen by ability to download something.
 * update the hard coded ubuntu releases to know about 'trusty'
   and drop no longer supported releases (consistent with behavior
   when distro-info is available)
 * shorten the logic that decides if host and container arch
   are supported.
 * support skipping "invalid arch" check entirely via undocumented
   variable UCTEMPLATE_SKIP_ARCH_CHECK.
 * update usage to reference 'tryreleased' as the default 'stream'
 * give good error message if user tries 'released' and there
   is no released version available.

Signed-off-by: Scott Moser <smoser@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-31 09:38:29 +00:00
Bogdan Purcareata
1d1774b1ac use susv3 head arguments
Without enabling INCLUDE_SUSv2 in busybox, we need to use head's -n argument,
rather than -#.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-31 09:38:23 +00:00
Natanael Copa
6ff9f8ec1c lxc-alpine: disable sys_admin by default
It is normally not needed.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-29 13:43:52 +00:00
Stéphane Graber
8a3c76b24d ubuntu/ubuntu-cloud: Add support for arm64 and ppc64el
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-29 11:43:22 +00:00
Kaarle Ritvanen
1bdedfacc2 lxc-alpine: mount tmpfs on /dev/shm
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-29 11:42:43 +00:00
Stéphane Graber
9749441a0e
gentoo: Fix /dev/tun generation
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-28 12:22:06 +00:00
gza
cae3584efc gentoo: template rework
Now splited config 2 settings available
* common
** featureful oriented settings
* moresecure
** security oriented

Signed-off-by: gza <github.guillaume@zitta.fr>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-28 09:57:39 +00:00
gza
2562784e95 gentoo: fix typo, may break host init system
Signed-off-by: gza <github.guillaume@zitta.fr>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-28 09:57:36 +00:00
Stéphane Graber
b56661fead lxc-download: Tweak cache location
- Also include the variant in the path
 - Fix invalid LXC_CACHE_BASE
 - Drop redundant code

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-27 09:43:56 +00:00
Kaarle Ritvanen
691ac4a339 lxc-alpine: copy /etc/TZ to container if present
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-25 18:04:46 -05:00
Stéphane Graber
843a58743e
lxc-download: Fix to work without mktemp
mktemp isn't always available in busybox.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-24 18:23:28 -05:00
Michael H. Warfield
08754f305b Update CentOS and Fedora templates to support archtectures option.
Added code to the CentOS and Fedora templates so that x86 32 bit containers
may be built on x86_64 platforms.  Like archectectures may also be trivially
used as well.

Option added is "-a {arch}".

Additionally cleaned up some bash specific logic.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-24 12:36:40 -05:00
KATOH Yasufumi
8c3a756ed4 plamo: Improve template
allow not to specify a variable that is related installed packages

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-22 19:57:53 -05:00
Stéphane Graber
b0f0932a94 lxc-download: Add interactive mode
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-22 14:52:34 -05:00
Michael H. Warfield
1ecee40b7d Update Fedora and CentOS templates for common conf includes.
This updates the Fedora and CentOS templates to utilize a common
included config.  This is largely based on the changes in the Oracle
template with some exceptions.

Dropping of setpcap (present in the Oracle template) is commented out in
the Fedora template.  It seems to cause problems, such as large login
delays with Fedora 20 containers (but not Fedora 19 - strange).

The Fedora template is further modified to disable systemd-journald.service
as it is unnecessary in a container and causes serious problems when
running in a Fedora 20 container.

The Fedora template is also updated to default to Fedora 20 when running
on a non-Fedora host.

Regards,
Mike

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-21 20:25:55 -05:00
KATOH Yasufumi
adf4b40833 plamo: Improve template
Allow to specify additional packages

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-21 09:51:25 -05:00
Dimitri John Ledkov
4b954f1217 lxc-ubuntu-cloud: Default to trying released channel
This adds a fallback to the daily channel if an image couldn't be found
in the released one.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-20 22:00:32 -05:00
KATOH Yasufumi
7a49a081dd plamo: Improve template
* make simple
* change default download site to http://ftp.ring.gr.jp

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-18 10:17:33 -05:00
Stéphane Graber
9cde0368fb lxc-ubuntu-cloud: Fix cache and lock location
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 23:49:02 -05:00
Stéphane Graber
3fefd6e6d5 ubuntu: Don't fail on invalid locale
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 23:48:59 -05:00
Stéphane Graber
00fe5e1d19 debian: Switch to config includes
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 15:57:31 -05:00
Dwight Engen
563476727b oracle template: default to 6.5 when no release given or detected
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 12:29:55 -05:00
Dwight Engen
91bcb2dd78 oracle template: don't sed /etc/init/tty.conf on older releases
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 12:29:19 -05:00
Dwight Engen
9e69977fa6 oracle template: convert to common.conf style
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 12:28:55 -05:00
KATOH Yasufumi
8adef7614d plamo: Update template to use wget when download packages
Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 12:20:46 -05:00
Stéphane Graber
b408e70daf
Trailing whitespace
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 10:33:04 -05:00
Stéphane Graber
41670b35b0 lxc-download: Fix undefined DOWNLOAD_FORCE_CACHE
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 10:05:46 -05:00
Stéphane Graber
c1becef2d2 lxc-download: Fix wrong option parsing
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 10:05:40 -05:00
Stéphane Graber
0d656b0549 lxc-download: POSIX doesn't specify -f for chown
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 10:05:19 -05:00
Stéphane Graber
07219a02df ubuntu: Fix path to openssh-server's postinst
The path isn't relative to @LOCALSTATEDIR@

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 10:04:40 -05:00
Stéphane Graber
ce68d5b481 debian: Support ssh host keys regeneration
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 10:04:30 -05:00
Stéphane Graber
b335cf8d4b lxc-archlinux: Cleanup fstab
It's been brought to my attention that the read-only mount of /proc/sys
is causing problems to archlinux users, so instead just have LXC mount
proc and sysfs normally (read-write).

Reported-by: John Lane <john@lane.uk.net>
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-14 17:29:28 -05:00
John Lane
d0800999b2 lxc-archlinux: optional --root_passwd argument
Signed-off-by: John Lane <john@lane.uk.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-14 17:29:24 -05:00
John Lane
012f591a7d lxc-archlinux: support enabling systemd units
Signed-off-by: John Lane <john@lane.uk.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-14 17:28:46 -05:00