Commit Graph

4488 Commits

Author SHA1 Message Date
Christian Brauner
981f6029c3 use common lxc ordering for included headers
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-30 18:07:38 +02:00
Serge Hallyn
42071d376b Merge pull request #930 from brauner/2016-03-30/ignore_all_so
also ingore *.so.*
2016-03-30 11:06:02 -05:00
Christian Brauner
a1e5280d9e use smarter error handling for lxc_strmmap()
Additionally, fix the comment for lxc_strmmap() and cleanup #includes in
utils.{c,h}.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-30 10:20:43 +02:00
Christian Brauner
1000e4cb5b also ingore *.so.*
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-30 10:19:17 +02:00
Christian Brauner
98139b9f50 Merge pull request #928 from stgraber/master
lxc-ubuntu: Fix building on secondary architectures
2016-03-30 07:49:55 +02:00
Stéphane Graber
aec6a20578
lxc-ubuntu: Fix building on secondary architectures
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-30 01:25:53 -04:00
Stéphane Graber
fc12923999
change version to 2.0.0.rc14 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-29 21:31:14 -04:00
Serge Hallyn
03faa62170 Merge pull request #926 from brauner/2016-03-27/mmap_file_to_str
add funs to mmap() files to \0-terminated strings
2016-03-29 11:11:37 -05:00
Christian Brauner
25086a5fe4 better naming for mmap helpers
Rename lxc_mmap()/lxc_munmap() to lxc_strmmap()/lxc_strmunmap().

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-29 08:50:27 +02:00
Christian Brauner
aeea34d709 use lxc_mmap() and lxc_munmap()
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-29 08:48:27 +02:00
Christian Brauner
1adbd02064 add funs to mmap() files to \0-terminated strings
In order to do this we make use of the MAP_FIXED flag of mmap(). MAP_FIXED
should be safe to use when it replaces an already existing mapping. To this
end, we establish an anonymous mapping that is one byte larger than the
underlying file. The pages handed to us are zero filled.  Now we establish a
fixed-address mapping starting at the address we received from our anonymous
mapping and replace all bytes excluding the additional \0-byte with the file.
This allows us to use normal string-handling function. The idea implemented
here is similar to how shared libraries are mapped.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-29 08:48:27 +02:00
Stéphane Graber
bc41134fc6 Merge pull request #927 from tych0/only-use-host-devnull-no-autodev
start: only use host's /dev/null when absolutely necessary
2016-03-29 01:25:51 -04:00
Tycho Andersen
7a55c1576e start: only use host's /dev/null when absolutely necessary
See comments for details, but basically, only use the host's /dev/null when
absolutely necessary (i.e. there is no reasonable /dev/null in the
container).

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-28 18:43:20 -06:00
Stéphane Graber
8f1de71ba5 Merge pull request #924 from evgeni/default-ubuntu-mirror
always provide a default mirror for debootstraping Ubuntu
2016-03-26 13:05:51 -04:00
Stéphane Graber
dc801c70a1 Merge pull request #925 from evgeni/debian-main-only
only enable Debian's main repository by default
2016-03-26 13:04:58 -04:00
Evgeni Golov
57b40c0852 only enable Debian's main repository by default
This inverts the logic done in c2a85d0 to default to "main only" and allow enabling contrib and non-free on user request.

Closes: #625

Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-03-26 11:28:52 +01:00
Evgeni Golov
8bc8fd9a2c always provide a default mirror for debootstraping Ubuntu
debootstrap sometimes selects the wrong mirror due to [1]

[1] https://bugs.debian.org/819300

Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-03-26 10:56:46 +01:00
Christian Brauner
a6ab0d4dfa Merge pull request #922 from evgeni/httpredir.debian.org
use httpredir.debian.org as the default Debian mirror
2016-03-26 10:13:58 +01:00
Evgeni Golov
95a1306d69 use httpredir.debian.org as the default Debian mirror
http.debian.net is an alias anyways and httpredir.debian.org is the official name of the service

Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-03-26 09:48:01 +01:00
Christian Brauner
a537e8b207 Merge pull request #920 from thtanaka/timezone-fix
Timezone inside the container is not the same as the host
2016-03-25 18:18:10 +01:00
Christian Brauner
17caa6fb6a Merge pull request #919 from amezin/master
Fix installation of out-of-tree (VPATH) builds
2016-03-25 18:13:47 +01:00
Thomas Tanaka
710a25539e Timezone inside the container is not the same as the host
In OL6, it is missing /etc/sysconfig/clock

Tested-by: Deepak Patel <deepak.patel@oracle.com>
Signed-off-by: Thomas Tanaka <thomas.tanaka@oracle.com>
2016-03-25 09:53:33 -07:00
Aleksandr Mezin
a5c28c86f5 Fix installation of out-of-tree (VPATH) builds
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-03-25 19:30:49 +06:00
Serge Hallyn
e9058dea83 Merge pull request #917 from amezin/master
Fix daemonized containers without autodev and/or /dev mount
2016-03-24 21:45:15 -07:00
Aleksandr Mezin
c44de748af start: open /dev/null from "host" /dev
Sometimes, a container doesn't have /dev/null.
For example, I have this problem with Android container.

