Commit Graph

4488 Commits

Author SHA1 Message Date
Christian Brauner
be038e4948
seccomp: add support for s390x
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-19 11:57:14 +02:00
Christian Brauner
08245e8c1b
confile: add more archs to lxc_config_parse_arch()
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-19 11:36:11 +02:00
Christian Brauner
f4b5c87057 Merge pull request #1133 from jcowgill/mips
Add MIPS support
2016-08-18 18:49:54 +02:00
James Cowgill
d36c8ae3bf seccomp: fix strerror()
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:32 +01:00
James Cowgill
e319eb3478 seccomp: Add mips and mips64 entries to lxc_config_parse_arch
Fixes "unsupported personality" warnings when starting containers.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:25 +01:00
James Cowgill
6f943dd9ab templates: Add mips hostarch detection to debian
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:15 +01:00
James Cowgill
2ccd9edaa8 seccomp: Implement MIPS seccomp handling
MIPS processors implement 3 ABIs: o32, n64 and n32 (similar to x32). The kernel
treats each ABI separately so syscalls disallowed on "all" arches should be
added to all three seccomp sets. This is implemented by expanding compat_arch
and compat_ctx to accept two compat architectures.

After this, the MIPS hostarch detection code and config section code is added.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:11 +01:00
James Cowgill
f53b591652 utils: Add mips signalfd syscall numbers
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:05 +01:00
Christian Brauner
f0c6ee287c
tools: unify exit() calls outside of main()
This also changes the help exit status of lxc-unshare and lxc-usernsexec. So
far they did exit(EXIT_FAILURE) whereas all other tools do exit(EXIT_SUCCESS).
Let's align them with the rest of the tools. This should be safe to do.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-18 11:11:34 +02:00
Christian Brauner
b52b059591
tools: use exit(EXIT_*) everywhere
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-18 11:07:33 +02:00
Christian Brauner
7847a507c9 Merge pull request #1140 from ysbnim/master
Update korean manuals
2016-08-18 10:55:18 +02:00
Sungbae Yoo
6b9c2f40fd doc: Add --rcfile to Japanese common opts
Update for commit 71d74a8

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-08-18 17:51:34 +09:00
Sungbae Yoo
14acde79bb doc: Add --rcfile to Korean common opts
Update for commit 71d74a8

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-08-18 16:50:15 +09:00
Sungbae Yoo
ef747fd885 doc: Update Korean lxc-attach(1)
* Update for commit 03b0398
 * Fix mistranslation words

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-08-18 16:41:37 +09:00
Christian Brauner
72e4901101 Merge pull request #1138 from stgraber/master
Use full GPG fingerprint instead of long IDs.
2016-08-17 21:49:30 +02:00
Stéphane Graber
dd2dbcb920 Use full GPG fingerprint instead of long IDs.
With how easy it is to create a collision on a short ID nowadays and
given that the user doesn't actually have to remember or manually enter
the key ID, lets just use the full fingerprint from now on.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-08-17 15:42:34 -04:00
Christian Brauner
6fe6560698 Merge pull request #1122 from Blub/rcfile-as-common-arg
Rcfile as common arg
2016-08-17 17:27:16 +02:00
Wolfgang Bumiller
6f94152de5 cleanup: replace tabs wth spaces in usage strings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
7665872377 cleanup: whitespaces in option alignment for lxc-execute
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
8564baf99a cleanup: tools: remove --name from lxc-top usage message
It doesn't have any effect on what lxc-top does and is only
accepted on account of being part of the common option list.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
71d74a8342 doc: add --rcfile to common opts
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
6118210e0a tools: set configfile after load_config
In order to cause c->is_defined() to become true.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
50b737a3c6 tools: move --rcfile to the common options list
In almost all commands it's a useful addition to the -n
switch which is a common option, too.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Stéphane Graber
91e7dd57a0 Merge pull request #1134 from brauner/2016-08-16/load_correct_ovl_module
bdev: use correct overlay module name
2016-08-16 22:56:43 +02:00
Christian Brauner
88232d3f4e
bdev: use correct overlay module name
- Assume that the module name is "overlay" per default and not "overlayfs".
- Assume that the overlay version we are using requires a workdir.
- When we mount an overlay filesystem and we fail with ENODEV retry once with
  the module name we haven't already used.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-16 22:24:04 +02:00
