-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Makefile.am
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ENABLE_LUA_TRUE@am__append_1 = --with lua
@ENABLE_PYTHON_TRUE@am__append_2 = --with python
subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
- $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/lxc.pc.in $(srcdir)/lxc.spec.in \
- $(top_srcdir)/doc/legacy/lxc-ls.sgml.in \
- $(top_srcdir)/doc/ja/legacy/lxc-ls.sgml.in \
- $(top_srcdir)/src/lxc/legacy/lxc-ls.in COPYING \
- $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
- $(top_srcdir)/config/config.sub \
- $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc.pc.in \
+ $(srcdir)/lxc.spec.in $(top_srcdir)/config/compile \
+ $(top_srcdir)/config/config.guess \
+ $(top_srcdir)/config/config.sub \
+ $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \
+ $(top_srcdir)/doc/ja/legacy/lxc-ls.sgml.in \
+ $(top_srcdir)/doc/legacy/lxc-ls.sgml.in \
+ $(top_srcdir)/src/lxc/legacy/lxc-ls.in AUTHORS COPYING \
+ ChangeLog INSTALL NEWS README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
$(am__post_remove_distdir)
dist-tarZ: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
- --srcdir=.. --prefix="$$dc_install_base" \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-am uninstall uninstall-am uninstall-pcdataDATA
+.PRECIOUS: Makefile
+
install-data-local:
$(MKDIR_P) $(DESTDIR)$(LXCPATH)
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
fi[]dnl
])# PKG_CHECK_MODULES
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_COND_IF -*- Autoconf -*-
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
-fi])
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
sys.exit(sys.hexversion < minverhex)"
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
rm -f conftest.file
])
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am compile \
- config.guess config.sub install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in compile config.guess \
+ config.sub install-sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/apparmor
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/apparmor/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/apparmor/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
+.PRECIOUS: Makefile
+
@ENABLE_APPARMOR_TRUE@install-apparmor:
@ENABLE_APPARMOR_TRUE@ $(MKDIR_P) $(DESTDIR)$(sysconfdir)/apparmor.d/
# Uncomment the line below if you are not using cgmanager
# mount fstype=cgroup -> /sys/fs/cgroup/**,
+ deny /dev/.lxc/proc/** rw,
+ deny /dev/.lxc/sys/** rw,
mount fstype=proc -> /var/cache/lxc/**,
mount fstype=sysfs -> /var/cache/lxc/**,
mount options=(rw,bind),
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/bash
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/bash/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/bash/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-@ENABLE_BASH_FALSE@install-data-local:
@ENABLE_BASH_FALSE@uninstall-local:
+@ENABLE_BASH_FALSE@install-data-local:
clean: clean-am
clean-am: clean-generic mostlyclean-am
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
+.PRECIOUS: Makefile
+
@ENABLE_BASH_TRUE@install-bash:
@ENABLE_BASH_TRUE@ $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2013-06-10'
+timestamp='2014-03-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
exit ;;
- or32:Linux:*:*)
+ or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
exit ;;
esac
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
cat >&2 <<EOF
$0: unable to guess system type
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2013-08-10'
+timestamp='2014-09-11'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or1k | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
mips*-*)
os=-elf
;;
- or1k-*)
- os=-elf
- ;;
or32-*)
os=-coff
;;
scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/etc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = default.conf
am__installdirs = "$(DESTDIR)$(configdir)"
DATA = $(config_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/etc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/etc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-configDATA
+.PRECIOUS: Makefile
+
distclean-local:
@$(RM) -f default.conf
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/init
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/init/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/init/common
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-containers.in $(srcdir)/lxc-net.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-containers lxc-net
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-containers.in \
+ $(srcdir)/lxc-net.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/common/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/init/common/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-pkglibexecSCRIPTS
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/init/systemd
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc.service.in $(srcdir)/lxc-net.service.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc.service lxc-net.service
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-net.service.in \
+ $(srcdir)/lxc.service.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/systemd/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/init/systemd/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
uninstall uninstall-am uninstall-local \
uninstall-pkglibexecSCRIPTS
+.PRECIOUS: Makefile
+
@INIT_SCRIPT_SYSTEMD_TRUE@install-systemd: lxc.service lxc-net.service lxc-devsetup lxc-apparmor-load
@INIT_SCRIPT_SYSTEMD_TRUE@ $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
if [ -x /lib/apparmor/profile-load ]; then
/lib/apparmor/profile-load usr.bin.lxc-start
/lib/apparmor/profile-load lxc-containers
+ elif [ -x /lib/init/apparmor-profile-load ]; then
+ /lib/init/apparmor-profile-load usr.bin.lxc-start
+ /lib/init/apparmor-profile-load lxc-containers
fi
fi
-
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/init/sysvinit
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-containers.in $(srcdir)/lxc-net.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-containers lxc-net
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-containers.in \
+ $(srcdir)/lxc-net.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/sysvinit/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/init/sysvinit/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
+.PRECIOUS: Makefile
+
@INIT_SCRIPT_SYSV_TRUE@install-sysvinit: lxc-containers lxc-net
@INIT_SCRIPT_SYSV_TRUE@ $(MKDIR_P) $(DESTDIR)$(sysconfdir)/$(initdir)
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/init/upstart
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-net.conf.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-net.conf
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-net.conf.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/upstart/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/init/upstart/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
+.PRECIOUS: Makefile
+
@INIT_SCRIPT_UPSTART_TRUE@install-upstart: lxc.conf lxc-instance.conf lxc-net.conf
@INIT_SCRIPT_UPSTART_TRUE@ $(MKDIR_P) $(DESTDIR)$(sysconfdir)/init/
if [ -x /lib/apparmor/profile-load ]; then
/lib/apparmor/profile-load usr.bin.lxc-start
/lib/apparmor/profile-load lxc-containers
+ elif [ -x /lib/init/apparmor-profile-load ]; then
+ /lib/init/apparmor-profile-load usr.bin.lxc-start
+ /lib/init/apparmor-profile-load lxc-containers
fi
fi
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
fi
if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/selinux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(selinuxdir)"
DATA = $(selinux_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/selinux/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/selinux/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags-am uninstall uninstall-am \
uninstall-selinuxDATA
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/sysconfig
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc
am__installdirs = "$(DESTDIR)$(sysconfigdir)"
DATA = $(sysconfig_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/sysconfig/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/sysconfig/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags-am uninstall uninstall-am \
uninstall-sysconfigDATA
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
gentoo.common.conf \
gentoo.moresecure.conf \
gentoo.userns.conf \
+ nesting.conf \
opensuse.common.conf \
opensuse.userns.conf \
oracle.common.conf \
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/templates
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/archlinux.common.conf.in \
- $(srcdir)/archlinux.userns.conf.in \
- $(srcdir)/centos.common.conf.in \
- $(srcdir)/centos.userns.conf.in $(srcdir)/common.conf.in \
- $(srcdir)/debian.common.conf.in \
- $(srcdir)/debian.userns.conf.in \
- $(srcdir)/fedora.common.conf.in \
- $(srcdir)/fedora.userns.conf.in \
- $(srcdir)/gentoo.common.conf.in \
- $(srcdir)/gentoo.moresecure.conf.in \
- $(srcdir)/gentoo.userns.conf.in \
- $(srcdir)/opensuse.common.conf.in \
- $(srcdir)/opensuse.userns.conf.in \
- $(srcdir)/oracle.common.conf.in \
- $(srcdir)/oracle.userns.conf.in $(srcdir)/plamo.common.conf.in \
- $(srcdir)/plamo.userns.conf.in \
- $(srcdir)/ubuntu-cloud.common.conf.in \
- $(srcdir)/ubuntu-cloud.lucid.conf.in \
- $(srcdir)/ubuntu-cloud.userns.conf.in \
- $(srcdir)/ubuntu.common.conf.in $(srcdir)/ubuntu.lucid.conf.in \
- $(srcdir)/ubuntu.userns.conf.in \
- $(srcdir)/openwrt.common.conf.in $(srcdir)/userns.conf.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = archlinux.common.conf archlinux.userns.conf \
centos.common.conf centos.userns.conf common.conf \
debian.common.conf debian.userns.conf fedora.common.conf \
fedora.userns.conf gentoo.common.conf gentoo.moresecure.conf \
- gentoo.userns.conf opensuse.common.conf opensuse.userns.conf \
- oracle.common.conf oracle.userns.conf plamo.common.conf \
- plamo.userns.conf ubuntu-cloud.common.conf \
+ gentoo.userns.conf nesting.conf opensuse.common.conf \
+ opensuse.userns.conf oracle.common.conf oracle.userns.conf \
+ plamo.common.conf plamo.userns.conf ubuntu-cloud.common.conf \
ubuntu-cloud.lucid.conf ubuntu-cloud.userns.conf \
ubuntu.common.conf ubuntu.lucid.conf ubuntu.userns.conf \
openwrt.common.conf userns.conf
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(srcdir)/archlinux.common.conf.in \
+ $(srcdir)/archlinux.userns.conf.in \
+ $(srcdir)/centos.common.conf.in \
+ $(srcdir)/centos.userns.conf.in $(srcdir)/common.conf.in \
+ $(srcdir)/debian.common.conf.in \
+ $(srcdir)/debian.userns.conf.in \
+ $(srcdir)/fedora.common.conf.in \
+ $(srcdir)/fedora.userns.conf.in \
+ $(srcdir)/gentoo.common.conf.in \
+ $(srcdir)/gentoo.moresecure.conf.in \
+ $(srcdir)/gentoo.userns.conf.in $(srcdir)/nesting.conf.in \
+ $(srcdir)/opensuse.common.conf.in \
+ $(srcdir)/opensuse.userns.conf.in \
+ $(srcdir)/openwrt.common.conf.in \
+ $(srcdir)/oracle.common.conf.in \
+ $(srcdir)/oracle.userns.conf.in $(srcdir)/plamo.common.conf.in \
+ $(srcdir)/plamo.userns.conf.in \
+ $(srcdir)/ubuntu-cloud.common.conf.in \
+ $(srcdir)/ubuntu-cloud.lucid.conf.in \
+ $(srcdir)/ubuntu-cloud.userns.conf.in \
+ $(srcdir)/ubuntu.common.conf.in $(srcdir)/ubuntu.lucid.conf.in \
+ $(srcdir)/ubuntu.userns.conf.in $(srcdir)/userns.conf.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
gentoo.common.conf \
gentoo.moresecure.conf \
gentoo.userns.conf \
+ nesting.conf \
opensuse.common.conf \
opensuse.userns.conf \
oracle.common.conf \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/templates/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/templates/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
gentoo.userns.conf: $(top_builddir)/config.status $(srcdir)/gentoo.userns.conf.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+nesting.conf: $(top_builddir)/config.status $(srcdir)/nesting.conf.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
opensuse.common.conf: $(top_builddir)/config.status $(srcdir)/opensuse.common.conf.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
opensuse.userns.conf: $(top_builddir)/config.status $(srcdir)/opensuse.userns.conf.in
pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-templatesconfigDATA
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/templates/common.conf.d
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(templatesconfigdir)"
DATA = $(templatesconfig_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/templates/common.conf.d/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/templates/common.conf.d/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
uninstall uninstall-am uninstall-templatesconfigDATA
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
--- /dev/null
+# Use a profile which allows nesting
+lxc.aa_profile = lxc-container-default-with-nesting
+
+# Add uncovered mounts of proc and sys, else unprivileged users
+# cannot remount those
+
+lxc.mount.entry = proc dev/.lxc/proc proc create=dir,optional 0 0
+lxc.mount.entry = sys dev/.lxc/sys sysfs create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none bind,optional 0 0
lxc.mount.entry = /sys/kernel/security sys/kernel/security none bind,optional 0 0
lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none bind,optional 0 0
+lxc.mount.entry = mqueue dev/mqueue mqueue rw,relatime,create=dir,optional 0 0
# When using LXC with apparmor, the container will be confined by default.
# If you wish for it to instead run unconfined, copy the following line
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = config/yum
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(yumpluginsdir)"
DATA = $(yumplugins_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/yum/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu config/yum/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags-am uninstall uninstall-am \
uninstall-yumpluginsDATA
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for lxc 1.1.3.
+# Generated by GNU Autoconf 2.69 for lxc 1.1.4.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='lxc'
PACKAGE_TARNAME='lxc'
-PACKAGE_VERSION='1.1.3'
-PACKAGE_STRING='lxc 1.1.3'
+PACKAGE_VERSION='1.1.4'
+PACKAGE_STRING='lxc 1.1.4'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures lxc 1.1.3 to adapt to many kinds of systems.
+\`configure' configures lxc 1.1.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of lxc 1.1.3:";;
+ short | recursive ) echo "Configuration of lxc 1.1.4:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-lxc configure 1.1.3
+lxc configure 1.1.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by lxc $as_me 1.1.3, which was
+It was created by lxc $as_me 1.1.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
fi
fi
-LXC_VERSION_BASE=1.1.3
+LXC_VERSION_BASE=1.1.4
LXC_VERSION_MINOR=1
-LXC_VERSION_MICRO=3
+LXC_VERSION_MICRO=4
-LXC_VERSION=1.1.3
+LXC_VERSION=1.1.4
ac_config_headers="$ac_config_headers src/config.h"
-am__api_version='1.14'
+am__api_version='1.15'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
# Define the identity of the package.
PACKAGE='lxc'
- VERSION='1.1.3'
+ VERSION='1.1.4'
cat >>confdefs.h <<_ACEOF
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
fi
fi
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
# shell variable SOURCE.
-# PKG_CHECK_VAR
# Lua module and scripts
if test -z "$ENABLE_LUA_TRUE"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
$as_echo_n "checking Lua version... " >&6; }
- if test -n "$LUA_VERSION"; then
+
+if test -n "$LUA_VERSION"; then
pkg_cv_LUA_VERSION="$LUA_VERSION"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
else
pkg_failed=untried
fi
- LUA_VERSION=$pkg_cv_LUA_VERSION
- if test "x$LUA_VERSION" = x""; then :
- if test -n "$LUA_VERSION"; then
+LUA_VERSION=$pkg_cv_LUA_VERSION
+
+if test "x$LUA_VERSION" = x""; then :
+
+if test -n "$LUA_VERSION"; then
pkg_cv_LUA_VERSION="$LUA_VERSION"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
else
pkg_failed=untried
fi
- LUA_VERSION=$pkg_cv_LUA_VERSION
- if test "x$LUA_VERSION" = x""; then :
+LUA_VERSION=$pkg_cv_LUA_VERSION
+
+if test "x$LUA_VERSION" = x""; then :
fi
fi
fi
# Files requiring some variable expansion
-ac_config_files="$ac_config_files Makefile lxc.pc lxc.spec config/Makefile config/apparmor/Makefile config/selinux/Makefile config/bash/Makefile config/bash/lxc config/init/Makefile config/init/common/Makefile config/init/common/lxc-containers config/init/common/lxc-net config/init/systemd/Makefile config/init/systemd/lxc.service config/init/systemd/lxc-net.service config/init/sysvinit/Makefile config/init/sysvinit/lxc-containers config/init/sysvinit/lxc-net config/init/upstart/lxc-net.conf config/init/upstart/Makefile config/etc/Makefile config/templates/Makefile config/templates/archlinux.common.conf config/templates/archlinux.userns.conf config/templates/centos.common.conf config/templates/centos.userns.conf config/templates/common.conf config/templates/common.conf.d/Makefile config/templates/debian.common.conf config/templates/debian.userns.conf config/templates/fedora.common.conf config/templates/fedora.userns.conf config/templates/gentoo.common.conf config/templates/gentoo.moresecure.conf config/templates/gentoo.userns.conf config/templates/opensuse.common.conf config/templates/opensuse.userns.conf config/templates/oracle.common.conf config/templates/oracle.userns.conf config/templates/plamo.common.conf config/templates/plamo.userns.conf config/templates/ubuntu-cloud.common.conf config/templates/ubuntu-cloud.lucid.conf config/templates/ubuntu-cloud.userns.conf config/templates/ubuntu.common.conf config/templates/ubuntu.lucid.conf config/templates/ubuntu.userns.conf config/templates/openwrt.common.conf config/templates/userns.conf config/yum/Makefile config/sysconfig/Makefile config/sysconfig/lxc doc/Makefile doc/api/Makefile doc/legacy/lxc-ls.sgml doc/lxc-attach.sgml doc/lxc-autostart.sgml doc/lxc-cgroup.sgml doc/lxc-checkconfig.sgml doc/lxc-checkpoint.sgml doc/lxc-clone.sgml doc/lxc-config.sgml doc/lxc-console.sgml doc/lxc-create.sgml doc/lxc-destroy.sgml doc/lxc-device.sgml doc/lxc-execute.sgml doc/lxc-freeze.sgml doc/lxc-info.sgml doc/lxc-ls.sgml doc/lxc-monitor.sgml doc/lxc-snapshot.sgml doc/lxc-start-ephemeral.sgml doc/lxc-start.sgml doc/lxc-stop.sgml doc/lxc-top.sgml doc/lxc-unfreeze.sgml doc/lxc-unshare.sgml doc/lxc-user-nic.sgml doc/lxc-usernsexec.sgml doc/lxc-wait.sgml doc/lxc.conf.sgml doc/lxc.container.conf.sgml doc/lxc.system.conf.sgml doc/lxc-usernet.sgml doc/lxc.sgml doc/common_options.sgml doc/see_also.sgml doc/rootfs/Makefile doc/examples/Makefile doc/examples/lxc-macvlan.conf doc/examples/lxc-vlan.conf doc/examples/lxc-no-netns.conf doc/examples/lxc-empty-netns.conf doc/examples/lxc-phys.conf doc/examples/lxc-veth.conf doc/examples/lxc-complex.conf doc/ja/Makefile doc/ja/legacy/lxc-ls.sgml doc/ja/lxc-attach.sgml doc/ja/lxc-autostart.sgml doc/ja/lxc-cgroup.sgml doc/ja/lxc-checkconfig.sgml doc/ja/lxc-checkpoint.sgml doc/ja/lxc-clone.sgml doc/ja/lxc-config.sgml doc/ja/lxc-console.sgml doc/ja/lxc-create.sgml doc/ja/lxc-destroy.sgml doc/ja/lxc-device.sgml doc/ja/lxc-execute.sgml doc/ja/lxc-freeze.sgml doc/ja/lxc-info.sgml doc/ja/lxc-ls.sgml doc/ja/lxc-monitor.sgml doc/ja/lxc-snapshot.sgml doc/ja/lxc-start-ephemeral.sgml doc/ja/lxc-start.sgml doc/ja/lxc-stop.sgml doc/ja/lxc-top.sgml doc/ja/lxc-unfreeze.sgml doc/ja/lxc-unshare.sgml doc/ja/lxc-user-nic.sgml doc/ja/lxc-usernsexec.sgml doc/ja/lxc-wait.sgml doc/ja/lxc.conf.sgml doc/ja/lxc.container.conf.sgml doc/ja/lxc.system.conf.sgml doc/ja/lxc-usernet.sgml doc/ja/lxc.sgml doc/ja/common_options.sgml doc/ja/see_also.sgml hooks/Makefile templates/Makefile templates/lxc-alpine templates/lxc-altlinux templates/lxc-archlinux templates/lxc-busybox templates/lxc-centos templates/lxc-cirros templates/lxc-debian templates/lxc-download templates/lxc-fedora templates/lxc-gentoo templates/lxc-openmandriva templates/lxc-opensuse templates/lxc-oracle templates/lxc-plamo templates/lxc-sshd templates/lxc-ubuntu templates/lxc-ubuntu-cloud src/Makefile src/lxc/Makefile src/lxc/lxc-checkconfig src/lxc/lxc-ls src/lxc/lxc-start-ephemeral src/lxc/legacy/lxc-ls src/lxc/lxc.functions src/lxc/version.h src/python-lxc/Makefile src/python-lxc/setup.py src/lua-lxc/Makefile src/tests/Makefile src/tests/lxc-test-usernic"
+ac_config_files="$ac_config_files Makefile lxc.pc lxc.spec config/Makefile config/apparmor/Makefile config/selinux/Makefile config/bash/Makefile config/bash/lxc config/init/Makefile config/init/common/Makefile config/init/common/lxc-containers config/init/common/lxc-net config/init/systemd/Makefile config/init/systemd/lxc.service config/init/systemd/lxc-net.service config/init/sysvinit/Makefile config/init/sysvinit/lxc-containers config/init/sysvinit/lxc-net config/init/upstart/lxc-net.conf config/init/upstart/Makefile config/etc/Makefile config/templates/Makefile config/templates/archlinux.common.conf config/templates/archlinux.userns.conf config/templates/centos.common.conf config/templates/centos.userns.conf config/templates/common.conf config/templates/common.conf.d/Makefile config/templates/debian.common.conf config/templates/debian.userns.conf config/templates/fedora.common.conf config/templates/fedora.userns.conf config/templates/gentoo.common.conf config/templates/gentoo.moresecure.conf config/templates/gentoo.userns.conf config/templates/nesting.conf config/templates/opensuse.common.conf config/templates/opensuse.userns.conf config/templates/oracle.common.conf config/templates/oracle.userns.conf config/templates/plamo.common.conf config/templates/plamo.userns.conf config/templates/ubuntu-cloud.common.conf config/templates/ubuntu-cloud.lucid.conf config/templates/ubuntu-cloud.userns.conf config/templates/ubuntu.common.conf config/templates/ubuntu.lucid.conf config/templates/ubuntu.userns.conf config/templates/openwrt.common.conf config/templates/userns.conf config/yum/Makefile config/sysconfig/Makefile config/sysconfig/lxc doc/Makefile doc/api/Makefile doc/legacy/lxc-ls.sgml doc/lxc-attach.sgml doc/lxc-autostart.sgml doc/lxc-cgroup.sgml doc/lxc-checkconfig.sgml doc/lxc-checkpoint.sgml doc/lxc-clone.sgml doc/lxc-config.sgml doc/lxc-console.sgml doc/lxc-create.sgml doc/lxc-destroy.sgml doc/lxc-device.sgml doc/lxc-execute.sgml doc/lxc-freeze.sgml doc/lxc-info.sgml doc/lxc-ls.sgml doc/lxc-monitor.sgml doc/lxc-snapshot.sgml doc/lxc-start-ephemeral.sgml doc/lxc-start.sgml doc/lxc-stop.sgml doc/lxc-top.sgml doc/lxc-unfreeze.sgml doc/lxc-unshare.sgml doc/lxc-user-nic.sgml doc/lxc-usernsexec.sgml doc/lxc-wait.sgml doc/lxc.conf.sgml doc/lxc.container.conf.sgml doc/lxc.system.conf.sgml doc/lxc-usernet.sgml doc/lxc.sgml doc/common_options.sgml doc/see_also.sgml doc/rootfs/Makefile doc/examples/Makefile doc/examples/lxc-macvlan.conf doc/examples/lxc-vlan.conf doc/examples/lxc-no-netns.conf doc/examples/lxc-empty-netns.conf doc/examples/lxc-phys.conf doc/examples/lxc-veth.conf doc/examples/lxc-complex.conf doc/ja/Makefile doc/ja/legacy/lxc-ls.sgml doc/ja/lxc-attach.sgml doc/ja/lxc-autostart.sgml doc/ja/lxc-cgroup.sgml doc/ja/lxc-checkconfig.sgml doc/ja/lxc-checkpoint.sgml doc/ja/lxc-clone.sgml doc/ja/lxc-config.sgml doc/ja/lxc-console.sgml doc/ja/lxc-create.sgml doc/ja/lxc-destroy.sgml doc/ja/lxc-device.sgml doc/ja/lxc-execute.sgml doc/ja/lxc-freeze.sgml doc/ja/lxc-info.sgml doc/ja/lxc-ls.sgml doc/ja/lxc-monitor.sgml doc/ja/lxc-snapshot.sgml doc/ja/lxc-start-ephemeral.sgml doc/ja/lxc-start.sgml doc/ja/lxc-stop.sgml doc/ja/lxc-top.sgml doc/ja/lxc-unfreeze.sgml doc/ja/lxc-unshare.sgml doc/ja/lxc-user-nic.sgml doc/ja/lxc-usernsexec.sgml doc/ja/lxc-wait.sgml doc/ja/lxc.conf.sgml doc/ja/lxc.container.conf.sgml doc/ja/lxc.system.conf.sgml doc/ja/lxc-usernet.sgml doc/ja/lxc.sgml doc/ja/common_options.sgml doc/ja/see_also.sgml hooks/Makefile templates/Makefile templates/lxc-alpine templates/lxc-altlinux templates/lxc-archlinux templates/lxc-busybox templates/lxc-centos templates/lxc-cirros templates/lxc-debian templates/lxc-download templates/lxc-fedora templates/lxc-gentoo templates/lxc-openmandriva templates/lxc-opensuse templates/lxc-oracle templates/lxc-plamo templates/lxc-sshd templates/lxc-ubuntu templates/lxc-ubuntu-cloud src/Makefile src/lxc/Makefile src/lxc/lxc-checkconfig src/lxc/lxc-ls src/lxc/lxc-start-ephemeral src/lxc/legacy/lxc-ls src/lxc/lxc.functions src/lxc/version.h src/python-lxc/Makefile src/python-lxc/setup.py src/lua-lxc/Makefile src/tests/Makefile src/tests/lxc-test-usernic"
ac_config_commands="$ac_config_commands default"
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by lxc $as_me 1.1.3, which was
+This file was extended by lxc $as_me 1.1.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-lxc config.status 1.1.3
+lxc config.status 1.1.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
"config/templates/gentoo.common.conf") CONFIG_FILES="$CONFIG_FILES config/templates/gentoo.common.conf" ;;
"config/templates/gentoo.moresecure.conf") CONFIG_FILES="$CONFIG_FILES config/templates/gentoo.moresecure.conf" ;;
"config/templates/gentoo.userns.conf") CONFIG_FILES="$CONFIG_FILES config/templates/gentoo.userns.conf" ;;
+ "config/templates/nesting.conf") CONFIG_FILES="$CONFIG_FILES config/templates/nesting.conf" ;;
"config/templates/opensuse.common.conf") CONFIG_FILES="$CONFIG_FILES config/templates/opensuse.common.conf" ;;
"config/templates/opensuse.userns.conf") CONFIG_FILES="$CONFIG_FILES config/templates/opensuse.userns.conf" ;;
"config/templates/oracle.common.conf") CONFIG_FILES="$CONFIG_FILES config/templates/oracle.common.conf" ;;
m4_define([lxc_version_major], 1)
m4_define([lxc_version_minor], 1)
-m4_define([lxc_version_micro], 3)
+m4_define([lxc_version_micro], 4)
m4_define([lxc_version_beta], [])
m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
config/templates/gentoo.common.conf
config/templates/gentoo.moresecure.conf
config/templates/gentoo.userns.conf
+ config/templates/nesting.conf
config/templates/opensuse.common.conf
config/templates/opensuse.userns.conf
config/templates/oracle.common.conf
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_TRUE@ lxc-start-ephemeral.1
@ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_FALSE@am__append_4 = legacy/lxc-ls.1
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-attach.sgml.in $(srcdir)/lxc-autostart.sgml.in \
- $(srcdir)/lxc-cgroup.sgml.in $(srcdir)/lxc-checkconfig.sgml.in \
- $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
- $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
- $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
- $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
- $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
- $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
- $(srcdir)/lxc-snapshot.sgml.in \
- $(srcdir)/lxc-start-ephemeral.sgml.in \
- $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
- $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
- $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
- $(srcdir)/lxc-usernsexec.sgml.in $(srcdir)/lxc-wait.sgml.in \
- $(srcdir)/lxc.conf.sgml.in \
- $(srcdir)/lxc.container.conf.sgml.in \
- $(srcdir)/lxc.system.conf.sgml.in \
- $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc.sgml.in \
- $(srcdir)/common_options.sgml.in $(srcdir)/see_also.sgml.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-attach.sgml lxc-autostart.sgml \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(srcdir)/common_options.sgml.in $(srcdir)/lxc-attach.sgml.in \
+ $(srcdir)/lxc-autostart.sgml.in $(srcdir)/lxc-cgroup.sgml.in \
+ $(srcdir)/lxc-checkconfig.sgml.in \
+ $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
+ $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
+ $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
+ $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
+ $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
+ $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
+ $(srcdir)/lxc-snapshot.sgml.in \
+ $(srcdir)/lxc-start-ephemeral.sgml.in \
+ $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
+ $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
+ $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
+ $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc-usernsexec.sgml.in \
+ $(srcdir)/lxc-wait.sgml.in $(srcdir)/lxc.conf.sgml.in \
+ $(srcdir)/lxc.container.conf.sgml.in $(srcdir)/lxc.sgml.in \
+ $(srcdir)/lxc.system.conf.sgml.in $(srcdir)/see_also.sgml.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-man uninstall-man1 uninstall-man5 uninstall-man7
+.PRECIOUS: Makefile
+
@ENABLE_DOCBOOK_TRUE@%.1 : %.sgml
@ENABLE_DOCBOOK_TRUE@ $(db2xman) $<
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = doc/api
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/api/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/api/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am
+.PRECIOUS: Makefile
+
@ENABLE_API_DOCS_TRUE@html: Doxyfile
@ENABLE_API_DOCS_TRUE@ doxygen
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = doc/examples
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-macvlan.conf.in $(srcdir)/lxc-vlan.conf.in \
- $(srcdir)/lxc-no-netns.conf.in \
- $(srcdir)/lxc-empty-netns.conf.in $(srcdir)/lxc-phys.conf.in \
- $(srcdir)/lxc-veth.conf.in $(srcdir)/lxc-complex.conf.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-macvlan.conf lxc-vlan.conf lxc-no-netns.conf \
am__installdirs = "$(DESTDIR)$(pkgexamplesdir)"
DATA = $(noinst_DATA) $(pkgexamples_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-complex.conf.in \
+ $(srcdir)/lxc-empty-netns.conf.in \
+ $(srcdir)/lxc-macvlan.conf.in $(srcdir)/lxc-no-netns.conf.in \
+ $(srcdir)/lxc-phys.conf.in $(srcdir)/lxc-veth.conf.in \
+ $(srcdir)/lxc-vlan.conf.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/examples/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags-am uninstall uninstall-am \
uninstall-pkgexamplesDATA
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_TRUE@ lxc-start-ephemeral.1
@ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_FALSE@am__append_2 = legacy/lxc-ls.1
subdir = doc/ja
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-attach.sgml.in $(srcdir)/lxc-autostart.sgml.in \
- $(srcdir)/lxc-cgroup.sgml.in $(srcdir)/lxc-checkconfig.sgml.in \
- $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
- $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
- $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
- $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
- $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
- $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
- $(srcdir)/lxc-snapshot.sgml.in \
- $(srcdir)/lxc-start-ephemeral.sgml.in \
- $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
- $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
- $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
- $(srcdir)/lxc-usernsexec.sgml.in $(srcdir)/lxc-wait.sgml.in \
- $(srcdir)/lxc.conf.sgml.in \
- $(srcdir)/lxc.container.conf.sgml.in \
- $(srcdir)/lxc.system.conf.sgml.in \
- $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc.sgml.in \
- $(srcdir)/common_options.sgml.in $(srcdir)/see_also.sgml.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-attach.sgml lxc-autostart.sgml \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(srcdir)/common_options.sgml.in $(srcdir)/lxc-attach.sgml.in \
+ $(srcdir)/lxc-autostart.sgml.in $(srcdir)/lxc-cgroup.sgml.in \
+ $(srcdir)/lxc-checkconfig.sgml.in \
+ $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
+ $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
+ $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
+ $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
+ $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
+ $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
+ $(srcdir)/lxc-snapshot.sgml.in \
+ $(srcdir)/lxc-start-ephemeral.sgml.in \
+ $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
+ $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
+ $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
+ $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc-usernsexec.sgml.in \
+ $(srcdir)/lxc-wait.sgml.in $(srcdir)/lxc.conf.sgml.in \
+ $(srcdir)/lxc.container.conf.sgml.in $(srcdir)/lxc.sgml.in \
+ $(srcdir)/lxc.system.conf.sgml.in $(srcdir)/see_also.sgml.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/ja/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/ja/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-man uninstall-man1 uninstall-man5 uninstall-man7
+.PRECIOUS: Makefile
+
@ENABLE_DOCBOOK_TRUE@%.1 : %.sgml
@ENABLE_DOCBOOK_TRUE@ $(db2xman) --encoding=UTF-8 $<
<command>lxc-destroy</command> destroys the system object
previously created by the <command>lxc-create</command> command.
-->
- <command>lxc-destroy</command> は、<command>lxc-create</command> で以前に作成したシステムオブジェクトを破壊します。
+ <command>lxc-destroy</command> は、<command>lxc-create</command> で以前に作成したシステムオブジェクトを削除します。
</para>
</refsect1>
<variablelist>
<varlistentry>
<term>
- <option>-f</option>
+ <option>-f, --force</option>
</term>
<listitem>
<para>
<command>lxc-destroy</command> will be aborted.
-->
コンテナが実行中の場合、まずコンテナを停止させます。
- ã\81\93ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\8c\87å®\9aã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\81§ã\82³ã\83³ã\83\86ã\83\8aã\81\8cå®\9fè¡\8cä¸ã\81®å ´å\90\88ã\80\81<command>lxc-destroy</command> コマンドは実行を中断します。
+ ã\81\93ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\8c\87å®\9aã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\80\81ã\82³ã\83³ã\83\86ã\83\8aã\81\8cå®\9fè¡\8cä¸ã\81®ã\81¨ã\81\8dã\81¯ <command>lxc-destroy</command> コマンドは実行を中断します。
</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><option>-P, --lxcpath=<replaceable>PATH</replaceable></option></term>
- <listitem>
- <para>
- <!--
- Use an alternate container path. The default is @LXCPATH@.
- -->
- コンテナパスを指定します。デフォルトは @LXCPATH@ です。
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</refsect1>
+ &commonoptions;
+
<refsect1>
<title><!-- Diagnostic -->診断</title>
destroyed.You can use the <command>lxc-ls</command>
command to list the available containers on the system.
-->
- 破壊するために指定したコンテナが見つかりません。
- おそらくそのコンテナが存在しないのか、既に破壊された後なのでしょう。
+ 削除するために指定したコンテナが見つかりません。
+ おそらくそのコンテナが存在しないのか、既に削除された後なのでしょう。
<command>lxc-ls</command> コマンドを使って、システム上に存在するコンテナのリストを得ることができます。
</para>
</listitem>
<varlistentry>
<term>
- <option><optional>-P</optional></option>
+ <option><optional>-P, --lxcpath</optional></option>
</term>
<listitem>
<para>
fstab format.
-->
fstab フォーマットの一行と同じフォーマットのマウントポイントの指定をします。
+
+ <!--
+ Moreover lxc add two options to mount.
+ <option>optional</option> don't fail if mount does not work.
+ <option>create=dir</option> or <option>create=file</option>
+ to create dir (or file) when the point will be mounted.
+ -->
+ fstab フォーマットに加えて、LXC ではマウントに対して独自の 2 つのオプションが使えます。
+ <option>optional</option> は、マウントが失敗しても失敗を返さずに無視します。
+ <option>create=dir</option> と <option>create=file</option> は、マウントポイントをマウントする際にディレクトリもしくはファイルを作成します。
</para>
</listitem>
</varlistentry>
<para>
<!--
Comma separated list of cgroup controllers to setup.
- Currently this configration will be ignored when LXC
- uses cgmanager to manage cgroups.
+ If none is specified, all available controllers will be used.
-->
使用する cgroup コントローラのコンマ区切りのリスト。
- 現時点では、LXC が cgroup の管理を cgmanager 経由で行っている場合、この設定は無視されます。
+ 何も指定されていない場合、全ての利用可能なコントローラが使われます。
</para>
</listitem>
</varlistentry>
<variablelist>
<varlistentry>
<term>
- <option>-f</option>
+ <option>-f, --force</option>
</term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term><option>-P, --lxcpath=<replaceable>PATH</replaceable></option></term>
- <listitem>
- <para>
- Use an alternate container path. The default is @LXCPATH@.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</refsect1>
+ &commonoptions;
+
<refsect1>
<title>Diagnostic</title>
<varlistentry>
<term>
- <option><optional>-P</optional></option>
+ <option><optional>-P, --lxcpath</optional></option>
</term>
<listitem>
<para>
container. This is useful to mount /etc, /var or /home for
examples.
</para>
+ <para>
+ NOTE - LXC will generally ensure that mount targets and relative
+ bind-mount sources are properly confined under the container
+ root, to avoid attacks involving over-mounting host directories
+ and files. (Symbolic links in absolute mount sources are ignored)
+ However, if the container configuration first mounts a directory which
+ is under the control of the container user, such as /home/joe, into
+ the container at some <filename>path</filename>, and then mounts
+ under <filename>path</filename>, then a TOCTTOU attack would be
+ possible where the container user modifies a symbolic link under
+ his home directory at just the right time.
+ </para>
<variablelist>
<varlistentry>
<term>
<para>
specify a mount point corresponding to a line in the
fstab format.
+
+ Moreover lxc add two options to mount.
+ <option>optional</option> don't fail if mount does not work.
+ <option>create=dir</option> or <option>create=file</option>
+ to create dir (or file) when the point will be mounted.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
Comma separated list of cgroup controllers to setup.
- Currently this configration will be ignored when LXC
- uses cgmanager to manage cgroups.
+ If none is specified, all available controllers will be used.
</para>
</listitem>
</varlistentry>
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = doc/rootfs
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(READMEdir)"
DATA = $(README_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/rootfs/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/rootfs/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
pdf-am ps ps-am tags-am uninstall uninstall-READMEDATA \
uninstall-am
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = hooks
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hooks/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu hooks/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am uninstall-hooksSCRIPTS
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
%endif
Name: lxc
-Version: 1.1.3
+Version: 1.1.4
Release: %{?beta_rel:0.1.%{beta_rel}}%{?!beta_rel:%{norm_rel}}%{?dist}
URL: http://linuxcontainers.org
Source: http://linuxcontainers.org/downloads/%{name}-%{version}%{?beta_dot}.tar.gz
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = src
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/config.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
host_triplet = @host@
@ENABLE_LUA_TRUE@so_PROGRAMS = core.so$(EXEEXT)
subdir = src/lua-lxc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/config/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lua-lxc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/lua-lxc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
ps ps-am tags tags-am uninstall uninstall-am uninstall-luaDATA \
uninstall-soPROGRAMS
+.PRECIOUS: Makefile
+
@ENABLE_LUA_TRUE@lxc.lua:
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@HAVE_STATIC_LIBCAP_TRUE@am__append_19 = init.lxc.static
@HAVE_FGETLN_TRUE@@HAVE_GETLINE_FALSE@@HAVE_STATIC_LIBCAP_TRUE@am__append_20 = ../include/getline.c
subdir = src/lxc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-checkconfig.in $(srcdir)/lxc-ls.in \
- $(srcdir)/lxc-start-ephemeral.in $(srcdir)/lxc.functions.in \
- $(srcdir)/version.h.in $(top_srcdir)/config/depcomp \
- $(am__noinst_HEADERS_DIST) $(pkginclude_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \
+ $(pkginclude_HEADERS) $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-checkconfig lxc-ls lxc-start-ephemeral \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-checkconfig.in \
+ $(srcdir)/lxc-ls.in $(srcdir)/lxc-start-ephemeral.in \
+ $(srcdir)/lxc.functions.in $(srcdir)/version.h.in \
+ $(top_srcdir)/config/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lxc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/lxc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
uninstall-pkgincludeHEADERS uninstall-pkglibexecPROGRAMS \
uninstall-sbinPROGRAMS uninstall-soPROGRAMS
+.PRECIOUS: Makefile
+
install-exec-local: install-soPROGRAMS
mkdir -p $(DESTDIR)$(datadir)/lxc
lxc_log_define(bdev, lxc);
+struct ovl_rsync_data {
+ struct bdev *orig;
+ struct bdev *new;
+};
+
struct rsync_data_char {
char *src;
char *dest;
s[l-2] = '/';
s[l-1] = '\0';
- execlp("rsync", "rsync", "-aHX", s, dest, (char *)NULL);
+ execlp("rsync", "rsync", "-aHX", "--delete", s, dest, (char *)NULL);
exit(1);
}
*upper = '\0';
upper++;
+ // if delta doesn't yet exist, create it
+ if (mkdir_p(upper, 0755) < 0 && errno != EEXIST)
+ return -22;
+
// overlayfs.v22 or higher needs workdir option
// if upper is /var/lib/lxc/c2/delta0,
// then workdir is /var/lib/lxc/c2/olwork
return rsync_delta(arg);
}
+static int ovl_rsync(struct ovl_rsync_data *data)
+{
+ int ret;
+
+ if (setgid(0) < 0) {
+ ERROR("Failed to setgid to 0");
+ return -1;
+ }
+ if (setgroups(0, NULL) < 0)
+ WARN("Failed to clear groups");
+ if (setuid(0) < 0) {
+ ERROR("Failed to setuid to 0");
+ return -1;
+ }
+
+ if (unshare(CLONE_NEWNS) < 0) {
+ SYSERROR("Unable to unshare mounts ns");
+ return -1;
+ }
+ if (detect_shared_rootfs()) {
+ if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL)) {
+ SYSERROR("Failed to make / rslave");
+ ERROR("Continuing...");
+ }
+ }
+ if (overlayfs_mount(data->orig) < 0) {
+ ERROR("Failed mounting original container fs");
+ return -1;
+ }
+ if (overlayfs_mount(data->new) < 0) {
+ ERROR("Failed mounting new container fs");
+ return -1;
+ }
+ ret = do_rsync(data->orig->dest, data->new->dest);
+
+ overlayfs_umount(data->new);
+ overlayfs_umount(data->orig);
+
+ if (ret < 0) {
+ ERROR("rsyncing %s to %s", data->orig->dest, data->new->dest);
+ return -1;
+ }
+
+ return 0;
+}
+
+static int ovl_rsync_wrapper(void *data)
+{
+ struct ovl_rsync_data *arg = data;
+ return ovl_rsync(arg);
+}
+
+static int ovl_do_rsync(struct bdev *orig, struct bdev *new, struct lxc_conf *conf)
+{
+ int ret = -1;
+ struct ovl_rsync_data rdata;
+
+ rdata.orig = orig;
+ rdata.new = new;
+ if (am_unpriv())
+ ret = userns_exec_1(conf, ovl_rsync_wrapper, &rdata);
+ else
+ ret = ovl_rsync(&rdata);
+ if (ret)
+ ERROR("copying overlayfs delta");
+
+ return ret;
+}
+
static int overlayfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
const char *cname, const char *oldpath, const char *lxcpath, int snap,
uint64_t newsize, struct lxc_conf *conf)
// and needs to be on the same filesystem as upperdir,
// so it's OK for it to be empty.
work = malloc(lastslashidx + 7);
- if (!work)
+ if (!work) {
+ free(delta);
return -1;
+ }
strncpy(work, new->dest, lastslashidx+1);
strcpy(work+lastslashidx, "olwork");
if (mkdir(work, 0755) < 0) {
SYSERROR("error: mkdir %s", work);
+ free(delta);
free(work);
return -1;
}
WARN("Failed to update ownership of %s", work);
free(work);
- struct rsync_data_char rdata;
- rdata.src = odelta;
- rdata.dest = ndelta;
- if (am_unpriv())
- ret = userns_exec_1(conf, rsync_delta_wrapper, &rdata);
- else
- ret = rsync_delta(&rdata);
- if (ret) {
- free(osrc);
- free(ndelta);
- ERROR("copying overlayfs delta");
- return -1;
- }
len = strlen(nsrc) + strlen(ndelta) + 12;
new->src = malloc(len);
if (!new->src) {
free(ndelta);
if (ret < 0 || ret >= len)
return -ENOMEM;
+
+ return ovl_do_rsync(orig, new, conf);
} else {
ERROR("overlayfs clone of %s container is not yet supported",
orig->type);
return true;
return false;
}
+
+bool bdev_destroy(struct lxc_conf *conf)
+{
+ struct bdev *r;
+ bool ret = false;
+
+ r = bdev_init(conf, conf->rootfs.path, conf->rootfs.mount, NULL);
+ if (!r)
+ return ret;
+
+ if (r->ops->destroy(r) == 0)
+ ret = true;
+ bdev_put(r);
+
+ return ret;
+}
+
+int bdev_destroy_wrapper(void *data)
+{
+ struct lxc_conf *conf = data;
+
+ if (setgid(0) < 0) {
+ ERROR("Failed to setgid to 0");
+ return -1;
+ }
+ if (setgroups(0, NULL) < 0)
+ WARN("Failed to clear groups");
+ if (setuid(0) < 0) {
+ ERROR("Failed to setuid to 0");
+ return -1;
+ }
+ if (!bdev_destroy(conf))
+ return -1;
+ else
+ return 0;
+}
+
struct bdev *bdev_create(const char *dest, const char *type,
const char *cname, struct bdev_specs *specs);
void bdev_put(struct bdev *bdev);
+bool bdev_destroy(struct lxc_conf *conf);
+/* callback function to be used with userns_exec_1() */
+int bdev_destroy_wrapper(void *data);
/*
* these are really for qemu-nbd support, as container shutdown
out:
cap_free(caps);
- return 0;
+ return 0;
}
int lxc_caps_up(void)
out:
cap_free(caps);
- return 0;
+ return 0;
}
int lxc_caps_init(void)
extern int lxc_caps_last_cap(void);
#else
static inline int lxc_caps_down(void) {
- return 0;
+ return 0;
}
static inline int lxc_caps_up(void) {
- return 0;
+ return 0;
}
static inline int lxc_caps_init(void) {
- return 0;
+ return 0;
}
static inline int lxc_caps_last_cap(void) {
- return 0;
+ return 0;
}
#endif
if (!path)
return false;
snprintf(path, bufsz, "%s/sys/fs/cgroup", root);
- r = mount("cgroup_root", path, "tmpfs", MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_RELATIME, "size=10240k,mode=755");
+ r = safe_mount("cgroup_root", path, "tmpfs",
+ MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_RELATIME,
+ "size=10240k,mode=755",
+ root);
if (r < 0) {
SYSERROR("could not mount tmpfs to /sys/fs/cgroup in the container");
return false;
static void cgm_dbus_disconnect(void)
{
- if (cgroup_manager) {
- dbus_connection_flush(cgroup_manager->connection);
- dbus_connection_close(cgroup_manager->connection);
- nih_free(cgroup_manager);
- }
- cgroup_manager = NULL;
- cgm_unlock();
+ if (cgroup_manager) {
+ dbus_connection_flush(cgroup_manager->connection);
+ dbus_connection_close(cgroup_manager->connection);
+ nih_free(cgroup_manager);
+ }
+ cgroup_manager = NULL;
+ cgm_unlock();
}
#define CGMANAGER_DBUS_SOCK "unix:path=/sys/fs/cgroup/cgmanager/sock"
}
/* mount a tmpfs there so we can create subdirs */
- if (mount("cgroup", cgpath, "tmpfs", 0, "size=10000,mode=755")) {
+ if (safe_mount("cgroup", cgpath, "tmpfs", 0, "size=10000,mode=755", root)) {
SYSERROR("Failed to mount tmpfs at %s", cgpath);
return false;
}
return false;
}
- if (mount(dirname, cgpath, "none", MS_BIND, 0)) {
+ if (safe_mount(dirname, cgpath, "none", MS_BIND, 0, root)) {
SYSERROR("Failed to bind mount %s to %s", dirname, cgpath);
return false;
}
*stopped = 0;
- len = sizeof(path)-1;
+ /* -2 here because this is an abstract unix socket so it needs a
+ * leading \0, and we null terminate, so it needs a trailing \0.
+ * Although null termination isn't required by the API, we do it anyway
+ * because we print the sockname out sometimes.
+ */
+ len = sizeof(path)-2;
if (fill_sock_name(offset, len, name, lxcpath, hashed_sock_name))
return -1;
char *offset = &path[1];
int len;
- len = sizeof(path)-1;
+ /* -2 here because this is an abstract unix socket so it needs a
+ * leading \0, and we null terminate, so it needs a trailing \0.
+ * Although null termination isn't required by the API, we do it anyway
+ * because we print the sockname out sometimes.
+ */
+ len = sizeof(path)-2;
if (fill_sock_name(offset, len, name, lxcpath, NULL))
return -1;
{ "sys_tty_config", CAP_SYS_TTY_CONFIG },
{ "mknod", CAP_MKNOD },
{ "lease", CAP_LEASE },
+#ifdef CAP_AUDIT_READ
+ { "audit_read", CAP_AUDIT_READ },
+#endif
#ifdef CAP_AUDIT_WRITE
{ "audit_write", CAP_AUDIT_WRITE },
#endif
#ifdef CAP_WAKE_ALARM
{ "wake_alarm", CAP_WAKE_ALARM },
#endif
+#ifdef CAP_BLOCK_SUSPEND
+ { "block_suspend", CAP_BLOCK_SUSPEND },
+#endif
};
#else
static struct caps_opt caps_opt[] = {};
static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_handler *handler)
{
int r;
- size_t i;
+ int i;
static struct {
int match_mask;
int match_flag;
* 2.6.32...
*/
{ LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "proc", "%r/proc", "proc", MS_NODEV|MS_NOEXEC|MS_NOSUID, NULL },
- { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sys/net", "%r/proc/net", NULL, MS_BIND, NULL },
+ /* proc/tty is used as a temporary placeholder for proc/sys/net which we'll move back in a few steps */
+ { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sys/net", "%r/proc/tty", NULL, MS_BIND, NULL },
{ LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sys", "%r/proc/sys", NULL, MS_BIND, NULL },
{ LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, NULL, "%r/proc/sys", NULL, MS_REMOUNT|MS_BIND|MS_RDONLY, NULL },
- { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/net", "%r/proc/sys/net", NULL, MS_MOVE, NULL },
+ { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/tty", "%r/proc/sys/net", NULL, MS_MOVE, NULL },
{ LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sysrq-trigger", "%r/proc/sysrq-trigger", NULL, MS_BIND, NULL },
{ LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, NULL, "%r/proc/sysrq-trigger", NULL, MS_REMOUNT|MS_BIND|MS_RDONLY, NULL },
{ LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_RW, "proc", "%r/proc", "proc", MS_NODEV|MS_NOEXEC|MS_NOSUID, NULL },
if (default_mounts[i].source) {
/* will act like strdup if %r is not present */
- source = lxc_string_replace("%r", conf->rootfs.mount, default_mounts[i].source);
+ source = lxc_string_replace("%r", conf->rootfs.path ? conf->rootfs.mount : "", default_mounts[i].source);
if (!source) {
SYSERROR("memory allocation error");
return -1;
}
}
- if (default_mounts[i].destination) {
- /* will act like strdup if %r is not present */
- destination = lxc_string_replace("%r", conf->rootfs.mount, default_mounts[i].destination);
- if (!destination) {
- saved_errno = errno;
- SYSERROR("memory allocation error");
- free(source);
- errno = saved_errno;
- return -1;
- }
+ if (!default_mounts[i].destination) {
+ ERROR("BUG: auto mounts destination %d was NULL", i);
+ return -1;
+ }
+ /* will act like strdup if %r is not present */
+ destination = lxc_string_replace("%r", conf->rootfs.path ? conf->rootfs.mount : "", default_mounts[i].destination);
+ if (!destination) {
+ saved_errno = errno;
+ SYSERROR("memory allocation error");
+ free(source);
+ errno = saved_errno;
+ return -1;
}
mflags = add_required_remount_flags(source, destination,
default_mounts[i].flags);
- r = mount(source, destination, default_mounts[i].fstype, mflags, default_mounts[i].options);
+ r = safe_mount(source, destination, default_mounts[i].fstype, mflags, default_mounts[i].options, conf->rootfs.path ? conf->rootfs.mount : NULL);
saved_errno = errno;
if (r < 0 && errno == ENOENT) {
INFO("Mount source or target for %s on %s doesn't exist. Skipping.", source, destination);
}
}
- if (!cgroup_mount(conf->rootfs.mount, handler, cg_flags)) {
+ if (!cgroup_mount(conf->rootfs.path ? conf->rootfs.mount : "", handler, cg_flags)) {
SYSERROR("error mounting /sys/fs/cgroup");
return -1;
}
for (i = 0; i < sizeof(dev_symlinks) / sizeof(dev_symlinks[0]); i++) {
const struct dev_symlinks *d = &dev_symlinks[i];
- ret = snprintf(path, sizeof(path), "%s/dev/%s", rootfs->mount, d->name);
+ ret = snprintf(path, sizeof(path), "%s/dev/%s", rootfs->path ? rootfs->mount : "", d->name);
if (ret < 0 || ret >= MAXPATHLEN)
return -1;
* Just create a path for /dev under $lxcpath/$name and in rootfs
* If we hit an error, log it but don't fail yet.
*/
-static int mount_autodev(const char *name, char *root, const char *lxcpath)
+static int mount_autodev(const char *name, const struct lxc_rootfs *rootfs, const char *lxcpath)
{
int ret;
size_t clen;
char *path;
- INFO("Mounting /dev under %s", root);
+ INFO("Mounting container /dev");
- /* $(root) + "/dev/pts" + '\0' */
- clen = strlen(root) + 9;
+ /* $(rootfs->mount) + "/dev/pts" + '\0' */
+ clen = (rootfs->path ? strlen(rootfs->mount) : 0) + 9;
path = alloca(clen);
- ret = snprintf(path, clen, "%s/dev", root);
+ ret = snprintf(path, clen, "%s/dev", rootfs->path ? rootfs->mount : "");
if (ret < 0 || ret >= clen)
return -1;
if (!dir_exists(path)) {
- WARN("No /dev on container rootfs.");
+ WARN("No /dev in container.");
WARN("Proceeding without autodev setup");
return 0;
}
- if (mount("none", path, "tmpfs", 0, "size=100000,mode=755")) {
+ if (safe_mount("none", path, "tmpfs", 0, "size=100000,mode=755",
+ rootfs->path ? rootfs->mount : NULL)) {
SYSERROR("Failed mounting tmpfs onto %s\n", path);
return false;
}
INFO("Mounted tmpfs onto %s", path);
- ret = snprintf(path, clen, "%s/dev/pts", root);
+ ret = snprintf(path, clen, "%s/dev/pts", rootfs->path ? rootfs->mount : "");
if (ret < 0 || ret >= clen)
return -1;
}
}
- INFO("Mounted /dev under %s", root);
+ INFO("Mounted container /dev");
return 0;
}
{ "console", S_IFCHR | S_IRUSR | S_IWUSR, 5, 1 },
};
-static int fill_autodev(const char *root)
+static int fill_autodev(const struct lxc_rootfs *rootfs)
{
int ret;
char path[MAXPATHLEN];
int i;
mode_t cmask;
- INFO("Creating initial consoles under %s/dev", root);
+ INFO("Creating initial consoles under container /dev");
- ret = snprintf(path, MAXPATHLEN, "%s/dev", root);
+ ret = snprintf(path, MAXPATHLEN, "%s/dev", rootfs->path ? rootfs->mount : "");
if (ret < 0 || ret >= MAXPATHLEN) {
ERROR("Error calculating container /dev location");
return -1;
if (!dir_exists(path)) // ignore, just don't try to fill in
return 0;
- INFO("Populating /dev under %s", root);
+ INFO("Populating container /dev");
cmask = umask(S_IXUSR | S_IXGRP | S_IXOTH);
for (i = 0; i < sizeof(lxc_devs) / sizeof(lxc_devs[0]); i++) {
const struct lxc_devs *d = &lxc_devs[i];
- ret = snprintf(path, MAXPATHLEN, "%s/dev/%s", root, d->name);
+ ret = snprintf(path, MAXPATHLEN, "%s/dev/%s", rootfs->path ? rootfs->mount : "", d->name);
if (ret < 0 || ret >= MAXPATHLEN)
return -1;
ret = mknod(path, d->mode, makedev(d->maj, d->min));
return -1;
}
fclose(pathfile);
- if (mount(hostpath, path, 0, MS_BIND, NULL) != 0) {
+ if (safe_mount(hostpath, path, 0, MS_BIND, NULL,
+ rootfs->path ? rootfs->mount : NULL) != 0) {
SYSERROR("Failed bind mounting device %s from host into container",
d->name);
return -1;
}
umask(cmask);
- INFO("Populated /dev under %s", root);
+ INFO("Populated container /dev");
return 0;
}
return -1;
}
- if (mount(console->name, path, "none", MS_BIND, 0)) {
+ if (safe_mount(console->name, path, "none", MS_BIND, 0, rootfs->mount)) {
ERROR("failed to mount '%s' on '%s'", console->name, path);
return -1;
}
return 0;
}
- if (mount(console->name, lxcpath, "none", MS_BIND, 0)) {
+ if (safe_mount(console->name, lxcpath, "none", MS_BIND, 0, rootfs->mount)) {
ERROR("failed to mount '%s' on '%s'", console->name, lxcpath);
return -1;
}
static int mount_entry(const char *fsname, const char *target,
const char *fstype, unsigned long mountflags,
- const char *data, int optional)
+ const char *data, int optional, const char *rootfs)
{
#ifdef HAVE_STATVFS
struct statvfs sb;
#endif
- if (mount(fsname, target, fstype, mountflags & ~MS_REMOUNT, data)) {
+ if (safe_mount(fsname, target, fstype, mountflags & ~MS_REMOUNT, data, rootfs)) {
if (optional) {
INFO("failed to mount '%s' on '%s' (optional): %s", fsname,
target, strerror(errno));
#endif
if (mount(fsname, target, fstype,
- mountflags | MS_REMOUNT, data)) {
+ mountflags | MS_REMOUNT, data) < 0) {
if (optional) {
INFO("failed to mount '%s' on '%s' (optional): %s",
fsname, target, strerror(errno));
}
}
-static inline int mount_entry_on_systemfs(struct mntent *mntent)
+static int mount_entry_create_dir_file(const struct mntent *mntent,
+ const char* path)
{
- unsigned long mntflags;
- char *mntdata;
- int ret;
+ char *pathdirname = NULL;
+ int ret = 0;
FILE *pathfile = NULL;
- char* pathdirname = NULL;
- bool optional = hasmntopt(mntent, "optional") != NULL;
if (hasmntopt(mntent, "create=dir")) {
- if (mkdir_p(mntent->mnt_dir, 0755) < 0) {
- WARN("Failed to create mount target '%s'", mntent->mnt_dir);
+ if (mkdir_p(path, 0755) < 0) {
+ WARN("Failed to create mount target '%s'", path);
ret = -1;
}
}
- if (hasmntopt(mntent, "create=file") && access(mntent->mnt_dir, F_OK)) {
- pathdirname = strdup(mntent->mnt_dir);
+ if (hasmntopt(mntent, "create=file") && access(path, F_OK)) {
+ pathdirname = strdup(path);
pathdirname = dirname(pathdirname);
if (mkdir_p(pathdirname, 0755) < 0) {
WARN("Failed to create target directory");
}
- pathfile = fopen(mntent->mnt_dir, "wb");
+ pathfile = fopen(path, "wb");
if (!pathfile) {
- WARN("Failed to create mount target '%s'", mntent->mnt_dir);
+ WARN("Failed to create mount target '%s'", path);
ret = -1;
}
else
fclose(pathfile);
}
+ free(pathdirname);
+ return ret;
+}
+
+static inline int mount_entry_on_generic(struct mntent *mntent,
+ const char* path, const char *rootfs)
+{
+ unsigned long mntflags;
+ char *mntdata;
+ int ret;
+ bool optional = hasmntopt(mntent, "optional") != NULL;
+
+ ret = mount_entry_create_dir_file(mntent, path);
+
+ if (ret < 0)
+ return optional ? 0 : -1;
cull_mntent_opt(mntent);
return -1;
}
- ret = mount_entry(mntent->mnt_fsname, mntent->mnt_dir,
- mntent->mnt_type, mntflags, mntdata, optional);
+ ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
+ mntflags, mntdata, optional, rootfs);
- free(pathdirname);
free(mntdata);
return ret;
}
+static inline int mount_entry_on_systemfs(struct mntent *mntent)
+{
+ return mount_entry_on_generic(mntent, mntent->mnt_dir, NULL);
+}
+
static int mount_entry_on_absolute_rootfs(struct mntent *mntent,
const struct lxc_rootfs *rootfs,
const char *lxc_name)
{
char *aux;
char path[MAXPATHLEN];
- unsigned long mntflags;
- char *mntdata;
int r, ret = 0, offset;
const char *lxcpath;
- FILE *pathfile = NULL;
- char *pathdirname = NULL;
- bool optional = hasmntopt(mntent, "optional") != NULL;
lxcpath = lxc_global_config_value("lxc.lxcpath");
if (!lxcpath) {
aux = strstr(mntent->mnt_dir, rootfs->path);
if (!aux) {
WARN("ignoring mount point '%s'", mntent->mnt_dir);
- goto out;
+ return ret;
}
offset = strlen(rootfs->path);
aux + offset);
if (r < 0 || r >= MAXPATHLEN) {
WARN("pathnme too long for '%s'", mntent->mnt_dir);
- ret = -1;
- goto out;
- }
-
- if (hasmntopt(mntent, "create=dir")) {
- if (mkdir_p(path, 0755) < 0) {
- WARN("Failed to create mount target '%s'", path);
- ret = -1;
- }
- }
-
- if (hasmntopt(mntent, "create=file") && access(path, F_OK)) {
- pathdirname = strdup(path);
- pathdirname = dirname(pathdirname);
- if (mkdir_p(pathdirname, 0755) < 0) {
- WARN("Failed to create target directory");
- }
- pathfile = fopen(path, "wb");
- if (!pathfile) {
- WARN("Failed to create mount target '%s'", path);
- ret = -1;
- }
- else
- fclose(pathfile);
- }
- cull_mntent_opt(mntent);
-
- if (parse_mntopts(mntent->mnt_opts, &mntflags, &mntdata) < 0) {
- free(mntdata);
return -1;
}
- ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
- mntflags, mntdata, optional);
-
- free(mntdata);
-
-out:
- free(pathdirname);
- return ret;
+ return mount_entry_on_generic(mntent, path, rootfs->mount);
}
static int mount_entry_on_relative_rootfs(struct mntent *mntent,
const char *rootfs)
{
char path[MAXPATHLEN];
- unsigned long mntflags;
- char *mntdata;
int ret;
- FILE *pathfile = NULL;
- char *pathdirname = NULL;
- bool optional = hasmntopt(mntent, "optional") != NULL;
/* relative to root mount point */
ret = snprintf(path, sizeof(path), "%s/%s", rootfs, mntent->mnt_dir);
return -1;
}
- if (hasmntopt(mntent, "create=dir")) {
- if (mkdir_p(path, 0755) < 0) {
- WARN("Failed to create mount target '%s'", path);
- ret = -1;
- }
- }
-
- if (hasmntopt(mntent, "create=file") && access(path, F_OK)) {
- pathdirname = strdup(path);
- pathdirname = dirname(pathdirname);
- if (mkdir_p(pathdirname, 0755) < 0) {
- WARN("Failed to create target directory");
- }
- pathfile = fopen(path, "wb");
- if (!pathfile) {
- WARN("Failed to create mount target '%s'", path);
- ret = -1;
- }
- else
- fclose(pathfile);
- }
- cull_mntent_opt(mntent);
-
- if (parse_mntopts(mntent->mnt_opts, &mntflags, &mntdata) < 0) {
- free(mntdata);
- return -1;
- }
-
- ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
- mntflags, mntdata, optional);
-
- free(pathdirname);
- free(mntdata);
-
- return ret;
+ return mount_entry_on_generic(mntent, path, rootfs);
}
static int mount_file_entries(const struct lxc_rootfs *rootfs, FILE *file,
{
int mounted;
- if (lxc_conf->rootfs.path == NULL || strlen(lxc_conf->rootfs.path) == 0) {
- if (mount("proc", "/proc", "proc", 0, NULL)) {
- SYSERROR("Failed mounting /proc, proceeding");
- mounted = 0;
- } else
- mounted = 1;
- } else
- mounted = mount_proc_if_needed(lxc_conf->rootfs.mount);
+ mounted = mount_proc_if_needed(lxc_conf->rootfs.path ? lxc_conf->rootfs.mount : "");
if (mounted == -1) {
SYSERROR("failed to mount /proc in the container.");
- return -1;
+ /* continue only if there is no rootfs */
+ if (lxc_conf->rootfs.path)
+ return -1;
} else if (mounted == 1) {
lxc_conf->tmp_umount_proc = 1;
}
fclose(pathfile);
}
- ret = mount(path, destpath, "none", MS_BIND, NULL);
+ ret = safe_mount(path, destpath, "none", MS_BIND, NULL, conf->rootfs.mount);
if (ret < 0)
SYSERROR("Failed to bind lxc.init.static into container");
INFO("lxc.init.static bound into container at %s", path);
int ret;
ret = snprintf(path, MAXPATHLEN, "%s%s",
- conf->rootfs.mount, hookname);
+ conf->rootfs.path ? conf->rootfs.mount : "", hookname);
if (ret < 0 || ret >= MAXPATHLEN)
return false;
ret = stat(path, &st);
if (ret) {
- SYSERROR("Start hook %s not found in container rootfs",
+ SYSERROR("Start hook %s not found in container",
hookname);
return false;
}
}
if (lxc_conf->autodev > 0) {
- if (mount_autodev(name, lxc_conf->rootfs.mount, lxcpath)) {
+ if (mount_autodev(name, &lxc_conf->rootfs, lxcpath)) {
ERROR("failed to mount /dev in the container");
return -1;
}
return -1;
}
- /* Make sure any start hooks are in the rootfs */
+ /* Make sure any start hooks are in the container */
if (!verify_start_hooks(lxc_conf))
return -1;
ERROR("failed to run autodev hooks for container '%s'.", name);
return -1;
}
- if (fill_autodev(lxc_conf->rootfs.mount)) {
+ if (fill_autodev(&lxc_conf->rootfs)) {
ERROR("failed to populate /dev in the container");
return -1;
}
/* Store the memsw_limit location */
memsw_limit = item;
} else if (strcmp(cg->subsystem, "memory.limit_in_bytes") == 0 && memsw_limit != NULL) {
- /* lxc.cgroup.memory.memsw.limit_in_bytes is found before
+ /* lxc.cgroup.memory.memsw.limit_in_bytes is found before
* lxc.cgroup.memory.limit_in_bytes, swap these two items */
item->elem = memsw_limit->elem;
memsw_limit->elem = it->elem;
static int config_loglevel(const char *, const char *, struct lxc_conf *);
static int config_logfile(const char *, const char *, struct lxc_conf *);
static int config_mount(const char *, const char *, struct lxc_conf *);
+static int config_mount_auto(const char *, const char *, struct lxc_conf *);
+static int config_fstab(const char *, const char *, struct lxc_conf *);
static int config_rootfs(const char *, const char *, struct lxc_conf *);
static int config_rootfs_mount(const char *, const char *, struct lxc_conf *);
static int config_rootfs_options(const char *, const char *, struct lxc_conf *);
{ "lxc.id_map", config_idmap },
{ "lxc.loglevel", config_loglevel },
{ "lxc.logfile", config_logfile },
- { "lxc.mount", config_mount },
+ { "lxc.mount.entry", config_mount },
+ { "lxc.mount.auto", config_mount_auto },
+ { "lxc.mount", config_fstab },
{ "lxc.rootfs.mount", config_rootfs_mount },
{ "lxc.rootfs.options", config_rootfs_options },
{ "lxc.rootfs", config_rootfs },
/* in case several groups are specified in a single line
* split these groups in a single element for the list */
for (groupptr = groups;;groupptr = NULL) {
- token = strtok_r(groupptr, " \t", &sptr);
- if (!token) {
+ token = strtok_r(groupptr, " \t", &sptr);
+ if (!token) {
ret = 0;
- break;
+ break;
}
grouplist = malloc(sizeof(*grouplist));
}
lxc_list_add_tail(&lxc_conf->groups, grouplist);
- }
+ }
free(groups);
{ "cgroup-full:mixed", LXC_AUTO_CGROUP_MASK, LXC_AUTO_CGROUP_FULL_MIXED },
{ "cgroup-full:ro", LXC_AUTO_CGROUP_MASK, LXC_AUTO_CGROUP_FULL_RO },
{ "cgroup-full:rw", LXC_AUTO_CGROUP_MASK, LXC_AUTO_CGROUP_FULL_RW },
- /* NB: For adding anything that ist just a single on/off, but has
+ /* NB: For adding anything that is just a single on/off, but has
* no options: keep mask and flag identical and just define the
* enum value as an unused bit so far
*/
}
for (autoptr = autos; ; autoptr = NULL) {
- token = strtok_r(autoptr, " \t", &sptr);
- if (!token) {
+ token = strtok_r(autoptr, " \t", &sptr);
+ if (!token) {
ret = 0;
- break;
+ break;
}
for (i = 0; allowed_auto_mounts[i].token; i++) {
lxc_conf->auto_mounts &= ~allowed_auto_mounts[i].mask;
lxc_conf->auto_mounts |= allowed_auto_mounts[i].flag;
- }
+ }
free(autos);
return ret;
}
-/*
- * TODO
- * This fn is handling lxc.mount, lxc.mount.entry, and lxc.mount.auto.
- * It should probably be split into 3 separate functions indexed by
- * the config[] entries at top.
- */
static int config_mount(const char *key, const char *value,
struct lxc_conf *lxc_conf)
{
- char *fstab_token = "lxc.mount";
- char *token = "lxc.mount.entry";
- char *auto_token = "lxc.mount.auto";
- char *subkey;
char *mntelem;
struct lxc_list *mntlist;
- subkey = strstr(key, token);
-
- if (!subkey) {
- subkey = strstr(key, auto_token);
-
- if (!subkey) {
- subkey = strstr(key, fstab_token);
-
- if (!subkey)
- return -1;
-
- return config_fstab(key, value, lxc_conf);
- }
-
- return config_mount_auto(key, value, lxc_conf);
- }
-
- /* At this point we definitely have key = lxc.mount.entry */
if (!value || strlen(value) == 0)
return lxc_clear_mount_entries(lxc_conf);
/* in case several capability keep is specified in a single line
* split these caps in a single element for the list */
for (keepptr = keepcaps;;keepptr = NULL) {
- token = strtok_r(keepptr, " \t", &sptr);
- if (!token) {
+ token = strtok_r(keepptr, " \t", &sptr);
+ if (!token) {
ret = 0;
- break;
+ break;
}
if (!strcmp(token, "none"))
}
lxc_list_add_tail(&lxc_conf->keepcaps, keeplist);
- }
+ }
free(keepcaps);
/* in case several capability drop is specified in a single line
* split these caps in a single element for the list */
for (dropptr = dropcaps;;dropptr = NULL) {
- token = strtok_r(dropptr, " \t", &sptr);
- if (!token) {
+ token = strtok_r(dropptr, " \t", &sptr);
+ if (!token) {
ret = 0;
- break;
+ break;
}
droplist = malloc(sizeof(*droplist));
}
lxc_list_add_tail(&lxc_conf->caps, droplist);
- }
+ }
free(dropcaps);
/* for the sake of backward compatibility, drop all privileges
if none is specified */
for (i = 0; all_privs[i].token; i++) {
- *flags |= all_privs[i].flag;
+ *flags |= all_privs[i].flag;
}
return 0;
}
request->nlmsghdr.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
request->nlmsghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
- request->nlmsghdr.nlmsg_type = GENL_ID_CTRL;
+ request->nlmsghdr.nlmsg_type = GENL_ID_CTRL;
genlmsghdr = NLMSG_DATA(&request->nlmsghdr);
- genlmsghdr->cmd = CTRL_CMD_GETFAMILY;
+ genlmsghdr->cmd = CTRL_CMD_GETFAMILY;
ret = netlink_open(&handler, NETLINK_GENERIC);
if (ret)
static inline int genetlink_len(const struct genlmsg *genlmsg)
{
- return ((genlmsg->nlmsghdr.nlmsg_len) - GENL_HDRLEN - NLMSG_HDRLEN);
+ return ((genlmsg->nlmsghdr.nlmsg_len) - GENL_HDRLEN - NLMSG_HDRLEN);
}
/*
struct lxc_list *prev,
struct lxc_list *next)
{
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
+ next->prev = new;
+ new->next = next;
+ new->prev = prev;
+ prev->next = new;
}
static inline void lxc_list_add(struct lxc_list *head, struct lxc_list *list)
echo -n "Veth pair device: " && is_enabled CONFIG_VETH
echo -n "Macvlan: " && is_enabled CONFIG_MACVLAN
echo -n "Vlan: " && is_enabled CONFIG_VLAN_8021Q
+echo -n "Bridges: " && is_enabled CONFIG_BRIDGE
+echo -n "Advanced netfilter: " && is_enabled CONFIG_NETFILTER_ADVANCED
+echo -n "CONFIG_NF_NAT_IPV4: " && is_enabled CONFIG_NF_NAT_IPV4
+echo -n "CONFIG_NF_NAT_IPV6: " && is_enabled CONFIG_NF_NAT_IPV6
+echo -n "CONFIG_IP_NF_TARGET_MASQUERADE: " && is_enabled CONFIG_IP_NF_TARGET_MASQUERADE
+echo -n "CONFIG_IP6_NF_TARGET_MASQUERADE: " && is_enabled CONFIG_IP6_NF_TARGET_MASQUERADE
+echo -n "CONFIG_NETFILTER_XT_TARGET_CHECKSUM: " && is_enabled CONFIG_NETFILTER_XT_TARGET_CHECKSUM
+
+echo
+echo "--- Checkpoint/Restore ---"
+echo -n "checkpoint restore: " && is_enabled CONFIG_CHECKPOINT_RESTORE
+echo -n "CONFIG_FHANDLE: " && is_enabled CONFIG_FHANDLE
+echo -n "CONFIG_EVENTFD: " && is_enabled CONFIG_EVENTFD
+echo -n "CONFIG_EPOLL: " && is_enabled CONFIG_EPOLL
+echo -n "CONFIG_UNIX_DIAG: " && is_enabled CONFIG_UNIX_DIAG
+echo -n "CONFIG_INET_DIAG: " && is_enabled CONFIG_INET_DIAG
+echo -n "CONFIG_PACKET_DIAG: " && is_enabled CONFIG_PACKET_DIAG
+echo -n "CONFIG_NETLINK_DIAG: " && is_enabled CONFIG_NETLINK_DIAG
+
echo -n "File capabilities: " && \
( [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ] && \
is_enabled CONFIG_SECURITY_FILE_CAPABILITIES ) || \
import gettext
import lxc
import os
-import pwd
import sys
import subprocess
import tempfile
if args.user:
username = args.user
- user = pwd.getpwnam(username)
- os.setgid(user.pw_gid)
- os.initgroups(user.pw_name, user.pw_gid)
- os.setuid(user.pw_uid)
- os.chdir(user.pw_dir)
- os.environ['HOME'] = user.pw_dir
+ line = subprocess.check_output(
+ ["getent", "passwd", username],
+ universal_newlines=True).rstrip("\n")
+ _, _, pw_uid, pw_gid, _, pw_dir, _ = line.split(":", 6)
+ pw_uid = int(pw_uid)
+ pw_gid = int(pw_gid)
+ os.setgid(pw_gid)
+ os.initgroups(username, pw_gid)
+ os.setuid(pw_uid)
+ os.chdir(pw_dir)
+ os.environ['HOME'] = pw_dir
except:
print(_("Unable to switch to user: %s" % username))
sys.exit(1)
/* -s implies -e */
lxc_fill_elevated_privileges(NULL, &elevated_privileges);
break;
- case 500: /* clear-env */
- env_policy = LXC_ATTACH_CLEAR_ENV;
- break;
- case 501: /* keep-env */
- env_policy = LXC_ATTACH_KEEP_ENV;
- break;
+ case 500: /* clear-env */
+ env_policy = LXC_ATTACH_CLEAR_ENV;
+ break;
+ case 501: /* keep-env */
+ env_policy = LXC_ATTACH_KEEP_ENV;
+ break;
case 502: /* keep-var */
ret = add_to_simple_array(&extra_keep, &extra_keep_size, arg);
if (ret < 0) {
Execute the specified COMMAND - enter the container NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-e, --elevated-privileges=PRIVILEGES\n\
Use elevated privileges instead of those of the\n\
container. If you don't specify privileges to be\n\
in the container's cgroup for the corresponding subsystem.\n\
\n\
Options :\n\
- -n, --name=NAME container name",
+ -n, --name=NAME NAME of the container",
.options = my_longopts,
.parser = NULL,
.checker = my_checker,
its running state at a later time.\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-r, --restore Restore container\n\
-D, --checkpoint-dir=DIR directory to save the checkpoint in\n\
-v, --verbose Enable verbose criu logs\n\
lxc-console logs on the container with the identifier NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-t, --tty=NUMBER console tty number\n\
-e, --escape=PREFIX prefix for escape command\n",
.options = my_longopts,
else if (*end == 't' || *end == 'T')
ret *= 1024ULL * 1024ULL * 1024ULL * 1024ULL;
else
- {
+ {
fprintf(stderr, "Invalid blockdev unit size '%c' in '%s', using default size\n", *end, s);
return 0;
}
lxc-create creates a container\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-f, --config=file Initial configuration file\n\
-t, --template=t Template to use to setup container\n\
-B, --bdev=BDEV Backing store type to use\n\
lxc-device attach or detach DEV to or from container.\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container",
+ -n, --name=NAME NAME of the container",
.options = my_longopts,
.parser = NULL,
.checker = NULL,
and execs COMMAND into this container.\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-f, --rcfile=FILE Load configuration file FILE\n\
-s, --define KEY=VAL Assign VAL to configuration variable KEY\n",
.options = my_longopts,
lxc-freeze freezes a container with the identifier NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container",
+ -n, --name=NAME NAME of the container",
.options = my_longopts,
.parser = NULL,
.checker = NULL,
char **newk;
switch (c) {
case 'c':
- newk = realloc(key, keys+1 * sizeof(key[0]));
+ newk = realloc(key, (keys + 1) * sizeof(key[0]));
if (!newk)
return -1;
key = newk;
lxc-info display some information about a container with the identifier NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-c, --config=KEY show configuration variable KEY from running container\n\
-i, --ips shows the IP addresses\n\
-p, --pid shows the process id of the init container\n\
static void usage(void) {
fprintf(stderr, "Usage: lxc-init [OPTION]...\n\n"
"Common options :\n"
- " -n, --name=NAME NAME for name of the container\n"
+ " -n, --name=NAME NAME of the container\n"
" -l, --logpriority=LEVEL Set log priority to LEVEL\n"
" -q, --quiet Don't produce any output\n"
" -P, --lxcpath=PATH Use specified container path\n"
aargv = &argv[optind];
- /*
+ /*
* mask all the signals so we are safe to install a
* signal handler and to fork
*/
lxc-monitor monitors the state of the NAME container\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
NAME may be a regular expression\n\
-Q, --quit tell lxc-monitord to quit\n",
.name = ".*",
lxc-start start COMMAND in specified container NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-d, --daemon Daemonize the container (default)\n\
-F, --foreground Start with the current tty attached to /dev/console\n\
-p, --pidfile=FILE Create a file with the process id\n\
-L, --console-log=FILE Log container console output to FILE\n\
-C, --close-all-fds If any fds are inherited, close them\n\
If not specified, exit with failure instead\n\
- Note: --daemon implies --close-all-fds\n\
+ Note: --daemon implies --close-all-fds\n\
-s, --define KEY=VAL Assign VAL to configuration variable KEY\n\
--share-[net|ipc|uts]=NAME Share a namespace with another container or pid\n\
",
lxc-stop stops a container with the identifier NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-r, --reboot reboot the container\n\
-W, --nowait don't wait for shutdown or reboot to complete\n\
-t, --timeout=T wait T seconds before hard-stopping\n\
lxc-unfreeze unfreezes a container with the identifier NAME\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n",
+ -n, --name=NAME NAME of the container\n",
.options = my_longopts,
.parser = NULL,
.checker = NULL,
int *flags;
uid_t *uid;
bool setuid;
- int want_default_mounts;
- const char *want_hostname;
+ int want_default_mounts;
+ const char *want_hostname;
};
static int do_start(void *arg)
lxc-wait waits for NAME container state to reach STATE\n\
\n\
Options :\n\
- -n, --name=NAME NAME for name of the container\n\
+ -n, --name=NAME NAME of the container\n\
-s, --state=STATE ORed states to wait for\n\
STOPPED, STARTING, RUNNING, STOPPING,\n\
ABORTING, FREEZING, FROZEN, THAWED\n\
goto free_tpath;
/*
- * either template or rootfs.path should be set.
* if both template and rootfs.path are set, template is setup as rootfs.path.
* container is already created if we have a config and rootfs.path is accessible
*/
- if (!c->lxc_conf->rootfs.path && !tpath)
- /* no template passed in and rootfs does not exist: error */
+ if (!c->lxc_conf->rootfs.path && !tpath) {
+ /* no template passed in and rootfs does not exist */
+ if (!c->save_config(c, NULL)) {
+ ERROR("failed to save starting configuration for %s\n", c->name);
+ goto out;
+ }
+ ret = true;
goto out;
+ }
if (c->lxc_conf->rootfs.path && access(c->lxc_conf->rootfs.path, F_OK) != 0)
/* rootfs passed into configuration, but does not exist: error */
goto out;
if (do_lxcapi_is_defined(c) && c->lxc_conf->rootfs.path && !tpath) {
/* Rootfs already existed, user just wanted to save the
* loaded configuration */
+ if (!c->save_config(c, NULL))
+ ERROR("failed to save starting configuration for %s\n", c->name);
ret = true;
goto out;
}
return count > 0;
}
+static bool do_destroy_container(struct lxc_conf *conf) {
+ if (am_unpriv()) {
+ if (userns_exec_1(conf, bdev_destroy_wrapper, conf) < 0)
+ return false;
+ return true;
+ }
+ return bdev_destroy(conf);
+}
+
static int lxc_rmdir_onedev_wrapper(void *data)
{
char *arg = (char *) data;
return lxc_rmdir_onedev(arg, "snaps");
}
-static int do_bdev_destroy(struct lxc_conf *conf)
-{
- struct bdev *r;
- int ret = 0;
-
- r = bdev_init(conf, conf->rootfs.path, conf->rootfs.mount, NULL);
- if (!r)
- return -1;
-
- if (r->ops->destroy(r) < 0)
- ret = -1;
- bdev_put(r);
- return ret;
-}
-
-static int bdev_destroy_wrapper(void *data)
-{
- struct lxc_conf *conf = data;
-
- if (setgid(0) < 0) {
- ERROR("Failed to setgid to 0");
- return -1;
- }
- if (setgroups(0, NULL) < 0)
- WARN("Failed to clear groups");
- if (setuid(0) < 0) {
- ERROR("Failed to setuid to 0");
- return -1;
- }
- return do_bdev_destroy(conf);
-}
-
static bool container_destroy(struct lxc_container *c)
{
bool bret = false;
- int ret;
+ int ret = 0;
if (!c || !do_lxcapi_is_defined(c))
return false;
}
if (c->lxc_conf && c->lxc_conf->rootfs.path && c->lxc_conf->rootfs.mount) {
- if (am_unpriv())
- ret = userns_exec_1(c->lxc_conf, bdev_destroy_wrapper, c->lxc_conf);
- else
- ret = do_bdev_destroy(c->lxc_conf);
- if (ret < 0) {
+ if (!do_destroy_container(c->lxc_conf)) {
ERROR("Error destroying rootfs for %s", c->name);
goto out;
}
+ INFO("Destroyed rootfs for %s", c->name);
}
mod_all_rdeps(c, false);
ERROR("Error destroying container directory for %s", c->name);
goto out;
}
+ INFO("Destroyed directory for %s", c->name);
+
bret = true;
out:
if (!lxc_list_empty(&conf->hooks[LXCHOOK_CLONE])) {
/* Start of environment variable setup for hooks */
- if (setenv("LXC_SRC_NAME", c0->name, 1)) {
+ if (c0->name && setenv("LXC_SRC_NAME", c0->name, 1)) {
SYSERROR("failed to set environment variable for source container name");
}
- if (setenv("LXC_NAME", c->name, 1)) {
+ if (c->name && setenv("LXC_NAME", c->name, 1)) {
SYSERROR("failed to set environment variable for container name");
}
- if (setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
+ if (conf->rcfile && setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
SYSERROR("failed to set environment variable for config path");
}
- if (setenv("LXC_ROOTFS_MOUNT", bdev->dest, 1)) {
+ if (bdev->dest && setenv("LXC_ROOTFS_MOUNT", bdev->dest, 1)) {
SYSERROR("failed to set environment variable for rootfs mount");
}
- if (setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
+ if (conf->rootfs.path && setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
SYSERROR("failed to set environment variable for rootfs mount");
}
if (!p)
return -1;
*p = '\0';
- ret = do_create_container_dir(path, conf);
+ ret = do_create_container_dir(path, conf);
*p = '/';
return ret;
}
if (ret < 0)
goto out;
- clear_unexp_config_line(c2->lxc_conf, "lxc.utsname", false);
// update utsname
- if (!set_config_item_locked(c2, "lxc.utsname", newname)) {
- ERROR("Error setting new hostname");
- goto out;
+ if (!(flags & LXC_CLONE_KEEPNAME)) {
+ clear_unexp_config_line(c2->lxc_conf, "lxc.utsname", false);
+
+ if (!set_config_item_locked(c2, "lxc.utsname", newname)) {
+ ERROR("Error setting new hostname");
+ goto out;
+ }
}
// copy hooks
* \brief Specifications for how to create a new backing store
*/
struct bdev_specs {
- char *fstype; /*!< Filesystem type */
- uint64_t fssize; /*!< Filesystem size in bytes */
- struct {
- char *zfsroot; /*!< ZFS root path */
- } zfs;
- struct {
- char *vg; /*!< LVM Volume Group name */
- char *lv; /*!< LVM Logical Volume name */
- char *thinpool; /*!< LVM thin pool to use, if any */
- } lvm;
- char *dir; /*!< Directory path */
+ char *fstype; /*!< Filesystem type */
+ uint64_t fssize; /*!< Filesystem size in bytes */
+ struct {
+ char *zfsroot; /*!< ZFS root path */
+ } zfs;
+ struct {
+ char *vg; /*!< LVM Volume Group name */
+ char *lv; /*!< LVM Logical Volume name */
+ char *thinpool; /*!< LVM thin pool to use, if any */
+ } lvm;
+ char *dir; /*!< Directory path */
};
/*!
extern int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string)
{
- return nla_put(nlmsg, attr, string, strlen(string) + 1);
+ return nla_put(nlmsg, attr, string, strlen(string) + 1);
}
extern int nla_put_u32(struct nlmsg *nlmsg, int attr, int value)
extern int netlink_rcv(struct nl_handler *handler, struct nlmsg *answer)
{
int ret;
- struct sockaddr_nl nladdr;
- struct iovec iov = {
- .iov_base = answer->nlmsghdr,
- .iov_len = answer->nlmsghdr->nlmsg_len,
- };
+ struct sockaddr_nl nladdr;
+ struct iovec iov = {
+ .iov_base = answer->nlmsghdr,
+ .iov_len = answer->nlmsghdr->nlmsg_len,
+ };
struct msghdr msg = {
- .msg_name = &nladdr,
- .msg_namelen = sizeof(nladdr),
- .msg_iov = &iov,
- .msg_iovlen = 1,
- };
+ .msg_name = &nladdr,
+ .msg_namelen = sizeof(nladdr),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ };
- memset(&nladdr, 0, sizeof(nladdr));
- nladdr.nl_family = AF_NETLINK;
- nladdr.nl_pid = 0;
- nladdr.nl_groups = 0;
+ memset(&nladdr, 0, sizeof(nladdr));
+ nladdr.nl_family = AF_NETLINK;
+ nladdr.nl_pid = 0;
+ nladdr.nl_groups = 0;
again:
ret = recvmsg(handler->fd, &msg, 0);
extern int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg)
{
- struct sockaddr_nl nladdr;
- struct iovec iov = {
- .iov_base = nlmsg->nlmsghdr,
- .iov_len = nlmsg->nlmsghdr->nlmsg_len,
- };
+ struct sockaddr_nl nladdr;
+ struct iovec iov = {
+ .iov_base = nlmsg->nlmsghdr,
+ .iov_len = nlmsg->nlmsghdr->nlmsg_len,
+ };
struct msghdr msg = {
- .msg_name = &nladdr,
- .msg_namelen = sizeof(nladdr),
- .msg_iov = &iov,
- .msg_iovlen = 1,
- };
+ .msg_name = &nladdr,
+ .msg_namelen = sizeof(nladdr),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ };
int ret;
- memset(&nladdr, 0, sizeof(nladdr));
- nladdr.nl_family = AF_NETLINK;
- nladdr.nl_pid = 0;
- nladdr.nl_groups = 0;
+ memset(&nladdr, 0, sizeof(nladdr));
+ nladdr.nl_family = AF_NETLINK;
+ nladdr.nl_pid = 0;
+ nladdr.nl_groups = 0;
ret = sendmsg(handler->fd, &msg, 0);
if (ret < 0)
extern int netlink_open(struct nl_handler *handler, int protocol)
{
socklen_t socklen;
- int sndbuf = 32768;
- int rcvbuf = 32768;
+ int sndbuf = 32768;
+ int rcvbuf = 32768;
- memset(handler, 0, sizeof(*handler));
+ memset(handler, 0, sizeof(*handler));
- handler->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
- if (handler->fd < 0)
- return -errno;
+ handler->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
+ if (handler->fd < 0)
+ return -errno;
- if (setsockopt(handler->fd, SOL_SOCKET, SO_SNDBUF,
+ if (setsockopt(handler->fd, SOL_SOCKET, SO_SNDBUF,
&sndbuf, sizeof(sndbuf)) < 0)
- return -errno;
+ return -errno;
- if (setsockopt(handler->fd, SOL_SOCKET, SO_RCVBUF,
+ if (setsockopt(handler->fd, SOL_SOCKET, SO_RCVBUF,
&rcvbuf,sizeof(rcvbuf)) < 0)
- return -errno;
+ return -errno;
- memset(&handler->local, 0, sizeof(handler->local));
- handler->local.nl_family = AF_NETLINK;
- handler->local.nl_groups = 0;
+ memset(&handler->local, 0, sizeof(handler->local));
+ handler->local.nl_family = AF_NETLINK;
+ handler->local.nl_groups = 0;
- if (bind(handler->fd, (struct sockaddr*)&handler->local,
+ if (bind(handler->fd, (struct sockaddr*)&handler->local,
sizeof(handler->local)) < 0)
- return -errno;
+ return -errno;
- socklen = sizeof(handler->local);
- if (getsockname(handler->fd, (struct sockaddr*)&handler->local,
+ socklen = sizeof(handler->local);
+ if (getsockname(handler->fd, (struct sockaddr*)&handler->local,
&socklen) < 0)
- return -errno;
+ return -errno;
- if (socklen != sizeof(handler->local))
- return -EINVAL;
+ if (socklen != sizeof(handler->local))
+ return -EINVAL;
- if (handler->local.nl_family != AF_NETLINK)
- return -EINVAL;
+ if (handler->local.nl_family != AF_NETLINK)
+ return -EINVAL;
handler->seq = time(NULL);
- return 0;
+ return 0;
}
extern int netlink_close(struct nl_handler *handler)
* @peer: the peer address
*/
struct nl_handler {
- int fd;
+ int fd;
int seq;
- struct sockaddr_nl local;
- struct sockaddr_nl peer;
+ struct sockaddr_nl local;
+ struct sockaddr_nl peer;
};
/*
lxc_seccomp_arch_i386,
lxc_seccomp_arch_amd64,
lxc_seccomp_arch_arm,
+ lxc_seccomp_arch_arm64,
lxc_seccomp_arch_ppc64,
lxc_seccomp_arch_ppc64le,
lxc_seccomp_arch_ppc,
return lxc_seccomp_arch_amd64;
else if (strncmp(uts.machine, "armv7", 5) == 0)
return lxc_seccomp_arch_arm;
+ else if (strncmp(uts.machine, "aarch64", 7) == 0)
+ return lxc_seccomp_arch_arm64;
else if (strncmp(uts.machine, "ppc64le", 7) == 0)
return lxc_seccomp_arch_ppc64le;
else if (strncmp(uts.machine, "ppc64", 5) == 0)
case lxc_seccomp_arch_i386: arch = SCMP_ARCH_X86; break;
case lxc_seccomp_arch_amd64: arch = SCMP_ARCH_X86_64; break;
case lxc_seccomp_arch_arm: arch = SCMP_ARCH_ARM; break;
+#ifdef SCMP_ARCH_AARCH64
+ case lxc_seccomp_arch_arm64: arch = SCMP_ARCH_AARCH64; break;
+#endif
#ifdef SCMP_ARCH_PPC64LE
case lxc_seccomp_arch_ppc64le: arch = SCMP_ARCH_PPC64LE; break;
#endif
cur_rule_arch = lxc_seccomp_arch_arm;
}
#endif
+#ifdef SCMP_ARCH_AARCH64
+ else if (strcmp(line, "[arm64]") == 0 ||
+ strcmp(line, "[ARM64]") == 0) {
+ if (native_arch != lxc_seccomp_arch_arm64) {
+ cur_rule_arch = lxc_seccomp_arch_unknown;
+ continue;
+ }
+ cur_rule_arch = lxc_seccomp_arch_arm64;
+ }
+#endif
#ifdef SCMP_ARCH_PPC64LE
else if (strcmp(line, "[ppc64le]") == 0 ||
strcmp(line, "[PPC64LE]") == 0) {
}
/* Start of environment variable setup for hooks */
- if (setenv("LXC_NAME", name, 1)) {
+ if (name && setenv("LXC_NAME", name, 1)) {
SYSERROR("failed to set environment variable for container name");
}
- if (setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
+ if (conf->rcfile && setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
SYSERROR("failed to set environment variable for config path");
}
- if (setenv("LXC_ROOTFS_MOUNT", conf->rootfs.mount, 1)) {
+ if (conf->rootfs.mount && setenv("LXC_ROOTFS_MOUNT", conf->rootfs.mount, 1)) {
SYSERROR("failed to set environment variable for rootfs mount");
}
- if (setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
+ if (conf->rootfs.path && setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
SYSERROR("failed to set environment variable for rootfs mount");
}
if (conf->console.path && setenv("LXC_CONSOLE", conf->console.path, 1)) {
*/
static int container_reboot_supported(void *arg)
{
- int *cmd = arg;
+ int *cmd = arg;
int ret;
- ret = reboot(*cmd);
+ ret = reboot(*cmd);
if (ret == -1 && errno == EINVAL)
return 1;
return 0;
{
FILE *f;
int ret, cmd, v, flags;
- long stack_size = 4096;
- void *stack = alloca(stack_size);
- int status;
- pid_t pid;
+ long stack_size = 4096;
+ void *stack = alloca(stack_size);
+ int status;
+ pid_t pid;
f = fopen("/proc/sys/kernel/ctrl-alt-del", "r");
if (!f) {
return -1;
}
- /* This prctl must be before the synchro, so if the parent
+ /* This prctl must be before the synchro, so if the parent
* dies before we set the parent death signal, we will detect
* its death with the synchro right after, otherwise we have
* a window where the parent can exit before we set the pdeath
* lxc-execute which simply exited. In any case, treat
* it as a 'halt'
*/
- if (WIFSIGNALED(status)) {
+ if (WIFSIGNALED(status)) {
switch(WTERMSIG(status)) {
case SIGINT: /* halt */
DEBUG("Container halting");
DEBUG("unknown exit status for init: %d", WTERMSIG(status));
break;
}
- }
+ }
+ DEBUG("Pushing physical nics back to host namespace");
lxc_rename_phys_nics_on_shutdown(netnsfd, handler->conf);
+
+ DEBUG("Tearing down virtual network devices used by container");
+ lxc_delete_network(handler);
+
if (netnsfd >= 0)
close(netnsfd);
#define PR_SET_MM_ENV_END 11
#endif
+#ifndef O_PATH
+#define O_PATH 010000000
+#endif
+
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 00400000
+#endif
+
lxc_log_define(lxc_utils, lxc);
/*
}
if (lstat(path, &mystat) < 0) {
+ if (errno == ENOENT)
+ return 0;
ERROR("%s: failed to stat %s", __func__, path);
return -1;
}
}
/*
+ * @path: a pathname where / replaced with '\0'.
+ * @offsetp: pointer to int showing which path segment was last seen.
+ * Updated on return to reflect the next segment.
+ * @fulllen: full original path length.
+ * Returns a pointer to the next path segment, or NULL if done.
+ */
+static char *get_nextpath(char *path, int *offsetp, int fulllen)
+{
+ int offset = *offsetp;
+
+ if (offset >= fulllen)
+ return NULL;
+
+ while (path[offset] != '\0' && offset < fulllen)
+ offset++;
+ while (path[offset] == '\0' && offset < fulllen)
+ offset++;
+
+ *offsetp = offset;
+ return (offset < fulllen) ? &path[offset] : NULL;
+}
+
+/*
+ * Check that @subdir is a subdir of @dir. @len is the length of
+ * @dir (to avoid having to recalculate it).
+ */
+static bool is_subdir(const char *subdir, const char *dir, size_t len)
+{
+ size_t subdirlen = strlen(subdir);
+
+ if (subdirlen < len)
+ return false;
+ if (strncmp(subdir, dir, len) != 0)
+ return false;
+ if (dir[len-1] == '/')
+ return true;
+ if (subdir[len] == '/' || subdirlen == len)
+ return true;
+ return false;
+}
+
+/*
+ * Check if the open fd is a symlink. Return -ELOOP if it is. Return
+ * -ENOENT if we couldn't fstat. Return 0 if the fd is ok.
+ */
+static int check_symlink(int fd)
+{
+ struct stat sb;
+ int ret = fstat(fd, &sb);
+ if (ret < 0)
+ return -ENOENT;
+ if (S_ISLNK(sb.st_mode))
+ return -ELOOP;
+ return 0;
+}
+
+/*
+ * Open a file or directory, provided that it contains no symlinks.
+ *
+ * CAVEAT: This function must not be used for other purposes than container
+ * setup before executing the container's init
+ */
+static int open_if_safe(int dirfd, const char *nextpath)
+{
+ int newfd = openat(dirfd, nextpath, O_RDONLY | O_NOFOLLOW);
+ if (newfd >= 0) // was not a symlink, all good
+ return newfd;
+
+ if (errno == ELOOP)
+ return newfd;
+
+ if (errno == EPERM || errno == EACCES) {
+ /* we're not root (cause we got EPERM) so
+ try opening with O_PATH */
+ newfd = openat(dirfd, nextpath, O_PATH | O_NOFOLLOW);
+ if (newfd >= 0) {
+ /* O_PATH will return an fd for symlinks. We know
+ * nextpath wasn't a symlink at last openat, so if fd
+ * is now a link, then something * fishy is going on
+ */
+ int ret = check_symlink(newfd);
+ if (ret < 0) {
+ close(newfd);
+ newfd = ret;
+ }
+ }
+ }
+
+ return newfd;
+}
+
+/*
+ * Open a path intending for mounting, ensuring that the final path
+ * is inside the container's rootfs.
+ *
+ * CAVEAT: This function must not be used for other purposes than container
+ * setup before executing the container's init
+ *
+ * @target: path to be opened
+ * @prefix_skip: a part of @target in which to ignore symbolic links. This
+ * would be the container's rootfs.
+ *
+ * Return an open fd for the path, or <0 on error.
+ */
+static int open_without_symlink(const char *target, const char *prefix_skip)
+{
+ int curlen = 0, dirfd, fulllen, i;
+ char *dup = NULL;
+
+ fulllen = strlen(target);
+
+ /* make sure prefix-skip makes sense */
+ if (prefix_skip) {
+ curlen = strlen(prefix_skip);
+ if (!is_subdir(target, prefix_skip, curlen)) {
+ ERROR("WHOA there - target '%s' didn't start with prefix '%s'",
+ target, prefix_skip);
+ return -EINVAL;
+ }
+ /*
+ * get_nextpath() expects the curlen argument to be
+ * on a (turned into \0) / or before it, so decrement
+ * curlen to make sure that happens
+ */
+ if (curlen)
+ curlen--;
+ } else {
+ prefix_skip = "/";
+ curlen = 0;
+ }
+
+ /* Make a copy of target which we can hack up, and tokenize it */
+ if ((dup = strdup(target)) == NULL) {
+ SYSERROR("Out of memory checking for symbolic link");
+ return -ENOMEM;
+ }
+ for (i = 0; i < fulllen; i++) {
+ if (dup[i] == '/')
+ dup[i] = '\0';
+ }
+
+ dirfd = open(prefix_skip, O_RDONLY);
+ if (dirfd < 0)
+ goto out;
+ while (1) {
+ int newfd, saved_errno;
+ char *nextpath;
+
+ if ((nextpath = get_nextpath(dup, &curlen, fulllen)) == NULL)
+ goto out;
+ newfd = open_if_safe(dirfd, nextpath);
+ saved_errno = errno;
+ close(dirfd);
+ dirfd = newfd;
+ if (newfd < 0) {
+ errno = saved_errno;
+ if (errno == ELOOP)
+ SYSERROR("%s in %s was a symbolic link!", nextpath, target);
+ else
+ SYSERROR("Error examining %s in %s", nextpath, target);
+ goto out;
+ }
+ }
+
+out:
+ free(dup);
+ return dirfd;
+}
+
+/*
+ * Safely mount a path into a container, ensuring that the mount target
+ * is under the container's @rootfs. (If @rootfs is NULL, then the container
+ * uses the host's /)
+ *
+ * CAVEAT: This function must not be used for other purposes than container
+ * setup before executing the container's init
+ */
+int safe_mount(const char *src, const char *dest, const char *fstype,
+ unsigned long flags, const void *data, const char *rootfs)
+{
+ int srcfd = -1, destfd, ret, saved_errno;
+ char srcbuf[50], destbuf[50]; // only needs enough for /proc/self/fd/<fd>
+ const char *mntsrc = src;
+
+ if (!rootfs)
+ rootfs = "";
+
+ /* todo - allow symlinks for relative paths if 'allowsymlinks' option is passed */
+ if (flags & MS_BIND && src && src[0] != '/') {
+ INFO("this is a relative bind mount");
+ srcfd = open_without_symlink(src, NULL);
+ if (srcfd < 0)
+ return srcfd;
+ ret = snprintf(srcbuf, 50, "/proc/self/fd/%d", srcfd);
+ if (ret < 0 || ret > 50) {
+ close(srcfd);
+ ERROR("Out of memory");
+ return -EINVAL;
+ }
+ mntsrc = srcbuf;
+ }
+
+ destfd = open_without_symlink(dest, rootfs);
+ if (destfd < 0) {
+ if (srcfd != -1)
+ close(srcfd);
+ return destfd;
+ }
+
+ ret = snprintf(destbuf, 50, "/proc/self/fd/%d", destfd);
+ if (ret < 0 || ret > 50) {
+ if (srcfd != -1)
+ close(srcfd);
+ close(destfd);
+ ERROR("Out of memory");
+ return -EINVAL;
+ }
+
+ ret = mount(mntsrc, destbuf, fstype, flags, data);
+ saved_errno = errno;
+ if (srcfd != -1)
+ close(srcfd);
+ close(destfd);
+ if (ret < 0) {
+ errno = saved_errno;
+ SYSERROR("Failed to mount %s onto %s", src, dest);
+ return ret;
+ }
+
+ return 0;
+}
+
+/*
* Mount a proc under @rootfs if proc self points to a pid other than
* my own. This is needed to have a known-good proc mount for setting
* up LSMs both at container startup and attach.
mypid = (int)getpid();
INFO("I am %d, /proc/self points to '%s'", mypid, link);
ret = snprintf(path, MAXPATHLEN, "%s/proc", rootfs);
+ if (ret < 0 || ret >= MAXPATHLEN) {
+ SYSERROR("proc path name too long");
+ return -1;
+ }
if (linklen < 0) /* /proc not mounted */
goto domount;
if (atoi(link) != mypid) {
return 0;
domount:
- if (mount("proc", path, "proc", 0, NULL))
+ if (safe_mount("proc", path, "proc", 0, NULL, rootfs) < 0)
return -1;
INFO("Mounted /proc in container for security transition");
return 1;
int is_dir(const char *path);
char *get_template_path(const char *t);
int setproctitle(char *title);
+int safe_mount(const char *src, const char *dest, const char *fstype,
+ unsigned long flags, const void *data, const char *rootfs);
int mount_proc_if_needed(const char *rootfs);
int null_stdfds(void);
#endif /* __LXC_UTILS_H */
#define LXC_VERSION_MAJOR 1
#define LXC_VERSION_MINOR 1
-#define LXC_VERSION_MICRO 3
-#define LXC_VERSION "1.1.3"
+#define LXC_VERSION_MICRO 4
+#define LXC_VERSION "1.1.4"
#endif
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = src/python-lxc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/setup.py.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = setup.py
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/setup.py.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/python-lxc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/python-lxc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
@ENABLE_PYTHON_TRUE@all:
@ENABLE_PYTHON_TRUE@ $(PYTHON) setup.py build
assert(dst_name != NULL);
}
- if (self->container->attach_interface(self->container, src_name,
- dst_name)) {
+ if (self->container->attach_interface(self->container, src_name, dst_name)) {
Py_XDECREF(py_src_name);
Py_XDECREF(py_dst_name);
Py_RETURN_TRUE;
bin_SCRIPTS += \
lxc-test-apparmor-mount \
lxc-test-checkpoint-restore \
+ lxc-test-symlink \
lxc-test-ubuntu \
lxc-test-unpriv \
lxc-test-usernic
lxc-test-checkpoint-restore \
lxc-test-cloneconfig \
lxc-test-createconfig \
+ lxc-test-symlink \
lxc-test-ubuntu \
lxc-test-unpriv \
may_control.c \
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@am__append_3 = \
@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@ lxc-test-apparmor-mount \
@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@ lxc-test-checkpoint-restore \
+@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@ lxc-test-symlink \
@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@ lxc-test-ubuntu \
@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@ lxc-test-unpriv \
@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@ lxc-test-usernic
subdir = src/tests
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-test-usernic.in $(top_srcdir)/config/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-test-usernic
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-test-usernic.in \
+ $(top_srcdir)/config/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
lxc-test-checkpoint-restore \
lxc-test-cloneconfig \
lxc-test-createconfig \
+ lxc-test-symlink \
lxc-test-ubuntu \
lxc-test-unpriv \
may_control.c \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/tests/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
}
if (debug) {
- c->set_config_item(c, "lxc.loglevel", "DEBUG");
- c->set_config_item(c, "lxc.logfile", name);
+ c->set_config_item(c, "lxc.loglevel", "DEBUG");
+ c->set_config_item(c, "lxc.logfile", name);
}
if (strcmp(args->mode, "create") == 0) {
out:
lxc_container_put(c);
if (debug)
- lxc_log_close();
+ lxc_log_close();
}
static void *concurrent(void *arguments)
case 'q':
quiet = 1;
break;
- case 'D':
- debug = 1;
- break;
+ case 'D':
+ debug = 1;
+ break;
case 'm': {
char *mode_tok, *tok, *saveptr = NULL;
exit(EXIT_FAILURE);
}
modes[i] = tok;
- }
+ }
modes[i] = NULL;
break;
- }
+ }
default: /* '?' */
usage();
exit(EXIT_FAILURE);
--- /dev/null
+#!/bin/bash
+
+set -ex
+
+# lxc: linux Container library
+
+# Authors:
+# Serge Hallyn <serge.hallyn@ubuntu.com>
+#
+# This is a regression test for symbolic links
+
+dirname=`mktemp -d`
+fname=`mktemp`
+fname2=`mktemp`
+
+lxcpath=/var/lib/lxcsym1
+
+cleanup() {
+ lxc-destroy -P $lxcpath -f -n symtest1 || true
+ rm -f $lxcpath
+ rmdir $dirname || true
+ rm -f $fname || true
+ rm -f $fname2 || true
+}
+
+trap cleanup EXIT SIGHUP SIGINT SIGTERM
+
+testrun() {
+ expected=$1
+ run=$2
+ pass="pass"
+ lxc-start -P $lxcpath -n symtest1 -l trace -o $lxcpath/log || pass="fail"
+ [ $pass = "pass" ] && lxc-wait -P $lxcpath -n symtest1 -t 10 -s RUNNING || pass="fail"
+ if [ "$pass" != "$expected" ]; then
+ echo "Test $run: expected $expected but container did not. Start log:"
+ cat $lxcpath/log
+ echo "FAIL: Test $run: expected $expected but container did not."
+ false
+ fi
+ lxc-stop -P $lxcpath -n symtest1 -k || true
+}
+
+# make lxcpath a symlink - this should NOT cause failure
+ln -s /var/lib/lxc $lxcpath
+
+lxc-destroy -P $lxcpath -f -n symtest1 || true
+lxc-create -P $lxcpath -t busybox -n symtest1
+
+cat >> /var/lib/lxc/symtest1/config << EOF
+lxc.mount.entry = $dirname opt/xxx/dir none bind,create=dir
+lxc.mount.entry = $fname opt/xxx/file none bind,create=file
+lxc.mount.entry = $fname2 opt/xxx/file2 none bind
+lxc.mount.entry = $dirname /var/lib/lxc/symtest1/rootfs/opt/xxx/dir2 none bind,create=dir
+EOF
+
+# Regular - should succeed
+mkdir -p /var/lib/lxc/symtest1/rootfs/opt/xxx
+touch /var/lib/lxc/symtest1/rootfs/opt/xxx/file2
+testrun pass 1
+
+# symlink - should fail
+rm -rf /var/lib/lxc/symtest1/rootfs/opt/xxx
+mkdir -p /var/lib/lxc/symtest1/rootfs/opt/xxx2
+ln -s /var/lib/lxc/symtest1/rootfs/opt/xxx2 /var/lib/lxc/symtest1/rootfs/opt/xxx
+touch /var/lib/lxc/symtest1/rootfs/opt/xxx/file2
+testrun fail 2
+
+# final final symlink - should fail
+rm -rf $lxcpath/symtest1/rootfs/opt/xxx
+mkdir -p $lxcpath/symtest1/rootfs/opt/xxx
+mkdir -p $lxcpath/symtest1/rootfs/opt/xxx/dir
+touch $lxcpath/symtest1/rootfs/opt/xxx/file
+touch $lxcpath/symtest1/rootfs/opt/xxx/file2src
+ln -s $lxcpath/symtest1/rootfs/opt/xxx/file2src $lxcpath/symtest1/rootfs/opt/xxx/file2
+testrun fail 3
+
+# Ideally we'd also try a loop device, but that won't work in nested containers
+# anyway - TODO
+
+# what about /proc itself
+
+rm -rf $lxcpath/symtest1/rootfs/opt/xxx
+mkdir -p $lxcpath/symtest1/rootfs/opt/xxx
+touch $lxcpath/symtest1/rootfs/opt/xxx/file2
+mv $lxcpath/symtest1/rootfs/proc $lxcpath/symtest1/rootfs/proc1
+ln -s $lxcpath/symtest1/rootfs/proc1 $lxcpath/symtest1/rootfs/proc
+testrun fail 4
+
+echo "all tests passed"
static int do_reboot(void *arg)
{
- int *cmd = arg;
+ int *cmd = arg;
- if (reboot(*cmd))
- printf("failed to reboot(%d): %m\n", *cmd);
+ if (reboot(*cmd))
+ printf("failed to reboot(%d): %m\n", *cmd);
return 0;
}
static int test_reboot(int cmd, int sig)
{
- long stack_size = 4096;
- void *stack = alloca(stack_size) + stack_size;
- int status;
- pid_t ret;
-
- ret = clone(do_reboot, stack, CLONE_NEWPID | SIGCHLD, &cmd);
- if (ret < 0) {
- printf("failed to clone: %m\n");
- return -1;
- }
-
- if (wait(&status) < 0) {
- printf("unexpected wait error: %m\n");
- return -1;
- }
-
- if (!WIFSIGNALED(status)) {
+ long stack_size = 4096;
+ void *stack = alloca(stack_size) + stack_size;
+ int status;
+ pid_t ret;
+
+ ret = clone(do_reboot, stack, CLONE_NEWPID | SIGCHLD, &cmd);
+ if (ret < 0) {
+ printf("failed to clone: %m\n");
+ return -1;
+ }
+
+ if (wait(&status) < 0) {
+ printf("unexpected wait error: %m\n");
+ return -1;
+ }
+
+ if (!WIFSIGNALED(status)) {
if (sig != -1)
printf("child process exited but was not signaled\n");
- return -1;
- }
+ return -1;
+ }
- if (WTERMSIG(status) != sig) {
- printf("signal termination is not the one expected\n");
- return -1;
- }
+ if (WTERMSIG(status) != sig) {
+ printf("signal termination is not the one expected\n");
+ return -1;
+ }
- return 0;
+ return 0;
}
static int have_reboot_patch(void)
int main(int argc, char *argv[])
{
- int status;
+ int status;
if (getuid() != 0) {
- printf("Must run as root.\n");
- return 1;
+ printf("Must run as root.\n");
+ return 1;
}
status = have_reboot_patch();
if (status != 0) {
- printf("Your kernel does not have the container reboot patch\n");
- return 1;
+ printf("Your kernel does not have the container reboot patch\n");
+ return 1;
}
- status = test_reboot(LINUX_REBOOT_CMD_CAD_ON, -1);
- if (status >= 0) {
- printf("reboot(LINUX_REBOOT_CMD_CAD_ON) should have failed\n");
- return 1;
- }
- printf("reboot(LINUX_REBOOT_CMD_CAD_ON) has failed as expected\n");
-
- status = test_reboot(LINUX_REBOOT_CMD_RESTART, SIGHUP);
- if (status < 0)
- return 1;
- printf("reboot(LINUX_REBOOT_CMD_RESTART) succeed\n");
-
- status = test_reboot(LINUX_REBOOT_CMD_RESTART2, SIGHUP);
- if (status < 0)
- return 1;
- printf("reboot(LINUX_REBOOT_CMD_RESTART2) succeed\n");
-
- status = test_reboot(LINUX_REBOOT_CMD_HALT, SIGINT);
- if (status < 0)
- return 1;
- printf("reboot(LINUX_REBOOT_CMD_HALT) succeed\n");
-
- status = test_reboot(LINUX_REBOOT_CMD_POWER_OFF, SIGINT);
- if (status < 0)
- return 1;
- printf("reboot(LINUX_REBOOT_CMD_POWERR_OFF) succeed\n");
-
- printf("All tests passed\n");
- return 0;
+ status = test_reboot(LINUX_REBOOT_CMD_CAD_ON, -1);
+ if (status >= 0) {
+ printf("reboot(LINUX_REBOOT_CMD_CAD_ON) should have failed\n");
+ return 1;
+ }
+ printf("reboot(LINUX_REBOOT_CMD_CAD_ON) has failed as expected\n");
+
+ status = test_reboot(LINUX_REBOOT_CMD_RESTART, SIGHUP);
+ if (status < 0)
+ return 1;
+ printf("reboot(LINUX_REBOOT_CMD_RESTART) succeed\n");
+
+ status = test_reboot(LINUX_REBOOT_CMD_RESTART2, SIGHUP);
+ if (status < 0)
+ return 1;
+ printf("reboot(LINUX_REBOOT_CMD_RESTART2) succeed\n");
+
+ status = test_reboot(LINUX_REBOOT_CMD_HALT, SIGINT);
+ if (status < 0)
+ return 1;
+ printf("reboot(LINUX_REBOOT_CMD_HALT) succeed\n");
+
+ status = test_reboot(LINUX_REBOOT_CMD_POWER_OFF, SIGINT);
+ if (status < 0)
+ return 1;
+ printf("reboot(LINUX_REBOOT_CMD_POWERR_OFF) succeed\n");
+
+ printf("All tests passed\n");
+ return 0;
}
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = templates
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(srcdir)/lxc-alpine.in $(srcdir)/lxc-altlinux.in \
- $(srcdir)/lxc-archlinux.in $(srcdir)/lxc-busybox.in \
- $(srcdir)/lxc-centos.in $(srcdir)/lxc-cirros.in \
- $(srcdir)/lxc-debian.in $(srcdir)/lxc-download.in \
- $(srcdir)/lxc-fedora.in $(srcdir)/lxc-gentoo.in \
- $(srcdir)/lxc-openmandriva.in $(srcdir)/lxc-opensuse.in \
- $(srcdir)/lxc-oracle.in $(srcdir)/lxc-plamo.in \
- $(srcdir)/lxc-sshd.in $(srcdir)/lxc-ubuntu.in \
- $(srcdir)/lxc-ubuntu-cloud.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
$(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = lxc-alpine lxc-altlinux lxc-archlinux lxc-busybox \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-alpine.in \
+ $(srcdir)/lxc-altlinux.in $(srcdir)/lxc-archlinux.in \
+ $(srcdir)/lxc-busybox.in $(srcdir)/lxc-centos.in \
+ $(srcdir)/lxc-cirros.in $(srcdir)/lxc-debian.in \
+ $(srcdir)/lxc-download.in $(srcdir)/lxc-fedora.in \
+ $(srcdir)/lxc-gentoo.in $(srcdir)/lxc-openmandriva.in \
+ $(srcdir)/lxc-opensuse.in $(srcdir)/lxc-oracle.in \
+ $(srcdir)/lxc-plamo.in $(srcdir)/lxc-sshd.in \
+ $(srcdir)/lxc-ubuntu-cloud.in $(srcdir)/lxc-ubuntu.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu templates/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu templates/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
uninstall uninstall-am uninstall-templatesSCRIPTS
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
else
cp /etc/apk/repositories "$rootfs"/etc/apk/repositories || return 1
if [ -n "$release" ]; then
- sed -i -e "s:/[^/]\+/\([^/]\+\)$:/$release/\1:" \
+ sed -E -i "s:/[^/]+/([^/]+)$:/$release/\\1:" \
"$rootfs"/etc/apk/repositories
fi
fi
exit 1
}
-optarg_check() {
- if [ -z "$2" ]; then
- usage_err "option '$1' requires an argument"
- fi
-}
-
default_path=@LXCPATH@
release=
arch=$(uname -m)
exit 1
fi
+options=$(getopt -o hn:p:r:R:a: -l help,name:,rootfs:,path:,repository:,release:,arch: -- "$@")
+[ $? -eq 0 ] || usage_err
+eval set -- "$options"
+
while [ $# -gt 0 ]; do
- opt="$1"
- shift
- case "$opt" in
+ case "$1" in
-h|--help)
usage
exit 0
;;
-n|--name)
- optarg_check $opt "$1"
- name=$1
- shift
+ name=$2
;;
--rootfs)
- optarg_check $opt "$1"
- rootfs=$1
- shift
+ rootfs=$2
;;
-p|--path)
- optarg_check $opt "$1"
- path=$1
- shift
+ path=$2
;;
-r|--repository)
- optarg_check $opt "$1"
- repository=$1
- shift
+ repository=$2
;;
-R|--release)
- optarg_check $opt "$1"
- release=$1
- shift
+ release=$2
;;
-a|--arch)
- optarg_check $opt "$1"
- arch=$1
- shift
+ arch=$2
;;
--)
+ shift
break;;
- --*=*)
- # split --myopt=foo=bar into --myopt foo=bar
- set -- ${opt%=*} ${opt#*=} "$@"
- ;;
- -?)
- usage_err "unknown option '$opt'"
- ;;
- -*)
- # split opts -abc into -a -b -c
- set -- $(echo "${opt#-}" | sed 's/\(.\)/ -\1/g') "$@"
- ;;
esac
+ shift 2
done
prefix="deb [arch=${arch}]"
fi
+ if [ "$mainonly" = 1 ]; then
+ non_main=''
+ else
+ non_main=' contrib non-free'
+ fi
+
cat >> "${rootfs}/etc/apt/sources.list" << EOF
-${prefix} $MIRROR ${release} main contrib non-free
+${prefix} $MIRROR ${release} main${non_main}
EOF
if [ "$release" != "unstable" -a "$release" != "sid" ]; then
cat >> "${rootfs}/etc/apt/sources.list" << EOF
-${prefix} $SECURITY_MIRROR ${release}/updates main contrib non-free
+${prefix} $SECURITY_MIRROR ${release}/updates main${non_main}
EOF
fi
}
# If the container isn't running a native architecture, setup multiarch
if [ "${arch}" != "${hostarch}" ]; then
- mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d
- echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch
+ # Test if dpkg supports multiarch
+ if ! chroot $rootfs dpkg --print-foreign-architecture 2>&1; then
+ chroot $rootfs dpkg --add-architecture ${hostarch}
+ fi
fi
# Write a new sources.list containing both native and multiarch entries
--packages=PACKAGE_NAME1,PACKAGE_NAME2,...
List of additional packages to install. Comma separated, without space.
-c, --clean only clean up the cache and terminate
+ --main-only include only Debian's main repository (i.e. no contrib and non-free).
Environment variables:
return 0
}
-options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
+options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,main-only,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
if [ $? -ne 0 ]; then
usage $(basename $0)
exit 1
fi
eval set -- "$options"
-if which dpkg > /dev/null 2>&1 ; then
- arch=$(dpkg --print-architecture)
-else
- arch=$(uname -m)
- if [ "$arch" = "i686" ]; then
- arch="i386"
- elif [ "$arch" = "x86_64" ]; then
- arch="amd64"
- elif [ "$arch" = "armv7l" ]; then
- arch="armhf"
- fi
+arch=$(uname -m)
+if [ "$arch" = "i686" ]; then
+ arch="i386"
+elif [ "$arch" = "x86_64" ]; then
+ arch="amd64"
+elif [ "$arch" = "armv7l" ]; then
+ arch="armhf"
fi
hostarch=$arch
-a|--arch) arch=$2; shift 2;;
-c|--clean) clean=1; shift 1;;
+ --main-only) mainonly=1; shift 1;;
--mirror) MIRROR=$2; shift 2;;
-n|--name) name=$2; shift 2;;
--packages) packages=$2; shift 2;;
current_release=`wget ${MIRROR}/dists/stable/Release -O - 2> /dev/null | head |awk '/^Codename: (.*)$/ { print $2; }'`
release=${release:-${current_release}}
-valid_releases=('squeeze' 'wheezy' 'jessie' 'sid')
+valid_releases=('squeeze' 'wheezy' 'jessie' 'stretch' 'sid')
if [[ ! "${valid_releases[*]}" =~ (^|[^[:alpha:]])$release([^[:alpha:]]|$) ]]; then
echo "Invalid release ${release}, valid ones are: ${valid_releases[*]}"
exit 1