[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

handling util-vserver regression



Hi release team,

As I mentioned in #debian-release, and reported by weasel in #505521,
the version of util-vserver that is currently scheduled to be shipped
with Lenny (0.30.216~r2772-4) has an unfortunate regression from the
etch version: namely that it does not support 2.6.27, whereas the
earlier version does. If previous versions worked with 2.6.27, what
broke to make it not work? Turns out that the snapshot I took of
upstream's pre-release SVN happened to pull at the point where upstream
had merged support for the first proposed PID namespace API, not soon
afterwards it was decided that things weren't going to be done that
way, so this was removed and replaced with a better way of doing
things. This means that I pulled the snapshot when it had the first PID
namespace API, but not the second. 

I believe that we froze before the second one was introduced, so the two
possibilities were to ship util-vserver with a version that supports
2.6.26, but breaks 2.6.27, or not ship a version that supported
2.6.26. Obviously, if we wanted to support Lenny kernels, we were going
to need to do the former, so thats what I did... 

So, now that 2.6.27 is released, and people are starting to use that,
they are noticing that util-vserver doesn't work with 2.6.27 and are
disappointed to hear that Lenny will not ship with a version that
doesn't have this regression.

So, I have these options:

1. backporting the upstream changes to get support of 2.6.27, there are
a number of patches to get this to work, and I'm not exactly sure I know
which they are. This would result in a backport of software that has not
been tested by anyone.

2. bring the package up to HEAD, where it has had some testing by the
vserver community, will definitately support 2.6.27, incorporates the
additional patches that I've picked from upstream to solve various
RC-related things (which are already on their way to Lenny), but also
includes some unrelated commits (such as some python and other
stuff. Most of these I can disable in the ./configure line in
debian/rules by adding --without-python --disable-versioning)

In my mind, the better path is to do #2, because I know that this
version would absolutely work, however my suspicion is that the delta
would be too large for the release team to accept. The problem is that
the smaller delta that would result from me doing #1 would be more prone
to problems and would be completely untested.

So, as requested by Luk, I've attached the diff to this email that would
accomplish #2 and I am wondering which would be the better path to
proecede on in order to get this into Lenny. 

As you will see in the patch below, there are some changes in there were
I remove dpatches that are taken care of by upstream, they added various
python and other stuff that would be disabled in the ./configure lines
that I added, there are some redhat/rpm related changes that wouldn't
bother us, and they added their GPL in their COPYING file, which was
previously empty... and finally the patches that are necesary to get the
2.6.27 support to work again (which aren't trivial themselves). Here it
is:


Index: kernel/switch.h
===================================================================
--- kernel/switch.h	(revision 461)
+++ kernel/switch.h	(working copy)
@@ -25,7 +25,7 @@
   CPU    |       |VPROC  |PROCALT|PROCMIG|PROCTRL|       | |SCHED. |       |
   PROCESS|     08|     09|     10|     11|     12|     13| |     14|     15|
   -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-  MEMORY |       |       |       |       |       |       | |SWAP   |       |
+  MEMORY |       |       |       |       |MEMCTRL|       | |SWAP   |       |
 	 |     16|     17|     18|     19|     20|     21| |     22|     23|
   -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
   NETWORK|       |VNET   |NETALT |NETMIG |NETCTL |       | |SERIAL |       |
@@ -37,7 +37,7 @@
   OTHER  |VSTAT  |       |       |       |       |       | |VINFO  |       |
 	 |     40|     41|     42|     43|     44|     45| |     46|     47|
   =======+=======+=======+=======+=======+=======+=======+ +=======+=======+
-  SPECIAL|EVENT  |       |       |       |FLAGS  |       | |       |       |
+  SPECIAL|EVENT  |       |       |       |FLAGS  |       | |VSPACE |       |
 	 |     48|     49|     50|     51|     52|     53| |     54|     55|
   -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
   SPECIAL|DEBUG  |       |       |       |RLIMIT |SYSCALL| |       |COMPAT |
@@ -59,7 +59,6 @@
 #define VC_CAT_PROCTRL		12
 
 #define VC_CAT_SCHED		14
-
 #define VC_CAT_MEMCTRL		20
 
 #define VC_CAT_VNET		25
@@ -76,6 +75,7 @@
 #define VC_CAT_EVENT		48
 
 #define VC_CAT_FLAGS		52
+#define VC_CAT_VSPACE		54
 #define VC_CAT_DEBUG		56
 #define VC_CAT_RLIMIT		60
 
Index: kernel/space_cmd.h
===================================================================
--- kernel/space_cmd.h	(revision 461)
+++ kernel/space_cmd.h	(working copy)
@@ -3,22 +3,30 @@
 
 
 #define VCMD_enter_space_v0	VC_CMD(PROCALT, 1, 0)
-#define VCMD_enter_space	VC_CMD(PROCALT, 1, 1)
+#define VCMD_enter_space_v1	VC_CMD(PROCALT, 1, 1)
+#define VCMD_enter_space	VC_CMD(PROCALT, 1, 2)
 
 /* XXX: This is not available in recent kernels */
 #define VCMD_cleanup_namespace	VC_CMD(PROCALT, 2, 0)
 
 #define VCMD_set_space_v0	VC_CMD(PROCALT, 3, 0)
-#define VCMD_set_space		VC_CMD(PROCALT, 3, 1)
+#define VCMD_set_space_v1	VC_CMD(PROCALT, 3, 1)
+#define VCMD_set_space		VC_CMD(PROCALT, 3, 2)
 
-#define VCMD_get_space_mask	VC_CMD(PROCALT, 4, 0)
+#define VCMD_get_space_mask_v0	VC_CMD(PROCALT, 4, 0)
 
-#define VCMD_get_space_default	VC_CMD(PROCALT, 7, 0)
+#define VCMD_get_space_mask	VC_CMD(VSPACE, 0, 1)
+#define VCMD_get_space_default	VC_CMD(VSPACE, 1, 0)
 
 
-struct	vcmd_space_mask {
+struct	vcmd_space_mask_v1 {
 	uint64_t mask;
 };
 
+struct	vcmd_space_mask_v2 {
+	uint64_t mask;
+	uint32_t index;
+};
 
+
 #endif	/* _VX_SPACE_CMD_H */
Index: debian/patches/00list
===================================================================
--- debian/patches/00list	(revision 461)
+++ debian/patches/00list	(working copy)
@@ -1,6 +1,2 @@
 10fixgrammer.dpatch
-20securemount.dpatch
-30secmount_dev_fix.dpatch
 40vserver-build.dpatch
-50dev_shm.dpatch
-60securecaps.dpatch
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 466)
+++ debian/changelog	(working copy)
@@ -1,3 +1,12 @@
+util-vserver (0.30.216~r2827-1) unstable; urgency=low
+
+  * Upgrade to latest tested snapshot, fixing regression (Closes: #505521)
+  * Remove 20securemount.dpatch, 30secmount_dev_fix.dpatch, 
+    40vserver-build.dpatch, 50dev_shm.dpatch, 60securecaps.dpatch
+    as these are included in the upstream source now
+
+ -- Micah Anderson <micah@debian.org>  Tue, 11 Nov 2008 11:00:53 -0500
+
 util-vserver (0.30.216~r2772-4) unstable; urgency=low
 
   * Added /dev/shm to be created on vserver build for POSIX 
Index: debian/rules
===================================================================
--- debian/rules	(revision 465)
+++ debian/rules	(working copy)
@@ -85,7 +85,8 @@
 				--infodir=\$${prefix}/share/info \
 				--sysconfdir=/etc --enable-dietlibc \
 				--localstatedir=/var \
-				--with-vrootdir=/var/lib/vservers
+				--with-vrootdir=/var/lib/vservers \
+				--without-python --disable-versioning
 
 build: patch build-stamp
 
Index: scripts/vsomething
===================================================================
--- scripts/vsomething	(revision 461)
+++ scripts/vsomething	(working copy)
@@ -112,7 +112,7 @@
 	      $_VSERVER "$i" status &> /dev/null || \
 		CHBIND_CMD=()
 	      callInNamespace "$i" \
-		"$_VNAMESPACE" --new -- \
+		$_VNAMESPACE --new -- \
 		"${CHBIND_CMD[@]}" \
 		"$VSOMETHING_WORKER" "$i" "$@" )
 	fi
Index: scripts/vserver.suexec
===================================================================
--- scripts/vserver.suexec	(revision 461)
+++ scripts/vserver.suexec	(working copy)
@@ -41,7 +41,7 @@
 	${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \
 	$_VSPACE --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
 	$_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
-	$_VCONTEXT $SILENT_OPT --migrate --chroot \
+	$_VCONTEXT $SILENT_OPT --migrate $OPT_VCONTEXT_CHROOT \
 	  --xid "$S_CONTEXT" --uid "$user" "${OPTS_VCONTEXT_ENTER[@]}" -- \
 	"$@"
     else
@@ -51,10 +51,12 @@
 	"${CHBIND_CMD[@]}" \
 	$_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \
 	$_VTAG --create "${OPTS_VTAG_CREATE[@]}" --silent -- \
+	$_VSPACE --new "${OPTS_VSPACE[@]}" ${USE_VNAMESPACE:+--mount --fs} -- \
         $_VCONTEXT --create "${OPTS_VCONTEXT_CREATE[@]}" -- \
-	$_VUNAME   --xid self --dir "$VSERVER_DIR"/uts     --missingok -- \
+	$_VSPACE --set "${OPTS_VSPACE[@]}" ${USE_VNAMESPACE:+--mount --fs} -- \
+	$_VUNAME   --xid self --dir "$VSERVER_DIR"/uts --missingok -- \
 	$_VUNAME   --xid self --set -t context="$VSERVER_DIR" -- \
-	$_VCONTEXT --migrate-self --endsetup --chroot $SILENT_OPT -- \
+	$_VCONTEXT --migrate-self --endsetup $OPT_VCONTEXT_CHROOT $SILENT_OPT -- \
 	"$@"
     fi
 else
Index: scripts/vserver.stop
===================================================================
--- scripts/vserver.stop	(revision 461)
+++ scripts/vserver.stop	(working copy)
@@ -85,7 +85,7 @@
     "${CHBIND_CMD[@]}" \
     "$_VSPACE" --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
     "$_VTAG" --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
-    $_VCONTEXT $SILENT_OPT --migrate --chroot --xid "$S_CONTEXT" -- \
+    $_VCONTEXT $SILENT_OPT --migrate $OPT_VCONTEXT_CHROOT --xid "$S_CONTEXT" -- \
     "${INITCMD_STOP[@]}" || fail=1
 else
     "${IONICE_CMD[@]}" \
Index: scripts/vserver.start
===================================================================
--- scripts/vserver.start	(revision 461)
+++ scripts/vserver.start	(working copy)
@@ -144,7 +144,7 @@
     ${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \
     ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
     $_VSPACE     --set "${OPTS_VSPACE[@]}" -- \
-    $_EXEC_REMOUNT -- \
+    $_EXEC_REMOUNT /proc /sys -- \
     $_VLIMIT     --dir "$VSERVER_DIR"/rlimits --missingok -- \
     $_VSCHED     --xid self --force "${OPTS_VSCHED[@]}" -- \
     $_VSYSCTL    --xid self --dir "$VSERVER_DIR"/sysctl --missingok -- \
@@ -155,7 +155,7 @@
     $_VATTRIBUTE --set "${OPTS_VATTRIBUTE[@]}" -- \
     $_SAVE_CTXINFO "$VSERVER_DIR" \
     $_ENV -i "${OPTS_ENV[@]}" \
-    $_VCONTEXT   --migrate-self --endsetup --chroot $SILENT_OPT \
+    $_VCONTEXT   --migrate-self --endsetup $OPT_VCONTEXT_CHROOT $SILENT_OPT \
     "${OPTS_VCONTEXT_MIGRATE[@]}" "${OPTS_VCONTEXT_ENTER[@]}" -- \
     "${INITCMD_START[@]}"
 else
Index: scripts/util-vserver-vars.pathsubst
===================================================================
--- scripts/util-vserver-vars.pathsubst	(revision 461)
+++ scripts/util-vserver-vars.pathsubst	(working copy)
@@ -84,7 +84,7 @@
 _VKILL="$__SBINDIR/vkill"
 _VLIMIT="$__SBINDIR/vlimit"
 _VMEMCTRL="$__SBINDIR/vmemctrl"
-_VNAMESPACE="$__SBINDIR/vnamespace"
+_VNAMESPACE="$__SBINDIR/vspace --mount --fs"
 _VPKG="$__PKGLIBDIR/vpkg"
 _VPROCUNHIDE="$__PKGLIBDIR/vprocunhide"
 _VPS="$__SBINDIR/vps"
Index: scripts/chcontext
===================================================================
--- scripts/chcontext	(revision 461)
+++ scripts/chcontext	(working copy)
@@ -101,7 +101,7 @@
 
 $_VSERVER_INFO - FEATURE migrate || exec $_CHCONTEXT_COMPAT "$@"
 
-tmp=$(getopt -o + --long cap:,ctx:,xid:,disconnect,domainname:,flag:,hostname:,secure,silent,help,version -n "$0" -- "$@") || exit 1
+tmp=$(getopt -o + --long cap:,ctx:,xid:,disconnect,domainname:,flag:,hostname:,secure,silent,help,version,spaces: -n "$0" -- "$@") || exit 1
 eval set -- "$tmp"
 
 OPT_CAPS=()
@@ -111,6 +111,7 @@
 OPT_SECURE=
 OPT_SILENT=
 OPT_INITPID=
+OPT_SPACES=--default
 
 while true; do
     case "$1" in
@@ -128,6 +129,7 @@
 	    ;;
 	--secure)	OPT_SECURE=1;;
 	--silent)	OPT_SILENT=1;;
+	--spaces)	OPT_SPACES=$2; shift;;
 	--)		shift; break;;
 	*)		echo $"chcontext: internal error; arg=='$1'" >&2; exit 1;;
     esac
