[lxc-devel] [PATCH 00/24 v2] Enable building LXC with bionic libc
Stéphane Graber
stgraber at ubuntu.com
Wed Jan 9 15:34:48 UTC 2013
On 01/08/2013 12:02 PM, Stéphane Graber wrote:
> 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.
>
> Major changes from the previous version include:
> - New re-implementation of getline()
> - libcap support won't be silently dropped, --disable-capabilities is not
> required to turn of capabilities support
> - Full replacement for mntent.h as bionic mis-implement part of it (getmntent)
> - Cherry pick of Serge's chroot commit (from the jan.4 branch)
Right, so I'm not going to spam the mailing-list with push notifications
for every single of those commit ;)
I applied all of them to the staging branch with the exception of 23/24
which I still need to check whether it's actually needed and if so, work
with Serge to have a cleaner version of it (at least its commit message).
So as it stands, LXC in staging is buildable against bionic, running it
requires a fair amount of tricks because of the way mounts work on
Android devices. You will also need a kernel with all the usual options,
which is pretty much never the case on stock Android, so it won't be as
simple as grabbing a .apk and installing it, but for anyone familiar
with Android, it's now pretty easy to get containers running.
> Serge Hallyn (1):
> create rslave chroot any time pivot_root fails with -EINVAL
>
> Stéphane Graber (23):
> configure.ac: Add code to detect bionic C library
> configure.ac: Cleanup, comments, indent, ...
> Replace all reference to ushort by unsigned short
> Support both getline and fgetln
> No need to link against rt and util on bionic
> Replace get_current_dir_name by getcwd
> Add/remove extra includes
> conf.c: Define LO_FLAGS_AUTOCLEAR if it's not
> clone: Support bionic's clone() defintion
> tty.h: Ship our own minimal openpty.h
> Don't hard depend on capability.h and libcap
> personality.h: Make the personality code optional
> Workaround missing functions in other libc
> Make utmpx.h optional
> Add a bionic_alphasort function on bionic
> Replace strdupa call by standard strdup
> caps.h: Rename __errno to ___errno
> Add local implementation of mntent.h
> conf.c: Cleanup __S_ISTYPE
> lxc_unshare: Replace getpw*_r by getpw*
> tests/Makefile.am: Update for bionic
> Don't call setup_mount_entries if the list is empty
> Makefile.am: Add missing liblxc symlink
>
> configure.ac | 149 ++++++++++++++++++++++++++-----------------
> src/include/getline.c | 31 +++++++++
> src/include/getline.h | 6 ++
> src/include/mntent.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++
> src/include/mntent.h | 32 ++++++++++
> src/include/openpty.c | 72 +++++++++++++++++++++
> src/include/openpty.h | 14 ++++
> src/lxc/Makefile.am | 27 +++++++-
> src/lxc/attach.c | 34 ++++++++--
> src/lxc/caps.c | 6 +-
> src/lxc/caps.h | 36 +++++++++--
> src/lxc/cgroup.c | 7 +-
> src/lxc/conf.c | 105 ++++++++++++++++++++++++------
> src/lxc/conf.h | 5 +-
> src/lxc/confile.c | 40 +++++++++---
> src/lxc/confile.h | 2 +
> src/lxc/console.c | 10 ++-
> src/lxc/lxc_attach.c | 10 ++-
> src/lxc/lxc_unshare.c | 13 ++--
> src/lxc/lxclock.c | 1 +
> src/lxc/namespace.c | 1 -
> src/lxc/namespace.h | 9 ++-
> src/lxc/network.c | 2 +-
> src/lxc/network.h | 2 +-
> src/lxc/nl.c | 2 +-
> src/lxc/nl.h | 2 +-
> src/lxc/parse.c | 23 +++++++
> src/lxc/start.c | 18 +++++-
> src/lxc/stop.c | 2 +-
> src/lxc/utils.c | 2 +-
> src/lxc/utils.h | 2 +-
> src/lxc/utmp.c | 9 +++
> src/lxc/utmp.h | 9 +++
> src/tests/Makefile.am | 7 +-
> 34 files changed, 739 insertions(+), 124 deletions(-)
> create mode 100644 src/include/getline.c
> create mode 100644 src/include/getline.h
> create mode 100644 src/include/mntent.c
> create mode 100644 src/include/mntent.h
> create mode 100644 src/include/openpty.c
> create mode 100644 src/include/openpty.h
>
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130109/84f01078/attachment.pgp>
More information about the lxc-devel
mailing list