Re: [lxc-devel] [PATCH] oracle template: add support for creating ol4 container from ovm template

2013-01-03 Thread Stéphane Graber
On 12/14/2012 03:38 PM, Dwight Engen wrote: > Also: disable the interactive part of ovmd so ol5,6 containers won't > hang if started for the first time with -d. Don't let containers do rawio, > or have access to /dev/rtc0, they can mess up the hosts system clock among > other things. > > Signed-of

Re: [lxc-devel] [PATCH] fix lxc-wait waiting forever for FREEZING, FROZEN, THAWED states

2013-01-03 Thread Stéphane Graber
On 12/18/2012 07:15 PM, Dwight Engen wrote: > These states are kept by the kernel in the freezer.state cgroup item, and > are never set in handler->state with lxc_set_state(). If lxc transitions > a container to/from the freezer after an lxc-wait for one of the above > states has already started, t

Re: [lxc-devel] [PATCH 16/21] Replace strdupa call by standard strdup

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > On 01/03/2013 05:00 PM, Serge Hallyn wrote: > > Quoting Stéphane Graber (stgra...@ubuntu.com): > >> strdupa appears to only exist in the standard glibc but at least not in > >> bionic. > >> Replace the two strdupa calls we have by a standard strdup.

Re: [lxc-devel] [PATCH 16/21] Replace strdupa call by standard strdup

2013-01-03 Thread Stéphane Graber
On 01/03/2013 05:00 PM, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): >> strdupa appears to only exist in the standard glibc but at least not in >> bionic. >> Replace the two strdupa calls we have by a standard strdup. >> >> Signed-off-by: Stéphane Graber >> --- >> src/lxc

Re: [lxc-devel] [PATCH 21/21] utmp.c: Avoid duplicate definition of __USE_GNU

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/lxc/utmp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c > index 16d1b5d..f32ed63 100644 > --- a/src/lxc/utmp.c > +++ b/src/lxc/ut

Re: [lxc-devel] [PATCH 19/21] conf.c: Cleanup __S_ISTYPE

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > __S_ISTYPE doesn't exist in all C libraries, so define it if it's missing. > Additionaly, replace one occurence where it wasn't actually needed. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/lxc/conf.c | 7 ++- >

Re: [lxc-devel] [PATCH 18/21] Add local implementation of mntent.h

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Bionic (at least) is missing some of the usual mntent functions. > This adds code defining those that we need when they're missing from the C > library. > > Signed-off-by: Stéphane Graber > --- > src/include/mntent.c | 49 +

Re: [lxc-devel] [PATCH 17/21] caps.h: Rename __errno to ___errno

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > At least bionic defines __errno, And then defines errno in terms of calling __errno() ... > so this was causing a conflict in caps.h > leading to build failure. Renaming to ___errno avoids that duplicate > definition. s/duplicate/conflicting/ :)

Re: [lxc-devel] [PATCH 16/21] Replace strdupa call by standard strdup

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > strdupa appears to only exist in the standard glibc but at least not in > bionic. > Replace the two strdupa calls we have by a standard strdup. > > Signed-off-by: Stéphane Graber > --- > src/lxc/confile.c | 14 -- > 1 file changed, 12

Re: [lxc-devel] [PATCH 15/21] Add a bionic_alphasort function on bionic

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > alphasort doesn't have the right signature on bionic which causes the build to > fail. This implements a new bionic_alphasort function when building on bionic > providing the right signature and a functional equivalent of glibc's > alphasort. > > T

Re: [lxc-devel] [PATCH 14/21] Make utmpx.h optional

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > This adds code detecting the presence of utmpx.h and in its absence, turns the > utmp related functions into no-ops. > > Signed-off-by: Stéphane Graber > --- > configure.ac | 2 +- > src/lxc/utmp.c | 7 +++ > src/lxc/utmp.h | 9 + >

Re: [lxc-devel] [PATCH 13/21] Workaround missing functions in other libc

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Some libc implementation (bionic) is lacking some of the syscall functions > that are present in the glibc. > > For those, detect at build time the they are missing and implement a minimal > syscall() wrapper that will essentially give the same resu

Re: [lxc-devel] [PATCH 12/21] personality.h: Make the personality code optional

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Some platforms don't have personality.h in their C library, this change > adds buildtime detection for the header and turns off the personality setting > code in those cases. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- >

