Re: [lxc-devel] [PATCH] Support MS_SHARED / - issues calling MAKEDEV

2013-01-08 Thread Michael H. Warfield
On Tue, 2013-01-08 at 15:40 -0500, Michael H. Warfield wrote: > On Wed, 2013-01-09 at 04:31 +0800, Alexander Vladimirov wrote: > > Well, properly placed hook could do all the things MAKEDEV supposed to do. > > And would give us the flexibility to worry about things like serial > devices or some US

Re: [lxc-devel] [PATCH] Support MS_SHARED / - issues calling MAKEDEV

2013-01-08 Thread Michael H. Warfield
On Wed, 2013-01-09 at 04:31 +0800, Alexander Vladimirov wrote: > Well, properly placed hook could do all the things MAKEDEV supposed to do. And would give us the flexibility to worry about things like serial devices or some USB devices or a few other things that would ordinarily be populated by ud

Re: [lxc-devel] [PATCH] Support MS_SHARED / - issues calling MAKEDEV

2013-01-08 Thread Alexander Vladimirov
Well, properly placed hook could do all the things MAKEDEV supposed to do. 2013/1/9 Serge Hallyn : > Quoting Michael H. Warfield (m...@wittsend.com): >> More on the MAKEDEV debacle... > ... >> This whole thing with MAKEDEV is looking more and more like a morass >> with no way to cleanly resolve it

Re: [lxc-devel] [PATCH] Support MS_SHARED / - issues calling MAKEDEV

2013-01-08 Thread Serge Hallyn
Quoting Michael H. Warfield (m...@wittsend.com): > More on the MAKEDEV debacle... ... > This whole thing with MAKEDEV is looking more and more like a morass > with no way to cleanly resolve it. It sounds like consensus is it should be dropped from staging?

Re: [lxc-devel] [PATCH] Support MS_SHARED / - issues calling MAKEDEV

2013-01-08 Thread Michael H. Warfield
More on the MAKEDEV debacle... On Mon, 2013-01-07 at 09:48 -0600, Serge Hallyn wrote: > Quoting Michael H. Warfield (m...@wittsend.com): > > On Sun, 2013-01-06 at 06:39 +0800, Alexander Vladimirov wrote: > > > It is a separate package in Arch Linux and I dont have it installed on > > > the host, a

Re: [lxc-devel] [PATCH 24/24] Makefile.am: Add missing liblxc symlink

2013-01-08 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn > --- > src/lxc/Makefile.am | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am > index 8bc7b4b..85d8e77 100644 > --- a/src/lxc/Makefile.am

Re: [lxc-devel] [PATCH 22/24] Don't call setup_mount_entries if the list is empty

2013-01-08 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > There's no good reason to call setup_mount_entries if we don't have any > lxc.mount.entry. This also avoids an issue on bionic where the tmpfile() > call in setup_mount_entries requires the presence of /tmp which isn't the > case by default. > > Sig

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

2013-01-08 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 Acked-by: Serge E. Hallyn > --- > src/lxc/lxc

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

2013-01-08 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 Acked-by: Serge E. Hallyn I could see someone in the futu

Re: [lxc-devel] [PATCH] Set umask before populating /dev and restore it after.

2013-01-08 Thread Michael H. Warfield
That does, in fact, catch my case of setting autodev on with a non-systemd container (F14 in my case). That case is shot. Good catch. Regards, Mike On Tue, 2013-01-08 at 09:08 +0800, Alexander Vladimirov wrote: > According to docs, mknod clears each permission bit whose > corresponding bit in t

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

2013-01-08 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 Acked-by: Serge E. Hallyn > --- > src/lxc/confile.c | 23 +++

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

2013-01-08 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 Acked-by: Serge E. Hallyn > --- > configure.ac | 2 +- > src/lxc/utmp.c | 9 + > s

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

2013-01-08 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 through a new > --disable-capabilities option to configure. > > This effectively will cause LXC not to link aga

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

2013-01-08 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 My only concern here is that you switch on I

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

2013-01-08 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. > > Signed-off-by: Stép

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

2013-01-08 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 | 16 > 1 file changed, 16 inse

Re: [lxc-devel] [PATCH 23/24] create rslave chroot any time pivot_root fails with -EINVAL

2013-01-08 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > From: Serge Hallyn > > Note we still need the function to detect a MS_SHARED /, bc > if we detect that then we need to umount the chroot tmpfs > mount which lxc-start created, whose mount was forwarded to > the host mounts namespace. Wait I'm conf

Re: [lxc-devel] [PATCH] oracle template: use url arg to wget repo file

2013-01-08 Thread Stéphane Graber
On 01/08/2013 12:01 PM, Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): >> Signed-off-by: Dwight Engen > > Acked-by: Serge E. Hallyn Pushed to staging. >> --- >> templates/lxc-oracle.in | 10 +++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) >> >> diff --git

Re: [lxc-devel] [PATCH] oracle template: drop additional capabilities

2013-01-08 Thread Stéphane Graber
On 01/08/2013 11:59 AM, Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): >> Signed-off-by: Dwight Engen > > Acked-by: Serge E. Hallyn Pushed to staging. > You might want to add a pointer to the capabilities(7) manpage for > more details. > >> --- >> templates/lxc-oracle.