@@ -135,6 +137,7 @@
 done
 
 create_cmd=( ${OPT_CTX:+$_VTAG --create --tag "$OPT_CTX" --silentexist --silent --}
+	     $_VSPACE --new $OPT_SPACES --
 	     $_VCONTEXT --create --silentexist
 	     ${OPT_SILENT:+--silent}
 	     ${OPT_CTX:+--xid "$OPT_CTX"} )
@@ -144,6 +147,10 @@
 old_IFS=$IFS
 IFS=,$IFS
 
+chain_cmd=( "${chain_cmd[@]}"
+		--
+		$_VSPACE --set $OPT_SPACES )
+
 test -z "$OPT_DOMAINNAME$OPT_HOSTNAME" || \
     chain_cmd=( "${chain_cmd[@]}"
 		--
@@ -165,7 +172,12 @@
 
 IFS=$old_IFS
 
-if test -z "$OPT_CTX" || $_VSERVER_INFO -q "$OPT_CTX" XIDTYPE static; then
+$_VSERVER_INFO -q "$OPT_CTX" XIDTYPE static
+is_static=$?
+test -z "$OPT_CTX"
+is_dynamic=$?
+
+if test "$is_dynamic" -eq 0 || test "$is_static" -eq 0; then
     "${create_cmd[@]}" "${chain_cmd[@]}" -- \
 	"${migrate_cmd[@]}" --endsetup --migrate-self -- "$@"
     rc=$?
@@ -173,6 +185,13 @@
     rc=254
 fi
 
-test "$rc" -ne 254 || exec "$_VTAG" --migrate --tag "$OPT_CTX" --silent -- \
-			   "${migrate_cmd[@]}" --xid "$OPT_CTX" --migrate -- "$@"
+if test "$is_static" -eq 0; then
+    migrate_cmd=( $_VTAG --migrate --tag "$OPT_CTX" --silent -- \
+		  $_VSPACE --enter "$OPT_CTX" $OPT_SPACES -- \
+		  "${migrate_cmd[@]}" )
+fi
+
+
+test "$rc" -ne 254 || exec "${migrate_cmd[@]}" --xid "$OPT_CTX" --migrate -- \
+			   "$@"
 exit $rc
Index: scripts/vserver-setup.functions
===================================================================
--- scripts/vserver-setup.functions	(revision 461)
+++ scripts/vserver-setup.functions	(working copy)
@@ -220,7 +220,7 @@
 
     test -z "$SETUP_FLAGS" || for i in "${SETUP_FLAGS[@]}"; do
 	echo "$i"
-    done >"$cfgdir"/flags
+    done >"$cfgdir"/cflags
 
     ln -s "$SETUP_LOCKFILE"   "$cfgdir"/run
 }
Index: scripts/vserver-build.yum
===================================================================
--- scripts/vserver-build.yum	(revision 461)
+++ scripts/vserver-build.yum	(working copy)
@@ -75,6 +75,9 @@
     "$__CONFDIR/.distributions/.common/pubkeys" \
     "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
 yum.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
+
+test -z "$1" || $_VYUM "$SETUP_CONFDIR" -- -y install "$@"
+
 $_VYUM "$SETUP_CONFDIR" -- clean all
 
 if $_VSERVER_INFO - FEATURE persistent; then
Index: scripts/vserver.functions
===================================================================
--- scripts/vserver.functions	(revision 462)
+++ scripts/vserver.functions	(working copy)
@@ -41,13 +41,14 @@
 declare -a OPTS_VCONTEXT_CREATE=()
 declare -a OPTS_VCONTEXT_MIGRATE=()
 declare -a OPTS_VCONTEXT_ENTER=()
+OPT_VCONTEXT_CHROOT=--chroot
 declare -a OPTS_VATTRIBUTE=( --flag fakeinit )
 declare -a OPTS_VSCHED=()
 declare -a OPTS_ENV=()
 declare -a OPTS_VTAG_CREATE=()
 declare -a OPTS_VTAG_ENTER=()
 declare -a OPTS_VMEMCTRL=()
-declare -a OPTS_VSPACE=()
+declare -a OPTS_VSPACE=( --default )
 
 declare -a STOPCMD_PREPARE=()
 
@@ -346,6 +347,13 @@
 	    INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
 	    ;;
 
+	(xarch)
+	    test -n "$RUNLEVEL_START" || RUNLEVEL_START=3
+	    INITCMD_START=( /etc/rc.multi )
+	    INITCMD_STOP=( /etc/rc.shutdown )
+	    INITCMD_PREPARE=( $_FAKE_RUNLEVEL "$RUNLEVEL_START" /var/run/utmp )
+	    ;;
+
 	(x) ;;
 	(*) panic "Unknown init-style '$INITSTYLE'; aborting";;
     esac
@@ -374,10 +382,12 @@
 function _generateFlagOptions
 {
     local vdir=$1
+    local file
 
     CHCONTEXT_FLAG_OPTS=()
 
-    test ! -e "$vdir"/flags || \
+    findFile file "$vdir"/cflags "$vdir"/flags ""
+    test -z "$file" || \
     while read flag; do
 	case x"$flag" in
 	    (x|x\#*)		;;
@@ -391,11 +401,13 @@
 				      --flag "$flag" )
 		;;
 	esac
-    done <"$vdir"/flags
+    done <"$file"
 
     isAvoidNamespace "$vdir" || {
 	USE_VNAMESPACE=1
 	CHCONTEXT_FLAG_OPTS=( "${CHCONTEXT_FLAG_OPTS[@]}" --flag namespace )
+	! $_VSERVER_INFO - FEATURE PIVOT_ROOT || \
+	    OPT_VCONTEXT_CHROOT=--pivot-root
     }
 }
 
@@ -931,6 +943,8 @@
     local ns_opt=$2
     local vdir=$1/vdir
     local mtab_src
+    local extra_opt=
+    local real_vdir
 
     test -e "$cfgdir"/fstab -o \
          -e "$cfgdir"/fstab.local -o \
@@ -951,8 +965,11 @@
     isNamespaceCleanup "$cfgdir" && \
         _namespaceCleanup "$cfgdir"
 
+    real_vdir=$(getPhysicalDir "$vdir")
+    ! $_VSERVER_INFO - FEATURE PIVOT_ROOT || \
+	extra_opt=,shared
     isAvoidNamespace "$cfgdir" || \
-	$_SECURE_MOUNT --rbind -n "$vdir" "/"
+	$_SECURE_MOUNT --rbind -n -o dev$extra_opt "$vdir" "$real_vdir"
 }
 
 function _umountVserverInternal
@@ -1454,7 +1471,7 @@
     if test -r "$dir"/name; then
 	read name < "$dir"/name
     else
-	read name < "$vdir"/name
+	name="$VSERVER_NAME"
     fi
 
     if test "$action" = "attach"; then
Index: scripts/Makefile-files
===================================================================
--- scripts/Makefile-files	(revision 461)
+++ scripts/Makefile-files	(working copy)
@@ -92,14 +92,15 @@
 				scripts/vdispatch-conf \
 				scripts/vemerge \
 				scripts/vesync \
+				scripts/vmount \
+				scripts/vnamespace \
 				scripts/vpstree \
 				scripts/vrpm \
 				scripts/vserver \
 				scripts/vsomething \
 				scripts/vtop \
 				scripts/vupdateworld \
-				scripts/vyum \
-				scripts/vmount
+				scripts/vyum
 
 scripts_sbin_gen_PRGS =
 scripts_sbincfg_gen_DTA =
Index: scripts/vserver-build.debootstrap
===================================================================
--- scripts/vserver-build.debootstrap	(revision 461)
+++ scripts/vserver-build.debootstrap	(working copy)
@@ -164,7 +164,7 @@
 export MIRROR
 test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE"  "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
 mv "$VDIR"/dev "$VDIR"/dev.X
-"$_VNAMESPACE" --new -- \
+$_VNAMESPACE --new -- \
     "$DEBOOTSTRAP" $options "$@" "$DISTRIBUTION" "$VDIR" "$MIRROR" "$script" || :   ## HACK: ignore all errors...
 fixupDebian "$VDIR"
 test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
Index: src/chxid.c
===================================================================
--- src/chxid.c	(revision 461)
+++ src/chxid.c	(working copy)
@@ -109,7 +109,7 @@
     exit(1);
   }
 
-  args->ctx            = vc_xidopt2xid(args->ctx_str, true, 0);
+  args->ctx            = vc_tagopt2tag(args->ctx_str, true, 0);
   args->do_display_dir = !args->do_recurse;
   args->do_display_dot = true;
 }
Index: src/vsysctl.c
===================================================================
--- src/vsysctl.c	(revision 461)
+++ src/vsysctl.c	(working copy)
@@ -157,7 +157,8 @@
     DIR		  *dp;
     struct dirent *de;
 
-    Echdir(PROC_SYS_DIRECTORY);
+    if (chdir(PROC_SYS_DIRECTORY) == -1)
+      goto exec;
 
     dp = opendir(dir);
     if (dp != NULL) {
@@ -176,6 +177,7 @@
     Efchdir(curdir);
   }
 
+exec:
   Eexecvp(argv[optind], argv+optind);
   return EXIT_FAILURE;
 }
Index: src/vcontext.c
===================================================================
--- src/vcontext.c	(revision 461)
+++ src/vcontext.c	(working copy)
@@ -24,6 +24,7 @@
 #include "lib/internal.h"
 #include "lib_internal/jail.h"
 #include "lib_internal/sys_personality.h"
+#include "lib_internal/sys_unshare.h"
 
 #include <vserver.h>
 #include <getopt.h>
@@ -36,6 +37,7 @@
 #include <sys/types.h>
 #include <pwd.h>
 #include <grp.h>
+#include <sys/mount.h>
 
 #include <linux/personality.h>
 
@@ -66,6 +68,7 @@
 #define CMD_PERSTYPE		0x400e
 #define CMD_PERSFLAG		0x400f
 #define CMD_VLOGIN		0x4010
+#define CMD_PIVOT_ROOT		0x4011
 
 
 struct option const
@@ -90,6 +93,7 @@
   { "personality-type",  required_argument, 0, CMD_PERSTYPE },
   { "personality-flags", required_argument, 0, CMD_PERSFLAG },
   { "vlogin",       no_argument,        0, CMD_VLOGIN },
+  { "pivot-root",   no_argument,        0, CMD_PIVOT_ROOT },
 #if 1  
   { "fakeinit",     no_argument,       	0, CMD_INITPID },	// compatibility
 #endif  
@@ -110,6 +114,7 @@
     uint_least32_t	personality_type;
     int			verbosity;
     bool		do_chroot;