Re: [lxc-devel] [PATCH 10/21] tty.h: Ship our own minimal openpty.h

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > bionic is missing an openpty() function, so ship our own and only > build it and use it on bionic. > > Signed-off-by: Stéphane Graber > --- > configure.ac | 12 - > src/include/openpty.c | 72 > +++

Re: [lxc-devel] [PATCH 20/21] lxc_unshare: Replace getpw*_r by getpw*

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Bionic and maybe some other libc implementations lack the _r nss functions. > This replaces our current getpwnam_r and getpwuid_r calls by getpwnam and > getpwuid. > > Signed-off-by: Stéphane Graber > --- > src/lxc/lxc_unshare.c | 15 -

Re: [lxc-devel] [PATCH] tests/Makefile.am: Update for bionic

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > -lpthread doesn't exist and isn't necessary on bionic. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/tests/Makefile.am | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/tests/Makefile

Re: [lxc-devel] [PATCH 05/21] No need to link against rt and util on bionic

2013-01-03 Thread Stéphane Graber
On 01/03/2013 01:10 PM, Serge Hallyn wrote: > Quoting Stéphane Graber (stgra...@ubuntu.com): >> When building on bionic, -lrt and -lutil only cause a build failure. >> Dropping those fixes the build, so it appears that the symbols are defined >> in the main library. >> >> This commit moves -lrt and

[lxc-devel] [PATCH] tests/Makefile.am: Update for bionic

2013-01-03 Thread Stéphane Graber
-lpthread doesn't exist and isn't necessary on bionic. Signed-off-by: Stéphane Graber --- src/tests/Makefile.am | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index fa61f70..90fcafe 100644 --- a/src/tests/Makefile.am +++ b/

Re: [lxc-devel] [PATCH 07/21] Add/remove extra includes

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > While cross-building with bionic, a number of failures were triggered by some > missing includes and in a few cases by extra unused includes. > > This commit updates the various headers based on those observations. > > Signed-off-by: Stéphane Grabe

Re: [lxc-devel] [PATCH 01/21] configure.ac: Add code to detect bionic C library

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > This adds a new IS_BIONIC define that can be used to detect whether we are > building with eglibc or with bionic. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > configure.ac | 14 ++ > 1 file changed, 14 insert

Re: [lxc-devel] [PATCH 04/21] Support both getline and fgetln

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Some libc implementations don't have the getline function but instead > have an equivalent fgetln function. > > Add code to detect both and use whatever is available. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > configu

Re: [lxc-devel] [PATCH 02/21] configure.ac: Cleanup, comments, indent, ...

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > This commit doesn't do any functional change to configure.ac but does a fair > amount of cleaning up. > > It re-orders the various blocks by type (options, checks, expands, ...). > It also consistently uses tabs for indents and moves all user visibl

Re: [lxc-devel] [PATCH 05/21] No need to link against rt and util on bionic

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > When building on bionic, -lrt and -lutil only cause a build failure. > Dropping those fixes the build, so it appears that the symbols are defined > in the main library. > > This commit moves -lrt and -lutil under a !IS_BIONIC check. > > Signed-off-

Re: [lxc-devel] [PATCH 09/21] clone: Support bionic's clone() defintion

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > The clone() call in bionic is very slightly different. > This updates namespace.h to support both glibc and bionic. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/lxc/namespace.h | 7 +++ > 1 file changed, 7 insert

Re: [lxc-devel] [PATCH 11/21] Don't hard depend on capability.h and libcap

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > In the effort to make LXC work with non-standard Linux distros, this change > allows for the user to build LXC without capability support. > > This effectively will cause LXC not to link against libcap and will turn all > the _cap_ functions into no

Re: [lxc-devel] [PATCH 08/21] conf.c: Define LO_FLAGS_AUTOCLEAR if it's not

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > LO_FLAGS_AUTOCLEAR isn't defined on bionic, so add an extra ifndef > and set it to its usual value if it's not. > > Signed-off-by: Stéphane Graber Sure - comes from the kernel source anyway. Acked-by: Serge E. Hallyn > --- > src/lxc/conf.c | 4

Re: [lxc-devel] [PATCH 03/21] Replace all reference to ushort by unsigned short

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > ushort appears to be a glibc specific type which doesn't exist in > bionic, this commit simply replace all occurences by the equivalent > unsigned short type. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/lxc/conf.h

Re: [lxc-devel] [PATCH 06/21] Replace get_current_dir_name by getcwd

2013-01-03 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > get_current_dir_name appears to be specific to glibc. Replace that call > by an equivalent getcwd call. > > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/lxc/lxc_attach.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

[lxc-devel] [PATCH 13/21] Workaround missing functions in other libc

2013-01-03 Thread Stéphane Graber
Some libc implementation (bionic) is lacking some of the syscall functions that are present in the glibc. For those, detect at build time the they are missing and implement a minimal syscall() wrapper that will essentially give the same result as the glibc function. Signed-off-by: Stéphane Graber

[lxc-devel] [PATCH 15/21] Add a bionic_alphasort function on bionic

2013-01-03 Thread Stéphane Graber
alphasort doesn't have the right signature on bionic which causes the build to fail. This implements a new bionic_alphasort function when building on bionic providing the right signature and a functional equivalent of glibc's alphasort. This signature problem with alphasort was fixed in upstream b

[lxc-devel] [PATCH 04/21] Support both getline and fgetln

2013-01-03 Thread Stéphane Graber
Some libc implementations don't have the getline function but instead have an equivalent fgetln function. Add code to detect both and use whatever is available. Signed-off-by: Stéphane Graber --- configure.ac | 3 +++ src/lxc/attach.c | 5 + src/lxc/parse.c | 5 + 3 files changed,

[lxc-devel] [PATCH 19/21] conf.c: Cleanup __S_ISTYPE

2013-01-03 Thread Stéphane Graber
__S_ISTYPE doesn't exist in all C libraries, so define it if it's missing. Additionaly, replace one occurence where it wasn't actually needed. Signed-off-by: Stéphane Graber --- src/lxc/conf.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf

[lxc-devel] [PATCH 16/21] Replace strdupa call by standard strdup

2013-01-03 Thread Stéphane Graber
strdupa appears to only exist in the standard glibc but at least not in bionic. Replace the two strdupa calls we have by a standard strdup. Signed-off-by: Stéphane Graber --- src/lxc/confile.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lxc/confile.c b

[lxc-devel] [PATCH 17/21] caps.h: Rename __errno to ___errno

2013-01-03 Thread Stéphane Graber
At least bionic defines __errno, so this was causing a conflict in caps.h leading to build failure. Renaming to ___errno avoids that duplicate definition. Signed-off-by: Stéphane Graber --- configure.ac | 5 - src/lxc/caps.h | 12 ++-- 2 files changed, 10 insertions(+), 7 deletion

[lxc-devel] [PATCH 01/21] configure.ac: Add code to detect bionic C library

2013-01-03 Thread Stéphane Graber
This adds a new IS_BIONIC define that can be used to detect whether we are building with eglibc or with bionic. Signed-off-by: Stéphane Graber --- configure.ac | 14 ++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 2add6a3..1a3f271 100644 --- a/conf

[lxc-devel] [PATCH 07/21] Add/remove extra includes

2013-01-03 Thread Stéphane Graber
While cross-building with bionic, a number of failures were triggered by some missing includes and in a few cases by extra unused includes. This commit updates the various headers based on those observations. Signed-off-by: Stéphane Graber --- src/lxc/conf.h | 1 + src/lxc/confile.c | 1

[lxc-devel] [PATCH 10/21] tty.h: Ship our own minimal openpty.h

2013-01-03 Thread Stéphane Graber
bionic is missing an openpty() function, so ship our own and only build it and use it on bionic. Signed-off-by: Stéphane Graber --- configure.ac | 12 - src/include/openpty.c | 72 +++ src/include/openpty.h | 14 ++ src/lxc

[lxc-devel] [PATCH 14/21] Make utmpx.h optional

2013-01-03 Thread Stéphane Graber
This adds code detecting the presence of utmpx.h and in its absence, turns the utmp related functions into no-ops. Signed-off-by: Stéphane Graber --- configure.ac | 2 +- src/lxc/utmp.c | 7 +++ src/lxc/utmp.h | 9 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/co

[lxc-devel] [PATCH 20/21] lxc_unshare: Replace getpw*_r by getpw*

2013-01-03 Thread Stéphane Graber
Bionic and maybe some other libc implementations lack the _r nss functions. This replaces our current getpwnam_r and getpwuid_r calls by getpwnam and getpwuid. Signed-off-by: Stéphane Graber --- src/lxc/lxc_unshare.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --g

[lxc-devel] [PATCH 05/21] No need to link against rt and util on bionic