Re: [lxc-devel] [PATCH] Set umask before populating /dev and restore it after.

2013-01-08 Thread Stéphane Graber
On 01/07/2013 10:26 PM, Serge Hallyn wrote: > Quoting Alexander Vladimirov (alexander.idkfa.vladimi...@gmail.com): >> According to docs, mknod clears each permission bit whose >> corresponding bit in the process umask is set, so we should fix it >> before creating device nodes. >> --- > > d'oh. T

Re: [lxc-devel] [PATCH] document lxc-console escape sequence and argument

2013-01-08 Thread Stéphane Graber
On 01/04/2013 03:23 PM, Dwight Engen wrote: > Signed-off-by: Dwight Engen Acked-by: Stéphane Graber > --- > doc/lxc-console.sgml.in | 23 +-- > 1 file changed, 21 insertions(+), 2 deletions(-) > > diff --git a/doc/lxc-console.sgml.in b/doc/lxc-console.sgml.in > index 7b32e

Re: [lxc-devel] [PATCH] Support MS_SHARED /

2013-01-08 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > On Mon, 07 Jan 2013 13:26:44 -0500 > "Michael H. Warfield" wrote: > > > On Tue, 2013-01-08 at 01:32 +0800, Alexander Vladimirov wrote: > > > 2013/1/8 Serge Hallyn : > > > > Quoting Alexander Vladimirov > > > > (alexander.idkfa.vladimi...@gmail.com

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

2013-01-08 Thread Stéphane Graber
-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.am b/src/tests/Makefile.am index fa61f70..90fcafe 100644 --- a/s

[lxc-devel] [PATCH 23/24] create rslave chroot any time pivot_root fails with -EINVAL

2013-01-08 Thread Stéphane Graber
From: Serge Hallyn Note we still need the function to detect a MS_SHARED /, bc if we detect that then we need to umount the chroot tmpfs mount which lxc-start created, whose mount was forwarded to the host mounts namespace. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- src/lxc/con

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- configure.ac | 6 ++--- src/include/openpty.c | 72 +++ src/include/openpty.h |

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

2013-01-08 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 --- configure.ac | 2 +- src/include/mntent.c | 173 +++ s

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

2013-01-08 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 through a new --disable-capabilities option to configure. This effectively will cause LXC not to link against libcap and will turn all the _cap_ functions into no

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

2013-01-08 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 | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/lxc/co

[lxc-devel] [PATCH 24/24] Makefile.am: Add missing liblxc symlink

2013-01-08 Thread Stéphane Graber
Signed-off-by: Stéphane Graber --- src/lxc/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index 8bc7b4b..85d8e77 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -173,6 +173,7 @@ install-exec-local: install-soPROGRAMS

[lxc-devel] [PATCH 22/24] Don't call setup_mount_entries if the list is empty

2013-01-08 Thread Stéphane Graber
There's no good reason to call setup_mount_entries if we don't have any lxc.mount.entry. This also avoids an issue on bionic where the tmpfile() call in setup_mount_entries requires the presence of /tmp which isn't the case by default. Signed-off-by: Stéphane Graber --- src/lxc/conf.c | 2 +- 1

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

2013-01-08 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 19/24] conf.c: Cleanup __S_ISTYPE

2013-01-08 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 Acked-by: Serge E. Hallyn --- src/lxc/conf.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sr

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

2013-01-08 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 | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- configure.ac | 2 +- src/lxc/conf.c | 7 ++-

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

2013-01-08 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 14/24] Make utmpx.h optional

2013-01-08 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 | 9 + src/lxc/utmp.h | 9 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/

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

2013-01-08 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 conflicting definition. Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- src/lxc/caps.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletion

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- src/lxc/conf.h | 1

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- 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

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

2013-01-08 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/include/getline.c | 31 +++ src/inc

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

2013-01-08 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. Signed-off-by: Stéphane Graber --- configure.ac | 116

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- src/lxc/

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

2013-01-08 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 | 16 1 file changed, 16 insertions(+) diff --git a/configure.ac b/configure.ac index 2add6a3..9694d30 100644 --- a/co

[lxc-devel] [PATCH 00/24 v2] Enable building LXC with bionic libc

2013-01-08 Thread Stéphane Graber
Version two of the bionic patchset I submitted last week. This one should address all the issues expressed on the mailing-list. It was also tested on actual hardware with a 2.6.32 and 3.5 kernel running Android 4.1.2. I also did a quick test build on amd64 as well as a crossbuild to eglibc armhf.

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- src/lxc/namespace.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/lxc/namespace.h b/src/lxc/namespace.h

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- src/lxc/conf.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 4f041dc..7e1d10

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

2013-01-08 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 Acked-by: Serge E. Hallyn --- src/lxc/conf.h| 4 ++-- src/lxc/network.c | 2 +- src/lxc/network.h | 2 +-

Re: [lxc-devel] [PATCH] oracle template: use url arg to wget repo file

2013-01-08 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn > --- > templates/lxc-oracle.in | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in > index 6a64a33..4ccec9

Re: [lxc-devel] [PATCH] oracle template: drop additional capabilities

2013-01-08 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): > Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn You might want to add a pointer to the capabilities(7) manpage for more details. > --- > templates/lxc-oracle.in | 26 -- > 1 file changed, 24 insertions(+), 2 delet