+    bool		do_pivot_root;
     char const *	uid;
     xid_t		xid;
     char const *	sync_sock;
@@ -274,10 +279,40 @@
     if (args->do_chroot) {
       Echroot(".");
       if (args->set_namespace) {
-	if (args->do_migrateself)  Evc_set_namespace(xid, CLONE_NEWNS|CLONE_FS);
-	else if (args->do_migrate) Evc_enter_namespace(xid, CLONE_NEWNS|CLONE_FS);
+	if (args->do_migrateself)  Evc_set_namespace(xid, CLONE_NEWNS|CLONE_FS, 0);
+	else if (args->do_migrate) Evc_enter_namespace(xid, CLONE_NEWNS|CLONE_FS, 0);
       }
     }
+    else if (args->do_pivot_root) {
+      if (vc_enter_namespace(xid, CLONE_NEWNS | CLONE_FS, 1) == -1) {
+	bool existed = false;
+	if (sys_unshare(CLONE_NEWNS) == -1) {
+	  perror(ENSC_WRAPPERS_PREFIX "unshare(NEWNS)");
+	  return wrapper_exit_code;
+	}
+	if (mkdir("./.oldroot", 0700) == -1) {
+	  if (errno == EEXIST)
+	    existed = true;
+	  else {
+	    perror(ENSC_WRAPPERS_PREFIX "mkdir()");
+	    return wrapper_exit_code;
+	  }
+	}
+	if (pivot_root(".", "./.oldroot") == -1) {
+	  perror(ENSC_WRAPPERS_PREFIX "pivot_root()");
+	  return wrapper_exit_code;
+	}
+	if (umount2("/.oldroot", MNT_DETACH) == -1) {
+	  perror(ENSC_WRAPPERS_PREFIX "umount2()");
+	  return wrapper_exit_code;
+	}
+	if (!existed && rmdir("/.oldroot") == -1) {
+	  perror(ENSC_WRAPPERS_PREFIX "rmdir()");
+	  return wrapper_exit_code;
+	}
+	Evc_set_namespace(xid, CLONE_NEWNS | CLONE_FS, 1);
+      }
+    }
 
     setFlags(args, xid);
 
@@ -405,6 +440,7 @@
       case CMD_VLOGIN		:  args.do_vlogin      = true;   break;
       case CMD_INITPID		:  args.is_initpid     = true;   break;
       case CMD_CHROOT		:  args.do_chroot      = true;   break;
+      case CMD_PIVOT_ROOT	:  args.do_pivot_root  = true;   break;
       case CMD_NAMESPACE	:  args.set_namespace  = true;   break;
       case CMD_SILENTEXIST	:  args.is_silentexist = true;   break;
       case CMD_SYNCSOCK		:  args.sync_sock      = optarg; break;
Index: src/vspace.c
===================================================================
--- src/vspace.c	(revision 461)
+++ src/vspace.c	(working copy)
@@ -49,15 +49,25 @@
   { "new",        no_argument,       0, 'n' },
   { "enter",      required_argument, 0, 'e' },
   { "set",        no_argument,       0, 's' },
+  { "index",      required_argument, 0, 'i' },
   { "mask",       required_argument, 0, 'm' },
+  { "default",    no_argument,       0, 'd' },
+  { "~default",   no_argument,       0, 'd' | 0x10000 },
 
   { "mount",      no_argument,       0, 'M' },
+  { "~mount",     no_argument,       0, 'M' | 0x10000 },
   { "fs",         no_argument,       0, 'F' },
+  { "~fs",        no_argument,       0, 'F' | 0x10000 },
   { "ipc",        no_argument,       0, 'I' },
+  { "~ipc",       no_argument,       0, 'I' | 0x10000 },
   { "uts",        no_argument,       0, 'U' },
+  { "~uts",       no_argument,       0, 'U' | 0x10000 },
   { "user",       no_argument,       0, 'S' },
+  { "~user",      no_argument,       0, 'S' | 0x10000 },
   { "pid",        no_argument,       0, 'P' },
+  { "~pid",       no_argument,       0, 'P' | 0x10000 },
   { "net",        no_argument,       0, 'N' },
+  { "~net",       no_argument,       0, 'N' | 0x10000 },
   {0,0,0,0}
 };
 
@@ -80,6 +90,7 @@
 	    "<spaces>* specifies the spaces to manipulate.\n"
 	    "It can be any combination of:\n"
 	    "    --mask <mask>     ...  specify a mask of spaces\n"
+	    "    --default         ...  the default spaces for this kernel\n"
 	    "    --mount           ...  the mount namespace\n"
 	    "    --fs              ...  the fs_struct\n"
 	    "    --ipc             ...  the IPC namespace\n"
@@ -110,10 +121,6 @@
 {
   pid_t pid;
 
-  /* optimize default case */
-  if (mask == 0)
-    return;
-
   mask &= ~CLONE_FS;
 
   signal(SIGCHLD, SIG_DFL);
@@ -136,18 +143,18 @@
 }
 
 static void