Serge Hallyn
acdab4e3e0 Merge pull request #1132 from stgraber/master
Update gitignore
2016-08-15 21:44:29 -05:00
Stéphane Graber
043c8e43b2 Add lxc-test-utils to .gitignore
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-08-15 22:42:45 -04:00
Stéphane Graber
fad06fc561 Fix .gitignore after /tools/ split
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-08-15 22:42:21 -04:00
Stéphane Graber
bcfacb9caa Merge pull request #1131 from brauner/2016-08-16/fix_make_dist
autotools: fix tests
2016-08-16 02:04:19 +02:00
Christian Brauner
0377ef65b4
autotools: fix tests
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-16 01:42:38 +02:00
Serge Hallyn
971bbd5800 Merge pull request #1129 from brauner/2016-08-13/minimal_unit_testing
[RFC] add minimal unit testing for liblxc functions
2016-08-15 12:36:44 -05:00
Christian Brauner
29c57e4ef6
tests: add unit tests for lxc_string_in_array()
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-15 18:27:56 +02:00
Christian Brauner
bed0d08fe7 tests: add unit tests for lxc_string_replace()
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-14 23:15:31 +02:00
Stéphane Graber
b9977146fc Merge pull request #1128 from brauner/2016-08-14/fix_text_file_busy
tools: use fclose() after fdopen() + add newline
2016-08-14 23:03:25 +02:00
Christian Brauner
b44c42e8f0
tools: use fclose() after fdopen() + add newline
So far we accidently used close() on the original file descriptor. (After
fdopen() the original fd is considered private and should not be used anymore.
The close operations should be performed on the new file handle. We did the
correct thing on error but not on success.) Using close() on the original fd
caused "Text file busy" errors and prevented the cloned tmpfs container from
starting.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-14 01:54:32 +02:00
Serge Hallyn
4b281e1264 Merge pull request #1127 from brauner/2016-08-13/add_missing_newline
tools: add missing newline in lxc-create output
2016-08-13 10:21:57 -05:00
Christian Brauner
a7944d2bf1
tools: add missing newline in lxc-create output
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-13 16:04:44 +02:00
Serge Hallyn
cf5a3f4404 Merge pull request #1125 from brauner/2016-08-12/smarter_btrfs_subvol_detection
bdev: be smarter about btrfs subvolume detection
2016-08-12 21:01:31 -05:00
Serge Hallyn
121e90aa9e Merge pull request #1126 from brauner/2016-08-13/fix_runtime_path_for_lxc_ls
tools: use correct runtime path for lxc-ls
2016-08-12 21:00:12 -05:00
Christian Brauner
2263d59596
tools: use correct runtime path for lxc-ls
So far we've simply been using RUNTIME_PATH for the privileged and unprivileged
case. We should actually use XDG_RUNTIME_DIR for the unprivileged case.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-13 00:56:33 +02:00
Christian Brauner
6e0fa6a0c6 bdev: be smarter about btrfs subvolume detection
When a container c is on a btrfs filesystem but is directory backed, copying
the container will default to snapshot. This is because of
should_default_to_snapshot() returning true in this case because c is on a
btrfs filesystem. We should make sure that should_default_to_snapshot() only
returns true, when c itself is a btrfs subvolume.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-13 00:40:17 +02:00
Christian Brauner
6fe1146ddb Merge pull request #1120 from tenforward/update_man
Update English and Japanese lxc-attach(1)
2016-08-12 10:35:43 +02:00
KATOH Yasufumi
c91e90b5bd doc: Update Japanese lxc-attach(1)
* Add undocumented options (-v/--set-var, --keep-var, -f/--rcfile)
* Change order of option in SYNOPSIS (-L that is placed after "command")
* Add long options in SYNOPSIS

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2016-08-12 17:29:55 +09:00
KATOH Yasufumi
03b03982dd doc: Update lxc-attach(1)
* Add undocumented options (-v/--set-var, --keep-var, -f/--rcfile)
* Change order of option in SYNOPSIS (-L that is placed after "command")
* Add long options in SYNOPSIS

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2016-08-12 17:26:31 +09:00
Serge Hallyn
d3488f3706 Merge pull request #1119 from brauner/2016-08-11/fix_log_output
log: fix log_append_stderr()
2016-08-12 00:55:48 -05:00
Christian Brauner
c3ff6e245d
log: fix log_append_stderr()
Log output currently looks like this:

	lxc-copy: debbdev/lxcdir.c: dir_clonepaths: 45 directories cannot be snapshotted.  Try aufs or overlayfs.

we rather want it to be:

	lxc-copy: deb: bdev/lxcdir.c: dir_clonepaths: 45 directories cannot be snapshotted.  Try aufs or overlayfs.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-11 23:51:29 +02:00
Serge Hallyn
e00456c820 Merge pull request #1118 from brauner/2016-08-09/remove_readdir_r
tree-wide: replace readdir_r() with readdir()
2016-08-11 09:25:34 -05:00
Christian Brauner
74f9697663
tree-wide: replace readdir_r() with readdir()
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-09 21:10:02 +02:00
Stéphane Graber
baecb85acc Merge pull request #1116 from clandmeter/alpine-aarch64
templates: add support for new arch on Alpine Linux
2016-08-07 16:33:09 +02:00
Carlo Landmeter
12d233d5a3 templates: add support for new arch on Alpine Linux
Signed-off-by: Carlo Landmeter <clandmeter@gmail.com>
2016-08-07 12:42:32 +00:00