This fixes #910 (github) for me.

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-03-24 23:22:32 +06:00
Aleksandr Mezin
f8dd027559 utils: split null_stdfds() to open_devnull() and set_stdfds()
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-03-24 23:20:42 +06:00
Bogdan Purcareata
07e4c41f29 lxc-busybox: Remove warning for dynamically linked Busybox
The warning has been present since commit 32b37181ea (with no purpose stated).
Support for dynamically linked Busybox has been added since commit bf6cc73696.
Haven't encountered any issues with dynamically linked Busybox in my last
2 years' testing.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-24 12:46:32 -04:00
Stéphane Graber
cce8b5cf1d Merge pull request #916 from ojkastl/20160324_Fix_path_to_lxc-net_config
lxc.spec.in: fixed hardcoded path to lxc-net config file
2016-03-24 12:38:51 -04:00
Aleksandr Mezin
d1ccb562a9 start: use LXC_SYNC_ERROR to report errors.
This gives more meaningful error message than "invalid sequence".

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-03-24 17:55:03 +06:00
Aleksandr Mezin
ea720ff1d0 sync: add LXC_SYNC_ERROR to report errors from another process.
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2016-03-24 17:54:26 +06:00
Johannes Kastl
cd27b6c810 lxc.spec.in: fixed hardcoded path to lxc-net config file
Signed-off-by: Johannes Kastl <git@ojkastl.de>
2016-03-24 09:26:28 +01:00
Christian Brauner
28711463f8 Merge pull request #914 from brauner/2016-03-23/Purcarea_Bogdan
lxc-busybox: Touch /etc/fstab in the container rootfs
2016-03-24 08:13:12 +01:00
Bogdan Purcareata
6ab1ca0375 lxc-busybox: Touch /etc/fstab in the container rootfs
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2016-03-24 07:09:15 +01:00
Serge Hallyn
173e82050f Merge pull request #911 from brauner/2016-03-23/Purcarea_Bogdan
open_without_symlink: Don't SYSERROR on something else than ELOOP
2016-03-23 09:53:35 -07:00
Christian Brauner
88e078ba86 open_without_symlink: Don't SYSERROR on something else than ELOOP
The open_without_symlink routine has been specifically created to prevent
mounts with synlinks as source or destination. Keep SYSERROR'ing in that
particular scenario, but leave error handling to calling functions for the
other ones - e.g. optional bind mount when the source dir doesn't exist
throws a nasty error.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2016-03-23 16:37:09 +01:00
Stéphane Graber
684753c2ba change version to 2.0.0.rc13 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-22 17:22:23 -04:00
Christian Brauner
1becda46c0 Merge pull request #908 from tych0/fix-907
Fix 907
2016-03-22 16:47:00 +01:00
Tycho Andersen
b7088add70 c/r: rename restore & friends to __criu_restore
Hopefully this will avoid name collisions with any user binaries, since
criu is just an implementation detail.

Closes #907

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-22 09:26:55 -06:00
Tycho Andersen
fa25c39a44 lxc-checkpoint: make things static when they can be
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-22 09:22:39 -06:00
Serge Hallyn
f036e5ce58 Merge pull request #906 from tych0/fix-console-none-migration
Fix console none migration
2016-03-21 16:39:05 -07:00
Tycho Andersen
97e4f1a91f c/r: don't fail if there is no console_fd on restore
If we set lxc.console=none, this fd won't exist, so let's not fail if it
doesn't. We already partially handled this case correctly, so let's
actually handle it correctly :)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-21 16:56:03 -06:00
Tycho Andersen
36d2096cf4 c/r: don't pass --ext-mount-map flag when console=none
We don't pass anything on the restore side since we didn't save anything,
but the restore side will expect something if we pass this. Instead, let's
not pass anything.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-21 16:50:39 -06:00
Stéphane Graber
ecd852f35e change version to 2.0.0.rc12 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-21 16:44:45 -04:00
Stéphane Graber
56d6e75bc0 Merge pull request #902 from tych0/better-criu-logging
Better criu logging
2016-03-18 16:12:45 -04:00
Tycho Andersen
3d9a5c85fd c/r: print criu's stdout when it fails
In particular, when CRIU fails before it has its log completely initialized
(e.g. if the log directory doesn't exist, or if the argument parser fails),
it prints this to stdout. Let's log that.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-18 13:13:17 -06:00
Tycho Andersen
cf4b07a5af c/r: log the exact command we exec
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-03-18 10:19:36 -06:00
Stéphane Graber
72e7e16809 change version to 2.0.0.rc11 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-17 23:11:50 -04:00
Christian Brauner
c37948886b Merge pull request #901 from stgraber/master
download: Bump to compat level 3
2016-03-17 23:01:45 +01:00
Stéphane Graber
9fd38724d9 download: Bump to compat level 3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-03-17 17:43:03 -04:00
Stéphane Graber
c9013d0379 Merge pull request #900 from tych0/dont-always-create-console
autodev: don't always create /dev/console
2016-03-17 16:02:47 -04:00