2013-01-03 Thread Stéphane Graber
When building on bionic, -lrt and -lutil only cause a build failure. Dropping those fixes the build, so it appears that the symbols are defined in the main library. This commit moves -lrt and -lutil under a !IS_BIONIC check. Signed-off-by: Stéphane Graber --- src/lxc/Makefile.am | 12 ++

[lxc-devel] [PATCH 18/21] Add local implementation of mntent.h

2013-01-03 Thread Stéphane Graber
Bionic (at least) is missing some of the usual mntent functions. This adds code defining those that we need when they're missing from the C library. Signed-off-by: Stéphane Graber --- src/include/mntent.c | 49 + src/include/mntent.h | 18 +

[lxc-devel] [PATCH 12/21] personality.h: Make the personality code optional

2013-01-03 Thread Stéphane Graber
Some platforms don't have personality.h in their C library, this change adds buildtime detection for the header and turns off the personality setting code in those cases. Signed-off-by: Stéphane Graber --- configure.ac | 4 ++-- src/lxc/conf.c | 7 ++- src/lxc/confile.c|

[lxc-devel] [PATCH 21/21] utmp.c: Avoid duplicate definition of __USE_GNU

2013-01-03 Thread Stéphane Graber
Signed-off-by: Stéphane Graber --- src/lxc/utmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c index 16d1b5d..f32ed63 100644 --- a/src/lxc/utmp.c +++ b/src/lxc/utmp.c @@ -42,7 +42,9 @@ #include "lxc.h" #include "log.h" +#ifndef __USE_GNU #define __USE

[lxc-devel] [PATCH 02/21] configure.ac: Cleanup, comments, indent, ...

2013-01-03 Thread Stéphane Graber
This commit doesn't do any functional change to configure.ac but does a fair amount of cleaning up. It re-orders the various blocks by type (options, checks, expands, ...). It also consistently uses tabs for indents and moves all user visible strings between double-quotes (makes my syntax highligh

[lxc-devel] [PATCH 11/21] Don't hard depend on capability.h and libcap

2013-01-03 Thread Stéphane Graber
In the effort to make LXC work with non-standard Linux distros, this change allows for the user to build LXC without capability support. This effectively will cause LXC not to link against libcap and will turn all the _cap_ functions into no-ops. Signed-off-by: Stéphane Graber --- src/lxc/caps.

[lxc-devel] [PATCH 09/21] clone: Support bionic's clone() defintion

2013-01-03 Thread Stéphane Graber
The clone() call in bionic is very slightly different. This updates namespace.h to support both glibc and bionic. Signed-off-by: Stéphane Graber --- src/lxc/namespace.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/lxc/namespace.h b/src/lxc/namespace.h index 109e0bb..e35de60 100

[lxc-devel] [PATCH 08/21] conf.c: Define LO_FLAGS_AUTOCLEAR if it's not

2013-01-03 Thread Stéphane Graber
LO_FLAGS_AUTOCLEAR isn't defined on bionic, so add an extra ifndef and set it to its usual value if it's not. Signed-off-by: Stéphane Graber --- src/lxc/conf.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 4f041dc..7e1d10a 100644 --- a/src/lxc/conf

[lxc-devel] [PATCH 00/21] Enable building with bionic (Android C library)

2013-01-03 Thread Stéphane Graber
The following changes allow for LXC to be built on bionic using the Android NDK. The code has been test built with both eglibc and bionic and builds cleanly. I unfortunately can't test the resulting Android binaries myself, so hopefully someone can. Quite a few of those changes is simple detectio

[lxc-devel] [PATCH 06/21] Replace get_current_dir_name by getcwd

2013-01-03 Thread Stéphane Graber
get_current_dir_name appears to be specific to glibc. Replace that call by an equivalent getcwd call. Signed-off-by: Stéphane Graber --- src/lxc/lxc_attach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_attach.c b/src/lxc/lxc_attach.c index e292bc4..ba98d73 100

[lxc-devel] [PATCH 03/21] Replace all reference to ushort by unsigned short

2013-01-03 Thread Stéphane Graber
ushort appears to be a glibc specific type which doesn't exist in bionic, this commit simply replace all occurences by the equivalent unsigned short type. Signed-off-by: Stéphane Graber --- src/lxc/conf.h| 4 ++-- src/lxc/network.c | 2 +- src/lxc/network.h | 2 +- src/lxc/nl.c | 2 +-