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

Stéphane Graber stgraber at ubuntu.com
Tue Jan 8 17:02:50 UTC 2013


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)


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

-- 
1.8.0





More information about the lxc-devel mailing list