-enterSpaces(xid_t xid, uint_least64_t mask)
+enterSpaces(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  if (vc_enter_namespace(xid, mask)==-1) {
+  if (vc_enter_namespace(xid, mask, index)==-1) {
     perror(ENSC_WRAPPERS_PREFIX "vc_enter_namespace()");
     exit(wrapper_exit_code);
   }
 }
 
 static void
-setSpaces(xid_t xid, uint_least64_t mask)
+setSpaces(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  if (vc_set_namespace(xid, mask)==-1) {
+  if (vc_set_namespace(xid, mask, index)==-1) {
     perror(ENSC_WRAPPERS_PREFIX "vc_set_namespace()");
     exit(wrapper_exit_code);
   }
@@ -159,14 +166,16 @@
   bool			do_enter   = false;
   bool			do_set     = false;
   uint_least64_t	mask       = 0;
+  uint32_t		index      = 0;
   xid_t			xid        = VC_NOCTX;
   int			sum        = 0;
   
   while (1) {
-    int		c = getopt_long(argc, argv, "+nsce:m:" "MFIUSPN", CMDLINE_OPTIONS, 0);
+    int			c = getopt_long(argc, argv, "+nsce:m:" "MFIUSPN", CMDLINE_OPTIONS, 0);
+    uint_least64_t	thisbit = 0;
     if (c==-1) break;
 
-    switch (c) {
+    switch (c & 0xFFFF) {
       case CMD_HELP	:  showHelp(1, argv[0], 0);
       case CMD_VERSION	:  showVersion();
       case 'n'		:  do_new     = true; break;
@@ -175,6 +184,17 @@
 	do_enter = true;
 	xid      = Evc_xidopt2xid(optarg,true);
 	break;
+      case 'i'		:  {
+	unsigned long	index_l;
+	if (!isNumberUnsigned(optarg, &index_l, true)) {
+	  WRITE_MSG(2, "Invalid index '");
+	  WRITE_STR(2, optarg);
+	  WRITE_MSG(2, "'; try '--help' for more information\n");
+	  return wrapper_exit_code;
+	}
+	index = (uint32_t)index_l;
+	break;
+      }
       case 'm'		:  {
 	unsigned long	mask_l;
 	if (!isNumberUnsigned(optarg, &mask_l, true)) {
@@ -186,13 +206,21 @@
 	mask = mask_l;
 	break;
       }
-      case 'M'		:  mask |= CLONE_NEWNS;		break;
-      case 'F'		:  mask |= CLONE_FS;		break;
-      case 'I'		:  mask |= CLONE_NEWIPC;	break;
-      case 'U'		:  mask |= CLONE_NEWUTS;	break;
-      case 'S'		:  mask |= CLONE_NEWUSER;	break;
-      case 'P'		:  mask |= CLONE_NEWPID;	break;
-      case 'N'		:  mask |= CLONE_NEWNET;	break;
+      case 'M'		:  thisbit = CLONE_NEWNS;	break;
+      case 'F'		:  thisbit = CLONE_FS;		break;
+      case 'I'		:  thisbit = CLONE_NEWIPC;	break;
+      case 'U'		:  thisbit = CLONE_NEWUTS;	break;
+      case 'S'		:  thisbit = CLONE_NEWUSER;	break;
+      case 'P'		:  thisbit = CLONE_NEWPID;	break;
+      case 'N'		:  thisbit = CLONE_NEWNET;	break;
+      case 'd'		:
+	thisbit = vc_get_space_default();
+	if (thisbit == (__typeof__(thisbit)) -1) {
+	  thisbit = vc_get_space_mask();
+	  if (thisbit == (__typeof__(thisbit)) -1)
+	    thisbit = 0;
+	}
+	break;
 
       default		:
 	WRITE_MSG(2, "Try '");
@@ -201,6 +229,11 @@
 	return 255;
 	break;
     }
+    /* ~ option used */
+    if (c & 0xFFFF0000)
+      mask &= ~thisbit;
+    else
+      mask |= thisbit;
   }
 
   sum = ((do_new ? 1 : 0) + (do_enter ? 1 : 0) +
@@ -214,8 +247,8 @@
     WRITE_MSG(2, "No command specified; try '--help' for more information\n");
   else {
     if      (do_new)     newSpaces(mask);
-    else if (do_set)     setSpaces(VC_SAMECTX, mask);
-    else if (do_enter)   enterSpaces(xid, mask);
+    else if (do_set)     setSpaces(VC_SAMECTX, mask, index);
+    else if (do_enter)   enterSpaces(xid, mask, index);
 
     if (optind<argc)
       EexecvpD(argv[optind], argv+optind);
Index: src/vserver-info.c
===================================================================
--- src/vserver-info.c	(revision 461)
+++ src/vserver-info.c	(working copy)
@@ -189,7 +189,7 @@
   struct __user_cap_header_struct header;
   struct __user_cap_data_struct user[2];
 
-  header.version = _LINUX_CAPABILITY_VERSION_2;
+  header.version = _LINUX_CAPABILITY_VERSION_3;
   header.pid     = 0;
 
   if (getuid()!=0) {
@@ -205,7 +205,7 @@
 retry:
   if (capget(&header, user)==-1) {
     if (!retried &&
-	header.version != _LINUX_CAPABILITY_VERSION_2) {
+	header.version != _LINUX_CAPABILITY_VERSION_3) {
       header.version = _LINUX_CAPABILITY_VERSION_1;
       retried = 1;
       goto retry;
Index: src/exec-remount.c
===================================================================
--- src/exec-remount.c	(revision 461)
+++ src/exec-remount.c	(working copy)
@@ -38,24 +38,85 @@
 
 #define CMD_HELP		0x1000
 #define CMD_VERSION		0x1001
+#define CMD_MTAB		0x2001
 
+static struct option const
+CMDLINE_OPTIONS[] = {
+  { "help",	no_argument,       0, CMD_HELP },
+  { "version",	no_argument,       0, CMD_VERSION },
+  { "mtab",	required_argument, 0, CMD_MTAB },
+  { NULL, 0, 0, 0 }
+};
+
 int		wrapper_exit_code  =  255;
 
+static void
+showHelp(int fd, char const *cmd, int res)
+{
+  WRITE_MSG(fd, "Usage:\n    ");
+  WRITE_STR(fd, cmd);
+  WRITE_MSG(fd, " [--mtab <file>] <mount points>* -- <command> <args>*\n");
+  WRITE_MSG(fd, "\n"
+		"Please report bugs to " PACKAGE_BUGREPORT "\n");
+  exit(res);
+}
+
+static void
+showVersion(void)
+{
+  WRITE_MSG(1,
+	"exec-remount " VERSION " -- remounts specified mount points and executes a program\n"
+	"This program is part of " PACKAGE_STRING "\n\n"
+	"Copyright (c) 2008 Daniel Hokka Zakrisson\n"
+	VERSION_COPYRIGHT_DISCLAIMER);
+  exit(0);
+}
+
+static void
+do_remount(char const *mount)
+{
+  /* FIXME: Read this from mtab */
+  if (strcmp(mount, "/proc") == 0)
+    Emount("proc", "proc", "proc", 0, NULL);
+  else if (strcmp(mount, "/sys") == 0)
+    Emount("sysfs", "sys", "sysfs", 0, NULL);
+  else {
+    WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "unknown mount point: ");
+    WRITE_STR(2, mount);
+    WRITE_MSG(2, "\n");
+  }
+}
+
 int main(int argc, char *argv[])
 {
-	int i = 1;
-	if (vc_isSupported(vcFEATURE_PIDSPACE)) {
-		/* FIXME: Get options from etc/mtab
-		 *	  Get list of filesystems from argv
-		 */
-		if (umount("proc") == 0)
-			Emount("proc", "proc", "proc", 0, NULL);
-		if (umount("sys") == 0)
-			Emount("sysfs", "sys", "sysfs", 0, NULL);
-	}
-	if (strcmp(argv[i], "--") == 0)
-		i++;
-	EexecvpD(argv[i], argv+i);
-	/* NOTREACHED */
-	return 1;
+  int i;
+  char const *mtab = "/etc/mtab";
+
+  while (1) {
+    int c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
+    if (c==-1) break;
+
+    switch (c) {
+      case CMD_HELP	:  showHelp(1, argv[0], 0);
+      case CMD_VERSION	:  showVersion();
+      case CMD_MTAB	:  mtab = optarg; break;
+      default		:  showHelp(2, argv[0], 1);
+    }
+  }
+
+  for (i = optind; argv[i] != NULL && strcmp(argv[i], "--") != 0; i++) {
+    if (vc_isSupported(vcFEATURE_PIDSPACE)) {
+      /* + 1 to strip the leading / */
+      if (umount2(argv[i] + 1, MNT_DETACH) == 0)
+	do_remount(argv[i]);
+    }
+  }
+
+  if (argv[i] == NULL)
+    showHelp(2, argv[0], 1);
+
+  i++;
+  EexecvpD(argv[i], argv+i);
+  /* NOTREACHED */
+  return 1;
 }
Index: src/vclone.c
===================================================================
--- src/vclone.c	(revision 461)
+++ src/vclone.c	(working copy)
@@ -125,6 +125,7 @@
   else {
     PathInfo		dst_path = global_info.dst;
     char		dst_path_buf[ENSC_PI_APPSZ(dst_path, *src_path)];
+    struct stat		dst_st;
 
     if (S_ISDIR(st->st_mode))
       *is_dir = true;
@@ -135,13 +136,13 @@
 	Vwrite(1, src_path->d, src_path->l);
 	WRITE_MSG(1, "' (excluded)\n");
       }
-      return false;
+      return true;
     }
 
     PathInfo_append(&dst_path, src_path, dst_path_buf);
 
     /* skip files that already exist */
-    if (access(dst_path.d, F_OK)!=-1) {
+    if (lstat(dst_path.d, &dst_st)!=-1) {
       if (Global_getVerbosity() > 1) {
 	WRITE_MSG(1, "  skipping '");
 	Vwrite(1, src_path->d, src_path->l);
Index: src/rpm-fake.c
===================================================================
--- src/rpm-fake.c	(revision 461)
+++ src/rpm-fake.c	(working copy)
@@ -423,13 +423,13 @@
   struct __user_cap_header_struct header;
   struct __user_cap_data_struct user[2];
   
-  header.version = _LINUX_CAPABILITY_VERSION_2;
+  header.version = _LINUX_CAPABILITY_VERSION_3;
   header.pid     = 0;
 
 retry:
   if (capget(&header, user)==-1) {
     if (!retried &&
-	header.version != _LINUX_CAPABILITY_VERSION_2) {
+	header.version != _LINUX_CAPABILITY_VERSION_3) {
       header.version = _LINUX_CAPABILITY_VERSION_1;
       retried = 1;
       goto retry;
Index: src/capability-compat.h
===================================================================
--- src/capability-compat.h	(revision 461)
+++ src/capability-compat.h	(working copy)
@@ -34,6 +34,6 @@
 #  define _LINUX_CAPABILITY_VERSION_1	_LINUX_CAPABILITY_VERSION
 #endif
 
-#ifndef _LINUX_CAPABILITY_VERSION_2
-#  define _LINUX_CAPABILITY_VERSION_2	0x20071026
+#ifndef _LINUX_CAPABILITY_VERSION_3
+#  define _LINUX_CAPABILITY_VERSION_3	0x20080522
 #endif
Index: src/secure-mount.c
===================================================================
--- src/secure-mount.c	(revision 462)
+++ src/secure-mount.c	(working copy)
@@ -153,6 +153,11 @@
   { "noauto",     0,              0,               XFLAG_NOAUTO, false },
   { "user",       0,              0,               0, false },
   { "nouser",     0,              0,               0, false },
+  { "rec",        MS_REC,         MS_REC,          0, false },
+  { "unbindable", MS_UNBINDABLE,  MS_UNBINDABLE,   0, false },
+  { "private",    MS_PRIVATE,     MS_PRIVATE,      0, false },
+  { "slave",      MS_SLAVE,       MS_SLAVE,        0, false },
+  { "shared",     MS_SHARED,      MS_SHARED,       0, false },
 };
 
 int			wrapper_exit_code = 1;
@@ -436,6 +441,20 @@
       perror("secure-mount: mount()");
       return false;
     }
+    if ((mnt->flag & MS_BIND) &&
+	(mnt->flag & ~(MS_BIND|MS_REC))) {
+      /* This is needed to put us in the new mountpoint */
+      if (!secureChdir(mnt->dst, opt))
+	return false;
+      if (mount(mnt->src, ".",
+		mnt->type ? mnt->type : "",
+		((mnt->flag & ~(MS_BIND|MS_REC)) |
+		MS_REMOUNT), NULL) == -1 &&
+	  errno != EBUSY) { /* Returned on older kernels */
+	perror("secure-mount: mount()");
+	return false;
+      }
+    }
   }
   else if (!callExternalMount(mnt))
     return false;
Index: src/Makefile-files
===================================================================
--- src/Makefile-files	(revision 461)
+++ src/Makefile-files	(working copy)
@@ -60,7 +60,6 @@
 			src/sigexec \
 			src/vattribute \
 			src/vlimit \
-			src/vnamespace \
 			src/vunify \
 			src/vuname \
 			src/rpm-fake-resolver \
@@ -158,7 +157,6 @@
 			src/vcontext \
 			src/vlimit \
 			src/vkill \
-			src/vnamespace \
 			src/vrsetup \
 			src/vsched \
 			src/vserver-stat \
@@ -248,10 +246,6 @@
 src_vattribute_LDADD =		$(VSERVER_LDADDS)
 src_vattribute_LDFLAGS =	$(VSERVER_LDFLGS)
 
-src_vnamespace_SOURCES =	src/vnamespace.c
-src_vnamespace_LDADD =		$(VSERVER_LDADDS) $(LIBINTERNAL)
-src_vnamespace_LDFLAGS =	$(VSERVER_LDFLGS)
-
 src_rpm_fake_resolver_SOURCES	=  src/rpm-fake-resolver.c
 src_rpm_fake_resolver_LDADD	=  $(VSERVER_LDADDS)
 src_rpm_fake_resolver_LDFLAGS	=  $(VSERVER_LDFLGS)
Index: configure.ac
===================================================================
--- configure.ac	(revision 461)
+++ configure.ac	(working copy)
@@ -57,7 +57,7 @@
 ENSC_PATHPROG(RMMOD,     rmmod)
 ENSC_PATHPROG(VCONFIG,   vconfig,, [See http://www.candelatech.com/~greear/vlan.html; usually this tool is shipped in the 'vconfig' or 'vlan' package of your distribution])
 ENSC_PATHPROG(WGET,      wget)
-ENSC_PATHPROG(IONICE,    ionice)
+ENSC_PATHPROG(IONICE,    ionice,,  [This is usually shipped in the 'util-linux(-ng)' or 'schedutils' package])
 ENSC_PATHPROG(FILE,      file,    [file])
 ENSC_PATHPROG(GZIP,      gzip,    [gzip])
 ENSC_PATHPROG(BZIP2,     bzip2,   [bzip2])
@@ -315,15 +315,15 @@
 dnl
 dnl {crypto stuff
 dnl
-AC_MSG_CHECKING([for used crypto API])
 AC_ARG_WITH(crypto-api,
             AC_HELP_STRING([--with-crypto-api=API],
                            [select crypto api to be used; possible values are `none', `nss', `beecrypt', `auto' (default:auto)]),
 	    [case $withval in
 		(none|nss|beecrypt|auto)	ensc_crypto_api=$withval;;
+		(yes)				ensc_crypto_api=auto;;
+		(no)				ensc_crypto_api=none;;
 		(*)	AC_MSG_ERROR([invalid crypto-api value, only none,nss,beecrypt,auto are supported]);;
 	     esac],[ensc_crypto_api=auto])
-AC_MSG_RESULT($ensc_crypto_api)
 
 
 dnl Now, check for matching crypto api. When selected 'auto', the
@@ -379,8 +379,7 @@
 (nss)	PKG_CHECK_MODULES(NSS, nss);;
 (auto)	PKG_CHECK_MODULES(NSS, nss, [
 		AC_MSG_NOTICE([using NSS as crypto api])
-		ensc_crypto_api=nss],
-                AC_MSG_RESULT(no));;
+		ensc_crypto_api=nss]);;
 esac
 
 dnl
@@ -405,14 +404,14 @@
 	ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
 	;;
 
-(none)
+(none|auto)
 	ENSC_HAVE_CRYPTO=false
 	ENSC_CRYPTO_API=ENSC_CRYPTO_API_NONE
 	ENSC_CRYPTO_CFLAGS=
 	ENSC_CRYPTO_LIB=
 	ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
 
-	AC_MSG_WARN([No crypto api found/select. This will disable the build of `vhashify'])
+	AC_MSG_WARN([No crypto api found/select. This will disable the build of 'vhashify'])
 	;;
 
 (*)	AC_MSG_ERROR([internal error])
@@ -450,6 +449,46 @@
 AM_CONDITIONAL(HAVE_SYSV_INIT, test x"$ensc_with_init" = xsysv)
 
 
+dnl ########################
+dnl Check for Python
+
+ensc_have_python=yes
+AM_PATH_PYTHON(,, [:])
+if test "x$PYTHON" = x:; then
+	ensc_have_python=no
+fi
+if test x$ensc_have_python = xyes; then
+	PYTHON_CFLAGS=-I`$PYTHON -c 'from distutils.sysconfig import get_python_inc; print get_python_inc(1)'`
+	PYTHON_LDFLAGS=-L`$PYTHON -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`
+	AC_SUBST(PYTHON_CFLAGS)
+	AC_SUBST(PYTHON_LDFLAGS)
+else
+	ensc_have_python=no
+fi
+AC_PATH_PROG([CTAGS], [ctags], [no])
+if test "x$CTAGS" = xno; then
+	ensc_have_python=no
+fi
+AM_CONDITIONAL([HAVE_PYTHON], [test x$ensc_have_python = xyes])
+
+dnl Python stuff ends here
+dnl ########################
+
+
+dnl ########################
+dnl Library versioning
+
+ensc_have_versioning=yes
+AC_ARG_ENABLE(versioning, AC_HELP_STRING([--disable-versioning], [Disable library versioning]), [ensc_have_versioning="$enableval"])
+AM_CONDITIONAL([HAVE_VERSIONING], [test "x$ensc_have_versioning" = xyes])
+if test "x$ensc_have_versioning" = xyes; then
+	AC_DEFINE([HAVE_VERSIONING], [1], [Define this to use library versioning])
+fi
+
+dnl /Library versioning
+dnl ########################
+
+
 dnl BIG HACK! Do some autodetection here!
 AC_DEFINE(UTMP_GID, [22], [The utmp gid-number])
 
@@ -493,6 +532,8 @@
     syscall(2) invocation: $with_syscall
       vserver(2) syscall#: $ensc_cv_value_syscall_vserver
                crypto api: $ensc_crypto_api
+          python bindings: $ensc_have_python
+   use library versioning: $ensc_have_versioning
    
 Paths:
                    prefix: $prefix
Index: sysv/util-vserver
===================================================================
--- sysv/util-vserver	(revision 461)
+++ sysv/util-vserver	(working copy)
@@ -60,6 +60,13 @@
     $_MOUNT -t cgroup -o "$CGROUP_SUBSYS" vserver "$CGROUP_MNT"
 }
 
+function umount_cgroup()
+{
+    _generateCgroupOptions
+    test -n "$CGROUP_MNT" || return 0
+    $_UMOUNT "$CGROUP_MNT"
+}
+
 function start()
 {
     _beginResult $"Creating required directories"
@@ -91,6 +98,11 @@
     kill_contexts
     _endResult $?
     local retval=$?
+    if hasCgroup; then
+	_beginResult $"Unmounting cgroup-hierarchy"
+	umount_cgroup
+	_endResult $?
+    fi
     $_RM -f "$lockfile"
     return $retval
 }
Index: doc/configuration.xml
===================================================================
--- doc/configuration.xml	(revision 461)
+++ doc/configuration.xml	(working copy)
@@ -616,52 +616,18 @@
 values.
       </description>
     </list>
-    <list name="flags">
+    <list name="cflags" id="cflags" since="0.30.216">
       <description>
 Contains per line a flag. See <ulink
 url="http://svn.linux-vserver.org/svn/util-vserver/trunk/lib/cflags-v13.c";>lib/cflags-v13.c</ulink>
 for possible values.
       </description>
-      <!--
-      <elements>
-	<element name="fakeinit">
-	  <description>
-The new process will believe it is process number 1. Useful to run a
-real /sbin/init in a vserver. Warning: this flag should not be used
-unless you know what you are doing. Often, it is better to use the
-'plain' initstyle.
-          </description>
-	</element>
-	<element name="lock">
-	  <description>
-The new process is trapped and can't use chcontext anymore.
-          </description>
-	</element>
-	<element name="sched">
-	  <description>
-The new process and its children will share a common
-          </description>
-	</element>
-	<element name="nproc">
-	  <description>
-Limit the number of process in the vserver according to
-ulimit setting. Normally, ulimit is a per user thing.
-With this flag, it becomes a per vserver thing.
-          </description>
-	</element>
-	<element name="private">
-	  <description>
-No one can join this security context once created.
-          </description>
-	</element>
-	<element name="ulimit">
-	  <description>
-Apply the current ulimit to the whole context
-          </description>
-	</element>
-      </elements>
-      -->
     </list>
+    <list name="flags">
+      <description>
+Old name for <optionref>cflags</optionref>. Deprecated.
+      </description>
+    </list>
     <list name="nflags" since="0.30.212">
       <description>
 Contains a network flag per line. See <ulink
Index: lib/syscall_enternamespace-v21.hc
===================================================================
--- lib/syscall_enternamespace-v21.hc	(revision 461)
+++ lib/syscall_enternamespace-v21.hc	(working copy)
@@ -24,8 +24,12 @@
 #include "vserver.h"
 
 static inline ALWAYSINLINE int
-vc_enter_namespace_spaces(xid_t xid, uint_least64_t mask)
+vc_enter_namespace_spaces(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  struct vcmd_space_mask data = { .mask = mask };
-  return vserver(VCMD_enter_space, CTX_USER2KERNEL(xid), &data);
+  struct vcmd_space_mask_v1 data = { .mask = mask };
+  if (index != 0) {
+    errno = EINVAL;
+    return -1;
+  }
+  return vserver(VCMD_enter_space_v1, CTX_USER2KERNEL(xid), &data);
 }
Index: lib/syscall_getspacemask-v21.hc
===================================================================
--- lib/syscall_getspacemask-v21.hc	(revision 461)
+++ lib/syscall_getspacemask-v21.hc	(working copy)
@@ -24,9 +24,9 @@
 static inline ALWAYSINLINE uint_least64_t
 vc_get_space_mask_spaces(int UNUSED tmp)
 {
-  struct vcmd_space_mask data = { .mask = 0 };
-  int ret = vserver(VCMD_get_space_mask, 0, &data);
+  struct vcmd_space_mask_v1 data = { .mask = 0 };
+  int ret = vserver(VCMD_get_space_mask_v0, 0, &data);
   if (ret)
     return ret;
-  return data.mask;
+  return data.mask & ~(CLONE_NEWNS|CLONE_FS);
 }
Index: lib/syscall_ctxmigrate.c
===================================================================
--- lib/syscall_ctxmigrate.c	(revision 461)
+++ lib/syscall_ctxmigrate.c	(working copy)
@@ -36,16 +36,11 @@
 #  include "syscall_ctxmigrate-v21.hc"
 #endif
 
-#if defined(VC_ENABLE_API_V23)
-#  include "syscall_ctxmigrate-v23.hc"
-#endif
-
 #if defined(VC_ENABLE_API_V13) || defined(VC_ENABLE_API_V21)
 int
 vc_ctx_migrate(xid_t xid, uint_least64_t flags)
 {
-  CALL_VC(CALL_VC_V23P  (vc_ctx_migrate, xid, flags),
-	  CALL_VC_SPACES(vc_ctx_migrate, xid, flags),
+  CALL_VC(CALL_VC_SPACES(vc_ctx_migrate, xid, flags),
 	  CALL_VC_V13A  (vc_ctx_migrate, xid));
 }
 #endif
Index: lib/syscall_enternamespace-v13.hc
===================================================================
--- lib/syscall_enternamespace-v13.hc	(revision 461)
+++ lib/syscall_enternamespace-v13.hc	(working copy)
@@ -23,9 +23,13 @@
 #include "vserver.h"
 
 static inline ALWAYSINLINE int
-vc_enter_namespace_v13(xid_t xid, uint_least64_t mask)
+vc_enter_namespace_v13(xid_t xid, uint_least64_t mask, uint32_t index)
 {
   if ((mask & (CLONE_NEWNS|CLONE_FS)) == 0)
     return 0;
+  if (index != 0) {
+    errno = EINVAL;
+    return -1;
+  }
   return vserver(VCMD_enter_space_v0, CTX_USER2KERNEL(xid), 0);
 }
Index: lib/vserver.h
===================================================================
--- lib/vserver.h	(revision 461)
+++ lib/vserver.h	(working copy)
@@ -141,6 +141,9 @@
 #define VC_CAP_LEASE            	28
 #define VC_CAP_AUDIT_WRITE          	29
 #define VC_CAP_AUDIT_CONTROL          	30
+#define VC_CAP_SETFCAP			31
+#define VC_CAP_MAC_OVERRIDE		32
+#define VC_CAP_MAC_ADMIN		33
 
 #define VC_IMMUTABLE_FILE_FL		0x0000010lu
 #define VC_IMMUTABLE_LINK_FL		0x0008000lu
@@ -761,8 +764,8 @@
 				char *val, size_t len)       VC_ATTR_NONNULL((3));
 
     /* namespace related functions */
-  int		vc_enter_namespace(xid_t xid, uint_least64_t mask);
-  int		vc_set_namespace(xid_t xid, uint_least64_t mask);
+  int		vc_enter_namespace(xid_t xid, uint_least64_t mask, uint32_t index);
+  int		vc_set_namespace(xid_t xid, uint_least64_t mask, uint32_t index);
   int		vc_cleanup_namespace(void);
   uint_least64_t vc_get_space_mask(void);
   uint_least64_t vc_get_space_default(void);
@@ -971,6 +974,7 @@
                  vcFEATURE_VSHELPER0, vcFEATURE_VSHELPER, vcFEATURE_VWAIT,
 		 vcFEATURE_VNET,   vcFEATURE_VSTAT,   vcFEATURE_PPTAG,
 		 vcFEATURE_PIDSPACE, vcFEATURE_SPACES, vcFEATURE_PERSISTENT,
+		 vcFEATURE_PIVOT_ROOT,
 		 }
     vcFeatureSet;
 
Index: lib/issupported.c
===================================================================
--- lib/issupported.c	(revision 461)
+++ lib/issupported.c	(working copy)
@@ -49,7 +49,8 @@
     case vcFEATURE_VSTAT	:  return ver >= 0x00020103;
     case vcFEATURE_PPTAG	:  return conf & VC_VCI_PPTAG;
     case vcFEATURE_SPACES	:  return conf & VC_VCI_SPACES;
-    case vcFEATURE_PIDSPACE	:  return ver >= 0x00020304 || ver >= 0x00020201;
+    case vcFEATURE_PIVOT_ROOT	:  return ver >= 0x00020304;
+    case vcFEATURE_PIDSPACE	:  return ver >= 0x00020305;
     default			:  assert(false); 
   }
 
Index: lib/Makefile-files
===================================================================
--- lib/Makefile-files	(revision 461)
+++ lib/Makefile-files	(working copy)
@@ -158,10 +158,11 @@
 				lib/syscall_getbadness-v23.hc \
 				lib/syscall_setbadness.c \
 				lib/syscall_setbadness-v23.hc \
-				lib/syscall_ctxcreate-v23.hc \
-				lib/syscall_ctxmigrate-v23.hc \
 				lib/syscall_getspacedefault.c \
-				lib/syscall_getspacedefault-v23.hc
+				lib/syscall_getspacedefault-v23.hc \
+				lib/syscall_setnamespace-v23.hc \
+				lib/syscall_enternamespace-v23.hc \
+				lib/syscall_getspacemask-v23.hc
 
 if ENSC_HAVE_C99_COMPILER
 lib_v13_SRCS +=			lib/syscall_adddlimit-v13.hc \
@@ -254,6 +255,10 @@
 lib_libvserver_la_SOURCES =  	$(lib_SRCS)
 lib_libvserver_la_CPPFLAGS = 	$(AM_CPPFLAGS) $(LIB_DEBUG_CPPFLAGS)
 lib_libvserver_la_LDFLAGS =	-version $(lib_VERSION)
+if HAVE_VERSIONING
+lib_libvserver_la_LDFLAGS +=	-Wl,-version-script=$(top_srcdir)/lib/libvserver.ver
+EXTRA_DIST +=			lib/libvserver.ver
+endif
 
 lib_libvserver_a_SOURCES =  	$(lib_SRCS)
 lib_libvserver_a_CPPFLAGS = 	$(AM_CPPFLAGS) $(LIB_DEBUG_CPPFLAGS)
Index: lib/syscall_ctxcreate.c
===================================================================
--- lib/syscall_ctxcreate.c	(revision 461)
+++ lib/syscall_ctxcreate.c	(working copy)
@@ -36,16 +36,11 @@
 #  include "syscall_ctxcreate-v21.hc"
 #endif
 
-#if defined(VC_ENABLE_API_V23)
-#  include "syscall_ctxcreate-v23.hc"
-#endif
-
 #if defined(VC_ENABLE_API_V13) || defined(VC_ENABLE_API_V21)
 xid_t
 vc_ctx_create(xid_t xid, struct vc_ctx_flags *flags)
 {
-  CALL_VC(CALL_VC_V23P(vc_ctx_create, xid, flags),
-	  CALL_VC_V21 (vc_ctx_create, xid, flags),
+  CALL_VC(CALL_VC_V21 (vc_ctx_create, xid, flags),
 	  CALL_VC_V13A(vc_ctx_create, xid, flags));
 }
 #endif
Index: lib/syscall_ctxmigrate-v21.hc
===================================================================
--- lib/syscall_ctxmigrate-v21.hc	(revision 461)
+++ lib/syscall_ctxmigrate-v21.hc	(working copy)
@@ -24,15 +24,7 @@
 static inline ALWAYSINLINE int
 vc_ctx_migrate_spaces(xid_t xid, uint_least64_t flags)
 {
-  int ret;
   struct vcmd_ctx_migrate data = { .flagword = flags };
 
-  ret = vc_getXIDType(xid);
-  if (ret == vcTYPE_STATIC || ret == vcTYPE_DYNAMIC) {
-    ret = vc_enter_namespace(xid, vc_get_space_mask() & ~(CLONE_NEWNS|CLONE_FS));
-    if (ret)
-      return ret;
-  }
-
   return vserver(VCMD_ctx_migrate_v1, CTX_USER2KERNEL(xid), &data);
 }
Index: lib/getinsecurebcaps.c
===================================================================
--- lib/getinsecurebcaps.c	(revision 462)
+++ lib/getinsecurebcaps.c	(working copy)
@@ -25,19 +25,15 @@
 uint_least64_t
 vc_get_insecurebcaps()
 {
-  return ( (1<<VC_CAP_LINUX_IMMUTABLE) | (1<<VC_CAP_NET_BROADCAST) |
-	   (1<<VC_CAP_NET_ADMIN) | (1<<VC_CAP_NET_RAW) |
-	   (1<<VC_CAP_IPC_LOCK) | (1<<VC_CAP_IPC_OWNER) |
-	   (1<<VC_CAP_SYS_MODULE) | (1<<VC_CAP_SYS_RAWIO) |
-	   (1<<VC_CAP_SYS_PACCT) | (1<<VC_CAP_SYS_ADMIN) |
-	   (1<<VC_CAP_SYS_NICE) |
-	   (1<<VC_CAP_SYS_RESOURCE) | (1<<VC_CAP_SYS_TIME) |
-	   (1<<VC_CAP_MKNOD) | (1<<VC_CAP_AUDIT_CONTROL)
-	   | ~(0x7fffffff)
+  return ~((1<<VC_CAP_CHOWN) | (1<<VC_CAP_DAC_OVERRIDE) |
+	   (1<<VC_CAP_DAC_READ_SEARCH) | (1<<VC_CAP_FOWNER) |
+	   (1<<VC_CAP_FSETID) | (1<<VC_CAP_KILL) |
+	   (1<<VC_CAP_SETGID) | (1<<VC_CAP_SETUID) |
+	   (1<<VC_CAP_NET_BIND_SERVICE) | (1<<VC_CAP_SYS_CHROOT) |
+	   (1<<VC_CAP_SYS_PTRACE) | (1<<VC_CAP_SYS_TTY_CONFIG) |
+	   (1<<VC_CAP_LEASE)
 
-#if defined(VC_ENABLE_API_COMPAT)
-	   | (vc_isSupported(vcFEATURE_VSHELPER) ? 0 : (1<<VC_CAP_SYS_BOOT))
-	   | (vc_isSupported(vcFEATURE_MIGRATE)  ? 0 : (1<<29)) // formerly QUOTACTL
-#endif
+	   | (vc_isSupported(vcFEATURE_VSHELPER) ? (1<<VC_CAP_SYS_BOOT) : 0)
+	   | (vc_isSupported(vcFEATURE_MIGRATE)  ? (1<<VC_CAP_AUDIT_WRITE) : 0) // formerly QUOTACTL
     );
 }
Index: lib/syscall_setnamespace-v21.hc
===================================================================
--- lib/syscall_setnamespace-v21.hc	(revision 461)
+++ lib/syscall_setnamespace-v21.hc	(working copy)
@@ -24,8 +24,12 @@
 #include "vserver.h"
 
 static inline ALWAYSINLINE int
-vc_set_namespace_spaces(xid_t xid, uint_least64_t mask)
+vc_set_namespace_spaces(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  struct vcmd_space_mask data = { .mask = mask };
-  return vserver(VCMD_set_space, CTX_USER2KERNEL(xid), &data);
+  struct vcmd_space_mask_v1 data = { .mask = mask };
+  if (index != 0) {
+    errno = EINVAL;
+    return -1;
+  }
+  return vserver(VCMD_set_space_v1, CTX_USER2KERNEL(xid), &data);
 }
Index: lib/internal.h
===================================================================
--- lib/internal.h	(revision 461)
+++ lib/internal.h	(working copy)
@@ -32,6 +32,24 @@
 extern "C" {
 #endif
 
+
+#ifdef HAVE_VERSIONING
+/* FIXME: HAVE_ASM_DOT_GLOBAL_NAME */
+#  define _symbol_version(real, name, version) \
+     __asm__ (".symver " #real "," #name "@" #version)
+#  define _default_symbol_version(real, name, version) \
+     __asm__ (".symver " #real "," #name "@@" #version)
+#else
+#  define _symbol_version(real, name, version)
+#  define _default_symbol_version(real, name, version) \
+  extern __typeof (real) name __attribute__ ((alias (#name)));
+#endif
+#define symbol_version(real, name, version) \
+	_symbol_version(real, name, version)
+#define default_symbol_version(real, name, version) \
+	_default_symbol_version(real, name, version)
+
+
 char *	vc_getVserverByCtx_Internal(xid_t ctx, /*@null@*/vcCfgStyle *style,
 				    /*@null@*/char const *revdir,
 				    bool validate_result);
Index: lib/syscall_ctxcreate-v21.hc
===================================================================
--- lib/syscall_ctxcreate-v21.hc	(revision 461)
+++ lib/syscall_ctxcreate-v21.hc	(working copy)
@@ -19,7 +19,6 @@
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
-#include <lib_internal/sys_unshare.h>
 
 static inline ALWAYSINLINE xid_t
 vc_ctx_create_v21(xid_t xid, struct vc_ctx_flags *flags)
@@ -36,13 +35,5 @@
   res = vserver(VCMD_ctx_create_v1, CTX_USER2KERNEL(xid), &data);
   res = CTX_KERNEL2USER(res);
 
-  if (res != VC_NOCTX) {
-    if (utilvserver_checkCompatConfig() & VC_VCI_SPACES) {
-      uint32_t spaces = vc_get_space_mask() & ~(CLONE_NEWNS|CLONE_FS);
-      sys_unshare(spaces);
-      vc_set_namespace(VC_SAMECTX, spaces);
-    }
-  }
-
   return res;
 }
Index: lib/bcaps-v13.c
===================================================================
--- lib/bcaps-v13.c	(revision 461)
+++ lib/bcaps-v13.c	(working copy)
@@ -29,16 +29,8 @@
 #include <strings.h>
 #include <assert.h>
 
-#define DECL(VAL) { #VAL, sizeof(#VAL)-1, 1 << (CAP_ ## VAL) }
+#define DECL(VAL) { #VAL, sizeof(#VAL)-1, 1ULL << (VC_CAP_ ## VAL) }
 
-#ifndef CAP_AUDIT_WRITE
-#  define CAP_AUDIT_WRITE	29
-#endif
-
-#ifndef CAP_AUDIT_CONTROL
-#  define CAP_AUDIT_CONTROL	30
-#endif
-
 static struct Mapping_uint64 const VALUES[] = {
   DECL(CHOWN),
   DECL(DAC_OVERRIDE),
@@ -71,6 +63,9 @@
   DECL(LEASE),
   DECL(AUDIT_WRITE),
   DECL(AUDIT_CONTROL),
+  DECL(SETFCAP),
+  DECL(MAC_OVERRIDE),
+  DECL(MAC_ADMIN),
 };
 
 inline static char const *
Index: lib/syscall_getspacemask.c
===================================================================
--- lib/syscall_getspacemask.c	(revision 461)
+++ lib/syscall_getspacemask.c	(working copy)
@@ -22,17 +22,26 @@
 #endif
 
 #include "vserver.h"
-#include "vserver-internal.h"
 #include "virtual.h"
 
+#if defined(VC_ENABLE_API_V21) && defined(VC_ENABLE_API_V23)
+#  define VC_MULTIVERSION_SYSCALL 1
+#endif
+#include "vserver-internal.h"
+
 #if defined(VC_ENABLE_API_V21)
 #  include "syscall_getspacemask-v21.hc"
 #endif
 
-#if defined(VC_ENABLE_API_V21)
+#if defined(VC_ENABLE_API_V23)
+#  include "syscall_getspacemask-v23.hc"
+#endif
+
+#if defined(VC_ENABLE_API_V21) || defined(VC_ENABLE_API_V23)
 uint_least64_t
 vc_get_space_mask()
 {
-  CALL_VC(CALL_VC_SPACES(vc_get_space_mask, 0));
+  CALL_VC(CALL_VC_V23P  (vc_get_space_mask, 0),
+	  CALL_VC_SPACES(vc_get_space_mask, 0));
 }
 #endif
Index: lib/syscall_setnamespace.c
===================================================================
--- lib/syscall_setnamespace.c	(revision 461)
+++ lib/syscall_setnamespace.c	(working copy)
@@ -23,9 +23,7 @@
 #include "vserver.h"
 #include "virtual.h"
 
-#if defined(VC_ENABLE_API_V13) && defined(VC_ENABLE_API_V21)
-#  define VC_MULTIVERSION_SYSCALL 1
-#endif
+#define VC_MULTIVERSION_SYSCALL 1
 #include "vserver-internal.h"
 
 #ifdef VC_ENABLE_API_V13
@@ -36,11 +34,16 @@
 #  include "syscall_setnamespace-v21.hc"
 #endif
 
-#if defined(VC_ENABLE_API_V13) || defined(VC_ENABLE_API_V21)
+#ifdef VC_ENABLE_API_V23
+#  include "syscall_setnamespace-v23.hc"
+#endif
+
+#if defined(VC_ENABLE_API_V13) || defined(VC_ENABLE_API_V21) || defined(VC_ENABLE_API_V23)
 int
-vc_set_namespace(xid_t xid, uint_least64_t mask)
+vc_set_namespace(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  CALL_VC(CALL_VC_SPACES(vc_set_namespace, xid, mask),
-	  CALL_VC_V13   (vc_set_namespace, xid, mask));
+  CALL_VC(CALL_VC_V23P  (vc_set_namespace, xid, mask, index),
+	  CALL_VC_SPACES(vc_set_namespace, xid, mask, index),
+	  CALL_VC_V13   (vc_set_namespace, xid, mask, index));
 }
 #endif
Index: lib/vserver-internal.h
===================================================================
--- lib/vserver-internal.h	(revision 461)
+++ lib/vserver-internal.h	(working copy)
@@ -273,6 +273,12 @@
 #define EXT2_IOC_GETCONTEXT		_IOR('x', 1, long)
 #define EXT2_IOC_SETCONTEXT		_IOW('x', 2, long)
 
+#if defined(__GNUC__)
+#  define VC_ATTR_HIDDEN		__attribute__ ((hidden))
+#else
+#  define VC_ATTR_HIDDEN
+#endif
+
 #ifndef HAVE_VSERVER
 #ifdef ENSC_SYSCALL_TRADITIONAL
 inline static UNUSED ALWAYSINLINE
Index: lib/syscall_enternamespace.c
===================================================================
--- lib/syscall_enternamespace.c	(revision 461)
+++ lib/syscall_enternamespace.c	(working copy)
@@ -23,9 +23,7 @@
 #include "vserver.h"
 #include "virtual.h"
 
-#if defined(VC_ENABLE_API_V13) && defined(VC_ENABLE_API_V21)
-#  define VC_MULTIVERSION_SYSCALL 1
-#endif
+#define VC_MULTIVERSION_SYSCALL 1
 #include "vserver-internal.h"
 
 #ifdef VC_ENABLE_API_V13
@@ -36,11 +34,16 @@
 #  include "syscall_enternamespace-v21.hc"
 #endif
 
+#ifdef VC_ENABLE_API_V23
+#  include "syscall_enternamespace-v23.hc"
+#endif
+
 #if defined(VC_ENABLE_API_V13) || defined(VC_ENABLE_API_V21)
 int
-vc_enter_namespace(xid_t xid, uint_least64_t mask)
+vc_enter_namespace(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  CALL_VC(CALL_VC_SPACES(vc_enter_namespace, xid, mask),
-	  CALL_VC_V13   (vc_enter_namespace, xid, mask));
+  CALL_VC(CALL_VC_V23P  (vc_enter_namespace, xid, mask, index),
+	  CALL_VC_SPACES(vc_enter_namespace, xid, mask, index),
+	  CALL_VC_V13   (vc_enter_namespace, xid, mask, index));
 }
 #endif
Index: lib/issupportedstring.c
===================================================================
--- lib/issupportedstring.c	(revision 461)
+++ lib/issupportedstring.c	(working copy)
@@ -35,7 +35,7 @@
   DECL(MIGRATE), DECL(NAMESPACE), DECL(SCHED),    DECL(VINFO),
   DECL(VHI),     DECL(VSHELPER0), DECL(VSHELPER), DECL(VWAIT),
   DECL(VNET),    DECL(VSTAT),     DECL(PPTAG),    DECL(PIDSPACE),
-  DECL(SPACES),  DECL(PERSISTENT),
+  DECL(SPACES),  DECL(PERSISTENT),DECL(PIVOT_ROOT),
 };
 
 bool
Index: lib/syscall_getspacedefault-v23.hc
===================================================================
--- lib/syscall_getspacedefault-v23.hc	(revision 461)
+++ lib/syscall_getspacedefault-v23.hc	(working copy)
@@ -23,7 +23,7 @@
 static inline ALWAYSINLINE uint_least64_t
 vc_get_space_default_v23(int UNUSED tmp)
 {
-  struct vcmd_space_mask data = { .mask = 0 };
+  struct vcmd_space_mask_v1 data = { .mask = 0 };
   int ret = vserver(VCMD_get_space_default, 0, &data);
   if (ret)
     return ret;
Index: lib/syscall_setnamespace-v13.hc
===================================================================
--- lib/syscall_setnamespace-v13.hc	(revision 461)
+++ lib/syscall_setnamespace-v13.hc	(working copy)
@@ -23,9 +23,13 @@
 #include "vserver.h"
 
 static inline ALWAYSINLINE int
-vc_set_namespace_v13(xid_t xid, uint_least64_t mask)
+vc_set_namespace_v13(xid_t xid, uint_least64_t mask, uint32_t index)
 {
   if ((mask & (CLONE_NEWNS|CLONE_FS)) == 0)
     return 0;
+  if (index != 0) {
+    errno = EINVAL;
+    return -1;
+  }
   return vserver(VCMD_set_space_v0, CTX_USER2KERNEL(xid), 0);
 }
Index: COPYING
===================================================================
--- COPYING	(revision 461)
+++ COPYING	(working copy)
@@ -1,3 +1,343 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
                     GNU GENERAL PUBLIC LICENSE
                        Version 3, 29 June 2007
 
Index: ensc_wrappers/wrappers-vserver.hc
===================================================================
--- ensc_wrappers/wrappers-vserver.hc	(revision 461)
+++ ensc_wrappers/wrappers-vserver.hc	(working copy)
@@ -146,15 +146,15 @@
 }
 
 inline static WRAPPER_DECL void
-Evc_set_namespace(xid_t xid, uint_least64_t mask)
+Evc_set_namespace(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  FatalErrnoError(vc_set_namespace(xid, mask)==-1, "vc_set_namespace()");
+  FatalErrnoError(vc_set_namespace(xid, mask, index)==-1, "vc_set_namespace()");
 }
 
 inline static WRAPPER_DECL void
-Evc_enter_namespace(xid_t xid, uint_least64_t mask)
+Evc_enter_namespace(xid_t xid, uint_least64_t mask, uint32_t index)
 {
-  FatalErrnoError(vc_enter_namespace(xid, mask)==-1, "vc_enter_namespace()");
+  FatalErrnoError(vc_enter_namespace(xid, mask, index)==-1, "vc_enter_namespace()");
 }
 
 inline static WRAPPER_DECL xid_t
Index: distrib/defaults/devs
===================================================================
--- distrib/defaults/devs	(revision 462)
+++ distrib/defaults/devs	(working copy)
@@ -6,3 +6,4 @@
 tty     c 5 0 666
 ptmx    c 5 2 666
 fd      l ../proc/self/fd 777
+shm     d 1777
Index: distrib/Makefile.am
===================================================================
--- distrib/Makefile.am	(revision 461)
+++ distrib/Makefile.am	(working copy)
@@ -67,9 +67,11 @@
 			   f8/apt/rpmpriorities    f8/pkgs/01    f8/pkgs/02    f8/pkgs/03 \
 			   f8/yum/yum.conf $(wildcard $(srcdir)/f8/yum.repos.d/*.repo) \
 			   $(wildcard $(srcdir)/f8/rpmlist.d/*.lst) $(wildcard $(srcdir)/8/rpmlist.d/*.opt) \
+			   $(wildcard $(srcdir)/f8/pubkeys/RPM-GPG*) \
 			   f9/pkgs/01 f9/pkgs/02 f9/pkgs/03 f9/yum/yum.conf \
 			   $(wildcard $(srcdir)/f9/yum.repos.d/*.repo) \
 			   $(wildcard $(srcdir)/f9/rpmlist.d/*.lst) $(wildcard $(srcdir)/9/rpmlist.d/*.opt) \
+			   $(wildcard $(srcdir)/f9/pubkeys/RPM-GPG*) \
 			   centos4/pkgs/01 centos4/pkgs/02 centos4/pkgs/03 \
 			   centos4/yum/yum.conf $(wildcard $(srcdir)/centos4/yum.repos.d/*.repo) \
 			   centos5/pkgs/01 centos5/pkgs/02 centos5/pkgs/03 \
Index: distrib/f8/yum.repos.d/fedora-updates-testing.repo
===================================================================
--- distrib/f8/yum.repos.d/fedora-updates-testing.repo	(revision 461)
+++ distrib/f8/yum.repos.d/fedora-updates-testing.repo	(working copy)
@@ -1,8 +1,8 @@
 [updates-testing]
 name=Fedora 8 - $basearch - Test Updates
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/8/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f8&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/8/$basearch.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f8.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora-test
@@ -10,8 +10,8 @@
 [updates-testing-debuginfo]
 name=Fedora 8 - $basearch - Test Updates Debug
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/8/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f8&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/8/$basearch/debug.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f8.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora-test
@@ -19,8 +19,8 @@
 [updates-testing-source]
 name=Fedora 8 - Test Updates Source
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/8/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-source-f8&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/8/SRPMS.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-source-f8.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora-test
Index: distrib/f8/yum.repos.d/fedora-updates.repo
===================================================================
--- distrib/f8/yum.repos.d/fedora-updates.repo	(revision 461)
+++ distrib/f8/yum.repos.d/fedora-updates.repo	(working copy)
@@ -1,8 +1,8 @@
 [updates]
 name=Fedora 8 - $basearch - Updates
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/8/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/8/$basearch.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8.newkey&arch=$basearch
 enabled=1
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora
@@ -10,8 +10,8 @@
 [updates-debuginfo]
 name=Fedora 8 - $basearch - Updates - Debug
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/8/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f8&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/8/$basearch.newkey/debug/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f8.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora
@@ -19,8 +19,8 @@
 [updates-source]
 name=Fedora 8 - Updates Source
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/8/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f8&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/8/SRPMS.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f8.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora
Index: distrib/f9/yum.repos.d/fedora-updates-testing.repo
===================================================================
--- distrib/f9/yum.repos.d/fedora-updates-testing.repo	(revision 461)
+++ distrib/f9/yum.repos.d/fedora-updates-testing.repo	(working copy)
@@ -1,8 +1,8 @@
 [updates-testing]
 name=Fedora 9 - $basearch - Test Updates
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/9/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f9&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/9/$basearch.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f9.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/$basearch/os/RPM-GPG-KEY-fedora-test
@@ -10,8 +10,8 @@
 [updates-testing-debuginfo]
 name=Fedora 9 - $basearch - Test Updates Debug
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/9/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f9&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/9/$basearch.newkey/debug/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f9.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/$basearch/os/RPM-GPG-KEY-fedora-test
@@ -19,8 +19,8 @@
 [updates-testing-source]
 name=Fedora 9 - Test Updates Source
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/9/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-source-f9&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/9/SRPMS.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-source-f9.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/$basearch/os/RPM-GPG-KEY-fedora-test
Index: distrib/f9/yum.repos.d/fedora-updates.repo
===================================================================
--- distrib/f9/yum.repos.d/fedora-updates.repo	(revision 461)
+++ distrib/f9/yum.repos.d/fedora-updates.repo	(working copy)
@@ -1,8 +1,8 @@
 [updates]
 name=Fedora 9 - $basearch - Updates
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/$basearch.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9.newkey&arch=$basearch
 enabled=1
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/$basearch/os/RPM-GPG-KEY-fedora
@@ -10,8 +10,8 @@
 [updates-debuginfo]
 name=Fedora 9 - $basearch - Updates - Debug
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f9&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/$basearch.newkey/debug/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f9.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/$basearch/os/RPM-GPG-KEY-fedora
@@ -19,8 +19,8 @@
 [updates-source]
 name=Fedora 9 - Updates Source
 failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f9&arch=$basearch
+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/SRPMS.newkey/
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f9.newkey&arch=$basearch
 enabled=0
 gpgcheck=1
 gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/$basearch/os/RPM-GPG-KEY-fedora
Index: contrib/yum-3.2.4-chroot.patch
===================================================================
--- contrib/yum-3.2.4-chroot.patch	(revision 461)
+++ contrib/yum-3.2.4-chroot.patch	(working copy)
@@ -1,44 +1,78 @@
---- yum-3.2.4/yum/__init__.py.chroot
-+++ yum-3.2.4/yum/__init__.py
-@@ -214,8 +214,7 @@ class YumBase(depsolve.Depsolve):
-         repo_config_age = self.conf.config_file_age
-         
-         for reposdir in self.conf.reposdir:
--            if os.path.exists(self.conf.installroot+'/'+reposdir):
--                reposdir = self.conf.installroot + '/' + reposdir
-+            reposdir  = self.conf.getRootedPath(reposdir)
+diff -Nurp yum-3.2.4.orig/cli.py yum-3.2.4/cli.py
+--- yum-3.2.4.orig/cli.py	2007-08-15 17:48:03.000000000 +0200
++++ yum-3.2.4/cli.py	2008-09-29 02:32:24.000000000 +0200
+@@ -1204,13 +1204,14 @@ class YumOptionParser(OptionParser):
+     def getRoot(self,opts):
+         # If the conf file is inside the  installroot - use that.
+         # otherwise look for it in the normal root
++        if opts.conffile==None:
++            opts.conffile = '/etc/yum/yum.conf'
++            if opts.installroot:
++                if os.access(opts.installroot+opts.conffile, os.R_OK):
++                    opts.conffile = opts.installroot+opts.conffile
++                elif os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
++                    opts.conffile = opts.installroot+'/etc/yum.conf'
+         if opts.installroot:
+-            if os.access(opts.installroot+'/'+opts.conffile, os.R_OK):
+-                opts.conffile = opts.installroot+'/'+opts.conffile
+-            elif opts.conffile == '/etc/yum/yum.conf':
+-                # check if /installroot/etc/yum.conf exists.
+-                if os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
+-                    opts.conffile = opts.installroot+'/etc/yum.conf'         
+             root=opts.installroot
+         else:
+             root = '/'
+@@ -1231,7 +1232,7 @@ class YumOptionParser(OptionParser):
+                 help="be tolerant of errors")
+         self.add_option("-C", dest="cacheonly", action="store_true",
+                 help="run entirely from cache, don't update cache")
+-        self.add_option("-c", dest="conffile", default='/etc/yum/yum.conf',
++        self.add_option("-c", dest="conffile", default=None,
+                 help="config file location", metavar=' [config file]')
+         self.add_option("-R", dest="sleeptime", type='int', default=None,
+                 help="maximum command wait time", metavar=' [minutes]')
+diff -Nurp yum-3.2.4.orig/docs/yum.conf.5 yum-3.2.4/docs/yum.conf.5
+--- yum-3.2.4.orig/docs/yum.conf.5	2007-08-16 14:42:26.000000000 +0200
++++ yum-3.2.4/docs/yum.conf.5	2008-09-29 02:32:24.000000000 +0200
+@@ -23,8 +23,10 @@ The [main] section must exist for yum to
+ following options:
  
-             if os.path.isdir(reposdir):
-                 for repofn in glob.glob('%s/*.repo' % reposdir):
-@@ -664,11 +663,9 @@ class YumBase(depsolve.Depsolve):
-         # if we're not root then we don't lock - just return nicely
-         if self.conf.uid != 0:
-             return
--            
--        root = self.conf.installroot
--        lockfile = root + '/' + lockfile # lock in the chroot
--        lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra /
--        
+ .IP \fBcachedir\fR
+-Directory where yum should store its cache and db files. The default is
+-`/var/cache/yum'.
++Directory where yum should store its cache and db files. The default
++is `/var/cache/yum'. Unless the prefixes `hostfs://' or `chrootfs://'
++are used, some magic will be applied to determine the real path in
++combination with `--installroot'.
+ 
+ .IP \fBpersistdir\fR
+ Directory where yum should store information that should persist over multiple
+@@ -44,6 +46,10 @@ documented in \fB[repository] options\fR
+ repositories defined in /etc/yum/yum.conf to form the complete set of
+ repositories that yum will use.
+ 
++Unless the prefixes `hostfs://' or `chrootfs://' are used, some magic
++will be applied to determine the real path in combination with
++`--installroot'.
 +
-+        lockfile = self.conf.lockfile
-+
-         mypid=str(os.getpid())    
-         while not self._lock(lockfile, mypid, 0644):
-             fd = open(lockfile, 'r')
-@@ -700,9 +697,8 @@ class YumBase(depsolve.Depsolve):
-         if self.conf.uid != 0:
-             return
-         
--        root = self.conf.installroot
--        lockfile = root + '/' + lockfile # lock in the chroot
--        
-+        lockfile=self.conf.lockfile
-+
-         self._unlock(lockfile)
-         
-     def _lock(self, filename, contents='', mode=0777):
---- yum-3.2.4/yum/config.py.chroot
-+++ yum-3.2.4/yum/config.py
+ .IP \fBdebuglevel\fR
+ Debug message output level. Practical range is 0\-10. Default is `2'.
+ 
+@@ -51,7 +57,10 @@ Debug message output level. Practical ra
+ Error message output level. Practical range is 0\-10. Default is `2'.
+ 
+ .IP \fBlogfile\fR
+-Full directory and file name for where yum should write its log file.
++Full directory and file name for where yum should write its log
++file. Unless the prefixes `hostfs://' or `chrootfs://' are used,
++some magic will be applied to determine the real path in combination
++with `--installroot'.
+ 
+ .IP \fBgpgcheck\fR
+ Either `1' or `0'. This tells yum whether or not it should perform a GPG
+diff -Nurp yum-3.2.4.orig/yum/config.py yum-3.2.4/yum/config.py
+--- yum-3.2.4.orig/yum/config.py	2007-08-28 19:38:39.000000000 +0200
++++ yum-3.2.4/yum/config.py	2008-09-29 03:09:28.000000000 +0200
 @@ -469,6 +469,26 @@ class StartupConf(BaseConfig):
      pluginpath = ListOption(['/usr/share/yum-plugins', '/usr/lib/yum-plugins'])
      pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
@@ -79,80 +113,63 @@
  
      # Apply the installroot to directory options
 -    for option in ('cachedir', 'logfile', 'persistdir'):
-+    for option in ('cachedir', 'logfile', 'persistdir', 'lockfile'):
++    for option in ('cachedir', 'logfile', 'lockfile'):
          path = getattr(yumconf, option)
 -        setattr(yumconf, option, yumconf.installroot + path)
 +        setattr(yumconf, option, yumconf.getRootedPath(path))
      
      # Add in some extra attributes which aren't actually configuration values 
      yumconf.yumvar = yumvars
---- yum-3.2.4/docs/yum.conf.5.chroot
-+++ yum-3.2.4/docs/yum.conf.5
-@@ -23,8 +23,10 @@ The [main] section must exist for yum to
- following options:
+diff -Nurp yum-3.2.4.orig/yum/__init__.py yum-3.2.4/yum/__init__.py
+--- yum-3.2.4.orig/yum/__init__.py	2007-08-28 20:45:13.000000000 +0200
++++ yum-3.2.4/yum/__init__.py	2008-09-29 03:08:34.000000000 +0200
+@@ -214,8 +214,7 @@ class YumBase(depsolve.Depsolve):
+         repo_config_age = self.conf.config_file_age
+         
+         for reposdir in self.conf.reposdir:
+-            if os.path.exists(self.conf.installroot+'/'+reposdir):
+-                reposdir = self.conf.installroot + '/' + reposdir
++            reposdir = self.conf.getRootedPath(reposdir)
  
- .IP \fBcachedir\fR
--Directory where yum should store its cache and db files. The default is
--`/var/cache/yum'.
-+Directory where yum should store its cache and db files. The default
-+is `/var/cache/yum'. Unless the prefixes `hostfs://' or `chrootfs://'
-+are used, some magic will be applied to determine the real path in
-+combination with `--installroot'.
- 
- .IP \fBpersistdir\fR
- Directory where yum should store information that should persist over multiple
-@@ -44,6 +46,10 @@ documented in \fB[repository] options\fR
- repositories defined in /etc/yum/yum.conf to form the complete set of
- repositories that yum will use.
- 
-+Unless the prefixes `hostfs://' or `chrootfs://' are used, some magic
-+will be applied to determine the real path in combination with
-+`--installroot'.
+             if os.path.isdir(reposdir):
+                 for repofn in glob.glob('%s/*.repo' % reposdir):
+@@ -664,11 +663,9 @@ class YumBase(depsolve.Depsolve):
+         # if we're not root then we don't lock - just return nicely
+         if self.conf.uid != 0:
+             return
+-            
+-        root = self.conf.installroot
+-        lockfile = root + '/' + lockfile # lock in the chroot
+-        lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra /
+-        
 +
- .IP \fBdebuglevel\fR
- Debug message output level. Practical range is 0\-10. Default is `2'.
- 
-@@ -51,7 +57,10 @@ Debug message output level. Practical ra
- Error message output level. Practical range is 0\-10. Default is `2'.
- 
- .IP \fBlogfile\fR
--Full directory and file name for where yum should write its log file.
-+Full directory and file name for where yum should write its log
-+file. Unless the prefixes `hostfs://' or `chrootfs://' are used,
-+some magic will be applied to determine the real path in combination
-+with `--installroot'.
- 
- .IP \fBgpgcheck\fR
- Either `1' or `0'. This tells yum whether or not it should perform a GPG
---- yum-3.2.4/cli.py.chroot
-+++ yum-3.2.4/cli.py
-@@ -1204,13 +1204,14 @@ class YumOptionParser(OptionParser):
-     def getRoot(self,opts):
-         # If the conf file is inside the  installroot - use that.
-         # otherwise look for it in the normal root
-+        if opts.conffile==None:
-+            opts.conffile = '/etc/yum/yum.conf'
-+            if opts.installroot:
-+                if os.access(opts.installroot+opts.conffile, os.R_OK):
-+                    opts.conffile = opts.installroot+opts.conffile
-+                elif os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
-+                    opts.conffile = opts.installroot+'/etc/yum.conf'
-         if opts.installroot:
--            if os.access(opts.installroot+'/'+opts.conffile, os.R_OK):
--                opts.conffile = opts.installroot+'/'+opts.conffile
--            elif opts.conffile == '/etc/yum/yum.conf':
--                # check if /installroot/etc/yum.conf exists.
--                if os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
--                    opts.conffile = opts.installroot+'/etc/yum.conf'         
-             root=opts.installroot
-         else:
-             root = '/'
-@@ -1231,7 +1232,7 @@ class YumOptionParser(OptionParser):
-                 help="be tolerant of errors")
-         self.add_option("-C", dest="cacheonly", action="store_true",
-                 help="run entirely from cache, don't update cache")
--        self.add_option("-c", dest="conffile", default='/etc/yum/yum.conf',
-+        self.add_option("-c", dest="conffile", default=None,
-                 help="config file location", metavar=' [config file]')
-         self.add_option("-R", dest="sleeptime", type='int', default=None,
-                 help="maximum command wait time", metavar=' [minutes]')
++        lockfile = self.conf.lockfile
++
+         mypid=str(os.getpid())    
+         while not self._lock(lockfile, mypid, 0644):
+             fd = open(lockfile, 'r')
+@@ -700,9 +697,8 @@ class YumBase(depsolve.Depsolve):
+         if self.conf.uid != 0:
+             return
+         
+-        root = self.conf.installroot
+-        lockfile = root + '/' + lockfile # lock in the chroot
+-        
++        lockfile=self.conf.lockfile
++
+         self._unlock(lockfile)
+         
+     def _lock(self, filename, contents='', mode=0777):
+diff -Nurp yum-3.2.4.orig/yum/rpmtrans.py yum-3.2.4/yum/rpmtrans.py
+--- yum-3.2.4.orig/yum/rpmtrans.py	2007-08-15 19:27:19.000000000 +0200
++++ yum-3.2.4/yum/rpmtrans.py	2008-09-29 03:09:54.000000000 +0200
+@@ -149,7 +149,8 @@ class RPMTransaction:
+     
+         if not hasattr(self, '_ts_done'):
+             # need config variable to put this in a better path/name
+-            te_fn = '%s/transaction-done.%s' % (self.base.conf.persistdir, self._ts_time)
++            te_fn = '%s/transaction-done.%s' % (
++                self.base.conf.getRootedPath(self.base.conf.persistdir), self._ts_time)
+             self.ts_done_fn = te_fn
+             try:
+                 self._ts_done = open(te_fn, 'w')
Index: contrib/manifest.dat.pathsubst
===================================================================
--- contrib/manifest.dat.pathsubst	(revision 461)
+++ contrib/manifest.dat.pathsubst	(working copy)
@@ -19,7 +19,6 @@
 build  @PKGLIBDIR@/vserver-setup.functions
 base   @PKGLIBDIR@/vserver.functions
 base   @PKGLIBDIR@/vserver.start
-@ENSC_HAVE_C99_COMPILER_TRUE@base   @PKGLIBDIR@/vserver.start.bin
 base   @PKGLIBDIR@/vserver.stop
 base   @PKGLIBDIR@/vserver.suexec
 base   @PKGLIBDIR@/vserver.delete
Index: util-vserver.spec.in
===================================================================
--- util-vserver.spec.in	(revision 461)
+++ util-vserver.spec.in	(working copy)
@@ -1,5 +1,9 @@
 # $Id: util-vserver.spec.in 2745 2008-07-14 20:26:28Z dhozac $
 
+%if "%{?_without_python:1}" != "1"
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%endif
+
 ## This package understands the following switches:
 ## --without dietlibc        ...   disable usage of dietlibc
 ## --with xalan              ...   require/use the xalan xslt processor
@@ -43,6 +47,7 @@
 %{?_without_beecrypt:BuildRequires: nss-devel}
 BuildRequires:	e2fsprogs
 %{!?_without_doc:BuildRequires:	doxygen tetex-latex}
+%{!?_without_python:BuildRequires: python python-devel ctags}
 Requires(post):		%name-core
 Requires(pre):		%pkglibdir
 Requires(postun):	%pkglibdir
@@ -94,7 +99,12 @@
 Requires:		pkgconfig
 Requires:		%name-lib = %version-%release
 
+%package python
+Summary:		Python bindings to develop vserver-based applications
+Group:			Development/Libraries
+Requires:		%name-lib = %version-%release
 
+
 %description
 util-vserver provides the components and a framework to setup virtual
 servers.  A virtual server runs inside a linux server. It is nevertheless
@@ -167,7 +177,17 @@
 This package contains header files and libraries which are needed to
 develop VServer related applications.
 
+%description python
+util-vserver provides the components and a framework to setup virtual
+servers.  A virtual server runs inside a linux server. It is nevertheless
+highly independent. As such, you can run various services with normal
+configuration. The various vservers can't interact with each other and
+can't interact with services in the main server.
 
+This package contains the files needed to interface with the
+Linux-VServer API from Python.
+
+
 %prep
 %setup -q -n %name-%fullver
 
@@ -176,7 +196,8 @@
 %configure --with-initrddir=%_initrddir --enable-release \
            %{?_without_dietlibc:--disable-dietlibc} \
            %{?_with_legacy:--enable-apis=NOLEGACY} \
-           --with-initscripts=sysv
+           --with-initscripts=sysv \
+           %{?_without_python:--without-python}
 
 %__make %{?_smp_mflags} all
 %{!?_without_doc:%__make %{?_smp_mflags} doc}
@@ -361,6 +382,11 @@
 %{!?_without_doc:%doc lib/apidoc/html}
 
 
+%files python
+%defattr(-,root,root,-)
+%{!?_without_python:%{python_sitearch}/*}
+
+
 %changelog
 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
 - updated URLs
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 461)
+++ Makefile.am	(working copy)
@@ -51,6 +51,8 @@
 initrd_SCRIPTS =
 sysconf_DATA =
 
+pyexec_LTLIBRARIES = 
+
 DIETPROGS =		$(LIBENSCVECTOR_DIET)
 
 BUILT_SOURCES =		pathconfig.h \
@@ -225,8 +227,11 @@
 include $(top_srcdir)/ensc_wrappers/Makefile-files
 include $(top_srcdir)/ensc_fmt/Makefile-files
 include $(top_srcdir)/lib_internal/Makefile-files
-include $(top_srcdir)/vserver-start/Makefile-files
+#include $(top_srcdir)/vserver-start/Makefile-files
 include $(top_srcdir)/gentoo/Makefile-files
+if HAVE_PYTHON
+include $(top_srcdir)/python/Makefile-files
+endif
 
 include $(top_srcdir)/m4/gpgsig.am
 include $(top_srcdir)/m4/validate.am

Attachment: signature.asc
Description: Digital signature


Reply to: